chore: use @typescript-eslint/consistent-type-imports
(#10913)
This commit is contained in:
parent
e8640fff16
commit
c949656a43
@ -220,6 +220,14 @@ module.exports = {
|
||||
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
||||
// This is more performant; see https://v8.dev/blog/fast-async.
|
||||
'@typescript-eslint/return-await': ['error', 'always'],
|
||||
// This optimizes the dependency tracking for type-only files.
|
||||
'@typescript-eslint/consistent-type-imports': [
|
||||
'error',
|
||||
{
|
||||
disallowTypeAnnotations: false,
|
||||
fixStyle: 'inline-type-imports',
|
||||
},
|
||||
],
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
|
@ -24,9 +24,9 @@ import yargs from 'yargs/yargs';
|
||||
|
||||
import {
|
||||
resolveBuildId,
|
||||
Browser,
|
||||
type Browser,
|
||||
BrowserPlatform,
|
||||
ChromeReleaseChannel,
|
||||
type ChromeReleaseChannel,
|
||||
} from './browser-data/browser-data.js';
|
||||
import {Cache} from './Cache.js';
|
||||
import {detectBrowserPlatform} from './detectPlatform.js';
|
||||
|
@ -17,7 +17,7 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import {Browser, BrowserPlatform} from './browser-data/browser-data.js';
|
||||
import {Browser, type BrowserPlatform} from './browser-data/browser-data.js';
|
||||
import {computeExecutablePath} from './launch.js';
|
||||
|
||||
/**
|
||||
|
@ -19,7 +19,7 @@ import path from 'path';
|
||||
|
||||
import {getJSON} from '../httpUtil.js';
|
||||
|
||||
import {BrowserPlatform, ProfileOptions} from './types.js';
|
||||
import {BrowserPlatform, type ProfileOptions} from './types.js';
|
||||
|
||||
function archive(platform: BrowserPlatform, buildId: string): string {
|
||||
switch (platform) {
|
||||
|
@ -21,8 +21,8 @@ import os from 'os';
|
||||
import path from 'path';
|
||||
|
||||
import {
|
||||
Browser,
|
||||
BrowserPlatform,
|
||||
type Browser,
|
||||
type BrowserPlatform,
|
||||
downloadUrls,
|
||||
} from './browser-data/browser-data.js';
|
||||
import {Cache, InstalledBrowser} from './Cache.js';
|
||||
|
@ -21,11 +21,11 @@ import path from 'path';
|
||||
import readline from 'readline';
|
||||
|
||||
import {
|
||||
Browser,
|
||||
BrowserPlatform,
|
||||
type Browser,
|
||||
type BrowserPlatform,
|
||||
executablePathByBrowser,
|
||||
resolveSystemExecutablePath,
|
||||
ChromeReleaseChannel,
|
||||
type ChromeReleaseChannel,
|
||||
} from './browser-data/browser-data.js';
|
||||
import {Cache} from './Cache.js';
|
||||
import {debug} from './debug.js';
|
||||
|
@ -2,16 +2,16 @@ import {spawn} from 'child_process';
|
||||
|
||||
import {
|
||||
createBuilder,
|
||||
BuilderContext,
|
||||
BuilderOutput,
|
||||
type BuilderContext,
|
||||
type BuilderOutput,
|
||||
targetFromTargetString,
|
||||
BuilderRun,
|
||||
type BuilderRun,
|
||||
} from '@angular-devkit/architect';
|
||||
import {JsonObject} from '@angular-devkit/core';
|
||||
import {type JsonObject} from '@angular-devkit/core';
|
||||
|
||||
import {TestRunner} from '../../schematics/utils/types.js';
|
||||
|
||||
import {PuppeteerBuilderOptions} from './types.js';
|
||||
import {type PuppeteerBuilderOptions} from './types.js';
|
||||
|
||||
const terminalStyles = {
|
||||
cyan: '\u001b[36;1m',
|
||||
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {JsonObject} from '@angular-devkit/core';
|
||||
import {type JsonObject} from '@angular-devkit/core';
|
||||
|
||||
import {TestRunner} from '../../schematics/utils/types.js';
|
||||
import {type TestRunner} from '../../schematics/utils/types.js';
|
||||
|
||||
export interface PuppeteerBuilderOptions extends JsonObject {
|
||||
testRunner: TestRunner;
|
||||
|
@ -14,10 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {chain, Rule, SchematicContext, Tree} from '@angular-devkit/schematics';
|
||||
import {
|
||||
chain,
|
||||
type Rule,
|
||||
type SchematicContext,
|
||||
type Tree,
|
||||
} from '@angular-devkit/schematics';
|
||||
|
||||
import {addFilesSingle} from '../utils/files.js';
|
||||
import {TestRunner, AngularProject} from '../utils/types.js';
|
||||
import {TestRunner, type AngularProject} from '../utils/types.js';
|
||||
|
||||
// You don't have to export the function as default. You can also have more than one rule
|
||||
// factory per file.
|
||||
|
@ -16,19 +16,19 @@
|
||||
|
||||
import {
|
||||
chain,
|
||||
Rule,
|
||||
SchematicContext,
|
||||
type Rule,
|
||||
type SchematicContext,
|
||||
SchematicsException,
|
||||
Tree,
|
||||
type Tree,
|
||||
} from '@angular-devkit/schematics';
|
||||
|
||||
import {addCommonFiles} from '../utils/files.js';
|
||||
import {getApplicationProjects} from '../utils/json.js';
|
||||
import {
|
||||
TestRunner,
|
||||
SchematicsSpec,
|
||||
AngularProject,
|
||||
PuppeteerSchematicsConfig,
|
||||
type SchematicsSpec,
|
||||
type AngularProject,
|
||||
type PuppeteerSchematicsConfig,
|
||||
} from '../utils/types.js';
|
||||
|
||||
// You don't have to export the function as default. You can also have more than one rule
|
||||
|
@ -14,7 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {chain, Rule, SchematicContext, Tree} from '@angular-devkit/schematics';
|
||||
import {
|
||||
chain,
|
||||
type Rule,
|
||||
type SchematicContext,
|
||||
type Tree,
|
||||
} from '@angular-devkit/schematics';
|
||||
import {NodePackageInstallTask} from '@angular-devkit/schematics/tasks';
|
||||
import {of} from 'rxjs';
|
||||
import {concatMap, map, scan} from 'rxjs/operators';
|
||||
|
@ -18,8 +18,8 @@ import {relative, resolve} from 'path';
|
||||
|
||||
import {getSystemPath, normalize, strings} from '@angular-devkit/core';
|
||||
import {
|
||||
SchematicContext,
|
||||
Tree,
|
||||
type SchematicContext,
|
||||
type Tree,
|
||||
apply,
|
||||
applyTemplates,
|
||||
chain,
|
||||
@ -28,7 +28,7 @@ import {
|
||||
url,
|
||||
} from '@angular-devkit/schematics';
|
||||
|
||||
import {AngularProject, TestRunner} from './types.js';
|
||||
import {type AngularProject, type TestRunner} from './types.js';
|
||||
|
||||
export interface FilesOptions {
|
||||
options: {
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {SchematicsException, Tree} from '@angular-devkit/schematics';
|
||||
import {SchematicsException, type Tree} from '@angular-devkit/schematics';
|
||||
|
||||
import type {AngularJson, AngularProject} from './types.js';
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import {get} from 'https';
|
||||
|
||||
import {Tree} from '@angular-devkit/schematics';
|
||||
import {type Tree} from '@angular-devkit/schematics';
|
||||
|
||||
import {getNgCommandName} from './files.js';
|
||||
import {
|
||||
@ -25,7 +25,7 @@ import {
|
||||
getJsonFileAsObject,
|
||||
getObjectAsJson,
|
||||
} from './json.js';
|
||||
import {SchematicsOptions, TestRunner} from './types.js';
|
||||
import {type SchematicsOptions, TestRunner} from './types.js';
|
||||
export interface NodePackage {
|
||||
name: string;
|
||||
version: string;
|
||||
|
@ -1,10 +1,10 @@
|
||||
import https from 'https';
|
||||
import {join} from 'path';
|
||||
|
||||
import {JsonObject} from '@angular-devkit/core';
|
||||
import {type JsonObject} from '@angular-devkit/core';
|
||||
import {
|
||||
SchematicTestRunner,
|
||||
UnitTestTree,
|
||||
type UnitTestTree,
|
||||
} from '@angular-devkit/schematics/testing';
|
||||
import sinon from 'sinon';
|
||||
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
|
||||
import {ChildProcess} from 'child_process';
|
||||
import {type ChildProcess} from 'child_process';
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {Symbol} from '../../third_party/disposablestack/disposablestack.js';
|
||||
import {EventEmitter, EventType} from '../common/EventEmitter.js';
|
||||
import {EventEmitter, type EventType} from '../common/EventEmitter.js';
|
||||
import {debugError, waitWithTimeout} from '../common/util.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
|
||||
|
@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {EventEmitter, EventType} from '../common/EventEmitter.js';
|
||||
import {EventEmitter, type EventType} from '../common/EventEmitter.js';
|
||||
|
||||
import type {Browser, Permission} from './Browser.js';
|
||||
import {Page} from './Page.js';
|
||||
import {type Page} from './Page.js';
|
||||
import type {Target} from './Target.js';
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type {ProtocolMapping} from 'devtools-protocol/types/protocol-mapping.js';
|
||||
|
||||
import type {Connection} from '../common/Connection.js';
|
||||
import {EventEmitter, EventType} from '../common/EventEmitter.js';
|
||||
import {EventEmitter, type EventType} from '../common/EventEmitter.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {assert} from '../util/assert.js';
|
||||
|
||||
|
@ -14,32 +14,32 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {Frame} from '../api/Frame.js';
|
||||
import {type Frame} from '../api/Frame.js';
|
||||
import {getQueryHandlerAndSelector} from '../common/GetQueryHandler.js';
|
||||
import {WaitForSelectorOptions} from '../common/IsolatedWorld.js';
|
||||
import {type WaitForSelectorOptions} from '../common/IsolatedWorld.js';
|
||||
import {LazyArg} from '../common/LazyArg.js';
|
||||
import {
|
||||
ElementFor,
|
||||
EvaluateFuncWith,
|
||||
HandleFor,
|
||||
HandleOr,
|
||||
NodeFor,
|
||||
type ElementFor,
|
||||
type EvaluateFuncWith,
|
||||
type HandleFor,
|
||||
type HandleOr,
|
||||
type NodeFor,
|
||||
} from '../common/types.js';
|
||||
import {KeyInput} from '../common/USKeyboardLayout.js';
|
||||
import {type KeyInput} from '../common/USKeyboardLayout.js';
|
||||
import {isString, withSourcePuppeteerURLIfNone} from '../common/util.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {AsyncIterableUtil} from '../util/AsyncIterableUtil.js';
|
||||
import {throwIfDisposed} from '../util/decorators.js';
|
||||
|
||||
import {
|
||||
KeyboardTypeOptions,
|
||||
KeyPressOptions,
|
||||
MouseClickOptions,
|
||||
type KeyboardTypeOptions,
|
||||
type KeyPressOptions,
|
||||
type MouseClickOptions,
|
||||
} from './Input.js';
|
||||
import {JSHandle} from './JSHandle.js';
|
||||
import {ScreenshotOptions} from './Page.js';
|
||||
import {type ScreenshotOptions} from './Page.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {CDPSession} from './CDPSession.js';
|
||||
import {Realm} from './Realm.js';
|
||||
import {type CDPSession} from './CDPSession.js';
|
||||
import {type Realm} from './Realm.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -14,27 +14,27 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Protocol from 'devtools-protocol';
|
||||
import type Protocol from 'devtools-protocol';
|
||||
|
||||
import {ClickOptions, ElementHandle} from '../api/ElementHandle.js';
|
||||
import {HTTPResponse} from '../api/HTTPResponse.js';
|
||||
import {Page, WaitTimeoutOptions} from '../api/Page.js';
|
||||
import {DeviceRequestPrompt} from '../common/DeviceRequestPrompt.js';
|
||||
import {EventEmitter, EventType} from '../common/EventEmitter.js';
|
||||
import {type ClickOptions, type ElementHandle} from '../api/ElementHandle.js';
|
||||
import {type HTTPResponse} from '../api/HTTPResponse.js';
|
||||
import {type Page, type WaitTimeoutOptions} from '../api/Page.js';
|
||||
import {type DeviceRequestPrompt} from '../common/DeviceRequestPrompt.js';
|
||||
import {EventEmitter, type EventType} from '../common/EventEmitter.js';
|
||||
import {getQueryHandlerAndSelector} from '../common/GetQueryHandler.js';
|
||||
import {transposeIterableHandle} from '../common/HandleIterator.js';
|
||||
import {
|
||||
IsolatedWorldChart,
|
||||
WaitForSelectorOptions,
|
||||
type IsolatedWorldChart,
|
||||
type WaitForSelectorOptions,
|
||||
} from '../common/IsolatedWorld.js';
|
||||
import {LazyArg} from '../common/LazyArg.js';
|
||||
import {PuppeteerLifeCycleEvent} from '../common/LifecycleWatcher.js';
|
||||
import {type PuppeteerLifeCycleEvent} from '../common/LifecycleWatcher.js';
|
||||
import {
|
||||
Awaitable,
|
||||
EvaluateFunc,
|
||||
EvaluateFuncWith,
|
||||
HandleFor,
|
||||
NodeFor,
|
||||
type Awaitable,
|
||||
type EvaluateFunc,
|
||||
type EvaluateFuncWith,
|
||||
type HandleFor,
|
||||
type NodeFor,
|
||||
} from '../common/types.js';
|
||||
import {
|
||||
getPageContent,
|
||||
@ -44,10 +44,14 @@ import {
|
||||
import {assert} from '../util/assert.js';
|
||||
import {throwIfDisposed} from '../util/decorators.js';
|
||||
|
||||
import {CDPSession} from './CDPSession.js';
|
||||
import {KeyboardTypeOptions} from './Input.js';
|
||||
import {FunctionLocator, Locator, NodeLocator} from './locators/locators.js';
|
||||
import {Realm} from './Realm.js';
|
||||
import {type CDPSession} from './CDPSession.js';
|
||||
import {type KeyboardTypeOptions} from './Input.js';
|
||||
import {
|
||||
FunctionLocator,
|
||||
type Locator,
|
||||
NodeLocator,
|
||||
} from './locators/locators.js';
|
||||
import {type Realm} from './Realm.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -13,11 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from './CDPSession.js';
|
||||
import {Frame} from './Frame.js';
|
||||
import {HTTPResponse} from './HTTPResponse.js';
|
||||
import {type CDPSession} from './CDPSession.js';
|
||||
import {type Frame} from './Frame.js';
|
||||
import {type HTTPResponse} from './HTTPResponse.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Protocol from 'devtools-protocol';
|
||||
import type Protocol from 'devtools-protocol';
|
||||
|
||||
import {SecurityDetails} from '../common/SecurityDetails.js';
|
||||
import {type SecurityDetails} from '../common/SecurityDetails.js';
|
||||
|
||||
import {Frame} from './Frame.js';
|
||||
import {HTTPRequest} from './HTTPRequest.js';
|
||||
import {type Frame} from './Frame.js';
|
||||
import {type HTTPRequest} from './HTTPRequest.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {KeyInput} from '../common/USKeyboardLayout.js';
|
||||
import {type KeyInput} from '../common/USKeyboardLayout.js';
|
||||
|
||||
import {Point} from './ElementHandle.js';
|
||||
import {type Point} from './ElementHandle.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -14,20 +14,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Protocol from 'devtools-protocol';
|
||||
import type Protocol from 'devtools-protocol';
|
||||
|
||||
import {Symbol} from '../../third_party/disposablestack/disposablestack.js';
|
||||
import {
|
||||
EvaluateFuncWith,
|
||||
HandleFor,
|
||||
HandleOr,
|
||||
Moveable,
|
||||
type EvaluateFuncWith,
|
||||
type HandleFor,
|
||||
type HandleOr,
|
||||
type Moveable,
|
||||
} from '../common/types.js';
|
||||
import {debugError, withSourcePuppeteerURLIfNone} from '../common/util.js';
|
||||
import {moveable, throwIfDisposed} from '../util/decorators.js';
|
||||
|
||||
import {ElementHandle} from './ElementHandle.js';
|
||||
import {Realm} from './Realm.js';
|
||||
import {type ElementHandle} from './ElementHandle.js';
|
||||
import {type Realm} from './Realm.js';
|
||||
|
||||
/**
|
||||
* Represents a reference to a JavaScript object. Instances can be created using
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import type {Readable} from 'stream';
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {
|
||||
delay,
|
||||
@ -28,7 +28,7 @@ import {
|
||||
fromEvent,
|
||||
map,
|
||||
merge,
|
||||
Observable,
|
||||
type Observable,
|
||||
of,
|
||||
raceWith,
|
||||
startWith,
|
||||
@ -40,29 +40,29 @@ import type {Accessibility} from '../common/Accessibility.js';
|
||||
import type {BidiNetworkManager} from '../common/bidi/NetworkManager.js';
|
||||
import type {ConsoleMessage} from '../common/ConsoleMessage.js';
|
||||
import type {Coverage} from '../common/Coverage.js';
|
||||
import {Device} from '../common/Device.js';
|
||||
import {DeviceRequestPrompt} from '../common/DeviceRequestPrompt.js';
|
||||
import {type Device} from '../common/Device.js';
|
||||
import {type DeviceRequestPrompt} from '../common/DeviceRequestPrompt.js';
|
||||
import {TargetCloseError} from '../common/Errors.js';
|
||||
import {
|
||||
EventEmitter,
|
||||
EventsWithWildcard,
|
||||
EventType,
|
||||
Handler,
|
||||
type EventsWithWildcard,
|
||||
type EventType,
|
||||
type Handler,
|
||||
} from '../common/EventEmitter.js';
|
||||
import type {FileChooser} from '../common/FileChooser.js';
|
||||
import type {WaitForSelectorOptions} from '../common/IsolatedWorld.js';
|
||||
import type {PuppeteerLifeCycleEvent} from '../common/LifecycleWatcher.js';
|
||||
import {
|
||||
NetworkManager as CdpNetworkManager,
|
||||
Credentials,
|
||||
NetworkConditions,
|
||||
type NetworkManager as CdpNetworkManager,
|
||||
type Credentials,
|
||||
type NetworkConditions,
|
||||
NetworkManagerEvent,
|
||||
} from '../common/NetworkManager.js';
|
||||
import {
|
||||
LowerCasePaperFormat,
|
||||
type LowerCasePaperFormat,
|
||||
paperFormats,
|
||||
ParsedPDFOptions,
|
||||
PDFOptions,
|
||||
type ParsedPDFOptions,
|
||||
type PDFOptions,
|
||||
} from '../common/PDFOptions.js';
|
||||
import type {Viewport} from '../common/PuppeteerViewport.js';
|
||||
import type {Tracing} from '../common/Tracing.js';
|
||||
@ -83,7 +83,7 @@ import {
|
||||
} from '../common/util.js';
|
||||
import type {WebWorker} from '../common/WebWorker.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
import {type Deferred} from '../util/Deferred.js';
|
||||
|
||||
import type {Browser} from './Browser.js';
|
||||
import type {BrowserContext} from './BrowserContext.js';
|
||||
@ -96,10 +96,15 @@ import type {
|
||||
FrameAddStyleTagOptions,
|
||||
FrameWaitForFunctionOptions,
|
||||
} from './Frame.js';
|
||||
import {Keyboard, KeyboardTypeOptions, Mouse, Touchscreen} from './Input.js';
|
||||
import {
|
||||
type Keyboard,
|
||||
type KeyboardTypeOptions,
|
||||
type Mouse,
|
||||
type Touchscreen,
|
||||
} from './Input.js';
|
||||
import type {JSHandle} from './JSHandle.js';
|
||||
import {
|
||||
AwaitedLocator,
|
||||
type AwaitedLocator,
|
||||
FunctionLocator,
|
||||
Locator,
|
||||
NodeLocator,
|
||||
|
@ -14,13 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {TimeoutSettings} from '../common/TimeoutSettings.js';
|
||||
import {EvaluateFunc, HandleFor, InnerLazyParams} from '../common/types.js';
|
||||
import {type TimeoutSettings} from '../common/TimeoutSettings.js';
|
||||
import {
|
||||
type EvaluateFunc,
|
||||
type HandleFor,
|
||||
type InnerLazyParams,
|
||||
} from '../common/types.js';
|
||||
import {TaskManager, WaitTask} from '../common/WaitTask.js';
|
||||
|
||||
import {ElementHandle} from './ElementHandle.js';
|
||||
import {Environment} from './Environment.js';
|
||||
import {JSHandle} from './JSHandle.js';
|
||||
import {type ElementHandle} from './ElementHandle.js';
|
||||
import {type Environment} from './Environment.js';
|
||||
import {type JSHandle} from './JSHandle.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -16,10 +16,10 @@
|
||||
|
||||
import type {Browser} from '../api/Browser.js';
|
||||
import type {BrowserContext} from '../api/BrowserContext.js';
|
||||
import {Page} from '../api/Page.js';
|
||||
import {WebWorker} from '../common/WebWorker.js';
|
||||
import {type Page} from '../api/Page.js';
|
||||
import {type WebWorker} from '../common/WebWorker.js';
|
||||
|
||||
import {CDPSession} from './CDPSession.js';
|
||||
import {type CDPSession} from './CDPSession.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Observable} from '../../../third_party/rxjs/rxjs.js';
|
||||
import {HandleFor} from '../../common/common.js';
|
||||
import {type Observable} from '../../../third_party/rxjs/rxjs.js';
|
||||
import {type HandleFor} from '../../common/common.js';
|
||||
|
||||
import {Locator, VisibilityOption} from './locators.js';
|
||||
import {Locator, type VisibilityOption} from './locators.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -15,17 +15,17 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
Observable,
|
||||
type Observable,
|
||||
filter,
|
||||
from,
|
||||
map,
|
||||
mergeMap,
|
||||
throwIfEmpty,
|
||||
} from '../../../third_party/rxjs/rxjs.js';
|
||||
import {Awaitable, HandleFor} from '../../common/common.js';
|
||||
import {type Awaitable, type HandleFor} from '../../common/common.js';
|
||||
|
||||
import {DelegatedLocator} from './DelegatedLocator.js';
|
||||
import {ActionOptions, Locator} from './locators.js';
|
||||
import {type ActionOptions, type Locator} from './locators.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -15,16 +15,16 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
Observable,
|
||||
type Observable,
|
||||
defer,
|
||||
from,
|
||||
throwIfEmpty,
|
||||
} from '../../../third_party/rxjs/rxjs.js';
|
||||
import {Awaitable, HandleFor} from '../../common/types.js';
|
||||
import {Frame} from '../Frame.js';
|
||||
import {Page} from '../Page.js';
|
||||
import {type Awaitable, type HandleFor} from '../../common/types.js';
|
||||
import {type Frame} from '../Frame.js';
|
||||
import {type Page} from '../Page.js';
|
||||
|
||||
import {ActionOptions, Locator} from './locators.js';
|
||||
import {type ActionOptions, Locator} from './locators.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
import {
|
||||
EMPTY,
|
||||
Observable,
|
||||
OperatorFunction,
|
||||
type Observable,
|
||||
type OperatorFunction,
|
||||
catchError,
|
||||
defaultIfEmpty,
|
||||
defer,
|
||||
@ -37,19 +37,23 @@ import {
|
||||
retry,
|
||||
tap,
|
||||
} from '../../../third_party/rxjs/rxjs.js';
|
||||
import {EventEmitter, EventType} from '../../common/EventEmitter.js';
|
||||
import {HandleFor} from '../../common/types.js';
|
||||
import {EventEmitter, type EventType} from '../../common/EventEmitter.js';
|
||||
import {type HandleFor} from '../../common/types.js';
|
||||
import {debugError, timeout} from '../../common/util.js';
|
||||
import {BoundingBox, ClickOptions, ElementHandle} from '../ElementHandle.js';
|
||||
import {
|
||||
type BoundingBox,
|
||||
type ClickOptions,
|
||||
type ElementHandle,
|
||||
} from '../ElementHandle.js';
|
||||
|
||||
import {
|
||||
Action,
|
||||
AwaitedLocator,
|
||||
type Action,
|
||||
type AwaitedLocator,
|
||||
FilteredLocator,
|
||||
HandleMapper,
|
||||
type HandleMapper,
|
||||
MappedLocator,
|
||||
Mapper,
|
||||
Predicate,
|
||||
type Mapper,
|
||||
type Predicate,
|
||||
RaceLocator,
|
||||
} from './locators.js';
|
||||
|
||||
|
@ -14,10 +14,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Observable, from, mergeMap} from '../../../third_party/rxjs/rxjs.js';
|
||||
import {Awaitable, HandleFor} from '../../common/common.js';
|
||||
import {
|
||||
type Observable,
|
||||
from,
|
||||
mergeMap,
|
||||
} from '../../../third_party/rxjs/rxjs.js';
|
||||
import {type Awaitable, type HandleFor} from '../../common/common.js';
|
||||
|
||||
import {ActionOptions, DelegatedLocator, Locator} from './locators.js';
|
||||
import {
|
||||
type ActionOptions,
|
||||
DelegatedLocator,
|
||||
type Locator,
|
||||
} from './locators.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import {
|
||||
EMPTY,
|
||||
Observable,
|
||||
type Observable,
|
||||
defer,
|
||||
filter,
|
||||
first,
|
||||
@ -26,11 +26,11 @@ import {
|
||||
retry,
|
||||
throwIfEmpty,
|
||||
} from '../../../third_party/rxjs/rxjs.js';
|
||||
import {HandleFor, NodeFor} from '../../common/types.js';
|
||||
import {Frame} from '../Frame.js';
|
||||
import {Page} from '../Page.js';
|
||||
import {type HandleFor, type NodeFor} from '../../common/types.js';
|
||||
import {type Frame} from '../Frame.js';
|
||||
import {type Page} from '../Page.js';
|
||||
|
||||
import {ActionOptions, Locator, RETRY_DELAY} from './locators.js';
|
||||
import {type ActionOptions, Locator, RETRY_DELAY} from './locators.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Observable, race} from '../../../third_party/rxjs/rxjs.js';
|
||||
import {HandleFor} from '../../puppeteer-core.js';
|
||||
import {type Observable, race} from '../../../third_party/rxjs/rxjs.js';
|
||||
import {type HandleFor} from '../../puppeteer-core.js';
|
||||
|
||||
import {ActionOptions, Locator} from './locators.js';
|
||||
import {type ActionOptions, Locator} from './locators.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {ElementHandle} from '../api/ElementHandle.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {type ElementHandle} from '../api/ElementHandle.js';
|
||||
|
||||
/**
|
||||
* Represents a Node and the properties of it that are relevant to Accessibility.
|
||||
|
@ -14,16 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {ElementHandle} from '../api/ElementHandle.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {type ElementHandle} from '../api/ElementHandle.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {AsyncIterableUtil} from '../util/AsyncIterableUtil.js';
|
||||
|
||||
import {IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {QueryHandler, QuerySelector} from './QueryHandler.js';
|
||||
import {AwaitableIterable} from './types.js';
|
||||
import {type IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {QueryHandler, type QuerySelector} from './QueryHandler.js';
|
||||
import {type AwaitableIterable} from './types.js';
|
||||
|
||||
const queryAXTree = async (
|
||||
client: CDPSession,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {JSHandle} from '../api/JSHandle.js';
|
||||
import {isErrorLike} from '../util/ErrorLike.js';
|
||||
|
||||
import {ExecutionContext} from './ExecutionContext.js';
|
||||
import {type ExecutionContext} from './ExecutionContext.js';
|
||||
import {debugError} from './util.js';
|
||||
|
||||
/**
|
||||
|
@ -14,40 +14,40 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {ChildProcess} from 'child_process';
|
||||
import {type ChildProcess} from 'child_process';
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {
|
||||
Browser as BrowserBase,
|
||||
BrowserCloseCallback,
|
||||
BrowserContextOptions,
|
||||
type BrowserCloseCallback,
|
||||
type BrowserContextOptions,
|
||||
BrowserEvent,
|
||||
IsPageTargetCallback,
|
||||
Permission,
|
||||
TargetFilterCallback,
|
||||
type IsPageTargetCallback,
|
||||
type Permission,
|
||||
type TargetFilterCallback,
|
||||
WEB_PERMISSION_TO_PROTOCOL_PERMISSION,
|
||||
} from '../api/Browser.js';
|
||||
import {BrowserContext, BrowserContextEvent} from '../api/BrowserContext.js';
|
||||
import {CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {Page} from '../api/Page.js';
|
||||
import {Target} from '../api/Target.js';
|
||||
import {type CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {type Page} from '../api/Page.js';
|
||||
import {type Target} from '../api/Target.js';
|
||||
import {USE_TAB_TARGET} from '../environment.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
|
||||
import {ChromeTargetManager} from './ChromeTargetManager.js';
|
||||
import {Connection} from './Connection.js';
|
||||
import {type Connection} from './Connection.js';
|
||||
import {FirefoxTargetManager} from './FirefoxTargetManager.js';
|
||||
import {Viewport} from './PuppeteerViewport.js';
|
||||
import {type Viewport} from './PuppeteerViewport.js';
|
||||
import {
|
||||
CdpTarget,
|
||||
type CdpTarget,
|
||||
DevToolsTarget,
|
||||
InitializationStatus,
|
||||
OtherTarget,
|
||||
PageTarget,
|
||||
WorkerTarget,
|
||||
} from './Target.js';
|
||||
import {TargetManager, TargetManagerEvent} from './TargetManager.js';
|
||||
import {type TargetManager, TargetManagerEvent} from './TargetManager.js';
|
||||
import {TaskQueue} from './TaskQueue.js';
|
||||
|
||||
/**
|
||||
|
@ -14,17 +14,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {IsPageTargetCallback, TargetFilterCallback} from '../api/Browser.js';
|
||||
import {
|
||||
type IsPageTargetCallback,
|
||||
type TargetFilterCallback,
|
||||
} from '../api/Browser.js';
|
||||
import {isNode} from '../environment.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {isErrorLike} from '../util/ErrorLike.js';
|
||||
|
||||
import {CdpBrowser} from './Browser.js';
|
||||
import {Connection} from './Connection.js';
|
||||
import {ConnectionTransport} from './ConnectionTransport.js';
|
||||
import {type ConnectionTransport} from './ConnectionTransport.js';
|
||||
import {getFetch} from './fetch.js';
|
||||
import type {ConnectOptions} from './Puppeteer.js';
|
||||
import {Viewport} from './PuppeteerViewport.js';
|
||||
import {type Viewport} from './PuppeteerViewport.js';
|
||||
import {debugError} from './util.js';
|
||||
/**
|
||||
* Generic browser options that can be passed when launching any browser or when
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {ConnectionTransport} from './ConnectionTransport.js';
|
||||
import {type ConnectionTransport} from './ConnectionTransport.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -1,15 +1,19 @@
|
||||
import {ProtocolMapping} from 'devtools-protocol/types/protocol-mapping.js';
|
||||
import {type ProtocolMapping} from 'devtools-protocol/types/protocol-mapping.js';
|
||||
|
||||
import {CDPEvents, CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {
|
||||
type CDPEvents,
|
||||
CDPSession,
|
||||
CDPSessionEvent,
|
||||
} from '../api/CDPSession.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
|
||||
import {
|
||||
CallbackRegistry,
|
||||
Connection,
|
||||
type Connection,
|
||||
createProtocolErrorMessage,
|
||||
} from './Connection.js';
|
||||
import {TargetCloseError} from './Errors.js';
|
||||
import {CdpTarget} from './Target.js';
|
||||
import {type CdpTarget} from './Target.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -14,22 +14,22 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {TargetFilterCallback} from '../api/Browser.js';
|
||||
import {type TargetFilterCallback} from '../api/Browser.js';
|
||||
import {CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {TargetType} from '../api/Target.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
|
||||
import {Connection} from './Connection.js';
|
||||
import {type Connection} from './Connection.js';
|
||||
import {EventEmitter} from './EventEmitter.js';
|
||||
import {CdpTarget, InitializationStatus} from './Target.js';
|
||||
import {
|
||||
TargetFactory,
|
||||
TargetManager,
|
||||
type TargetFactory,
|
||||
type TargetManager,
|
||||
TargetManagerEvent,
|
||||
TargetManagerEvents,
|
||||
type TargetManagerEvents,
|
||||
} from './TargetManager.js';
|
||||
import {debugError} from './util.js';
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Product} from './Product.js';
|
||||
import {type Product} from './Product.js';
|
||||
|
||||
/**
|
||||
* Defines experiment options for Puppeteer.
|
||||
|
@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
import {ProtocolMapping} from 'devtools-protocol/types/protocol-mapping.js';
|
||||
|
||||
import {
|
||||
CDPSession,
|
||||
type CDPSession,
|
||||
CDPSessionEvent,
|
||||
CDPSessionEvents,
|
||||
type CDPSessionEvents,
|
||||
} from '../api/CDPSession.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {JSHandle} from '../api/JSHandle.js';
|
||||
import {type JSHandle} from '../api/JSHandle.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
|
||||
import {EventSubscription} from './EventEmitter.js';
|
||||
|
@ -18,7 +18,11 @@ import type PuppeteerUtil from '../injected/injected.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {interpolateFunction, stringifyFunction} from '../util/Function.js';
|
||||
|
||||
import {QueryHandler, QuerySelector, QuerySelectorAll} from './QueryHandler.js';
|
||||
import {
|
||||
QueryHandler,
|
||||
type QuerySelector,
|
||||
type QuerySelectorAll,
|
||||
} from './QueryHandler.js';
|
||||
import {scriptInjector} from './ScriptInjector.js';
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Viewport} from './PuppeteerViewport.js';
|
||||
import {type Viewport} from './PuppeteerViewport.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -18,7 +18,7 @@ import {describe, it} from 'node:test';
|
||||
|
||||
import expect from 'expect';
|
||||
|
||||
import {CDPSessionEvents} from '../api/CDPSession.js';
|
||||
import {type CDPSessionEvents} from '../api/CDPSession.js';
|
||||
|
||||
import {
|
||||
DeviceRequestPrompt,
|
||||
|
@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Protocol from 'devtools-protocol';
|
||||
import type Protocol from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {WaitTimeoutOptions} from '../api/Page.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {type WaitTimeoutOptions} from '../api/Page.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
|
||||
import {TimeoutSettings} from './TimeoutSettings.js';
|
||||
import {type TimeoutSettings} from './TimeoutSettings.js';
|
||||
|
||||
/**
|
||||
* Device in a request prompt.
|
||||
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {Dialog} from '../api/Dialog.js';
|
||||
|
||||
/**
|
||||
|
@ -14,17 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {AutofillData, ElementHandle} from '../api/ElementHandle.js';
|
||||
import {Page, ScreenshotOptions} from '../api/Page.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {type AutofillData, ElementHandle} from '../api/ElementHandle.js';
|
||||
import {type Page, type ScreenshotOptions} from '../api/Page.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {throwIfDisposed} from '../util/decorators.js';
|
||||
|
||||
import {CdpFrame} from './Frame.js';
|
||||
import {FrameManager} from './FrameManager.js';
|
||||
import {IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {type CdpFrame} from './Frame.js';
|
||||
import {type FrameManager} from './FrameManager.js';
|
||||
import {type IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {CdpJSHandle} from './JSHandle.js';
|
||||
import {debugError} from './util.js';
|
||||
|
||||
|
@ -13,15 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {GeolocationOptions, MediaFeature} from '../api/Page.js';
|
||||
import {type CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {type GeolocationOptions, type MediaFeature} from '../api/Page.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {invokeAtMostOnceForArguments} from '../util/decorators.js';
|
||||
import {isErrorLike} from '../util/ErrorLike.js';
|
||||
|
||||
import {Viewport} from './PuppeteerViewport.js';
|
||||
import {type Viewport} from './PuppeteerViewport.js';
|
||||
import {debugError} from './util.js';
|
||||
|
||||
interface ViewportState {
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
import {Symbol} from '../../third_party/disposablestack/disposablestack.js';
|
||||
import mitt, {
|
||||
Emitter,
|
||||
EventHandlerMap,
|
||||
EventType,
|
||||
type Emitter,
|
||||
type EventHandlerMap,
|
||||
type EventType,
|
||||
} from '../../third_party/mitt/index.js';
|
||||
|
||||
export {
|
||||
|
@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import type {ElementHandle} from '../api/ElementHandle.js';
|
||||
import {JSHandle} from '../api/JSHandle.js';
|
||||
import {type JSHandle} from '../api/JSHandle.js';
|
||||
import type PuppeteerUtil from '../injected/injected.js';
|
||||
import {AsyncIterableUtil} from '../util/AsyncIterableUtil.js';
|
||||
import {stringifyFunction} from '../util/Function.js';
|
||||
@ -26,11 +26,11 @@ import {stringifyFunction} from '../util/Function.js';
|
||||
import {ARIAQueryHandler} from './AriaQueryHandler.js';
|
||||
import {Binding} from './Binding.js';
|
||||
import {CdpElementHandle} from './ElementHandle.js';
|
||||
import {IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {type IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {CdpJSHandle} from './JSHandle.js';
|
||||
import {LazyArg} from './LazyArg.js';
|
||||
import {scriptInjector} from './ScriptInjector.js';
|
||||
import {EvaluateFunc, HandleFor} from './types.js';
|
||||
import {type EvaluateFunc, type HandleFor} from './types.js';
|
||||
import {
|
||||
PuppeteerURL,
|
||||
createEvaluationError,
|
||||
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {ElementHandle} from '../api/ElementHandle.js';
|
||||
import {type ElementHandle} from '../api/ElementHandle.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
|
||||
/**
|
||||
|
@ -14,21 +14,21 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {TargetFilterCallback} from '../api/Browser.js';
|
||||
import {CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {type TargetFilterCallback} from '../api/Browser.js';
|
||||
import {type CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
|
||||
import {Connection} from './Connection.js';
|
||||
import {type Connection} from './Connection.js';
|
||||
import {EventEmitter} from './EventEmitter.js';
|
||||
import {CdpTarget} from './Target.js';
|
||||
import {type CdpTarget} from './Target.js';
|
||||
import {
|
||||
TargetFactory,
|
||||
type TargetFactory,
|
||||
TargetManagerEvent,
|
||||
TargetManager,
|
||||
TargetManagerEvents,
|
||||
type TargetManager,
|
||||
type TargetManagerEvents,
|
||||
} from './TargetManager.js';
|
||||
|
||||
/**
|
||||
|
@ -14,24 +14,27 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {Frame, FrameEvent, throwIfDetached} from '../api/Frame.js';
|
||||
import {HTTPResponse} from '../api/HTTPResponse.js';
|
||||
import {Page, WaitTimeoutOptions} from '../api/Page.js';
|
||||
import {type HTTPResponse} from '../api/HTTPResponse.js';
|
||||
import {type Page, type WaitTimeoutOptions} from '../api/Page.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
import {isErrorLike} from '../util/ErrorLike.js';
|
||||
|
||||
import {
|
||||
DeviceRequestPrompt,
|
||||
DeviceRequestPromptManager,
|
||||
type DeviceRequestPrompt,
|
||||
type DeviceRequestPromptManager,
|
||||
} from './DeviceRequestPrompt.js';
|
||||
import {FrameManager} from './FrameManager.js';
|
||||
import {type FrameManager} from './FrameManager.js';
|
||||
import {IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {MAIN_WORLD, PUPPETEER_WORLD} from './IsolatedWorlds.js';
|
||||
import {LifecycleWatcher, PuppeteerLifeCycleEvent} from './LifecycleWatcher.js';
|
||||
import {
|
||||
LifecycleWatcher,
|
||||
type PuppeteerLifeCycleEvent,
|
||||
} from './LifecycleWatcher.js';
|
||||
import {setPageContent} from './util.js';
|
||||
|
||||
/**
|
||||
|
@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {type CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {FrameEvent} from '../api/Frame.js';
|
||||
import {Page} from '../api/Page.js';
|
||||
import {type Page} from '../api/Page.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
import {isErrorLike} from '../util/ErrorLike.js';
|
||||
@ -26,15 +26,15 @@ import {isErrorLike} from '../util/ErrorLike.js';
|
||||
import {CdpCDPSession} from './CDPSession.js';
|
||||
import {isTargetClosedError} from './Connection.js';
|
||||
import {DeviceRequestPromptManager} from './DeviceRequestPrompt.js';
|
||||
import {EventEmitter, EventType} from './EventEmitter.js';
|
||||
import {EventEmitter, type EventType} from './EventEmitter.js';
|
||||
import {ExecutionContext} from './ExecutionContext.js';
|
||||
import {CdpFrame} from './Frame.js';
|
||||
import {FrameTree} from './FrameTree.js';
|
||||
import {IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {type IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {MAIN_WORLD, PUPPETEER_WORLD} from './IsolatedWorlds.js';
|
||||
import {NetworkManager} from './NetworkManager.js';
|
||||
import {CdpTarget} from './Target.js';
|
||||
import {TimeoutSettings} from './TimeoutSettings.js';
|
||||
import {type CdpTarget} from './Target.js';
|
||||
import {type TimeoutSettings} from './TimeoutSettings.js';
|
||||
import {debugError, PuppeteerURL} from './util.js';
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Frame} from '../api/Frame.js';
|
||||
import {type Frame} from '../api/Frame.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
|
||||
/**
|
||||
|
@ -13,25 +13,25 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {Frame} from '../api/Frame.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {type Frame} from '../api/Frame.js';
|
||||
import {
|
||||
ContinueRequestOverrides,
|
||||
ErrorCode,
|
||||
type ContinueRequestOverrides,
|
||||
type ErrorCode,
|
||||
headersArray,
|
||||
HTTPRequest,
|
||||
InterceptResolutionAction,
|
||||
InterceptResolutionState,
|
||||
ResourceType,
|
||||
ResponseForRequest,
|
||||
type InterceptResolutionState,
|
||||
type ResourceType,
|
||||
type ResponseForRequest,
|
||||
STATUS_TEXTS,
|
||||
} from '../api/HTTPRequest.js';
|
||||
import {HTTPResponse} from '../api/HTTPResponse.js';
|
||||
import {type HTTPResponse} from '../api/HTTPResponse.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
|
||||
import {ProtocolError} from './Errors.js';
|
||||
import {type ProtocolError} from './Errors.js';
|
||||
import {debugError, isString} from './util.js';
|
||||
|
||||
/**
|
||||
|
@ -13,15 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {Frame} from '../api/Frame.js';
|
||||
import {HTTPResponse, RemoteAddress} from '../api/HTTPResponse.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {type Frame} from '../api/Frame.js';
|
||||
import {HTTPResponse, type RemoteAddress} from '../api/HTTPResponse.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
|
||||
import {ProtocolError} from './Errors.js';
|
||||
import {CdpHTTPRequest} from './HTTPRequest.js';
|
||||
import {type CdpHTTPRequest} from './HTTPRequest.js';
|
||||
import {SecurityDetails} from './SecurityDetails.js';
|
||||
|
||||
/**
|
||||
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {JSHandle} from '../api/JSHandle.js';
|
||||
import {type JSHandle} from '../api/JSHandle.js';
|
||||
|
||||
import {AwaitableIterable, HandleFor} from './types.js';
|
||||
import {type AwaitableIterable, type HandleFor} from './types.js';
|
||||
|
||||
const DEFAULT_BATCH_SIZE = 20;
|
||||
|
||||
|
@ -14,26 +14,30 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {Point} from '../api/ElementHandle.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {type Point} from '../api/ElementHandle.js';
|
||||
import {
|
||||
Keyboard,
|
||||
KeyDownOptions,
|
||||
KeyPressOptions,
|
||||
type KeyDownOptions,
|
||||
type KeyPressOptions,
|
||||
Mouse,
|
||||
MouseButton,
|
||||
MouseClickOptions,
|
||||
MouseMoveOptions,
|
||||
MouseOptions,
|
||||
MouseWheelOptions,
|
||||
type MouseClickOptions,
|
||||
type MouseMoveOptions,
|
||||
type MouseOptions,
|
||||
type MouseWheelOptions,
|
||||
Touchscreen,
|
||||
KeyboardTypeOptions,
|
||||
type KeyboardTypeOptions,
|
||||
} from '../api/Input.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
|
||||
import {_keyDefinitions, KeyDefinition, KeyInput} from './USKeyboardLayout.js';
|
||||
import {
|
||||
_keyDefinitions,
|
||||
type KeyDefinition,
|
||||
type KeyInput,
|
||||
} from './USKeyboardLayout.js';
|
||||
|
||||
type KeyDescription = Required<
|
||||
Pick<KeyDefinition, 'keyCode' | 'key' | 'text' | 'code' | 'location'>
|
||||
|
@ -14,19 +14,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {JSHandle} from '../api/JSHandle.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {type JSHandle} from '../api/JSHandle.js';
|
||||
import {Realm} from '../api/Realm.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
|
||||
import {Binding} from './Binding.js';
|
||||
import {ExecutionContext} from './ExecutionContext.js';
|
||||
import {type Binding} from './Binding.js';
|
||||
import {type ExecutionContext} from './ExecutionContext.js';
|
||||
import {CdpFrame} from './Frame.js';
|
||||
import {MAIN_WORLD, PUPPETEER_WORLD} from './IsolatedWorlds.js';
|
||||
import {TimeoutSettings} from './TimeoutSettings.js';
|
||||
import {BindingPayload, EvaluateFunc, HandleFor} from './types.js';
|
||||
import {type MAIN_WORLD, type PUPPETEER_WORLD} from './IsolatedWorlds.js';
|
||||
import {type TimeoutSettings} from './TimeoutSettings.js';
|
||||
import {
|
||||
type BindingPayload,
|
||||
type EvaluateFunc,
|
||||
type HandleFor,
|
||||
} from './types.js';
|
||||
import {
|
||||
addPageBinding,
|
||||
createCdpHandle,
|
||||
@ -34,7 +38,7 @@ import {
|
||||
Mutex,
|
||||
withSourcePuppeteerURLIfNone,
|
||||
} from './util.js';
|
||||
import {WebWorker} from './WebWorker.js';
|
||||
import {type WebWorker} from './WebWorker.js';
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {JSHandle} from '../api/JSHandle.js';
|
||||
|
||||
import type {CdpElementHandle} from './ElementHandle.js';
|
||||
import {IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {type IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {releaseObject, valueFromRemoteObject} from './util.js';
|
||||
|
||||
/**
|
||||
|
@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {JSHandle} from '../api/JSHandle.js';
|
||||
import PuppeteerUtil from '../injected/injected.js';
|
||||
import {type JSHandle} from '../api/JSHandle.js';
|
||||
import type PuppeteerUtil from '../injected/injected.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -14,19 +14,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Protocol from 'devtools-protocol';
|
||||
import type Protocol from 'devtools-protocol';
|
||||
|
||||
import {Frame, FrameEvent} from '../api/Frame.js';
|
||||
import {HTTPResponse} from '../api/HTTPResponse.js';
|
||||
import {type Frame, FrameEvent} from '../api/Frame.js';
|
||||
import {type HTTPResponse} from '../api/HTTPResponse.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
|
||||
import {TimeoutError} from './Errors.js';
|
||||
import {type TimeoutError} from './Errors.js';
|
||||
import {EventSubscription} from './EventEmitter.js';
|
||||
import {CdpFrame} from './Frame.js';
|
||||
import {type CdpFrame} from './Frame.js';
|
||||
import {FrameManagerEvent} from './FrameManager.js';
|
||||
import {CdpHTTPRequest} from './HTTPRequest.js';
|
||||
import {NetworkManager, NetworkManagerEvent} from './NetworkManager.js';
|
||||
import {type CdpHTTPRequest} from './HTTPRequest.js';
|
||||
import {type NetworkManager, NetworkManagerEvent} from './NetworkManager.js';
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CdpHTTPRequest} from './HTTPRequest.js';
|
||||
import {type CdpHTTPRequest} from './HTTPRequest.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -18,12 +18,12 @@ import {describe, it} from 'node:test';
|
||||
|
||||
import expect from 'expect';
|
||||
|
||||
import {CDPSessionEvents} from '../api/CDPSession.js';
|
||||
import {HTTPRequest} from '../api/HTTPRequest.js';
|
||||
import {HTTPResponse} from '../api/HTTPResponse.js';
|
||||
import {type CDPSessionEvents} from '../api/CDPSession.js';
|
||||
import {type HTTPRequest} from '../api/HTTPRequest.js';
|
||||
import {type HTTPResponse} from '../api/HTTPResponse.js';
|
||||
|
||||
import {EventEmitter} from './EventEmitter.js';
|
||||
import {CdpFrame} from './Frame.js';
|
||||
import {type CdpFrame} from './Frame.js';
|
||||
import {NetworkManager, NetworkManagerEvent} from './NetworkManager.js';
|
||||
|
||||
// TODO: develop a helper to generate fake network events for attributes that
|
||||
|
@ -16,14 +16,21 @@
|
||||
|
||||
import type {Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {type CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import type {Frame} from '../api/Frame.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
|
||||
import {EventEmitter, EventSubscription, EventType} from './EventEmitter.js';
|
||||
import {
|
||||
EventEmitter,
|
||||
EventSubscription,
|
||||
type EventType,
|
||||
} from './EventEmitter.js';
|
||||
import {CdpHTTPRequest} from './HTTPRequest.js';
|
||||
import {CdpHTTPResponse} from './HTTPResponse.js';
|
||||
import {FetchRequestId, NetworkEventManager} from './NetworkEventManager.js';
|
||||
import {
|
||||
type FetchRequestId,
|
||||
NetworkEventManager,
|
||||
} from './NetworkEventManager.js';
|
||||
import {debugError, isString} from './util.js';
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
import NodeWebSocket from 'ws';
|
||||
|
||||
import {ConnectionTransport} from '../common/ConnectionTransport.js';
|
||||
import {type ConnectionTransport} from '../common/ConnectionTransport.js';
|
||||
import {packageVersion} from '../generated/version.js';
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {QueryHandler, QuerySelector, QuerySelectorAll} from './QueryHandler.js';
|
||||
import {
|
||||
QueryHandler,
|
||||
type QuerySelector,
|
||||
type QuerySelectorAll,
|
||||
} from './QueryHandler.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -20,23 +20,23 @@ import {Protocol} from 'devtools-protocol';
|
||||
|
||||
import type {Browser} from '../api/Browser.js';
|
||||
import type {BrowserContext} from '../api/BrowserContext.js';
|
||||
import {CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {ElementHandle} from '../api/ElementHandle.js';
|
||||
import {Frame} from '../api/Frame.js';
|
||||
import {HTTPRequest} from '../api/HTTPRequest.js';
|
||||
import {HTTPResponse} from '../api/HTTPResponse.js';
|
||||
import {JSHandle} from '../api/JSHandle.js';
|
||||
import {type CDPSession, CDPSessionEvent} from '../api/CDPSession.js';
|
||||
import {type ElementHandle} from '../api/ElementHandle.js';
|
||||
import {type Frame} from '../api/Frame.js';
|
||||
import {type HTTPRequest} from '../api/HTTPRequest.js';
|
||||
import {type HTTPResponse} from '../api/HTTPResponse.js';
|
||||
import {type JSHandle} from '../api/JSHandle.js';
|
||||
import {
|
||||
GeolocationOptions,
|
||||
MediaFeature,
|
||||
Metrics,
|
||||
NewDocumentScriptEvaluation,
|
||||
type GeolocationOptions,
|
||||
type MediaFeature,
|
||||
type Metrics,
|
||||
type NewDocumentScriptEvaluation,
|
||||
Page,
|
||||
PageEvent,
|
||||
ScreenshotClip,
|
||||
ScreenshotOptions,
|
||||
WaitForOptions,
|
||||
WaitTimeoutOptions,
|
||||
type ScreenshotClip,
|
||||
type ScreenshotOptions,
|
||||
type WaitForOptions,
|
||||
type WaitTimeoutOptions,
|
||||
} from '../api/Page.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
@ -46,30 +46,30 @@ import {Accessibility} from './Accessibility.js';
|
||||
import {Binding} from './Binding.js';
|
||||
import {CdpCDPSession} from './CDPSession.js';
|
||||
import {isTargetClosedError} from './Connection.js';
|
||||
import {ConsoleMessage, ConsoleMessageType} from './ConsoleMessage.js';
|
||||
import {ConsoleMessage, type ConsoleMessageType} from './ConsoleMessage.js';
|
||||
import {Coverage} from './Coverage.js';
|
||||
import {DeviceRequestPrompt} from './DeviceRequestPrompt.js';
|
||||
import {type DeviceRequestPrompt} from './DeviceRequestPrompt.js';
|
||||
import {CdpDialog} from './Dialog.js';
|
||||
import {EmulationManager} from './EmulationManager.js';
|
||||
import {TargetCloseError} from './Errors.js';
|
||||
import {FileChooser} from './FileChooser.js';
|
||||
import {CdpFrame} from './Frame.js';
|
||||
import {type CdpFrame} from './Frame.js';
|
||||
import {FrameManager, FrameManagerEvent} from './FrameManager.js';
|
||||
import {CdpKeyboard, CdpMouse, CdpTouchscreen} from './Input.js';
|
||||
import {MAIN_WORLD} from './IsolatedWorlds.js';
|
||||
import {
|
||||
Credentials,
|
||||
NetworkConditions,
|
||||
type Credentials,
|
||||
type NetworkConditions,
|
||||
NetworkManagerEvent,
|
||||
} from './NetworkManager.js';
|
||||
import {PDFOptions} from './PDFOptions.js';
|
||||
import {Viewport} from './PuppeteerViewport.js';
|
||||
import {CdpTarget} from './Target.js';
|
||||
import {type PDFOptions} from './PDFOptions.js';
|
||||
import {type Viewport} from './PuppeteerViewport.js';
|
||||
import {type CdpTarget} from './Target.js';
|
||||
import {TargetManagerEvent} from './TargetManager.js';
|
||||
import {TaskQueue} from './TaskQueue.js';
|
||||
import {type TaskQueue} from './TaskQueue.js';
|
||||
import {TimeoutSettings} from './TimeoutSettings.js';
|
||||
import {Tracing} from './Tracing.js';
|
||||
import {BindingPayload, HandleFor} from './types.js';
|
||||
import {type BindingPayload, type HandleFor} from './types.js';
|
||||
import {
|
||||
createCdpHandle,
|
||||
createClientError,
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {NetworkConditions} from './NetworkManager.js';
|
||||
import {type NetworkConditions} from './NetworkManager.js';
|
||||
|
||||
/**
|
||||
* A list of network conditions to be used with
|
||||
|
@ -14,14 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Browser} from '../api/Browser.js';
|
||||
import {type Browser} from '../api/Browser.js';
|
||||
|
||||
import {
|
||||
BrowserConnectOptions,
|
||||
type BrowserConnectOptions,
|
||||
_connectToCdpBrowser,
|
||||
} from './BrowserConnector.js';
|
||||
import {ConnectionTransport} from './ConnectionTransport.js';
|
||||
import {CustomQueryHandler, customQueryHandlers} from './CustomQueryHandler.js';
|
||||
import {type ConnectionTransport} from './ConnectionTransport.js';
|
||||
import {
|
||||
type CustomQueryHandler,
|
||||
customQueryHandlers,
|
||||
} from './CustomQueryHandler.js';
|
||||
|
||||
/**
|
||||
* Settings that are common to the Puppeteer class, regardless of environment.
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
/**
|
||||
* The SecurityDetails class represents the security details of a
|
||||
|
@ -14,20 +14,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import type {Browser} from '../api/Browser.js';
|
||||
import type {BrowserContext} from '../api/BrowserContext.js';
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {Page, PageEvent} from '../api/Page.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {type Page, PageEvent} from '../api/Page.js';
|
||||
import {Target, TargetType} from '../api/Target.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
|
||||
import {CdpCDPSession} from './CDPSession.js';
|
||||
import {CdpPage} from './Page.js';
|
||||
import {Viewport} from './PuppeteerViewport.js';
|
||||
import {TargetManager} from './TargetManager.js';
|
||||
import {TaskQueue} from './TaskQueue.js';
|
||||
import {type Viewport} from './PuppeteerViewport.js';
|
||||
import {type TargetManager} from './TargetManager.js';
|
||||
import {type TaskQueue} from './TaskQueue.js';
|
||||
import {debugError} from './util.js';
|
||||
import {WebWorker} from './WebWorker.js';
|
||||
|
||||
|
@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
|
||||
import {EventEmitter, EventType} from './EventEmitter.js';
|
||||
import {CdpTarget} from './Target.js';
|
||||
import {type EventEmitter, type EventType} from './EventEmitter.js';
|
||||
import {type CdpTarget} from './Target.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {QueryHandler, QuerySelectorAll} from './QueryHandler.js';
|
||||
import {QueryHandler, type QuerySelectorAll} from './QueryHandler.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
import {isErrorLike} from '../util/ErrorLike.js';
|
||||
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {ElementHandle} from '../api/ElementHandle.js';
|
||||
import {JSHandle} from '../api/JSHandle.js';
|
||||
import {Realm} from '../api/Realm.js';
|
||||
import {type ElementHandle} from '../api/ElementHandle.js';
|
||||
import {type JSHandle} from '../api/JSHandle.js';
|
||||
import {type Realm} from '../api/Realm.js';
|
||||
import type {Poller} from '../injected/Poller.js';
|
||||
import {Deferred} from '../util/Deferred.js';
|
||||
import {isErrorLike} from '../util/ErrorLike.js';
|
||||
@ -24,7 +24,7 @@ import {stringifyFunction} from '../util/Function.js';
|
||||
|
||||
import {TimeoutError} from './Errors.js';
|
||||
import {LazyArg} from './LazyArg.js';
|
||||
import {HandleFor} from './types.js';
|
||||
import {type HandleFor} from './types.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -13,18 +13,18 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {Protocol} from 'devtools-protocol';
|
||||
import {type Protocol} from 'devtools-protocol';
|
||||
|
||||
import {CDPSession} from '../api/CDPSession.js';
|
||||
import {Realm} from '../api/Realm.js';
|
||||
import {type CDPSession} from '../api/CDPSession.js';
|
||||
import {type Realm} from '../api/Realm.js';
|
||||
|
||||
import {ConsoleMessageType} from './ConsoleMessage.js';
|
||||
import {EventEmitter, EventType} from './EventEmitter.js';
|
||||
import {type ConsoleMessageType} from './ConsoleMessage.js';
|
||||
import {EventEmitter, type EventType} from './EventEmitter.js';
|
||||
import {ExecutionContext} from './ExecutionContext.js';
|
||||
import {IsolatedWorld} from './IsolatedWorld.js';
|
||||
import {CdpJSHandle} from './JSHandle.js';
|
||||
import {TimeoutSettings} from './TimeoutSettings.js';
|
||||
import {EvaluateFunc, HandleFor} from './types.js';
|
||||
import {type EvaluateFunc, type HandleFor} from './types.js';
|
||||
import {debugError, withSourcePuppeteerURLIfNone} from './util.js';
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {QueryHandler, QuerySelectorAll} from './QueryHandler.js';
|
||||
import {QueryHandler, type QuerySelectorAll} from './QueryHandler.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -15,13 +15,13 @@
|
||||
*/
|
||||
|
||||
import * as BidiMapper from 'chromium-bidi/lib/cjs/bidiMapper/bidiMapper.js';
|
||||
import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
import type * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
import type {ProtocolMapping} from 'devtools-protocol/types/protocol-mapping.js';
|
||||
|
||||
import {CDPEvents, CDPSession} from '../../api/CDPSession.js';
|
||||
import {Connection as CdpConnection} from '../Connection.js';
|
||||
import {type CDPEvents, type CDPSession} from '../../api/CDPSession.js';
|
||||
import {type Connection as CdpConnection} from '../Connection.js';
|
||||
import {TargetCloseError} from '../Errors.js';
|
||||
import {Handler} from '../EventEmitter.js';
|
||||
import {type Handler} from '../EventEmitter.js';
|
||||
|
||||
import {BidiConnection} from './Connection.js';
|
||||
|
||||
|
@ -14,30 +14,30 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {ChildProcess} from 'child_process';
|
||||
import {type ChildProcess} from 'child_process';
|
||||
|
||||
import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
import type * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
|
||||
import {
|
||||
Browser,
|
||||
BrowserCloseCallback,
|
||||
BrowserContextOptions,
|
||||
type BrowserCloseCallback,
|
||||
type BrowserContextOptions,
|
||||
BrowserEvent,
|
||||
} from '../../api/Browser.js';
|
||||
import {BrowserContextEvent} from '../../api/BrowserContext.js';
|
||||
import {Page} from '../../api/Page.js';
|
||||
import {Target} from '../../api/Target.js';
|
||||
import {Handler} from '../EventEmitter.js';
|
||||
import {Viewport} from '../PuppeteerViewport.js';
|
||||
import {type Page} from '../../api/Page.js';
|
||||
import {type Target} from '../../api/Target.js';
|
||||
import {type Handler} from '../EventEmitter.js';
|
||||
import {type Viewport} from '../PuppeteerViewport.js';
|
||||
|
||||
import {BidiBrowserContext} from './BrowserContext.js';
|
||||
import {BrowsingContext, BrowsingContextEvent} from './BrowsingContext.js';
|
||||
import {BidiConnection} from './Connection.js';
|
||||
import {type BidiConnection} from './Connection.js';
|
||||
import {
|
||||
BiDiBrowserTarget,
|
||||
BiDiBrowsingContextTarget,
|
||||
BiDiPageTarget,
|
||||
BidiTarget,
|
||||
type BidiTarget,
|
||||
} from './Target.js';
|
||||
import {debugError} from './utils.js';
|
||||
|
||||
|
@ -17,13 +17,13 @@
|
||||
import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
|
||||
import {BrowserContext} from '../../api/BrowserContext.js';
|
||||
import {Page} from '../../api/Page.js';
|
||||
import {Target} from '../../api/Target.js';
|
||||
import {Viewport} from '../PuppeteerViewport.js';
|
||||
import {type Page} from '../../api/Page.js';
|
||||
import {type Target} from '../../api/Target.js';
|
||||
import {type Viewport} from '../PuppeteerViewport.js';
|
||||
|
||||
import {BidiBrowser} from './Browser.js';
|
||||
import {BidiConnection} from './Connection.js';
|
||||
import {BidiPage} from './Page.js';
|
||||
import {type BidiBrowser} from './Browser.js';
|
||||
import {type BidiConnection} from './Connection.js';
|
||||
import {type BidiPage} from './Page.js';
|
||||
|
||||
interface BrowserContextOptions {
|
||||
defaultViewport: Viewport | null;
|
||||
|
@ -1,17 +1,17 @@
|
||||
import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
import ProtocolMapping from 'devtools-protocol/types/protocol-mapping.js';
|
||||
import type ProtocolMapping from 'devtools-protocol/types/protocol-mapping.js';
|
||||
|
||||
import {CDPSession} from '../../api/CDPSession.js';
|
||||
import {WaitForOptions} from '../../api/Page.js';
|
||||
import {type WaitForOptions} from '../../api/Page.js';
|
||||
import {assert} from '../../util/assert.js';
|
||||
import {Deferred} from '../../util/Deferred.js';
|
||||
import {Connection as CdpConnection} from '../Connection.js';
|
||||
import {type Connection as CdpConnection} from '../Connection.js';
|
||||
import {ProtocolError, TargetCloseError, TimeoutError} from '../Errors.js';
|
||||
import {EventType} from '../EventEmitter.js';
|
||||
import {PuppeteerLifeCycleEvent} from '../LifecycleWatcher.js';
|
||||
import {type EventType} from '../EventEmitter.js';
|
||||
import {type PuppeteerLifeCycleEvent} from '../LifecycleWatcher.js';
|
||||
import {setPageContent, waitWithTimeout} from '../util.js';
|
||||
|
||||
import {BidiConnection} from './Connection.js';
|
||||
import {type BidiConnection} from './Connection.js';
|
||||
import {Realm} from './Realm.js';
|
||||
import {debugError} from './utils.js';
|
||||
|
||||
|
@ -18,7 +18,7 @@ import {describe, it} from 'node:test';
|
||||
|
||||
import expect from 'expect';
|
||||
|
||||
import {ConnectionTransport} from '../ConnectionTransport.js';
|
||||
import {type ConnectionTransport} from '../ConnectionTransport.js';
|
||||
|
||||
import {BidiConnection} from './Connection.js';
|
||||
|
||||
|
@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
import type * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
|
||||
import {CallbackRegistry} from '../Connection.js';
|
||||
import {ConnectionTransport} from '../ConnectionTransport.js';
|
||||
import {type ConnectionTransport} from '../ConnectionTransport.js';
|
||||
import {debug} from '../Debug.js';
|
||||
import {EventEmitter} from '../EventEmitter.js';
|
||||
|
||||
import {BrowsingContext, cdpSessions} from './BrowsingContext.js';
|
||||
import {type BrowsingContext, cdpSessions} from './BrowsingContext.js';
|
||||
import {debugError} from './utils.js';
|
||||
|
||||
const debugProtocolSend = debug('puppeteer:webDriverBiDi:SEND ►');
|
||||
|
@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
import type * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
|
||||
import {Dialog} from '../../api/Dialog.js';
|
||||
|
||||
import {BrowsingContext} from './BrowsingContext.js';
|
||||
import {type BrowsingContext} from './BrowsingContext.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -14,15 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
import type * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
|
||||
import {AutofillData, ElementHandle} from '../../api/ElementHandle.js';
|
||||
import {type AutofillData, ElementHandle} from '../../api/ElementHandle.js';
|
||||
import {throwIfDisposed} from '../../util/decorators.js';
|
||||
|
||||
import {BidiFrame} from './Frame.js';
|
||||
import {type BidiFrame} from './Frame.js';
|
||||
import {BidiJSHandle} from './JSHandle.js';
|
||||
import {Realm} from './Realm.js';
|
||||
import {Sandbox} from './Sandbox.js';
|
||||
import {type Realm} from './Realm.js';
|
||||
import {type Sandbox} from './Sandbox.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {BrowsingContext} from './BrowsingContext.js';
|
||||
import {type BrowsingContext} from './BrowsingContext.js';
|
||||
|
||||
interface Viewport {
|
||||
width: number;
|
||||
|
@ -19,10 +19,10 @@ import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
import {assert} from '../../util/assert.js';
|
||||
import {Deferred} from '../../util/Deferred.js';
|
||||
import {interpolateFunction, stringifyFunction} from '../../util/Function.js';
|
||||
import {Awaitable, FlattenHandle} from '../types.js';
|
||||
import {type Awaitable, type FlattenHandle} from '../types.js';
|
||||
|
||||
import {BidiConnection} from './Connection.js';
|
||||
import {BidiFrame} from './Frame.js';
|
||||
import {type BidiConnection} from './Connection.js';
|
||||
import {type BidiFrame} from './Frame.js';
|
||||
import {BidiSerializer} from './Serializer.js';
|
||||
import {debugError} from './utils.js';
|
||||
|
||||
|
@ -16,28 +16,28 @@
|
||||
|
||||
import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
|
||||
import {CDPSession} from '../../api/CDPSession.js';
|
||||
import {type CDPSession} from '../../api/CDPSession.js';
|
||||
import {Frame, throwIfDetached} from '../../api/Frame.js';
|
||||
import {Deferred} from '../../util/Deferred.js';
|
||||
import {UTILITY_WORLD_NAME} from '../FrameManager.js';
|
||||
import {PuppeteerLifeCycleEvent} from '../LifecycleWatcher.js';
|
||||
import {TimeoutSettings} from '../TimeoutSettings.js';
|
||||
import {Awaitable} from '../types.js';
|
||||
import {type PuppeteerLifeCycleEvent} from '../LifecycleWatcher.js';
|
||||
import {type TimeoutSettings} from '../TimeoutSettings.js';
|
||||
import {type Awaitable} from '../types.js';
|
||||
import {waitForEvent} from '../util.js';
|
||||
|
||||
import {
|
||||
BrowsingContext,
|
||||
type BrowsingContext,
|
||||
getWaitUntilSingle,
|
||||
lifeCycleToSubscribedEvent,
|
||||
} from './BrowsingContext.js';
|
||||
import {ExposeableFunction} from './ExposedFunction.js';
|
||||
import {BidiHTTPResponse} from './HTTPResponse.js';
|
||||
import {BidiPage} from './Page.js';
|
||||
import {type BidiHTTPResponse} from './HTTPResponse.js';
|
||||
import {type BidiPage} from './Page.js';
|
||||
import {
|
||||
MAIN_SANDBOX,
|
||||
PUPPETEER_SANDBOX,
|
||||
Sandbox,
|
||||
SandboxChart,
|
||||
type SandboxChart,
|
||||
} from './Sandbox.js';
|
||||
|
||||
/**
|
||||
|
@ -13,12 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
import type * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
|
||||
import {Frame} from '../../api/Frame.js';
|
||||
import {HTTPRequest, ResourceType} from '../../api/HTTPRequest.js';
|
||||
import {type Frame} from '../../api/Frame.js';
|
||||
import {HTTPRequest, type ResourceType} from '../../api/HTTPRequest.js';
|
||||
|
||||
import {BidiHTTPResponse} from './HTTPResponse.js';
|
||||
import {type BidiHTTPResponse} from './HTTPResponse.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -13,16 +13,16 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
import Protocol from 'devtools-protocol';
|
||||
import type * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
import type Protocol from 'devtools-protocol';
|
||||
|
||||
import {Frame} from '../../api/Frame.js';
|
||||
import {type Frame} from '../../api/Frame.js';
|
||||
import {
|
||||
HTTPResponse as HTTPResponse,
|
||||
RemoteAddress,
|
||||
type RemoteAddress,
|
||||
} from '../../api/HTTPResponse.js';
|
||||
|
||||
import {BidiHTTPRequest} from './HTTPRequest.js';
|
||||
import {type BidiHTTPRequest} from './HTTPRequest.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -16,23 +16,23 @@
|
||||
|
||||
import * as Bidi from 'chromium-bidi/lib/cjs/protocol/protocol.js';
|
||||
|
||||
import {Point} from '../../api/ElementHandle.js';
|
||||
import {type Point} from '../../api/ElementHandle.js';
|
||||
import {
|
||||
Keyboard as BaseKeyboard,
|
||||
Mouse as BaseMouse,
|
||||
Touchscreen as BaseTouchscreen,
|
||||
KeyDownOptions,
|
||||
KeyPressOptions,
|
||||
KeyboardTypeOptions,
|
||||
type KeyDownOptions,
|
||||
type KeyPressOptions,
|
||||
type KeyboardTypeOptions,
|
||||
MouseButton,
|
||||
MouseClickOptions,
|
||||
MouseMoveOptions,
|
||||
MouseOptions,
|
||||
MouseWheelOptions,
|
||||
type MouseClickOptions,
|
||||
type MouseMoveOptions,
|
||||
type MouseOptions,
|
||||
type MouseWheelOptions,
|
||||
} from '../../api/Input.js';
|
||||
import {KeyInput} from '../USKeyboardLayout.js';
|
||||
import {type KeyInput} from '../USKeyboardLayout.js';
|
||||
|
||||
import {BrowsingContext} from './BrowsingContext.js';
|
||||
import {type BrowsingContext} from './BrowsingContext.js';
|
||||
|
||||
const enum InputId {
|
||||
Mouse = '__puppeteer_mouse',
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user