chore: migrate @protocol to @playwright/protocol

This commit is contained in:
Max Schmitt 2024-12-13 16:35:32 -08:00
parent 91d4b82dfb
commit ef4a219a98
126 changed files with 128 additions and 126 deletions

7
package-lock.json generated
View file

@ -1503,6 +1503,10 @@
"resolved": "packages/playwright-ct-vue",
"link": true
},
"node_modules/@playwright/protocol": {
"resolved": "packages/protocol",
"link": true
},
"node_modules/@playwright/test": {
"resolved": "packages/playwright-test",
"link": true
@ -7957,6 +7961,9 @@
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"packages/protocol": {
"name": "@playwright/protocol"
},
"packages/recorder": {
"version": "0.0.0",
"dependencies": {

View file

@ -17,7 +17,6 @@
"baseUrl": ".",
"useUnknownInCatchVariables": false,
"paths": {
"@protocol/*": ["../protocol/src/*"],
"@web/*": ["../web/src/*"],
"@playwright/*": ["../playwright/src/*"],
"playwright-core/lib/*": ["../playwright-core/src/*"],

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { ElementHandle } from './elementHandle';
import type * as api from '../../types/types';

View file

@ -16,7 +16,7 @@
import fs from 'fs';
import { isString, isRegExp, monotonicTime } from '../utils';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Events } from './events';
import { BrowserContext, prepareBrowserContextParams } from './browserContext';
import { ChannelOwner } from './channelOwner';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import * as fs from 'fs';
import { Stream } from './stream';
import { mkdirIfNeeded } from '../utils/fileUtils';

View file

@ -15,7 +15,7 @@
*/
import fs from 'fs';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { BrowserContext, prepareBrowserContextParams } from './browserContext';
import type { Page } from './page';
import { ChannelOwner } from './channelOwner';

View file

@ -18,7 +18,7 @@
import { Page, BindingCall } from './page';
import { Frame } from './frame';
import * as network from './network';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import fs from 'fs';
import path from 'path';
import { ChannelOwner } from './channelOwner';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Browser } from './browser';
import { BrowserContext, prepareBrowserContextParams } from './browserContext';
import { ChannelOwner } from './channelOwner';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ChannelOwner } from './channelOwner';
import type { Protocol } from '../server/chromium/protocol';
import type * as api from '../../types/types';

View file

@ -15,7 +15,7 @@
*/
import { EventEmitter } from './eventEmitter';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { maybeFindValidator, ValidationError, type ValidatorContext } from '../protocol/validator';
import { debugLogger } from '../utils/debugLogger';
import type { ExpectZone } from '../utils/stackTrace';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type { StackFrame } from '@protocol/channels';
import type { StackFrame } from '@playwright/protocol/src/channels';
import type { BrowserContext } from './browserContext';
import type { APIRequestContext } from './fetch';

View file

@ -29,7 +29,7 @@ import { parseError, TargetClosedError } from './errors';
import { CDPSession } from './cdpSession';
import { Playwright } from './playwright';
import { Electron, ElectronApplication } from './electron';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Stream } from './stream';
import { WritableStream } from './writableStream';
import { debugLogger } from '../utils/debugLogger';

View file

@ -16,7 +16,7 @@
import * as util from 'util';
import { JSHandle } from './jsHandle';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type * as api from '../../types/types';
import { Page } from './page';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type * as api from '../../types/types';
export class Coverage implements api.Coverage {

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ChannelOwner } from './channelOwner';
import type * as api from '../../types/types';
import { Page } from './page';

View file

@ -18,7 +18,7 @@ import type { BrowserWindow } from 'electron';
import type * as childProcess from 'child_process';
import type * as structs from '../../types/structs';
import type * as api from '../../types/types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { TimeoutSettings } from '../common/timeoutSettings';
import { BrowserContext, prepareBrowserContextParams } from './browserContext';
import { ChannelOwner } from './channelOwner';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Frame } from './frame';
import type { Locator } from './locator';
import { JSHandle, serializeArgument, parseResult } from './jsHandle';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type { SerializedError } from '@protocol/channels';
import type { SerializedError } from '@playwright/protocol/src/channels';
import { isError } from '../utils';
import { parseSerializedValue, serializeValue } from '../protocol/serializers';

View file

@ -20,7 +20,7 @@ import * as util from 'util';
import type { Serializable } from '../../types/structs';
import type * as api from '../../types/types';
import type { HeadersArray, NameValue } from '../common/types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { assert, headersObjectToArray, isString } from '../utils';
import { mkdirIfNeeded } from '../utils/fileUtils';
import { ChannelOwner } from './channelOwner';

View file

@ -17,7 +17,7 @@
import type { ElementHandle } from './elementHandle';
import type { Page } from './page';
import type { FilePayload } from './types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type * as api from '../../types/types';
export class FileChooser implements api.FileChooser {

View file

@ -16,7 +16,7 @@
*/
import { assert } from '../utils';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ChannelOwner } from './channelOwner';
import { FrameLocator, Locator, testIdAttributeName } from './locator';
import type { LocatorOptions } from './locator';

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type * as api from '../../types/types';
import type { Page } from './page';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ChannelOwner } from './channelOwner';
import { parseSerializedValue, serializeValue } from '../protocol/serializers';
import type * as api from '../../types/types';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ChannelOwner } from './channelOwner';
export class JsonPipe extends ChannelOwner<channels.JsonPipeChannel> {

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ChannelOwner } from './channelOwner';
import type { Size } from './types';

View file

@ -16,7 +16,7 @@
import type * as structs from '../../types/structs';
import type * as api from '../../types/types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import * as util from 'util';
import { asLocator, isString, monotonicTime } from '../utils';
import { ElementHandle } from './elementHandle';

View file

@ -15,7 +15,7 @@
*/
import { URLSearchParams } from 'url';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ChannelOwner } from './channelOwner';
import { Frame } from './frame';
import { Worker } from './worker';

View file

@ -21,7 +21,7 @@ import type * as structs from '../../types/structs';
import type * as api from '../../types/types';
import { serializeError, isTargetClosedError, TargetClosedError } from './errors';
import { TimeoutSettings } from '../common/timeoutSettings';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { assert, headersObjectToArray, isObject, isRegExp, isString, LongStandingScope, urlMatches, urlMatchesEqual, mkdirIfNeeded, trimStringWithEllipsis, type URLMatch } from '../utils';
import { Accessibility } from './accessibility';
import { Artifact } from './artifact';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { TimeoutError } from './errors';
import { Android } from './android';
import { BrowserType } from './browserType';

View file

@ -15,7 +15,7 @@
*/
import { evaluationScript } from './clientHelper';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ChannelOwner } from './channelOwner';
import type { SelectorEngine } from './types';
import type * as api from '../../types/types';

View file

@ -15,7 +15,7 @@
*/
import { Readable } from 'stream';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ChannelOwner } from './channelOwner';
export class Stream extends ChannelOwner<channels.StreamChannel> {

View file

@ -15,7 +15,7 @@
*/
import type * as api from '../../types/types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Artifact } from './artifact';
import { ChannelOwner } from './channelOwner';

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { Size } from '../common/types';
export type { Size, Point, Rect, Quad, TimeoutOptions, HeadersArray } from '../common/types';

View file

@ -19,7 +19,7 @@ import { rewriteErrorMessage } from '../utils/stackTrace';
import { TimeoutError } from './errors';
import { createGuid, zones } from '../utils';
import type { Zone } from '../utils';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { ChannelOwner } from './channelOwner';
export class Waiter {

View file

@ -15,7 +15,7 @@
*/
import { Events } from './events';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ChannelOwner } from './channelOwner';
import { assertMaxArguments, JSHandle, parseResult, serializeArgument } from './jsHandle';
import type { Page } from './page';

View file

@ -15,7 +15,7 @@
*/
import { Writable } from 'stream';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ChannelOwner } from './channelOwner';
export class WritableStream extends ChannelOwner<channels.WritableStreamChannel> {

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type { SerializedValue } from '@protocol/channels';
import type { SerializedValue } from '@playwright/protocol/src/channels';
export function parseSerializedValue(value: SerializedValue, handles: any[] | undefined): any {
return innerParseSerializedValue(value, handles, new Map());

View file

@ -16,7 +16,7 @@
import type { WebSocket } from '../utilsBundle';
import type { DispatcherScope, Playwright } from '../server';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { createPlaywright, DispatcherConnection, RootDispatcher, PlaywrightDispatcher } from '../server';
import { Browser } from '../server/browser';
import { serverSideCallMetadata } from '../server/instrumentation';

View file

@ -16,7 +16,7 @@
*/
import type * as dom from './dom';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
export interface AXNode {
isInteresting(insideControl: boolean): boolean;

View file

@ -34,7 +34,7 @@ import { PipeTransport } from '../../protocol/transport';
import { RecentLogsCollector } from '../../utils/debugLogger';
import { gracefullyCloseSet } from '../../utils/processLauncher';
import { TimeoutSettings } from '../../common/timeoutSettings';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { SdkObject, serverSideCallMetadata } from '../instrumentation';
import { chromiumSwitches } from '../chromium/chromiumSwitches';
import { registry } from '../registry';

View file

@ -15,7 +15,7 @@
*/
import { debug } from '../../utilsBundle';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import * as net from 'net';
import { EventEmitter } from 'events';
import type { Backend, DeviceBackend, SocketBackend } from './android';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { RegisteredListener } from '../../utils/eventsHelper';
import { eventsHelper } from '../../utils/eventsHelper';
import type { BrowserOptions } from '../browser';

View file

@ -22,7 +22,7 @@ import * as dom from '../dom';
import * as dialog from '../dialog';
import type * as frames from '../frames';
import { Page } from '../page';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { InitScript, PageDelegate } from '../page';
import type { Progress } from '../progress';
import type * as types from '../types';

View file

@ -16,7 +16,7 @@
*/
import { assert } from '../../utils';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { BidiSession } from './bidiConnection';
const PagePaperFormats: { [key: string]: { width: number, height: number }} = {

View file

@ -15,7 +15,7 @@
*/
import type * as types from './types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { BrowserContext, validateBrowserContextOptions } from './browserContext';
import { Page } from './page';
import { Download } from './download';

View file

@ -29,7 +29,7 @@ import { Page, PageBinding } from './page';
import type { Progress, ProgressController } from './progress';
import type { Selectors } from './selectors';
import type * as types from './types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import path from 'path';
import fs from 'fs';
import type { CallMetadata } from './instrumentation';

View file

@ -30,7 +30,7 @@ import { PipeTransport } from './pipeTransport';
import type { Progress } from './progress';
import { ProgressController } from './progress';
import type * as types from './types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { DEFAULT_TIMEOUT, TimeoutSettings } from '../common/timeoutSettings';
import { debugMode, ManualPromise } from '../utils';
import { existsAsync } from '../utils/fileUtils';

View file

@ -19,7 +19,7 @@ import type { CRSession } from './crConnection';
import type { Protocol } from './protocol';
import type * as dom from '../dom';
import type * as accessibility from '../accessibility';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
export async function getAccessibilityTree(client: CRSession, needle?: dom.ElementHandle): Promise<{tree: accessibility.AXNode, needle: accessibility.AXNode | null}> {
const { nodes } = await client.send('Accessibility.getFullAXTree');

View file

@ -27,7 +27,7 @@ import { Frame } from '../frames';
import type { Dialog } from '../dialog';
import type { ConnectionTransport } from '../transport';
import type * as types from '../types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { CRSession, CDPSession } from './crConnection';
import { ConnectionEvents, CRConnection } from './crConnection';
import { CRPage } from './crPage';

View file

@ -19,7 +19,7 @@ import type { CRSession } from './crConnection';
import type { RegisteredListener } from '../../utils/eventsHelper';
import { eventsHelper } from '../../utils/eventsHelper';
import type { Protocol } from './protocol';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { assert } from '../../utils';
export class CRCoverage {

View file

@ -30,7 +30,7 @@ import { type InitScript, PageBinding, type PageDelegate } from '../page';
import { Page, Worker } from '../page';
import type { Progress } from '../progress';
import type * as types from '../types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { getAccessibilityTree } from './crAccessibility';
import { CRBrowserContext } from './crBrowser';
import type { CRSession } from './crConnection';

View file

@ -16,7 +16,7 @@
*/
import { assert } from '../../utils';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { CRSession } from './crConnection';
import { readProtocolStream } from './crProtocolHelper';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { kMaxCookieExpiresDateInSeconds } from './network';
class Cookie {

View file

@ -18,7 +18,7 @@ import type { RootDispatcher } from './dispatcher';
import { Dispatcher, existingDispatcher } from './dispatcher';
import type { Android, SocketBackend } from '../android/android';
import { AndroidDevice } from '../android/android';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { BrowserContextDispatcher } from './browserContextDispatcher';
import type { CallMetadata } from '../instrumentation';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Dispatcher, existingDispatcher } from './dispatcher';
import type { DispatcherScope } from './dispatcher';
import { StreamDispatcher } from './streamDispatcher';

View file

@ -19,7 +19,7 @@ import { Dispatcher, existingDispatcher } from './dispatcher';
import type { DispatcherScope } from './dispatcher';
import { PageDispatcher, BindingCallDispatcher, WorkerDispatcher } from './pageDispatcher';
import type { FrameDispatcher } from './frameDispatcher';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { RouteDispatcher, RequestDispatcher, ResponseDispatcher, APIRequestContextDispatcher } from './networkDispatchers';
import { CRBrowserContext } from '../chromium/crBrowser';
import { CDPSessionDispatcher } from './cdpSessionDispatcher';

View file

@ -15,7 +15,7 @@
*/
import { Browser } from '../browser';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { BrowserContextDispatcher } from './browserContextDispatcher';
import { CDPSessionDispatcher } from './cdpSessionDispatcher';
import { existingDispatcher } from './dispatcher';

View file

@ -16,7 +16,7 @@
import type { BrowserType } from '../browserType';
import { BrowserDispatcher } from './browserDispatcher';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { RootDispatcher } from './dispatcher';
import { Dispatcher } from './dispatcher';
import { BrowserContextDispatcher } from './browserContextDispatcher';

View file

@ -15,7 +15,7 @@
*/
import { CDPSession } from '../chromium/crConnection';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Dispatcher } from './dispatcher';
import type { BrowserDispatcher } from './browserDispatcher';
import type { BrowserContextDispatcher } from './browserContextDispatcher';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { eventsHelper } from '../../utils';
import type { RegisteredListener } from '../../utils/eventsHelper';
import { DebugController } from '../debugController';

View file

@ -15,7 +15,7 @@
*/
import type { Dialog } from '../dialog';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Dispatcher } from './dispatcher';
import { PageDispatcher } from './pageDispatcher';
import type { BrowserContextDispatcher } from './browserContextDispatcher';

View file

@ -15,7 +15,7 @@
*/
import { EventEmitter } from 'events';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { findValidator, ValidationError, createMetadataValidator, type ValidatorContext } from '../../protocol/validator';
import { LongStandingScope, assert, compressCallLog, isUnderTest, monotonicTime, rewriteErrorMessage } from '../../utils';
import { TargetClosedError, isTargetClosedError, serializeError } from '../errors';

View file

@ -18,7 +18,7 @@ import type { RootDispatcher } from './dispatcher';
import { Dispatcher } from './dispatcher';
import type { Electron } from '../electron/electron';
import { ElectronApplication } from '../electron/electron';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { BrowserContextDispatcher } from './browserContextDispatcher';
import type { PageDispatcher } from './pageDispatcher';
import type { ConsoleMessage } from '../console';

View file

@ -17,7 +17,7 @@
import type { ElementHandle } from '../dom';
import type { Frame } from '../frames';
import type * as js from '../javascript';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { existingDispatcher } from './dispatcher';
import { JSHandleDispatcher, serializeResult, parseArgument } from './jsHandleDispatcher';
import type { JSHandleDispatcherParentScope } from './jsHandleDispatcher';

View file

@ -16,7 +16,7 @@
import type { NavigationEvent } from '../frames';
import { Frame } from '../frames';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Dispatcher, existingDispatcher } from './dispatcher';
import { ElementHandleDispatcher } from './elementHandlerDispatcher';
import { parseArgument, serializeResult } from './jsHandleDispatcher';

View file

@ -15,7 +15,7 @@
*/
import type * as js from '../javascript';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Dispatcher } from './dispatcher';
import { ElementHandleDispatcher } from './elementHandlerDispatcher';
import { parseSerializedValue, serializeValue } from '../../protocol/serializers';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Dispatcher } from './dispatcher';
import { createGuid } from '../../utils';
import type { LocalUtilsDispatcher } from './localUtilsDispatcher';

View file

@ -18,7 +18,7 @@ import type EventEmitter from 'events';
import fs from 'fs';
import path from 'path';
import os from 'os';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ManualPromise } from '../../utils/manualPromise';
import { assert, calculateSha1, createGuid, removeFolders } from '../../utils';
import type { RootDispatcher } from './dispatcher';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { APIRequestContext } from '../fetch';
import type { CallMetadata } from '../instrumentation';
import type { Request, Response, Route } from '../network';

View file

@ -17,7 +17,7 @@
import type { BrowserContext } from '../browserContext';
import type { Frame } from '../frames';
import { Page, Worker } from '../page';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Dispatcher, existingDispatcher } from './dispatcher';
import { parseError } from '../errors';
import { FrameDispatcher } from './frameDispatcher';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { Browser } from '../browser';
import { GlobalAPIRequestContext } from '../fetch';
import type { Playwright } from '../playwright';

View file

@ -16,7 +16,7 @@
import type { RootDispatcher } from './dispatcher';
import { Dispatcher } from './dispatcher';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { Selectors } from '../selectors';
export class SelectorsDispatcher extends Dispatcher<Selectors, channels.SelectorsChannel, RootDispatcher> implements channels.SelectorsChannel {

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Dispatcher } from './dispatcher';
import type * as stream from 'stream';
import { ManualPromise, createGuid } from '../../utils';

View file

@ -14,8 +14,8 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type { CallMetadata } from '@protocol/callMetadata';
import type * as channels from '@playwright/protocol/src/channels';
import type { CallMetadata } from '@playwright/protocol/src/callMetadata';
import type { Tracing } from '../trace/recorder/tracing';
import { ArtifactDispatcher } from './artifactDispatcher';
import { Dispatcher, existingDispatcher } from './dispatcher';

View file

@ -17,7 +17,7 @@
import type { BrowserContext } from '../browserContext';
import type { Frame } from '../frames';
import { Page } from '../page';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Dispatcher } from './dispatcher';
import { createGuid, urlMatches } from '../../utils';
import { PageDispatcher } from './pageDispatcher';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Dispatcher } from './dispatcher';
import * as fs from 'fs';
import { createGuid } from '../../utils';

View file

@ -15,7 +15,7 @@
*/
import fs from 'fs';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import * as injectedScriptSource from '../generated/injectedScriptSource';
import { isSessionClosedError } from './protocolError';
import type { ScreenshotOptions } from './screenshotter';

View file

@ -44,7 +44,7 @@ import type * as childProcess from 'child_process';
import * as readline from 'readline';
import { RecentLogsCollector } from '../../utils/debugLogger';
import { serverSideCallMetadata, SdkObject } from '../instrumentation';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { toConsoleMessageLocation } from '../chromium/crProtocolHelper';
import { ConsoleMessage } from '../console';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type { SerializedError } from '@protocol/channels';
import type { SerializedError } from '@playwright/protocol/src/channels';
import { isError } from '../utils';
import { parseSerializedValue, serializeValue } from '../protocol/serializers';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { LookupAddress } from 'dns';
import http from 'http';
import https from 'https';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import fs from 'fs';
import path from 'path';
import { assert, fileUploadSizeLimit } from '../utils';

View file

@ -19,7 +19,7 @@ import type * as accessibility from '../accessibility';
import type { FFSession } from './ffConnection';
import type { Protocol } from './protocol';
import type * as dom from '../dom';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
export async function getAccessibilityTree(session: FFSession, needle?: dom.ElementHandle): Promise<{tree: accessibility.AXNode, needle: accessibility.AXNode | null}> {
const objectId = needle ? needle._objectId : undefined;

View file

@ -25,7 +25,7 @@ import type { InitScript, Page, PageDelegate } from '../page';
import { PageBinding } from '../page';
import type { ConnectionTransport } from '../transport';
import type * as types from '../types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { ConnectionEvents, FFConnection, type FFSession } from './ffConnection';
import { FFPage } from './ffPage';
import type { Protocol } from './protocol';

View file

@ -15,7 +15,7 @@
*/
import { mime } from '../utilsBundle';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
export class MultipartFormData {
private readonly _boundary: string;

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { ConsoleMessage } from './console';
import * as dom from './dom';
import { helper } from './helper';

View file

@ -21,7 +21,7 @@ import type { BrowserContext } from '../browserContext';
import type * as har from '@trace/har';
import { HarTracer } from './harTracer';
import type { HarTracerDelegate } from './harTracer';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { yazl } from '../../zipBundle';
import type { ZipFile } from '../../zipBundle';
import { ManualPromise } from '../../utils/manualPromise';

View file

@ -27,7 +27,7 @@ import { SelectorEvaluatorImpl, sortInDOMOrder } from './selectorEvaluator';
import { enclosingShadowRootOrDocument, isElementVisible, isInsideScope, parentElementOrShadowHost, setBrowserName } from './domUtils';
import type { CSSComplexSelectorList } from '../../utils/isomorphic/cssParser';
import { generateSelector, type GenerateSelectorOptions } from './selectorGenerator';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { Highlight } from './highlight';
import { getChecked, getAriaDisabled, getAriaRole, getElementAccessibleName, getElementAccessibleDescription, getReadonly } from './roleUtils';
import { kLayoutSelectorNames, type LayoutSelectorName, layoutSelectorScore } from './layoutSelectorUtils';

View file

@ -33,10 +33,10 @@ export type Attribution = {
frame?: Frame;
};
import type { CallMetadata } from '@protocol/callMetadata';
import type { CallMetadata } from '@playwright/protocol/src/callMetadata';
import type { Dialog } from './dialog';
import type { Download } from './download';
export type { CallMetadata } from '@protocol/callMetadata';
export type { CallMetadata } from '@playwright/protocol/src/callMetadata';
export class SdkObject extends EventEmitter {
guid: string;

View file

@ -18,7 +18,7 @@ import type * as contexts from './browserContext';
import type * as pages from './page';
import type * as frames from './frames';
import type * as types from './types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import { assert } from '../utils';
import { ManualPromise } from '../utils/manualPromise';
import { SdkObject } from './instrumentation';

View file

@ -20,7 +20,7 @@ import * as frames from './frames';
import * as input from './input';
import * as js from './javascript';
import type * as network from './network';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { ScreenshotOptions } from './screenshotter';
import { Screenshotter, validateScreenshotOptions } from './screenshotter';
import { TimeoutSettings } from '../common/timeoutSettings';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { CallLog, CallLogStatus, ElementInfo, EventData, Mode, OverlayState, Source, UIState } from '@recorder/recorderTypes';
import * as fs from 'fs';
import type { Point } from '../common/types';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { Source } from '@recorder/recorderTypes';
import { EventEmitter } from 'events';
import * as recorderSource from '../../generated/pollingRecorderSource';

View file

@ -23,7 +23,7 @@ import { monotonicTime } from '../../utils/time';
import { callMetadataForAction, collapseActions } from './recorderUtils';
import { serializeError } from '../errors';
import { performAction } from './recorderRunner';
import type { CallMetadata } from '@protocol/callMetadata';
import type { CallMetadata } from '@playwright/protocol/src/callMetadata';
import { isUnderTest } from '../../utils/debug';
export class RecorderCollection extends EventEmitter {

View file

@ -16,7 +16,7 @@
import * as socks from '../common/socksProxy';
import EventEmitter from 'events';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { WebSocketTransport } from './transport';
import { findValidator, ValidationError } from '../protocol/validator';
import type { ValidatorContext } from '../protocol/validator';

View file

@ -18,7 +18,7 @@ import fs from 'fs';
import os from 'os';
import path from 'path';
import type { NameValue } from '../../../common/types';
import type { TracingTracingStopChunkParams, StackFrame } from '@protocol/channels';
import type { TracingTracingStopChunkParams, StackFrame } from '@playwright/protocol/src/channels';
import { commandsWithTracingSnapshots } from '../../../protocol/debug';
import { assert, createGuid, monotonicTime, SerializedFS, removeFolders, eventsHelper, type RegisteredListener } from '../../../utils';
import { Artifact } from '../../artifact';

View file

@ -17,7 +17,7 @@
import type { Size, Point, TimeoutOptions, HeadersArray } from '../common/types';
export type { Size, Point, Rect, Quad, TimeoutOptions, HeadersArray } from '../common/types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
export type StrictOptions = {
strict?: boolean,

View file

@ -17,7 +17,7 @@ import type * as accessibility from '../accessibility';
import type { WKSession } from './wkConnection';
import type { Protocol } from './protocol';
import type * as dom from '../dom';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
export async function getAccessibilityTree(session: WKSession, needle?: dom.ElementHandle) {
const objectId = needle ? needle._objectId : undefined;

View file

@ -23,7 +23,7 @@ import * as network from '../network';
import type { InitScript, Page, PageDelegate } from '../page';
import type { ConnectionTransport } from '../transport';
import type * as types from '../types';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type { Protocol } from './protocol';
import type { PageProxyMessageReceivedPayload } from './wkConnection';
import { kPageProxyMessageReceived, WKConnection, WKSession } from './wkConnection';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type { ExpectedTextValue } from '@protocol/channels';
import type { ExpectedTextValue } from '@playwright/protocol/src/channels';
import { isRegExp, isString } from './rtti';
export function serializeExpectedTextValues(items: (string | RegExp)[], options: { matchSubstring?: boolean, normalizeWhiteSpace?: boolean, ignoreCase?: boolean } = {}): ExpectedTextValue[] {

View file

@ -15,7 +15,7 @@
*/
import type * as recorderActions from '@recorder/actions';
import type * as channels from '@protocol/channels';
import type * as channels from '@playwright/protocol/src/channels';
import type * as types from '../../server/types';
export function buildFullSelector(framePath: string[], selector: string) {

Some files were not shown because too many files have changed in this diff Show more