chrome-devtools-frontend 1.0.981004 → 1.0.995227
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 +2 -0
- package/config/gni/devtools_grd_files.gni +8 -7
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/.eslintrc.js +10 -0
- package/front_end/Images/src/ic_rendering.svg +3 -0
- package/front_end/core/common/ParsedURL.ts +44 -28
- package/front_end/core/common/ResourceType.ts +1 -1
- package/front_end/core/common/SettingRegistration.ts +1 -0
- package/front_end/core/host/InspectorFrontendHost.ts +11 -10
- package/front_end/core/host/InspectorFrontendHostAPI.ts +15 -14
- package/front_end/core/host/Platform.ts +11 -2
- package/front_end/core/host/UserMetrics.ts +27 -2
- package/front_end/core/i18n/DevToolsLocale.ts +4 -0
- package/front_end/core/i18n/locales/af.json +76 -16
- package/front_end/core/i18n/locales/am.json +76 -16
- package/front_end/core/i18n/locales/ar.json +77 -17
- package/front_end/core/i18n/locales/as.json +76 -16
- package/front_end/core/i18n/locales/az.json +76 -16
- package/front_end/core/i18n/locales/be.json +75 -15
- package/front_end/core/i18n/locales/bg.json +76 -16
- package/front_end/core/i18n/locales/bn.json +76 -16
- package/front_end/core/i18n/locales/bs.json +88 -28
- package/front_end/core/i18n/locales/ca.json +76 -16
- package/front_end/core/i18n/locales/cs.json +76 -16
- package/front_end/core/i18n/locales/cy.json +76 -16
- package/front_end/core/i18n/locales/da.json +77 -17
- package/front_end/core/i18n/locales/de.json +178 -118
- package/front_end/core/i18n/locales/el.json +76 -16
- package/front_end/core/i18n/locales/en-GB.json +76 -16
- package/front_end/core/i18n/locales/en-US.json +208 -52
- package/front_end/core/i18n/locales/en-XL.json +208 -52
- package/front_end/core/i18n/locales/es-419.json +76 -16
- package/front_end/core/i18n/locales/es.json +76 -16
- package/front_end/core/i18n/locales/et.json +76 -16
- package/front_end/core/i18n/locales/eu.json +76 -16
- package/front_end/core/i18n/locales/fa.json +83 -23
- package/front_end/core/i18n/locales/fi.json +76 -16
- package/front_end/core/i18n/locales/fil.json +76 -16
- package/front_end/core/i18n/locales/fr-CA.json +76 -16
- package/front_end/core/i18n/locales/fr.json +76 -16
- package/front_end/core/i18n/locales/gl.json +76 -16
- package/front_end/core/i18n/locales/gu.json +76 -16
- package/front_end/core/i18n/locales/he.json +76 -16
- package/front_end/core/i18n/locales/hi.json +76 -16
- package/front_end/core/i18n/locales/hr.json +76 -16
- package/front_end/core/i18n/locales/hu.json +76 -16
- package/front_end/core/i18n/locales/hy.json +76 -16
- package/front_end/core/i18n/locales/id.json +79 -19
- package/front_end/core/i18n/locales/is.json +75 -15
- package/front_end/core/i18n/locales/it.json +124 -64
- package/front_end/core/i18n/locales/ja.json +76 -16
- package/front_end/core/i18n/locales/ka.json +76 -16
- package/front_end/core/i18n/locales/kk.json +76 -16
- package/front_end/core/i18n/locales/km.json +76 -16
- package/front_end/core/i18n/locales/kn.json +76 -16
- package/front_end/core/i18n/locales/ko.json +76 -16
- package/front_end/core/i18n/locales/ky.json +76 -16
- package/front_end/core/i18n/locales/lo.json +76 -16
- package/front_end/core/i18n/locales/lt.json +76 -16
- package/front_end/core/i18n/locales/lv.json +76 -16
- package/front_end/core/i18n/locales/mk.json +76 -16
- package/front_end/core/i18n/locales/ml.json +76 -16
- package/front_end/core/i18n/locales/mn.json +76 -16
- package/front_end/core/i18n/locales/mr.json +76 -16
- package/front_end/core/i18n/locales/ms.json +76 -16
- package/front_end/core/i18n/locales/my.json +78 -18
- package/front_end/core/i18n/locales/ne.json +76 -16
- package/front_end/core/i18n/locales/nl.json +77 -17
- package/front_end/core/i18n/locales/no.json +76 -16
- package/front_end/core/i18n/locales/or.json +76 -16
- package/front_end/core/i18n/locales/pa.json +76 -16
- package/front_end/core/i18n/locales/pl.json +78 -18
- package/front_end/core/i18n/locales/pt-PT.json +123 -63
- package/front_end/core/i18n/locales/pt.json +78 -18
- package/front_end/core/i18n/locales/ro.json +76 -16
- package/front_end/core/i18n/locales/ru.json +77 -17
- package/front_end/core/i18n/locales/si.json +76 -16
- package/front_end/core/i18n/locales/sk.json +76 -16
- package/front_end/core/i18n/locales/sl.json +76 -16
- package/front_end/core/i18n/locales/sq.json +76 -16
- package/front_end/core/i18n/locales/sr-Latn.json +76 -16
- package/front_end/core/i18n/locales/sr.json +76 -16
- package/front_end/core/i18n/locales/sv.json +76 -16
- package/front_end/core/i18n/locales/sw.json +76 -16
- package/front_end/core/i18n/locales/ta.json +77 -17
- package/front_end/core/i18n/locales/te.json +76 -16
- package/front_end/core/i18n/locales/th.json +76 -16
- package/front_end/core/i18n/locales/tr.json +76 -16
- package/front_end/core/i18n/locales/uk.json +76 -16
- package/front_end/core/i18n/locales/ur.json +76 -16
- package/front_end/core/i18n/locales/uz.json +77 -17
- package/front_end/core/i18n/locales/vi.json +76 -16
- package/front_end/core/i18n/locales/zh-HK.json +76 -16
- package/front_end/core/i18n/locales/zh-TW.json +76 -16
- package/front_end/core/i18n/locales/zh.json +76 -16
- package/front_end/core/i18n/locales/zu.json +76 -16
- package/front_end/core/platform/dom-utilities.ts +16 -0
- package/front_end/core/platform/platform.ts +2 -0
- package/front_end/core/protocol_client/InspectorBackend.ts +2 -1
- package/front_end/core/protocol_client/NodeURL.ts +1 -1
- package/front_end/core/root/Runtime.ts +6 -0
- package/front_end/core/sdk/AccessibilityModel.ts +7 -6
- package/front_end/core/sdk/CSSMatchedStyles.ts +71 -17
- package/front_end/core/sdk/CSSMetadata.ts +15 -0
- package/front_end/core/sdk/CSSModel.ts +9 -7
- package/front_end/core/sdk/CSSProperty.ts +97 -11
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +9 -5
- package/front_end/core/sdk/CSSSupports.ts +4 -1
- package/front_end/core/sdk/ChildTargetManager.ts +3 -1
- package/front_end/core/sdk/Connections.ts +3 -2
- package/front_end/core/sdk/ConsoleModel.ts +6 -5
- package/front_end/core/sdk/Cookie.ts +4 -2
- package/front_end/core/sdk/DOMDebuggerModel.ts +10 -6
- package/front_end/core/sdk/DOMModel.ts +2 -2
- package/front_end/core/sdk/DebuggerModel.ts +27 -5
- package/front_end/core/sdk/HeapProfilerModel.ts +2 -1
- package/front_end/core/sdk/NetworkManager.ts +13 -12
- package/front_end/core/sdk/NetworkRequest.ts +1 -1
- package/front_end/core/sdk/PageLoad.ts +3 -1
- package/front_end/core/sdk/PageResourceLoader.ts +9 -7
- package/front_end/core/sdk/ProfileTreeModel.ts +3 -2
- package/front_end/core/sdk/RemoteObject.ts +18 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +17 -11
- package/front_end/core/sdk/ScreenCaptureModel.ts +3 -0
- package/front_end/core/sdk/Script.ts +4 -3
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +2 -1
- package/front_end/core/sdk/SourceMap.ts +10 -6
- package/front_end/core/sdk/SourceMapManager.ts +47 -5
- package/front_end/core/sdk/Target.ts +2 -1
- package/front_end/core/sdk/TracingModel.ts +0 -9
- package/front_end/devtools_compatibility.js +1 -0
- package/front_end/entrypoints/formatter_worker/CSSRuleParser.ts +1 -1
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +10 -3
- package/front_end/entrypoints/main/MainImpl.ts +22 -2
- package/front_end/generated/InspectorBackendCommands.js +85 -16
- package/front_end/generated/SupportedCSSProperties.js +21 -8
- package/front_end/generated/protocol-mapping.d.ts +4 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +174 -28
- package/front_end/legacy/legacy-defs.d.ts +0 -4
- package/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js +1 -1
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +1 -0
- package/front_end/models/bindings/BreakpointManager.ts +68 -11
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +9 -2
- package/front_end/models/bindings/CompilerScriptMapping.ts +3 -2
- package/front_end/models/bindings/ContentProviderBasedProject.ts +12 -9
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +10 -8
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -1
- package/front_end/models/bindings/DefaultScriptMapping.ts +8 -2
- package/front_end/models/bindings/FileUtils.ts +3 -2
- package/front_end/models/bindings/IgnoreListManager.ts +5 -5
- package/front_end/models/bindings/ResourceUtils.ts +5 -4
- package/front_end/models/emulation/EmulatedDevices.ts +17 -0
- package/front_end/models/extensions/ExtensionAPI.ts +5 -2
- package/front_end/models/extensions/ExtensionPanel.ts +2 -1
- package/front_end/models/extensions/ExtensionServer.ts +13 -8
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +0 -63
- package/front_end/models/issues_manager/CookieIssue.ts +7 -0
- package/front_end/models/issues_manager/DeprecationIssue.ts +326 -8
- package/front_end/models/issues_manager/IssuesManager.ts +4 -0
- package/front_end/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
- package/front_end/models/issues_manager/descriptions/deprecation.md +1 -1
- package/front_end/models/logs/LogManager.ts +2 -1
- package/front_end/models/logs/NetworkLog.ts +14 -12
- package/front_end/models/persistence/Automapping.ts +17 -16
- package/front_end/models/persistence/EditFileSystemView.ts +5 -4
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +24 -24
- package/front_end/models/persistence/IsolatedFileSystem.ts +2 -2
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -6
- package/front_end/models/persistence/NetworkPersistenceManager.ts +92 -54
- package/front_end/models/persistence/PersistenceImpl.ts +7 -7
- package/front_end/models/persistence/PlatformFileSystem.ts +7 -8
- package/front_end/models/persistence/WorkspaceSettingsTab.ts +3 -2
- package/front_end/models/text_utils/CodeMirrorUtils.ts +53 -0
- package/front_end/models/text_utils/text_utils.ts +2 -0
- package/front_end/models/timeline_model/TimelineModel.ts +32 -30
- package/front_end/models/timeline_model/TimelineProfileTree.ts +3 -2
- package/front_end/models/workspace/FileManager.ts +9 -6
- package/front_end/models/workspace/UISourceCode.ts +16 -14
- package/front_end/models/workspace/WorkspaceImpl.ts +40 -16
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +2 -1
- package/front_end/panels/application/AppManifestView.ts +1 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +5 -4
- package/front_end/panels/application/ApplicationPanelSidebar.ts +34 -30
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +5 -4
- package/front_end/panels/application/BackgroundServiceView.ts +2 -1
- package/front_end/panels/application/DatabaseQueryView.ts +2 -1
- package/front_end/panels/application/InterestGroupTreeElement.ts +3 -2
- package/front_end/panels/application/ReportingApiTreeElement.ts +3 -2
- package/front_end/panels/application/ResourcesPanel.ts +4 -3
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +6 -1
- package/front_end/panels/application/TrustTokensTreeElement.ts +3 -2
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +10 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +163 -13
- package/front_end/panels/application/components/backForwardCacheView.css +15 -4
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +19 -19
- package/front_end/panels/changes/ChangesView.ts +38 -0
- package/front_end/panels/console/ConsoleFormat.ts +23 -0
- package/front_end/panels/console/ConsolePinPane.ts +7 -0
- package/front_end/panels/console/ConsolePrompt.ts +11 -1
- package/front_end/panels/console/ConsoleSidebar.ts +2 -1
- package/front_end/panels/console/ConsoleView.ts +60 -32
- package/front_end/panels/console/ConsoleViewMessage.ts +15 -28
- package/front_end/panels/console/ConsoleViewport.ts +2 -1
- package/front_end/panels/console/ErrorStackParser.ts +8 -4
- package/front_end/panels/console/consoleView.css +0 -1
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/coverage/CoverageModel.ts +6 -6
- package/front_end/panels/coverage/CoverageView.ts +2 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -1
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +7 -6
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +0 -48
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +5 -0
- package/front_end/panels/css_overview/cssOverviewSidebarPanel.css +2 -0
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +2 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +2 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +4 -6
- package/front_end/panels/elements/ElementsPanel.ts +16 -5
- package/front_end/panels/elements/ImagePreviewPopover.ts +6 -4
- package/front_end/panels/elements/PropertiesWidget.ts +4 -24
- package/front_end/panels/elements/StyleEditorWidget.ts +2 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +1614 -0
- package/front_end/panels/elements/StylePropertyHighlighter.ts +2 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +20 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +97 -1675
- package/front_end/panels/elements/elements-legacy.ts +3 -3
- package/front_end/panels/elements/elements.ts +3 -0
- package/front_end/panels/elements/stylesSidebarPane.css +3 -1
- package/front_end/panels/emulation/AdvancedApp.ts +6 -2
- package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -1
- package/front_end/panels/input/InputTimeline.ts +3 -2
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +0 -50
- package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +14 -2
- package/front_end/panels/issues/IssueAggregator.ts +8 -0
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/lighthouse/LighthouseController.ts +5 -1
- package/front_end/panels/lighthouse/LighthousePanel.ts +3 -1
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +3 -3
- package/front_end/panels/network/BlockedURLsPane.ts +3 -2
- package/front_end/panels/network/NetworkConfigView.ts +6 -0
- package/front_end/panels/network/NetworkDataGridNode.ts +4 -0
- package/front_end/panels/network/NetworkLogView.ts +3 -3
- package/front_end/panels/network/RequestHTMLView.ts +1 -0
- package/front_end/panels/network/RequestHeadersView.ts +71 -10
- package/front_end/panels/network/networkLogView.css +9 -17
- package/front_end/panels/network/requestHeadersTree.css +16 -0
- package/front_end/panels/profiler/HeapSnapshotView.ts +5 -2
- package/front_end/panels/profiler/LiveHeapProfileView.ts +3 -1
- package/front_end/panels/profiler/ProfileView.ts +2 -2
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -1
- package/front_end/panels/profiler/heapProfiler.css +15 -3
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +4 -2
- package/front_end/panels/screencast/ScreencastView.ts +5 -2
- package/front_end/panels/search/SearchConfig.ts +2 -1
- package/front_end/panels/settings/KeybindsSettingsTab.ts +3 -2
- package/front_end/panels/settings/SettingsScreen.ts +4 -1
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +1 -2
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +4 -4
- package/front_end/panels/sources/BreakpointEditDialog.ts +0 -1
- package/front_end/panels/sources/CSSPlugin.ts +6 -6
- package/front_end/panels/sources/CoveragePlugin.ts +2 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +4 -4
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +4 -1
- package/front_end/panels/sources/NavigatorView.ts +28 -20
- package/front_end/panels/sources/SearchSourcesView.ts +2 -2
- package/front_end/panels/sources/SourcesNavigator.ts +4 -2
- package/front_end/panels/sources/SourcesPanel.ts +4 -4
- package/front_end/panels/sources/SourcesSearchScope.ts +12 -8
- package/front_end/panels/sources/SourcesView.ts +3 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
- package/front_end/panels/sources/components/HeadersView.css +17 -2
- package/front_end/panels/sources/components/HeadersView.ts +103 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +9 -9
- package/front_end/panels/timeline/TimelinePanel.ts +3 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +7 -0
- package/front_end/panels/timeline/timelinePanel.css +1 -2
- package/front_end/panels/utils/utils.ts +97 -0
- package/front_end/third_party/codemirror.next/bundle.ts +27 -25
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/java.js +2 -1
- package/front_end/third_party/codemirror.next/chunk/json.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/php.js +2 -1
- package/front_end/third_party/codemirror.next/chunk/python.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/wast.js +2 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +2 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1884 -2281
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +21 -32
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +963 -886
- package/front_end/third_party/lighthouse/report/bundle.js +3 -2
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/third_party/lit-html/README.chromium +3 -3
- package/front_end/third_party/lit-html/package/README.md +1 -1
- package/front_end/third_party/lit-html/package/async-directive.d.ts +1 -1
- package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/async-directive.d.ts +1 -1
- package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/choose.d.ts +32 -0
- package/front_end/third_party/lit-html/package/development/directives/choose.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/choose.js +41 -0
- package/front_end/third_party/lit-html/package/development/directives/choose.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/join.d.ts +21 -0
- package/front_end/third_party/lit-html/package/development/directives/join.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/join.js +19 -0
- package/front_end/third_party/lit-html/package/development/directives/join.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/keyed.d.ts +23 -0
- package/front_end/third_party/lit-html/package/development/directives/keyed.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/keyed.js +39 -0
- package/front_end/third_party/lit-html/package/development/directives/keyed.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/map.d.ts +23 -0
- package/front_end/third_party/lit-html/package/development/directives/map.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/map.js +30 -0
- package/front_end/third_party/lit-html/package/development/directives/map.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/range.d.ts +24 -0
- package/front_end/third_party/lit-html/package/development/directives/range.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/range.js +13 -0
- package/front_end/third_party/lit-html/package/development/directives/range.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -1
- package/front_end/third_party/lit-html/package/development/directives/when.d.ts +26 -0
- package/front_end/third_party/lit-html/package/development/directives/when.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/when.js +9 -0
- package/front_end/third_party/lit-html/package/development/directives/when.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/lit-html.d.ts +182 -1
- package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/lit-html.js +187 -4
- package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/static.js +7 -0
- package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/choose.d.ts +32 -0
- package/front_end/third_party/lit-html/package/directives/choose.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/choose.js +7 -0
- package/front_end/third_party/lit-html/package/directives/choose.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/class-map.js +1 -1
- package/front_end/third_party/lit-html/package/directives/guard.js +1 -1
- package/front_end/third_party/lit-html/package/directives/join.d.ts +21 -0
- package/front_end/third_party/lit-html/package/directives/join.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/join.js +7 -0
- package/front_end/third_party/lit-html/package/directives/join.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/keyed.d.ts +23 -0
- package/front_end/third_party/lit-html/package/directives/keyed.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/keyed.js +7 -0
- package/front_end/third_party/lit-html/package/directives/keyed.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/map.d.ts +23 -0
- package/front_end/third_party/lit-html/package/directives/map.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/map.js +7 -0
- package/front_end/third_party/lit-html/package/directives/map.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/range.d.ts +24 -0
- package/front_end/third_party/lit-html/package/directives/range.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/range.js +7 -0
- package/front_end/third_party/lit-html/package/directives/range.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/ref.js +1 -1
- package/front_end/third_party/lit-html/package/directives/repeat.js +1 -1
- package/front_end/third_party/lit-html/package/directives/style-map.js +1 -1
- package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -1
- package/front_end/third_party/lit-html/package/directives/template-content.js +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-html.js +1 -1
- package/front_end/third_party/lit-html/package/directives/until.js +1 -1
- package/front_end/third_party/lit-html/package/directives/when.d.ts +26 -0
- package/front_end/third_party/lit-html/package/directives/when.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/when.js +7 -0
- package/front_end/third_party/lit-html/package/directives/when.js.map +1 -0
- package/front_end/third_party/lit-html/package/lit-html.d.ts +182 -1
- package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/lit-html.js +1 -1
- package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/package.json +25 -1
- package/front_end/third_party/lit-html/package/private-ssr-support.js +1 -1
- package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/static.js +1 -1
- package/front_end/third_party/lit-html/package/static.js.map +1 -1
- package/front_end/third_party/puppeteer/README.chromium +1 -1
- package/front_end/third_party/puppeteer/package/README.md +12 -13
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +13 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +4 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts +4 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js +12 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js +7 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +6 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +6 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +13 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +4 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +4 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +12 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +2 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +10 -6
- package/front_end/third_party/puppeteer/package/package.json +17 -17
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +1 -1
- package/front_end/ui/components/data_grid/DataGrid.ts +8 -9
- package/front_end/ui/components/data_grid/DataGridController.ts +3 -1
- package/front_end/ui/components/docs/panel_introduction_steps/basic.html +25 -0
- package/front_end/ui/components/docs/panel_introduction_steps/basic.ts +25 -0
- package/front_end/ui/components/input/input.ts +2 -2
- package/front_end/ui/components/linkifier/LinkifierUtils.ts +3 -1
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +4 -1
- package/front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts +44 -0
- package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +56 -0
- package/front_end/ui/components/panel_introduction_steps/panel_introduction_steps.ts +5 -0
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +3 -4
- package/front_end/ui/components/text_editor/TextEditor.ts +1 -1
- package/front_end/ui/components/text_editor/config.ts +1 -35
- package/front_end/ui/components/text_editor/javascript.ts +8 -8
- package/front_end/ui/components/tree_outline/TreeOutline.ts +10 -9
- package/front_end/ui/components/tree_outline/treeOutline.css +1 -1
- package/front_end/ui/legacy/ARIAUtils.ts +4 -2
- package/front_end/ui/legacy/ContextMenu.ts +14 -0
- package/front_end/ui/legacy/DockController.ts +2 -1
- package/front_end/ui/legacy/SettingsUI.ts +3 -3
- package/front_end/ui/legacy/SoftContextMenu.ts +43 -14
- package/front_end/ui/legacy/Toolbar.ts +16 -0
- package/front_end/ui/legacy/Treeoutline.ts +17 -7
- package/front_end/ui/legacy/UIUtils.ts +2 -2
- package/front_end/ui/legacy/View.ts +14 -8
- package/front_end/ui/legacy/ViewManager.ts +2 -1
- package/front_end/ui/legacy/ViewRegistration.ts +6 -0
- package/front_end/ui/legacy/Widget.ts +2 -1
- package/front_end/ui/legacy/XLink.ts +8 -3
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +3 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +43 -11
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +98 -48
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +4 -3
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +24 -28
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +5 -11
- package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +8 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -7
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +11 -10
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +7 -1
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +18 -9
- package/front_end/ui/legacy/components/utils/Linkifier.ts +13 -6
- package/front_end/ui/legacy/reportView.css +1 -0
- package/front_end/ui/legacy/splitWidget.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +2 -0
- package/front_end/ui/legacy/themeColors.css +1 -1
- package/front_end/ui/legacy/toolbar.css +17 -1
- package/front_end/ui/legacy/utils/focus-changed.ts +3 -1
- package/inspector_overlay/.eslintrc.js +9 -0
- package/package.json +17 -17
- package/scripts/eslint_rules/lib/check_component_naming.js +4 -0
- package/scripts/eslint_rules/lib/es_modules_import.js +6 -0
- package/scripts/eslint_rules/lib/inject_checkbox_styles.js +121 -0
- package/scripts/eslint_rules/tests/es_modules_import_test.js +12 -0
- package/scripts/eslint_rules/tests/inject_checkbox_styles_test.js +127 -0
- package/front_end/models/issues_manager/descriptions/arAttributionEventSourceTriggerDataTooLarge.md +0 -4
- package/front_end/models/issues_manager/descriptions/arAttributionTriggerDataTooLarge.md +0 -4
- package/front_end/models/issues_manager/descriptions/arInvalidAttributionData.md +0 -8
- package/front_end/models/issues_manager/descriptions/arInvalidEventSourceTriggerData.md +0 -9
- package/front_end/models/issues_manager/descriptions/arInvalidTriggerDedupKey.md +0 -5
- package/front_end/models/issues_manager/descriptions/arInvalidTriggerPriority.md +0 -5
- package/front_end/models/issues_manager/descriptions/arMissingAttributionData.md +0 -7
@@ -28,8 +28,6 @@
|
|
28
28
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
29
|
*/
|
30
30
|
|
31
|
-
// TODO(crbug.com/1253323): Cast to Branded Types will be removed from this file when migration to branded types is complete.
|
32
|
-
|
33
31
|
import * as Common from '../../core/common/common.js';
|
34
32
|
import * as Platform from '../../core/platform/platform.js';
|
35
33
|
import * as TextUtils from '../text_utils/text_utils.js';
|
@@ -57,13 +55,14 @@ export class FileSystemWorkspaceBinding {
|
|
57
55
|
void this.isolatedFileSystemManager.waitForFileSystems().then(this.onFileSystemsLoaded.bind(this));
|
58
56
|
}
|
59
57
|
|
60
|
-
static projectId(fileSystemPath:
|
58
|
+
static projectId(fileSystemPath: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString {
|
61
59
|
return fileSystemPath;
|
62
60
|
}
|
63
61
|
|
64
62
|
static relativePath(uiSourceCode: Workspace.UISourceCode.UISourceCode): Platform.DevToolsPath.EncodedPathString[] {
|
65
63
|
const baseURL = (uiSourceCode.project() as FileSystem).fileSystemBaseURL;
|
66
|
-
return
|
64
|
+
return Common.ParsedURL.ParsedURL.split(
|
65
|
+
Common.ParsedURL.ParsedURL.sliceUrlToEncodedPathString(uiSourceCode.url(), baseURL.length), '/');
|
67
66
|
}
|
68
67
|
|
69
68
|
static tooltipForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): string {
|
@@ -86,7 +85,7 @@ export class FileSystemWorkspaceBinding {
|
|
86
85
|
return Common.ParsedURL.ParsedURL.concatenate(fsProject.fileSystemBaseURL, relativePath);
|
87
86
|
}
|
88
87
|
|
89
|
-
static fileSystemPath(projectId:
|
88
|
+
static fileSystemPath(projectId: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString {
|
90
89
|
return projectId;
|
91
90
|
}
|
92
91
|
|
@@ -158,9 +157,9 @@ export class FileSystemWorkspaceBinding {
|
|
158
157
|
export class FileSystem extends Workspace.Workspace.ProjectStore {
|
159
158
|
readonly fileSystemInternal: PlatformFileSystem;
|
160
159
|
readonly fileSystemBaseURL: Platform.DevToolsPath.UrlString;
|
161
|
-
private readonly fileSystemParentURL:
|
160
|
+
private readonly fileSystemParentURL: Platform.DevToolsPath.UrlString;
|
162
161
|
private readonly fileSystemWorkspaceBinding: FileSystemWorkspaceBinding;
|
163
|
-
private readonly fileSystemPathInternal:
|
162
|
+
private readonly fileSystemPathInternal: Platform.DevToolsPath.UrlString;
|
164
163
|
private readonly creatingFilesGuard: Set<string>;
|
165
164
|
constructor(
|
166
165
|
fileSystemWorkspaceBinding: FileSystemWorkspaceBinding, isolatedFileSystem: PlatformFileSystem,
|
@@ -174,7 +173,8 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
174
173
|
|
175
174
|
this.fileSystemInternal = isolatedFileSystem;
|
176
175
|
this.fileSystemBaseURL = Common.ParsedURL.ParsedURL.concatenate(this.fileSystemInternal.path(), '/');
|
177
|
-
this.fileSystemParentURL =
|
176
|
+
this.fileSystemParentURL =
|
177
|
+
Common.ParsedURL.ParsedURL.substr(this.fileSystemBaseURL, 0, fileSystemPath.lastIndexOf('/') + 1);
|
178
178
|
this.fileSystemWorkspaceBinding = fileSystemWorkspaceBinding;
|
179
179
|
this.fileSystemPathInternal = fileSystemPath;
|
180
180
|
this.creatingFilesGuard = new Set();
|
@@ -183,7 +183,7 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
183
183
|
this.populate();
|
184
184
|
}
|
185
185
|
|
186
|
-
fileSystemPath():
|
186
|
+
fileSystemPath(): Platform.DevToolsPath.UrlString {
|
187
187
|
return this.fileSystemPathInternal;
|
188
188
|
}
|
189
189
|
|
@@ -195,9 +195,9 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
195
195
|
return this.fileSystemInternal.mimeFromPath(uiSourceCode.url());
|
196
196
|
}
|
197
197
|
|
198
|
-
initialGitFolders(): Platform.DevToolsPath.
|
199
|
-
return this.fileSystemInternal.initialGitFolders().map(
|
200
|
-
|
198
|
+
initialGitFolders(): Platform.DevToolsPath.UrlString[] {
|
199
|
+
return this.fileSystemInternal.initialGitFolders().map(
|
200
|
+
folder => Common.ParsedURL.ParsedURL.concatenate(this.fileSystemPathInternal, '/', folder));
|
201
201
|
}
|
202
202
|
|
203
203
|
private filePathForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode):
|
@@ -262,7 +262,7 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
262
262
|
rename(
|
263
263
|
uiSourceCode: Workspace.UISourceCode.UISourceCode, newName: Platform.DevToolsPath.RawPathString,
|
264
264
|
callback:
|
265
|
-
(arg0: boolean, arg1?: string|undefined, arg2?:
|
265
|
+
(arg0: boolean, arg1?: string|undefined, arg2?: Platform.DevToolsPath.UrlString|undefined,
|
266
266
|
arg3?: Common.ResourceType.ResourceType|undefined) => void): void {
|
267
267
|
if (newName === uiSourceCode.name()) {
|
268
268
|
callback(true, uiSourceCode.name(), uiSourceCode.url(), uiSourceCode.contentType());
|
@@ -282,7 +282,7 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
282
282
|
const parentPath = Common.ParsedURL.ParsedURL.substr(filePath, 0, slash);
|
283
283
|
filePath = Common.ParsedURL.ParsedURL.encodedFromParentPathAndName(parentPath, newName);
|
284
284
|
filePath = Common.ParsedURL.ParsedURL.substr(filePath, 1);
|
285
|
-
const newURL = this.fileSystemBaseURL
|
285
|
+
const newURL = Common.ParsedURL.ParsedURL.concatenate(this.fileSystemBaseURL, filePath);
|
286
286
|
const newContentType = this.fileSystemInternal.contentType(newName);
|
287
287
|
this.renameUISourceCode(uiSourceCode, newName);
|
288
288
|
callback(true, newName, newURL, newContentType);
|
@@ -301,9 +301,9 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
301
301
|
}
|
302
302
|
|
303
303
|
async findFilesMatchingSearchRequest(
|
304
|
-
searchConfig: Workspace.Workspace.ProjectSearchConfig,
|
304
|
+
searchConfig: Workspace.Workspace.ProjectSearchConfig, filesMatchingFileQuery: Platform.DevToolsPath.UrlString[],
|
305
305
|
progress: Common.Progress.Progress): Promise<string[]> {
|
306
|
-
let result: string[] =
|
306
|
+
let result: string[] = filesMatchingFileQuery;
|
307
307
|
const queriesToRun = searchConfig.queries().slice();
|
308
308
|
if (!queriesToRun.length) {
|
309
309
|
queriesToRun.push('');
|
@@ -341,9 +341,8 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
341
341
|
}
|
342
342
|
}
|
343
343
|
|
344
|
-
excludeFolder(url:
|
345
|
-
let relativeFolder = Common.ParsedURL.ParsedURL.sliceUrlToEncodedPathString(
|
346
|
-
url as Platform.DevToolsPath.UrlString, this.fileSystemBaseURL.length);
|
344
|
+
excludeFolder(url: Platform.DevToolsPath.UrlString): void {
|
345
|
+
let relativeFolder = Common.ParsedURL.ParsedURL.sliceUrlToEncodedPathString(url, this.fileSystemBaseURL.length);
|
347
346
|
if (!relativeFolder.startsWith('/')) {
|
348
347
|
relativeFolder = Common.ParsedURL.ParsedURL.prepend('/', relativeFolder);
|
349
348
|
}
|
@@ -399,12 +398,13 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
399
398
|
|
400
399
|
private addFile(filePath: Platform.DevToolsPath.EncodedPathString): Workspace.UISourceCode.UISourceCode {
|
401
400
|
const contentType = this.fileSystemInternal.contentType(filePath);
|
402
|
-
const uiSourceCode =
|
401
|
+
const uiSourceCode =
|
402
|
+
this.createUISourceCode(Common.ParsedURL.ParsedURL.concatenate(this.fileSystemBaseURL, filePath), contentType);
|
403
403
|
this.addUISourceCode(uiSourceCode);
|
404
404
|
return uiSourceCode;
|
405
405
|
}
|
406
406
|
|
407
|
-
fileChanged(path:
|
407
|
+
fileChanged(path: Platform.DevToolsPath.UrlString): void {
|
408
408
|
// Ignore files that are being created but do not have content yet.
|
409
409
|
if (this.creatingFilesGuard.has(path)) {
|
410
410
|
return;
|
@@ -431,7 +431,7 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
431
431
|
const sourceCodeToMetadataMap =
|
432
432
|
new WeakMap<Workspace.UISourceCode.UISourceCode, Promise<Workspace.UISourceCode.UISourceCodeMetadata|null>>();
|
433
433
|
export interface FilesChangedData {
|
434
|
-
changed: Platform.MapUtilities.Multimap<
|
435
|
-
added: Platform.MapUtilities.Multimap<
|
436
|
-
removed: Platform.MapUtilities.Multimap<
|
434
|
+
changed: Platform.MapUtilities.Multimap<Platform.DevToolsPath.UrlString, Platform.DevToolsPath.UrlString>;
|
435
|
+
added: Platform.MapUtilities.Multimap<Platform.DevToolsPath.UrlString, Platform.DevToolsPath.UrlString>;
|
436
|
+
removed: Platform.MapUtilities.Multimap<Platform.DevToolsPath.UrlString, Platform.DevToolsPath.UrlString>;
|
437
437
|
}
|
@@ -532,7 +532,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
|
|
532
532
|
return Boolean(regex && regex.test(Common.ParsedURL.ParsedURL.encodedPathToRawPathString(folderPath)));
|
533
533
|
}
|
534
534
|
|
535
|
-
excludedFolders(): Set<
|
535
|
+
excludedFolders(): Set<Platform.DevToolsPath.EncodedPathString> {
|
536
536
|
return this.excludedFoldersInternal;
|
537
537
|
}
|
538
538
|
|
@@ -556,7 +556,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
|
|
556
556
|
requestId, this.embedderPathInternal, JSON.stringify(this.excludedEmbedderFolders));
|
557
557
|
}
|
558
558
|
|
559
|
-
mimeFromPath(path:
|
559
|
+
mimeFromPath(path: Platform.DevToolsPath.UrlString): string {
|
560
560
|
return Common.ResourceType.ResourceType.mimeFromURL(path) || 'text/plain';
|
561
561
|
}
|
562
562
|
|
@@ -50,7 +50,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
50
50
|
let isolatedFileSystemManagerInstance: IsolatedFileSystemManager;
|
51
51
|
|
52
52
|
export class IsolatedFileSystemManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
53
|
-
private readonly fileSystemsInternal: Map<
|
53
|
+
private readonly fileSystemsInternal: Map<Platform.DevToolsPath.UrlString, PlatformFileSystem>;
|
54
54
|
private readonly callbacks: Map<number, (arg0: Array<Platform.DevToolsPath.RawPathString>) => void>;
|
55
55
|
private readonly progresses: Map<number, Common.Progress.Progress>;
|
56
56
|
private readonly workspaceFolderExcludePatternSettingInternal: Common.Settings.RegExpSetting;
|
@@ -191,7 +191,7 @@ export class IsolatedFileSystemManager extends Common.ObjectWrapper.ObjectWrappe
|
|
191
191
|
}
|
192
192
|
}
|
193
193
|
|
194
|
-
addPlatformFileSystem(fileSystemURL:
|
194
|
+
addPlatformFileSystem(fileSystemURL: Platform.DevToolsPath.UrlString, fileSystem: PlatformFileSystem): void {
|
195
195
|
this.fileSystemsInternal.set(fileSystemURL, fileSystem);
|
196
196
|
this.dispatchEventToListeners(Events.FileSystemAdded, fileSystem);
|
197
197
|
}
|
@@ -241,9 +241,10 @@ export class IsolatedFileSystemManager extends Common.ObjectWrapper.ObjectWrappe
|
|
241
241
|
this.dispatchEventToListeners(Events.FileSystemFilesChanged, urlPaths);
|
242
242
|
|
243
243
|
function groupFilePathsIntoFileSystemPaths(
|
244
|
-
this: IsolatedFileSystemManager,
|
245
|
-
|
246
|
-
const paths =
|
244
|
+
this: IsolatedFileSystemManager, embedderPaths: Platform.DevToolsPath.RawPathString[]):
|
245
|
+
Platform.MapUtilities.Multimap<Platform.DevToolsPath.UrlString, Platform.DevToolsPath.UrlString> {
|
246
|
+
const paths =
|
247
|
+
new Platform.MapUtilities.Multimap<Platform.DevToolsPath.UrlString, Platform.DevToolsPath.UrlString>();
|
247
248
|
for (const embedderPath of embedderPaths) {
|
248
249
|
const filePath = Common.ParsedURL.ParsedURL.rawPathToUrlString(embedderPath);
|
249
250
|
for (const fileSystemPath of this.fileSystemsInternal.keys()) {
|
@@ -267,7 +268,7 @@ export class IsolatedFileSystemManager extends Common.ObjectWrapper.ObjectWrappe
|
|
267
268
|
return [...this.fileSystemsInternal.values()];
|
268
269
|
}
|
269
270
|
|
270
|
-
fileSystem(fileSystemPath:
|
271
|
+
fileSystem(fileSystemPath: Platform.DevToolsPath.UrlString): PlatformFileSystem|null {
|
271
272
|
return this.fileSystemsInternal.get(fileSystemPath) || null;
|
272
273
|
}
|
273
274
|
|
@@ -3,6 +3,7 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
|
+
import * as Host from '../../core/host/host.js';
|
6
7
|
import * as Platform from '../../core/platform/platform.js';
|
7
8
|
import * as Root from '../../core/root/root.js';
|
8
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
@@ -23,7 +24,8 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
23
24
|
private readonly savingSymbol: symbol;
|
24
25
|
private enabledSetting: Common.Settings.Setting<boolean>;
|
25
26
|
private readonly workspace: Workspace.Workspace.WorkspaceImpl;
|
26
|
-
private readonly networkUISourceCodeForEncodedPath:
|
27
|
+
private readonly networkUISourceCodeForEncodedPath:
|
28
|
+
Map<Platform.DevToolsPath.EncodedPathString, Workspace.UISourceCode.UISourceCode>;
|
27
29
|
private readonly interceptionHandlerBound:
|
28
30
|
(interceptedRequest: SDK.NetworkManager.InterceptedRequest) => Promise<void>;
|
29
31
|
private readonly updateInterceptionThrottler: Common.Throttler.Throttler;
|
@@ -32,7 +34,7 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
32
34
|
private activeInternal: boolean;
|
33
35
|
private enabled: boolean;
|
34
36
|
private eventDescriptors: Common.EventTarget.EventDescriptor[];
|
35
|
-
#headerOverridesMap: Map<
|
37
|
+
#headerOverridesMap: Map<Platform.DevToolsPath.EncodedPathString, HeaderOverrideWithRegex[]> = new Map();
|
36
38
|
|
37
39
|
private constructor(workspace: Workspace.Workspace.WorkspaceImpl) {
|
38
40
|
super();
|
@@ -185,22 +187,29 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
185
187
|
PersistenceImpl.instance().refreshAutomapping();
|
186
188
|
}
|
187
189
|
|
188
|
-
|
189
|
-
|
190
|
-
|
190
|
+
encodedPathFromUrl(url: Platform.DevToolsPath.UrlString, ignoreInactive?: boolean):
|
191
|
+
Platform.DevToolsPath.EncodedPathString {
|
192
|
+
return Common.ParsedURL.ParsedURL.rawPathToEncodedPathString(this.rawPathFromUrl(url, ignoreInactive));
|
193
|
+
}
|
194
|
+
|
195
|
+
rawPathFromUrl(url: Platform.DevToolsPath.UrlString, ignoreInactive?: boolean): Platform.DevToolsPath.RawPathString {
|
196
|
+
if ((!this.activeInternal && !ignoreInactive) || !this.projectInternal) {
|
197
|
+
return Platform.DevToolsPath.EmptyRawPathString;
|
191
198
|
}
|
192
|
-
let
|
193
|
-
|
194
|
-
|
199
|
+
let initialEncodedPath = Common.ParsedURL.ParsedURL.urlWithoutHash(url.replace(/^https?:\/\//, '')) as
|
200
|
+
Platform.DevToolsPath.EncodedPathString;
|
201
|
+
if (initialEncodedPath.endsWith('/') && initialEncodedPath.indexOf('?') === -1) {
|
202
|
+
initialEncodedPath = Common.ParsedURL.ParsedURL.concatenate(initialEncodedPath, 'index.html');
|
195
203
|
}
|
196
|
-
let encodedPathParts =
|
197
|
-
const projectPath =
|
204
|
+
let encodedPathParts = encodeEncodedPathToLocalPathParts(initialEncodedPath);
|
205
|
+
const projectPath =
|
206
|
+
FileSystemWorkspaceBinding.fileSystemPath(this.projectInternal.id() as Platform.DevToolsPath.UrlString);
|
198
207
|
const encodedPath = encodedPathParts.join('/');
|
199
208
|
if (projectPath.length + encodedPath.length > 200) {
|
200
209
|
const domain = encodedPathParts[0];
|
201
210
|
const encodedFileName = encodedPathParts[encodedPathParts.length - 1];
|
202
211
|
const shortFileName = encodedFileName ? encodedFileName.substr(0, 10) + '-' : '';
|
203
|
-
const extension = Common.ParsedURL.ParsedURL.extractExtension(
|
212
|
+
const extension = Common.ParsedURL.ParsedURL.extractExtension(initialEncodedPath);
|
204
213
|
const extensionPart = extension ? '.' + extension.substr(0, 10) : '';
|
205
214
|
encodedPathParts = [
|
206
215
|
domain,
|
@@ -208,49 +217,59 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
208
217
|
shortFileName + Platform.StringUtilities.hashCode(encodedPath).toString(16) + extensionPart,
|
209
218
|
];
|
210
219
|
}
|
211
|
-
return Common.ParsedURL.ParsedURL.join(encodedPathParts as Platform.DevToolsPath.
|
220
|
+
return Common.ParsedURL.ParsedURL.join(encodedPathParts as Platform.DevToolsPath.RawPathString[], '/');
|
212
221
|
|
213
|
-
function
|
222
|
+
function encodeEncodedPathToLocalPathParts(encodedPath: Platform.DevToolsPath.EncodedPathString): string[] {
|
214
223
|
const encodedParts = [];
|
215
|
-
for (const pathPart of
|
224
|
+
for (const pathPart of fileNamePartsFromEncodedPath(encodedPath)) {
|
216
225
|
if (!pathPart) {
|
217
226
|
continue;
|
218
227
|
}
|
219
|
-
// encodeURI() escapes all the unsafe filename characters except
|
220
|
-
let encodedName =
|
221
|
-
|
222
|
-
if (
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
228
|
+
// encodeURI() escapes all the unsafe filename characters except '/' and '*'
|
229
|
+
let encodedName =
|
230
|
+
encodeURI(pathPart).replace(/[\/\*]/g, match => '%' + match[0].charCodeAt(0).toString(16).toUpperCase());
|
231
|
+
if (Host.Platform.isWin()) {
|
232
|
+
// Windows does not allow ':' and '?' in filenames
|
233
|
+
encodedName = encodedName.replace(/[:\?]/g, match => '%' + match[0].charCodeAt(0).toString(16).toUpperCase());
|
234
|
+
// Windows does not allow a small set of filenames.
|
235
|
+
if (RESERVED_FILENAMES.has(encodedName.toLowerCase())) {
|
236
|
+
encodedName =
|
237
|
+
encodedName.split('').map(char => '%' + char.charCodeAt(0).toString(16).toUpperCase()).join('');
|
238
|
+
}
|
239
|
+
// Windows does not allow the file to end in a space or dot (space should already be encoded).
|
240
|
+
const lastChar = encodedName.charAt(encodedName.length - 1);
|
241
|
+
if (lastChar === '.') {
|
242
|
+
encodedName = encodedName.substr(0, encodedName.length - 1) + '%2E';
|
243
|
+
}
|
229
244
|
}
|
230
245
|
encodedParts.push(encodedName);
|
231
246
|
}
|
232
247
|
return encodedParts;
|
233
248
|
}
|
234
249
|
|
235
|
-
function
|
236
|
-
|
237
|
-
const queryIndex =
|
250
|
+
function fileNamePartsFromEncodedPath(encodedPath: Platform.DevToolsPath.EncodedPathString): string[] {
|
251
|
+
encodedPath = Common.ParsedURL.ParsedURL.urlWithoutHash(encodedPath) as Platform.DevToolsPath.EncodedPathString;
|
252
|
+
const queryIndex = encodedPath.indexOf('?');
|
238
253
|
if (queryIndex === -1) {
|
239
|
-
return
|
254
|
+
return encodedPath.split('/');
|
240
255
|
}
|
241
256
|
if (queryIndex === 0) {
|
242
|
-
return [
|
257
|
+
return [encodedPath];
|
243
258
|
}
|
244
|
-
const endSection =
|
245
|
-
const parts =
|
259
|
+
const endSection = encodedPath.substr(queryIndex);
|
260
|
+
const parts = encodedPath.substr(0, encodedPath.length - endSection.length).split('/');
|
246
261
|
parts[parts.length - 1] += endSection;
|
247
262
|
return parts;
|
248
263
|
}
|
249
264
|
}
|
250
265
|
|
251
|
-
|
252
|
-
|
253
|
-
|
266
|
+
fileUrlFromNetworkUrl(url: Platform.DevToolsPath.UrlString, ignoreInactive?: boolean):
|
267
|
+
Platform.DevToolsPath.UrlString {
|
268
|
+
if (!this.projectInternal) {
|
269
|
+
return Platform.DevToolsPath.EmptyUrlString;
|
270
|
+
}
|
271
|
+
return Common.ParsedURL.ParsedURL.concatenate(
|
272
|
+
(this.projectInternal as FileSystem).fileSystemPath(), '/', this.encodedPathFromUrl(url, ignoreInactive));
|
254
273
|
}
|
255
274
|
|
256
275
|
private decodeLocalPathToUrlPath(path: string): string {
|
@@ -309,16 +328,17 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
309
328
|
const content = (await uiSourceCode.requestContent()).content || '';
|
310
329
|
const encoded = await uiSourceCode.contentEncoded();
|
311
330
|
const lastIndexOfSlash = encodedPath.lastIndexOf('/');
|
312
|
-
const encodedFileName =
|
331
|
+
const encodedFileName = Common.ParsedURL.ParsedURL.substring(encodedPath, lastIndexOfSlash + 1);
|
332
|
+
const rawFileName = Common.ParsedURL.ParsedURL.encodedPathToRawPathString(encodedFileName);
|
313
333
|
encodedPath = Common.ParsedURL.ParsedURL.substr(encodedPath, 0, lastIndexOfSlash);
|
314
334
|
if (this.projectInternal) {
|
315
|
-
await this.projectInternal.createFile(encodedPath,
|
335
|
+
await this.projectInternal.createFile(encodedPath, rawFileName, content, encoded);
|
316
336
|
}
|
317
|
-
this.fileCreatedForTest(encodedPath,
|
337
|
+
this.fileCreatedForTest(encodedPath, rawFileName);
|
318
338
|
this.savingForOverrides.delete(uiSourceCode);
|
319
339
|
}
|
320
340
|
|
321
|
-
private fileCreatedForTest(_path:
|
341
|
+
private fileCreatedForTest(_path: Platform.DevToolsPath.EncodedPathString, _fileName: string): void {
|
322
342
|
}
|
323
343
|
|
324
344
|
private patternForFileSystemUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): string {
|
@@ -329,7 +349,9 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
329
349
|
if (relativePathParts[1] === 'longurls' && relativePathParts.length !== 2) {
|
330
350
|
return 'http?://' + relativePathParts[0] + '/*';
|
331
351
|
}
|
332
|
-
|
352
|
+
// 'relativePath' returns an encoded string of the local file name which itself is already encoded.
|
353
|
+
// We therefore need to decode twice to get the raw path.
|
354
|
+
return 'http?://' + this.decodeLocalPathToUrlPath(this.decodeLocalPathToUrlPath(relativePathParts.join('/')));
|
333
355
|
}
|
334
356
|
|
335
357
|
private async onUISourceCodeAdded(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise<void> {
|
@@ -363,14 +385,18 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
363
385
|
this.updateInterceptionPatterns();
|
364
386
|
|
365
387
|
const relativePath = FileSystemWorkspaceBinding.relativePath(uiSourceCode);
|
366
|
-
const networkUISourceCode =
|
388
|
+
const networkUISourceCode =
|
389
|
+
this.networkUISourceCodeForEncodedPath.get(Common.ParsedURL.ParsedURL.join(relativePath, '/'));
|
367
390
|
if (networkUISourceCode) {
|
368
391
|
await this.bind(networkUISourceCode, uiSourceCode);
|
369
392
|
}
|
370
393
|
}
|
371
394
|
|
372
|
-
async generateHeaderPatterns(uiSourceCode: Workspace.UISourceCode.UISourceCode):
|
373
|
-
|
395
|
+
async generateHeaderPatterns(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise<{
|
396
|
+
headerPatterns: Set<string>,
|
397
|
+
path: Platform.DevToolsPath.EncodedPathString,
|
398
|
+
overridesWithRegex: HeaderOverrideWithRegex[],
|
399
|
+
}> {
|
374
400
|
const headerPatterns = new Set<string>();
|
375
401
|
const content = (await uiSourceCode.requestContent()).content || '[]';
|
376
402
|
let headerOverrides: HeaderOverride[] = [];
|
@@ -381,10 +407,16 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
381
407
|
}
|
382
408
|
} catch (e) {
|
383
409
|
console.error('Failed to parse', uiSourceCode.url(), 'for locally overriding headers.');
|
384
|
-
return {headerPatterns, path:
|
410
|
+
return {headerPatterns, path: Platform.DevToolsPath.EmptyEncodedPathString, overridesWithRegex: []};
|
385
411
|
}
|
386
412
|
const relativePath = FileSystemWorkspaceBinding.relativePath(uiSourceCode).join('/');
|
387
|
-
|
413
|
+
// 'relativePath' returns an encoded string of the local file name which itself is already encoded.
|
414
|
+
// e.g. relativePath: 'www.example.com%253A443/path/.headers '
|
415
|
+
// singlyDecodedPath: 'www.example.com%3A443/path/'
|
416
|
+
// decodedPath: 'www.example.com:443/path'
|
417
|
+
const singlyDecodedPath = this.decodeLocalPathToUrlPath(relativePath).slice(0, -HEADERS_FILENAME.length) as
|
418
|
+
Platform.DevToolsPath.EncodedPathString;
|
419
|
+
const decodedPath = this.decodeLocalPathToUrlPath(singlyDecodedPath) as Platform.DevToolsPath.RawPathString;
|
388
420
|
|
389
421
|
const overridesWithRegex: HeaderOverrideWithRegex[] = [];
|
390
422
|
for (const headerOverride of headerOverrides) {
|
@@ -414,7 +446,7 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
414
446
|
});
|
415
447
|
}
|
416
448
|
}
|
417
|
-
return {headerPatterns, path:
|
449
|
+
return {headerPatterns, path: singlyDecodedPath, overridesWithRegex};
|
418
450
|
}
|
419
451
|
|
420
452
|
async updateInterceptionPatternsForTests(): Promise<void> {
|
@@ -509,7 +541,7 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
509
541
|
FileSystemWorkspaceBinding.fileSystemType(project) !== 'overrides') {
|
510
542
|
return;
|
511
543
|
}
|
512
|
-
const fileSystemPath = FileSystemWorkspaceBinding.fileSystemPath(project.id());
|
544
|
+
const fileSystemPath = FileSystemWorkspaceBinding.fileSystemPath(project.id() as Platform.DevToolsPath.UrlString);
|
513
545
|
if (!fileSystemPath) {
|
514
546
|
return;
|
515
547
|
}
|
@@ -542,8 +574,9 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
542
574
|
return result;
|
543
575
|
}
|
544
576
|
|
545
|
-
#maybeMergeHeadersForPathSegment(
|
546
|
-
|
577
|
+
#maybeMergeHeadersForPathSegment(
|
578
|
+
path: Platform.DevToolsPath.EncodedPathString, requestUrl: Platform.DevToolsPath.UrlString,
|
579
|
+
headers: Protocol.Fetch.HeaderEntry[]): Protocol.Fetch.HeaderEntry[] {
|
547
580
|
const headerOverrides = this.#headerOverridesMap.get(path) || [];
|
548
581
|
for (const headerOverride of headerOverrides) {
|
549
582
|
if (headerOverride.applyToRegex.test(requestUrl)) {
|
@@ -555,17 +588,22 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
555
588
|
|
556
589
|
handleHeaderInterception(interceptedRequest: SDK.NetworkManager.InterceptedRequest): Protocol.Fetch.HeaderEntry[] {
|
557
590
|
let result: Protocol.Fetch.HeaderEntry[] = interceptedRequest.responseHeaders || [];
|
591
|
+
// 'rawPathFromUrl()''s return value is already (singly-)encoded, so we can
|
592
|
+
// treat it as an 'EncodedPathString' here.
|
558
593
|
const urlSegments =
|
559
|
-
this.
|
594
|
+
this.rawPathFromUrl(interceptedRequest.request.url as Platform.DevToolsPath.UrlString).split('/') as
|
595
|
+
Platform.DevToolsPath.EncodedPathString[];
|
560
596
|
// Traverse the hierarchy of overrides from the most general to the most
|
561
597
|
// specific. Check with empty string first to match overrides applying to
|
562
598
|
// all domains.
|
563
599
|
// e.g. '', 'www.example.com/', 'www.example.com/path/', ...
|
564
|
-
let path =
|
565
|
-
result = this.#maybeMergeHeadersForPathSegment(
|
600
|
+
let path = Platform.DevToolsPath.EmptyEncodedPathString;
|
601
|
+
result = this.#maybeMergeHeadersForPathSegment(
|
602
|
+
path, interceptedRequest.request.url as Platform.DevToolsPath.UrlString, result);
|
566
603
|
for (const segment of urlSegments) {
|
567
|
-
path
|
568
|
-
result = this.#maybeMergeHeadersForPathSegment(
|
604
|
+
path = Common.ParsedURL.ParsedURL.concatenate(path, segment, '/');
|
605
|
+
result = this.#maybeMergeHeadersForPathSegment(
|
606
|
+
path, interceptedRequest.request.url as Platform.DevToolsPath.UrlString, result);
|
569
607
|
}
|
570
608
|
return result;
|
571
609
|
}
|
@@ -646,7 +684,7 @@ const RESERVED_FILENAMES = new Set<string>([
|
|
646
684
|
'com8', 'com9', 'lpt1', 'lpt2', 'lpt3', 'lpt4', 'lpt5', 'lpt6', 'lpt7', 'lpt8', 'lpt9',
|
647
685
|
]);
|
648
686
|
|
649
|
-
const HEADERS_FILENAME = '.headers';
|
687
|
+
export const HEADERS_FILENAME = '.headers';
|
650
688
|
|
651
689
|
// TODO(crbug.com/1167717): Make this a const enum again
|
652
690
|
// eslint-disable-next-line rulesdir/const_enum
|
@@ -308,7 +308,7 @@ export class PersistenceImpl extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
308
308
|
return binding ? binding.network : null;
|
309
309
|
}
|
310
310
|
|
311
|
-
filePathHasBindings(filePath:
|
311
|
+
filePathHasBindings(filePath: Platform.DevToolsPath.UrlString): boolean {
|
312
312
|
return this.filePathPrefixesToBindingCount.hasBindingPrefix(filePath);
|
313
313
|
}
|
314
314
|
}
|
@@ -320,11 +320,11 @@ class FilePathPrefixesBindingCounts {
|
|
320
320
|
this.prefixCounts = new Map();
|
321
321
|
}
|
322
322
|
|
323
|
-
private getPlatformCanonicalFilePath(path:
|
324
|
-
return Host.Platform.isWin() ?
|
323
|
+
private getPlatformCanonicalFilePath(path: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString {
|
324
|
+
return Host.Platform.isWin() ? Common.ParsedURL.ParsedURL.toLowerCase(path) : path;
|
325
325
|
}
|
326
326
|
|
327
|
-
add(filePath:
|
327
|
+
add(filePath: Platform.DevToolsPath.UrlString): void {
|
328
328
|
filePath = this.getPlatformCanonicalFilePath(filePath);
|
329
329
|
let relative = '';
|
330
330
|
for (const token of filePath.split('/')) {
|
@@ -334,7 +334,7 @@ class FilePathPrefixesBindingCounts {
|
|
334
334
|
}
|
335
335
|
}
|
336
336
|
|
337
|
-
remove(filePath:
|
337
|
+
remove(filePath: Platform.DevToolsPath.UrlString): void {
|
338
338
|
filePath = this.getPlatformCanonicalFilePath(filePath);
|
339
339
|
let relative = '';
|
340
340
|
for (const token of filePath.split('/')) {
|
@@ -348,10 +348,10 @@ class FilePathPrefixesBindingCounts {
|
|
348
348
|
}
|
349
349
|
}
|
350
350
|
|
351
|
-
hasBindingPrefix(filePath:
|
351
|
+
hasBindingPrefix(filePath: Platform.DevToolsPath.UrlString): boolean {
|
352
352
|
filePath = this.getPlatformCanonicalFilePath(filePath);
|
353
353
|
if (!filePath.endsWith('/')) {
|
354
|
-
filePath
|
354
|
+
filePath = Common.ParsedURL.ParsedURL.concatenate(filePath, '/');
|
355
355
|
}
|
356
356
|
return this.prefixCounts.has(filePath);
|
357
357
|
}
|
@@ -16,9 +16,9 @@ const UIStrings = {
|
|
16
16
|
const str_ = i18n.i18n.registerUIStrings('models/persistence/PlatformFileSystem.ts', UIStrings);
|
17
17
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
18
18
|
export class PlatformFileSystem {
|
19
|
-
private readonly pathInternal:
|
19
|
+
private readonly pathInternal: Platform.DevToolsPath.UrlString;
|
20
20
|
private readonly typeInternal: string;
|
21
|
-
constructor(path:
|
21
|
+
constructor(path: Platform.DevToolsPath.UrlString, type: string) {
|
22
22
|
this.pathInternal = path;
|
23
23
|
this.typeInternal = type;
|
24
24
|
}
|
@@ -36,11 +36,10 @@ export class PlatformFileSystem {
|
|
36
36
|
}
|
37
37
|
|
38
38
|
path(): Platform.DevToolsPath.UrlString {
|
39
|
-
|
40
|
-
return this.pathInternal as Platform.DevToolsPath.UrlString;
|
39
|
+
return this.pathInternal;
|
41
40
|
}
|
42
41
|
|
43
|
-
embedderPath():
|
42
|
+
embedderPath(): Platform.DevToolsPath.RawPathString {
|
44
43
|
throw new Error('Not implemented');
|
45
44
|
}
|
46
45
|
|
@@ -80,7 +79,7 @@ export class PlatformFileSystem {
|
|
80
79
|
addExcludedFolder(_path: Platform.DevToolsPath.EncodedPathString): void {
|
81
80
|
}
|
82
81
|
|
83
|
-
removeExcludedFolder(_path:
|
82
|
+
removeExcludedFolder(_path: Platform.DevToolsPath.EncodedPathString): void {
|
84
83
|
}
|
85
84
|
|
86
85
|
fileSystemRemoved(): void {
|
@@ -90,7 +89,7 @@ export class PlatformFileSystem {
|
|
90
89
|
return false;
|
91
90
|
}
|
92
91
|
|
93
|
-
excludedFolders(): Set<
|
92
|
+
excludedFolders(): Set<Platform.DevToolsPath.EncodedPathString> {
|
94
93
|
return new Set();
|
95
94
|
}
|
96
95
|
|
@@ -104,7 +103,7 @@ export class PlatformFileSystem {
|
|
104
103
|
});
|
105
104
|
}
|
106
105
|
|
107
|
-
mimeFromPath(_path:
|
106
|
+
mimeFromPath(_path: Platform.DevToolsPath.UrlString): string {
|
108
107
|
throw new Error('Not implemented');
|
109
108
|
}
|
110
109
|
|
@@ -3,6 +3,7 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import * as i18n from '../../core/i18n/i18n.js';
|
6
|
+
import type * as Platform from '../../core/platform/platform.js';
|
6
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
7
8
|
|
8
9
|
import {EditFileSystemView} from './EditFileSystemView.js';
|
@@ -44,8 +45,8 @@ let workspaceSettingsTabInstance: WorkspaceSettingsTab;
|
|
44
45
|
export class WorkspaceSettingsTab extends UI.Widget.VBox {
|
45
46
|
containerElement: HTMLElement;
|
46
47
|
private readonly fileSystemsListContainer: HTMLElement;
|
47
|
-
private readonly elementByPath: Map<
|
48
|
-
private readonly mappingViewByPath: Map<
|
48
|
+
private readonly elementByPath: Map<Platform.DevToolsPath.UrlString, Element>;
|
49
|
+
private readonly mappingViewByPath: Map<Platform.DevToolsPath.UrlString, EditFileSystemView>;
|
49
50
|
private constructor() {
|
50
51
|
super();
|
51
52
|
|