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,569 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
7
|
+
if (value !== null && value !== void 0) {
|
|
8
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
9
|
+
var dispose, inner;
|
|
10
|
+
if (async) {
|
|
11
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
12
|
+
dispose = value[Symbol.asyncDispose];
|
|
13
|
+
}
|
|
14
|
+
if (dispose === void 0) {
|
|
15
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
16
|
+
dispose = value[Symbol.dispose];
|
|
17
|
+
if (async) inner = dispose;
|
|
18
|
+
}
|
|
19
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
20
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
21
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
22
|
+
}
|
|
23
|
+
else if (async) {
|
|
24
|
+
env.stack.push({ async: true });
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
};
|
|
28
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
29
|
+
return function (env) {
|
|
30
|
+
function fail(e) {
|
|
31
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
32
|
+
env.hasError = true;
|
|
33
|
+
}
|
|
34
|
+
var r, s = 0;
|
|
35
|
+
function next() {
|
|
36
|
+
while (r = env.stack.pop()) {
|
|
37
|
+
try {
|
|
38
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
39
|
+
if (r.dispose) {
|
|
40
|
+
var result = r.dispose.call(r.value);
|
|
41
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
42
|
+
}
|
|
43
|
+
else s |= 1;
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
fail(e);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
50
|
+
if (env.hasError) throw env.error;
|
|
51
|
+
}
|
|
52
|
+
return next();
|
|
53
|
+
};
|
|
54
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
55
|
+
var e = new Error(message);
|
|
56
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
57
|
+
});
|
|
58
|
+
import fsSync from 'node:fs';
|
|
59
|
+
import path from 'node:path';
|
|
60
|
+
import { DevTools } from '../third_party/index.js';
|
|
61
|
+
import { createIdGenerator } from '../utils/id.js';
|
|
62
|
+
function toClassDiff(index, rawDiff) {
|
|
63
|
+
return {
|
|
64
|
+
index,
|
|
65
|
+
className: rawDiff.name,
|
|
66
|
+
addedCount: rawDiff.addedCount,
|
|
67
|
+
removedCount: rawDiff.removedCount,
|
|
68
|
+
countDelta: rawDiff.countDelta,
|
|
69
|
+
addedSize: rawDiff.addedSize,
|
|
70
|
+
removedSize: rawDiff.removedSize,
|
|
71
|
+
sizeDelta: rawDiff.sizeDelta,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export class HeapSnapshot {
|
|
75
|
+
proxy;
|
|
76
|
+
worker;
|
|
77
|
+
// 1-indexed array where index is the class ID.
|
|
78
|
+
#idToClassKey = [''];
|
|
79
|
+
#classKeyToId = new Map();
|
|
80
|
+
constructor(proxy, worker, aggregates) {
|
|
81
|
+
this.proxy = proxy;
|
|
82
|
+
this.worker = worker;
|
|
83
|
+
for (const key of Object.keys(aggregates)) {
|
|
84
|
+
const id = this.#idToClassKey.length;
|
|
85
|
+
this.#classKeyToId.set(key, id);
|
|
86
|
+
this.#idToClassKey.push(key);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
resolveIdFromClassKey(classKey) {
|
|
90
|
+
return this.#classKeyToId.get(classKey);
|
|
91
|
+
}
|
|
92
|
+
resolveClassKeyFromId(id) {
|
|
93
|
+
return this.#idToClassKey[id];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const VALID_EXTENSIONS = ['.heapsnapshot', '.heaptimeline'];
|
|
97
|
+
function hasValidHeapSnapshotExtension(filePath) {
|
|
98
|
+
return VALID_EXTENSIONS.some(ext => filePath.endsWith(ext));
|
|
99
|
+
}
|
|
100
|
+
export class HeapSnapshotManager {
|
|
101
|
+
#snapshotIdGenerator = createIdGenerator();
|
|
102
|
+
#snapshots = new Map();
|
|
103
|
+
/**
|
|
104
|
+
* Queue for all heap snapshot work, with one child queue per absolute file
|
|
105
|
+
* path. A read of one file holds the file queue, so reads of different
|
|
106
|
+
* files run at the same time. A read of several files holds this queue.
|
|
107
|
+
* `disposeSnapshot()` holds the file queue, so it waits for in-flight
|
|
108
|
+
* reads of the file, and a read that starts after it loads the file again.
|
|
109
|
+
*/
|
|
110
|
+
#taskQueue;
|
|
111
|
+
#taskRunner;
|
|
112
|
+
#fileTaskQueues = new Map();
|
|
113
|
+
constructor(taskRunner) {
|
|
114
|
+
this.#taskRunner = taskRunner;
|
|
115
|
+
this.#taskQueue = taskRunner.createQueue();
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Holds the queue of `filePath`, or the heap queue without a path, until
|
|
119
|
+
* the guard is disposed.
|
|
120
|
+
*/
|
|
121
|
+
async #scheduleTask(filePath) {
|
|
122
|
+
if (filePath === undefined) {
|
|
123
|
+
return await this.#taskQueue.scheduleTask();
|
|
124
|
+
}
|
|
125
|
+
const absolutePath = path.resolve(filePath);
|
|
126
|
+
let queue = this.#fileTaskQueues.get(absolutePath);
|
|
127
|
+
if (!queue) {
|
|
128
|
+
queue = this.#taskRunner.createQueue(this.#taskQueue);
|
|
129
|
+
this.#fileTaskQueues.set(absolutePath, queue);
|
|
130
|
+
}
|
|
131
|
+
return await queue.scheduleTask();
|
|
132
|
+
}
|
|
133
|
+
async getSnapshot(filePath) {
|
|
134
|
+
if (!hasValidHeapSnapshotExtension(filePath)) {
|
|
135
|
+
throw new Error(`File ${filePath} must have a .heapsnapshot or .heaptimeline extension.`);
|
|
136
|
+
}
|
|
137
|
+
const absolutePath = path.resolve(filePath);
|
|
138
|
+
let cached = this.#snapshots.get(absolutePath);
|
|
139
|
+
if (!cached) {
|
|
140
|
+
const uid = this.#snapshotIdGenerator();
|
|
141
|
+
cached = this.#loadSnapshot(absolutePath, uid);
|
|
142
|
+
this.#snapshots.set(absolutePath, cached);
|
|
143
|
+
}
|
|
144
|
+
return await cached;
|
|
145
|
+
}
|
|
146
|
+
async #applyNodeFilter(snapshot, filter, filterName, objectId) {
|
|
147
|
+
if (filterName === 'attributedToSpecificNativeContext') {
|
|
148
|
+
if (objectId === undefined) {
|
|
149
|
+
throw new Error('objectId is required when filterName is attributedToSpecificNativeContext');
|
|
150
|
+
}
|
|
151
|
+
const nodeIndex = await snapshot.nodeIndexForId(objectId);
|
|
152
|
+
if (nodeIndex === undefined) {
|
|
153
|
+
throw new Error(`Node with ID ${objectId} not found`);
|
|
154
|
+
}
|
|
155
|
+
filter.filterName = `nativeContext_${nodeIndex}`;
|
|
156
|
+
}
|
|
157
|
+
else if (filterName) {
|
|
158
|
+
filter.filterName = filterName;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async getAggregates(filePath, filterName, objectId) {
|
|
162
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
163
|
+
try {
|
|
164
|
+
const guard = __addDisposableResource(env_1, await this.#scheduleTask(filePath), false);
|
|
165
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
166
|
+
const filter = new DevTools.HeapSnapshotModel.HeapSnapshotModel.NodeFilter();
|
|
167
|
+
await this.#applyNodeFilter(snapshot.proxy, filter, filterName, objectId);
|
|
168
|
+
const rawAggregates = await snapshot.proxy.aggregatesWithFilter(filter);
|
|
169
|
+
let objectCount = 0;
|
|
170
|
+
let totalSelfSize = 0;
|
|
171
|
+
const aggregates = [];
|
|
172
|
+
for (const [key, aggregate] of Object.entries(rawAggregates)) {
|
|
173
|
+
const id = snapshot.resolveIdFromClassKey(key);
|
|
174
|
+
if (id === undefined) {
|
|
175
|
+
throw new Error(`No class ID found for class key ${key}`);
|
|
176
|
+
}
|
|
177
|
+
objectCount += aggregate.count;
|
|
178
|
+
totalSelfSize += aggregate.self;
|
|
179
|
+
aggregates.push({
|
|
180
|
+
id,
|
|
181
|
+
className: aggregate.name,
|
|
182
|
+
count: aggregate.count,
|
|
183
|
+
selfSize: aggregate.self,
|
|
184
|
+
retainedSize: aggregate.maxRet,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
aggregates.sort((a, b) => b.retainedSize - a.retainedSize);
|
|
188
|
+
return {
|
|
189
|
+
aggregates,
|
|
190
|
+
objectCount,
|
|
191
|
+
totalSelfSize,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
catch (e_1) {
|
|
195
|
+
env_1.error = e_1;
|
|
196
|
+
env_1.hasError = true;
|
|
197
|
+
}
|
|
198
|
+
finally {
|
|
199
|
+
__disposeResources(env_1);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async getStats(filePath) {
|
|
203
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
204
|
+
try {
|
|
205
|
+
const guard = __addDisposableResource(env_2, await this.#scheduleTask(filePath), false);
|
|
206
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
207
|
+
return await snapshot.proxy.getStatistics();
|
|
208
|
+
}
|
|
209
|
+
catch (e_2) {
|
|
210
|
+
env_2.error = e_2;
|
|
211
|
+
env_2.hasError = true;
|
|
212
|
+
}
|
|
213
|
+
finally {
|
|
214
|
+
__disposeResources(env_2);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
async getStaticData(filePath) {
|
|
218
|
+
const env_3 = { stack: [], error: void 0, hasError: false };
|
|
219
|
+
try {
|
|
220
|
+
const guard = __addDisposableResource(env_3, await this.#scheduleTask(filePath), false);
|
|
221
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
222
|
+
return snapshot.proxy.staticData;
|
|
223
|
+
}
|
|
224
|
+
catch (e_3) {
|
|
225
|
+
env_3.error = e_3;
|
|
226
|
+
env_3.hasError = true;
|
|
227
|
+
}
|
|
228
|
+
finally {
|
|
229
|
+
__disposeResources(env_3);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
async getNativeContextSizes(filePath) {
|
|
233
|
+
const env_4 = { stack: [], error: void 0, hasError: false };
|
|
234
|
+
try {
|
|
235
|
+
const guard = __addDisposableResource(env_4, await this.#scheduleTask(filePath), false);
|
|
236
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
237
|
+
return await snapshot.proxy.getNativeContextSizes();
|
|
238
|
+
}
|
|
239
|
+
catch (e_4) {
|
|
240
|
+
env_4.error = e_4;
|
|
241
|
+
env_4.hasError = true;
|
|
242
|
+
}
|
|
243
|
+
finally {
|
|
244
|
+
__disposeResources(env_4);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
async getRetainedByContextSummary(filePath) {
|
|
248
|
+
const env_5 = { stack: [], error: void 0, hasError: false };
|
|
249
|
+
try {
|
|
250
|
+
const guard = __addDisposableResource(env_5, await this.#scheduleTask(filePath), false);
|
|
251
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
252
|
+
return await snapshot.proxy.getRetainedByContextSummary();
|
|
253
|
+
}
|
|
254
|
+
catch (e_5) {
|
|
255
|
+
env_5.error = e_5;
|
|
256
|
+
env_5.hasError = true;
|
|
257
|
+
}
|
|
258
|
+
finally {
|
|
259
|
+
__disposeResources(env_5);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
async getNodesById(filePath, id, filterName, objectId) {
|
|
263
|
+
const env_6 = { stack: [], error: void 0, hasError: false };
|
|
264
|
+
try {
|
|
265
|
+
const guard = __addDisposableResource(env_6, await this.#scheduleTask(filePath), false);
|
|
266
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
267
|
+
const filter = new DevTools.HeapSnapshotModel.HeapSnapshotModel.NodeFilter();
|
|
268
|
+
await this.#applyNodeFilter(snapshot.proxy, filter, filterName, objectId);
|
|
269
|
+
const className = snapshot.resolveClassKeyFromId(id);
|
|
270
|
+
if (!className) {
|
|
271
|
+
throw new Error(`Class with ID ${id} not found in heap snapshot`);
|
|
272
|
+
}
|
|
273
|
+
const provider = snapshot.proxy.createNodesProviderForClass(className, filter);
|
|
274
|
+
return await provider.serializeItemsRange(0, Infinity);
|
|
275
|
+
}
|
|
276
|
+
catch (e_6) {
|
|
277
|
+
env_6.error = e_6;
|
|
278
|
+
env_6.hasError = true;
|
|
279
|
+
}
|
|
280
|
+
finally {
|
|
281
|
+
__disposeResources(env_6);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
async getRetainers(filePath, nodeId) {
|
|
285
|
+
const env_7 = { stack: [], error: void 0, hasError: false };
|
|
286
|
+
try {
|
|
287
|
+
const guard = __addDisposableResource(env_7, await this.#scheduleTask(filePath), false);
|
|
288
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
289
|
+
const nodeIndex = await snapshot.proxy.nodeIndexForId(nodeId);
|
|
290
|
+
if (nodeIndex === undefined) {
|
|
291
|
+
throw new Error(`Node with ID ${nodeId} not found`);
|
|
292
|
+
}
|
|
293
|
+
const provider = snapshot.proxy.createRetainingEdgesProvider(nodeIndex);
|
|
294
|
+
return await provider.serializeItemsRange(0, Infinity);
|
|
295
|
+
}
|
|
296
|
+
catch (e_7) {
|
|
297
|
+
env_7.error = e_7;
|
|
298
|
+
env_7.hasError = true;
|
|
299
|
+
}
|
|
300
|
+
finally {
|
|
301
|
+
__disposeResources(env_7);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
async getObjectInfo(filePath, nodeId) {
|
|
305
|
+
const env_8 = { stack: [], error: void 0, hasError: false };
|
|
306
|
+
try {
|
|
307
|
+
const guard = __addDisposableResource(env_8, await this.#scheduleTask(filePath), false);
|
|
308
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
309
|
+
const nodeIndex = await snapshot.proxy.nodeIndexForId(nodeId);
|
|
310
|
+
if (nodeIndex === undefined) {
|
|
311
|
+
throw new Error(`Node with ID ${nodeId} not found`);
|
|
312
|
+
}
|
|
313
|
+
return await snapshot.proxy.getObjectInfo(nodeIndex);
|
|
314
|
+
}
|
|
315
|
+
catch (e_8) {
|
|
316
|
+
env_8.error = e_8;
|
|
317
|
+
env_8.hasError = true;
|
|
318
|
+
}
|
|
319
|
+
finally {
|
|
320
|
+
__disposeResources(env_8);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
async analyzeContexts(filePath) {
|
|
324
|
+
const env_9 = { stack: [], error: void 0, hasError: false };
|
|
325
|
+
try {
|
|
326
|
+
const guard = __addDisposableResource(env_9, await this.#scheduleTask(filePath), false);
|
|
327
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
328
|
+
return await snapshot.proxy.analyzeContexts();
|
|
329
|
+
}
|
|
330
|
+
catch (e_9) {
|
|
331
|
+
env_9.error = e_9;
|
|
332
|
+
env_9.hasError = true;
|
|
333
|
+
}
|
|
334
|
+
finally {
|
|
335
|
+
__disposeResources(env_9);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
async getRetainingPaths(filePath, nodeId, maxDepth, maxNodes, maxSiblings) {
|
|
339
|
+
const env_10 = { stack: [], error: void 0, hasError: false };
|
|
340
|
+
try {
|
|
341
|
+
const guard = __addDisposableResource(env_10, await this.#scheduleTask(filePath), false);
|
|
342
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
343
|
+
const nodeIndex = await snapshot.proxy.nodeIndexForId(nodeId);
|
|
344
|
+
if (nodeIndex === undefined) {
|
|
345
|
+
throw new Error(`Node with ID ${nodeId} not found`);
|
|
346
|
+
}
|
|
347
|
+
return await snapshot.proxy.getRetainingPaths(nodeIndex, maxDepth, maxNodes, maxSiblings);
|
|
348
|
+
}
|
|
349
|
+
catch (e_10) {
|
|
350
|
+
env_10.error = e_10;
|
|
351
|
+
env_10.hasError = true;
|
|
352
|
+
}
|
|
353
|
+
finally {
|
|
354
|
+
__disposeResources(env_10);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
async getDominatorsOf(filePath, nodeId) {
|
|
358
|
+
const env_11 = { stack: [], error: void 0, hasError: false };
|
|
359
|
+
try {
|
|
360
|
+
const guard = __addDisposableResource(env_11, await this.#scheduleTask(filePath), false);
|
|
361
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
362
|
+
const nodeIndex = await snapshot.proxy.nodeIndexForId(nodeId);
|
|
363
|
+
if (nodeIndex === undefined) {
|
|
364
|
+
throw new Error(`Node with ID ${nodeId} not found`);
|
|
365
|
+
}
|
|
366
|
+
return await snapshot.proxy.getDominatorsOf(nodeIndex);
|
|
367
|
+
}
|
|
368
|
+
catch (e_11) {
|
|
369
|
+
env_11.error = e_11;
|
|
370
|
+
env_11.hasError = true;
|
|
371
|
+
}
|
|
372
|
+
finally {
|
|
373
|
+
__disposeResources(env_11);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
async getEdges(filePath, nodeId, options) {
|
|
377
|
+
const env_12 = { stack: [], error: void 0, hasError: false };
|
|
378
|
+
try {
|
|
379
|
+
const guard = __addDisposableResource(env_12, await this.#scheduleTask(filePath), false);
|
|
380
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
381
|
+
const nodeIndex = await snapshot.proxy.nodeIndexForId(nodeId);
|
|
382
|
+
if (nodeIndex === undefined) {
|
|
383
|
+
throw new Error(`Node with ID ${nodeId} not found`);
|
|
384
|
+
}
|
|
385
|
+
const provider = snapshot.proxy.createEdgesProvider(nodeIndex, options);
|
|
386
|
+
return await provider.serializeItemsRange(0, Infinity);
|
|
387
|
+
}
|
|
388
|
+
catch (e_12) {
|
|
389
|
+
env_12.error = e_12;
|
|
390
|
+
env_12.hasError = true;
|
|
391
|
+
}
|
|
392
|
+
finally {
|
|
393
|
+
__disposeResources(env_12);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
async getClassDiffs(baseFilePath, currentFilePath) {
|
|
397
|
+
const rawDiffs = await this.#getSortedRawClassDiffs(baseFilePath, currentFilePath);
|
|
398
|
+
const classDiffs = [];
|
|
399
|
+
const totals = {
|
|
400
|
+
addedCount: 0,
|
|
401
|
+
removedCount: 0,
|
|
402
|
+
countDelta: 0,
|
|
403
|
+
addedSize: 0,
|
|
404
|
+
removedSize: 0,
|
|
405
|
+
sizeDelta: 0,
|
|
406
|
+
};
|
|
407
|
+
for (const [index, rawDiff] of rawDiffs.entries()) {
|
|
408
|
+
classDiffs.push(toClassDiff(index, rawDiff));
|
|
409
|
+
totals.addedCount += rawDiff.addedCount;
|
|
410
|
+
totals.removedCount += rawDiff.removedCount;
|
|
411
|
+
totals.countDelta += rawDiff.countDelta;
|
|
412
|
+
totals.addedSize += rawDiff.addedSize;
|
|
413
|
+
totals.removedSize += rawDiff.removedSize;
|
|
414
|
+
totals.sizeDelta += rawDiff.sizeDelta;
|
|
415
|
+
}
|
|
416
|
+
return { classDiffs, totals };
|
|
417
|
+
}
|
|
418
|
+
async getDetailedClassDiff(baseFilePath, currentFilePath, classIndex) {
|
|
419
|
+
const classDiffs = await this.#getSortedRawClassDiffs(baseFilePath, currentFilePath);
|
|
420
|
+
const rawDiff = classDiffs[classIndex];
|
|
421
|
+
if (!rawDiff) {
|
|
422
|
+
throw new Error(`Invalid classIndex: ${classIndex}. Total classes with changes: ${classDiffs.length}`);
|
|
423
|
+
}
|
|
424
|
+
const objects = [];
|
|
425
|
+
const addedIds = rawDiff.addedIds ?? [];
|
|
426
|
+
const addedSelfSizes = rawDiff.addedSelfSizes ?? [];
|
|
427
|
+
for (const [i, id] of addedIds.entries()) {
|
|
428
|
+
objects.push({ id, selfSize: addedSelfSizes[i], change: 'added' });
|
|
429
|
+
}
|
|
430
|
+
const deletedIds = rawDiff.deletedIds ?? [];
|
|
431
|
+
const deletedSelfSizes = rawDiff.deletedSelfSizes ?? [];
|
|
432
|
+
for (const [i, id] of deletedIds.entries()) {
|
|
433
|
+
objects.push({ id, selfSize: deletedSelfSizes[i], change: 'deleted' });
|
|
434
|
+
}
|
|
435
|
+
// Largest objects first so that the first page of paginated output shows
|
|
436
|
+
// the most significant changes.
|
|
437
|
+
objects.sort((a, b) => b.selfSize - a.selfSize);
|
|
438
|
+
return { classDiff: toClassDiff(classIndex, rawDiff), objects };
|
|
439
|
+
}
|
|
440
|
+
async #getSortedRawClassDiffs(baseFilePath, currentFilePath) {
|
|
441
|
+
const env_13 = { stack: [], error: void 0, hasError: false };
|
|
442
|
+
try {
|
|
443
|
+
const guard = __addDisposableResource(env_13, await this.#scheduleTask(), false);
|
|
444
|
+
const [baseSnapshot, currentSnapshot] = await Promise.all([
|
|
445
|
+
this.getSnapshot(baseFilePath),
|
|
446
|
+
this.getSnapshot(currentFilePath),
|
|
447
|
+
]);
|
|
448
|
+
const interfaceDefinitions = await currentSnapshot.proxy.interfaceDefinitions();
|
|
449
|
+
const aggregatesForDiff = await baseSnapshot.proxy.aggregatesForDiff(interfaceDefinitions);
|
|
450
|
+
const baseSnapshotId = baseSnapshot.proxy.uid;
|
|
451
|
+
if (baseSnapshotId === undefined) {
|
|
452
|
+
throw new Error('Base snapshot UID is undefined');
|
|
453
|
+
}
|
|
454
|
+
// DevTools calculateSnapshotDiff uses the first parameter (baseSnapshotId)
|
|
455
|
+
// as a cache key. We pass the unique UID of the base snapshot.
|
|
456
|
+
const rawDiffs = await currentSnapshot.proxy.calculateSnapshotDiff(baseSnapshotId, aggregatesForDiff);
|
|
457
|
+
// Return a filtered and sorted array here to ensure that
|
|
458
|
+
// compare_heapsnapshot_summary and compare_heapsnapshot_details agree
|
|
459
|
+
// on indices.
|
|
460
|
+
return Object.values(rawDiffs)
|
|
461
|
+
.filter(diff => diff.addedCount > 0 || diff.removedCount > 0)
|
|
462
|
+
.sort((a, b) => b.sizeDelta - a.sizeDelta);
|
|
463
|
+
}
|
|
464
|
+
catch (e_13) {
|
|
465
|
+
env_13.error = e_13;
|
|
466
|
+
env_13.hasError = true;
|
|
467
|
+
}
|
|
468
|
+
finally {
|
|
469
|
+
__disposeResources(env_13);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
async #loadSnapshot(absolutePath, uid) {
|
|
473
|
+
const workerProxy = new DevTools.HeapSnapshotModel.HeapSnapshotProxy.HeapSnapshotWorkerProxy(() => {
|
|
474
|
+
/* noop */
|
|
475
|
+
}, DevTools.Common.Console.Console.instance(), import.meta.resolve('../third_party/devtools-heap-snapshot-worker.js'));
|
|
476
|
+
try {
|
|
477
|
+
const { promise: snapshotPromise, resolve: resolveSnapshot } = Promise.withResolvers();
|
|
478
|
+
const loaderProxy = workerProxy.createLoader(uid, snapshotProxy => {
|
|
479
|
+
resolveSnapshot(snapshotProxy);
|
|
480
|
+
});
|
|
481
|
+
const fileStream = fsSync.createReadStream(absolutePath, {
|
|
482
|
+
encoding: 'utf-8',
|
|
483
|
+
highWaterMark: 1024 * 1024,
|
|
484
|
+
});
|
|
485
|
+
for await (const chunk of fileStream) {
|
|
486
|
+
await loaderProxy.write(chunk);
|
|
487
|
+
}
|
|
488
|
+
await loaderProxy.close();
|
|
489
|
+
const snapshot = await snapshotPromise;
|
|
490
|
+
// Assign ids to all aggregates of this snapshot. This ensures ids are available
|
|
491
|
+
// even without calling getAggregates() and deterministic (do not depend on
|
|
492
|
+
// the filter used on the getAggregates() call).
|
|
493
|
+
const aggregates = await snapshot.aggregatesWithFilter(new DevTools.HeapSnapshotModel.HeapSnapshotModel.NodeFilter());
|
|
494
|
+
return new HeapSnapshot(snapshot, workerProxy, aggregates);
|
|
495
|
+
}
|
|
496
|
+
catch (error) {
|
|
497
|
+
// Remove the rejected promise from #snapshots and dispose the worker to
|
|
498
|
+
// avoid leaking it on a failed load (e.g. a missing or invalid
|
|
499
|
+
// .heapsnapshot path).
|
|
500
|
+
this.#snapshots.delete(absolutePath);
|
|
501
|
+
workerProxy.dispose();
|
|
502
|
+
throw error;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
async getDuplicateStrings(filePath) {
|
|
506
|
+
const env_14 = { stack: [], error: void 0, hasError: false };
|
|
507
|
+
try {
|
|
508
|
+
const guard = __addDisposableResource(env_14, await this.#scheduleTask(filePath), false);
|
|
509
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
510
|
+
return await snapshot.proxy.getDuplicateStrings();
|
|
511
|
+
}
|
|
512
|
+
catch (e_14) {
|
|
513
|
+
env_14.error = e_14;
|
|
514
|
+
env_14.hasError = true;
|
|
515
|
+
}
|
|
516
|
+
finally {
|
|
517
|
+
__disposeResources(env_14);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
async queryObjects(filePath, options) {
|
|
521
|
+
const env_15 = { stack: [], error: void 0, hasError: false };
|
|
522
|
+
try {
|
|
523
|
+
const guard = __addDisposableResource(env_15, await this.#scheduleTask(filePath), false);
|
|
524
|
+
const snapshot = await this.getSnapshot(filePath);
|
|
525
|
+
const provider = snapshot.proxy.queryObjects(options);
|
|
526
|
+
return await provider.serializeItemsRange(0, Infinity);
|
|
527
|
+
}
|
|
528
|
+
catch (e_15) {
|
|
529
|
+
env_15.error = e_15;
|
|
530
|
+
env_15.hasError = true;
|
|
531
|
+
}
|
|
532
|
+
finally {
|
|
533
|
+
__disposeResources(env_15);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
hasSnapshots() {
|
|
537
|
+
return this.#snapshots.size > 0;
|
|
538
|
+
}
|
|
539
|
+
async disposeSnapshot(filePath) {
|
|
540
|
+
const env_16 = { stack: [], error: void 0, hasError: false };
|
|
541
|
+
try {
|
|
542
|
+
const guard = __addDisposableResource(env_16, await this.#scheduleTask(filePath), false);
|
|
543
|
+
const absolutePath = path.resolve(filePath);
|
|
544
|
+
const cached = this.#snapshots.get(absolutePath);
|
|
545
|
+
if (cached) {
|
|
546
|
+
this.#snapshots.delete(absolutePath);
|
|
547
|
+
const { worker } = await cached;
|
|
548
|
+
worker.dispose();
|
|
549
|
+
return true;
|
|
550
|
+
}
|
|
551
|
+
return false;
|
|
552
|
+
}
|
|
553
|
+
catch (e_16) {
|
|
554
|
+
env_16.error = e_16;
|
|
555
|
+
env_16.hasError = true;
|
|
556
|
+
}
|
|
557
|
+
finally {
|
|
558
|
+
__disposeResources(env_16);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
dispose() {
|
|
562
|
+
void Promise.allSettled(this.#snapshots.values().map(async (cached) => {
|
|
563
|
+
const { worker } = await cached;
|
|
564
|
+
worker.dispose();
|
|
565
|
+
}));
|
|
566
|
+
this.#snapshots.clear();
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
//# sourceMappingURL=HeapSnapshotManager.js.map
|
|
@@ -184,7 +184,7 @@ function hasEquivalentType(zodType, value) {
|
|
|
184
184
|
export function sanitizeParams(params, schema) {
|
|
185
185
|
const transformed = {};
|
|
186
186
|
for (const [name, value] of Object.entries(params)) {
|
|
187
|
-
if (PARAM_BLOCKLIST.has(name)) {
|
|
187
|
+
if (value === undefined || PARAM_BLOCKLIST.has(name)) {
|
|
188
188
|
continue;
|
|
189
189
|
}
|
|
190
190
|
const zodType = getZodType(schema[name]);
|