chrome-devtools-frontend 1.0.1040857 → 1.0.1070764
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 +4 -1
- package/README.md +4 -10
- package/config/gni/devtools_grd_files.gni +41 -24
- package/config/gni/devtools_image_files.gni +4 -0
- package/docs/README.md +81 -0
- package/{ARCHITECTURE.md → docs/architecture_of_devtools.md} +5 -6
- package/docs/{images/architecture-lazy-loading-features.png → architecture_of_devtools_lazy_loading_features.png} +0 -0
- package/docs/{images/module-visibility-rules.png → architecture_of_devtools_module_visibility_rules.png} +0 -0
- package/docs/design_guidelines.md +3 -1
- package/docs/{images/DevToolsDesignGuidelines.png → design_guidelines.png} +0 -0
- package/docs/l10n.md +293 -0
- package/docs/navbar.md +13 -0
- package/docs/third_party_guidelines.md +78 -0
- package/docs/workflows.md +6 -1
- package/extension-api/ExtensionAPI.d.ts +1 -0
- package/front_end/Images/src/edit-icon.svg +3 -0
- package/front_end/Images/src/frame-embedded-icon.svg +61 -0
- package/front_end/Images/src/frame-icon.svg +54 -0
- package/front_end/Images/src/trash_bin_material_icon.svg +1 -0
- package/front_end/Images/src/triangle-expanded.svg +1 -1
- package/front_end/Tests.js +0 -25
- package/front_end/core/common/ResourceType.ts +7 -1
- package/front_end/core/common/Revealer.ts +3 -0
- package/front_end/core/common/common.ts +2 -0
- package/front_end/core/dom_extension/DOMExtension.ts +1 -138
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
- package/front_end/core/host/ResourceLoader.ts +15 -5
- package/front_end/core/host/UserMetrics.ts +43 -10
- package/front_end/core/i18n/locales/af.json +194 -110
- package/front_end/core/i18n/locales/am.json +205 -121
- package/front_end/core/i18n/locales/ar.json +196 -112
- package/front_end/core/i18n/locales/as.json +195 -111
- package/front_end/core/i18n/locales/az.json +196 -112
- package/front_end/core/i18n/locales/be.json +193 -109
- package/front_end/core/i18n/locales/bg.json +193 -109
- package/front_end/core/i18n/locales/bn.json +197 -113
- package/front_end/core/i18n/locales/bs.json +194 -110
- package/front_end/core/i18n/locales/ca.json +197 -113
- package/front_end/core/i18n/locales/cs.json +192 -108
- package/front_end/core/i18n/locales/cy.json +193 -109
- package/front_end/core/i18n/locales/da.json +194 -110
- package/front_end/core/i18n/locales/de.json +199 -115
- package/front_end/core/i18n/locales/el.json +191 -107
- package/front_end/core/i18n/locales/en-GB.json +193 -109
- package/front_end/core/i18n/locales/en-US.json +313 -229
- package/front_end/core/i18n/locales/en-XL.json +313 -229
- package/front_end/core/i18n/locales/es-419.json +195 -111
- package/front_end/core/i18n/locales/es.json +192 -108
- package/front_end/core/i18n/locales/et.json +195 -111
- package/front_end/core/i18n/locales/eu.json +197 -113
- package/front_end/core/i18n/locales/fa.json +243 -159
- package/front_end/core/i18n/locales/fi.json +192 -108
- package/front_end/core/i18n/locales/fil.json +193 -109
- package/front_end/core/i18n/locales/fr-CA.json +198 -114
- package/front_end/core/i18n/locales/fr.json +220 -136
- package/front_end/core/i18n/locales/gl.json +196 -112
- package/front_end/core/i18n/locales/gu.json +196 -112
- package/front_end/core/i18n/locales/he.json +201 -117
- package/front_end/core/i18n/locales/hi.json +200 -116
- package/front_end/core/i18n/locales/hr.json +192 -108
- package/front_end/core/i18n/locales/hu.json +195 -111
- package/front_end/core/i18n/locales/hy.json +193 -109
- package/front_end/core/i18n/locales/id.json +198 -114
- package/front_end/core/i18n/locales/is.json +193 -109
- package/front_end/core/i18n/locales/it.json +194 -110
- package/front_end/core/i18n/locales/ja.json +192 -108
- package/front_end/core/i18n/locales/ka.json +194 -110
- package/front_end/core/i18n/locales/kk.json +194 -110
- package/front_end/core/i18n/locales/km.json +196 -112
- package/front_end/core/i18n/locales/kn.json +193 -109
- package/front_end/core/i18n/locales/ko.json +196 -112
- package/front_end/core/i18n/locales/ky.json +196 -112
- package/front_end/core/i18n/locales/lo.json +196 -112
- package/front_end/core/i18n/locales/lt.json +192 -108
- package/front_end/core/i18n/locales/lv.json +194 -110
- package/front_end/core/i18n/locales/mk.json +194 -110
- package/front_end/core/i18n/locales/ml.json +194 -110
- package/front_end/core/i18n/locales/mn.json +194 -110
- package/front_end/core/i18n/locales/mr.json +193 -109
- package/front_end/core/i18n/locales/ms.json +193 -109
- package/front_end/core/i18n/locales/my.json +198 -114
- package/front_end/core/i18n/locales/ne.json +197 -113
- package/front_end/core/i18n/locales/nl.json +193 -109
- package/front_end/core/i18n/locales/no.json +195 -111
- package/front_end/core/i18n/locales/or.json +197 -113
- package/front_end/core/i18n/locales/pa.json +195 -111
- package/front_end/core/i18n/locales/pl.json +195 -111
- package/front_end/core/i18n/locales/pt-PT.json +195 -111
- package/front_end/core/i18n/locales/pt.json +194 -110
- package/front_end/core/i18n/locales/ro.json +189 -105
- package/front_end/core/i18n/locales/ru.json +191 -107
- package/front_end/core/i18n/locales/si.json +194 -110
- package/front_end/core/i18n/locales/sk.json +192 -108
- package/front_end/core/i18n/locales/sl.json +193 -109
- package/front_end/core/i18n/locales/sq.json +193 -109
- package/front_end/core/i18n/locales/sr-Latn.json +192 -108
- package/front_end/core/i18n/locales/sr.json +192 -108
- package/front_end/core/i18n/locales/sv.json +191 -107
- package/front_end/core/i18n/locales/sw.json +195 -111
- package/front_end/core/i18n/locales/ta.json +193 -109
- package/front_end/core/i18n/locales/te.json +198 -114
- package/front_end/core/i18n/locales/th.json +194 -110
- package/front_end/core/i18n/locales/tr.json +192 -108
- package/front_end/core/i18n/locales/uk.json +192 -108
- package/front_end/core/i18n/locales/ur.json +194 -110
- package/front_end/core/i18n/locales/uz.json +190 -106
- package/front_end/core/i18n/locales/vi.json +195 -111
- package/front_end/core/i18n/locales/zh-HK.json +193 -109
- package/front_end/core/i18n/locales/zh-TW.json +195 -111
- package/front_end/core/i18n/locales/zh.json +194 -110
- package/front_end/core/i18n/locales/zu.json +193 -109
- package/front_end/core/platform/dom-utilities.ts +107 -0
- package/front_end/core/platform/keyboard-utilities.ts +8 -0
- package/front_end/core/platform/string-utilities.ts +10 -0
- package/front_end/core/root/Runtime.ts +0 -2
- package/front_end/core/sdk/CPUProfileDataModel.ts +11 -4
- package/front_end/core/sdk/CPUThrottlingManager.ts +1 -1
- package/front_end/core/sdk/CSSMatchedStyles.ts +11 -12
- package/front_end/core/sdk/ChildTargetManager.ts +1 -1
- package/front_end/core/sdk/ConsoleModel.ts +3 -3
- package/front_end/core/sdk/DOMModel.ts +0 -1
- package/front_end/core/sdk/DebuggerModel.ts +4 -36
- package/front_end/core/sdk/FrameManager.ts +12 -33
- package/front_end/core/sdk/NetworkManager.ts +50 -16
- package/front_end/core/sdk/NetworkRequest.ts +49 -0
- package/front_end/core/sdk/ProfileTreeModel.ts +19 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +31 -32
- package/front_end/core/sdk/RuntimeModel.ts +1 -1
- package/front_end/core/sdk/ScreenCaptureModel.ts +3 -8
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +3 -0
- package/front_end/core/sdk/SourceMap.ts +14 -8
- package/front_end/core/sdk/SourceMapManager.ts +8 -6
- package/front_end/core/sdk/Target.ts +3 -3
- package/front_end/core/sdk/TargetManager.ts +12 -1
- package/front_end/core/sdk/sdk-legacy.ts +3 -0
- package/front_end/core/sdk/sdk-meta.ts +21 -0
- package/front_end/devtools_compatibility.js +17 -13
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -3
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -53
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +1 -0
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +0 -9
- package/front_end/entrypoints/formatter_worker/formatter_worker.ts +0 -4
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +5 -3
- package/front_end/entrypoints/js_app/js_app.ts +1 -0
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +17 -9
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +31 -38
- package/front_end/entrypoints/main/main-meta.ts +0 -2
- package/front_end/entrypoints/node_app/node_app.ts +2 -1
- package/front_end/entrypoints/shell/shell.ts +1 -2
- package/front_end/generated/ARIAProperties.js +8 -0
- package/front_end/generated/InspectorBackendCommands.js +32 -23
- package/front_end/generated/SupportedCSSProperties.js +97 -48
- package/front_end/generated/protocol-mapping.d.ts +67 -34
- package/front_end/generated/protocol-proxy-api.d.ts +52 -29
- package/front_end/generated/protocol.ts +344 -89
- package/front_end/legacy/legacy-defs.d.ts +1 -3
- package/front_end/legacy_test_runner/network_test_runner/network_test_runner.js +1 -1
- package/front_end/legacy_test_runner/performance_test_runner/TimelineTestRunner.js +10 -18
- package/front_end/legacy_test_runner/sources_test_runner/DebuggerTestRunner.js +3 -3
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +24 -0
- package/front_end/legacy_test_runner/test_runner/test_runner.js +15 -13
- package/front_end/models/bindings/BreakpointManager.ts +38 -21
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +19 -18
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +32 -37
- package/front_end/models/bindings/FileUtils.ts +3 -3
- package/front_end/models/bindings/IgnoreListManager.ts +14 -3
- package/front_end/models/bindings/ResourceMapping.ts +5 -28
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -13
- package/front_end/models/bindings/ResourceUtils.ts +1 -2
- package/front_end/models/emulation/DeviceModeModel.ts +0 -14
- package/front_end/models/extensions/ExtensionAPI.ts +22 -5
- package/front_end/models/extensions/ExtensionServer.ts +31 -14
- package/front_end/models/formatter/FormatterWorkerPool.ts +0 -31
- package/front_end/models/har/HARFormat.ts +68 -5
- package/front_end/models/har/Importer.ts +3 -5
- package/front_end/models/har/Log.ts +3 -0
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +24 -1
- package/front_end/models/issues_manager/DeprecationIssue.ts +112 -32
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +0 -10
- package/front_end/models/issues_manager/IssuesManager.ts +3 -12
- package/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +5 -6
- package/front_end/models/issues_manager/descriptions/arPermissionPolicyNotDelegated.md +11 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +121 -97
- package/front_end/models/logs/NetworkLog.ts +11 -11
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +5 -1
- package/front_end/models/persistence/NetworkPersistenceManager.ts +13 -5
- package/front_end/models/persistence/PersistenceImpl.ts +2 -1
- package/front_end/models/source_map_scopes/NamesResolver.ts +99 -56
- package/front_end/models/text_utils/TextUtils.ts +18 -34
- package/front_end/models/text_utils/text_utils-legacy.ts +0 -3
- package/front_end/models/timeline_model/TimelineModel.ts +2 -2
- package/front_end/models/timeline_model/timeline_model-legacy.ts +0 -9
- package/front_end/models/timeline_model/timeline_model.ts +0 -3
- package/front_end/panels/accessibility/ARIAAttributesView.ts +2 -1
- package/front_end/panels/application/AppManifestView.ts +15 -7
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +2 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +15 -9
- package/front_end/panels/application/DOMStorageModel.ts +16 -18
- package/front_end/panels/application/IndexedDBModel.ts +97 -134
- package/front_end/panels/application/IndexedDBViews.ts +1 -3
- package/front_end/panels/application/InterestGroupStorageModel.ts +3 -0
- package/front_end/panels/application/InterestGroupTreeElement.ts +1 -1
- package/front_end/panels/application/ReportingApiTreeElement.ts +2 -1
- package/front_end/panels/application/ReportingApiView.ts +5 -4
- package/front_end/panels/application/StorageView.ts +30 -26
- package/front_end/panels/application/TrustTokensTreeElement.ts +5 -4
- package/front_end/panels/application/application.ts +6 -0
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +6 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +149 -92
- package/front_end/panels/application/components/FrameDetailsView.ts +66 -7
- package/front_end/panels/application/components/Prerender2.ts +74 -14
- package/front_end/panels/application/components/ProtocolHandlersView.ts +6 -1
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +184 -0
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +173 -0
- package/front_end/panels/application/components/backForwardCacheView.css +2 -3
- package/front_end/panels/application/components/components.ts +4 -0
- package/front_end/panels/application/components/frameDetailsReportView.css +1 -1
- package/front_end/panels/application/components/permissionsPolicySection.css +1 -1
- package/front_end/panels/application/components/protocolHandlersView.css +5 -1
- package/front_end/panels/application/components/sharedStorageAccessGrid.css +26 -0
- package/front_end/panels/application/components/sharedStorageMetadataView.css +11 -0
- package/front_end/panels/application/components/stackTraceLinkButton.css +1 -1
- package/front_end/panels/application/components/stackTraceRow.css +1 -1
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -1
- package/front_end/panels/console/ConsoleFormat.ts +2 -2
- package/front_end/panels/console/ConsolePinPane.ts +1 -1
- package/front_end/panels/console/ConsolePrompt.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +1 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
- package/front_end/panels/console/consoleView.css +5 -0
- package/front_end/panels/coverage/CoverageView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +6 -24
- package/front_end/panels/developer_resources/developer_resources-meta.ts +1 -1
- package/front_end/panels/elements/CSSRuleValidator.ts +147 -65
- package/front_end/panels/elements/CSSRuleValidatorHelper.ts +32 -2
- package/front_end/panels/elements/ClassesPaneWidget.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +19 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +3 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +9 -3
- package/front_end/panels/elements/StylesSidebarPane.ts +46 -19
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +1 -2
- package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +2 -3
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -2
- package/front_end/panels/elements/components/computedStyleProperty.css +3 -3
- package/front_end/panels/elements/components/computedStyleTrace.css +8 -4
- package/front_end/panels/elements/components/cssHintDetailsView.css +2 -8
- package/front_end/panels/elements/elements-meta.ts +28 -0
- package/front_end/panels/elements/stylesSectionTree.css +2 -1
- package/front_end/panels/elements/stylesSidebarPane.css +7 -0
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +2 -0
- package/front_end/panels/issues/IssueView.ts +5 -4
- package/front_end/panels/js_profiler/js_profiler-meta.ts +139 -0
- package/front_end/panels/lighthouse/LighthouseController.ts +4 -9
- package/front_end/panels/lighthouse/LighthousePanel.ts +38 -32
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +16 -15
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +3 -3
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +6 -1
- package/front_end/panels/lighthouse/LighthouseReporterTypes.ts +3 -2
- package/front_end/panels/lighthouse/LighthouseStartView.ts +162 -89
- package/front_end/panels/lighthouse/lighthouseStartView.css +7 -36
- package/front_end/panels/media/TickingFlameChart.ts +9 -3
- package/front_end/panels/network/NetworkDataGridNode.ts +79 -9
- package/front_end/panels/network/NetworkItemView.ts +4 -3
- package/front_end/panels/network/NetworkLogView.ts +40 -42
- package/front_end/panels/network/NetworkLogViewColumns.ts +2 -1
- package/front_end/panels/network/RequestCookiesView.ts +28 -0
- package/front_end/panels/network/components/HeaderSectionRow.css +176 -0
- package/front_end/panels/network/components/HeaderSectionRow.ts +477 -0
- package/front_end/panels/network/components/RequestHeaderSection.css +59 -0
- package/front_end/panels/network/components/RequestHeaderSection.ts +133 -0
- package/front_end/panels/network/components/RequestHeadersView.css +1 -59
- package/front_end/panels/network/components/RequestHeadersView.ts +43 -417
- package/front_end/panels/network/components/ResponseHeaderSection.css +21 -0
- package/front_end/panels/network/components/ResponseHeaderSection.ts +635 -0
- package/front_end/panels/network/components/components.ts +6 -0
- package/front_end/panels/network/network-meta.ts +0 -16
- package/front_end/panels/network/requestPayloadTree.css +0 -1
- package/front_end/panels/profiler/HeapProfileView.ts +7 -6
- package/front_end/panels/profiler/LiveHeapProfileView.ts +2 -2
- package/front_end/panels/sensors/sensors-meta.ts +0 -10
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +61 -43
- package/front_end/panels/settings/KeybindsSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +1 -3
- package/front_end/panels/settings/components/syncSection.css +1 -1
- package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +38 -35
- package/front_end/panels/sources/BreakpointsSidebarPane.ts +265 -25
- package/front_end/panels/sources/CallStackSidebarPane.ts +10 -1
- package/front_end/panels/sources/CoveragePlugin.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +316 -109
- package/front_end/panels/sources/GoToLineQuickOpen.ts +22 -49
- package/front_end/panels/sources/NavigatorView.ts +2 -10
- package/front_end/panels/sources/OpenFileQuickOpen.ts +0 -13
- package/front_end/panels/sources/OutlineQuickOpen.ts +274 -45
- package/front_end/panels/sources/SourcesNavigator.ts +2 -2
- package/front_end/panels/sources/SourcesPanel.ts +13 -9
- package/front_end/panels/sources/SourcesView.ts +8 -2
- package/front_end/panels/sources/TabbedEditorContainer.ts +8 -0
- package/front_end/panels/sources/UISourceCodeFrame.ts +81 -34
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -2
- package/front_end/panels/sources/components/BreakpointsView.ts +472 -28
- package/front_end/panels/sources/components/BreakpointsViewUtils.ts +195 -0
- package/front_end/panels/sources/components/HeadersView.css +5 -1
- package/front_end/panels/sources/components/HeadersView.ts +18 -11
- package/front_end/panels/sources/components/breakpointsView.css +136 -11
- package/front_end/panels/sources/sources-legacy.ts +0 -5
- package/front_end/panels/sources/sources-meta.ts +113 -4
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +10 -6
- package/front_end/panels/timeline/PerformanceModel.ts +65 -18
- package/front_end/panels/timeline/TimelineController.ts +11 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -49
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelineLoader.ts +41 -24
- package/front_end/panels/timeline/TimelinePanel.ts +155 -57
- package/front_end/panels/timeline/TimelineUIUtils.ts +1 -263
- package/front_end/panels/webauthn/WebauthnPane.ts +2 -2
- package/front_end/panels/webauthn/webauthnPane.css +1 -0
- package/front_end/services/puppeteer/PuppeteerConnection.ts +51 -42
- package/front_end/third_party/additional_readme_paths.json +0 -1
- package/front_end/third_party/chromium/client-variations/ClientVariations.js +1 -1
- package/front_end/third_party/codemirror.next/bundle.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +7 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +4 -2
- package/front_end/third_party/i18n/localized-string-set.ts +9 -1
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +431 -434
- package/front_end/third_party/lighthouse/locales/en-US.json +144 -186
- package/front_end/third_party/lighthouse/locales/en-XL.json +144 -186
- package/front_end/third_party/puppeteer/README.chromium +14 -6
- package/front_end/third_party/puppeteer/package/README.md +134 -316
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +337 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +248 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +148 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js +135 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2100 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +536 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +39 -23
- 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 +17 -199
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js +112 -202
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts +9 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +5 -6
- 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/ChromeTargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.js +0 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Configuration.d.ts +133 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Configuration.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/initializePuppeteer.d.ts → cjs/puppeteer/common/Configuration.js} +4 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Configuration.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +24 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js +67 -28
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts +11 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js +7 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts +52 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/{DeviceDescriptors.js → Device.js} +17 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.d.ts +29 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js +69 -46
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts +27 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js +47 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js +16 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +2 -36
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js +20 -59
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.d.ts +47 -21
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.js +155 -43
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +7 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +47 -97
- 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/FrameTree.d.ts +39 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameTree.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameTree.js +120 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameTree.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.d.ts +13 -67
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.js +124 -511
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +5 -5
- 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 +7 -9
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/node/install.d.ts → cjs/puppeteer/common/LazyArg.d.ts} +7 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LazyArg.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LazyArg.js +45 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LazyArg.js.map +1 -0
- 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 +12 -2
- 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 +15 -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 +15 -0
- 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 -4
- 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 +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/node → cjs/puppeteer/common}/NodeWebSocketTransport.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NodeWebSocketTransport.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/{node → common}/NodeWebSocketTransport.js +1 -15
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NodeWebSocketTransport.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts +35 -496
- 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 +287 -414
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/common/NetworkConditions.d.ts → cjs/puppeteer/common/PredefinedNetworkConditions.d.ts} +13 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PredefinedNetworkConditions.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/{NetworkConditions.js → PredefinedNetworkConditions.js} +12 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PredefinedNetworkConditions.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +36 -61
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js +32 -66
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts +26 -34
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js +57 -94
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.d.ts +52 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.js +204 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.js +23 -27
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Browser.d.ts +45 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Browser.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Browser.js +75 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Browser.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/BrowserContext.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/BrowserContext.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/BrowserContext.js +52 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/BrowserContext.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/puppeteer.js → cjs/puppeteer/common/bidi/Connection.d.ts} +20 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Connection.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Connection.js +133 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Connection.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Page.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Page.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Page.js +61 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Page.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/types.d.ts +11 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js +25 -59
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.js +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PierceQuerySelector.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PierceQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PierceQuerySelector.js +71 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PierceQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.d.ts +32 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.js +30 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextContent.d.ts +39 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextContent.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextContent.js +133 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextContent.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextQuerySelector.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextQuerySelector.js +80 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.d.ts +24 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js +42 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +44 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.js +52 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/util.d.ts +26 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/util.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/util.js +58 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/util.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.d.ts +50 -14
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js +137 -154
- 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.d.ts +6 -0
- 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 +16 -7
- 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/ChromeLauncher.d.ts +6 -18
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +88 -28
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.d.ts +4 -18
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js +40 -33
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.js +1 -16
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.d.ts +24 -22
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.js +94 -130
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/{Puppeteer.d.ts → PuppeteerNode.d.ts} +74 -43
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +271 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.d.ts +21 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.js +22 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.d.ts +24 -18
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.js +25 -22
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DebuggableDeferredPromise.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DebuggableDeferredPromise.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DebuggableDeferredPromise.js +22 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DebuggableDeferredPromise.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.d.ts +12 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.js +17 -44
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/mitt/index.d.ts +23 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/mitt/index.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +337 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +244 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +148 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js +131 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2100 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +532 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +39 -23
- 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 +17 -199
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +108 -198
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +9 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.js +0 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Configuration.d.ts +133 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Configuration.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/{cjs/puppeteer/initializePuppeteer.d.ts → esm/puppeteer/common/Configuration.js} +3 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Configuration.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +24 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +63 -26
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +11 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +7 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts +52 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/{DeviceDescriptors.js → Device.js} +16 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.d.ts +29 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js +69 -46
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +27 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +47 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +16 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +2 -36
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js +20 -59
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.d.ts +47 -21
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.js +132 -43
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +7 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +47 -97
- 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/FrameTree.d.ts +39 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameTree.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameTree.js +116 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameTree.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.d.ts +13 -67
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.js +124 -487
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +5 -5
- 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 +7 -9
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{cjs/puppeteer/node/install.d.ts → esm/puppeteer/common/LazyArg.d.ts} +7 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LazyArg.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LazyArg.js +41 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LazyArg.js.map +1 -0
- 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 +12 -2
- 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 +15 -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 +15 -0
- 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 -4
- 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 +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{cjs/puppeteer/node → esm/puppeteer/common}/NodeWebSocketTransport.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NodeWebSocketTransport.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/{node → common}/NodeWebSocketTransport.js +1 -15
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NodeWebSocketTransport.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +35 -496
- 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 +287 -414
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{cjs/puppeteer/common/NetworkConditions.d.ts → esm/puppeteer/common/PredefinedNetworkConditions.d.ts} +13 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PredefinedNetworkConditions.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/{NetworkConditions.js → PredefinedNetworkConditions.js} +11 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PredefinedNetworkConditions.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +36 -61
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +33 -67
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +26 -34
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +57 -94
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.d.ts +52 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.js +199 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +23 -27
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Browser.d.ts +45 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Browser.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Browser.js +71 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Browser.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/BrowserContext.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/BrowserContext.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/BrowserContext.js +48 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/BrowserContext.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Connection.d.ts +37 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Connection.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Connection.js +129 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Connection.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Page.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Page.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Page.js +57 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Page.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/types.d.ts +11 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js +24 -57
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PierceQuerySelector.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PierceQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PierceQuerySelector.js +66 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PierceQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.d.ts +32 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.js +30 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextContent.d.ts +39 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextContent.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextContent.js +128 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextContent.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextQuerySelector.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextQuerySelector.js +75 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.d.ts +24 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js +37 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +44 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.js +41 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/util.d.ts +26 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/util.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/util.js +53 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/util.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts +50 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +137 -154
- 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.d.ts +6 -0
- 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 +14 -5
- 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/ChromeLauncher.d.ts +6 -18
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +89 -29
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts +4 -18
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js +41 -34
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +1 -16
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.d.ts +24 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.js +70 -124
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/{Puppeteer.d.ts → PuppeteerNode.d.ts} +74 -43
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +267 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core.d.ts +21 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core.js +22 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts +24 -18
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js +25 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DebuggableDeferredPromise.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DebuggableDeferredPromise.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DebuggableDeferredPromise.js +18 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DebuggableDeferredPromise.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.d.ts +12 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.js +16 -42
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt/index.d.ts +23 -0
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt/index.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +548 -513
- package/front_end/third_party/puppeteer/package/package.json +125 -104
- package/front_end/third_party/puppeteer/puppeteer.ts +3 -3
- package/front_end/ui/components/buttons/Button.ts +30 -1
- package/front_end/ui/components/buttons/button.css +21 -0
- package/front_end/ui/components/chrome_link/ChromeLink.ts +3 -2
- package/front_end/ui/components/chrome_link/chromeLink.css +1 -1
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +21 -2
- package/front_end/ui/components/docs/button/basic.ts +43 -10
- package/front_end/ui/components/docs/elements_breadcrumbs/basic.ts +2 -0
- package/front_end/ui/components/docs/elements_breadcrumbs/scroll-to-active-element.ts +10 -3
- package/front_end/ui/components/docs/two_states_counter/basic.html +27 -0
- package/front_end/ui/components/docs/two_states_counter/basic.ts +45 -0
- package/front_end/ui/components/expandable_list/expandableList.css +1 -1
- package/front_end/ui/components/helpers/scheduled-render.ts +5 -2
- package/front_end/ui/components/icon_button/iconButton.css +2 -0
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +23 -12
- package/front_end/ui/components/linkifier/linkifierImpl.css +1 -0
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +0 -4
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +4 -0
- package/front_end/ui/components/markdown_view/MarkdownView.ts +39 -38
- package/front_end/ui/components/markdown_view/markdownLink.css +1 -0
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +12 -6
- package/front_end/ui/components/survey_link/surveyLink.css +1 -0
- package/front_end/ui/components/text_editor/TextEditor.ts +75 -9
- package/front_end/ui/components/text_editor/config.ts +58 -2
- package/front_end/ui/components/text_editor/position.ts +2 -0
- package/front_end/ui/components/text_editor/theme.ts +10 -0
- package/front_end/ui/components/text_prompt/textPrompt.css +4 -0
- package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -8
- package/front_end/ui/components/tree_outline/treeOutline.css +20 -0
- package/front_end/ui/components/two_states_counter/TwoStatesCounter.ts +103 -0
- package/front_end/ui/components/two_states_counter/twoStatesCounter.css +37 -0
- package/front_end/ui/components/two_states_counter/two_states_counter.ts +9 -0
- package/front_end/ui/legacy/ARIAUtils.ts +4 -1
- package/front_end/ui/legacy/Context.ts +5 -1
- package/front_end/ui/legacy/DockController.ts +19 -0
- package/front_end/ui/legacy/FilterBar.ts +3 -1
- package/front_end/ui/legacy/InspectorView.ts +6 -2
- package/front_end/ui/legacy/ListWidget.ts +5 -1
- package/front_end/ui/legacy/SearchableView.ts +2 -19
- package/front_end/ui/legacy/SoftContextMenu.ts +20 -6
- package/front_end/ui/legacy/TabbedPane.ts +7 -5
- package/front_end/ui/legacy/TextPrompt.ts +1 -2
- package/front_end/ui/legacy/Toolbar.ts +6 -4
- package/front_end/ui/legacy/UIUtils.ts +8 -8
- package/front_end/ui/legacy/XLink.ts +3 -3
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +9 -10
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +7 -6
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +9 -2
- package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +10 -2
- package/front_end/ui/legacy/components/inline_editor/CSSVarSwatch.ts +22 -9
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +3 -2
- package/front_end/ui/legacy/components/inline_editor/cssLength.css +4 -0
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +15 -9
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +9 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +75 -377
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +3 -14
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +2 -14
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +9 -41
- package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -2
- package/front_end/ui/legacy/inspectorCommon.css +23 -0
- package/front_end/ui/legacy/inspectorSyntaxHighlight.css +1 -0
- package/front_end/ui/legacy/reportView.css +10 -0
- package/front_end/ui/legacy/softContextMenu.css +11 -1
- package/front_end/ui/legacy/splitWidget.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +26 -4
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +3 -5
- package/front_end/ui/legacy/toolbar.css +7 -1
- package/package.json +2 -1
- package/scripts/eslint_rules/lib/no_only.js +27 -0
- package/scripts/eslint_rules/tests/no_only_test.js +95 -0
- package/docs/localization/README.md +0 -6
- package/docs/localization/adding_strings.md +0 -133
- package/docs/localization/descriptions.md +0 -30
- package/docs/localization/localization_apis.md +0 -80
- package/docs/localization/locked_terms.md +0 -38
- package/docs/testing_guidelines.md +0 -4
- package/docs/triage_guidelines.md +0 -3
- package/front_end/entrypoints/formatter_worker/HTMLOutline.ts +0 -53
- package/front_end/entrypoints/formatter_worker/JavaScriptOutline.ts +0 -153
- package/front_end/legacy_test_runner/lighthouse_test_runner/lighthouse_test_runner.js +0 -155
- package/front_end/models/timeline_model/TimelineIRModel.ts +0 -317
- package/front_end/panels/input/InputModel.ts +0 -213
- package/front_end/panels/input/InputTimeline.ts +0 -407
- package/front_end/panels/input/input-legacy.ts +0 -32
- package/front_end/panels/input/input-meta.ts +0 -130
- package/front_end/panels/input/input.ts +0 -11
- package/front_end/panels/input/inputTimeline.css +0 -16
- package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +0 -179
- package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +0 -145
- package/front_end/third_party/acorn-loose/README.chromium +0 -22
- package/front_end/third_party/acorn-loose/acorn-loose-tsconfig.json +0 -8
- package/front_end/third_party/acorn-loose/acorn-loose.ts +0 -9
- package/front_end/third_party/acorn-loose/package/CHANGELOG.md +0 -123
- package/front_end/third_party/acorn-loose/package/LICENSE +0 -21
- package/front_end/third_party/acorn-loose/package/README.md +0 -66
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.d.ts +0 -16
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js +0 -1538
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js.map +0 -1
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs +0 -1528
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs.d.ts +0 -10
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs.map +0 -1
- package/front_end/third_party/acorn-loose/package/package.json +0 -47
- package/front_end/third_party/puppeteer/package/LICENSE +0 -202
- package/front_end/third_party/puppeteer/package/install.js +0 -89
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.d.ts +0 -60
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkConditions.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkConditions.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.d.ts +0 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.js +0 -21
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.d.ts +0 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.js +0 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.js +0 -47
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js +0 -213
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js +0 -198
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.d.ts +0 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.js +0 -40
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.d.ts +0 -27
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.js +0 -44
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.d.ts +0 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.js +0 -19
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/vendor/mitt/src/index.d.ts +0 -27
- package/front_end/third_party/puppeteer/package/lib/cjs/vendor/mitt/src/index.js +0 -56
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts +0 -60
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkConditions.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkConditions.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.d.ts +0 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.js +0 -20
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.d.ts +0 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.js +0 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.js +0 -43
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +0 -209
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +0 -190
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.d.ts +0 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.js +0 -13
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.d.ts +0 -27
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.d.ts +0 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.js +0 -15
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts +0 -27
- package/front_end/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.js +0 -53
- package/front_end/third_party/puppeteer/package/typescript-if-required.js +0 -70
- package/scripts/eslint_rules/lib/render_coordinator_write.js +0 -58
- package/scripts/eslint_rules/tests/render_coordinator_write_test.js +0 -55
@@ -1,1528 +0,0 @@
|
|
1
|
-
import { tokTypes, SourceLocation, Node, lineBreak, isNewLine, Parser, Token, getLineInfo, lineBreakG, tokContexts, defaultOptions } from '../../../acorn/acorn.js';
|
2
|
-
|
3
|
-
var dummyValue = "✖";
|
4
|
-
|
5
|
-
function isDummy(node) { return node.name === dummyValue }
|
6
|
-
|
7
|
-
function noop() {}
|
8
|
-
|
9
|
-
var LooseParser = function LooseParser(input, options) {
|
10
|
-
if ( options === void 0 ) options = {};
|
11
|
-
|
12
|
-
this.toks = this.constructor.BaseParser.tokenizer(input, options);
|
13
|
-
this.options = this.toks.options;
|
14
|
-
this.input = this.toks.input;
|
15
|
-
this.tok = this.last = {type: tokTypes.eof, start: 0, end: 0};
|
16
|
-
this.tok.validateRegExpFlags = noop;
|
17
|
-
this.tok.validateRegExpPattern = noop;
|
18
|
-
if (this.options.locations) {
|
19
|
-
var here = this.toks.curPosition();
|
20
|
-
this.tok.loc = new SourceLocation(this.toks, here, here);
|
21
|
-
}
|
22
|
-
this.ahead = []; // Tokens ahead
|
23
|
-
this.context = []; // Indentation contexted
|
24
|
-
this.curIndent = 0;
|
25
|
-
this.curLineStart = 0;
|
26
|
-
this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
|
27
|
-
this.inAsync = false;
|
28
|
-
this.inGenerator = false;
|
29
|
-
this.inFunction = false;
|
30
|
-
};
|
31
|
-
|
32
|
-
LooseParser.prototype.startNode = function startNode () {
|
33
|
-
return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
|
34
|
-
};
|
35
|
-
|
36
|
-
LooseParser.prototype.storeCurrentPos = function storeCurrentPos () {
|
37
|
-
return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
|
38
|
-
};
|
39
|
-
|
40
|
-
LooseParser.prototype.startNodeAt = function startNodeAt (pos) {
|
41
|
-
if (this.options.locations) {
|
42
|
-
return new Node(this.toks, pos[0], pos[1])
|
43
|
-
} else {
|
44
|
-
return new Node(this.toks, pos)
|
45
|
-
}
|
46
|
-
};
|
47
|
-
|
48
|
-
LooseParser.prototype.finishNode = function finishNode (node, type) {
|
49
|
-
node.type = type;
|
50
|
-
node.end = this.last.end;
|
51
|
-
if (this.options.locations)
|
52
|
-
{ node.loc.end = this.last.loc.end; }
|
53
|
-
if (this.options.ranges)
|
54
|
-
{ node.range[1] = this.last.end; }
|
55
|
-
return node
|
56
|
-
};
|
57
|
-
|
58
|
-
LooseParser.prototype.dummyNode = function dummyNode (type) {
|
59
|
-
var dummy = this.startNode();
|
60
|
-
dummy.type = type;
|
61
|
-
dummy.end = dummy.start;
|
62
|
-
if (this.options.locations)
|
63
|
-
{ dummy.loc.end = dummy.loc.start; }
|
64
|
-
if (this.options.ranges)
|
65
|
-
{ dummy.range[1] = dummy.start; }
|
66
|
-
this.last = {type: tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc};
|
67
|
-
return dummy
|
68
|
-
};
|
69
|
-
|
70
|
-
LooseParser.prototype.dummyIdent = function dummyIdent () {
|
71
|
-
var dummy = this.dummyNode("Identifier");
|
72
|
-
dummy.name = dummyValue;
|
73
|
-
return dummy
|
74
|
-
};
|
75
|
-
|
76
|
-
LooseParser.prototype.dummyString = function dummyString () {
|
77
|
-
var dummy = this.dummyNode("Literal");
|
78
|
-
dummy.value = dummy.raw = dummyValue;
|
79
|
-
return dummy
|
80
|
-
};
|
81
|
-
|
82
|
-
LooseParser.prototype.eat = function eat (type) {
|
83
|
-
if (this.tok.type === type) {
|
84
|
-
this.next();
|
85
|
-
return true
|
86
|
-
} else {
|
87
|
-
return false
|
88
|
-
}
|
89
|
-
};
|
90
|
-
|
91
|
-
LooseParser.prototype.isContextual = function isContextual (name) {
|
92
|
-
return this.tok.type === tokTypes.name && this.tok.value === name
|
93
|
-
};
|
94
|
-
|
95
|
-
LooseParser.prototype.eatContextual = function eatContextual (name) {
|
96
|
-
return this.tok.value === name && this.eat(tokTypes.name)
|
97
|
-
};
|
98
|
-
|
99
|
-
LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () {
|
100
|
-
return this.tok.type === tokTypes.eof || this.tok.type === tokTypes.braceR ||
|
101
|
-
lineBreak.test(this.input.slice(this.last.end, this.tok.start))
|
102
|
-
};
|
103
|
-
|
104
|
-
LooseParser.prototype.semicolon = function semicolon () {
|
105
|
-
return this.eat(tokTypes.semi)
|
106
|
-
};
|
107
|
-
|
108
|
-
LooseParser.prototype.expect = function expect (type) {
|
109
|
-
if (this.eat(type)) { return true }
|
110
|
-
for (var i = 1; i <= 2; i++) {
|
111
|
-
if (this.lookAhead(i).type === type) {
|
112
|
-
for (var j = 0; j < i; j++) { this.next(); }
|
113
|
-
return true
|
114
|
-
}
|
115
|
-
}
|
116
|
-
};
|
117
|
-
|
118
|
-
LooseParser.prototype.pushCx = function pushCx () {
|
119
|
-
this.context.push(this.curIndent);
|
120
|
-
};
|
121
|
-
|
122
|
-
LooseParser.prototype.popCx = function popCx () {
|
123
|
-
this.curIndent = this.context.pop();
|
124
|
-
};
|
125
|
-
|
126
|
-
LooseParser.prototype.lineEnd = function lineEnd (pos) {
|
127
|
-
while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) { ++pos; }
|
128
|
-
return pos
|
129
|
-
};
|
130
|
-
|
131
|
-
LooseParser.prototype.indentationAfter = function indentationAfter (pos) {
|
132
|
-
for (var count = 0;; ++pos) {
|
133
|
-
var ch = this.input.charCodeAt(pos);
|
134
|
-
if (ch === 32) { ++count; }
|
135
|
-
else if (ch === 9) { count += this.options.tabSize; }
|
136
|
-
else { return count }
|
137
|
-
}
|
138
|
-
};
|
139
|
-
|
140
|
-
LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) {
|
141
|
-
if (this.tok.type === closeTok || this.tok.type === tokTypes.eof) { return true }
|
142
|
-
return line !== this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
|
143
|
-
(!blockHeuristic || this.nextLineStart >= this.input.length ||
|
144
|
-
this.indentationAfter(this.nextLineStart) < indent)
|
145
|
-
};
|
146
|
-
|
147
|
-
LooseParser.prototype.tokenStartsLine = function tokenStartsLine () {
|
148
|
-
for (var p = this.tok.start - 1; p >= this.curLineStart; --p) {
|
149
|
-
var ch = this.input.charCodeAt(p);
|
150
|
-
if (ch !== 9 && ch !== 32) { return false }
|
151
|
-
}
|
152
|
-
return true
|
153
|
-
};
|
154
|
-
|
155
|
-
LooseParser.prototype.extend = function extend (name, f) {
|
156
|
-
this[name] = f(this[name]);
|
157
|
-
};
|
158
|
-
|
159
|
-
LooseParser.prototype.parse = function parse () {
|
160
|
-
this.next();
|
161
|
-
return this.parseTopLevel()
|
162
|
-
};
|
163
|
-
|
164
|
-
LooseParser.extend = function extend () {
|
165
|
-
var plugins = [], len = arguments.length;
|
166
|
-
while ( len-- ) plugins[ len ] = arguments[ len ];
|
167
|
-
|
168
|
-
var cls = this;
|
169
|
-
for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); }
|
170
|
-
return cls
|
171
|
-
};
|
172
|
-
|
173
|
-
LooseParser.parse = function parse (input, options) {
|
174
|
-
return new this(input, options).parse()
|
175
|
-
};
|
176
|
-
|
177
|
-
// Allows plugins to extend the base parser / tokenizer used
|
178
|
-
LooseParser.BaseParser = Parser;
|
179
|
-
|
180
|
-
var lp = LooseParser.prototype;
|
181
|
-
|
182
|
-
function isSpace(ch) {
|
183
|
-
return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch)
|
184
|
-
}
|
185
|
-
|
186
|
-
lp.next = function() {
|
187
|
-
this.last = this.tok;
|
188
|
-
if (this.ahead.length)
|
189
|
-
{ this.tok = this.ahead.shift(); }
|
190
|
-
else
|
191
|
-
{ this.tok = this.readToken(); }
|
192
|
-
|
193
|
-
if (this.tok.start >= this.nextLineStart) {
|
194
|
-
while (this.tok.start >= this.nextLineStart) {
|
195
|
-
this.curLineStart = this.nextLineStart;
|
196
|
-
this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
|
197
|
-
}
|
198
|
-
this.curIndent = this.indentationAfter(this.curLineStart);
|
199
|
-
}
|
200
|
-
};
|
201
|
-
|
202
|
-
lp.readToken = function() {
|
203
|
-
for (;;) {
|
204
|
-
try {
|
205
|
-
this.toks.next();
|
206
|
-
if (this.toks.type === tokTypes.dot &&
|
207
|
-
this.input.substr(this.toks.end, 1) === "." &&
|
208
|
-
this.options.ecmaVersion >= 6) {
|
209
|
-
this.toks.end++;
|
210
|
-
this.toks.type = tokTypes.ellipsis;
|
211
|
-
}
|
212
|
-
return new Token(this.toks)
|
213
|
-
} catch (e) {
|
214
|
-
if (!(e instanceof SyntaxError)) { throw e }
|
215
|
-
|
216
|
-
// Try to skip some text, based on the error message, and then continue
|
217
|
-
var msg = e.message, pos = e.raisedAt, replace = true;
|
218
|
-
if (/unterminated/i.test(msg)) {
|
219
|
-
pos = this.lineEnd(e.pos + 1);
|
220
|
-
if (/string/.test(msg)) {
|
221
|
-
replace = {start: e.pos, end: pos, type: tokTypes.string, value: this.input.slice(e.pos + 1, pos)};
|
222
|
-
} else if (/regular expr/i.test(msg)) {
|
223
|
-
var re = this.input.slice(e.pos, pos);
|
224
|
-
try { re = new RegExp(re); } catch (e) { /* ignore compilation error due to new syntax */ }
|
225
|
-
replace = {start: e.pos, end: pos, type: tokTypes.regexp, value: re};
|
226
|
-
} else if (/template/.test(msg)) {
|
227
|
-
replace = {
|
228
|
-
start: e.pos,
|
229
|
-
end: pos,
|
230
|
-
type: tokTypes.template,
|
231
|
-
value: this.input.slice(e.pos, pos)
|
232
|
-
};
|
233
|
-
} else {
|
234
|
-
replace = false;
|
235
|
-
}
|
236
|
-
} else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
|
237
|
-
while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) { ++pos; }
|
238
|
-
} else if (/character escape|expected hexadecimal/i.test(msg)) {
|
239
|
-
while (pos < this.input.length) {
|
240
|
-
var ch = this.input.charCodeAt(pos++);
|
241
|
-
if (ch === 34 || ch === 39 || isNewLine(ch)) { break }
|
242
|
-
}
|
243
|
-
} else if (/unexpected character/i.test(msg)) {
|
244
|
-
pos++;
|
245
|
-
replace = false;
|
246
|
-
} else if (/regular expression/i.test(msg)) {
|
247
|
-
replace = true;
|
248
|
-
} else {
|
249
|
-
throw e
|
250
|
-
}
|
251
|
-
this.resetTo(pos);
|
252
|
-
if (replace === true) { replace = {start: pos, end: pos, type: tokTypes.name, value: dummyValue}; }
|
253
|
-
if (replace) {
|
254
|
-
if (this.options.locations)
|
255
|
-
{ replace.loc = new SourceLocation(
|
256
|
-
this.toks,
|
257
|
-
getLineInfo(this.input, replace.start),
|
258
|
-
getLineInfo(this.input, replace.end)); }
|
259
|
-
return replace
|
260
|
-
}
|
261
|
-
}
|
262
|
-
}
|
263
|
-
};
|
264
|
-
|
265
|
-
lp.resetTo = function(pos) {
|
266
|
-
this.toks.pos = pos;
|
267
|
-
var ch = this.input.charAt(pos - 1);
|
268
|
-
this.toks.exprAllowed = !ch || /[[{(,;:?/*=+\-~!|&%^<>]/.test(ch) ||
|
269
|
-
/[enwfd]/.test(ch) &&
|
270
|
-
/\b(case|else|return|throw|new|in|(instance|type)?of|delete|void)$/.test(this.input.slice(pos - 10, pos));
|
271
|
-
|
272
|
-
if (this.options.locations) {
|
273
|
-
this.toks.curLine = 1;
|
274
|
-
this.toks.lineStart = lineBreakG.lastIndex = 0;
|
275
|
-
var match;
|
276
|
-
while ((match = lineBreakG.exec(this.input)) && match.index < pos) {
|
277
|
-
++this.toks.curLine;
|
278
|
-
this.toks.lineStart = match.index + match[0].length;
|
279
|
-
}
|
280
|
-
}
|
281
|
-
};
|
282
|
-
|
283
|
-
lp.lookAhead = function(n) {
|
284
|
-
while (n > this.ahead.length)
|
285
|
-
{ this.ahead.push(this.readToken()); }
|
286
|
-
return this.ahead[n - 1]
|
287
|
-
};
|
288
|
-
|
289
|
-
var lp$1 = LooseParser.prototype;
|
290
|
-
|
291
|
-
lp$1.parseTopLevel = function() {
|
292
|
-
var node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0);
|
293
|
-
node.body = [];
|
294
|
-
while (this.tok.type !== tokTypes.eof) { node.body.push(this.parseStatement()); }
|
295
|
-
this.toks.adaptDirectivePrologue(node.body);
|
296
|
-
this.last = this.tok;
|
297
|
-
node.sourceType = this.options.sourceType;
|
298
|
-
return this.finishNode(node, "Program")
|
299
|
-
};
|
300
|
-
|
301
|
-
lp$1.parseStatement = function() {
|
302
|
-
var starttype = this.tok.type, node = this.startNode(), kind;
|
303
|
-
|
304
|
-
if (this.toks.isLet()) {
|
305
|
-
starttype = tokTypes._var;
|
306
|
-
kind = "let";
|
307
|
-
}
|
308
|
-
|
309
|
-
switch (starttype) {
|
310
|
-
case tokTypes._break: case tokTypes._continue:
|
311
|
-
this.next();
|
312
|
-
var isBreak = starttype === tokTypes._break;
|
313
|
-
if (this.semicolon() || this.canInsertSemicolon()) {
|
314
|
-
node.label = null;
|
315
|
-
} else {
|
316
|
-
node.label = this.tok.type === tokTypes.name ? this.parseIdent() : null;
|
317
|
-
this.semicolon();
|
318
|
-
}
|
319
|
-
return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
|
320
|
-
|
321
|
-
case tokTypes._debugger:
|
322
|
-
this.next();
|
323
|
-
this.semicolon();
|
324
|
-
return this.finishNode(node, "DebuggerStatement")
|
325
|
-
|
326
|
-
case tokTypes._do:
|
327
|
-
this.next();
|
328
|
-
node.body = this.parseStatement();
|
329
|
-
node.test = this.eat(tokTypes._while) ? this.parseParenExpression() : this.dummyIdent();
|
330
|
-
this.semicolon();
|
331
|
-
return this.finishNode(node, "DoWhileStatement")
|
332
|
-
|
333
|
-
case tokTypes._for:
|
334
|
-
this.next(); // `for` keyword
|
335
|
-
var isAwait = this.options.ecmaVersion >= 9 && this.eatContextual("await");
|
336
|
-
|
337
|
-
this.pushCx();
|
338
|
-
this.expect(tokTypes.parenL);
|
339
|
-
if (this.tok.type === tokTypes.semi) { return this.parseFor(node, null) }
|
340
|
-
var isLet = this.toks.isLet();
|
341
|
-
if (isLet || this.tok.type === tokTypes._var || this.tok.type === tokTypes._const) {
|
342
|
-
var init$1 = this.parseVar(this.startNode(), true, isLet ? "let" : this.tok.value);
|
343
|
-
if (init$1.declarations.length === 1 && (this.tok.type === tokTypes._in || this.isContextual("of"))) {
|
344
|
-
if (this.options.ecmaVersion >= 9 && this.tok.type !== tokTypes._in) {
|
345
|
-
node.await = isAwait;
|
346
|
-
}
|
347
|
-
return this.parseForIn(node, init$1)
|
348
|
-
}
|
349
|
-
return this.parseFor(node, init$1)
|
350
|
-
}
|
351
|
-
var init = this.parseExpression(true);
|
352
|
-
if (this.tok.type === tokTypes._in || this.isContextual("of")) {
|
353
|
-
if (this.options.ecmaVersion >= 9 && this.tok.type !== tokTypes._in) {
|
354
|
-
node.await = isAwait;
|
355
|
-
}
|
356
|
-
return this.parseForIn(node, this.toAssignable(init))
|
357
|
-
}
|
358
|
-
return this.parseFor(node, init)
|
359
|
-
|
360
|
-
case tokTypes._function:
|
361
|
-
this.next();
|
362
|
-
return this.parseFunction(node, true)
|
363
|
-
|
364
|
-
case tokTypes._if:
|
365
|
-
this.next();
|
366
|
-
node.test = this.parseParenExpression();
|
367
|
-
node.consequent = this.parseStatement();
|
368
|
-
node.alternate = this.eat(tokTypes._else) ? this.parseStatement() : null;
|
369
|
-
return this.finishNode(node, "IfStatement")
|
370
|
-
|
371
|
-
case tokTypes._return:
|
372
|
-
this.next();
|
373
|
-
if (this.eat(tokTypes.semi) || this.canInsertSemicolon()) { node.argument = null; }
|
374
|
-
else { node.argument = this.parseExpression(); this.semicolon(); }
|
375
|
-
return this.finishNode(node, "ReturnStatement")
|
376
|
-
|
377
|
-
case tokTypes._switch:
|
378
|
-
var blockIndent = this.curIndent, line = this.curLineStart;
|
379
|
-
this.next();
|
380
|
-
node.discriminant = this.parseParenExpression();
|
381
|
-
node.cases = [];
|
382
|
-
this.pushCx();
|
383
|
-
this.expect(tokTypes.braceL);
|
384
|
-
|
385
|
-
var cur;
|
386
|
-
while (!this.closes(tokTypes.braceR, blockIndent, line, true)) {
|
387
|
-
if (this.tok.type === tokTypes._case || this.tok.type === tokTypes._default) {
|
388
|
-
var isCase = this.tok.type === tokTypes._case;
|
389
|
-
if (cur) { this.finishNode(cur, "SwitchCase"); }
|
390
|
-
node.cases.push(cur = this.startNode());
|
391
|
-
cur.consequent = [];
|
392
|
-
this.next();
|
393
|
-
if (isCase) { cur.test = this.parseExpression(); }
|
394
|
-
else { cur.test = null; }
|
395
|
-
this.expect(tokTypes.colon);
|
396
|
-
} else {
|
397
|
-
if (!cur) {
|
398
|
-
node.cases.push(cur = this.startNode());
|
399
|
-
cur.consequent = [];
|
400
|
-
cur.test = null;
|
401
|
-
}
|
402
|
-
cur.consequent.push(this.parseStatement());
|
403
|
-
}
|
404
|
-
}
|
405
|
-
if (cur) { this.finishNode(cur, "SwitchCase"); }
|
406
|
-
this.popCx();
|
407
|
-
this.eat(tokTypes.braceR);
|
408
|
-
return this.finishNode(node, "SwitchStatement")
|
409
|
-
|
410
|
-
case tokTypes._throw:
|
411
|
-
this.next();
|
412
|
-
node.argument = this.parseExpression();
|
413
|
-
this.semicolon();
|
414
|
-
return this.finishNode(node, "ThrowStatement")
|
415
|
-
|
416
|
-
case tokTypes._try:
|
417
|
-
this.next();
|
418
|
-
node.block = this.parseBlock();
|
419
|
-
node.handler = null;
|
420
|
-
if (this.tok.type === tokTypes._catch) {
|
421
|
-
var clause = this.startNode();
|
422
|
-
this.next();
|
423
|
-
if (this.eat(tokTypes.parenL)) {
|
424
|
-
clause.param = this.toAssignable(this.parseExprAtom(), true);
|
425
|
-
this.expect(tokTypes.parenR);
|
426
|
-
} else {
|
427
|
-
clause.param = null;
|
428
|
-
}
|
429
|
-
clause.body = this.parseBlock();
|
430
|
-
node.handler = this.finishNode(clause, "CatchClause");
|
431
|
-
}
|
432
|
-
node.finalizer = this.eat(tokTypes._finally) ? this.parseBlock() : null;
|
433
|
-
if (!node.handler && !node.finalizer) { return node.block }
|
434
|
-
return this.finishNode(node, "TryStatement")
|
435
|
-
|
436
|
-
case tokTypes._var:
|
437
|
-
case tokTypes._const:
|
438
|
-
return this.parseVar(node, false, kind || this.tok.value)
|
439
|
-
|
440
|
-
case tokTypes._while:
|
441
|
-
this.next();
|
442
|
-
node.test = this.parseParenExpression();
|
443
|
-
node.body = this.parseStatement();
|
444
|
-
return this.finishNode(node, "WhileStatement")
|
445
|
-
|
446
|
-
case tokTypes._with:
|
447
|
-
this.next();
|
448
|
-
node.object = this.parseParenExpression();
|
449
|
-
node.body = this.parseStatement();
|
450
|
-
return this.finishNode(node, "WithStatement")
|
451
|
-
|
452
|
-
case tokTypes.braceL:
|
453
|
-
return this.parseBlock()
|
454
|
-
|
455
|
-
case tokTypes.semi:
|
456
|
-
this.next();
|
457
|
-
return this.finishNode(node, "EmptyStatement")
|
458
|
-
|
459
|
-
case tokTypes._class:
|
460
|
-
return this.parseClass(true)
|
461
|
-
|
462
|
-
case tokTypes._import:
|
463
|
-
if (this.options.ecmaVersion > 10) {
|
464
|
-
var nextType = this.lookAhead(1).type;
|
465
|
-
if (nextType === tokTypes.parenL || nextType === tokTypes.dot) {
|
466
|
-
node.expression = this.parseExpression();
|
467
|
-
this.semicolon();
|
468
|
-
return this.finishNode(node, "ExpressionStatement")
|
469
|
-
}
|
470
|
-
}
|
471
|
-
|
472
|
-
return this.parseImport()
|
473
|
-
|
474
|
-
case tokTypes._export:
|
475
|
-
return this.parseExport()
|
476
|
-
|
477
|
-
default:
|
478
|
-
if (this.toks.isAsyncFunction()) {
|
479
|
-
this.next();
|
480
|
-
this.next();
|
481
|
-
return this.parseFunction(node, true, true)
|
482
|
-
}
|
483
|
-
var expr = this.parseExpression();
|
484
|
-
if (isDummy(expr)) {
|
485
|
-
this.next();
|
486
|
-
if (this.tok.type === tokTypes.eof) { return this.finishNode(node, "EmptyStatement") }
|
487
|
-
return this.parseStatement()
|
488
|
-
} else if (starttype === tokTypes.name && expr.type === "Identifier" && this.eat(tokTypes.colon)) {
|
489
|
-
node.body = this.parseStatement();
|
490
|
-
node.label = expr;
|
491
|
-
return this.finishNode(node, "LabeledStatement")
|
492
|
-
} else {
|
493
|
-
node.expression = expr;
|
494
|
-
this.semicolon();
|
495
|
-
return this.finishNode(node, "ExpressionStatement")
|
496
|
-
}
|
497
|
-
}
|
498
|
-
};
|
499
|
-
|
500
|
-
lp$1.parseBlock = function() {
|
501
|
-
var node = this.startNode();
|
502
|
-
this.pushCx();
|
503
|
-
this.expect(tokTypes.braceL);
|
504
|
-
var blockIndent = this.curIndent, line = this.curLineStart;
|
505
|
-
node.body = [];
|
506
|
-
while (!this.closes(tokTypes.braceR, blockIndent, line, true))
|
507
|
-
{ node.body.push(this.parseStatement()); }
|
508
|
-
this.popCx();
|
509
|
-
this.eat(tokTypes.braceR);
|
510
|
-
return this.finishNode(node, "BlockStatement")
|
511
|
-
};
|
512
|
-
|
513
|
-
lp$1.parseFor = function(node, init) {
|
514
|
-
node.init = init;
|
515
|
-
node.test = node.update = null;
|
516
|
-
if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.semi) { node.test = this.parseExpression(); }
|
517
|
-
if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.parenR) { node.update = this.parseExpression(); }
|
518
|
-
this.popCx();
|
519
|
-
this.expect(tokTypes.parenR);
|
520
|
-
node.body = this.parseStatement();
|
521
|
-
return this.finishNode(node, "ForStatement")
|
522
|
-
};
|
523
|
-
|
524
|
-
lp$1.parseForIn = function(node, init) {
|
525
|
-
var type = this.tok.type === tokTypes._in ? "ForInStatement" : "ForOfStatement";
|
526
|
-
this.next();
|
527
|
-
node.left = init;
|
528
|
-
node.right = this.parseExpression();
|
529
|
-
this.popCx();
|
530
|
-
this.expect(tokTypes.parenR);
|
531
|
-
node.body = this.parseStatement();
|
532
|
-
return this.finishNode(node, type)
|
533
|
-
};
|
534
|
-
|
535
|
-
lp$1.parseVar = function(node, noIn, kind) {
|
536
|
-
node.kind = kind;
|
537
|
-
this.next();
|
538
|
-
node.declarations = [];
|
539
|
-
do {
|
540
|
-
var decl = this.startNode();
|
541
|
-
decl.id = this.options.ecmaVersion >= 6 ? this.toAssignable(this.parseExprAtom(), true) : this.parseIdent();
|
542
|
-
decl.init = this.eat(tokTypes.eq) ? this.parseMaybeAssign(noIn) : null;
|
543
|
-
node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
|
544
|
-
} while (this.eat(tokTypes.comma))
|
545
|
-
if (!node.declarations.length) {
|
546
|
-
var decl$1 = this.startNode();
|
547
|
-
decl$1.id = this.dummyIdent();
|
548
|
-
node.declarations.push(this.finishNode(decl$1, "VariableDeclarator"));
|
549
|
-
}
|
550
|
-
if (!noIn) { this.semicolon(); }
|
551
|
-
return this.finishNode(node, "VariableDeclaration")
|
552
|
-
};
|
553
|
-
|
554
|
-
lp$1.parseClass = function(isStatement) {
|
555
|
-
var node = this.startNode();
|
556
|
-
this.next();
|
557
|
-
if (this.tok.type === tokTypes.name) { node.id = this.parseIdent(); }
|
558
|
-
else if (isStatement === true) { node.id = this.dummyIdent(); }
|
559
|
-
else { node.id = null; }
|
560
|
-
node.superClass = this.eat(tokTypes._extends) ? this.parseExpression() : null;
|
561
|
-
node.body = this.startNode();
|
562
|
-
node.body.body = [];
|
563
|
-
this.pushCx();
|
564
|
-
var indent = this.curIndent + 1, line = this.curLineStart;
|
565
|
-
this.eat(tokTypes.braceL);
|
566
|
-
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
|
567
|
-
while (!this.closes(tokTypes.braceR, indent, line)) {
|
568
|
-
var element = this.parseClassElement();
|
569
|
-
if (element) { node.body.body.push(element); }
|
570
|
-
}
|
571
|
-
this.popCx();
|
572
|
-
if (!this.eat(tokTypes.braceR)) {
|
573
|
-
// If there is no closing brace, make the node span to the start
|
574
|
-
// of the next token (this is useful for Tern)
|
575
|
-
this.last.end = this.tok.start;
|
576
|
-
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
577
|
-
}
|
578
|
-
this.semicolon();
|
579
|
-
this.finishNode(node.body, "ClassBody");
|
580
|
-
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
|
581
|
-
};
|
582
|
-
|
583
|
-
lp$1.parseClassElement = function() {
|
584
|
-
if (this.eat(tokTypes.semi)) { return null }
|
585
|
-
|
586
|
-
var ref = this.options;
|
587
|
-
var ecmaVersion = ref.ecmaVersion;
|
588
|
-
var locations = ref.locations;
|
589
|
-
var indent = this.curIndent;
|
590
|
-
var line = this.curLineStart;
|
591
|
-
var node = this.startNode();
|
592
|
-
var keyName = "";
|
593
|
-
var isGenerator = false;
|
594
|
-
var isAsync = false;
|
595
|
-
var kind = "method";
|
596
|
-
var isStatic = false;
|
597
|
-
|
598
|
-
if (this.eatContextual("static")) {
|
599
|
-
// Parse static init block
|
600
|
-
if (ecmaVersion >= 13 && this.eat(tokTypes.braceL)) {
|
601
|
-
this.parseClassStaticBlock(node);
|
602
|
-
return node
|
603
|
-
}
|
604
|
-
if (this.isClassElementNameStart() || this.toks.type === tokTypes.star) {
|
605
|
-
isStatic = true;
|
606
|
-
} else {
|
607
|
-
keyName = "static";
|
608
|
-
}
|
609
|
-
}
|
610
|
-
node.static = isStatic;
|
611
|
-
if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) {
|
612
|
-
if ((this.isClassElementNameStart() || this.toks.type === tokTypes.star) && !this.canInsertSemicolon()) {
|
613
|
-
isAsync = true;
|
614
|
-
} else {
|
615
|
-
keyName = "async";
|
616
|
-
}
|
617
|
-
}
|
618
|
-
if (!keyName) {
|
619
|
-
isGenerator = this.eat(tokTypes.star);
|
620
|
-
var lastValue = this.toks.value;
|
621
|
-
if (this.eatContextual("get") || this.eatContextual("set")) {
|
622
|
-
if (this.isClassElementNameStart()) {
|
623
|
-
kind = lastValue;
|
624
|
-
} else {
|
625
|
-
keyName = lastValue;
|
626
|
-
}
|
627
|
-
}
|
628
|
-
}
|
629
|
-
|
630
|
-
// Parse element name
|
631
|
-
if (keyName) {
|
632
|
-
// 'async', 'get', 'set', or 'static' were not a keyword contextually.
|
633
|
-
// The last token is any of those. Make it the element name.
|
634
|
-
node.computed = false;
|
635
|
-
node.key = this.startNodeAt(locations ? [this.toks.lastTokStart, this.toks.lastTokStartLoc] : this.toks.lastTokStart);
|
636
|
-
node.key.name = keyName;
|
637
|
-
this.finishNode(node.key, "Identifier");
|
638
|
-
} else {
|
639
|
-
this.parseClassElementName(node);
|
640
|
-
|
641
|
-
// From https://github.com/acornjs/acorn/blob/7deba41118d6384a2c498c61176b3cf434f69590/acorn-loose/src/statement.js#L291
|
642
|
-
// Skip broken stuff.
|
643
|
-
if (isDummy(node.key)) {
|
644
|
-
if (isDummy(this.parseMaybeAssign())) { this.next(); }
|
645
|
-
this.eat(tokTypes.comma);
|
646
|
-
return null
|
647
|
-
}
|
648
|
-
}
|
649
|
-
|
650
|
-
// Parse element value
|
651
|
-
if (ecmaVersion < 13 || this.toks.type === tokTypes.parenL || kind !== "method" || isGenerator || isAsync) {
|
652
|
-
// Method
|
653
|
-
var isConstructor =
|
654
|
-
!node.computed &&
|
655
|
-
!node.static &&
|
656
|
-
!isGenerator &&
|
657
|
-
!isAsync &&
|
658
|
-
kind === "method" && (
|
659
|
-
node.key.type === "Identifier" && node.key.name === "constructor" ||
|
660
|
-
node.key.type === "Literal" && node.key.value === "constructor"
|
661
|
-
);
|
662
|
-
node.kind = isConstructor ? "constructor" : kind;
|
663
|
-
node.value = this.parseMethod(isGenerator, isAsync);
|
664
|
-
this.finishNode(node, "MethodDefinition");
|
665
|
-
} else {
|
666
|
-
// Field
|
667
|
-
if (this.eat(tokTypes.eq)) {
|
668
|
-
if (this.curLineStart !== line && this.curIndent <= indent && this.tokenStartsLine()) {
|
669
|
-
// Estimated the next line is the next class element by indentations.
|
670
|
-
node.value = null;
|
671
|
-
} else {
|
672
|
-
var oldInAsync = this.inAsync;
|
673
|
-
var oldInGenerator = this.inGenerator;
|
674
|
-
this.inAsync = false;
|
675
|
-
this.inGenerator = false;
|
676
|
-
node.value = this.parseMaybeAssign();
|
677
|
-
this.inAsync = oldInAsync;
|
678
|
-
this.inGenerator = oldInGenerator;
|
679
|
-
}
|
680
|
-
} else {
|
681
|
-
node.value = null;
|
682
|
-
}
|
683
|
-
this.semicolon();
|
684
|
-
this.finishNode(node, "PropertyDefinition");
|
685
|
-
}
|
686
|
-
|
687
|
-
return node
|
688
|
-
};
|
689
|
-
|
690
|
-
lp$1.parseClassStaticBlock = function(node) {
|
691
|
-
var blockIndent = this.curIndent, line = this.curLineStart;
|
692
|
-
node.body = [];
|
693
|
-
this.pushCx();
|
694
|
-
while (!this.closes(tokTypes.braceR, blockIndent, line, true))
|
695
|
-
{ node.body.push(this.parseStatement()); }
|
696
|
-
this.popCx();
|
697
|
-
this.eat(tokTypes.braceR);
|
698
|
-
|
699
|
-
return this.finishNode(node, "StaticBlock")
|
700
|
-
};
|
701
|
-
|
702
|
-
lp$1.isClassElementNameStart = function() {
|
703
|
-
return this.toks.isClassElementNameStart()
|
704
|
-
};
|
705
|
-
|
706
|
-
lp$1.parseClassElementName = function(element) {
|
707
|
-
if (this.toks.type === tokTypes.privateId) {
|
708
|
-
element.computed = false;
|
709
|
-
element.key = this.parsePrivateIdent();
|
710
|
-
} else {
|
711
|
-
this.parsePropertyName(element);
|
712
|
-
}
|
713
|
-
};
|
714
|
-
|
715
|
-
lp$1.parseFunction = function(node, isStatement, isAsync) {
|
716
|
-
var oldInAsync = this.inAsync, oldInGenerator = this.inGenerator, oldInFunction = this.inFunction;
|
717
|
-
this.initFunction(node);
|
718
|
-
if (this.options.ecmaVersion >= 6) {
|
719
|
-
node.generator = this.eat(tokTypes.star);
|
720
|
-
}
|
721
|
-
if (this.options.ecmaVersion >= 8) {
|
722
|
-
node.async = !!isAsync;
|
723
|
-
}
|
724
|
-
if (this.tok.type === tokTypes.name) { node.id = this.parseIdent(); }
|
725
|
-
else if (isStatement === true) { node.id = this.dummyIdent(); }
|
726
|
-
this.inAsync = node.async;
|
727
|
-
this.inGenerator = node.generator;
|
728
|
-
this.inFunction = true;
|
729
|
-
node.params = this.parseFunctionParams();
|
730
|
-
node.body = this.parseBlock();
|
731
|
-
this.toks.adaptDirectivePrologue(node.body.body);
|
732
|
-
this.inAsync = oldInAsync;
|
733
|
-
this.inGenerator = oldInGenerator;
|
734
|
-
this.inFunction = oldInFunction;
|
735
|
-
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
|
736
|
-
};
|
737
|
-
|
738
|
-
lp$1.parseExport = function() {
|
739
|
-
var node = this.startNode();
|
740
|
-
this.next();
|
741
|
-
if (this.eat(tokTypes.star)) {
|
742
|
-
if (this.options.ecmaVersion >= 11) {
|
743
|
-
if (this.eatContextual("as")) {
|
744
|
-
node.exported = this.parseExprAtom();
|
745
|
-
} else {
|
746
|
-
node.exported = null;
|
747
|
-
}
|
748
|
-
}
|
749
|
-
node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString();
|
750
|
-
return this.finishNode(node, "ExportAllDeclaration")
|
751
|
-
}
|
752
|
-
if (this.eat(tokTypes._default)) {
|
753
|
-
// export default (function foo() {}) // This is FunctionExpression.
|
754
|
-
var isAsync;
|
755
|
-
if (this.tok.type === tokTypes._function || (isAsync = this.toks.isAsyncFunction())) {
|
756
|
-
var fNode = this.startNode();
|
757
|
-
this.next();
|
758
|
-
if (isAsync) { this.next(); }
|
759
|
-
node.declaration = this.parseFunction(fNode, "nullableID", isAsync);
|
760
|
-
} else if (this.tok.type === tokTypes._class) {
|
761
|
-
node.declaration = this.parseClass("nullableID");
|
762
|
-
} else {
|
763
|
-
node.declaration = this.parseMaybeAssign();
|
764
|
-
this.semicolon();
|
765
|
-
}
|
766
|
-
return this.finishNode(node, "ExportDefaultDeclaration")
|
767
|
-
}
|
768
|
-
if (this.tok.type.keyword || this.toks.isLet() || this.toks.isAsyncFunction()) {
|
769
|
-
node.declaration = this.parseStatement();
|
770
|
-
node.specifiers = [];
|
771
|
-
node.source = null;
|
772
|
-
} else {
|
773
|
-
node.declaration = null;
|
774
|
-
node.specifiers = this.parseExportSpecifierList();
|
775
|
-
node.source = this.eatContextual("from") ? this.parseExprAtom() : null;
|
776
|
-
this.semicolon();
|
777
|
-
}
|
778
|
-
return this.finishNode(node, "ExportNamedDeclaration")
|
779
|
-
};
|
780
|
-
|
781
|
-
lp$1.parseImport = function() {
|
782
|
-
var node = this.startNode();
|
783
|
-
this.next();
|
784
|
-
if (this.tok.type === tokTypes.string) {
|
785
|
-
node.specifiers = [];
|
786
|
-
node.source = this.parseExprAtom();
|
787
|
-
} else {
|
788
|
-
var elt;
|
789
|
-
if (this.tok.type === tokTypes.name && this.tok.value !== "from") {
|
790
|
-
elt = this.startNode();
|
791
|
-
elt.local = this.parseIdent();
|
792
|
-
this.finishNode(elt, "ImportDefaultSpecifier");
|
793
|
-
this.eat(tokTypes.comma);
|
794
|
-
}
|
795
|
-
node.specifiers = this.parseImportSpecifiers();
|
796
|
-
node.source = this.eatContextual("from") && this.tok.type === tokTypes.string ? this.parseExprAtom() : this.dummyString();
|
797
|
-
if (elt) { node.specifiers.unshift(elt); }
|
798
|
-
}
|
799
|
-
this.semicolon();
|
800
|
-
return this.finishNode(node, "ImportDeclaration")
|
801
|
-
};
|
802
|
-
|
803
|
-
lp$1.parseImportSpecifiers = function() {
|
804
|
-
var elts = [];
|
805
|
-
if (this.tok.type === tokTypes.star) {
|
806
|
-
var elt = this.startNode();
|
807
|
-
this.next();
|
808
|
-
elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent();
|
809
|
-
elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"));
|
810
|
-
} else {
|
811
|
-
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
|
812
|
-
this.pushCx();
|
813
|
-
this.eat(tokTypes.braceL);
|
814
|
-
if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
|
815
|
-
while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
|
816
|
-
var elt$1 = this.startNode();
|
817
|
-
if (this.eat(tokTypes.star)) {
|
818
|
-
elt$1.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent();
|
819
|
-
this.finishNode(elt$1, "ImportNamespaceSpecifier");
|
820
|
-
} else {
|
821
|
-
if (this.isContextual("from")) { break }
|
822
|
-
elt$1.imported = this.parseIdent();
|
823
|
-
if (isDummy(elt$1.imported)) { break }
|
824
|
-
elt$1.local = this.eatContextual("as") ? this.parseIdent() : elt$1.imported;
|
825
|
-
this.finishNode(elt$1, "ImportSpecifier");
|
826
|
-
}
|
827
|
-
elts.push(elt$1);
|
828
|
-
this.eat(tokTypes.comma);
|
829
|
-
}
|
830
|
-
this.eat(tokTypes.braceR);
|
831
|
-
this.popCx();
|
832
|
-
}
|
833
|
-
return elts
|
834
|
-
};
|
835
|
-
|
836
|
-
lp$1.parseExportSpecifierList = function() {
|
837
|
-
var elts = [];
|
838
|
-
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
|
839
|
-
this.pushCx();
|
840
|
-
this.eat(tokTypes.braceL);
|
841
|
-
if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
|
842
|
-
while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
|
843
|
-
if (this.isContextual("from")) { break }
|
844
|
-
var elt = this.startNode();
|
845
|
-
elt.local = this.parseIdent();
|
846
|
-
if (isDummy(elt.local)) { break }
|
847
|
-
elt.exported = this.eatContextual("as") ? this.parseIdent() : elt.local;
|
848
|
-
this.finishNode(elt, "ExportSpecifier");
|
849
|
-
elts.push(elt);
|
850
|
-
this.eat(tokTypes.comma);
|
851
|
-
}
|
852
|
-
this.eat(tokTypes.braceR);
|
853
|
-
this.popCx();
|
854
|
-
return elts
|
855
|
-
};
|
856
|
-
|
857
|
-
var lp$2 = LooseParser.prototype;
|
858
|
-
|
859
|
-
lp$2.checkLVal = function(expr) {
|
860
|
-
if (!expr) { return expr }
|
861
|
-
switch (expr.type) {
|
862
|
-
case "Identifier":
|
863
|
-
case "MemberExpression":
|
864
|
-
return expr
|
865
|
-
|
866
|
-
case "ParenthesizedExpression":
|
867
|
-
expr.expression = this.checkLVal(expr.expression);
|
868
|
-
return expr
|
869
|
-
|
870
|
-
default:
|
871
|
-
return this.dummyIdent()
|
872
|
-
}
|
873
|
-
};
|
874
|
-
|
875
|
-
lp$2.parseExpression = function(noIn) {
|
876
|
-
var start = this.storeCurrentPos();
|
877
|
-
var expr = this.parseMaybeAssign(noIn);
|
878
|
-
if (this.tok.type === tokTypes.comma) {
|
879
|
-
var node = this.startNodeAt(start);
|
880
|
-
node.expressions = [expr];
|
881
|
-
while (this.eat(tokTypes.comma)) { node.expressions.push(this.parseMaybeAssign(noIn)); }
|
882
|
-
return this.finishNode(node, "SequenceExpression")
|
883
|
-
}
|
884
|
-
return expr
|
885
|
-
};
|
886
|
-
|
887
|
-
lp$2.parseParenExpression = function() {
|
888
|
-
this.pushCx();
|
889
|
-
this.expect(tokTypes.parenL);
|
890
|
-
var val = this.parseExpression();
|
891
|
-
this.popCx();
|
892
|
-
this.expect(tokTypes.parenR);
|
893
|
-
return val
|
894
|
-
};
|
895
|
-
|
896
|
-
lp$2.parseMaybeAssign = function(noIn) {
|
897
|
-
// `yield` should be an identifier reference if it's not in generator functions.
|
898
|
-
if (this.inGenerator && this.toks.isContextual("yield")) {
|
899
|
-
var node = this.startNode();
|
900
|
-
this.next();
|
901
|
-
if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type !== tokTypes.star && !this.tok.type.startsExpr)) {
|
902
|
-
node.delegate = false;
|
903
|
-
node.argument = null;
|
904
|
-
} else {
|
905
|
-
node.delegate = this.eat(tokTypes.star);
|
906
|
-
node.argument = this.parseMaybeAssign();
|
907
|
-
}
|
908
|
-
return this.finishNode(node, "YieldExpression")
|
909
|
-
}
|
910
|
-
|
911
|
-
var start = this.storeCurrentPos();
|
912
|
-
var left = this.parseMaybeConditional(noIn);
|
913
|
-
if (this.tok.type.isAssign) {
|
914
|
-
var node$1 = this.startNodeAt(start);
|
915
|
-
node$1.operator = this.tok.value;
|
916
|
-
node$1.left = this.tok.type === tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left);
|
917
|
-
this.next();
|
918
|
-
node$1.right = this.parseMaybeAssign(noIn);
|
919
|
-
return this.finishNode(node$1, "AssignmentExpression")
|
920
|
-
}
|
921
|
-
return left
|
922
|
-
};
|
923
|
-
|
924
|
-
lp$2.parseMaybeConditional = function(noIn) {
|
925
|
-
var start = this.storeCurrentPos();
|
926
|
-
var expr = this.parseExprOps(noIn);
|
927
|
-
if (this.eat(tokTypes.question)) {
|
928
|
-
var node = this.startNodeAt(start);
|
929
|
-
node.test = expr;
|
930
|
-
node.consequent = this.parseMaybeAssign();
|
931
|
-
node.alternate = this.expect(tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent();
|
932
|
-
return this.finishNode(node, "ConditionalExpression")
|
933
|
-
}
|
934
|
-
return expr
|
935
|
-
};
|
936
|
-
|
937
|
-
lp$2.parseExprOps = function(noIn) {
|
938
|
-
var start = this.storeCurrentPos();
|
939
|
-
var indent = this.curIndent, line = this.curLineStart;
|
940
|
-
return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
|
941
|
-
};
|
942
|
-
|
943
|
-
lp$2.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
|
944
|
-
if (this.curLineStart !== line && this.curIndent < indent && this.tokenStartsLine()) { return left }
|
945
|
-
var prec = this.tok.type.binop;
|
946
|
-
if (prec != null && (!noIn || this.tok.type !== tokTypes._in)) {
|
947
|
-
if (prec > minPrec) {
|
948
|
-
var node = this.startNodeAt(start);
|
949
|
-
node.left = left;
|
950
|
-
node.operator = this.tok.value;
|
951
|
-
this.next();
|
952
|
-
if (this.curLineStart !== line && this.curIndent < indent && this.tokenStartsLine()) {
|
953
|
-
node.right = this.dummyIdent();
|
954
|
-
} else {
|
955
|
-
var rightStart = this.storeCurrentPos();
|
956
|
-
node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line);
|
957
|
-
}
|
958
|
-
this.finishNode(node, /&&|\|\||\?\?/.test(node.operator) ? "LogicalExpression" : "BinaryExpression");
|
959
|
-
return this.parseExprOp(node, start, minPrec, noIn, indent, line)
|
960
|
-
}
|
961
|
-
}
|
962
|
-
return left
|
963
|
-
};
|
964
|
-
|
965
|
-
lp$2.parseMaybeUnary = function(sawUnary) {
|
966
|
-
var start = this.storeCurrentPos(), expr;
|
967
|
-
if (this.options.ecmaVersion >= 8 && this.toks.isContextual("await") &&
|
968
|
-
(this.inAsync || (this.toks.inModule && this.options.ecmaVersion >= 13) ||
|
969
|
-
(!this.inFunction && this.options.allowAwaitOutsideFunction))) {
|
970
|
-
expr = this.parseAwait();
|
971
|
-
sawUnary = true;
|
972
|
-
} else if (this.tok.type.prefix) {
|
973
|
-
var node = this.startNode(), update = this.tok.type === tokTypes.incDec;
|
974
|
-
if (!update) { sawUnary = true; }
|
975
|
-
node.operator = this.tok.value;
|
976
|
-
node.prefix = true;
|
977
|
-
this.next();
|
978
|
-
node.argument = this.parseMaybeUnary(true);
|
979
|
-
if (update) { node.argument = this.checkLVal(node.argument); }
|
980
|
-
expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
|
981
|
-
} else if (this.tok.type === tokTypes.ellipsis) {
|
982
|
-
var node$1 = this.startNode();
|
983
|
-
this.next();
|
984
|
-
node$1.argument = this.parseMaybeUnary(sawUnary);
|
985
|
-
expr = this.finishNode(node$1, "SpreadElement");
|
986
|
-
} else {
|
987
|
-
expr = this.parseExprSubscripts();
|
988
|
-
while (this.tok.type.postfix && !this.canInsertSemicolon()) {
|
989
|
-
var node$2 = this.startNodeAt(start);
|
990
|
-
node$2.operator = this.tok.value;
|
991
|
-
node$2.prefix = false;
|
992
|
-
node$2.argument = this.checkLVal(expr);
|
993
|
-
this.next();
|
994
|
-
expr = this.finishNode(node$2, "UpdateExpression");
|
995
|
-
}
|
996
|
-
}
|
997
|
-
|
998
|
-
if (!sawUnary && this.eat(tokTypes.starstar)) {
|
999
|
-
var node$3 = this.startNodeAt(start);
|
1000
|
-
node$3.operator = "**";
|
1001
|
-
node$3.left = expr;
|
1002
|
-
node$3.right = this.parseMaybeUnary(false);
|
1003
|
-
return this.finishNode(node$3, "BinaryExpression")
|
1004
|
-
}
|
1005
|
-
|
1006
|
-
return expr
|
1007
|
-
};
|
1008
|
-
|
1009
|
-
lp$2.parseExprSubscripts = function() {
|
1010
|
-
var start = this.storeCurrentPos();
|
1011
|
-
return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
|
1012
|
-
};
|
1013
|
-
|
1014
|
-
lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) {
|
1015
|
-
var optionalSupported = this.options.ecmaVersion >= 11;
|
1016
|
-
var optionalChained = false;
|
1017
|
-
for (;;) {
|
1018
|
-
if (this.curLineStart !== line && this.curIndent <= startIndent && this.tokenStartsLine()) {
|
1019
|
-
if (this.tok.type === tokTypes.dot && this.curIndent === startIndent)
|
1020
|
-
{ --startIndent; }
|
1021
|
-
else
|
1022
|
-
{ break }
|
1023
|
-
}
|
1024
|
-
|
1025
|
-
var maybeAsyncArrow = base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon();
|
1026
|
-
var optional = optionalSupported && this.eat(tokTypes.questionDot);
|
1027
|
-
if (optional) {
|
1028
|
-
optionalChained = true;
|
1029
|
-
}
|
1030
|
-
|
1031
|
-
if ((optional && this.tok.type !== tokTypes.parenL && this.tok.type !== tokTypes.bracketL && this.tok.type !== tokTypes.backQuote) || this.eat(tokTypes.dot)) {
|
1032
|
-
var node = this.startNodeAt(start);
|
1033
|
-
node.object = base;
|
1034
|
-
if (this.curLineStart !== line && this.curIndent <= startIndent && this.tokenStartsLine())
|
1035
|
-
{ node.property = this.dummyIdent(); }
|
1036
|
-
else
|
1037
|
-
{ node.property = this.parsePropertyAccessor() || this.dummyIdent(); }
|
1038
|
-
node.computed = false;
|
1039
|
-
if (optionalSupported) {
|
1040
|
-
node.optional = optional;
|
1041
|
-
}
|
1042
|
-
base = this.finishNode(node, "MemberExpression");
|
1043
|
-
} else if (this.tok.type === tokTypes.bracketL) {
|
1044
|
-
this.pushCx();
|
1045
|
-
this.next();
|
1046
|
-
var node$1 = this.startNodeAt(start);
|
1047
|
-
node$1.object = base;
|
1048
|
-
node$1.property = this.parseExpression();
|
1049
|
-
node$1.computed = true;
|
1050
|
-
if (optionalSupported) {
|
1051
|
-
node$1.optional = optional;
|
1052
|
-
}
|
1053
|
-
this.popCx();
|
1054
|
-
this.expect(tokTypes.bracketR);
|
1055
|
-
base = this.finishNode(node$1, "MemberExpression");
|
1056
|
-
} else if (!noCalls && this.tok.type === tokTypes.parenL) {
|
1057
|
-
var exprList = this.parseExprList(tokTypes.parenR);
|
1058
|
-
if (maybeAsyncArrow && this.eat(tokTypes.arrow))
|
1059
|
-
{ return this.parseArrowExpression(this.startNodeAt(start), exprList, true) }
|
1060
|
-
var node$2 = this.startNodeAt(start);
|
1061
|
-
node$2.callee = base;
|
1062
|
-
node$2.arguments = exprList;
|
1063
|
-
if (optionalSupported) {
|
1064
|
-
node$2.optional = optional;
|
1065
|
-
}
|
1066
|
-
base = this.finishNode(node$2, "CallExpression");
|
1067
|
-
} else if (this.tok.type === tokTypes.backQuote) {
|
1068
|
-
var node$3 = this.startNodeAt(start);
|
1069
|
-
node$3.tag = base;
|
1070
|
-
node$3.quasi = this.parseTemplate();
|
1071
|
-
base = this.finishNode(node$3, "TaggedTemplateExpression");
|
1072
|
-
} else {
|
1073
|
-
break
|
1074
|
-
}
|
1075
|
-
}
|
1076
|
-
|
1077
|
-
if (optionalChained) {
|
1078
|
-
var chainNode = this.startNodeAt(start);
|
1079
|
-
chainNode.expression = base;
|
1080
|
-
base = this.finishNode(chainNode, "ChainExpression");
|
1081
|
-
}
|
1082
|
-
return base
|
1083
|
-
};
|
1084
|
-
|
1085
|
-
lp$2.parseExprAtom = function() {
|
1086
|
-
var node;
|
1087
|
-
switch (this.tok.type) {
|
1088
|
-
case tokTypes._this:
|
1089
|
-
case tokTypes._super:
|
1090
|
-
var type = this.tok.type === tokTypes._this ? "ThisExpression" : "Super";
|
1091
|
-
node = this.startNode();
|
1092
|
-
this.next();
|
1093
|
-
return this.finishNode(node, type)
|
1094
|
-
|
1095
|
-
case tokTypes.name:
|
1096
|
-
var start = this.storeCurrentPos();
|
1097
|
-
var id = this.parseIdent();
|
1098
|
-
var isAsync = false;
|
1099
|
-
if (id.name === "async" && !this.canInsertSemicolon()) {
|
1100
|
-
if (this.eat(tokTypes._function)) {
|
1101
|
-
this.toks.overrideContext(tokContexts.f_expr);
|
1102
|
-
return this.parseFunction(this.startNodeAt(start), false, true)
|
1103
|
-
}
|
1104
|
-
if (this.tok.type === tokTypes.name) {
|
1105
|
-
id = this.parseIdent();
|
1106
|
-
isAsync = true;
|
1107
|
-
}
|
1108
|
-
}
|
1109
|
-
return this.eat(tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id], isAsync) : id
|
1110
|
-
|
1111
|
-
case tokTypes.regexp:
|
1112
|
-
node = this.startNode();
|
1113
|
-
var val = this.tok.value;
|
1114
|
-
node.regex = {pattern: val.pattern, flags: val.flags};
|
1115
|
-
node.value = val.value;
|
1116
|
-
node.raw = this.input.slice(this.tok.start, this.tok.end);
|
1117
|
-
this.next();
|
1118
|
-
return this.finishNode(node, "Literal")
|
1119
|
-
|
1120
|
-
case tokTypes.num: case tokTypes.string:
|
1121
|
-
node = this.startNode();
|
1122
|
-
node.value = this.tok.value;
|
1123
|
-
node.raw = this.input.slice(this.tok.start, this.tok.end);
|
1124
|
-
if (this.tok.type === tokTypes.num && node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); }
|
1125
|
-
this.next();
|
1126
|
-
return this.finishNode(node, "Literal")
|
1127
|
-
|
1128
|
-
case tokTypes._null: case tokTypes._true: case tokTypes._false:
|
1129
|
-
node = this.startNode();
|
1130
|
-
node.value = this.tok.type === tokTypes._null ? null : this.tok.type === tokTypes._true;
|
1131
|
-
node.raw = this.tok.type.keyword;
|
1132
|
-
this.next();
|
1133
|
-
return this.finishNode(node, "Literal")
|
1134
|
-
|
1135
|
-
case tokTypes.parenL:
|
1136
|
-
var parenStart = this.storeCurrentPos();
|
1137
|
-
this.next();
|
1138
|
-
var inner = this.parseExpression();
|
1139
|
-
this.expect(tokTypes.parenR);
|
1140
|
-
if (this.eat(tokTypes.arrow)) {
|
1141
|
-
// (a,)=>a // SequenceExpression makes dummy in the last hole. Drop the dummy.
|
1142
|
-
var params = inner.expressions || [inner];
|
1143
|
-
if (params.length && isDummy(params[params.length - 1]))
|
1144
|
-
{ params.pop(); }
|
1145
|
-
return this.parseArrowExpression(this.startNodeAt(parenStart), params)
|
1146
|
-
}
|
1147
|
-
if (this.options.preserveParens) {
|
1148
|
-
var par = this.startNodeAt(parenStart);
|
1149
|
-
par.expression = inner;
|
1150
|
-
inner = this.finishNode(par, "ParenthesizedExpression");
|
1151
|
-
}
|
1152
|
-
return inner
|
1153
|
-
|
1154
|
-
case tokTypes.bracketL:
|
1155
|
-
node = this.startNode();
|
1156
|
-
node.elements = this.parseExprList(tokTypes.bracketR, true);
|
1157
|
-
return this.finishNode(node, "ArrayExpression")
|
1158
|
-
|
1159
|
-
case tokTypes.braceL:
|
1160
|
-
this.toks.overrideContext(tokContexts.b_expr);
|
1161
|
-
return this.parseObj()
|
1162
|
-
|
1163
|
-
case tokTypes._class:
|
1164
|
-
return this.parseClass(false)
|
1165
|
-
|
1166
|
-
case tokTypes._function:
|
1167
|
-
node = this.startNode();
|
1168
|
-
this.next();
|
1169
|
-
return this.parseFunction(node, false)
|
1170
|
-
|
1171
|
-
case tokTypes._new:
|
1172
|
-
return this.parseNew()
|
1173
|
-
|
1174
|
-
case tokTypes.backQuote:
|
1175
|
-
return this.parseTemplate()
|
1176
|
-
|
1177
|
-
case tokTypes._import:
|
1178
|
-
if (this.options.ecmaVersion >= 11) {
|
1179
|
-
return this.parseExprImport()
|
1180
|
-
} else {
|
1181
|
-
return this.dummyIdent()
|
1182
|
-
}
|
1183
|
-
|
1184
|
-
default:
|
1185
|
-
return this.dummyIdent()
|
1186
|
-
}
|
1187
|
-
};
|
1188
|
-
|
1189
|
-
lp$2.parseExprImport = function() {
|
1190
|
-
var node = this.startNode();
|
1191
|
-
var meta = this.parseIdent(true);
|
1192
|
-
switch (this.tok.type) {
|
1193
|
-
case tokTypes.parenL:
|
1194
|
-
return this.parseDynamicImport(node)
|
1195
|
-
case tokTypes.dot:
|
1196
|
-
node.meta = meta;
|
1197
|
-
return this.parseImportMeta(node)
|
1198
|
-
default:
|
1199
|
-
node.name = "import";
|
1200
|
-
return this.finishNode(node, "Identifier")
|
1201
|
-
}
|
1202
|
-
};
|
1203
|
-
|
1204
|
-
lp$2.parseDynamicImport = function(node) {
|
1205
|
-
node.source = this.parseExprList(tokTypes.parenR)[0] || this.dummyString();
|
1206
|
-
return this.finishNode(node, "ImportExpression")
|
1207
|
-
};
|
1208
|
-
|
1209
|
-
lp$2.parseImportMeta = function(node) {
|
1210
|
-
this.next(); // skip '.'
|
1211
|
-
node.property = this.parseIdent(true);
|
1212
|
-
return this.finishNode(node, "MetaProperty")
|
1213
|
-
};
|
1214
|
-
|
1215
|
-
lp$2.parseNew = function() {
|
1216
|
-
var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart;
|
1217
|
-
var meta = this.parseIdent(true);
|
1218
|
-
if (this.options.ecmaVersion >= 6 && this.eat(tokTypes.dot)) {
|
1219
|
-
node.meta = meta;
|
1220
|
-
node.property = this.parseIdent(true);
|
1221
|
-
return this.finishNode(node, "MetaProperty")
|
1222
|
-
}
|
1223
|
-
var start = this.storeCurrentPos();
|
1224
|
-
node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line);
|
1225
|
-
if (this.tok.type === tokTypes.parenL) {
|
1226
|
-
node.arguments = this.parseExprList(tokTypes.parenR);
|
1227
|
-
} else {
|
1228
|
-
node.arguments = [];
|
1229
|
-
}
|
1230
|
-
return this.finishNode(node, "NewExpression")
|
1231
|
-
};
|
1232
|
-
|
1233
|
-
lp$2.parseTemplateElement = function() {
|
1234
|
-
var elem = this.startNode();
|
1235
|
-
|
1236
|
-
// The loose parser accepts invalid unicode escapes even in untagged templates.
|
1237
|
-
if (this.tok.type === tokTypes.invalidTemplate) {
|
1238
|
-
elem.value = {
|
1239
|
-
raw: this.tok.value,
|
1240
|
-
cooked: null
|
1241
|
-
};
|
1242
|
-
} else {
|
1243
|
-
elem.value = {
|
1244
|
-
raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, "\n"),
|
1245
|
-
cooked: this.tok.value
|
1246
|
-
};
|
1247
|
-
}
|
1248
|
-
this.next();
|
1249
|
-
elem.tail = this.tok.type === tokTypes.backQuote;
|
1250
|
-
return this.finishNode(elem, "TemplateElement")
|
1251
|
-
};
|
1252
|
-
|
1253
|
-
lp$2.parseTemplate = function() {
|
1254
|
-
var node = this.startNode();
|
1255
|
-
this.next();
|
1256
|
-
node.expressions = [];
|
1257
|
-
var curElt = this.parseTemplateElement();
|
1258
|
-
node.quasis = [curElt];
|
1259
|
-
while (!curElt.tail) {
|
1260
|
-
this.next();
|
1261
|
-
node.expressions.push(this.parseExpression());
|
1262
|
-
if (this.expect(tokTypes.braceR)) {
|
1263
|
-
curElt = this.parseTemplateElement();
|
1264
|
-
} else {
|
1265
|
-
curElt = this.startNode();
|
1266
|
-
curElt.value = {cooked: "", raw: ""};
|
1267
|
-
curElt.tail = true;
|
1268
|
-
this.finishNode(curElt, "TemplateElement");
|
1269
|
-
}
|
1270
|
-
node.quasis.push(curElt);
|
1271
|
-
}
|
1272
|
-
this.expect(tokTypes.backQuote);
|
1273
|
-
return this.finishNode(node, "TemplateLiteral")
|
1274
|
-
};
|
1275
|
-
|
1276
|
-
lp$2.parseObj = function() {
|
1277
|
-
var node = this.startNode();
|
1278
|
-
node.properties = [];
|
1279
|
-
this.pushCx();
|
1280
|
-
var indent = this.curIndent + 1, line = this.curLineStart;
|
1281
|
-
this.eat(tokTypes.braceL);
|
1282
|
-
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
|
1283
|
-
while (!this.closes(tokTypes.braceR, indent, line)) {
|
1284
|
-
var prop = this.startNode(), isGenerator = (void 0), isAsync = (void 0), start = (void 0);
|
1285
|
-
if (this.options.ecmaVersion >= 9 && this.eat(tokTypes.ellipsis)) {
|
1286
|
-
prop.argument = this.parseMaybeAssign();
|
1287
|
-
node.properties.push(this.finishNode(prop, "SpreadElement"));
|
1288
|
-
this.eat(tokTypes.comma);
|
1289
|
-
continue
|
1290
|
-
}
|
1291
|
-
if (this.options.ecmaVersion >= 6) {
|
1292
|
-
start = this.storeCurrentPos();
|
1293
|
-
prop.method = false;
|
1294
|
-
prop.shorthand = false;
|
1295
|
-
isGenerator = this.eat(tokTypes.star);
|
1296
|
-
}
|
1297
|
-
this.parsePropertyName(prop);
|
1298
|
-
if (this.toks.isAsyncProp(prop)) {
|
1299
|
-
isAsync = true;
|
1300
|
-
isGenerator = this.options.ecmaVersion >= 9 && this.eat(tokTypes.star);
|
1301
|
-
this.parsePropertyName(prop);
|
1302
|
-
} else {
|
1303
|
-
isAsync = false;
|
1304
|
-
}
|
1305
|
-
if (isDummy(prop.key)) { if (isDummy(this.parseMaybeAssign())) { this.next(); } this.eat(tokTypes.comma); continue }
|
1306
|
-
if (this.eat(tokTypes.colon)) {
|
1307
|
-
prop.kind = "init";
|
1308
|
-
prop.value = this.parseMaybeAssign();
|
1309
|
-
} else if (this.options.ecmaVersion >= 6 && (this.tok.type === tokTypes.parenL || this.tok.type === tokTypes.braceL)) {
|
1310
|
-
prop.kind = "init";
|
1311
|
-
prop.method = true;
|
1312
|
-
prop.value = this.parseMethod(isGenerator, isAsync);
|
1313
|
-
} else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
|
1314
|
-
!prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
|
1315
|
-
(this.tok.type !== tokTypes.comma && this.tok.type !== tokTypes.braceR && this.tok.type !== tokTypes.eq)) {
|
1316
|
-
prop.kind = prop.key.name;
|
1317
|
-
this.parsePropertyName(prop);
|
1318
|
-
prop.value = this.parseMethod(false);
|
1319
|
-
} else {
|
1320
|
-
prop.kind = "init";
|
1321
|
-
if (this.options.ecmaVersion >= 6) {
|
1322
|
-
if (this.eat(tokTypes.eq)) {
|
1323
|
-
var assign = this.startNodeAt(start);
|
1324
|
-
assign.operator = "=";
|
1325
|
-
assign.left = prop.key;
|
1326
|
-
assign.right = this.parseMaybeAssign();
|
1327
|
-
prop.value = this.finishNode(assign, "AssignmentExpression");
|
1328
|
-
} else {
|
1329
|
-
prop.value = prop.key;
|
1330
|
-
}
|
1331
|
-
} else {
|
1332
|
-
prop.value = this.dummyIdent();
|
1333
|
-
}
|
1334
|
-
prop.shorthand = true;
|
1335
|
-
}
|
1336
|
-
node.properties.push(this.finishNode(prop, "Property"));
|
1337
|
-
this.eat(tokTypes.comma);
|
1338
|
-
}
|
1339
|
-
this.popCx();
|
1340
|
-
if (!this.eat(tokTypes.braceR)) {
|
1341
|
-
// If there is no closing brace, make the node span to the start
|
1342
|
-
// of the next token (this is useful for Tern)
|
1343
|
-
this.last.end = this.tok.start;
|
1344
|
-
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
1345
|
-
}
|
1346
|
-
return this.finishNode(node, "ObjectExpression")
|
1347
|
-
};
|
1348
|
-
|
1349
|
-
lp$2.parsePropertyName = function(prop) {
|
1350
|
-
if (this.options.ecmaVersion >= 6) {
|
1351
|
-
if (this.eat(tokTypes.bracketL)) {
|
1352
|
-
prop.computed = true;
|
1353
|
-
prop.key = this.parseExpression();
|
1354
|
-
this.expect(tokTypes.bracketR);
|
1355
|
-
return
|
1356
|
-
} else {
|
1357
|
-
prop.computed = false;
|
1358
|
-
}
|
1359
|
-
}
|
1360
|
-
var key = (this.tok.type === tokTypes.num || this.tok.type === tokTypes.string) ? this.parseExprAtom() : this.parseIdent();
|
1361
|
-
prop.key = key || this.dummyIdent();
|
1362
|
-
};
|
1363
|
-
|
1364
|
-
lp$2.parsePropertyAccessor = function() {
|
1365
|
-
if (this.tok.type === tokTypes.name || this.tok.type.keyword) { return this.parseIdent() }
|
1366
|
-
if (this.tok.type === tokTypes.privateId) { return this.parsePrivateIdent() }
|
1367
|
-
};
|
1368
|
-
|
1369
|
-
lp$2.parseIdent = function() {
|
1370
|
-
var name = this.tok.type === tokTypes.name ? this.tok.value : this.tok.type.keyword;
|
1371
|
-
if (!name) { return this.dummyIdent() }
|
1372
|
-
var node = this.startNode();
|
1373
|
-
this.next();
|
1374
|
-
node.name = name;
|
1375
|
-
return this.finishNode(node, "Identifier")
|
1376
|
-
};
|
1377
|
-
|
1378
|
-
lp$2.parsePrivateIdent = function() {
|
1379
|
-
var node = this.startNode();
|
1380
|
-
node.name = this.tok.value;
|
1381
|
-
this.next();
|
1382
|
-
return this.finishNode(node, "PrivateIdentifier")
|
1383
|
-
};
|
1384
|
-
|
1385
|
-
lp$2.initFunction = function(node) {
|
1386
|
-
node.id = null;
|
1387
|
-
node.params = [];
|
1388
|
-
if (this.options.ecmaVersion >= 6) {
|
1389
|
-
node.generator = false;
|
1390
|
-
node.expression = false;
|
1391
|
-
}
|
1392
|
-
if (this.options.ecmaVersion >= 8)
|
1393
|
-
{ node.async = false; }
|
1394
|
-
};
|
1395
|
-
|
1396
|
-
// Convert existing expression atom to assignable pattern
|
1397
|
-
// if possible.
|
1398
|
-
|
1399
|
-
lp$2.toAssignable = function(node, binding) {
|
1400
|
-
if (!node || node.type === "Identifier" || (node.type === "MemberExpression" && !binding)) ; else if (node.type === "ParenthesizedExpression") {
|
1401
|
-
this.toAssignable(node.expression, binding);
|
1402
|
-
} else if (this.options.ecmaVersion < 6) {
|
1403
|
-
return this.dummyIdent()
|
1404
|
-
} else if (node.type === "ObjectExpression") {
|
1405
|
-
node.type = "ObjectPattern";
|
1406
|
-
for (var i = 0, list = node.properties; i < list.length; i += 1)
|
1407
|
-
{
|
1408
|
-
var prop = list[i];
|
1409
|
-
|
1410
|
-
this.toAssignable(prop, binding);
|
1411
|
-
}
|
1412
|
-
} else if (node.type === "ArrayExpression") {
|
1413
|
-
node.type = "ArrayPattern";
|
1414
|
-
this.toAssignableList(node.elements, binding);
|
1415
|
-
} else if (node.type === "Property") {
|
1416
|
-
this.toAssignable(node.value, binding);
|
1417
|
-
} else if (node.type === "SpreadElement") {
|
1418
|
-
node.type = "RestElement";
|
1419
|
-
this.toAssignable(node.argument, binding);
|
1420
|
-
} else if (node.type === "AssignmentExpression") {
|
1421
|
-
node.type = "AssignmentPattern";
|
1422
|
-
delete node.operator;
|
1423
|
-
} else {
|
1424
|
-
return this.dummyIdent()
|
1425
|
-
}
|
1426
|
-
return node
|
1427
|
-
};
|
1428
|
-
|
1429
|
-
lp$2.toAssignableList = function(exprList, binding) {
|
1430
|
-
for (var i = 0, list = exprList; i < list.length; i += 1)
|
1431
|
-
{
|
1432
|
-
var expr = list[i];
|
1433
|
-
|
1434
|
-
this.toAssignable(expr, binding);
|
1435
|
-
}
|
1436
|
-
return exprList
|
1437
|
-
};
|
1438
|
-
|
1439
|
-
lp$2.parseFunctionParams = function(params) {
|
1440
|
-
params = this.parseExprList(tokTypes.parenR);
|
1441
|
-
return this.toAssignableList(params, true)
|
1442
|
-
};
|
1443
|
-
|
1444
|
-
lp$2.parseMethod = function(isGenerator, isAsync) {
|
1445
|
-
var node = this.startNode(), oldInAsync = this.inAsync, oldInGenerator = this.inGenerator, oldInFunction = this.inFunction;
|
1446
|
-
this.initFunction(node);
|
1447
|
-
if (this.options.ecmaVersion >= 6)
|
1448
|
-
{ node.generator = !!isGenerator; }
|
1449
|
-
if (this.options.ecmaVersion >= 8)
|
1450
|
-
{ node.async = !!isAsync; }
|
1451
|
-
this.inAsync = node.async;
|
1452
|
-
this.inGenerator = node.generator;
|
1453
|
-
this.inFunction = true;
|
1454
|
-
node.params = this.parseFunctionParams();
|
1455
|
-
node.body = this.parseBlock();
|
1456
|
-
this.toks.adaptDirectivePrologue(node.body.body);
|
1457
|
-
this.inAsync = oldInAsync;
|
1458
|
-
this.inGenerator = oldInGenerator;
|
1459
|
-
this.inFunction = oldInFunction;
|
1460
|
-
return this.finishNode(node, "FunctionExpression")
|
1461
|
-
};
|
1462
|
-
|
1463
|
-
lp$2.parseArrowExpression = function(node, params, isAsync) {
|
1464
|
-
var oldInAsync = this.inAsync, oldInGenerator = this.inGenerator, oldInFunction = this.inFunction;
|
1465
|
-
this.initFunction(node);
|
1466
|
-
if (this.options.ecmaVersion >= 8)
|
1467
|
-
{ node.async = !!isAsync; }
|
1468
|
-
this.inAsync = node.async;
|
1469
|
-
this.inGenerator = false;
|
1470
|
-
this.inFunction = true;
|
1471
|
-
node.params = this.toAssignableList(params, true);
|
1472
|
-
node.expression = this.tok.type !== tokTypes.braceL;
|
1473
|
-
if (node.expression) {
|
1474
|
-
node.body = this.parseMaybeAssign();
|
1475
|
-
} else {
|
1476
|
-
node.body = this.parseBlock();
|
1477
|
-
this.toks.adaptDirectivePrologue(node.body.body);
|
1478
|
-
}
|
1479
|
-
this.inAsync = oldInAsync;
|
1480
|
-
this.inGenerator = oldInGenerator;
|
1481
|
-
this.inFunction = oldInFunction;
|
1482
|
-
return this.finishNode(node, "ArrowFunctionExpression")
|
1483
|
-
};
|
1484
|
-
|
1485
|
-
lp$2.parseExprList = function(close, allowEmpty) {
|
1486
|
-
this.pushCx();
|
1487
|
-
var indent = this.curIndent, line = this.curLineStart, elts = [];
|
1488
|
-
this.next(); // Opening bracket
|
1489
|
-
while (!this.closes(close, indent + 1, line)) {
|
1490
|
-
if (this.eat(tokTypes.comma)) {
|
1491
|
-
elts.push(allowEmpty ? null : this.dummyIdent());
|
1492
|
-
continue
|
1493
|
-
}
|
1494
|
-
var elt = this.parseMaybeAssign();
|
1495
|
-
if (isDummy(elt)) {
|
1496
|
-
if (this.closes(close, indent, line)) { break }
|
1497
|
-
this.next();
|
1498
|
-
} else {
|
1499
|
-
elts.push(elt);
|
1500
|
-
}
|
1501
|
-
this.eat(tokTypes.comma);
|
1502
|
-
}
|
1503
|
-
this.popCx();
|
1504
|
-
if (!this.eat(close)) {
|
1505
|
-
// If there is no closing brace, make the node span to the start
|
1506
|
-
// of the next token (this is useful for Tern)
|
1507
|
-
this.last.end = this.tok.start;
|
1508
|
-
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
1509
|
-
}
|
1510
|
-
return elts
|
1511
|
-
};
|
1512
|
-
|
1513
|
-
lp$2.parseAwait = function() {
|
1514
|
-
var node = this.startNode();
|
1515
|
-
this.next();
|
1516
|
-
node.argument = this.parseMaybeUnary();
|
1517
|
-
return this.finishNode(node, "AwaitExpression")
|
1518
|
-
};
|
1519
|
-
|
1520
|
-
// Acorn: Loose parser
|
1521
|
-
|
1522
|
-
defaultOptions.tabSize = 4;
|
1523
|
-
|
1524
|
-
function parse(input, options) {
|
1525
|
-
return LooseParser.parse(input, options)
|
1526
|
-
}
|
1527
|
-
|
1528
|
-
export { LooseParser, isDummy, parse };
|