chrome-devtools-mcp 1.11.0 → 1.13.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 +73 -21
- package/{build → out/Default/gen}/src/BrowserManager.js +49 -18
- package/out/Default/gen/src/LogpointManager.js +307 -0
- package/{build → out/Default/gen}/src/McpContext.js +439 -133
- package/{build → out/Default/gen}/src/McpPage.js +368 -59
- package/{build → out/Default/gen}/src/McpResponse.js +90 -47
- package/out/Default/gen/src/NetworkOverrideManager.js +419 -0
- package/{build → out/Default/gen}/src/TextSnapshot.js +37 -18
- package/out/Default/gen/src/ToolHandler.js +512 -0
- package/{build → out/Default/gen}/src/bin/chrome-devtools-mcp-main.js +6 -4
- package/{build → out/Default/gen}/src/bin/chrome-devtools.js +4 -4
- package/{build → out/Default/gen}/src/collectors/PageCollector.js +28 -12
- package/{build → out/Default/gen}/src/collectors/ServiceWorkerCollector.js +2 -2
- package/out/Default/gen/src/collectors/constants.js +7 -0
- package/out/Default/gen/src/config/ConfigParser.js +162 -0
- package/{build → out/Default/gen}/src/config/ConfigWatcher.js +3 -2
- package/out/Default/gen/src/config/ServerConfig.js +251 -0
- package/{build → out/Default/gen}/src/config/browser-options.js +13 -4
- package/{build → out/Default/gen}/src/config/category-options.js +10 -0
- package/{build → out/Default/gen}/src/config/cli-options.js +223 -22
- package/{build → out/Default/gen}/src/config/mcp-options.js +62 -36
- package/{build → out/Default/gen}/src/config/puppeteer-options.js +4 -2
- package/{build → out/Default/gen}/src/daemon/client.js +3 -3
- package/{build → out/Default/gen}/src/daemon/daemon.js +7 -3
- package/{build → out/Default/gen}/src/daemon/utils.js +2 -1
- package/{build → out/Default/gen}/src/devtools/DevToolsCommentBridge.js +28 -5
- package/{build → out/Default/gen}/src/devtools/DevtoolsUtils.js +94 -20
- package/{build → out/Default/gen}/src/formatters/ConsoleFormatter.js +28 -1
- package/{build → out/Default/gen}/src/formatters/HeapSnapshotFormatter.js +14 -18
- package/out/Default/gen/src/formatters/LogpointFormatter.js +62 -0
- package/{build → out/Default/gen}/src/formatters/NetworkFormatter.js +70 -17
- package/out/Default/gen/src/formatters/NetworkOverridesFormatter.js +49 -0
- package/out/Default/gen/src/formatters/RemoteObjectFormatter.js +231 -0
- package/{build → out/Default/gen}/src/formatters/SnapshotFormatter.js +13 -3
- package/out/Default/gen/src/formatters/WebAuthnFormatter.js +56 -0
- package/out/Default/gen/src/index.js +435 -0
- package/out/Default/gen/src/processors/HeapSnapshotManager.js +569 -0
- package/{build → out/Default/gen}/src/telemetry/transformation.js +1 -1
- package/{build → out/Default/gen}/src/third_party/THIRD_PARTY_NOTICES +796 -712
- package/out/Default/gen/src/third_party/bundled-packages.json +11 -0
- package/out/Default/gen/src/third_party/cli.js +9023 -0
- package/out/Default/gen/src/third_party/devtools-formatter-worker.js +31904 -0
- package/out/Default/gen/src/third_party/devtools-heap-snapshot-worker.js +26467 -0
- package/out/Default/gen/src/third_party/index.js +201574 -0
- package/out/Default/gen/src/third_party/lighthouse-devtools-mcp-bundle.js +60395 -0
- package/out/Default/gen/src/tools/ToolDefinition.js +180 -0
- package/{build → out/Default/gen}/src/tools/categories.js +4 -0
- package/{build → out/Default/gen}/src/tools/comments.js +46 -4
- package/{build → out/Default/gen}/src/tools/console.js +8 -6
- package/{build → out/Default/gen}/src/tools/css.js +1 -0
- package/{build → out/Default/gen}/src/tools/emulation.js +5 -4
- package/{build → out/Default/gen}/src/tools/extensions.js +6 -1
- package/{build → out/Default/gen}/src/tools/input.js +23 -28
- package/{build → out/Default/gen}/src/tools/lighthouse.js +30 -8
- package/out/Default/gen/src/tools/logpoints.js +51 -0
- package/{build → out/Default/gen}/src/tools/memory.js +59 -53
- package/out/Default/gen/src/tools/network.js +260 -0
- package/{build → out/Default/gen}/src/tools/pages.js +48 -6
- package/{build → out/Default/gen}/src/tools/performance.js +33 -7
- package/{build → out/Default/gen}/src/tools/pwa.js +7 -0
- package/{build → out/Default/gen}/src/tools/screencast.js +3 -1
- package/{build → out/Default/gen}/src/tools/screenshot.js +23 -7
- package/{build → out/Default/gen}/src/tools/script.js +38 -6
- package/{build → out/Default/gen}/src/tools/slim/tools.js +21 -5
- package/{build → out/Default/gen}/src/tools/snapshot.js +29 -5
- package/{build → out/Default/gen}/src/tools/thirdPartyDeveloper.js +6 -20
- package/out/Default/gen/src/tools/toolNames.js +10 -0
- package/{build → out/Default/gen}/src/tools/tools.js +4 -0
- package/out/Default/gen/src/tools/webauthn.js +51 -0
- package/{build → out/Default/gen}/src/tools/webmcp.js +5 -19
- package/out/Default/gen/src/utils/TaskRunner.js +151 -0
- package/{build → out/Default/gen}/src/utils/WaitForHelper.js +16 -2
- package/{build → out/Default/gen}/src/utils/bytes.js +2 -12
- package/{build → out/Default/gen}/src/utils/check-for-updates.js +8 -2
- package/out/Default/gen/src/utils/disclaimers.js +27 -0
- package/{build → out/Default/gen}/src/utils/errorHandling.js +3 -0
- package/{build → out/Default/gen}/src/utils/keyboard.js +15 -5
- package/out/Default/gen/src/utils/logger.js +131 -0
- package/out/Default/gen/src/utils/network.js +81 -0
- package/out/Default/gen/src/utils/raceWithSignal.js +26 -0
- package/out/Default/gen/src/utils/resourceType.js +27 -0
- package/out/Default/gen/src/utils/text.js +44 -0
- package/out/Default/gen/src/utils/timeout.js +14 -0
- package/{build → out/Default/gen}/src/utils/url.js +73 -17
- package/{build → out/Default/gen}/src/version.js +1 -1
- package/package.json +26 -32
- package/skills/a11y-debugging/SKILL.md +3 -8
- package/skills/chrome-devtools/SKILL.md +2 -0
- package/skills/chrome-devtools-cli/SKILL.md +12 -1
- package/build/src/ToolHandler.js +0 -360
- package/build/src/config/ConfigParser.js +0 -264
- package/build/src/index.js +0 -282
- package/build/src/processors/HeapSnapshotManager.js +0 -307
- package/build/src/third_party/bundled-packages.json +0 -11
- package/build/src/third_party/devtools-formatter-worker.js +0 -16625
- package/build/src/third_party/devtools-heap-snapshot-worker.js +0 -12084
- package/build/src/third_party/index.js +0 -189603
- package/build/src/third_party/lighthouse-devtools-mcp-bundle.js +0 -58435
- package/build/src/tools/ToolDefinition.js +0 -92
- package/build/src/tools/network.js +0 -128
- package/build/src/utils/logger.js +0 -62
- package/build/src/utils/text.js +0 -15
- /package/{build → out/Default/gen}/src/McpWorker.js +0 -0
- /package/{build → out/Default/gen}/src/SlimMcpResponse.js +0 -0
- /package/{build → out/Default/gen}/src/bin/check-latest-version.js +0 -0
- /package/{build → out/Default/gen}/src/bin/chrome-devtools-mcp.js +0 -0
- /package/{build → out/Default/gen}/src/config/ConfigLocator.js +0 -0
- /package/{build → out/Default/gen}/src/config/cli-commands.js +0 -0
- /package/{build → out/Default/gen}/src/config/tool-options.js +0 -0
- /package/{build → out/Default/gen}/src/daemon/types.js +0 -0
- /package/{build → out/Default/gen}/src/devtools/McpHostBindingAdapter.js +0 -0
- /package/{build → out/Default/gen}/src/devtools/issueDescriptions.js +0 -0
- /package/{build → out/Default/gen}/src/formatters/CommentFormatter.js +0 -0
- /package/{build → out/Default/gen}/src/formatters/CssFormatter.js +0 -0
- /package/{build → out/Default/gen}/src/formatters/IssueFormatter.js +0 -0
- /package/{build → out/Default/gen}/src/processors/ChunkedTraceParser.js +0 -0
- /package/{build → out/Default/gen}/src/processors/PerformanceTrace.js +0 -0
- /package/{build → out/Default/gen}/src/telemetry/ClearcutLogger.js +0 -0
- /package/{build → out/Default/gen}/src/telemetry/WatchdogClient.js +0 -0
- /package/{build → out/Default/gen}/src/telemetry/errors.js +0 -0
- /package/{build → out/Default/gen}/src/telemetry/flagUtils.js +0 -0
- /package/{build → out/Default/gen}/src/telemetry/metricsRegistry.js +0 -0
- /package/{build → out/Default/gen}/src/telemetry/persistence.js +0 -0
- /package/{build → out/Default/gen}/src/telemetry/types.js +0 -0
- /package/{build → out/Default/gen}/src/telemetry/watchdog/ClearcutSender.js +0 -0
- /package/{build → out/Default/gen}/src/telemetry/watchdog/main.js +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CoepCorpNotSameSite.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CompatibilityModeQuirks.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/LowTextContrast.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/bounceTrackingMitigations.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/clientHintMetaTagAllowListInvalidOrigin.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/clientHintMetaTagModifiedHTML.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowlistItemType.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistInvalidHeader.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistInvalidUrlPattern.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistItemNotInnerList.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistMoreThanOneList.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistReportingEndpointNotToken.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnMetadataGrantReadOptOut.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnMetadataGrantSetOptOut.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsDisabledScheme.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsDisallowedByMode.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsOriginMismatch.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cspEvalViolation.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cspInlineViolation.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cspURLViolation.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/deprecation.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestAccountsEmptyList.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestAccountsHttpNotFound.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidContentType.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestAccountsNoResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestDnsFetchFailed.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestDnsInvalidRecord.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownHttpNotFound.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidContentType.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownNoResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestInvalidEmail.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestJwksHttpNotFound.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestJwksInvalidResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestKeyBindingSigningFailed.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestRpOriginIsOpaque.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenHttpNotFound.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidContentType.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidSdJwt.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenMalformedSdJwt.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenNoResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidAudience.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidIssuedAt.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidNonce.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidSdHash.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidTyp.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingAud.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingCnf.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingIat.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingNonce.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingSdHash.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbSignatureFailed.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmail.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmailVerified.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidHolderKey.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuedAt.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuer.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtJwksMissingKeys.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingCnf.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingEmail.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIat.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIss.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtSignatureFailed.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtUnsupportedHeaderAlg.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestUserLoggedOut.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownHttpNotFound.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidContentType.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownListEmpty.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownNoResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestAccountsBlockedByConnectionAllowlist.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestConfigBlockedByConnectionAllowlist.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestIdTokenBlockedByConnectionAllowlist.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestWellKnownBlockedByConnectionAllowlist.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericBackUINavigationWouldSkipAd.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormLabelForNameError.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormModelContextMissingToolDescription.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormModelContextMissingToolName.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormModelContextParameterMissingName.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormModelContextParameterMissingTitleAndDescription.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormModelContextRequiredParameterMissingName.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericGeolocationPromptWithoutUserGesture.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/heavyAd.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/lazyLoadImageZeroSize.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/mixedContent.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementInvalidType.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementLowContrast.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/propertyRuleIssue.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectivePermissionsIntervention.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedArrayBuffer.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/stylesheetLateImport.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/stylesheetRequestFailed.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/webInstallManifestMissingId.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/webInstallManifestMissingNameOrShortName.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/webInstallManifestParsingOrNetworkError.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/webInstallNoManifest.md +0 -0
- /package/{build → out/Default/gen}/src/third_party/issue-descriptions/webInstallStartUrlInvalid.md +0 -0
- /package/{build → out/Default/gen}/src/types.js +0 -0
- /package/{build → out/Default/gen}/src/utils/files.js +0 -0
- /package/{build → out/Default/gen}/src/utils/id.js +0 -0
- /package/{build → out/Default/gen}/src/utils/pagination.js +0 -0
- /package/{build → out/Default/gen}/src/utils/polyfill.js +0 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Plain-text port of devtools-frontend's RemoteObjectPreviewFormatter
|
|
8
|
+
* (front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts)
|
|
9
|
+
* at revision f7e7785de52d6f5955d6a9c5956c2fe2d520d091, the
|
|
10
|
+
* third_party/devtools-frontend revision this port was written against. Compare
|
|
11
|
+
* with that file when syncing. It formats the preview that CDP already attaches
|
|
12
|
+
* to console arguments, so nothing is evaluated in the page.
|
|
13
|
+
*
|
|
14
|
+
* Intentional differences from upstream:
|
|
15
|
+
* - Returns plain text instead of Lit templates, so there are no CSS classes,
|
|
16
|
+
* tooltips or localized strings ('empty' and 'empty × N' are English).
|
|
17
|
+
* - No nodeDescription markup: DOM nodes print their description as is instead
|
|
18
|
+
* of splitting it into tag, id and class spans (renderNodeTitle), and trusted
|
|
19
|
+
* types print their description instead of `ClassName "value"`.
|
|
20
|
+
* - 'date' and 'node' are added to the subtypes that print their description
|
|
21
|
+
* instead of a property preview.
|
|
22
|
+
* - The `includeNullOrUndefined` option is dropped; null and undefined
|
|
23
|
+
* properties are always listed.
|
|
24
|
+
* - Top-level strings print as their raw value (as the console does for string
|
|
25
|
+
* arguments), and unserializable primitives (NaN, -0, 1n) print from
|
|
26
|
+
* `unserializableValue`.
|
|
27
|
+
* - The 400-character description limit that upstream passes to
|
|
28
|
+
* trimEndWithMaxLength() inline is named MAX_DESCRIPTION_LENGTH.
|
|
29
|
+
*/
|
|
30
|
+
import { DevTools } from '../third_party/index.js';
|
|
31
|
+
const { StringUtilities } = DevTools.Platform;
|
|
32
|
+
const MAX_DESCRIPTION_LENGTH = 400;
|
|
33
|
+
const PROMISE_STATE = '[[PromiseState]]';
|
|
34
|
+
const PROMISE_RESULT = '[[PromiseResult]]';
|
|
35
|
+
const GENERATOR_STATE = '[[GeneratorState]]';
|
|
36
|
+
const PRIMITIVE_VALUE = '[[PrimitiveValue]]';
|
|
37
|
+
const WEAK_REF_TARGET = '[[WeakRefTarget]]';
|
|
38
|
+
// Subtypes whose description is shown instead of a property preview.
|
|
39
|
+
const SUBTYPES_WITHOUT_VALUE_PREVIEW = new Set([
|
|
40
|
+
'arraybuffer',
|
|
41
|
+
'dataview',
|
|
42
|
+
'date',
|
|
43
|
+
'error',
|
|
44
|
+
'internal#entry',
|
|
45
|
+
'null',
|
|
46
|
+
'node',
|
|
47
|
+
'regexp',
|
|
48
|
+
'trustedtype',
|
|
49
|
+
'webassemblymemory',
|
|
50
|
+
]);
|
|
51
|
+
function sortValue(property) {
|
|
52
|
+
switch (property.name) {
|
|
53
|
+
case PROMISE_STATE:
|
|
54
|
+
return 1;
|
|
55
|
+
case PROMISE_RESULT:
|
|
56
|
+
return 2;
|
|
57
|
+
case GENERATOR_STATE:
|
|
58
|
+
case PRIMITIVE_VALUE:
|
|
59
|
+
case WEAK_REF_TARGET:
|
|
60
|
+
return 3;
|
|
61
|
+
}
|
|
62
|
+
if (property.type !== 'function' && !property.name.startsWith('#')) {
|
|
63
|
+
return 4;
|
|
64
|
+
}
|
|
65
|
+
return 5;
|
|
66
|
+
}
|
|
67
|
+
function formatName(name) {
|
|
68
|
+
return /^\s|\s$|^$|\n/.test(name) ? `"${name.replace(/\n/g, '↵')}"` : name;
|
|
69
|
+
}
|
|
70
|
+
function abbreviateClassName(description) {
|
|
71
|
+
const parts = description.split('.');
|
|
72
|
+
if (parts.length === 1 && parts[0] === 'Object') {
|
|
73
|
+
return '{…}';
|
|
74
|
+
}
|
|
75
|
+
return parts
|
|
76
|
+
.map((part, i) => i < parts.length - 1 ? StringUtilities.trimMiddle(part, 3) : part)
|
|
77
|
+
.join('.');
|
|
78
|
+
}
|
|
79
|
+
function formatPropertyValue(type, subtype, description = '') {
|
|
80
|
+
switch (type) {
|
|
81
|
+
case 'accessor':
|
|
82
|
+
return '(...)';
|
|
83
|
+
case 'function':
|
|
84
|
+
return 'ƒ';
|
|
85
|
+
case 'string':
|
|
86
|
+
return StringUtilities.formatAsJSLiteral(description);
|
|
87
|
+
case 'object':
|
|
88
|
+
return subtype ? description : abbreviateClassName(description);
|
|
89
|
+
default:
|
|
90
|
+
return description;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function arrayLength(preview) {
|
|
94
|
+
const match = preview.description?.match(/[[(](\d+)[\])]$/);
|
|
95
|
+
return match ? Number(match[1]) : 0;
|
|
96
|
+
}
|
|
97
|
+
function formatArrayItems(preview) {
|
|
98
|
+
const length = arrayLength(preview);
|
|
99
|
+
const toIndex = (name) => {
|
|
100
|
+
const index = Number(name) >>> 0;
|
|
101
|
+
return String(index) === name && index < length ? index : -1;
|
|
102
|
+
};
|
|
103
|
+
const indexed = preview.properties
|
|
104
|
+
.filter(p => toIndex(p.name) !== -1)
|
|
105
|
+
.sort((a, b) => toIndex(a.name) - toIndex(b.name));
|
|
106
|
+
const others = preview.properties
|
|
107
|
+
.filter(p => toIndex(p.name) === -1)
|
|
108
|
+
.sort((a, b) => sortValue(a) - sortValue(b));
|
|
109
|
+
// Gaps can be shown when all properties are guaranteed to be in the preview.
|
|
110
|
+
const canShowGaps = !preview.overflow;
|
|
111
|
+
const gap = (count) => count === 1 ? 'empty' : `empty × ${count}`;
|
|
112
|
+
const items = [];
|
|
113
|
+
let previous = -1;
|
|
114
|
+
for (const property of indexed) {
|
|
115
|
+
const index = toIndex(property.name);
|
|
116
|
+
const value = formatPropertyValue(property.type, property.subtype, property.value);
|
|
117
|
+
if (canShowGaps) {
|
|
118
|
+
if (index - previous > 1) {
|
|
119
|
+
items.push(gap(index - previous - 1));
|
|
120
|
+
}
|
|
121
|
+
items.push(value);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
items.push(index === items.length ? value : `${property.name}: ${value}`);
|
|
125
|
+
}
|
|
126
|
+
previous = index;
|
|
127
|
+
}
|
|
128
|
+
if (canShowGaps && length - previous > 1) {
|
|
129
|
+
items.push(gap(length - previous - 1));
|
|
130
|
+
}
|
|
131
|
+
for (const property of others) {
|
|
132
|
+
items.push(`${formatName(property.name)}: ${formatPropertyValue(property.type, property.subtype, property.value)}`);
|
|
133
|
+
}
|
|
134
|
+
return items;
|
|
135
|
+
}
|
|
136
|
+
function formatObjectItems(preview) {
|
|
137
|
+
const properties = preview.properties
|
|
138
|
+
.filter(p => p.type !== 'accessor')
|
|
139
|
+
.sort((a, b) => sortValue(a) - sortValue(b));
|
|
140
|
+
const items = [];
|
|
141
|
+
for (let i = 0; i < properties.length; i++) {
|
|
142
|
+
const property = properties[i];
|
|
143
|
+
const value = formatPropertyValue(property.type, property.subtype, property.value);
|
|
144
|
+
if (preview.subtype === 'promise' && property.name === PROMISE_STATE) {
|
|
145
|
+
const result = properties.at(i + 1);
|
|
146
|
+
if (result?.name === PROMISE_RESULT) {
|
|
147
|
+
i++;
|
|
148
|
+
}
|
|
149
|
+
items.push(property.value !== 'pending' && result?.name === PROMISE_RESULT
|
|
150
|
+
? `<${property.value}>: ${formatPropertyValue(result.type, result.subtype, result.value)}`
|
|
151
|
+
: `<${property.value}>`);
|
|
152
|
+
}
|
|
153
|
+
else if (preview.subtype === 'generator' &&
|
|
154
|
+
property.name === GENERATOR_STATE) {
|
|
155
|
+
items.push(`<${property.value}>`);
|
|
156
|
+
}
|
|
157
|
+
else if (property.name === PRIMITIVE_VALUE) {
|
|
158
|
+
items.push(value);
|
|
159
|
+
}
|
|
160
|
+
else if (property.name === WEAK_REF_TARGET) {
|
|
161
|
+
items.push(property.type === 'undefined' ? '<cleared>' : value);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
items.push(`${formatName(property.name)}: ${value}`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return items;
|
|
168
|
+
}
|
|
169
|
+
function formatEntryItems(preview) {
|
|
170
|
+
return (preview.entries ?? []).map(({ key, value }) => {
|
|
171
|
+
const formattedValue = formatPropertyValue(value.type, value.subtype, value.description);
|
|
172
|
+
return key
|
|
173
|
+
? `${formatPropertyValue(key.type, key.subtype, key.description)} => ${formattedValue}`
|
|
174
|
+
: formattedValue;
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Formats a `Runtime.ObjectPreview` the way the DevTools console previews it,
|
|
179
|
+
* for example `Map(1) {1 => 2}`, `(3) [1, 2, 3]` or `{a: 1, self: {…}}`.
|
|
180
|
+
*/
|
|
181
|
+
function formatObjectPreview(preview) {
|
|
182
|
+
const description = preview.description ?? '';
|
|
183
|
+
if (preview.type !== 'object' ||
|
|
184
|
+
(preview.subtype && SUBTYPES_WITHOUT_VALUE_PREVIEW.has(preview.subtype))) {
|
|
185
|
+
return formatPropertyValue(preview.type, preview.subtype, description);
|
|
186
|
+
}
|
|
187
|
+
const isArray = preview.subtype === 'array' || preview.subtype === 'typedarray';
|
|
188
|
+
let prefix = '';
|
|
189
|
+
if (isArray) {
|
|
190
|
+
const length = arrayLength(preview);
|
|
191
|
+
const lengthText = length > 1 ? `(${length})` : '';
|
|
192
|
+
const name = description.replace(/[[(]\d+[\])]$/, '');
|
|
193
|
+
prefix = name === 'Array' ? lengthText : `${name}${lengthText}`;
|
|
194
|
+
}
|
|
195
|
+
else if (description !== 'Object') {
|
|
196
|
+
prefix = description;
|
|
197
|
+
}
|
|
198
|
+
const items = preview.entries
|
|
199
|
+
? formatEntryItems(preview)
|
|
200
|
+
: isArray
|
|
201
|
+
? formatArrayItems(preview)
|
|
202
|
+
: formatObjectItems(preview);
|
|
203
|
+
if (preview.overflow) {
|
|
204
|
+
items.push('…');
|
|
205
|
+
}
|
|
206
|
+
const body = isArray ? `[${items.join(', ')}]` : `{${items.join(', ')}}`;
|
|
207
|
+
return prefix ? `${prefix} ${body}` : body;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Formats a console argument from the description and preview that CDP sends
|
|
211
|
+
* with it.
|
|
212
|
+
*/
|
|
213
|
+
export function formatRemoteObject(remoteObject) {
|
|
214
|
+
if (remoteObject.preview &&
|
|
215
|
+
remoteObject.type === 'object' &&
|
|
216
|
+
remoteObject.subtype !== 'node' &&
|
|
217
|
+
remoteObject.subtype !== 'trustedtype') {
|
|
218
|
+
return formatObjectPreview(remoteObject.preview);
|
|
219
|
+
}
|
|
220
|
+
if (remoteObject.type === 'string') {
|
|
221
|
+
return String(remoteObject.value ?? '');
|
|
222
|
+
}
|
|
223
|
+
if (remoteObject.unserializableValue !== undefined) {
|
|
224
|
+
return remoteObject.unserializableValue;
|
|
225
|
+
}
|
|
226
|
+
if (remoteObject.description !== undefined) {
|
|
227
|
+
return StringUtilities.trimEndWithMaxLength(remoteObject.description, MAX_DESCRIPTION_LENGTH);
|
|
228
|
+
}
|
|
229
|
+
return String(remoteObject.value);
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=RemoteObjectFormatter.js.map
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import { truncateUrl } from '../utils/text.js';
|
|
6
7
|
export class SnapshotFormatter {
|
|
7
8
|
#snapshot;
|
|
8
9
|
constructor(snapshot) {
|
|
@@ -29,7 +30,7 @@ Get a verbose snapshot to include all elements if you are interested in the sele
|
|
|
29
30
|
const attributes = this.#getAttributes(node);
|
|
30
31
|
const line = ' '.repeat(depth * 2) +
|
|
31
32
|
attributes.join(' ') +
|
|
32
|
-
(node.id === this.#snapshot.selectedElementUid
|
|
33
|
+
(node.id && node.id === this.#snapshot.selectedElementUid
|
|
33
34
|
? ' [selected in the DevTools Elements panel]'
|
|
34
35
|
: '') +
|
|
35
36
|
'\n';
|
|
@@ -66,7 +67,10 @@ Get a verbose snapshot to include all elements if you are interested in the sele
|
|
|
66
67
|
return result;
|
|
67
68
|
}
|
|
68
69
|
#getAttributes(serializedAXNodeRoot) {
|
|
69
|
-
const attributes = [
|
|
70
|
+
const attributes = [];
|
|
71
|
+
if (serializedAXNodeRoot.id) {
|
|
72
|
+
attributes.push(`uid=${serializedAXNodeRoot.id}`);
|
|
73
|
+
}
|
|
70
74
|
if (serializedAXNodeRoot.role &&
|
|
71
75
|
serializedAXNodeRoot.role !== 'StaticText') {
|
|
72
76
|
attributes.push(serializedAXNodeRoot.role === 'none'
|
|
@@ -105,7 +109,9 @@ Get a verbose snapshot to include all elements if you are interested in the sele
|
|
|
105
109
|
#getAttributesMap(node, excludeSpecial = false) {
|
|
106
110
|
const result = {};
|
|
107
111
|
if (!excludeSpecial) {
|
|
108
|
-
|
|
112
|
+
if (node.id) {
|
|
113
|
+
result.id = node.id;
|
|
114
|
+
}
|
|
109
115
|
if (node.role) {
|
|
110
116
|
result.role = node.role;
|
|
111
117
|
}
|
|
@@ -134,6 +140,10 @@ Get a verbose snapshot to include all elements if you are interested in the sele
|
|
|
134
140
|
result[attr] = true;
|
|
135
141
|
}
|
|
136
142
|
}
|
|
143
|
+
else if (attr === 'url' && typeof value === 'string') {
|
|
144
|
+
// Keep other URLs whole: the snapshot is their only full copy.
|
|
145
|
+
result[attr] = value.startsWith('data:') ? truncateUrl(value) : value;
|
|
146
|
+
}
|
|
137
147
|
else if (typeof value === 'string' || typeof value === 'number') {
|
|
138
148
|
result[attr] = value;
|
|
139
149
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
function formatAuthenticator(authenticator) {
|
|
7
|
+
const lines = [
|
|
8
|
+
'## Virtual authenticator',
|
|
9
|
+
`protocol=${authenticator.protocol}, transport=${authenticator.transport}, hasResidentKey=${authenticator.hasResidentKey}, hasUserVerification=${authenticator.hasUserVerification}, isUserVerified=${authenticator.isUserVerified}`,
|
|
10
|
+
];
|
|
11
|
+
if (!authenticator.credentials.length) {
|
|
12
|
+
lines.push('No credentials.');
|
|
13
|
+
return lines.join('\n');
|
|
14
|
+
}
|
|
15
|
+
lines.push('### Credentials');
|
|
16
|
+
for (const credential of authenticator.credentials) {
|
|
17
|
+
const fields = [
|
|
18
|
+
`credentialId=${credential.credentialId}`,
|
|
19
|
+
`rpId=${credential.rpId ?? 'unknown'}`,
|
|
20
|
+
`discoverable=${credential.isResidentCredential}`,
|
|
21
|
+
`signCount=${credential.signCount}`,
|
|
22
|
+
];
|
|
23
|
+
if (credential.userName) {
|
|
24
|
+
fields.push(`userName=${credential.userName}`);
|
|
25
|
+
}
|
|
26
|
+
lines.push(`- ${fields.join(', ')}`);
|
|
27
|
+
}
|
|
28
|
+
return lines.join('\n');
|
|
29
|
+
}
|
|
30
|
+
export class WebAuthnFormatter {
|
|
31
|
+
#authenticator;
|
|
32
|
+
constructor(authenticator) {
|
|
33
|
+
this.#authenticator = authenticator;
|
|
34
|
+
}
|
|
35
|
+
toJSON() {
|
|
36
|
+
if (!this.#authenticator) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
...this.#authenticator,
|
|
41
|
+
credentials: this.#authenticator.credentials.map(credential => ({
|
|
42
|
+
...credential,
|
|
43
|
+
// Match PublicKeyCredential.id, which the page sees as base64url.
|
|
44
|
+
credentialId: Buffer.from(credential.credentialId, 'base64').toString('base64url'),
|
|
45
|
+
})),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
toString() {
|
|
49
|
+
const authenticator = this.toJSON();
|
|
50
|
+
if (!authenticator) {
|
|
51
|
+
return 'No virtual authenticator on this page.';
|
|
52
|
+
}
|
|
53
|
+
return formatAuthenticator(authenticator);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=WebAuthnFormatter.js.map
|