chrome-devtools-frontend 1.0.1616061 → 1.0.1621064
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/AUTHORS +1 -0
- package/docs/checklist/README.md +8 -7
- package/eslint.config.mjs +7 -0
- package/front_end/core/common/Object.ts +11 -2
- package/front_end/core/dom_extension/DOMExtension.ts +11 -8
- package/front_end/core/host/AidaClient.ts +8 -0
- package/front_end/core/host/AidaGcaTranslation.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/platform/api/HostRuntime.ts +2 -2
- package/front_end/core/platform/browser/HostRuntime.ts +4 -2
- package/front_end/core/platform/node/HostRuntime.ts +2 -2
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/NetworkManager.ts +30 -4
- package/front_end/core/sdk/NetworkRequest.ts +2 -10
- package/front_end/core/sdk/Resource.ts +2 -1
- package/front_end/core/sdk/ServerSentEventsProtocol.ts +1 -1
- package/front_end/core/sdk/TraceObject.ts +7 -2
- package/front_end/entrypoint_template.html +1 -2
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +119 -15
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +43 -33
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +2 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +9 -6
- package/front_end/entrypoints/main/MainImpl.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +8 -7
- package/front_end/generated/SupportedCSSProperties.js +119 -100
- package/front_end/generated/protocol-mapping.d.ts +1 -9
- package/front_end/generated/protocol-proxy-api.d.ts +1 -9
- package/front_end/generated/protocol.ts +24 -1
- package/front_end/legacy/legacy-defs.d.ts +1 -1
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +39 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -0
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +28 -16
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +512 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +112 -145
- package/front_end/models/ai_assistance/agents/README.md +0 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -16
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +19 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +48 -13
- package/front_end/models/bindings/SymbolizedError.ts +95 -8
- package/front_end/models/emulation/DeviceModeModel.ts +42 -13
- package/front_end/models/emulation/EmulatedDevices.ts +1 -1
- package/front_end/models/issues_manager/IssuesManager.ts +13 -6
- package/front_end/models/issues_manager/IssuesManagerEvents.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -0
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +49 -10
- package/front_end/models/stack_trace/ErrorStackParser.ts +18 -0
- package/front_end/models/stack_trace/StackTraceModel.ts +5 -1
- package/front_end/models/text_utils/ContentData.ts +71 -10
- package/front_end/models/trace/types/File.ts +8 -1
- package/front_end/models/web_mcp/WebMCPModel.ts +22 -0
- package/front_end/models/workspace/UISourceCode.ts +4 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +3 -2
- package/front_end/panels/accessibility/SourceOrderView.ts +4 -4
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatInput.ts +66 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +144 -21
- package/front_end/panels/ai_assistance/components/ChatView.ts +43 -8
- package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +1 -0
- package/front_end/panels/ai_assistance/components/WalkthroughUtils.ts +74 -0
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +34 -5
- package/front_end/panels/ai_assistance/components/chatMessage.css +11 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +7 -0
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +8 -9
- package/front_end/panels/application/DOMStorageItemsView.ts +3 -3
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +7 -0
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +21 -0
- package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/application/ExtensionStorageItemsView.ts +1 -1
- package/front_end/panels/application/KeyValueStorageItemsView.ts +32 -14
- package/front_end/panels/application/ResourcesPanel.ts +5 -5
- package/front_end/panels/application/StorageItemsToolbar.ts +0 -19
- package/front_end/panels/application/WebMCPView.ts +285 -86
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +4 -4
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +4 -4
- package/front_end/panels/application/webMCPView.css +261 -182
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +9 -5
- package/front_end/panels/changes/ChangesSidebar.ts +2 -2
- package/front_end/panels/changes/ChangesView.ts +9 -14
- package/front_end/panels/console/ConsolePanel.ts +10 -3
- package/front_end/panels/console/ConsoleSidebar.ts +5 -5
- package/front_end/panels/console/ConsoleView.ts +11 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -19
- package/front_end/panels/coverage/CoverageView.ts +4 -5
- package/front_end/panels/elements/ElementsPanel.ts +9 -12
- package/front_end/panels/elements/ElementsSidebarPane.ts +4 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +61 -0
- package/front_end/panels/elements/ElementsTreeOutline.ts +46 -0
- package/front_end/panels/elements/LayersWidget.ts +2 -2
- package/front_end/panels/elements/MetricsSidebarPane.ts +5 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +11 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -1
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -20
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +29 -29
- package/front_end/panels/elements/components/QueryContainer.ts +5 -6
- package/front_end/panels/elements/components/components.ts +0 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +4 -7
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +4 -7
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseStartView.ts +2 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +47 -66
- package/front_end/panels/network/NetworkConfigView.ts +11 -11
- package/front_end/panels/network/RequestConditionsDrawer.ts +6 -4
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +2 -2
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +4 -5
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -9
- package/front_end/panels/profiler/HeapProfileView.ts +29 -4
- package/front_end/panels/profiler/ProfilesPanel.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.css +8 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +7 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +6 -4
- package/front_end/panels/recorder/components/ControlButton.ts +4 -4
- package/front_end/panels/recorder/components/StepView.ts +6 -6
- package/front_end/panels/search/SearchView.ts +4 -7
- package/front_end/panels/sources/DebuggerPausedMessage.ts +18 -22
- package/front_end/panels/sources/SourcesView.ts +1 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +24 -20
- package/front_end/panels/timeline/StatusDialog.ts +5 -8
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -0
- package/front_end/panels/timeline/TimelineLoader.ts +3 -4
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +2 -2
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +2 -0
- package/front_end/panels/timeline/components/TimelineSummary.ts +9 -1
- package/front_end/panels/timeline/components/timelineSummary.css +4 -0
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +2 -2
- package/front_end/panels/timeline/thirdPartyTreeView.css +8 -1
- package/front_end/panels/web_audio/WebAudioView.ts +5 -4
- package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
- package/front_end/panels/whats_new/resources/WNDT.md +9 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +41 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.js +853 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +1046 -33
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +41 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.js +805 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/package.json +3 -2
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +53 -11
- package/front_end/third_party/puppeteer/package/src/api/Extension.ts +29 -1
- package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +9 -2
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +59 -0
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +6 -1
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +26 -0
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -1
- package/front_end/third_party/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/README.md +21 -10
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +2 -4
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +44 -39
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +25 -19
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/doubleRAF.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +16 -18
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +2 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenActivated.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +11 -7
- package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
- package/front_end/third_party/web-vitals/package/package.json +24 -27
- package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +2 -7
- package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +49 -43
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +27 -24
- package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/doubleRAF.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +21 -20
- package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +2 -3
- package/front_end/third_party/web-vitals/package/src/lib/observe.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +2 -4
- package/front_end/third_party/web-vitals/package/src/lib/whenActivated.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +13 -7
- package/front_end/third_party/web-vitals/package/src/onCLS.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/types/inp.ts +4 -0
- package/front_end/third_party/web-vitals/package/src/types.ts +1 -2
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +13 -74
- package/front_end/third_party/web-vitals/rebuild.sh +3 -3
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -1
- package/front_end/ui/components/icon_button/iconButton.css +1 -0
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +6 -6
- package/front_end/ui/components/lists/list.css +4 -0
- package/front_end/ui/legacy/Dialog.ts +21 -2
- package/front_end/ui/legacy/SoftContextMenu.ts +3 -3
- package/front_end/ui/legacy/SplitWidget.ts +9 -9
- package/front_end/ui/legacy/TabbedPane.ts +12 -12
- package/front_end/ui/legacy/View.ts +24 -22
- package/front_end/ui/legacy/ViewManager.ts +12 -12
- package/front_end/ui/legacy/ViewRegistration.ts +2 -2
- package/front_end/ui/legacy/Widget.ts +165 -119
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +9 -6
- package/front_end/ui/legacy/components/utils/Linkifier.ts +37 -11
- package/front_end/ui/legacy/components/utils/jsUtils.css +1 -0
- package/front_end/ui/legacy/inspectorCommon.css +0 -6
- package/front_end/ui/lit/render.ts +11 -9
- package/front_end/ui/visual_logging/KnownContextValues.ts +36 -0
- package/package.json +1 -1
- package/front_end/Images/src/dots-circle.svg +0 -10
- package/front_end/panels/elements/components/Helper.ts +0 -35
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.d.ts +0 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.js +0 -16
- package/front_end/third_party/web-vitals/package/src/types/polyfills.ts +0 -24
|
@@ -125,21 +125,63 @@ export declare interface AddScreenParams {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
+
* Supported autofill address field names.
|
|
129
|
+
*
|
|
128
130
|
* @public
|
|
129
131
|
*/
|
|
130
|
-
export declare
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
132
|
+
export declare const enum AutofillAddressField {
|
|
133
|
+
NameFirst = 'NAME_FIRST',
|
|
134
|
+
NameMiddle = 'NAME_MIDDLE',
|
|
135
|
+
NameLast = 'NAME_LAST',
|
|
136
|
+
NameFull = 'NAME_FULL',
|
|
137
|
+
EmailAddress = 'EMAIL_ADDRESS',
|
|
138
|
+
PhoneHomeNumber = 'PHONE_HOME_NUMBER',
|
|
139
|
+
PhoneHomeCityAndNumber = 'PHONE_HOME_CITY_AND_NUMBER',
|
|
140
|
+
PhoneHomeWholeNumber = 'PHONE_HOME_WHOLE_NUMBER',
|
|
141
|
+
AddressHomeLine1 = 'ADDRESS_HOME_LINE1',
|
|
142
|
+
AddressHomeLine2 = 'ADDRESS_HOME_LINE2',
|
|
143
|
+
AddressHomeStreetAddress = 'ADDRESS_HOME_STREET_ADDRESS',
|
|
144
|
+
AddressHomeCity = 'ADDRESS_HOME_CITY',
|
|
145
|
+
AddressHomeState = 'ADDRESS_HOME_STATE',
|
|
146
|
+
AddressHomeZip = 'ADDRESS_HOME_ZIP',
|
|
147
|
+
AddressHomeCountry = 'ADDRESS_HOME_COUNTRY',
|
|
141
148
|
}
|
|
142
149
|
|
|
150
|
+
/**
|
|
151
|
+
* @public
|
|
152
|
+
*/
|
|
153
|
+
export declare type AutofillData =
|
|
154
|
+
| {
|
|
155
|
+
/**
|
|
156
|
+
* See {@link https://chromedevtools.github.io/devtools-protocol/tot/Autofill/#type-CreditCard | Autofill.CreditCard}.
|
|
157
|
+
*/
|
|
158
|
+
creditCard: {
|
|
159
|
+
number: string;
|
|
160
|
+
name: string;
|
|
161
|
+
expiryMonth: string;
|
|
162
|
+
expiryYear: string;
|
|
163
|
+
cvc: string;
|
|
164
|
+
};
|
|
165
|
+
address?: never;
|
|
166
|
+
}
|
|
167
|
+
| {
|
|
168
|
+
/**
|
|
169
|
+
* See {@link https://chromedevtools.github.io/devtools-protocol/tot/Autofill/#type-Address | Autofill.Address}.
|
|
170
|
+
*/
|
|
171
|
+
address: {
|
|
172
|
+
fields: Array<{
|
|
173
|
+
/**
|
|
174
|
+
* The field type.
|
|
175
|
+
* See {@link https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/field_types.cc}
|
|
176
|
+
* for the full list of supported fields.
|
|
177
|
+
*/
|
|
178
|
+
name: AutofillAddressField | (string & Record<never, never>);
|
|
179
|
+
value: string;
|
|
180
|
+
}>;
|
|
181
|
+
};
|
|
182
|
+
creditCard?: never;
|
|
183
|
+
};
|
|
184
|
+
|
|
143
185
|
/**
|
|
144
186
|
* @public
|
|
145
187
|
*/
|
|
@@ -1343,6 +1385,31 @@ export declare interface ConnectOptions {
|
|
|
1343
1385
|
* Only works for `protocol="webDriverBiDi"` and {@link Puppeteer.connect}.
|
|
1344
1386
|
*/
|
|
1345
1387
|
capabilities?: SupportedWebDriverCapabilities;
|
|
1388
|
+
/**
|
|
1389
|
+
* A list of URL patterns to block.
|
|
1390
|
+
*
|
|
1391
|
+
* This option allows you to restrict the browser from accessing specific
|
|
1392
|
+
* URLs or origins. It uses the standard [URLPattern](https://urlpattern.spec.whatwg.org/) API to match URLs.
|
|
1393
|
+
*
|
|
1394
|
+
* When connecting to an existing browser, Puppeteer will silently detach from any
|
|
1395
|
+
* already open targets that violate the patterns.
|
|
1396
|
+
*
|
|
1397
|
+
* For any network requests made by the browser (including navigations and
|
|
1398
|
+
* subresources like images or scripts), the request will fail with an error
|
|
1399
|
+
* if the URL matches a blocked pattern.
|
|
1400
|
+
*
|
|
1401
|
+
* @example Pattern to block a specific domain:
|
|
1402
|
+
* `*://example.com/*`
|
|
1403
|
+
*
|
|
1404
|
+
* @example Pattern to block all subdomains:
|
|
1405
|
+
* `*://*.evil.com/*`
|
|
1406
|
+
*
|
|
1407
|
+
* @remarks
|
|
1408
|
+
* Currently only supported for CDP connections.
|
|
1409
|
+
*
|
|
1410
|
+
* @experimental
|
|
1411
|
+
*/
|
|
1412
|
+
blockList?: string[];
|
|
1346
1413
|
}
|
|
1347
1414
|
|
|
1348
1415
|
/**
|
|
@@ -2775,6 +2842,18 @@ export declare type ExperimentsConfiguration = Record<string, never>;
|
|
|
2775
2842
|
export declare abstract class Extension {
|
|
2776
2843
|
#private;
|
|
2777
2844
|
|
|
2845
|
+
/**
|
|
2846
|
+
* Whether the extension is enabled.
|
|
2847
|
+
*
|
|
2848
|
+
* @public
|
|
2849
|
+
*/
|
|
2850
|
+
get enabled(): boolean;
|
|
2851
|
+
/**
|
|
2852
|
+
* The path in the file system where the extension is located.
|
|
2853
|
+
*
|
|
2854
|
+
* @public
|
|
2855
|
+
*/
|
|
2856
|
+
get path(): string;
|
|
2778
2857
|
/**
|
|
2779
2858
|
* The version of the extension as specified in its manifest.
|
|
2780
2859
|
*
|
|
@@ -8256,6 +8335,7 @@ declare namespace Puppeteer_2 {
|
|
|
8256
8335
|
DeviceRequestPrompt,
|
|
8257
8336
|
Dialog,
|
|
8258
8337
|
ElementHandle,
|
|
8338
|
+
AutofillAddressField,
|
|
8259
8339
|
Extension,
|
|
8260
8340
|
Frame,
|
|
8261
8341
|
DEFAULT_INTERCEPT_RESOLUTION_PRIORITY,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "puppeteer-core",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.42.0",
|
|
4
4
|
"description": "A high-level API to control headless Chrome over the DevTools Protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"puppeteer",
|
|
@@ -163,6 +163,7 @@
|
|
|
163
163
|
"@types/ws": "8.18.1",
|
|
164
164
|
"mitt": "3.0.1",
|
|
165
165
|
"parsel-js": "1.2.2",
|
|
166
|
-
"rxjs": "7.8.2"
|
|
166
|
+
"rxjs": "7.8.2",
|
|
167
|
+
"urlpattern-polyfill": "10.1.0"
|
|
167
168
|
}
|
|
168
169
|
}
|
|
@@ -1629,21 +1629,63 @@ export abstract class ElementHandle<
|
|
|
1629
1629
|
}
|
|
1630
1630
|
|
|
1631
1631
|
/**
|
|
1632
|
+
* Supported autofill address field names.
|
|
1633
|
+
*
|
|
1632
1634
|
* @public
|
|
1633
1635
|
*/
|
|
1634
|
-
export
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1636
|
+
export const enum AutofillAddressField {
|
|
1637
|
+
NameFirst = 'NAME_FIRST',
|
|
1638
|
+
NameMiddle = 'NAME_MIDDLE',
|
|
1639
|
+
NameLast = 'NAME_LAST',
|
|
1640
|
+
NameFull = 'NAME_FULL',
|
|
1641
|
+
EmailAddress = 'EMAIL_ADDRESS',
|
|
1642
|
+
PhoneHomeNumber = 'PHONE_HOME_NUMBER',
|
|
1643
|
+
PhoneHomeCityAndNumber = 'PHONE_HOME_CITY_AND_NUMBER',
|
|
1644
|
+
PhoneHomeWholeNumber = 'PHONE_HOME_WHOLE_NUMBER',
|
|
1645
|
+
AddressHomeLine1 = 'ADDRESS_HOME_LINE1',
|
|
1646
|
+
AddressHomeLine2 = 'ADDRESS_HOME_LINE2',
|
|
1647
|
+
AddressHomeStreetAddress = 'ADDRESS_HOME_STREET_ADDRESS',
|
|
1648
|
+
AddressHomeCity = 'ADDRESS_HOME_CITY',
|
|
1649
|
+
AddressHomeState = 'ADDRESS_HOME_STATE',
|
|
1650
|
+
AddressHomeZip = 'ADDRESS_HOME_ZIP',
|
|
1651
|
+
AddressHomeCountry = 'ADDRESS_HOME_COUNTRY',
|
|
1645
1652
|
}
|
|
1646
1653
|
|
|
1654
|
+
/**
|
|
1655
|
+
* @public
|
|
1656
|
+
*/
|
|
1657
|
+
export type AutofillData =
|
|
1658
|
+
| {
|
|
1659
|
+
/**
|
|
1660
|
+
* See {@link https://chromedevtools.github.io/devtools-protocol/tot/Autofill/#type-CreditCard | Autofill.CreditCard}.
|
|
1661
|
+
*/
|
|
1662
|
+
creditCard: {
|
|
1663
|
+
number: string;
|
|
1664
|
+
name: string;
|
|
1665
|
+
expiryMonth: string;
|
|
1666
|
+
expiryYear: string;
|
|
1667
|
+
cvc: string;
|
|
1668
|
+
};
|
|
1669
|
+
address?: never;
|
|
1670
|
+
}
|
|
1671
|
+
| {
|
|
1672
|
+
/**
|
|
1673
|
+
* See {@link https://chromedevtools.github.io/devtools-protocol/tot/Autofill/#type-Address | Autofill.Address}.
|
|
1674
|
+
*/
|
|
1675
|
+
address: {
|
|
1676
|
+
fields: Array<{
|
|
1677
|
+
/**
|
|
1678
|
+
* The field type.
|
|
1679
|
+
* See {@link https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/field_types.cc}
|
|
1680
|
+
* for the full list of supported fields.
|
|
1681
|
+
*/
|
|
1682
|
+
name: AutofillAddressField | (string & Record<never, never>);
|
|
1683
|
+
value: string;
|
|
1684
|
+
}>;
|
|
1685
|
+
};
|
|
1686
|
+
creditCard?: never;
|
|
1687
|
+
};
|
|
1688
|
+
|
|
1647
1689
|
function intersectBoundingBox(
|
|
1648
1690
|
box: BoundingBox,
|
|
1649
1691
|
width: number,
|
|
@@ -29,11 +29,19 @@ export abstract class Extension {
|
|
|
29
29
|
#id: string;
|
|
30
30
|
#version: string;
|
|
31
31
|
#name: string;
|
|
32
|
+
#path: string;
|
|
33
|
+
#enabled: boolean;
|
|
32
34
|
|
|
33
35
|
/**
|
|
34
36
|
* @internal
|
|
35
37
|
*/
|
|
36
|
-
constructor(
|
|
38
|
+
constructor(
|
|
39
|
+
id: string,
|
|
40
|
+
version: string,
|
|
41
|
+
name: string,
|
|
42
|
+
path: string,
|
|
43
|
+
enabled: boolean,
|
|
44
|
+
) {
|
|
37
45
|
if (!id || !version) {
|
|
38
46
|
throw new Error('Extension ID and version are required');
|
|
39
47
|
}
|
|
@@ -41,6 +49,26 @@ export abstract class Extension {
|
|
|
41
49
|
this.#id = id;
|
|
42
50
|
this.#version = version;
|
|
43
51
|
this.#name = name;
|
|
52
|
+
this.#path = path;
|
|
53
|
+
this.#enabled = enabled;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Whether the extension is enabled.
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
get enabled(): boolean {
|
|
62
|
+
return this.#enabled;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The path in the file system where the extension is located.
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
get path(): string {
|
|
71
|
+
return this.#path;
|
|
44
72
|
}
|
|
45
73
|
|
|
46
74
|
/**
|
|
@@ -71,6 +71,7 @@ export class CdpBrowser extends BrowserBase {
|
|
|
71
71
|
networkEnabled = true,
|
|
72
72
|
issuesEnabled = true,
|
|
73
73
|
handleDevToolsAsPage = false,
|
|
74
|
+
blockList?: string[],
|
|
74
75
|
): Promise<CdpBrowser> {
|
|
75
76
|
const browser = new CdpBrowser(
|
|
76
77
|
connection,
|
|
@@ -84,6 +85,7 @@ export class CdpBrowser extends BrowserBase {
|
|
|
84
85
|
networkEnabled,
|
|
85
86
|
issuesEnabled,
|
|
86
87
|
handleDevToolsAsPage,
|
|
88
|
+
blockList,
|
|
87
89
|
);
|
|
88
90
|
if (acceptInsecureCerts) {
|
|
89
91
|
await connection.send('Security.setIgnoreCertificateErrors', {
|
|
@@ -119,6 +121,7 @@ export class CdpBrowser extends BrowserBase {
|
|
|
119
121
|
networkEnabled = true,
|
|
120
122
|
issuesEnabled = true,
|
|
121
123
|
handleDevToolsAsPage = false,
|
|
124
|
+
networkConditions?: string[],
|
|
122
125
|
) {
|
|
123
126
|
super();
|
|
124
127
|
this.#networkEnabled = networkEnabled;
|
|
@@ -139,6 +142,7 @@ export class CdpBrowser extends BrowserBase {
|
|
|
139
142
|
this.#createTarget,
|
|
140
143
|
this.#targetFilterCallback,
|
|
141
144
|
waitForInitiallyDiscoveredTargets,
|
|
145
|
+
networkConditions,
|
|
142
146
|
);
|
|
143
147
|
this.#defaultContext = new CdpBrowserContext(this.#connection, this);
|
|
144
148
|
for (const contextId of contextIds) {
|
|
@@ -604,6 +608,8 @@ export class CdpBrowser extends BrowserBase {
|
|
|
604
608
|
currExtension.id,
|
|
605
609
|
currExtension.version,
|
|
606
610
|
currExtension.name,
|
|
611
|
+
currExtension.path,
|
|
612
|
+
currExtension.enabled,
|
|
607
613
|
this,
|
|
608
614
|
);
|
|
609
615
|
|
|
@@ -35,6 +35,7 @@ export async function _connectToCdpBrowser(
|
|
|
35
35
|
protocolTimeout,
|
|
36
36
|
handleDevToolsAsPage,
|
|
37
37
|
idGenerator = createIncrementalIdGenerator(),
|
|
38
|
+
blockList,
|
|
38
39
|
} = options;
|
|
39
40
|
|
|
40
41
|
const connection = new Connection(
|
|
@@ -65,6 +66,7 @@ export async function _connectToCdpBrowser(
|
|
|
65
66
|
networkEnabled,
|
|
66
67
|
issuesEnabled,
|
|
67
68
|
handleDevToolsAsPage,
|
|
69
|
+
blockList,
|
|
68
70
|
);
|
|
69
71
|
return browser;
|
|
70
72
|
}
|
|
@@ -18,8 +18,15 @@ export class CdpExtension extends Extension {
|
|
|
18
18
|
/*
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
constructor(
|
|
22
|
-
|
|
21
|
+
constructor(
|
|
22
|
+
id: string,
|
|
23
|
+
version: string,
|
|
24
|
+
name: string,
|
|
25
|
+
path: string,
|
|
26
|
+
enabled: boolean,
|
|
27
|
+
browser: CdpBrowser,
|
|
28
|
+
) {
|
|
29
|
+
super(id, version, name, path, enabled);
|
|
23
30
|
this.#browser = browser;
|
|
24
31
|
}
|
|
25
32
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import type {Protocol} from 'devtools-protocol';
|
|
8
8
|
|
|
9
|
+
import {URLPattern} from '../../third_party/urlpattern-polyfill/urlpattern-polyfill.js';
|
|
9
10
|
import type {TargetFilterCallback} from '../api/Browser.js';
|
|
10
11
|
import type {CDPSession} from '../api/CDPSession.js';
|
|
11
12
|
import {CDPSessionEvent} from '../api/CDPSession.js';
|
|
@@ -106,18 +107,21 @@ export class TargetManager
|
|
|
106
107
|
// done. It indicates whethere we are running the initial auto-attach step or
|
|
107
108
|
// if we are handling targets after that.
|
|
108
109
|
#initialAttachDone = false;
|
|
110
|
+
#blockList?: string[];
|
|
109
111
|
|
|
110
112
|
constructor(
|
|
111
113
|
connection: Connection,
|
|
112
114
|
targetFactory: TargetFactory,
|
|
113
115
|
targetFilterCallback?: TargetFilterCallback,
|
|
114
116
|
waitForInitiallyDiscoveredTargets = true,
|
|
117
|
+
networkConditions?: string[],
|
|
115
118
|
) {
|
|
116
119
|
super();
|
|
117
120
|
this.#connection = connection;
|
|
118
121
|
this.#targetFilterCallback = targetFilterCallback;
|
|
119
122
|
this.#targetFactory = targetFactory;
|
|
120
123
|
this.#waitForInitiallyDiscoveredTargets = waitForInitiallyDiscoveredTargets;
|
|
124
|
+
this.#blockList = networkConditions;
|
|
121
125
|
|
|
122
126
|
this.#connection.on('Target.targetCreated', this.#onTargetCreated);
|
|
123
127
|
this.#connection.on('Target.targetDestroyed', this.#onTargetDestroyed);
|
|
@@ -333,6 +337,13 @@ export class TargetManager
|
|
|
333
337
|
return;
|
|
334
338
|
}
|
|
335
339
|
|
|
340
|
+
// If we connect to a browser that is already open,
|
|
341
|
+
// immediately detach from any tab that is on the blocklist.
|
|
342
|
+
if (!this.#initialAttachDone && !this.#isUrlAllowed(targetInfo.url)) {
|
|
343
|
+
await this.#silentDetach(session, parentSession);
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
|
|
336
347
|
// Special case for service workers: being attached to service workers will
|
|
337
348
|
// prevent them from ever being destroyed. Therefore, we silently detach
|
|
338
349
|
// from service workers unless the connection was manually created via
|
|
@@ -417,6 +428,7 @@ export class TargetManager
|
|
|
417
428
|
autoAttach: true,
|
|
418
429
|
filter: this.#discoveryFilter,
|
|
419
430
|
}),
|
|
431
|
+
this.#maybeSetupNetworkConditions(session),
|
|
420
432
|
session.send('Runtime.runIfWaitingForDebugger'),
|
|
421
433
|
]).catch(debugError);
|
|
422
434
|
};
|
|
@@ -452,4 +464,51 @@ export class TargetManager
|
|
|
452
464
|
this.#attachedTargetsByTargetId.delete(target._targetId);
|
|
453
465
|
this.emit(TargetManagerEvent.TargetGone, target);
|
|
454
466
|
};
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Helper to validate URL against blocklist patterns
|
|
470
|
+
*/
|
|
471
|
+
#isUrlAllowed = (url: string): boolean => {
|
|
472
|
+
if (!this.#blockList) {
|
|
473
|
+
return true;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
// Always allow internal or setup pages
|
|
477
|
+
if (!url || url === 'about:blank') {
|
|
478
|
+
return true;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
for (const rule of this.#blockList) {
|
|
482
|
+
try {
|
|
483
|
+
const pattern = new URLPattern(rule);
|
|
484
|
+
if (pattern.test(url)) {
|
|
485
|
+
return false; // return false as url matches pattern from blockList
|
|
486
|
+
}
|
|
487
|
+
} catch {
|
|
488
|
+
debugError(`Invalid URL pattern: ${rule}`);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
return true;
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
#maybeSetupNetworkConditions = async (session: CDPSession): Promise<void> => {
|
|
496
|
+
if (!this.#blockList?.length) {
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
const matchedNetworkConditions = this.#blockList.map(pattern => {
|
|
501
|
+
return {
|
|
502
|
+
urlPattern: pattern,
|
|
503
|
+
latency: 0,
|
|
504
|
+
downloadThroughput: -1,
|
|
505
|
+
uploadThroughput: -1,
|
|
506
|
+
};
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
await session.send('Network.emulateNetworkConditionsByRule', {
|
|
510
|
+
matchedNetworkConditions,
|
|
511
|
+
offline: true,
|
|
512
|
+
});
|
|
513
|
+
};
|
|
455
514
|
}
|
|
@@ -55,8 +55,13 @@ interface ProtocolWebMCPToolsAddedEvent {
|
|
|
55
55
|
tools: ProtocolWebMCPTool[];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
interface ProtocolWebMCPRemovedTool {
|
|
59
|
+
name: string;
|
|
60
|
+
frameId: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
58
63
|
interface ProtocolWebMCPToolsRemovedEvent {
|
|
59
|
-
tools:
|
|
64
|
+
tools: ProtocolWebMCPRemovedTool[];
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
interface ProtocolWebMCPToolInvokedEvent {
|
|
@@ -161,4 +161,30 @@ export interface ConnectOptions {
|
|
|
161
161
|
* Only works for `protocol="webDriverBiDi"` and {@link Puppeteer.connect}.
|
|
162
162
|
*/
|
|
163
163
|
capabilities?: SupportedWebDriverCapabilities;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* A list of URL patterns to block.
|
|
167
|
+
*
|
|
168
|
+
* This option allows you to restrict the browser from accessing specific
|
|
169
|
+
* URLs or origins. It uses the standard [URLPattern](https://urlpattern.spec.whatwg.org/) API to match URLs.
|
|
170
|
+
*
|
|
171
|
+
* When connecting to an existing browser, Puppeteer will silently detach from any
|
|
172
|
+
* already open targets that violate the patterns.
|
|
173
|
+
*
|
|
174
|
+
* For any network requests made by the browser (including navigations and
|
|
175
|
+
* subresources like images or scripts), the request will fail with an error
|
|
176
|
+
* if the URL matches a blocked pattern.
|
|
177
|
+
*
|
|
178
|
+
* @example Pattern to block a specific domain:
|
|
179
|
+
* `*://example.com/*`
|
|
180
|
+
*
|
|
181
|
+
* @example Pattern to block all subdomains:
|
|
182
|
+
* `*://*.evil.com/*`
|
|
183
|
+
*
|
|
184
|
+
* @remarks
|
|
185
|
+
* Currently only supported for CDP connections.
|
|
186
|
+
*
|
|
187
|
+
* @experimental
|
|
188
|
+
*/
|
|
189
|
+
blockList?: string[];
|
|
164
190
|
}
|
|
@@ -94,6 +94,7 @@ export abstract class BrowserLauncher {
|
|
|
94
94
|
protocolTimeout,
|
|
95
95
|
handleDevToolsAsPage,
|
|
96
96
|
idGenerator = createIncrementalIdGenerator(),
|
|
97
|
+
blockList,
|
|
97
98
|
} = options;
|
|
98
99
|
|
|
99
100
|
let {protocol} = options;
|
|
@@ -220,6 +221,7 @@ export abstract class BrowserLauncher {
|
|
|
220
221
|
networkEnabled,
|
|
221
222
|
issuesEnabled,
|
|
222
223
|
handleDevToolsAsPage,
|
|
224
|
+
blockList,
|
|
223
225
|
);
|
|
224
226
|
}
|
|
225
227
|
}
|
|
@@ -177,7 +177,6 @@ export class ChromeLauncher extends BrowserLauncher {
|
|
|
177
177
|
'AcceptCHFrame',
|
|
178
178
|
'MediaRouter',
|
|
179
179
|
'OptimizationHints',
|
|
180
|
-
'PartitionAllocSchedulerLoopQuarantineTaskControlledPurge', // https://crbug.com/489314676
|
|
181
180
|
...(turnOnExperimentalFeaturesForTesting
|
|
182
181
|
? []
|
|
183
182
|
: [
|
|
@@ -182,6 +182,7 @@
|
|
|
182
182
|
"package/lib/esm/puppeteer/util/version.js",
|
|
183
183
|
"package/lib/esm/third_party/mitt/mitt.js",
|
|
184
184
|
"package/lib/esm/third_party/parsel-js/parsel-js.js",
|
|
185
|
-
"package/lib/esm/third_party/rxjs/rxjs.js"
|
|
185
|
+
"package/lib/esm/third_party/rxjs/rxjs.js",
|
|
186
|
+
"package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.js"
|
|
186
187
|
]
|
|
187
188
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Name: Web Vitals
|
|
2
2
|
Short Name: Web Vitals
|
|
3
3
|
URL: https://github.com/GoogleChrome/web-vitals
|
|
4
|
-
Version: 5.
|
|
4
|
+
Version: 5.2.0
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
License File: package/LICENSE
|
|
7
|
-
Revision:
|
|
7
|
+
Revision: 331486c02721e1d37835177ffc89589a580ba57e
|
|
8
8
|
Update Mechanism: Manual
|
|
9
9
|
Security Critical: no
|
|
10
10
|
Shipped: yes
|