browser-debugger-cli 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__testfixtures__/cdpMessages.d.ts +1 -1
- package/dist/__testfixtures__/connectionTargets.d.ts +1 -1
- package/dist/__tests__/fixtures/schema-v0.2.1.golden.json +47 -0
- package/dist/__tests__/schema.contract.test.d.ts +19 -0
- package/dist/__tests__/schema.contract.test.d.ts.map +1 -0
- package/dist/__tests__/schema.contract.test.js +236 -0
- package/dist/__tests__/schema.contract.test.js.map +1 -0
- package/dist/__testutils__/assertions.d.ts +1 -1
- package/dist/__testutils__/testFixtures.d.ts +1 -1
- package/dist/cli/commands/cdp.js +1 -1
- package/dist/cli/commands/cleanup.d.ts.map +1 -1
- package/dist/cli/commands/cleanup.js +12 -13
- package/dist/cli/commands/cleanup.js.map +1 -1
- package/dist/cli/commands/console.js +2 -2
- package/dist/cli/commands/details.js +3 -3
- package/dist/cli/commands/details.js.map +1 -1
- package/dist/cli/commands/dom/helpers/errorHandler.d.ts.map +1 -1
- package/dist/cli/commands/dom/helpers/errorHandler.js +4 -3
- package/dist/cli/commands/dom/helpers/errorHandler.js.map +1 -1
- package/dist/cli/commands/dom/index.js +1 -1
- package/dist/cli/commands/dom.d.ts.map +1 -0
- package/dist/cli/commands/dom.js +257 -0
- package/dist/cli/commands/dom.js.map +1 -0
- package/dist/cli/commands/domErrorHandler.d.ts +45 -0
- package/dist/cli/commands/domErrorHandler.d.ts.map +1 -0
- package/dist/cli/commands/domErrorHandler.js +71 -0
- package/dist/cli/commands/domErrorHandler.js.map +1 -0
- package/dist/cli/commands/domEvalHelpers.d.ts +52 -0
- package/dist/cli/commands/domEvalHelpers.d.ts.map +1 -0
- package/dist/cli/commands/domEvalHelpers.js +76 -0
- package/dist/cli/commands/domEvalHelpers.js.map +1 -0
- package/dist/cli/commands/domOptionsBuilder.d.ts +35 -0
- package/dist/cli/commands/domOptionsBuilder.d.ts.map +1 -0
- package/dist/cli/commands/domOptionsBuilder.js +51 -0
- package/dist/cli/commands/domOptionsBuilder.js.map +1 -0
- package/dist/cli/{collectors/helpers/selectorParser.d.ts → commands/domSelectorParser.d.ts} +1 -1
- package/dist/cli/commands/domSelectorParser.d.ts.map +1 -0
- package/dist/cli/{collectors/helpers/selectorParser.js → commands/domSelectorParser.js} +1 -1
- package/dist/cli/commands/domSelectorParser.js.map +1 -0
- package/dist/cli/commands/network.d.ts.map +1 -1
- package/dist/cli/commands/network.js +8 -5
- package/dist/cli/commands/network.js.map +1 -1
- package/dist/cli/commands/peek.d.ts.map +1 -1
- package/dist/cli/commands/peek.js +7 -7
- package/dist/cli/commands/peek.js.map +1 -1
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +19 -2
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +13 -10
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/stop.d.ts.map +1 -1
- package/dist/cli/commands/stop.js +7 -6
- package/dist/cli/commands/stop.js.map +1 -1
- package/dist/cli/formatters/detailsFormatter.d.ts +1 -1
- package/dist/cli/formatters/previewFormatter.d.ts +1 -1
- package/dist/cli/formatters/previewFormatter.js +1 -1
- package/dist/cli/formatters/previewFormatter.js.map +1 -1
- package/dist/cli/formatters/statusFormatter.d.ts +6 -1
- package/dist/cli/formatters/statusFormatter.d.ts.map +1 -1
- package/dist/cli/formatters/statusFormatter.js +49 -4
- package/dist/cli/formatters/statusFormatter.js.map +1 -1
- package/dist/cli/handlers/CommandRunner.d.ts.map +1 -1
- package/dist/cli/handlers/CommandRunner.js +5 -5
- package/dist/cli/handlers/CommandRunner.js.map +1 -1
- package/dist/cli/handlers/OutputBuilder.d.ts +1 -1
- package/dist/cli/handlers/daemonSessionController.d.ts +1 -1
- package/dist/cli/handlers/daemonSessionController.d.ts.map +1 -1
- package/dist/cli/handlers/daemonSessionController.js +16 -45
- package/dist/cli/handlers/daemonSessionController.js.map +1 -1
- package/dist/cli/handlers/landingPage.d.ts +8 -0
- package/dist/cli/handlers/landingPage.d.ts.map +1 -0
- package/dist/cli/handlers/landingPage.js +8 -0
- package/dist/cli/handlers/landingPage.js.map +1 -0
- package/dist/cli/registry.js +10 -10
- package/dist/cli/registry.js.map +1 -1
- package/dist/collectors/__tests__/network.contract.test.js +25 -10
- package/dist/collectors/__tests__/network.contract.test.js.map +1 -1
- package/dist/collectors/console.d.ts +1 -1
- package/dist/collectors/console.js.map +1 -1
- package/dist/collectors/dom.d.ts +1 -1
- package/dist/collectors/network.d.ts +1 -1
- package/dist/collectors/network.js.map +1 -1
- package/dist/commandRegistry.d.ts +11 -0
- package/dist/commandRegistry.d.ts.map +1 -0
- package/dist/commandRegistry.js +45 -0
- package/dist/commandRegistry.js.map +1 -0
- package/dist/commands/__tests__/cdp.contract.test.d.ts +24 -0
- package/dist/commands/__tests__/cdp.contract.test.d.ts.map +1 -0
- package/dist/commands/__tests__/cdp.contract.test.js +466 -0
- package/dist/commands/__tests__/cdp.contract.test.js.map +1 -0
- package/dist/commands/__tests__/domEval.contract.test.d.ts +17 -0
- package/dist/commands/__tests__/domEval.contract.test.d.ts.map +1 -0
- package/dist/commands/__tests__/domEval.contract.test.js +231 -0
- package/dist/commands/__tests__/domEval.contract.test.js.map +1 -0
- package/dist/commands/cdp.d.ts +8 -0
- package/dist/commands/cdp.d.ts.map +1 -0
- package/dist/commands/cdp.js +45 -0
- package/dist/commands/cdp.js.map +1 -0
- package/dist/commands/cleanup.d.ts +8 -0
- package/dist/commands/cleanup.d.ts.map +1 -0
- package/dist/commands/cleanup.js +170 -0
- package/dist/commands/cleanup.js.map +1 -0
- package/dist/commands/console.d.ts +8 -0
- package/dist/commands/console.d.ts.map +1 -0
- package/dist/commands/console.js +92 -0
- package/dist/commands/console.js.map +1 -0
- package/dist/commands/details.d.ts +8 -0
- package/dist/commands/details.d.ts.map +1 -0
- package/dist/commands/details.js +68 -0
- package/dist/commands/details.js.map +1 -0
- package/dist/commands/dom.d.ts +8 -0
- package/dist/commands/dom.d.ts.map +1 -0
- package/dist/commands/dom.js +249 -0
- package/dist/commands/dom.js.map +1 -0
- package/dist/commands/domErrorHandler.d.ts +45 -0
- package/dist/commands/domErrorHandler.d.ts.map +1 -0
- package/dist/commands/domErrorHandler.js +71 -0
- package/dist/commands/domErrorHandler.js.map +1 -0
- package/dist/commands/domEvalHelpers.d.ts +48 -0
- package/dist/commands/domEvalHelpers.d.ts.map +1 -0
- package/dist/commands/domEvalHelpers.js +72 -0
- package/dist/commands/domEvalHelpers.js.map +1 -0
- package/dist/commands/domOptionsBuilder.d.ts +35 -0
- package/dist/commands/domOptionsBuilder.d.ts.map +1 -0
- package/dist/commands/domOptionsBuilder.js +51 -0
- package/dist/commands/domOptionsBuilder.js.map +1 -0
- package/dist/commands/domSelectorParser.d.ts +20 -0
- package/dist/commands/domSelectorParser.d.ts.map +1 -0
- package/dist/commands/domSelectorParser.js +20 -0
- package/dist/commands/domSelectorParser.js.map +1 -0
- package/dist/commands/network.d.ts +8 -0
- package/dist/commands/network.d.ts.map +1 -0
- package/dist/commands/network.js +41 -0
- package/dist/commands/network.js.map +1 -0
- package/dist/commands/peek.d.ts +8 -0
- package/dist/commands/peek.d.ts.map +1 -0
- package/dist/commands/peek.js +115 -0
- package/dist/commands/peek.js.map +1 -0
- package/dist/commands/shared/CommandRunner.d.ts +62 -0
- package/dist/commands/shared/CommandRunner.d.ts.map +1 -0
- package/dist/commands/shared/CommandRunner.js +97 -0
- package/dist/commands/shared/CommandRunner.js.map +1 -0
- package/dist/commands/shared/OutputBuilder.d.ts +60 -0
- package/dist/commands/shared/OutputBuilder.d.ts.map +1 -0
- package/dist/commands/shared/OutputBuilder.js +138 -0
- package/dist/commands/shared/OutputBuilder.js.map +1 -0
- package/dist/commands/shared/commonOptions.d.ts +54 -0
- package/dist/commands/shared/commonOptions.d.ts.map +1 -0
- package/dist/commands/shared/commonOptions.js +65 -0
- package/dist/commands/shared/commonOptions.js.map +1 -0
- package/dist/commands/shared/daemonSessionController.d.ts +23 -0
- package/dist/commands/shared/daemonSessionController.d.ts.map +1 -0
- package/dist/commands/shared/daemonSessionController.js +79 -0
- package/dist/commands/shared/daemonSessionController.js.map +1 -0
- package/dist/commands/shared/landingPage.d.ts +8 -0
- package/dist/commands/shared/landingPage.d.ts.map +1 -0
- package/dist/commands/shared/landingPage.js +8 -0
- package/dist/commands/shared/landingPage.js.map +1 -0
- package/dist/commands/shared/sessionController.d.ts +21 -0
- package/dist/commands/shared/sessionController.d.ts.map +1 -0
- package/dist/commands/shared/sessionController.js +54 -0
- package/dist/commands/shared/sessionController.js.map +1 -0
- package/dist/commands/start.d.ts +9 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +85 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/{cli/commands/query.d.ts → commands/status.d.ts} +3 -3
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +88 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/stop.d.ts +8 -0
- package/dist/commands/stop.d.ts.map +1 -0
- package/dist/commands/stop.js +152 -0
- package/dist/commands/stop.js.map +1 -0
- package/dist/commands.d.ts +11 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +45 -0
- package/dist/commands.js.map +1 -0
- package/dist/connection/__tests__/cdp.contract.test.d.ts.map +1 -1
- package/dist/connection/__tests__/cdp.contract.test.js +1 -2
- package/dist/connection/__tests__/cdp.contract.test.js.map +1 -1
- package/dist/connection/__tests__/finder.contract.test.js +1 -1
- package/dist/connection/__tests__/finder.contract.test.js.map +1 -1
- package/dist/connection/cdp.d.ts +1 -1
- package/dist/connection/cdp.js.map +1 -1
- package/dist/connection/domOperations.d.ts +48 -0
- package/dist/connection/domOperations.d.ts.map +1 -0
- package/dist/connection/domOperations.js +104 -0
- package/dist/connection/domOperations.js.map +1 -0
- package/dist/connection/finder.js.map +1 -1
- package/dist/connection/launcher.d.ts +7 -3
- package/dist/connection/launcher.d.ts.map +1 -1
- package/dist/connection/launcher.js +82 -21
- package/dist/connection/launcher.js.map +1 -1
- package/dist/constants.d.ts +17 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +28 -0
- package/dist/constants.js.map +1 -1
- package/dist/daemon/__tests__/ipcServer.contract.test.js +25 -11
- package/dist/daemon/__tests__/ipcServer.contract.test.js.map +1 -1
- package/dist/daemon/ipcServer.d.ts.map +1 -1
- package/dist/daemon/ipcServer.js +86 -6
- package/dist/daemon/ipcServer.js.map +1 -1
- package/dist/daemon/launcher.d.ts.map +1 -1
- package/dist/daemon/launcher.js +8 -6
- package/dist/daemon/launcher.js.map +1 -1
- package/dist/daemon/startSession.d.ts +2 -2
- package/dist/daemon/startSession.d.ts.map +1 -1
- package/dist/daemon/startSession.js +14 -11
- package/dist/daemon/startSession.js.map +1 -1
- package/dist/daemon/worker.d.ts +1 -1
- package/dist/daemon/worker.js +179 -52
- package/dist/daemon/worker.js.map +1 -1
- package/dist/{cli/collectors/helpers/domCache.d.ts → dom/cache.d.ts} +1 -5
- package/dist/dom/cache.d.ts.map +1 -0
- package/dist/{cli/collectors/helpers/domCache.js → dom/cache.js} +5 -19
- package/dist/dom/cache.js.map +1 -0
- package/dist/dom/index.d.ts +9 -0
- package/dist/dom/index.d.ts.map +1 -0
- package/dist/dom/index.js +9 -0
- package/dist/dom/index.js.map +1 -0
- package/dist/{cli/collectors/helpers/domQuery.d.ts → dom/query.d.ts} +5 -2
- package/dist/dom/query.d.ts.map +1 -0
- package/dist/{cli/collectors/helpers/domQuery.js → dom/query.js} +11 -7
- package/dist/dom/query.js.map +1 -0
- package/dist/index.js +117 -35
- package/dist/index.js.map +1 -1
- package/dist/ipc/__tests__/client.contract.test.js +11 -1
- package/dist/ipc/__tests__/client.contract.test.js.map +1 -1
- package/dist/ipc/client.d.ts +17 -4
- package/dist/ipc/client.d.ts.map +1 -1
- package/dist/ipc/client.js +26 -6
- package/dist/ipc/client.js.map +1 -1
- package/dist/ipc/commands.d.ts +52 -1
- package/dist/ipc/commands.d.ts.map +1 -1
- package/dist/ipc/commands.js +8 -0
- package/dist/ipc/commands.js.map +1 -1
- package/dist/ipc/types.d.ts +34 -3
- package/dist/ipc/types.d.ts.map +1 -1
- package/dist/ipc/types.js.map +1 -1
- package/dist/session/metadata.d.ts +2 -2
- package/dist/session/metadata.d.ts.map +1 -1
- package/dist/session/output.d.ts +1 -1
- package/dist/session/process.d.ts.map +1 -1
- package/dist/session/process.js +4 -3
- package/dist/session/process.js.map +1 -1
- package/dist/session/queryCache.d.ts +36 -0
- package/dist/session/queryCache.d.ts.map +1 -0
- package/dist/session/queryCache.js +66 -0
- package/dist/session/queryCache.js.map +1 -0
- package/dist/telemetry/__tests__/network.contract.test.d.ts +28 -0
- package/dist/telemetry/__tests__/network.contract.test.d.ts.map +1 -0
- package/dist/telemetry/__tests__/network.contract.test.js +540 -0
- package/dist/telemetry/__tests__/network.contract.test.js.map +1 -0
- package/dist/telemetry/console.d.ts +19 -0
- package/dist/telemetry/console.d.ts.map +1 -0
- package/dist/telemetry/console.js +87 -0
- package/dist/telemetry/console.js.map +1 -0
- package/dist/telemetry/dom.d.ts +21 -0
- package/dist/telemetry/dom.d.ts.map +1 -0
- package/dist/telemetry/dom.js +99 -0
- package/dist/telemetry/dom.js.map +1 -0
- package/dist/telemetry/network.d.ts +33 -0
- package/dist/telemetry/network.d.ts.map +1 -0
- package/dist/telemetry/network.js +191 -0
- package/dist/telemetry/network.js.map +1 -0
- package/dist/types.d.ts +25 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/errors.d.ts +39 -0
- package/dist/ui/errors.d.ts.map +1 -0
- package/dist/ui/errors.js +48 -0
- package/dist/ui/errors.js.map +1 -0
- package/dist/ui/formatters/cookies.d.ts +32 -0
- package/dist/ui/formatters/cookies.d.ts.map +1 -0
- package/dist/ui/formatters/cookies.js +45 -0
- package/dist/ui/formatters/cookies.js.map +1 -0
- package/dist/ui/formatters/details.d.ts +10 -0
- package/dist/ui/formatters/details.d.ts.map +1 -0
- package/dist/ui/formatters/details.js +61 -0
- package/dist/ui/formatters/details.js.map +1 -0
- package/dist/ui/formatters/dom.d.ts +135 -0
- package/dist/ui/formatters/dom.d.ts.map +1 -0
- package/dist/ui/formatters/dom.js +193 -0
- package/dist/ui/formatters/dom.js.map +1 -0
- package/dist/ui/formatters/index.d.ts +11 -0
- package/dist/ui/formatters/index.d.ts.map +1 -0
- package/dist/ui/formatters/index.js +11 -0
- package/dist/ui/formatters/index.js.map +1 -0
- package/dist/ui/formatters/preview.d.ts +25 -0
- package/dist/ui/formatters/preview.d.ts.map +1 -0
- package/dist/ui/formatters/preview.js +182 -0
- package/dist/ui/formatters/preview.js.map +1 -0
- package/dist/ui/formatters/status.d.ts +39 -0
- package/dist/ui/formatters/status.d.ts.map +1 -0
- package/dist/ui/formatters/status.js +153 -0
- package/dist/ui/formatters/status.js.map +1 -0
- package/dist/ui/formatting.d.ts +300 -0
- package/dist/ui/formatting.d.ts.map +1 -0
- package/dist/ui/formatting.js +454 -0
- package/dist/ui/formatting.js.map +1 -0
- package/dist/ui/messages/chrome.d.ts +172 -0
- package/dist/ui/messages/chrome.d.ts.map +1 -0
- package/dist/ui/messages/chrome.js +253 -0
- package/dist/ui/messages/chrome.js.map +1 -0
- package/dist/ui/messages/commands.d.ts +88 -0
- package/dist/ui/messages/commands.d.ts.map +1 -0
- package/dist/ui/messages/commands.js +150 -0
- package/dist/ui/messages/commands.js.map +1 -0
- package/dist/ui/messages/consoleMessages.d.ts +39 -0
- package/dist/ui/messages/consoleMessages.d.ts.map +1 -0
- package/dist/ui/messages/consoleMessages.js +48 -0
- package/dist/ui/messages/consoleMessages.js.map +1 -0
- package/dist/ui/messages/debug.d.ts +182 -0
- package/dist/ui/messages/debug.d.ts.map +1 -0
- package/dist/ui/messages/debug.js +243 -0
- package/dist/ui/messages/debug.js.map +1 -0
- package/dist/ui/messages/errors.d.ts +91 -0
- package/dist/ui/messages/errors.d.ts.map +1 -0
- package/dist/ui/messages/errors.js +135 -0
- package/dist/ui/messages/errors.js.map +1 -0
- package/dist/ui/messages/index.d.ts +12 -0
- package/dist/ui/messages/index.d.ts.map +1 -0
- package/dist/ui/messages/index.js +12 -0
- package/dist/ui/messages/index.js.map +1 -0
- package/dist/ui/messages/internal.d.ts +30 -0
- package/dist/ui/messages/internal.d.ts.map +1 -0
- package/dist/ui/messages/internal.js +42 -0
- package/dist/ui/messages/internal.js.map +1 -0
- package/dist/ui/messages/preview.d.ts +51 -0
- package/dist/ui/messages/preview.d.ts.map +1 -0
- package/dist/ui/messages/preview.js +76 -0
- package/dist/ui/messages/preview.js.map +1 -0
- package/dist/ui/messages/session.d.ts +54 -0
- package/dist/ui/messages/session.d.ts.map +1 -0
- package/dist/ui/messages/session.js +77 -0
- package/dist/ui/messages/session.js.map +1 -0
- package/dist/ui/messages/validation.d.ts +34 -0
- package/dist/ui/messages/validation.d.ts.map +1 -0
- package/dist/ui/messages/validation.js +38 -0
- package/dist/ui/messages/validation.js.map +1 -0
- package/dist/utils/__tests__/filters.unit.test.js +1 -1
- package/dist/utils/cdpHandlers.d.ts +1 -1
- package/dist/utils/cdpHandlers.js +1 -1
- package/dist/utils/chromeDiagnostics.d.ts +0 -12
- package/dist/utils/chromeDiagnostics.d.ts.map +1 -1
- package/dist/utils/chromeDiagnostics.js +0 -51
- package/dist/utils/chromeDiagnostics.js.map +1 -1
- package/dist/utils/filters.js +1 -1
- package/dist/utils/filters.js.map +1 -1
- package/dist/utils/http.d.ts +1 -1
- package/dist/utils/http.js.map +1 -1
- package/dist/utils/logger.d.ts +68 -12
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +62 -12
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/pageReadiness.d.ts +46 -0
- package/dist/utils/pageReadiness.d.ts.map +1 -0
- package/dist/utils/pageReadiness.js +271 -0
- package/dist/utils/pageReadiness.js.map +1 -0
- package/dist/utils/ui.d.ts +36 -0
- package/dist/utils/ui.d.ts.map +1 -0
- package/dist/utils/ui.js +47 -0
- package/dist/utils/ui.js.map +1 -0
- package/dist/utils/url.d.ts +60 -26
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/url.js +130 -84
- package/dist/utils/url.js.map +1 -1
- package/package.json +2 -5
- package/dist/cli/collectors/dom.d.ts.map +0 -1
- package/dist/cli/collectors/dom.js +0 -361
- package/dist/cli/collectors/dom.js.map +0 -1
- package/dist/cli/collectors/helpers/domCache.d.ts.map +0 -1
- package/dist/cli/collectors/helpers/domCache.js.map +0 -1
- package/dist/cli/collectors/helpers/domQuery.d.ts.map +0 -1
- package/dist/cli/collectors/helpers/domQuery.js.map +0 -1
- package/dist/cli/collectors/helpers/selectorParser.d.ts.map +0 -1
- package/dist/cli/collectors/helpers/selectorParser.js.map +0 -1
- package/dist/cli/commands/__tests__/ipcTest.test.d.ts +0 -2
- package/dist/cli/commands/__tests__/ipcTest.test.d.ts.map +0 -1
- package/dist/cli/commands/__tests__/ipcTest.test.js +0 -37
- package/dist/cli/commands/__tests__/ipcTest.test.js.map +0 -1
- package/dist/cli/commands/ipcTest.d.ts +0 -23
- package/dist/cli/commands/ipcTest.d.ts.map +0 -1
- package/dist/cli/commands/ipcTest.js +0 -181
- package/dist/cli/commands/ipcTest.js.map +0 -1
- package/dist/cli/commands/query.d.ts.map +0 -1
- package/dist/cli/commands/query.js +0 -127
- package/dist/cli/commands/query.js.map +0 -1
- package/dist/cli/handlers/ChromeBootstrap.d.ts +0 -24
- package/dist/cli/handlers/ChromeBootstrap.d.ts.map +0 -1
- package/dist/cli/handlers/ChromeBootstrap.js +0 -50
- package/dist/cli/handlers/ChromeBootstrap.js.map +0 -1
- package/dist/cli/handlers/OutputWriter.d.ts +0 -15
- package/dist/cli/handlers/OutputWriter.d.ts.map +0 -1
- package/dist/cli/handlers/OutputWriter.js +0 -34
- package/dist/cli/handlers/OutputWriter.js.map +0 -1
- package/dist/cli/handlers/PreviewWriter.d.ts +0 -52
- package/dist/cli/handlers/PreviewWriter.d.ts.map +0 -1
- package/dist/cli/handlers/PreviewWriter.js +0 -119
- package/dist/cli/handlers/PreviewWriter.js.map +0 -1
- package/dist/cli/handlers/SessionLock.d.ts +0 -16
- package/dist/cli/handlers/SessionLock.d.ts.map +0 -1
- package/dist/cli/handlers/SessionLock.js +0 -38
- package/dist/cli/handlers/SessionLock.js.map +0 -1
- package/dist/cli/handlers/SessionLoop.d.ts +0 -19
- package/dist/cli/handlers/SessionLoop.d.ts.map +0 -1
- package/dist/cli/handlers/SessionLoop.js +0 -47
- package/dist/cli/handlers/SessionLoop.js.map +0 -1
- package/dist/cli/handlers/ShutdownController.d.ts +0 -38
- package/dist/cli/handlers/ShutdownController.d.ts.map +0 -1
- package/dist/cli/handlers/ShutdownController.js +0 -83
- package/dist/cli/handlers/ShutdownController.js.map +0 -1
- package/dist/cli/handlers/SignalHandler.d.ts +0 -35
- package/dist/cli/handlers/SignalHandler.d.ts.map +0 -1
- package/dist/cli/handlers/SignalHandler.js +0 -81
- package/dist/cli/handlers/SignalHandler.js.map +0 -1
- package/dist/cli/handlers/TargetSetup.d.ts +0 -42
- package/dist/cli/handlers/TargetSetup.d.ts.map +0 -1
- package/dist/cli/handlers/TargetSetup.js +0 -87
- package/dist/cli/handlers/TargetSetup.js.map +0 -1
- package/dist/connection/__tests__/tabs.contract.test.d.ts +0 -2
- package/dist/connection/__tests__/tabs.contract.test.d.ts.map +0 -1
- package/dist/connection/__tests__/tabs.contract.test.js +0 -137
- package/dist/connection/__tests__/tabs.contract.test.js.map +0 -1
- package/dist/connection/tabs.d.ts +0 -82
- package/dist/connection/tabs.d.ts.map +0 -1
- package/dist/connection/tabs.js +0 -577
- package/dist/connection/tabs.js.map +0 -1
- package/dist/session/BdgSession.d.ts +0 -129
- package/dist/session/BdgSession.d.ts.map +0 -1
- package/dist/session/BdgSession.js +0 -270
- package/dist/session/BdgSession.js.map +0 -1
- package/dist/session/index.d.ts +0 -15
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/index.js +0 -23
- package/dist/session/index.js.map +0 -1
- package/dist/utils/validation.d.ts +0 -12
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -20
- package/dist/utils/validation.js.map +0 -1
- /package/dist/cli/{collectors → commands}/dom.d.ts +0 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared formatting utilities for UI output.
|
|
3
|
+
*
|
|
4
|
+
* This module provides low-level formatting helpers used across all UI components.
|
|
5
|
+
* Includes: separators, sections, lists, key-value pairs, text utilities, time formatting,
|
|
6
|
+
* and the OutputFormatter class for building complex formatted output.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Fluent builder for constructing formatted console output.
|
|
10
|
+
*
|
|
11
|
+
* Provides a chainable API for building complex multi-line output with consistent
|
|
12
|
+
* spacing, indentation, and structure. All methods return `this` for chaining.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const output = new OutputFormatter()
|
|
17
|
+
* .text('Found 3 elements:')
|
|
18
|
+
* .list(['<div>', '<span>', '<p>'])
|
|
19
|
+
* .blank()
|
|
20
|
+
* .section('Next steps:', [
|
|
21
|
+
* 'Highlight: bdg dom highlight 0',
|
|
22
|
+
* 'Get HTML: bdg dom get 0'
|
|
23
|
+
* ])
|
|
24
|
+
* .build();
|
|
25
|
+
*
|
|
26
|
+
* console.log(output);
|
|
27
|
+
* // Output:
|
|
28
|
+
* // Found 3 elements:
|
|
29
|
+
* // <div>
|
|
30
|
+
* // <span>
|
|
31
|
+
* // <p>
|
|
32
|
+
* //
|
|
33
|
+
* // Next steps:
|
|
34
|
+
* // Highlight: bdg dom highlight 0
|
|
35
|
+
* // Get HTML: bdg dom get 0
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare class OutputFormatter {
|
|
39
|
+
private lines;
|
|
40
|
+
/**
|
|
41
|
+
* Add a text line to the output.
|
|
42
|
+
*
|
|
43
|
+
* @param content - Text content to add
|
|
44
|
+
* @returns This formatter for chaining
|
|
45
|
+
*/
|
|
46
|
+
text(content: string): this;
|
|
47
|
+
/**
|
|
48
|
+
* Add a blank line to the output.
|
|
49
|
+
*
|
|
50
|
+
* @returns This formatter for chaining
|
|
51
|
+
*/
|
|
52
|
+
blank(): this;
|
|
53
|
+
/**
|
|
54
|
+
* Add an indented list of items.
|
|
55
|
+
*
|
|
56
|
+
* @param items - Array of items to list
|
|
57
|
+
* @param indent - Indentation spaces (default: 2)
|
|
58
|
+
* @returns This formatter for chaining
|
|
59
|
+
*/
|
|
60
|
+
list(items: string[], indent?: number): this;
|
|
61
|
+
/**
|
|
62
|
+
* Add a section with title and indented items.
|
|
63
|
+
*
|
|
64
|
+
* @param title - Section title
|
|
65
|
+
* @param items - Array of items (will be indented)
|
|
66
|
+
* @param indent - Indentation spaces (default: 2)
|
|
67
|
+
* @returns This formatter for chaining
|
|
68
|
+
*/
|
|
69
|
+
section(title: string, items: string[], indent?: number): this;
|
|
70
|
+
/**
|
|
71
|
+
* Add a horizontal separator line.
|
|
72
|
+
*
|
|
73
|
+
* @param char - Character to repeat (default: '━')
|
|
74
|
+
* @param width - Width in characters (default: 50)
|
|
75
|
+
* @returns This formatter for chaining
|
|
76
|
+
*/
|
|
77
|
+
separator(char?: string, width?: number): this;
|
|
78
|
+
/**
|
|
79
|
+
* Add a key-value pair with alignment.
|
|
80
|
+
*
|
|
81
|
+
* @param key - Key string
|
|
82
|
+
* @param value - Value string
|
|
83
|
+
* @param keyWidth - Width to pad key to (default: no padding)
|
|
84
|
+
* @returns This formatter for chaining
|
|
85
|
+
*/
|
|
86
|
+
keyValue(key: string, value: string, keyWidth?: number): this;
|
|
87
|
+
/**
|
|
88
|
+
* Add multiple key-value pairs with aligned keys.
|
|
89
|
+
*
|
|
90
|
+
* @param pairs - Array of [key, value] tuples
|
|
91
|
+
* @param keyWidth - Width to pad keys to (auto-calculated if not provided)
|
|
92
|
+
* @returns This formatter for chaining
|
|
93
|
+
*/
|
|
94
|
+
keyValueList(pairs: Array<[string, string]>, keyWidth?: number): this;
|
|
95
|
+
/**
|
|
96
|
+
* Add indented content.
|
|
97
|
+
*
|
|
98
|
+
* @param content - Content to indent (can be multiline)
|
|
99
|
+
* @param spaces - Number of spaces to indent (default: 2)
|
|
100
|
+
* @returns This formatter for chaining
|
|
101
|
+
*/
|
|
102
|
+
indent(content: string, spaces?: number): this;
|
|
103
|
+
/**
|
|
104
|
+
* Build the final output string.
|
|
105
|
+
*
|
|
106
|
+
* @returns Formatted output with lines joined by newlines
|
|
107
|
+
*/
|
|
108
|
+
build(): string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Create a horizontal separator line.
|
|
112
|
+
*
|
|
113
|
+
* @param char - Character to use for separator (default: '━')
|
|
114
|
+
* @param width - Width of separator in characters (default: 50)
|
|
115
|
+
* @returns Separator string
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* separator() // → '━━━━━━...' (50 chars)
|
|
120
|
+
* separator('-', 20) // → '--------------------'
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
export declare function separator(char?: string, width?: number): string;
|
|
124
|
+
/**
|
|
125
|
+
* Create a titled section with content lines.
|
|
126
|
+
*
|
|
127
|
+
* @param title - Section title
|
|
128
|
+
* @param content - Array of content lines (will be indented)
|
|
129
|
+
* @param indent - Number of spaces to indent content (default: 2)
|
|
130
|
+
* @returns Formatted section string
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* section('Process Info:', [
|
|
135
|
+
* 'Daemon PID: 12345',
|
|
136
|
+
* 'Chrome PID: 67890'
|
|
137
|
+
* ])
|
|
138
|
+
* // →
|
|
139
|
+
* // Process Info:
|
|
140
|
+
* // Daemon PID: 12345
|
|
141
|
+
* // Chrome PID: 67890
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
export declare function section(title: string, content: string[], indent?: number): string;
|
|
145
|
+
/**
|
|
146
|
+
* Create a bullet list with optional indentation.
|
|
147
|
+
*
|
|
148
|
+
* @param items - Array of list items
|
|
149
|
+
* @param indent - Number of spaces to indent (default: 2)
|
|
150
|
+
* @param bullet - Bullet character (default: '-')
|
|
151
|
+
* @returns Formatted bullet list
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```typescript
|
|
155
|
+
* bulletList(['Item 1', 'Item 2'], 2, '•')
|
|
156
|
+
* // →
|
|
157
|
+
* // • Item 1
|
|
158
|
+
* // • Item 2
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
export declare function bulletList(items: string[], indent?: number, bullet?: string): string;
|
|
162
|
+
/**
|
|
163
|
+
* Create a key-value pair with alignment.
|
|
164
|
+
*
|
|
165
|
+
* @param key - Key string
|
|
166
|
+
* @param value - Value string
|
|
167
|
+
* @param keyWidth - Width to pad key to (default: auto)
|
|
168
|
+
* @returns Formatted key-value pair
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* keyValue('Status', 'Active', 15)
|
|
173
|
+
* // → 'Status: Active'
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
export declare function keyValue(key: string, value: string, keyWidth?: number): string;
|
|
177
|
+
/**
|
|
178
|
+
* Indent text by a number of spaces.
|
|
179
|
+
*
|
|
180
|
+
* @param text - Text to indent (can be multiline)
|
|
181
|
+
* @param spaces - Number of spaces to indent
|
|
182
|
+
* @returns Indented text
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* indent('Line 1\nLine 2', 4)
|
|
187
|
+
* // →
|
|
188
|
+
* // Line 1
|
|
189
|
+
* // Line 2
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
export declare function indent(text: string, spaces: number): string;
|
|
193
|
+
/**
|
|
194
|
+
* Truncate text to maximum length with ellipsis.
|
|
195
|
+
*
|
|
196
|
+
* @param text - Text to truncate
|
|
197
|
+
* @param maxLength - Maximum length
|
|
198
|
+
* @returns Truncated text
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```typescript
|
|
202
|
+
* truncate('Very long text here', 10)
|
|
203
|
+
* // → 'Very lo...'
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
export declare function truncate(text: string, maxLength: number): string;
|
|
207
|
+
/**
|
|
208
|
+
* Truncate console message text (especially stack traces).
|
|
209
|
+
*
|
|
210
|
+
* @param text - The console message text
|
|
211
|
+
* @param maxLines - Maximum number of lines to show (default: 3)
|
|
212
|
+
* @returns Truncated text with line count
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* truncateText('Line 1\nLine 2\nLine 3\nLine 4\nLine 5', 3)
|
|
217
|
+
* // →
|
|
218
|
+
* // Line 1
|
|
219
|
+
* // Line 2
|
|
220
|
+
* // Line 3
|
|
221
|
+
* // ... (2 more lines)
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
export declare function truncateText(text: string, maxLines?: number): string;
|
|
225
|
+
/**
|
|
226
|
+
* Truncate a URL for compact display.
|
|
227
|
+
*
|
|
228
|
+
* Removes www. prefix, shortens long paths with ellipsis, and truncates to maxLength.
|
|
229
|
+
*
|
|
230
|
+
* @param url - URL string to truncate
|
|
231
|
+
* @param maxLength - Maximum length of output (default: 60)
|
|
232
|
+
* @returns Truncated URL for display
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* ```typescript
|
|
236
|
+
* truncateUrl('https://i.clarity.ms/collect')
|
|
237
|
+
* // → 'clarity.ms/collect'
|
|
238
|
+
* truncateUrl('https://aswpapius.com/api/web-channels/47d7def8-d602-49ec-bfdb-c959b1346774')
|
|
239
|
+
* // → 'aswpapius.com/.../47d7def8'
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
export declare function truncateUrl(url: string, maxLength?: number): string;
|
|
243
|
+
/**
|
|
244
|
+
* Pluralize a word based on count.
|
|
245
|
+
*
|
|
246
|
+
* @param count - Number of items
|
|
247
|
+
* @param singular - Singular form of word
|
|
248
|
+
* @param plural - Plural form of word (optional, defaults to singular + 's')
|
|
249
|
+
* @returns Formatted count with correct word form
|
|
250
|
+
*
|
|
251
|
+
* @example
|
|
252
|
+
* ```typescript
|
|
253
|
+
* pluralize(1, 'request') // → '1 request'
|
|
254
|
+
* pluralize(5, 'request') // → '5 requests'
|
|
255
|
+
* pluralize(0, 'entry', 'entries') // → '0 entries'
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
export declare function pluralize(count: number, singular: string, plural?: string): string;
|
|
259
|
+
/**
|
|
260
|
+
* Format duration in milliseconds to human-readable string.
|
|
261
|
+
*
|
|
262
|
+
* @param ms - Duration in milliseconds
|
|
263
|
+
* @returns Formatted duration string
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```typescript
|
|
267
|
+
* formatDuration(1500) // → '1.5s'
|
|
268
|
+
* formatDuration(65000) // → '1m 5s'
|
|
269
|
+
* formatDuration(3661000) // → '1h 1m'
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
export declare function formatDuration(ms: number): string;
|
|
273
|
+
/**
|
|
274
|
+
* Format timestamp to ISO string.
|
|
275
|
+
*
|
|
276
|
+
* @param date - Date object or timestamp
|
|
277
|
+
* @returns ISO 8601 formatted string
|
|
278
|
+
*
|
|
279
|
+
* @example
|
|
280
|
+
* ```typescript
|
|
281
|
+
* formatTimestamp(new Date())
|
|
282
|
+
* // → '2025-11-05T12:34:56.789Z'
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
export declare function formatTimestamp(date: Date | number): string;
|
|
286
|
+
/**
|
|
287
|
+
* Format relative time ("time ago").
|
|
288
|
+
*
|
|
289
|
+
* @param date - Date object or timestamp
|
|
290
|
+
* @returns Human-readable relative time
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* ```typescript
|
|
294
|
+
* formatTimeAgo(Date.now() - 5000) // → '5 seconds ago'
|
|
295
|
+
* formatTimeAgo(Date.now() - 65000) // → '1 minute ago'
|
|
296
|
+
* formatTimeAgo(Date.now() - 3661000) // → '1 hour ago'
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
export declare function formatTimeAgo(date: Date | number): string;
|
|
300
|
+
//# sourceMappingURL=formatting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/ui/formatting.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,KAAK,CAAgB;IAE7B;;;;;OAKG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK3B;;;;OAIG;IACH,KAAK,IAAI,IAAI;IAKb;;;;;;OAMG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,GAAE,MAAU,GAAG,IAAI;IAM/C;;;;;;;OAOG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,GAAE,MAAU,GAAG,IAAI;IAKjE;;;;;;OAMG;IACH,SAAS,CAAC,IAAI,GAAE,MAAY,EAAE,KAAK,GAAE,MAAW,GAAG,IAAI;IAKvD;;;;;;;OAOG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IAM7D;;;;;;OAMG;IACH,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IAMrE;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,MAAU,GAAG,IAAI;IAMjD;;;;OAIG;IACH,KAAK,IAAI,MAAM;CAGhB;AAMD;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,IAAI,GAAE,MAAY,EAAE,KAAK,GAAE,MAAW,GAAG,MAAM,CAExE;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,GAAE,MAAU,GAAG,MAAM,CAGpF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,GAAE,MAAU,EAAE,MAAM,GAAE,MAAY,GAAG,MAAM,CAG5F;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAK9E;AAMD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAM3D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAKhE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,GAAG,MAAM,CAWvE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,GAAE,MAAW,GAAG,MAAM,CAuCvE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAGlF;AAMD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAwBjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAG3D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAoBzD"}
|