chrome-devtools-frontend 1.0.950484 → 1.0.951410
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/config/gni/devtools_grd_files.gni +3 -4
- package/docs/triage_guidelines.md +2 -2
- package/front_end/core/dom_extension/DOMExtension.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
- package/front_end/core/host/UserMetrics.ts +0 -14
- package/front_end/core/i18n/locales/en-US.json +183 -183
- package/front_end/core/i18n/locales/en-XL.json +183 -183
- package/front_end/core/platform/platform.ts +1 -2
- package/front_end/core/platform/typescript-utilities.ts +4 -0
- package/front_end/core/sdk/CSSRule.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +12 -37
- package/front_end/core/sdk/OverlayModel.ts +18 -34
- package/front_end/core/sdk/RuntimeModel.ts +0 -1
- package/front_end/core/sdk/SourceMap.ts +1 -1
- package/front_end/devtools_compatibility.js +0 -1
- package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +2 -7
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +3 -3
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +1 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +1 -3
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +1 -2
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
- package/front_end/models/bindings/FileUtils.ts +0 -1
- package/front_end/models/bindings/IgnoreListManager.ts +1 -2
- package/front_end/models/bindings/NetworkProject.ts +1 -2
- package/front_end/models/extensions/ExtensionAPI.ts +0 -1
- package/front_end/models/issues_manager/SameSiteCookieIssue.ts +1 -2
- package/front_end/models/timeline_model/TracingLayerTree.ts +0 -1
- package/front_end/panels/accessibility/ARIAMetadata.ts +0 -1
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +2 -2
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -2
- package/front_end/panels/animation/AnimationTimeline.ts +0 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +3 -4
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +0 -2
- package/front_end/panels/application/StorageView.ts +2 -6
- package/front_end/panels/application/{BackForwardCacheStrings.ts → components/BackForwardCacheStrings.ts} +2 -2
- package/front_end/panels/application/{BackForwardCacheView.ts → components/BackForwardCacheView.ts} +76 -42
- package/front_end/panels/application/{backForwardCacheView.css → components/backForwardCacheView.css} +9 -0
- package/front_end/panels/application/components/components.ts +2 -0
- package/front_end/panels/elements/ComputedStyleModel.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -5
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +3 -9
- package/front_end/panels/lighthouse/LighthouseController.ts +4 -5
- package/front_end/panels/media/TickingFlameChart.ts +1 -2
- package/front_end/panels/network/NetworkLogViewColumns.ts +1 -1
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +0 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +1 -2
- package/front_end/panels/profiler/heapProfiler.css +1 -1
- package/front_end/panels/security/SecurityModel.ts +2 -4
- package/front_end/panels/security/SecurityPanel.ts +2 -2
- package/front_end/panels/settings/settingsScreen.css +8 -3
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +2 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -5
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +0 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -1
- package/front_end/panels/timeline/TimelinePanel.ts +2 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +15 -0
- package/front_end/third_party/codemirror.next/package.json +3 -3
- package/front_end/third_party/puppeteer/package/README.md +11 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts +9 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +21 -12
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EvalTypes.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +50 -11
- 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 +70 -33
- 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/HTTPResponse.d.ts +12 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js +25 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +2 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +39 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +36 -0
- 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/LifecycleWatcher.d.ts +3 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts +46 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +124 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +27 -10
- 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 +144 -74
- 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/Puppeteer.d.ts +5 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +43 -17
- 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/LaunchOptions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +101 -34
- 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/node/NodeWebSocketTransport.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +9 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +24 -17
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +7 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +50 -11
- 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 +70 -34
- 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/HTTPResponse.d.ts +12 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +26 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +2 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +39 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +38 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +3 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts +46 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +120 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +27 -10
- 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 +144 -75
- 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/Page.js +12 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +5 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +3 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +10 -12
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +43 -20
- 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/LaunchOptions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +104 -40
- 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/node/NodeWebSocketTransport.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/web.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +173 -36
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/ui/components/markdown_view/MarkdownView.ts +0 -1
- package/front_end/ui/components/report_view/report.css +0 -1
- package/front_end/ui/components/text_editor/config.ts +7 -4
- package/front_end/ui/legacy/ContextMenu.ts +2 -3
- package/front_end/ui/legacy/InspectorView.ts +1 -1
- package/front_end/ui/legacy/ReportView.ts +3 -4
- package/front_end/ui/legacy/SearchableView.ts +1 -2
- package/front_end/ui/legacy/SplitWidget.ts +2 -3
- package/front_end/ui/legacy/TextPrompt.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/XLink.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -2
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +3 -3
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +7 -7
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +1 -2
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +0 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +2 -2
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +12 -1
- package/inspector_overlay/main.ts +16 -2
- package/package.json +1 -1
- package/scripts/build/ninja/copy.gni +2 -2
- package/front_end/core/platform/utilities.ts +0 -49
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NetworkManager = exports.NetworkManagerEmittedEvents = void 0;
|
|
4
2
|
/**
|
|
5
3
|
* Copyright 2017 Google Inc. All rights reserved.
|
|
6
4
|
*
|
|
@@ -16,11 +14,14 @@ exports.NetworkManager = exports.NetworkManagerEmittedEvents = void 0;
|
|
|
16
14
|
* See the License for the specific language governing permissions and
|
|
17
15
|
* limitations under the License.
|
|
18
16
|
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.NetworkManager = exports.NetworkManagerEmittedEvents = void 0;
|
|
19
19
|
const EventEmitter_js_1 = require("./EventEmitter.js");
|
|
20
20
|
const assert_js_1 = require("./assert.js");
|
|
21
21
|
const helper_js_1 = require("./helper.js");
|
|
22
22
|
const HTTPRequest_js_1 = require("./HTTPRequest.js");
|
|
23
23
|
const HTTPResponse_js_1 = require("./HTTPResponse.js");
|
|
24
|
+
const NetworkEventManager_js_1 = require("./NetworkEventManager.js");
|
|
24
25
|
/**
|
|
25
26
|
* We use symbols to prevent any external parties listening to these events.
|
|
26
27
|
* They are internal to Puppeteer.
|
|
@@ -40,39 +41,7 @@ exports.NetworkManagerEmittedEvents = {
|
|
|
40
41
|
class NetworkManager extends EventEmitter_js_1.EventEmitter {
|
|
41
42
|
constructor(client, ignoreHTTPSErrors, frameManager) {
|
|
42
43
|
super();
|
|
43
|
-
|
|
44
|
-
* There are four possible orders of events:
|
|
45
|
-
* A. `_onRequestWillBeSent`
|
|
46
|
-
* B. `_onRequestWillBeSent`, `_onRequestPaused`
|
|
47
|
-
* C. `_onRequestPaused`, `_onRequestWillBeSent`
|
|
48
|
-
* D. `_onRequestPaused`, `_onRequestWillBeSent`, `_onRequestPaused`
|
|
49
|
-
* (see crbug.com/1196004)
|
|
50
|
-
*
|
|
51
|
-
* For `_onRequest` we need the event from `_onRequestWillBeSent` and
|
|
52
|
-
* optionally the `interceptionId` from `_onRequestPaused`.
|
|
53
|
-
*
|
|
54
|
-
* If request interception is disabled, call `_onRequest` once per call to
|
|
55
|
-
* `_onRequestWillBeSent`.
|
|
56
|
-
* If request interception is enabled, call `_onRequest` once per call to
|
|
57
|
-
* `_onRequestPaused` (once per `interceptionId`).
|
|
58
|
-
*
|
|
59
|
-
* Events are stored to allow for subsequent events to call `_onRequest`.
|
|
60
|
-
*
|
|
61
|
-
* Note that (chains of) redirect requests have the same `requestId` (!) as
|
|
62
|
-
* the original request. We have to anticipate series of events like these:
|
|
63
|
-
* A. `_onRequestWillBeSent`,
|
|
64
|
-
* `_onRequestWillBeSent`, ...
|
|
65
|
-
* B. `_onRequestWillBeSent`, `_onRequestPaused`,
|
|
66
|
-
* `_onRequestWillBeSent`, `_onRequestPaused`, ...
|
|
67
|
-
* C. `_onRequestWillBeSent`, `_onRequestPaused`,
|
|
68
|
-
* `_onRequestPaused`, `_onRequestWillBeSent`, ...
|
|
69
|
-
* D. `_onRequestPaused`, `_onRequestWillBeSent`,
|
|
70
|
-
* `_onRequestPaused`, `_onRequestWillBeSent`, `_onRequestPaused`, ...
|
|
71
|
-
* (see crbug.com/1196004)
|
|
72
|
-
*/
|
|
73
|
-
this._requestIdToRequestWillBeSentEvent = new Map();
|
|
74
|
-
this._requestIdToRequestPausedEvent = new Map();
|
|
75
|
-
this._requestIdToRequest = new Map();
|
|
44
|
+
this._networkEventManager = new NetworkEventManager_js_1.NetworkEventManager();
|
|
76
45
|
this._extraHTTPHeaders = {};
|
|
77
46
|
this._credentials = null;
|
|
78
47
|
this._attemptedAuthentications = new Set();
|
|
@@ -95,6 +64,7 @@ class NetworkManager extends EventEmitter_js_1.EventEmitter {
|
|
|
95
64
|
this._client.on('Network.responseReceived', this._onResponseReceived.bind(this));
|
|
96
65
|
this._client.on('Network.loadingFinished', this._onLoadingFinished.bind(this));
|
|
97
66
|
this._client.on('Network.loadingFailed', this._onLoadingFailed.bind(this));
|
|
67
|
+
this._client.on('Network.responseReceivedExtraInfo', this._onResponseReceivedExtraInfo.bind(this));
|
|
98
68
|
}
|
|
99
69
|
async initialize() {
|
|
100
70
|
await this._client.send('Network.enable');
|
|
@@ -122,9 +92,7 @@ class NetworkManager extends EventEmitter_js_1.EventEmitter {
|
|
|
122
92
|
return Object.assign({}, this._extraHTTPHeaders);
|
|
123
93
|
}
|
|
124
94
|
numRequestsInProgress() {
|
|
125
|
-
return
|
|
126
|
-
return !request.response();
|
|
127
|
-
}).length;
|
|
95
|
+
return this._networkEventManager.numRequestsInProgress();
|
|
128
96
|
}
|
|
129
97
|
async setOfflineMode(value) {
|
|
130
98
|
this._emulatedNetworkConditions.offline = value;
|
|
@@ -197,13 +165,16 @@ class NetworkManager extends EventEmitter_js_1.EventEmitter {
|
|
|
197
165
|
// Request interception doesn't happen for data URLs with Network Service.
|
|
198
166
|
if (this._userRequestInterceptionEnabled &&
|
|
199
167
|
!event.request.url.startsWith('data:')) {
|
|
200
|
-
const requestId = event
|
|
201
|
-
|
|
202
|
-
|
|
168
|
+
const { requestId: networkRequestId } = event;
|
|
169
|
+
this._networkEventManager.storeRequestWillBeSent(networkRequestId, event);
|
|
170
|
+
/**
|
|
171
|
+
* CDP may have sent a Fetch.requestPaused event already. Check for it.
|
|
172
|
+
*/
|
|
173
|
+
const requestPausedEvent = this._networkEventManager.getRequestPaused(networkRequestId);
|
|
203
174
|
if (requestPausedEvent) {
|
|
204
|
-
const
|
|
205
|
-
this._onRequest(event,
|
|
206
|
-
this.
|
|
175
|
+
const { requestId: fetchRequestId } = requestPausedEvent;
|
|
176
|
+
this._onRequest(event, fetchRequestId);
|
|
177
|
+
this._networkEventManager.forgetRequestPaused(networkRequestId);
|
|
207
178
|
}
|
|
208
179
|
return;
|
|
209
180
|
}
|
|
@@ -229,6 +200,15 @@ class NetworkManager extends EventEmitter_js_1.EventEmitter {
|
|
|
229
200
|
})
|
|
230
201
|
.catch(helper_js_1.debugError);
|
|
231
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* CDP may send a Fetch.requestPaused without or before a
|
|
205
|
+
* Network.requestWillBeSent
|
|
206
|
+
*
|
|
207
|
+
* CDP may send multiple Fetch.requestPaused
|
|
208
|
+
* for the same Network.requestWillBeSent.
|
|
209
|
+
*
|
|
210
|
+
*
|
|
211
|
+
*/
|
|
232
212
|
_onRequestPaused(event) {
|
|
233
213
|
if (!this._userRequestInterceptionEnabled &&
|
|
234
214
|
this._protocolRequestInterceptionEnabled) {
|
|
@@ -238,54 +218,75 @@ class NetworkManager extends EventEmitter_js_1.EventEmitter {
|
|
|
238
218
|
})
|
|
239
219
|
.catch(helper_js_1.debugError);
|
|
240
220
|
}
|
|
241
|
-
const requestId = event
|
|
242
|
-
|
|
243
|
-
if (!requestId) {
|
|
221
|
+
const { networkId: networkRequestId, requestId: fetchRequestId } = event;
|
|
222
|
+
if (!networkRequestId) {
|
|
244
223
|
return;
|
|
245
224
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
(requestWillBeSentEvent
|
|
250
|
-
requestWillBeSentEvent.request.
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
225
|
+
const requestWillBeSentEvent = (() => {
|
|
226
|
+
const requestWillBeSentEvent = this._networkEventManager.getRequestWillBeSent(networkRequestId);
|
|
227
|
+
// redirect requests have the same `requestId`,
|
|
228
|
+
if (requestWillBeSentEvent &&
|
|
229
|
+
(requestWillBeSentEvent.request.url !== event.request.url ||
|
|
230
|
+
requestWillBeSentEvent.request.method !== event.request.method)) {
|
|
231
|
+
this._networkEventManager.forgetRequestWillBeSent(networkRequestId);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
return requestWillBeSentEvent;
|
|
235
|
+
})();
|
|
254
236
|
if (requestWillBeSentEvent) {
|
|
255
|
-
this._onRequest(requestWillBeSentEvent,
|
|
256
|
-
this._requestIdToRequestWillBeSentEvent.delete(requestId);
|
|
237
|
+
this._onRequest(requestWillBeSentEvent, fetchRequestId);
|
|
257
238
|
}
|
|
258
239
|
else {
|
|
259
|
-
this.
|
|
240
|
+
this._networkEventManager.storeRequestPaused(networkRequestId, event);
|
|
260
241
|
}
|
|
261
242
|
}
|
|
262
|
-
_onRequest(event,
|
|
243
|
+
_onRequest(event, fetchRequestId) {
|
|
263
244
|
let redirectChain = [];
|
|
264
245
|
if (event.redirectResponse) {
|
|
265
|
-
|
|
246
|
+
// We want to emit a response and requestfinished for the
|
|
247
|
+
// redirectResponse, but we can't do so unless we have a
|
|
248
|
+
// responseExtraInfo ready to pair it up with. If we don't have any
|
|
249
|
+
// responseExtraInfos saved in our queue, they we have to wait until
|
|
250
|
+
// the next one to emit response and requestfinished, *and* we should
|
|
251
|
+
// also wait to emit this Request too because it should come after the
|
|
252
|
+
// response/requestfinished.
|
|
253
|
+
let redirectResponseExtraInfo = null;
|
|
254
|
+
if (event.redirectHasExtraInfo) {
|
|
255
|
+
redirectResponseExtraInfo = this._networkEventManager
|
|
256
|
+
.responseExtraInfo(event.requestId)
|
|
257
|
+
.shift();
|
|
258
|
+
if (!redirectResponseExtraInfo) {
|
|
259
|
+
this._networkEventManager.queueRedirectInfo(event.requestId, {
|
|
260
|
+
event,
|
|
261
|
+
fetchRequestId,
|
|
262
|
+
});
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
const request = this._networkEventManager.getRequest(event.requestId);
|
|
266
267
|
// If we connect late to the target, we could have missed the
|
|
267
268
|
// requestWillBeSent event.
|
|
268
269
|
if (request) {
|
|
269
|
-
this._handleRequestRedirect(request, event.redirectResponse);
|
|
270
|
+
this._handleRequestRedirect(request, event.redirectResponse, redirectResponseExtraInfo);
|
|
270
271
|
redirectChain = request._redirectChain;
|
|
271
272
|
}
|
|
272
273
|
}
|
|
273
274
|
const frame = event.frameId
|
|
274
275
|
? this._frameManager.frame(event.frameId)
|
|
275
276
|
: null;
|
|
276
|
-
const request = new HTTPRequest_js_1.HTTPRequest(this._client, frame,
|
|
277
|
-
this.
|
|
277
|
+
const request = new HTTPRequest_js_1.HTTPRequest(this._client, frame, fetchRequestId, this._userRequestInterceptionEnabled, event, redirectChain);
|
|
278
|
+
this._networkEventManager.storeRequest(event.requestId, request);
|
|
278
279
|
this.emit(exports.NetworkManagerEmittedEvents.Request, request);
|
|
279
280
|
request.finalizeInterceptions();
|
|
280
281
|
}
|
|
281
282
|
_onRequestServedFromCache(event) {
|
|
282
|
-
const request = this.
|
|
283
|
+
const request = this._networkEventManager.getRequest(event.requestId);
|
|
283
284
|
if (request)
|
|
284
285
|
request._fromMemoryCache = true;
|
|
285
286
|
this.emit(exports.NetworkManagerEmittedEvents.RequestServedFromCache, request);
|
|
286
287
|
}
|
|
287
|
-
_handleRequestRedirect(request, responsePayload) {
|
|
288
|
-
const response = new HTTPResponse_js_1.HTTPResponse(this._client, request, responsePayload);
|
|
288
|
+
_handleRequestRedirect(request, responsePayload, extraInfo) {
|
|
289
|
+
const response = new HTTPResponse_js_1.HTTPResponse(this._client, request, responsePayload, extraInfo);
|
|
289
290
|
request._response = response;
|
|
290
291
|
request._redirectChain.push(request);
|
|
291
292
|
response._resolveBody(new Error('Response body is unavailable for redirect responses'));
|
|
@@ -293,27 +294,85 @@ class NetworkManager extends EventEmitter_js_1.EventEmitter {
|
|
|
293
294
|
this.emit(exports.NetworkManagerEmittedEvents.Response, response);
|
|
294
295
|
this.emit(exports.NetworkManagerEmittedEvents.RequestFinished, request);
|
|
295
296
|
}
|
|
296
|
-
|
|
297
|
-
const request = this.
|
|
297
|
+
_emitResponseEvent(responseReceived, extraInfo) {
|
|
298
|
+
const request = this._networkEventManager.getRequest(responseReceived.requestId);
|
|
298
299
|
// FileUpload sends a response without a matching request.
|
|
299
300
|
if (!request)
|
|
300
301
|
return;
|
|
301
|
-
const
|
|
302
|
+
const extraInfos = this._networkEventManager.responseExtraInfo(responseReceived.requestId);
|
|
303
|
+
if (extraInfos.length) {
|
|
304
|
+
(0, helper_js_1.debugError)(new Error('Unexpected extraInfo events for request ' +
|
|
305
|
+
responseReceived.requestId));
|
|
306
|
+
}
|
|
307
|
+
const response = new HTTPResponse_js_1.HTTPResponse(this._client, request, responseReceived.response, extraInfo);
|
|
302
308
|
request._response = response;
|
|
303
309
|
this.emit(exports.NetworkManagerEmittedEvents.Response, response);
|
|
304
310
|
}
|
|
311
|
+
_onResponseReceived(event) {
|
|
312
|
+
const request = this._networkEventManager.getRequest(event.requestId);
|
|
313
|
+
let extraInfo = null;
|
|
314
|
+
if (request && !request._fromMemoryCache && event.hasExtraInfo) {
|
|
315
|
+
extraInfo = this._networkEventManager
|
|
316
|
+
.responseExtraInfo(event.requestId)
|
|
317
|
+
.shift();
|
|
318
|
+
if (!extraInfo) {
|
|
319
|
+
// Wait until we get the corresponding ExtraInfo event.
|
|
320
|
+
this._networkEventManager.queueEventGroup(event.requestId, {
|
|
321
|
+
responseReceivedEvent: event,
|
|
322
|
+
});
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
this._emitResponseEvent(event, extraInfo);
|
|
327
|
+
}
|
|
328
|
+
_onResponseReceivedExtraInfo(event) {
|
|
329
|
+
// We may have skipped a redirect response/request pair due to waiting for
|
|
330
|
+
// this ExtraInfo event. If so, continue that work now that we have the
|
|
331
|
+
// request.
|
|
332
|
+
const redirectInfo = this._networkEventManager.takeQueuedRedirectInfo(event.requestId);
|
|
333
|
+
if (redirectInfo) {
|
|
334
|
+
this._networkEventManager.responseExtraInfo(event.requestId).push(event);
|
|
335
|
+
this._onRequest(redirectInfo.event, redirectInfo.fetchRequestId);
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
// We may have skipped response and loading events because we didn't have
|
|
339
|
+
// this ExtraInfo event yet. If so, emit those events now.
|
|
340
|
+
const queuedEvents = this._networkEventManager.getQueuedEventGroup(event.requestId);
|
|
341
|
+
if (queuedEvents) {
|
|
342
|
+
this._emitResponseEvent(queuedEvents.responseReceivedEvent, event);
|
|
343
|
+
if (queuedEvents.loadingFinishedEvent) {
|
|
344
|
+
this._emitLoadingFinished(queuedEvents.loadingFinishedEvent);
|
|
345
|
+
}
|
|
346
|
+
if (queuedEvents.loadingFailedEvent) {
|
|
347
|
+
this._emitLoadingFailed(queuedEvents.loadingFailedEvent);
|
|
348
|
+
}
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
// Wait until we get another event that can use this ExtraInfo event.
|
|
352
|
+
this._networkEventManager.responseExtraInfo(event.requestId).push(event);
|
|
353
|
+
}
|
|
305
354
|
_forgetRequest(request, events) {
|
|
306
355
|
const requestId = request._requestId;
|
|
307
356
|
const interceptionId = request._interceptionId;
|
|
308
|
-
this.
|
|
357
|
+
this._networkEventManager.forgetRequest(requestId);
|
|
309
358
|
this._attemptedAuthentications.delete(interceptionId);
|
|
310
359
|
if (events) {
|
|
311
|
-
this.
|
|
312
|
-
this._requestIdToRequestPausedEvent.delete(requestId);
|
|
360
|
+
this._networkEventManager.forget(requestId);
|
|
313
361
|
}
|
|
314
362
|
}
|
|
315
363
|
_onLoadingFinished(event) {
|
|
316
|
-
|
|
364
|
+
// If the response event for this request is still waiting on a
|
|
365
|
+
// corresponding ExtraInfo event, then wait to emit this event too.
|
|
366
|
+
const queuedEvents = this._networkEventManager.getQueuedEventGroup(event.requestId);
|
|
367
|
+
if (queuedEvents) {
|
|
368
|
+
queuedEvents.loadingFinishedEvent = event;
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
this._emitLoadingFinished(event);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
_emitLoadingFinished(event) {
|
|
375
|
+
const request = this._networkEventManager.getRequest(event.requestId);
|
|
317
376
|
// For certain requestIds we never receive requestWillBeSent event.
|
|
318
377
|
// @see https://crbug.com/750469
|
|
319
378
|
if (!request)
|
|
@@ -326,7 +385,18 @@ class NetworkManager extends EventEmitter_js_1.EventEmitter {
|
|
|
326
385
|
this.emit(exports.NetworkManagerEmittedEvents.RequestFinished, request);
|
|
327
386
|
}
|
|
328
387
|
_onLoadingFailed(event) {
|
|
329
|
-
|
|
388
|
+
// If the response event for this request is still waiting on a
|
|
389
|
+
// corresponding ExtraInfo event, then wait to emit this event too.
|
|
390
|
+
const queuedEvents = this._networkEventManager.getQueuedEventGroup(event.requestId);
|
|
391
|
+
if (queuedEvents) {
|
|
392
|
+
queuedEvents.loadingFailedEvent = event;
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
this._emitLoadingFailed(event);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
_emitLoadingFailed(event) {
|
|
399
|
+
const request = this._networkEventManager.getRequest(event.requestId);
|
|
330
400
|
// For certain requestIds we never receive requestWillBeSent event.
|
|
331
401
|
// @see https://crbug.com/750469
|
|
332
402
|
if (!request)
|
package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkManager.js","sourceRoot":"","sources":["../../../../src/common/NetworkManager.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,uDAAiD;AACjD,2CA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AAa,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF;AAxfD,wCAwfC"}
|
|
@@ -13,15 +13,14 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { BrowserConnectOptions } from './BrowserConnector.js';
|
|
16
|
+
import { PuppeteerErrors } from './Errors.js';
|
|
18
17
|
import { ConnectionTransport } from './ConnectionTransport.js';
|
|
19
18
|
import { DevicesMap } from './DeviceDescriptors.js';
|
|
20
|
-
import {
|
|
21
|
-
import { PredefinedNetworkConditions } from './NetworkConditions.js';
|
|
22
|
-
import { Product } from './Product.js';
|
|
19
|
+
import { Browser } from './Browser.js';
|
|
23
20
|
import { CustomQueryHandler } from './QueryHandler.js';
|
|
24
|
-
|
|
21
|
+
import { Product } from './Product.js';
|
|
22
|
+
import { BrowserConnectOptions } from './BrowserConnector.js';
|
|
23
|
+
import { PredefinedNetworkConditions } from './NetworkConditions.js';
|
|
25
24
|
/**
|
|
26
25
|
* Settings that are common to the Puppeteer class, regardless of enviroment.
|
|
27
26
|
* @internal
|
|
@@ -13,9 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { DOMWorld
|
|
16
|
+
import { WaitForSelectorOptions, DOMWorld } from './DOMWorld.js';
|
|
17
17
|
import { ElementHandle, JSHandle } from './JSHandle.js';
|
|
18
|
-
|
|
19
18
|
/**
|
|
20
19
|
* @internal
|
|
21
20
|
*/
|
|
@@ -13,15 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Protocol } from 'devtools-protocol';
|
|
17
|
-
|
|
18
|
-
import { Browser, BrowserContext } from './Browser.js';
|
|
19
|
-
import { CDPSession } from './Connection.js';
|
|
20
16
|
import { Page } from './Page.js';
|
|
17
|
+
import { WebWorker } from './WebWorker.js';
|
|
18
|
+
import { CDPSession } from './Connection.js';
|
|
19
|
+
import { Browser, BrowserContext } from './Browser.js';
|
|
21
20
|
import { Viewport } from './PuppeteerViewport.js';
|
|
21
|
+
import { Protocol } from 'devtools-protocol';
|
|
22
22
|
import { TaskQueue } from './TaskQueue.js';
|
|
23
|
-
import { WebWorker } from './WebWorker.js';
|
|
24
|
-
|
|
25
23
|
/**
|
|
26
24
|
* @public
|
|
27
25
|
*/
|
|
@@ -13,14 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Protocol } from 'devtools-protocol';
|
|
17
|
-
|
|
18
|
-
import { CDPSession } from './Connection.js';
|
|
19
|
-
import { EvaluateHandleFn, SerializableOrJSHandle } from './EvalTypes.js';
|
|
20
16
|
import { EventEmitter } from './EventEmitter.js';
|
|
21
17
|
import { ExecutionContext } from './ExecutionContext.js';
|
|
22
18
|
import { JSHandle } from './JSHandle.js';
|
|
23
|
-
|
|
19
|
+
import { CDPSession } from './Connection.js';
|
|
20
|
+
import { Protocol } from 'devtools-protocol';
|
|
21
|
+
import { EvaluateHandleFn, SerializableOrJSHandle } from './EvalTypes.js';
|
|
24
22
|
/**
|
|
25
23
|
* @internal
|
|
26
24
|
*/
|
|
@@ -13,22 +13,21 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { LaunchOptions } from './LaunchOptions.js';
|
|
16
17
|
import { Connection } from '../common/Connection.js';
|
|
17
18
|
import { Product } from '../common/Product.js';
|
|
18
|
-
|
|
19
|
-
import { LaunchOptions } from './LaunchOptions.js';
|
|
20
|
-
|
|
21
19
|
export declare class BrowserRunner {
|
|
22
20
|
private _product;
|
|
23
21
|
private _executablePath;
|
|
24
22
|
private _processArguments;
|
|
25
|
-
private
|
|
23
|
+
private _userDataDir;
|
|
24
|
+
private _isTempUserDataDir?;
|
|
26
25
|
proc: any;
|
|
27
26
|
connection: any;
|
|
28
27
|
private _closed;
|
|
29
28
|
private _listeners;
|
|
30
29
|
private _processClosing;
|
|
31
|
-
constructor(product: Product, executablePath: string, processArguments: string[],
|
|
30
|
+
constructor(product: Product, executablePath: string, processArguments: string[], userDataDir: string, isTempUserDataDir?: boolean);
|
|
32
31
|
start(options: LaunchOptions): void;
|
|
33
32
|
close(): Promise<void>;
|
|
34
33
|
kill(): void;
|
package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserRunner.d.ts","sourceRoot":"","sources":["../../../../src/node/BrowserRunner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"BrowserRunner.d.ts","sourceRoot":"","sources":["../../../../src/node/BrowserRunner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAaH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAc/C,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,iBAAiB,CAAW;IACpC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,kBAAkB,CAAC,CAAU;IAErC,IAAI,MAAQ;IACZ,UAAU,MAAQ;IAElB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,eAAe,CAAgB;gBAGrC,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,MAAM,EACtB,gBAAgB,EAAE,MAAM,EAAE,EAC1B,WAAW,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,OAAO;IAS7B,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IA2FnC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBtB,IAAI,IAAI,IAAI;IA0BN,eAAe,CAAC,OAAO,EAAE;QAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,iBAAiB,EAAE,MAAM,CAAC;KAC3B,GAAG,OAAO,CAAC,UAAU,CAAC;CAsBxB"}
|
|
@@ -39,24 +39,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
exports.BrowserRunner = void 0;
|
|
41
41
|
const Debug_js_1 = require("../common/Debug.js");
|
|
42
|
-
const rimraf_1 = __importDefault(require("rimraf"));
|
|
43
42
|
const childProcess = __importStar(require("child_process"));
|
|
43
|
+
const fs = __importStar(require("fs"));
|
|
44
|
+
const path = __importStar(require("path"));
|
|
45
|
+
const readline = __importStar(require("readline"));
|
|
46
|
+
const rimraf_1 = __importDefault(require("rimraf"));
|
|
47
|
+
const util_1 = require("util");
|
|
44
48
|
const assert_js_1 = require("../common/assert.js");
|
|
45
49
|
const helper_js_1 = require("../common/helper.js");
|
|
46
50
|
const Connection_js_1 = require("../common/Connection.js");
|
|
47
51
|
const NodeWebSocketTransport_js_1 = require("../node/NodeWebSocketTransport.js");
|
|
48
52
|
const PipeTransport_js_1 = require("./PipeTransport.js");
|
|
49
|
-
const readline = __importStar(require("readline"));
|
|
50
53
|
const Errors_js_1 = require("../common/Errors.js");
|
|
51
|
-
const util_1 = require("util");
|
|
52
54
|
const removeFolderAsync = (0, util_1.promisify)(rimraf_1.default);
|
|
55
|
+
const renameAsync = (0, util_1.promisify)(fs.rename);
|
|
56
|
+
const unlinkAsync = (0, util_1.promisify)(fs.unlink);
|
|
53
57
|
const debugLauncher = (0, Debug_js_1.debug)('puppeteer:launcher');
|
|
54
58
|
const PROCESS_ERROR_EXPLANATION = `Puppeteer was unable to kill the process which ran the browser binary.
|
|
55
59
|
This means that, on future Puppeteer launches, Puppeteer might not be able to launch the browser.
|
|
56
60
|
Please check your open processes and ensure that the browser processes that Puppeteer launched have been killed.
|
|
57
61
|
If you think this is a bug, please report it on the Puppeteer issue tracker.`;
|
|
58
62
|
class BrowserRunner {
|
|
59
|
-
constructor(product, executablePath, processArguments,
|
|
63
|
+
constructor(product, executablePath, processArguments, userDataDir, isTempUserDataDir) {
|
|
60
64
|
this.proc = null;
|
|
61
65
|
this.connection = null;
|
|
62
66
|
this._closed = true;
|
|
@@ -64,7 +68,8 @@ class BrowserRunner {
|
|
|
64
68
|
this._product = product;
|
|
65
69
|
this._executablePath = executablePath;
|
|
66
70
|
this._processArguments = processArguments;
|
|
67
|
-
this.
|
|
71
|
+
this._userDataDir = userDataDir;
|
|
72
|
+
this._isTempUserDataDir = isTempUserDataDir;
|
|
68
73
|
}
|
|
69
74
|
start(options) {
|
|
70
75
|
const { handleSIGINT, handleSIGTERM, handleSIGHUP, dumpio, env, pipe } = options;
|
|
@@ -98,18 +103,37 @@ class BrowserRunner {
|
|
|
98
103
|
}
|
|
99
104
|
this._closed = false;
|
|
100
105
|
this._processClosing = new Promise((fulfill, reject) => {
|
|
101
|
-
this.proc.once('exit', () => {
|
|
106
|
+
this.proc.once('exit', async () => {
|
|
102
107
|
this._closed = true;
|
|
103
108
|
// Cleanup as processes exit.
|
|
104
|
-
if (this.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
if (this._isTempUserDataDir) {
|
|
110
|
+
try {
|
|
111
|
+
await removeFolderAsync(this._userDataDir);
|
|
112
|
+
fulfill();
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
108
115
|
console.error(error);
|
|
109
116
|
reject(error);
|
|
110
|
-
}
|
|
117
|
+
}
|
|
111
118
|
}
|
|
112
119
|
else {
|
|
120
|
+
if (this._product === 'firefox') {
|
|
121
|
+
try {
|
|
122
|
+
// When an existing user profile has been used remove the user
|
|
123
|
+
// preferences file and restore possibly backuped preferences.
|
|
124
|
+
await unlinkAsync(path.join(this._userDataDir, 'user.js'));
|
|
125
|
+
const prefsBackupPath = path.join(this._userDataDir, 'prefs.js.puppeteer');
|
|
126
|
+
if (fs.existsSync(prefsBackupPath)) {
|
|
127
|
+
const prefsPath = path.join(this._userDataDir, 'prefs.js');
|
|
128
|
+
await unlinkAsync(prefsPath);
|
|
129
|
+
await renameAsync(prefsBackupPath, prefsPath);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
console.error(error);
|
|
134
|
+
reject(error);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
113
137
|
fulfill();
|
|
114
138
|
}
|
|
115
139
|
});
|
|
@@ -130,7 +154,7 @@ class BrowserRunner {
|
|
|
130
154
|
close() {
|
|
131
155
|
if (this._closed)
|
|
132
156
|
return Promise.resolve();
|
|
133
|
-
if (this.
|
|
157
|
+
if (this._isTempUserDataDir && this._product !== 'firefox') {
|
|
134
158
|
this.kill();
|
|
135
159
|
}
|
|
136
160
|
else if (this.connection) {
|
|
@@ -146,11 +170,6 @@ class BrowserRunner {
|
|
|
146
170
|
return this._processClosing;
|
|
147
171
|
}
|
|
148
172
|
kill() {
|
|
149
|
-
// Attempt to remove temporary profile directory to avoid littering.
|
|
150
|
-
try {
|
|
151
|
-
rimraf_1.default.sync(this._tempDirectory);
|
|
152
|
-
}
|
|
153
|
-
catch (error) { }
|
|
154
173
|
// If the process failed to launch (for example if the browser executable path
|
|
155
174
|
// is invalid), then the process does not get a pid assigned. A call to
|
|
156
175
|
// `proc.kill` would error, as the `pid` to-be-killed can not be found.
|
|
@@ -162,6 +181,13 @@ class BrowserRunner {
|
|
|
162
181
|
throw new Error(`${PROCESS_ERROR_EXPLANATION}\nError cause: ${error.stack}`);
|
|
163
182
|
}
|
|
164
183
|
}
|
|
184
|
+
// Attempt to remove temporary profile directory to avoid littering.
|
|
185
|
+
try {
|
|
186
|
+
if (this._isTempUserDataDir) {
|
|
187
|
+
rimraf_1.default.sync(this._userDataDir);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
catch (error) { }
|
|
165
191
|
// Cleanup this listener last, as that makes sure the full callback runs. If we
|
|
166
192
|
// perform this earlier, then the previous function calls would not happen.
|
|
167
193
|
helper_js_1.helper.removeEventListeners(this._listeners);
|