chrome-devtools-frontend 1.0.1690116 → 1.0.1695017
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/.agents/skills/devtools-model-management/SKILL.md +3 -3
- package/.agents/skills/foundation-test-migration/SKILL.md +2 -2
- package/.agents/skills/merging-devtools-module/SKILL.md +5 -5
- package/AUTHORS +3 -0
- package/config/typescript/tsconfig.base.json +1 -0
- package/docs/get_the_code.md +4 -9
- package/front_end/Images/src/comment-mode-cursor.svg +23 -0
- package/front_end/Tests.js +1 -1
- package/front_end/application_tokens.css +5 -0
- package/front_end/core/common/ColorConverter.ts +3 -3
- package/front_end/core/host/UserMetrics.ts +27 -0
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +0 -46
- package/front_end/core/protocol_client/InspectorBackend.ts +6 -6
- package/front_end/core/root/Runtime.ts +1 -0
- package/front_end/core/sdk/CSSLocation.ts +32 -0
- package/front_end/core/sdk/CSSModel.ts +2 -22
- package/front_end/core/sdk/CSSQuery.ts +2 -1
- package/front_end/core/sdk/CSSRule.ts +29 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -1
- package/front_end/core/sdk/NetworkManager.ts +2 -0
- package/front_end/core/sdk/NetworkRequest.ts +63 -4
- package/front_end/core/sdk/NetworkRequestAccess.ts +191 -0
- package/front_end/core/sdk/ResourceTreeModel.ts +72 -23
- package/front_end/core/sdk/SecurityOrigin.ts +97 -12
- package/front_end/core/sdk/Target.ts +18 -0
- package/front_end/core/sdk/sdk.ts +4 -0
- package/front_end/entrypoints/main/MainImpl.ts +8 -1
- package/front_end/foundation/Universe.ts +14 -11
- package/front_end/generated/Deprecation.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +9 -8
- package/front_end/generated/SupportedCSSProperties.ts +14 -4
- package/front_end/generated/protocol.ts +24 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +46 -10
- package/front_end/models/ai_assistance/AiConversation.ts +35 -24
- package/front_end/models/ai_assistance/README.md +5 -3
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +1 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +28 -34
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +13 -17
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +5 -3
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +16 -10
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -4
- package/front_end/models/ai_assistance/ai_assistance.ts +0 -2
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +11 -2
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +17 -5
- package/front_end/models/ai_assistance/contexts/FileContext.ts +13 -6
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +52 -25
- package/front_end/models/ai_assistance/contexts/RequestContext.ts +18 -34
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +14 -3
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +2 -5
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +135 -58
- package/front_end/models/ai_assistance/tools/CookieUtils.ts +25 -35
- package/front_end/models/ai_assistance/tools/DOMStorageUtils.ts +6 -3
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +9 -2
- package/front_end/models/ai_assistance/tools/GetCookieValues.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +3 -2
- package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +3 -5
- package/front_end/models/ai_assistance/tools/GetInsightDetails.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +8 -11
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +2 -4
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +6 -13
- package/front_end/models/ai_assistance/tools/GetStorageBreakdown.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +9 -9
- package/front_end/models/ai_assistance/tools/GetStyles.ts +3 -2
- package/front_end/models/ai_assistance/tools/ListCookies.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +6 -14
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +10 -15
- package/front_end/models/ai_assistance/tools/ListSources.ts +5 -7
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +9 -9
- package/front_end/models/ai_assistance/tools/README.md +4 -2
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +3 -2
- package/front_end/models/ai_assistance/tools/Tool.ts +27 -3
- package/front_end/models/comment_manager/CD4ABridge.ts +128 -0
- package/front_end/models/comment_manager/CommentManager.ts +50 -8
- package/front_end/models/comment_manager/comment_manager.ts +2 -0
- package/front_end/models/emulation/DeviceModeModel.ts +37 -47
- package/front_end/models/javascript_metadata/NativeFunctions.ts +9 -1
- package/front_end/models/live-metrics/web-vitals-injected/README.md +1 -1
- package/front_end/models/source_map_scopes/NamesResolver.ts +9 -7
- package/front_end/models/trace/ModelImpl.ts +2 -0
- package/front_end/models/trace/Processor.ts +6 -4
- package/front_end/models/trace/handlers/LayerTreeHandler.ts +3 -3
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +1 -1
- package/front_end/models/trace/helpers/SyntheticEvents.ts +23 -1
- package/front_end/models/trace/types/Configuration.ts +7 -0
- package/front_end/models/trace/types/TraceEvents.ts +20 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -0
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingListView.ts +177 -0
- package/front_end/panels/accessibility/accessibility.ts +2 -0
- package/front_end/panels/accessibility/accessibilityAnnouncementRecordingListView.css +33 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -15
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +6 -35
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +4 -3
- package/front_end/panels/ai_assistance/components/chatMessage.css +3 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -0
- package/front_end/panels/application/CrashReportContextView.ts +0 -1
- package/front_end/panels/application/FrameDetailsView.ts +5 -4
- package/front_end/panels/application/IndexedDBViews.ts +4 -4
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +2 -1
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +1 -1
- package/front_end/panels/application/indexedDBViews.css +0 -14
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/common/CPUThrottlingOption.ts +12 -6
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/ExtensionView.ts +2 -1
- package/front_end/panels/console/ConsoleContextSelector.ts +12 -5
- package/front_end/panels/console/ConsolePinPane.ts +4 -2
- package/front_end/panels/console/ConsoleSidebar.ts +6 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +12 -8
- package/front_end/panels/console/PromptBuilder.ts +1 -1
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/coverage/CoverageModel.ts +6 -4
- package/front_end/panels/coverage/coverageView.css +8 -8
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +13 -14
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +3 -3
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
- package/front_end/panels/developer_resources/developerResourcesView.css +3 -3
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +43 -15
- package/front_end/panels/elements/ElementsTreeOutline.ts +185 -109
- package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
- package/front_end/panels/elements/PropertyNameCategories.ts +1 -1
- package/front_end/panels/elements/ShortcutTreeElement.ts +6 -1
- package/front_end/panels/elements/StandaloneStylesContainer.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +2 -35
- package/front_end/panels/elements/StylesSidebarPane.ts +3 -2
- package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +5 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +161 -148
- package/front_end/panels/elements/components/computedStyleProperty.css +5 -5
- package/front_end/panels/elements/components/computedStyleTrace.css +5 -5
- package/front_end/panels/elements/components/cssHintDetailsView.css +1 -1
- package/front_end/panels/elements/components/cssPropertyDocsView.css +3 -3
- package/front_end/panels/elements/components/cssVariableValueView.css +4 -4
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +3 -3
- package/front_end/panels/elements/components/elementsTreeExpandButton.css +5 -5
- package/front_end/panels/elements/components/queryContainer.css +2 -2
- package/front_end/panels/elements/elementsTreeOutline.css +20 -4
- package/front_end/panels/emulation/MediaQueryInspector.ts +2 -1
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/issues/AffectedElementsView.ts +3 -0
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +1 -1
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +12 -10
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -0
- package/front_end/panels/layer_viewer/Layers3DView.ts +13 -11
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspectorUtils.ts +2 -2
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +11 -11
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryNavigator.css +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +5 -5
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +2 -2
- package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
- package/front_end/panels/media/TickingFlameChart.ts +3 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +2 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +2 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +11 -9
- package/front_end/panels/network/NetworkLogView.ts +4 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +5 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +47 -11
- package/front_end/panels/network/RequestPayloadView.ts +1 -1
- package/front_end/panels/network/RequestResponseView.ts +1 -1
- package/front_end/panels/network/RequestTimingView.ts +1 -1
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +1 -1
- package/front_end/panels/network/components/RequestHeadersView.css +12 -0
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -3
- package/front_end/panels/recorder/RecordingListView.ts +0 -6
- package/front_end/panels/recorder/RecordingView.ts +0 -6
- package/front_end/panels/recorder/controlButton.css +10 -10
- package/front_end/panels/recorder/startView.css +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +4 -2
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/SecurityPanel.ts +46 -35
- package/front_end/panels/sources/BreakpointEditDialog.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -6
- package/front_end/panels/sources/ProfilePlugin.ts +2 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/timeline/IsolateSelector.ts +1 -1
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/NetworkTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -32
- package/front_end/panels/timeline/TimelineHistoryManager.ts +1 -1
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +7 -3
- package/front_end/panels/timeline/TimelinePanel.ts +3 -20
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +4 -4
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +25 -24
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +4 -3
- package/front_end/panels/timeline/components/Sidebar.ts +1 -1
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -3
- package/front_end/panels/timeline/components/cwvMetrics.css +2 -2
- package/front_end/panels/timeline/components/insights/checklist.css +1 -1
- package/front_end/panels/timeline/components/insights/table.css +3 -3
- package/front_end/panels/timeline/overlays/components/entriesLinkOverlay.css +4 -4
- package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +4 -4
- package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +2 -2
- package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +4 -4
- package/front_end/panels/timeline/timelinePanel.css +0 -74
- package/front_end/panels/timeline/utils/Helpers.ts +1 -1
- package/front_end/panels/timeline/utils/ImageCache.ts +5 -3
- package/front_end/panels/web_audio/WebAudioView.ts +3 -3
- package/front_end/panels/web_audio/webAudio.css +5 -5
- package/front_end/panels/webauthn/WebauthnPane.ts +5 -11
- package/front_end/third_party/acorn/acorn.ts +3 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/chromium/ahem/ahem.d.ts +1 -0
- package/front_end/third_party/csp_evaluator/package/csp.ts +4 -4
- package/front_end/third_party/csp_evaluator/package/parser.ts +3 -1
- package/front_end/third_party/csp_evaluator/package/tsconfig.json +1 -0
- package/front_end/third_party/csp_evaluator/package/utils.ts +1 -1
- package/front_end/third_party/diff/DiffWrapper.ts +1 -8
- package/front_end/third_party/diff/diff_match_patch.d.ts +10 -0
- package/front_end/third_party/json5/json5.ts +2 -2
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +183 -4
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +708 -122
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +85 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +84 -11
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts +75 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js +102 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts +31 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js +138 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js +23 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts +31 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js +131 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +7 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +42 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js +265 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +24 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts +23 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +49 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +183 -4
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +143 -11
- package/front_end/third_party/puppeteer/package/src/api/ScreenRecording.ts +145 -0
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/bidi/ScreenRecording.ts +106 -0
- package/front_end/third_party/puppeteer/package/src/bidi/bidi.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +41 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ScreenRecording.ts +101 -0
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +17 -9
- package/front_end/third_party/puppeteer/package/src/common/BrowserWebSocketTransport.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +46 -0
- package/front_end/third_party/puppeteer/package/src/common/Device.ts +287 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +30 -1
- package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +73 -2
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +3 -0
- package/front_end/tsconfig.json +1 -2
- package/front_end/ui/comments/CommentAnchorResolver.ts +8 -3
- package/front_end/ui/comments/CommentOverlayManager.ts +53 -12
- package/front_end/ui/comments/CommentsOverlayWidget.ts +3 -3
- package/front_end/ui/comments/CommentsStatusBarPill.ts +96 -0
- package/front_end/ui/comments/comments-meta.ts +21 -0
- package/front_end/ui/comments/comments.ts +2 -0
- package/front_end/ui/comments/commentsOverlay.css +22 -3
- package/front_end/ui/components/buttons/floatingButton.css +25 -0
- package/front_end/ui/components/markdown_view/MarkdownView.ts +31 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +45 -25
- package/front_end/ui/kit/icons/Icon.ts +0 -1
- package/front_end/ui/kit/link/Link.ts +8 -1
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/DropTarget.ts +6 -1
- package/front_end/ui/legacy/EmptyWidget.ts +1 -1
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +17 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +2 -2
- package/front_end/ui/legacy/SplitWidget.ts +18 -3
- package/front_end/ui/legacy/StackedPane.ts +1 -1
- package/front_end/ui/legacy/StatusBar.ts +78 -0
- package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -1
- package/front_end/ui/legacy/TextPrompt.ts +2 -1
- package/front_end/ui/legacy/Toolbar.ts +5 -1
- package/front_end/ui/legacy/Treeoutline.ts +91 -48
- package/front_end/ui/legacy/UIUtils.ts +8 -4
- package/front_end/ui/legacy/ViewManager.ts +1 -1
- package/front_end/ui/legacy/ViewRegistration.ts +1 -0
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +7 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -2
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +23 -23
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +48 -44
- package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.docs.ts +83 -0
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +600 -0
- package/front_end/ui/legacy/components/inline_editor/animationNameSwatch.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/colorMixSwatch.css +4 -4
- package/front_end/ui/legacy/components/inline_editor/cssAngleSwatch.css +3 -3
- package/front_end/ui/legacy/components/inline_editor/inline_editor.ts +2 -0
- package/front_end/ui/legacy/components/inline_editor/linkSwatch.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/positionAreaEditor.css +154 -0
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +224 -127
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +10 -7
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +25 -106
- package/front_end/ui/legacy/components/object_ui/customPreviewComponent.css +7 -3
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -66
- package/front_end/ui/legacy/components/perf_ui/perf_ui.ts +0 -2
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +7 -5
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +8 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +1 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -5
- package/front_end/ui/legacy/inspectorCommon.css +41 -6
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/legacy/statusBar.css +18 -0
- package/front_end/ui/visual_logging/Debugging.ts +2 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -1
- package/front_end/ui/visual_logging/LoggingDriver.ts +3 -3
- package/front_end/ui/visual_logging/LoggingEvents.ts +5 -5
- package/front_end/ui/visual_logging/LoggingState.ts +1 -1
- package/front_end/ui/visual_logging/visual_logging.ts +67 -56
- package/inspector_overlay/main.ts +8 -8
- package/mcp/mcp.ts +5 -0
- package/package.json +2 -8
- package/front_end/Images/generate-css-vars.js +0 -52
- package/front_end/Images/rollup.config.mjs +0 -36
- package/front_end/models/ai_assistance/AiOrigins.ts +0 -107
- package/front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs +0 -20
- package/front_end/panels/recorder/injected/rollup.config.mjs +0 -20
- package/front_end/panels/timeline/EasterEgg.d.ts +0 -6
- package/front_end/panels/timeline/easter-egg-tsconfig.json +0 -8
- package/front_end/panels/timeline/enable-easter-egg.js +0 -20
- package/front_end/third_party/acorn/acorn-tsconfig.json +0 -12
- package/front_end/third_party/acorn/estree-tsconfig.json +0 -8
- package/front_end/third_party/chromium/client-variations/client-variations-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-legacy-types-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +0 -15
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
- package/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
- package/front_end/third_party/json5/json5-tsconfig.json +0 -8
- package/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
- package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +0 -11
- package/front_end/third_party/lighthouse/report/bundle-tsconfig.json +0 -8
- package/front_end/third_party/lit/lit-tsconfig.json +0 -15
- package/front_end/third_party/marked/marked-tsconfig.json +0 -8
- package/front_end/third_party/puppeteer-replay/puppeteer-replay-tsconfig.json +0 -8
- package/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
- package/front_end/third_party/wasmparser/wasmparser-tsconfig.json +0 -9
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -47
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +0 -606
- package/inspector_overlay/loadCSS.rollup.js +0 -29
|
@@ -28,11 +28,11 @@ const noOpThrottler = {
|
|
|
28
28
|
} as unknown as Common.Throttler.Throttler;
|
|
29
29
|
|
|
30
30
|
let processingThrottler = noOpThrottler;
|
|
31
|
-
export let keyboardLogThrottler = noOpThrottler;
|
|
31
|
+
export let keyboardLogThrottler: Common.Throttler.Throttler = noOpThrottler;
|
|
32
32
|
let hoverLogThrottler = noOpThrottler;
|
|
33
33
|
let dragLogThrottler = noOpThrottler;
|
|
34
|
-
export let clickLogThrottler = noOpThrottler;
|
|
35
|
-
export let resizeLogThrottler = noOpThrottler;
|
|
34
|
+
export let clickLogThrottler: Common.Throttler.Throttler = noOpThrottler;
|
|
35
|
+
export let resizeLogThrottler: Common.Throttler.Throttler = noOpThrottler;
|
|
36
36
|
|
|
37
37
|
const mutationObserver = new MutationObserver(scheduleProcessing);
|
|
38
38
|
const resizeObserver = new ResizeObserver(onResizeOrIntersection);
|
|
@@ -49,8 +49,8 @@ export const logResize = (loggable: Loggable, size: DOMRect): void => {
|
|
|
49
49
|
processEventForDebugging('Resize', loggingState, {width: Math.round(size.width), height: Math.round(size.height)});
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
export const logClick = (throttler: Common.Throttler.Throttler) => (
|
|
53
|
-
|
|
52
|
+
export const logClick = (throttler: Common.Throttler.Throttler) => (loggable: Loggable, event: Event,
|
|
53
|
+
options?: {doubleClick?: boolean}): void => {
|
|
54
54
|
const loggingState = getLoggingState(loggable);
|
|
55
55
|
if (!loggingState) {
|
|
56
56
|
return;
|
|
@@ -67,7 +67,7 @@ export const logClick = (throttler: Common.Throttler.Throttler) => (
|
|
|
67
67
|
}, Common.Throttler.Scheduling.DELAYED);
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
export const logHover = (throttler: Common.Throttler.Throttler) => async
|
|
70
|
+
export const logHover = (throttler: Common.Throttler.Throttler) => async(event: Event): Promise<void> => {
|
|
71
71
|
const loggingState = getLoggingState(event.currentTarget as Element);
|
|
72
72
|
assertNotNullOrUndefined(loggingState);
|
|
73
73
|
const hoverEvent: Host.InspectorFrontendHostAPI.HoverEvent = {veid: loggingState.veid};
|
|
@@ -77,7 +77,7 @@ export const logHover = (throttler: Common.Throttler.Throttler) => async (event:
|
|
|
77
77
|
}, Common.Throttler.Scheduling.DELAYED);
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
export const logDrag = (throttler: Common.Throttler.Throttler) => async
|
|
80
|
+
export const logDrag = (throttler: Common.Throttler.Throttler) => async(event: Event): Promise<void> => {
|
|
81
81
|
const loggingState = getLoggingState(event.currentTarget as Element);
|
|
82
82
|
assertNotNullOrUndefined(loggingState);
|
|
83
83
|
const dragEvent: Host.InspectorFrontendHostAPI.DragEvent = {veid: loggingState.veid};
|
|
@@ -102,7 +102,7 @@ export async function logChange(loggable: Loggable): Promise<void> {
|
|
|
102
102
|
let pendingKeyDownContext: string|null = null;
|
|
103
103
|
|
|
104
104
|
export const logKeyDown = (throttler: Common.Throttler.Throttler) =>
|
|
105
|
-
async
|
|
105
|
+
async(loggable: Loggable|null, event: Event|null, context?: string): Promise<void> => {
|
|
106
106
|
if (!(event instanceof KeyboardEvent)) {
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
@@ -66,7 +66,7 @@ export function registerParentProvider(name: string, provider: ParentProvider):
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/** MUST NOT BE EXPORTED */
|
|
69
|
-
const PARENT = Symbol('veParent');
|
|
69
|
+
const PARENT: unique symbol = Symbol('veParent');
|
|
70
70
|
type ElementWithParent = Element&{[PARENT]?: Element};
|
|
71
71
|
registerParentProvider('mapped', (e: ElementWithParent) => e[PARENT]);
|
|
72
72
|
|
|
@@ -56,6 +56,8 @@ export function setHighlightedVe(veKey: string|null): void {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
export type VisualElementBuilder = (context?: string) => LoggingConfig.ConfigStringBuilder;
|
|
60
|
+
|
|
59
61
|
/**
|
|
60
62
|
* Action visual elements are either buttons or menu items that trigger a given action. Use the
|
|
61
63
|
* context to differentiate between different actions, and make sure that buttons and menu items
|
|
@@ -63,70 +65,80 @@ export function setHighlightedVe(veKey: string|null): void {
|
|
|
63
65
|
*
|
|
64
66
|
* Ideally the `action`s context should match the ID of an `UI.ActionRegistration.Action`.
|
|
65
67
|
*/
|
|
66
|
-
export const action = LoggingConfig.makeConfigStringBuilder.bind(null, 'Action');
|
|
67
|
-
export const adorner = LoggingConfig.makeConfigStringBuilder.bind(null, 'Adorner');
|
|
68
|
-
export const animationClip = LoggingConfig.makeConfigStringBuilder.bind(null, 'AnimationClip');
|
|
69
|
-
export const badge = LoggingConfig.makeConfigStringBuilder.bind(null, 'Badge');
|
|
70
|
-
export const bezierCurveEditor =
|
|
71
|
-
|
|
72
|
-
export const
|
|
73
|
-
|
|
74
|
-
export const
|
|
75
|
-
|
|
76
|
-
export const
|
|
68
|
+
export const action: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Action');
|
|
69
|
+
export const adorner: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Adorner');
|
|
70
|
+
export const animationClip: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'AnimationClip');
|
|
71
|
+
export const badge: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Badge');
|
|
72
|
+
export const bezierCurveEditor: VisualElementBuilder =
|
|
73
|
+
LoggingConfig.makeConfigStringBuilder.bind(null, 'BezierCurveEditor');
|
|
74
|
+
export const bezierPresetCategory: VisualElementBuilder =
|
|
75
|
+
LoggingConfig.makeConfigStringBuilder.bind(null, 'BezierPresetCategory');
|
|
76
|
+
export const breakpointMarker: VisualElementBuilder =
|
|
77
|
+
LoggingConfig.makeConfigStringBuilder.bind(null, 'BreakpointMarker');
|
|
78
|
+
export const canvas: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Canvas');
|
|
79
|
+
export const close: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Close');
|
|
80
|
+
export const colorEyeDropper: VisualElementBuilder =
|
|
81
|
+
LoggingConfig.makeConfigStringBuilder.bind(null, 'ColorEyeDropper');
|
|
82
|
+
export const counter: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Counter');
|
|
77
83
|
/**
|
|
78
84
|
* Visual element to denote a moveable control point such as the ones exist in BezierEditor
|
|
79
85
|
* for bezier control points or keyframes in AnimationUI.
|
|
80
86
|
*/
|
|
81
|
-
export const controlPoint = LoggingConfig.makeConfigStringBuilder.bind(null, 'ControlPoint');
|
|
82
|
-
export const cssColorMix = LoggingConfig.makeConfigStringBuilder.bind(null, 'CssColorMix');
|
|
83
|
-
export const cssRuleHeader = LoggingConfig.makeConfigStringBuilder.bind(null, 'CSSRuleHeader');
|
|
84
|
-
export const deviceModeRuler =
|
|
85
|
-
|
|
86
|
-
export const
|
|
87
|
-
export const
|
|
88
|
-
export const
|
|
89
|
-
export const
|
|
90
|
-
export const
|
|
91
|
-
|
|
92
|
-
export const
|
|
93
|
-
export const
|
|
94
|
-
export const
|
|
87
|
+
export const controlPoint: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'ControlPoint');
|
|
88
|
+
export const cssColorMix: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'CssColorMix');
|
|
89
|
+
export const cssRuleHeader: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'CSSRuleHeader');
|
|
90
|
+
export const deviceModeRuler: VisualElementBuilder =
|
|
91
|
+
LoggingConfig.makeConfigStringBuilder.bind(null, 'DeviceModeRuler');
|
|
92
|
+
export const dialog: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Dialog');
|
|
93
|
+
export const domBreakpoint: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'DOMBreakpoint');
|
|
94
|
+
export const drawer: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Drawer');
|
|
95
|
+
export const dropDown: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'DropDown');
|
|
96
|
+
export const elementsBreadcrumbs: VisualElementBuilder =
|
|
97
|
+
LoggingConfig.makeConfigStringBuilder.bind(null, 'ElementsBreadcrumbs');
|
|
98
|
+
export const expand: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Expand');
|
|
99
|
+
export const filterDropdown: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'FilterDropdown');
|
|
100
|
+
export const gutter: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Gutter');
|
|
101
|
+
export const item: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Item');
|
|
102
|
+
export const key: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Key');
|
|
95
103
|
|
|
96
104
|
/**
|
|
97
105
|
* Visual element to denote a hyper link. Use the context to differentiate between various types
|
|
98
106
|
* of hyperlinks.
|
|
99
107
|
*/
|
|
100
|
-
export const link = LoggingConfig.makeConfigStringBuilder.bind(null, 'Link');
|
|
108
|
+
export const link: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Link');
|
|
101
109
|
|
|
102
|
-
export const mediaInspectorView =
|
|
103
|
-
|
|
104
|
-
export const
|
|
105
|
-
export const
|
|
106
|
-
export const
|
|
110
|
+
export const mediaInspectorView: VisualElementBuilder =
|
|
111
|
+
LoggingConfig.makeConfigStringBuilder.bind(null, 'MediaInspectorView');
|
|
112
|
+
export const menu: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Menu');
|
|
113
|
+
export const metricsBox: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'MetricsBox');
|
|
114
|
+
export const paletteColorShades: VisualElementBuilder =
|
|
115
|
+
LoggingConfig.makeConfigStringBuilder.bind(null, 'PaletteColorShades');
|
|
116
|
+
export const pane: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Pane');
|
|
107
117
|
|
|
108
118
|
/**
|
|
109
119
|
* Visual element to denote a top level panel, no matter if that panel is shown in the main
|
|
110
120
|
* view or in the drawer. Use the context to differentiate between different panels, but ensure
|
|
111
121
|
* that the context used here matches the context used for its corresponding {@link panelTabHeader}.
|
|
112
122
|
*/
|
|
113
|
-
export const panel = LoggingConfig.makeConfigStringBuilder.bind(null, 'Panel');
|
|
123
|
+
export const panel: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Panel');
|
|
114
124
|
|
|
115
|
-
export const panelTabHeader = LoggingConfig.makeConfigStringBuilder.bind(null, 'PanelTabHeader');
|
|
116
|
-
export const pieChart = LoggingConfig.makeConfigStringBuilder.bind(null, 'PieChart');
|
|
117
|
-
export const pieChartSlice = LoggingConfig.makeConfigStringBuilder.bind(null, 'PieChartSlice');
|
|
118
|
-
export const pieChartTotal = LoggingConfig.makeConfigStringBuilder.bind(null, 'PieChartTotal');
|
|
119
|
-
export const popover = LoggingConfig.makeConfigStringBuilder.bind(null, 'Popover');
|
|
120
|
-
export const preview = LoggingConfig.makeConfigStringBuilder.bind(null, 'Preview');
|
|
121
|
-
export const resizer = LoggingConfig.makeConfigStringBuilder.bind(null, 'Resizer');
|
|
122
|
-
export const responsivePresets =
|
|
123
|
-
|
|
124
|
-
export const
|
|
125
|
-
|
|
126
|
-
export const
|
|
127
|
-
export const
|
|
128
|
-
export const
|
|
129
|
-
export const
|
|
125
|
+
export const panelTabHeader: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'PanelTabHeader');
|
|
126
|
+
export const pieChart: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'PieChart');
|
|
127
|
+
export const pieChartSlice: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'PieChartSlice');
|
|
128
|
+
export const pieChartTotal: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'PieChartTotal');
|
|
129
|
+
export const popover: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Popover');
|
|
130
|
+
export const preview: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Preview');
|
|
131
|
+
export const resizer: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Resizer');
|
|
132
|
+
export const responsivePresets: VisualElementBuilder =
|
|
133
|
+
LoggingConfig.makeConfigStringBuilder.bind(null, 'ResponsivePresets');
|
|
134
|
+
export const showStyleEditor: VisualElementBuilder =
|
|
135
|
+
LoggingConfig.makeConfigStringBuilder.bind(null, 'ShowStyleEditor');
|
|
136
|
+
export const slider: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Slider');
|
|
137
|
+
export const section: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Section');
|
|
138
|
+
export const sectionHeader: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'SectionHeader');
|
|
139
|
+
export const tableRow: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'TableRow');
|
|
140
|
+
export const tableCell: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'TableCell');
|
|
141
|
+
export const tableHeader: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'TableHeader');
|
|
130
142
|
|
|
131
143
|
/**
|
|
132
144
|
* Visual element to denote text input fields. Use the context to differentiate between various
|
|
@@ -135,8 +147,8 @@ export const tableHeader = LoggingConfig.makeConfigStringBuilder.bind(null, 'Tab
|
|
|
135
147
|
* For text fields that control `Common.Settings.Setting`s, make sure to use the name of the
|
|
136
148
|
* setting as the visual elements' context.
|
|
137
149
|
*/
|
|
138
|
-
export const textField = LoggingConfig.makeConfigStringBuilder.bind(null, 'TextField');
|
|
139
|
-
export const timeline = LoggingConfig.makeConfigStringBuilder.bind(null, 'Timeline');
|
|
150
|
+
export const textField: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'TextField');
|
|
151
|
+
export const timeline: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Timeline');
|
|
140
152
|
|
|
141
153
|
/**
|
|
142
154
|
* Togglable visual elements are checkboxes, radio buttons, or (binary) combo boxes. Use the
|
|
@@ -145,10 +157,9 @@ export const timeline = LoggingConfig.makeConfigStringBuilder.bind(null, 'Timeli
|
|
|
145
157
|
* For toggles that control `Common.Settings.Setting`s, make sure to use the name of the
|
|
146
158
|
* setting as the toggle context.
|
|
147
159
|
*/
|
|
148
|
-
export const toggle = LoggingConfig.makeConfigStringBuilder.bind(null, 'Toggle');
|
|
149
|
-
|
|
150
|
-
export const toolbar = LoggingConfig.makeConfigStringBuilder.bind(null, 'Toolbar');
|
|
151
|
-
export const
|
|
152
|
-
export const
|
|
153
|
-
export const
|
|
154
|
-
export const value = LoggingConfig.makeConfigStringBuilder.bind(null, 'Value');
|
|
160
|
+
export const toggle: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Toggle');
|
|
161
|
+
export const toggleSubpane: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'ToggleSubpane');
|
|
162
|
+
export const toolbar: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Toolbar');
|
|
163
|
+
export const tree: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Tree');
|
|
164
|
+
export const treeItem: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'TreeItem');
|
|
165
|
+
export const value: VisualElementBuilder = LoggingConfig.makeConfigStringBuilder.bind(null, 'Value');
|
|
@@ -2,34 +2,34 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
// @ts-expect-error Importing CSS is handled
|
|
5
|
+
// @ts-expect-error Importing CSS is handled during bundling.
|
|
6
6
|
import commonStyle from './common.css';
|
|
7
7
|
import {adoptStyleSheet} from './common.js';
|
|
8
8
|
import {gridStyle} from './highlight_grid_common.js';
|
|
9
|
-
// @ts-expect-error Importing CSS is handled
|
|
9
|
+
// @ts-expect-error Importing CSS is handled during bundling.
|
|
10
10
|
import greenDevAnchorsStyle from './tool_green_dev_anchors.css';
|
|
11
11
|
import {
|
|
12
12
|
type GreenDevAnchorsDispatchMessage,
|
|
13
13
|
GreenDevAnchorsOverlay,
|
|
14
14
|
type GreenDevAnchorsToolMessage,
|
|
15
15
|
} from './tool_green_dev_anchors.js';
|
|
16
|
-
// @ts-expect-error Importing CSS is handled
|
|
16
|
+
// @ts-expect-error Importing CSS is handled during bundling.
|
|
17
17
|
import highlightGridStyle from './tool_grid.css';
|
|
18
|
-
// @ts-expect-error Importing CSS is handled
|
|
18
|
+
// @ts-expect-error Importing CSS is handled during bundling.
|
|
19
19
|
import highlightStyle from './tool_highlight.css';
|
|
20
20
|
import {HighlightOverlay} from './tool_highlight.js';
|
|
21
|
-
// @ts-expect-error Importing CSS is handled
|
|
21
|
+
// @ts-expect-error Importing CSS is handled during bundling.
|
|
22
22
|
import pausedStyle from './tool_paused.css';
|
|
23
23
|
import {PausedOverlay, type PausedToolMessage} from './tool_paused.js';
|
|
24
24
|
import {PersistentOverlay, type PersistentToolMessage} from './tool_persistent.js';
|
|
25
|
-
// @ts-expect-error Importing CSS is handled
|
|
25
|
+
// @ts-expect-error Importing CSS is handled during bundling.
|
|
26
26
|
import screenshotStyle from './tool_screenshot.css';
|
|
27
27
|
import {ScreenshotOverlay, type ScreenshotToolMessage} from './tool_screenshot.js';
|
|
28
|
-
// @ts-expect-error Importing CSS is handled
|
|
28
|
+
// @ts-expect-error Importing CSS is handled during bundling.
|
|
29
29
|
import sourceOrderStyle from './tool_source_order.css';
|
|
30
30
|
import {SourceOrderOverlay} from './tool_source_order.js';
|
|
31
31
|
import {ViewportSizeOverlay} from './tool_viewport_size.js';
|
|
32
|
-
// @ts-expect-error Importing CSS is handled
|
|
32
|
+
// @ts-expect-error Importing CSS is handled during bundling.
|
|
33
33
|
import wcoStyle from './tool_window_controls.css';
|
|
34
34
|
import {WindowControlsOverlay} from './tool_window_controls.js';
|
|
35
35
|
|
package/mcp/mcp.ts
CHANGED
|
@@ -15,7 +15,12 @@ export type * as CDPConnection from '../front_end/core/protocol_client/CDPConnec
|
|
|
15
15
|
export {ConnectionTransport} from '../front_end/core/protocol_client/ConnectionTransport.js';
|
|
16
16
|
export * as ProtocolClient from '../front_end/core/protocol_client/protocol_client.js';
|
|
17
17
|
export {PuppeteerDevToolsConnection} from '../front_end/core/protocol_client/PuppeteerDevToolsConnection.js';
|
|
18
|
+
export * as CSSMatchedStyles from '../front_end/core/sdk/CSSMatchedStyles.js';
|
|
19
|
+
export * as CSSMetadata from '../front_end/core/sdk/CSSMetadata.js';
|
|
18
20
|
export * as CSSModel from '../front_end/core/sdk/CSSModel.js';
|
|
21
|
+
export * as CSSProperty from '../front_end/core/sdk/CSSProperty.js';
|
|
22
|
+
export * as CSSRule from '../front_end/core/sdk/CSSRule.js';
|
|
23
|
+
export * as CSSStyleDeclaration from '../front_end/core/sdk/CSSStyleDeclaration.js';
|
|
19
24
|
export {DebuggerModel, skipAllPausesSettingDescriptor} from '../front_end/core/sdk/DebuggerModel.js';
|
|
20
25
|
export * as DOMModel from '../front_end/core/sdk/DOMModel.js';
|
|
21
26
|
export * as NetworkManager from '../front_end/core/sdk/NetworkManager.js';
|
package/package.json
CHANGED
|
@@ -34,8 +34,6 @@
|
|
|
34
34
|
"test-health": "node scripts/test_health.ts"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@rollup/plugin-node-resolve": "16.0.3",
|
|
38
|
-
"@rollup/plugin-terser": "1.0.0",
|
|
39
37
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
40
38
|
"@types/chai": "5.2.3",
|
|
41
39
|
"@types/codemirror": "5.60.17",
|
|
@@ -50,7 +48,7 @@
|
|
|
50
48
|
"@types/yargs-unparser": "2.0.3",
|
|
51
49
|
"@typescript-eslint/rule-tester": "8.64.0",
|
|
52
50
|
"@typescript-eslint/utils": "8.64.0",
|
|
53
|
-
"@
|
|
51
|
+
"@typescript/tsc": "npm:typescript@6.0.2",
|
|
54
52
|
"chai": "6.2.2",
|
|
55
53
|
"cssnano": "8.0.2",
|
|
56
54
|
"cssnano-preset-lite": "5.0.1",
|
|
@@ -76,21 +74,17 @@
|
|
|
76
74
|
"ora": "9.0.0",
|
|
77
75
|
"postcss": "8.5.25",
|
|
78
76
|
"puppeteer-core": "25.3.0",
|
|
79
|
-
"rollup": "4.60.4",
|
|
80
|
-
"rollup-plugin-sourcemaps2": "0.5.4",
|
|
81
77
|
"sinon": "22.0.0",
|
|
82
78
|
"source-map-support": "0.5.21",
|
|
83
79
|
"stylelint": "17.14.0",
|
|
84
80
|
"stylelint-config-standard": "40.0.0",
|
|
85
81
|
"svgo": "4.0.2",
|
|
86
|
-
"terser": "5.48.0",
|
|
87
82
|
"ts-lit-plugin": "2.0.2",
|
|
88
|
-
"@typescript/tsc": "npm:typescript@6.0.2",
|
|
89
83
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
90
84
|
"typescript-eslint": "8.64.0",
|
|
91
85
|
"uuid": "14.0.0",
|
|
92
86
|
"webidl2": "24.5.0",
|
|
93
87
|
"yargs": "17.7.2"
|
|
94
88
|
},
|
|
95
|
-
"version": "1.0.
|
|
89
|
+
"version": "1.0.1695017"
|
|
96
90
|
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// Copyright 2020 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
import * as path from 'node:path';
|
|
5
|
-
|
|
6
|
-
import {writeIfChanged} from '../../scripts/build/ninja/write-if-changed.js';
|
|
7
|
-
|
|
8
|
-
const [, , buildTimestamp, targetGenDir, targetName, ...imageSources] = process.argv;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @param fileName
|
|
12
|
-
*/
|
|
13
|
-
function generateCSSVariableDefinition(fileName) {
|
|
14
|
-
// The `style` referenced here is the `:root` style rule in the constructed stylesheet down below
|
|
15
|
-
return `style.setProperty('--image-file-${
|
|
16
|
-
// We have to remove the `src/` part from any SVG file names for the CSS variables, while
|
|
17
|
-
// we still use the full URL for the meta.url import. That's because the rollup-plugin-import-meta-assets
|
|
18
|
-
// rewrites the image URLs to the new location, but doesn't modify the generated CSS variable name
|
|
19
|
-
fileName.replace('src/', '').replace(path.extname(fileName), '')}', 'url(\\"' + new URL('./${
|
|
20
|
-
fileName}', import.meta.url).toString() + '\\")');`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const CURRENT_YEAR = new Date(Number(buildTimestamp) * 1000).getUTCFullYear();
|
|
24
|
-
const newContents = `
|
|
25
|
-
// Copyright ${CURRENT_YEAR} The Chromium Authors
|
|
26
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
27
|
-
// found in the LICENSE file.
|
|
28
|
-
const sheet = new CSSStyleSheet();
|
|
29
|
-
sheet.replaceSync(':root {}');
|
|
30
|
-
const style = sheet.cssRules[0].style;
|
|
31
|
-
|
|
32
|
-
${imageSources.map(generateCSSVariableDefinition).join('\n')}
|
|
33
|
-
|
|
34
|
-
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
|
|
35
|
-
`;
|
|
36
|
-
|
|
37
|
-
writeIfChanged(path.join(targetGenDir, 'Images.prebundle.js'), newContents);
|
|
38
|
-
|
|
39
|
-
const tsconfigContent = `{
|
|
40
|
-
"compilerOptions": {
|
|
41
|
-
"composite": true
|
|
42
|
-
},
|
|
43
|
-
"files": [
|
|
44
|
-
"Images.js"
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
48
|
-
|
|
49
|
-
writeIfChanged(
|
|
50
|
-
path.join(targetGenDir, `${targetName}-tsconfig.json`),
|
|
51
|
-
tsconfigContent,
|
|
52
|
-
);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Copyright 2021 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
import {importMetaAssets} from '@web/rollup-plugin-import-meta-assets';
|
|
5
|
-
import {optimize} from 'svgo';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
treeshake: false,
|
|
9
|
-
output: [{
|
|
10
|
-
format: 'esm',
|
|
11
|
-
assetFileNames: '[name][extname]',
|
|
12
|
-
}],
|
|
13
|
-
plugins:
|
|
14
|
-
[
|
|
15
|
-
importMetaAssets({
|
|
16
|
-
async transform(assetBuffer, assetPath) {
|
|
17
|
-
if (assetPath.endsWith('.svg')) {
|
|
18
|
-
const {data} = await optimize(assetBuffer.toString(), {
|
|
19
|
-
plugins: [
|
|
20
|
-
{
|
|
21
|
-
name: 'preset-default',
|
|
22
|
-
params: {
|
|
23
|
-
overrides: {
|
|
24
|
-
inlineStyles: false,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
});
|
|
30
|
-
return data;
|
|
31
|
-
}
|
|
32
|
-
return null;
|
|
33
|
-
},
|
|
34
|
-
}),
|
|
35
|
-
],
|
|
36
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
import * as Common from '../../core/common/common.js';
|
|
6
|
-
import type * as Platform from '../../core/platform/platform.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Returns true if the origin is considered opaque and should be blocked from
|
|
10
|
-
* AI assistance to prevent potential data leakage.
|
|
11
|
-
*
|
|
12
|
-
* @param origin The origin string to check.
|
|
13
|
-
* @returns True if the origin is opaque and blocked.
|
|
14
|
-
* @see https://crbug.com/513732588
|
|
15
|
-
*/
|
|
16
|
-
export function isOpaqueOrigin(origin: string): boolean {
|
|
17
|
-
/**
|
|
18
|
-
* Origins starting with 'about' (like about:blank or about:srcdoc) are
|
|
19
|
-
* considered opaque. 'about://' is the sentinel used by DevTools
|
|
20
|
-
* ParsedURL.securityOrigin() for these.
|
|
21
|
-
*
|
|
22
|
-
* We also treat empty origins, 'undefined', and 'null' as opaque to prevent
|
|
23
|
-
* bypasses when URL parsing fails or variables are uninitialized.
|
|
24
|
-
*/
|
|
25
|
-
const lower = origin.toLowerCase();
|
|
26
|
-
return lower === '' || lower === 'null' || lower === 'data:' || lower.startsWith('about') ||
|
|
27
|
-
lower.startsWith('detached') || lower.startsWith('undefined');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Extracts the origin from a context URL or identifier.
|
|
32
|
-
* Handles special cases like "detached" nodes, trace identifiers,
|
|
33
|
-
* opaque blob URLs, and isolates local file paths.
|
|
34
|
-
*
|
|
35
|
-
* @param contextURL The context URL or trace/node identifier.
|
|
36
|
-
* @returns The extracted origin string.
|
|
37
|
-
*/
|
|
38
|
-
export function extractContextOrigin(contextURL: string): string {
|
|
39
|
-
if (isOpaqueOrigin(contextURL)) {
|
|
40
|
-
return contextURL;
|
|
41
|
-
}
|
|
42
|
-
if (contextURL.startsWith('trace-')) {
|
|
43
|
-
return contextURL;
|
|
44
|
-
}
|
|
45
|
-
// If a blob URL has an opaque inner origin (e.g. blob:null/uuid, blob:about:blank),
|
|
46
|
-
// it won't contain "://". We classify these as opaque ('null') to prevent cross-origin leaks.
|
|
47
|
-
if (/^blob:/i.test(contextURL)) {
|
|
48
|
-
const innerURL = contextURL.substring(5);
|
|
49
|
-
if (!innerURL.includes('://')) {
|
|
50
|
-
return 'null';
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
// Local files collapse to a generic "file://" origin by default. We isolate them
|
|
54
|
-
// by appending the normalized path, ensuring distinct files are treated as different origins.
|
|
55
|
-
if (/^file:\/\//i.test(contextURL)) {
|
|
56
|
-
const parsed = Common.ParsedURL.ParsedURL.fromString(contextURL as Platform.DevToolsPath.UrlString);
|
|
57
|
-
if (parsed) {
|
|
58
|
-
// Include host and port (authority) to preserve server names in Windows UNC paths
|
|
59
|
-
// (e.g. file://server/path) so different network shares are isolated.
|
|
60
|
-
const authority = parsed.host + (parsed.port ? ':' + parsed.port : '');
|
|
61
|
-
return 'file://' + authority + parsed.path;
|
|
62
|
-
}
|
|
63
|
-
// Fallback to 'null' (opaque) if parsing fails. This prevents malformed file URLs
|
|
64
|
-
// from bypassing isolation by collapsing to the same 'file://' string.
|
|
65
|
-
return 'null';
|
|
66
|
-
}
|
|
67
|
-
return Common.ParsedURL.ParsedURL.extractOrigin(contextURL as Platform.DevToolsPath.UrlString);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Determines if two origins are equivalent and safe to be used together.
|
|
72
|
-
* Opaque origins are never equivalent to anything, not even themselves.
|
|
73
|
-
*/
|
|
74
|
-
export function areOriginsEquivalent(origin1: string, origin2: string): boolean {
|
|
75
|
-
if (isOpaqueOrigin(origin1) || isOpaqueOrigin(origin2)) {
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
return origin1 === origin2;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Validates if the source code contents of a file (identified by targetURL) can be retrieved
|
|
83
|
-
* and shared with the AI, based on the origin of the active trace context.
|
|
84
|
-
*
|
|
85
|
-
* This function handles the following branches:
|
|
86
|
-
* 1. **Opaque origins**: If either the trace origin or target file origin is opaque
|
|
87
|
-
* (e.g., data URLs, about:blank, sandboxed frames), access is blocked.
|
|
88
|
-
* 2. **Fresh Recordings**: For live page recordings, a strict same-origin comparison
|
|
89
|
-
* (scheme, host, and port matching) is enforced.
|
|
90
|
-
*
|
|
91
|
-
* @param targetURL The URL of the file to be read.
|
|
92
|
-
* @param traceOrigin The allowed origin of the trace context.
|
|
93
|
-
* @returns true if reading the file is permitted; false otherwise.
|
|
94
|
-
*/
|
|
95
|
-
export function canResourceContentsBeReadForTrace(targetURL: string, traceOrigin: string): boolean {
|
|
96
|
-
// We explicitly block all file:// URLs. While we want to allow users to debug
|
|
97
|
-
// traces on local sites, allowing file:// access poses security risks (e.g.,
|
|
98
|
-
// reading local files like /etc/passwd via prompt injection) because file://
|
|
99
|
-
// origins are not sufficiently isolated from each other in DevTools' origin model.
|
|
100
|
-
if (traceOrigin.startsWith('file://') || targetURL.startsWith('file://')) {
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const targetOrigin = extractContextOrigin(targetURL);
|
|
105
|
-
|
|
106
|
-
return areOriginsEquivalent(targetOrigin, traceOrigin);
|
|
107
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Copyright 2024 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
import terser from '@rollup/plugin-terser';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Checks if an env variable is true.
|
|
9
|
-
* @param envVar
|
|
10
|
-
* @returns Whether the flag is 'true' or not.
|
|
11
|
-
*/
|
|
12
|
-
function isEnvVarTrue(envVar) {
|
|
13
|
-
return envVar === 'true';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
treeshake: true,
|
|
18
|
-
output: [{format: 'iife'}],
|
|
19
|
-
plugins: isEnvVarTrue(process.env.DEBUG_INJECTED) ? [] : [terser()],
|
|
20
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Copyright 2023 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
import terser from '@rollup/plugin-terser';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Checks if an env variable is true.
|
|
9
|
-
* @param envVar
|
|
10
|
-
* @returns Whether the flag is 'true' or not.
|
|
11
|
-
*/
|
|
12
|
-
function isEnvVarTrue(envVar) {
|
|
13
|
-
return envVar === 'true';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
treeshake: false,
|
|
18
|
-
output: [{format: 'iife'}],
|
|
19
|
-
plugins: !isEnvVarTrue(process.env.DEBUG_INJECTED) ? [terser()] : [],
|
|
20
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Copyright 2024 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
import * as path from 'node:path';
|
|
6
|
-
|
|
7
|
-
import {writeIfChanged} from '../../../scripts/build/ninja/write-if-changed.js';
|
|
8
|
-
|
|
9
|
-
const [, , targetGenDir] = process.argv;
|
|
10
|
-
|
|
11
|
-
let value = 'false';
|
|
12
|
-
|
|
13
|
-
if (process.argv.includes('--should-enable')) {
|
|
14
|
-
value = 'true';
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
await writeIfChanged(
|
|
18
|
-
path.join(targetGenDir, 'EasterEgg.js'),
|
|
19
|
-
`export const SHOULD_SHOW_EASTER_EGG = ${value};`,
|
|
20
|
-
);
|