diff --git a/package-lock.json b/package-lock.json index 0c4d97edad44d..8aa83a7279141 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": { diff --git a/packages/html-reporter/tsconfig.json b/packages/html-reporter/tsconfig.json index 4fe82eab4eb1c..72a11c122a78a 100644 --- a/packages/html-reporter/tsconfig.json +++ b/packages/html-reporter/tsconfig.json @@ -17,7 +17,6 @@ "baseUrl": ".", "useUnknownInCatchVariables": false, "paths": { - "@protocol/*": ["../protocol/src/*"], "@web/*": ["../web/src/*"], "@playwright/*": ["../playwright/src/*"], "playwright-core/lib/*": ["../playwright-core/src/*"], diff --git a/packages/playwright-core/src/client/accessibility.ts b/packages/playwright-core/src/client/accessibility.ts index a3390d8c58a47..511a4025cbe7a 100644 --- a/packages/playwright-core/src/client/accessibility.ts +++ b/packages/playwright-core/src/client/accessibility.ts @@ -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'; diff --git a/packages/playwright-core/src/client/android.ts b/packages/playwright-core/src/client/android.ts index 07912bfbdd654..9200a51d26370 100644 --- a/packages/playwright-core/src/client/android.ts +++ b/packages/playwright-core/src/client/android.ts @@ -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'; diff --git a/packages/playwright-core/src/client/artifact.ts b/packages/playwright-core/src/client/artifact.ts index c3a53c0294a52..9560b3c4b01fa 100644 --- a/packages/playwright-core/src/client/artifact.ts +++ b/packages/playwright-core/src/client/artifact.ts @@ -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'; diff --git a/packages/playwright-core/src/client/browser.ts b/packages/playwright-core/src/client/browser.ts index be47ddeb51dd1..9247b92b9b261 100644 --- a/packages/playwright-core/src/client/browser.ts +++ b/packages/playwright-core/src/client/browser.ts @@ -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'; diff --git a/packages/playwright-core/src/client/browserContext.ts b/packages/playwright-core/src/client/browserContext.ts index 5ff432ec60a1d..c2179f27763c8 100644 --- a/packages/playwright-core/src/client/browserContext.ts +++ b/packages/playwright-core/src/client/browserContext.ts @@ -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'; diff --git a/packages/playwright-core/src/client/browserType.ts b/packages/playwright-core/src/client/browserType.ts index 06672cc64e534..7fe43a213a447 100644 --- a/packages/playwright-core/src/client/browserType.ts +++ b/packages/playwright-core/src/client/browserType.ts @@ -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'; diff --git a/packages/playwright-core/src/client/cdpSession.ts b/packages/playwright-core/src/client/cdpSession.ts index 68d1cb57f875e..b2d987e763cd4 100644 --- a/packages/playwright-core/src/client/cdpSession.ts +++ b/packages/playwright-core/src/client/cdpSession.ts @@ -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'; diff --git a/packages/playwright-core/src/client/channelOwner.ts b/packages/playwright-core/src/client/channelOwner.ts index a5d753507bddf..9c219240a42cb 100644 --- a/packages/playwright-core/src/client/channelOwner.ts +++ b/packages/playwright-core/src/client/channelOwner.ts @@ -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'; diff --git a/packages/playwright-core/src/client/clientInstrumentation.ts b/packages/playwright-core/src/client/clientInstrumentation.ts index 55c787df05c13..203d968df32ac 100644 --- a/packages/playwright-core/src/client/clientInstrumentation.ts +++ b/packages/playwright-core/src/client/clientInstrumentation.ts @@ -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'; diff --git a/packages/playwright-core/src/client/connection.ts b/packages/playwright-core/src/client/connection.ts index 75d1878da3ea4..5a5d1aea54aef 100644 --- a/packages/playwright-core/src/client/connection.ts +++ b/packages/playwright-core/src/client/connection.ts @@ -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'; diff --git a/packages/playwright-core/src/client/consoleMessage.ts b/packages/playwright-core/src/client/consoleMessage.ts index fcdc3fd1490be..eeb0cc6da797d 100644 --- a/packages/playwright-core/src/client/consoleMessage.ts +++ b/packages/playwright-core/src/client/consoleMessage.ts @@ -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'; diff --git a/packages/playwright-core/src/client/coverage.ts b/packages/playwright-core/src/client/coverage.ts index c736d1fad0047..dc71469f33663 100644 --- a/packages/playwright-core/src/client/coverage.ts +++ b/packages/playwright-core/src/client/coverage.ts @@ -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 { diff --git a/packages/playwright-core/src/client/dialog.ts b/packages/playwright-core/src/client/dialog.ts index c012838b7ccec..db75a20bdb904 100644 --- a/packages/playwright-core/src/client/dialog.ts +++ b/packages/playwright-core/src/client/dialog.ts @@ -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'; diff --git a/packages/playwright-core/src/client/electron.ts b/packages/playwright-core/src/client/electron.ts index fe5b6e189ec2d..2b56f2c9e2d88 100644 --- a/packages/playwright-core/src/client/electron.ts +++ b/packages/playwright-core/src/client/electron.ts @@ -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'; diff --git a/packages/playwright-core/src/client/elementHandle.ts b/packages/playwright-core/src/client/elementHandle.ts index 0a89d3091bf52..a4a3a0b10bbc6 100644 --- a/packages/playwright-core/src/client/elementHandle.ts +++ b/packages/playwright-core/src/client/elementHandle.ts @@ -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'; diff --git a/packages/playwright-core/src/client/errors.ts b/packages/playwright-core/src/client/errors.ts index 51555202e5b84..a23da367ad28c 100644 --- a/packages/playwright-core/src/client/errors.ts +++ b/packages/playwright-core/src/client/errors.ts @@ -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'; diff --git a/packages/playwright-core/src/client/fetch.ts b/packages/playwright-core/src/client/fetch.ts index 58928532ac9e4..07ddd7d73e980 100644 --- a/packages/playwright-core/src/client/fetch.ts +++ b/packages/playwright-core/src/client/fetch.ts @@ -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'; diff --git a/packages/playwright-core/src/client/fileChooser.ts b/packages/playwright-core/src/client/fileChooser.ts index 5e7b1113ffd8e..86f02fc4f74d2 100644 --- a/packages/playwright-core/src/client/fileChooser.ts +++ b/packages/playwright-core/src/client/fileChooser.ts @@ -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 { diff --git a/packages/playwright-core/src/client/frame.ts b/packages/playwright-core/src/client/frame.ts index c3370776309df..0b4d562030966 100644 --- a/packages/playwright-core/src/client/frame.ts +++ b/packages/playwright-core/src/client/frame.ts @@ -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'; diff --git a/packages/playwright-core/src/client/input.ts b/packages/playwright-core/src/client/input.ts index e06b0e3e4ab4e..f3fee2150d69a 100644 --- a/packages/playwright-core/src/client/input.ts +++ b/packages/playwright-core/src/client/input.ts @@ -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'; diff --git a/packages/playwright-core/src/client/jsHandle.ts b/packages/playwright-core/src/client/jsHandle.ts index 8577400f3df1e..468240e719a62 100644 --- a/packages/playwright-core/src/client/jsHandle.ts +++ b/packages/playwright-core/src/client/jsHandle.ts @@ -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'; diff --git a/packages/playwright-core/src/client/jsonPipe.ts b/packages/playwright-core/src/client/jsonPipe.ts index 0c6b53502fa29..bfb9d1e240a3e 100644 --- a/packages/playwright-core/src/client/jsonPipe.ts +++ b/packages/playwright-core/src/client/jsonPipe.ts @@ -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 { diff --git a/packages/playwright-core/src/client/localUtils.ts b/packages/playwright-core/src/client/localUtils.ts index 530547b227918..73ef451385404 100644 --- a/packages/playwright-core/src/client/localUtils.ts +++ b/packages/playwright-core/src/client/localUtils.ts @@ -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'; diff --git a/packages/playwright-core/src/client/locator.ts b/packages/playwright-core/src/client/locator.ts index 84e68e1b20497..9cae2ed44b226 100644 --- a/packages/playwright-core/src/client/locator.ts +++ b/packages/playwright-core/src/client/locator.ts @@ -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'; diff --git a/packages/playwright-core/src/client/network.ts b/packages/playwright-core/src/client/network.ts index cb18681ccf4e3..0aeaa648979c4 100644 --- a/packages/playwright-core/src/client/network.ts +++ b/packages/playwright-core/src/client/network.ts @@ -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'; diff --git a/packages/playwright-core/src/client/page.ts b/packages/playwright-core/src/client/page.ts index f1d90fece24ca..973cf077f854a 100644 --- a/packages/playwright-core/src/client/page.ts +++ b/packages/playwright-core/src/client/page.ts @@ -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'; diff --git a/packages/playwright-core/src/client/playwright.ts b/packages/playwright-core/src/client/playwright.ts index 9933ce15dea40..0140b2f52ba2d 100644 --- a/packages/playwright-core/src/client/playwright.ts +++ b/packages/playwright-core/src/client/playwright.ts @@ -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'; diff --git a/packages/playwright-core/src/client/selectors.ts b/packages/playwright-core/src/client/selectors.ts index 2739be0e8dc06..2191de800b19c 100644 --- a/packages/playwright-core/src/client/selectors.ts +++ b/packages/playwright-core/src/client/selectors.ts @@ -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'; diff --git a/packages/playwright-core/src/client/stream.ts b/packages/playwright-core/src/client/stream.ts index bb202ac4ad4ac..49b59fa95bae0 100644 --- a/packages/playwright-core/src/client/stream.ts +++ b/packages/playwright-core/src/client/stream.ts @@ -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 { diff --git a/packages/playwright-core/src/client/tracing.ts b/packages/playwright-core/src/client/tracing.ts index 2481741e3e15b..66c67b07e1638 100644 --- a/packages/playwright-core/src/client/tracing.ts +++ b/packages/playwright-core/src/client/tracing.ts @@ -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'; diff --git a/packages/playwright-core/src/client/types.ts b/packages/playwright-core/src/client/types.ts index 11049b2111de9..211be9980b9c8 100644 --- a/packages/playwright-core/src/client/types.ts +++ b/packages/playwright-core/src/client/types.ts @@ -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'; diff --git a/packages/playwright-core/src/client/waiter.ts b/packages/playwright-core/src/client/waiter.ts index 7b57fe8960b83..296617205733f 100644 --- a/packages/playwright-core/src/client/waiter.ts +++ b/packages/playwright-core/src/client/waiter.ts @@ -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 { diff --git a/packages/playwright-core/src/client/worker.ts b/packages/playwright-core/src/client/worker.ts index 31d5d3057f9f8..131faf51d95fc 100644 --- a/packages/playwright-core/src/client/worker.ts +++ b/packages/playwright-core/src/client/worker.ts @@ -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'; diff --git a/packages/playwright-core/src/client/writableStream.ts b/packages/playwright-core/src/client/writableStream.ts index 8ed799292c9ff..16aeb80695c4b 100644 --- a/packages/playwright-core/src/client/writableStream.ts +++ b/packages/playwright-core/src/client/writableStream.ts @@ -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 { diff --git a/packages/playwright-core/src/protocol/serializers.ts b/packages/playwright-core/src/protocol/serializers.ts index 559d4a062eb66..aa362e021fd46 100644 --- a/packages/playwright-core/src/protocol/serializers.ts +++ b/packages/playwright-core/src/protocol/serializers.ts @@ -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()); diff --git a/packages/playwright-core/src/remote/playwrightConnection.ts b/packages/playwright-core/src/remote/playwrightConnection.ts index cce31207a876a..19cdab46e19e5 100644 --- a/packages/playwright-core/src/remote/playwrightConnection.ts +++ b/packages/playwright-core/src/remote/playwrightConnection.ts @@ -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'; diff --git a/packages/playwright-core/src/server/accessibility.ts b/packages/playwright-core/src/server/accessibility.ts index b92c5411f5e35..204657699b814 100644 --- a/packages/playwright-core/src/server/accessibility.ts +++ b/packages/playwright-core/src/server/accessibility.ts @@ -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; diff --git a/packages/playwright-core/src/server/android/android.ts b/packages/playwright-core/src/server/android/android.ts index 1af083916c285..63f20500655e5 100644 --- a/packages/playwright-core/src/server/android/android.ts +++ b/packages/playwright-core/src/server/android/android.ts @@ -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'; diff --git a/packages/playwright-core/src/server/android/backendAdb.ts b/packages/playwright-core/src/server/android/backendAdb.ts index cd718b9d95c13..eef0f864eb4b7 100644 --- a/packages/playwright-core/src/server/android/backendAdb.ts +++ b/packages/playwright-core/src/server/android/backendAdb.ts @@ -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'; diff --git a/packages/playwright-core/src/server/bidi/bidiBrowser.ts b/packages/playwright-core/src/server/bidi/bidiBrowser.ts index acefc08fb2acc..8aaed0fec320a 100644 --- a/packages/playwright-core/src/server/bidi/bidiBrowser.ts +++ b/packages/playwright-core/src/server/bidi/bidiBrowser.ts @@ -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'; diff --git a/packages/playwright-core/src/server/bidi/bidiPage.ts b/packages/playwright-core/src/server/bidi/bidiPage.ts index 56bb43cb1ac0b..3ea34d4bca844 100644 --- a/packages/playwright-core/src/server/bidi/bidiPage.ts +++ b/packages/playwright-core/src/server/bidi/bidiPage.ts @@ -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'; diff --git a/packages/playwright-core/src/server/bidi/bidiPdf.ts b/packages/playwright-core/src/server/bidi/bidiPdf.ts index 89fefb5260870..235547a007a46 100644 --- a/packages/playwright-core/src/server/bidi/bidiPdf.ts +++ b/packages/playwright-core/src/server/bidi/bidiPdf.ts @@ -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 }} = { diff --git a/packages/playwright-core/src/server/browser.ts b/packages/playwright-core/src/server/browser.ts index 252443bc440a0..1a337c08d4301 100644 --- a/packages/playwright-core/src/server/browser.ts +++ b/packages/playwright-core/src/server/browser.ts @@ -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'; diff --git a/packages/playwright-core/src/server/browserContext.ts b/packages/playwright-core/src/server/browserContext.ts index 6d9227c0a7446..4e6e68aebe51b 100644 --- a/packages/playwright-core/src/server/browserContext.ts +++ b/packages/playwright-core/src/server/browserContext.ts @@ -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'; diff --git a/packages/playwright-core/src/server/browserType.ts b/packages/playwright-core/src/server/browserType.ts index 128b80a35203d..4c3fb9cd5d015 100644 --- a/packages/playwright-core/src/server/browserType.ts +++ b/packages/playwright-core/src/server/browserType.ts @@ -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'; diff --git a/packages/playwright-core/src/server/chromium/crAccessibility.ts b/packages/playwright-core/src/server/chromium/crAccessibility.ts index 4114663a0eb20..30657ee8e4c2c 100644 --- a/packages/playwright-core/src/server/chromium/crAccessibility.ts +++ b/packages/playwright-core/src/server/chromium/crAccessibility.ts @@ -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'); diff --git a/packages/playwright-core/src/server/chromium/crBrowser.ts b/packages/playwright-core/src/server/chromium/crBrowser.ts index 1aba1ed8cb0e4..40feba8791e96 100644 --- a/packages/playwright-core/src/server/chromium/crBrowser.ts +++ b/packages/playwright-core/src/server/chromium/crBrowser.ts @@ -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'; diff --git a/packages/playwright-core/src/server/chromium/crCoverage.ts b/packages/playwright-core/src/server/chromium/crCoverage.ts index ccb9b40ae0d74..a95942c05fd9e 100644 --- a/packages/playwright-core/src/server/chromium/crCoverage.ts +++ b/packages/playwright-core/src/server/chromium/crCoverage.ts @@ -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 { diff --git a/packages/playwright-core/src/server/chromium/crPage.ts b/packages/playwright-core/src/server/chromium/crPage.ts index a7ee34d2c56ab..76cd2b744a649 100644 --- a/packages/playwright-core/src/server/chromium/crPage.ts +++ b/packages/playwright-core/src/server/chromium/crPage.ts @@ -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'; diff --git a/packages/playwright-core/src/server/chromium/crPdf.ts b/packages/playwright-core/src/server/chromium/crPdf.ts index 8dae2d1fa1442..51a02b32745d3 100644 --- a/packages/playwright-core/src/server/chromium/crPdf.ts +++ b/packages/playwright-core/src/server/chromium/crPdf.ts @@ -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'; diff --git a/packages/playwright-core/src/server/cookieStore.ts b/packages/playwright-core/src/server/cookieStore.ts index d1842660c7931..a7b5511cbdf0a 100644 --- a/packages/playwright-core/src/server/cookieStore.ts +++ b/packages/playwright-core/src/server/cookieStore.ts @@ -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 { diff --git a/packages/playwright-core/src/server/dispatchers/androidDispatcher.ts b/packages/playwright-core/src/server/dispatchers/androidDispatcher.ts index 77f38c55587b3..b092c6ad4a1f4 100644 --- a/packages/playwright-core/src/server/dispatchers/androidDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/androidDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/artifactDispatcher.ts b/packages/playwright-core/src/server/dispatchers/artifactDispatcher.ts index 1996f117765ae..9e747f397065b 100644 --- a/packages/playwright-core/src/server/dispatchers/artifactDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/artifactDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/browserContextDispatcher.ts b/packages/playwright-core/src/server/dispatchers/browserContextDispatcher.ts index c6ffce49f702b..4f6ee3cde4f9a 100644 --- a/packages/playwright-core/src/server/dispatchers/browserContextDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/browserContextDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/browserDispatcher.ts b/packages/playwright-core/src/server/dispatchers/browserDispatcher.ts index 99ce5f961f570..b8338145edb8c 100644 --- a/packages/playwright-core/src/server/dispatchers/browserDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/browserDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/browserTypeDispatcher.ts b/packages/playwright-core/src/server/dispatchers/browserTypeDispatcher.ts index bf7ccd518f4e1..6ef76420bc308 100644 --- a/packages/playwright-core/src/server/dispatchers/browserTypeDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/browserTypeDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/cdpSessionDispatcher.ts b/packages/playwright-core/src/server/dispatchers/cdpSessionDispatcher.ts index 33fa19f5e786a..39ddf11655e92 100644 --- a/packages/playwright-core/src/server/dispatchers/cdpSessionDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/cdpSessionDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/debugControllerDispatcher.ts b/packages/playwright-core/src/server/dispatchers/debugControllerDispatcher.ts index fc722d1bd33cc..4d2de4baae20e 100644 --- a/packages/playwright-core/src/server/dispatchers/debugControllerDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/debugControllerDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/dialogDispatcher.ts b/packages/playwright-core/src/server/dispatchers/dialogDispatcher.ts index 50ff01f108d8d..41adc8f9a232d 100644 --- a/packages/playwright-core/src/server/dispatchers/dialogDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/dialogDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/dispatcher.ts b/packages/playwright-core/src/server/dispatchers/dispatcher.ts index ce63891f4f33f..3dd9cac509340 100644 --- a/packages/playwright-core/src/server/dispatchers/dispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/dispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/electronDispatcher.ts b/packages/playwright-core/src/server/dispatchers/electronDispatcher.ts index a4e28da26f2de..b769472ef597b 100644 --- a/packages/playwright-core/src/server/dispatchers/electronDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/electronDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/elementHandlerDispatcher.ts b/packages/playwright-core/src/server/dispatchers/elementHandlerDispatcher.ts index d4d0280ec4fc7..86426ea7d3d6d 100644 --- a/packages/playwright-core/src/server/dispatchers/elementHandlerDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/elementHandlerDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/frameDispatcher.ts b/packages/playwright-core/src/server/dispatchers/frameDispatcher.ts index 2f172df694f34..f579227488cb6 100644 --- a/packages/playwright-core/src/server/dispatchers/frameDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/frameDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/jsHandleDispatcher.ts b/packages/playwright-core/src/server/dispatchers/jsHandleDispatcher.ts index 33960e72d5e74..044bc0097d477 100644 --- a/packages/playwright-core/src/server/dispatchers/jsHandleDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/jsHandleDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/jsonPipeDispatcher.ts b/packages/playwright-core/src/server/dispatchers/jsonPipeDispatcher.ts index dead26993f826..000c92604ada2 100644 --- a/packages/playwright-core/src/server/dispatchers/jsonPipeDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/jsonPipeDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/localUtilsDispatcher.ts b/packages/playwright-core/src/server/dispatchers/localUtilsDispatcher.ts index b6f8fe80ac793..05830724e18cf 100644 --- a/packages/playwright-core/src/server/dispatchers/localUtilsDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/localUtilsDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/networkDispatchers.ts b/packages/playwright-core/src/server/dispatchers/networkDispatchers.ts index ba600f697e7d7..79b1585ec15cc 100644 --- a/packages/playwright-core/src/server/dispatchers/networkDispatchers.ts +++ b/packages/playwright-core/src/server/dispatchers/networkDispatchers.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/pageDispatcher.ts b/packages/playwright-core/src/server/dispatchers/pageDispatcher.ts index 5e3b73a73f024..d02650c22edd5 100644 --- a/packages/playwright-core/src/server/dispatchers/pageDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/pageDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/playwrightDispatcher.ts b/packages/playwright-core/src/server/dispatchers/playwrightDispatcher.ts index c411f93198046..f93c0b101cfa6 100644 --- a/packages/playwright-core/src/server/dispatchers/playwrightDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/playwrightDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/selectorsDispatcher.ts b/packages/playwright-core/src/server/dispatchers/selectorsDispatcher.ts index 4582a8081d707..8f1708e1c1972 100644 --- a/packages/playwright-core/src/server/dispatchers/selectorsDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/selectorsDispatcher.ts @@ -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 implements channels.SelectorsChannel { diff --git a/packages/playwright-core/src/server/dispatchers/streamDispatcher.ts b/packages/playwright-core/src/server/dispatchers/streamDispatcher.ts index 4a45468389215..f89ac5b592779 100644 --- a/packages/playwright-core/src/server/dispatchers/streamDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/streamDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/tracingDispatcher.ts b/packages/playwright-core/src/server/dispatchers/tracingDispatcher.ts index 5555de15d1e1b..b77a3f240991e 100644 --- a/packages/playwright-core/src/server/dispatchers/tracingDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/tracingDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/webSocketRouteDispatcher.ts b/packages/playwright-core/src/server/dispatchers/webSocketRouteDispatcher.ts index 87f469b7d0fe6..d05e2475ee0e9 100644 --- a/packages/playwright-core/src/server/dispatchers/webSocketRouteDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/webSocketRouteDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dispatchers/writableStreamDispatcher.ts b/packages/playwright-core/src/server/dispatchers/writableStreamDispatcher.ts index 3e54e644d5547..5c21f84f7f4be 100644 --- a/packages/playwright-core/src/server/dispatchers/writableStreamDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/writableStreamDispatcher.ts @@ -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'; diff --git a/packages/playwright-core/src/server/dom.ts b/packages/playwright-core/src/server/dom.ts index 8e65c7c67fdda..44b10d0b700d4 100644 --- a/packages/playwright-core/src/server/dom.ts +++ b/packages/playwright-core/src/server/dom.ts @@ -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'; diff --git a/packages/playwright-core/src/server/electron/electron.ts b/packages/playwright-core/src/server/electron/electron.ts index 1606c407d57ca..511b0518780df 100644 --- a/packages/playwright-core/src/server/electron/electron.ts +++ b/packages/playwright-core/src/server/electron/electron.ts @@ -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'; diff --git a/packages/playwright-core/src/server/errors.ts b/packages/playwright-core/src/server/errors.ts index c3a63cb0339fe..cf5b2d77dd76f 100644 --- a/packages/playwright-core/src/server/errors.ts +++ b/packages/playwright-core/src/server/errors.ts @@ -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'; diff --git a/packages/playwright-core/src/server/fetch.ts b/packages/playwright-core/src/server/fetch.ts index f231c907c0827..680ff12746679 100644 --- a/packages/playwright-core/src/server/fetch.ts +++ b/packages/playwright-core/src/server/fetch.ts @@ -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'; diff --git a/packages/playwright-core/src/server/fileUploadUtils.ts b/packages/playwright-core/src/server/fileUploadUtils.ts index 22ac13b12758e..539210855fb4d 100644 --- a/packages/playwright-core/src/server/fileUploadUtils.ts +++ b/packages/playwright-core/src/server/fileUploadUtils.ts @@ -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'; diff --git a/packages/playwright-core/src/server/formData.ts b/packages/playwright-core/src/server/formData.ts index bc7f1e5bfe970..c5fd2dcf4f435 100644 --- a/packages/playwright-core/src/server/formData.ts +++ b/packages/playwright-core/src/server/formData.ts @@ -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; diff --git a/packages/playwright-core/src/server/frames.ts b/packages/playwright-core/src/server/frames.ts index ad793aded8011..4bbc69b0ae59e 100644 --- a/packages/playwright-core/src/server/frames.ts +++ b/packages/playwright-core/src/server/frames.ts @@ -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'; diff --git a/packages/playwright-core/src/server/har/harRecorder.ts b/packages/playwright-core/src/server/har/harRecorder.ts index e623587e57fa8..5e48862d18f12 100644 --- a/packages/playwright-core/src/server/har/harRecorder.ts +++ b/packages/playwright-core/src/server/har/harRecorder.ts @@ -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'; diff --git a/packages/playwright-core/src/server/injected/injectedScript.ts b/packages/playwright-core/src/server/injected/injectedScript.ts index 74ff799ff1ca7..4553055e7e861 100644 --- a/packages/playwright-core/src/server/injected/injectedScript.ts +++ b/packages/playwright-core/src/server/injected/injectedScript.ts @@ -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'; diff --git a/packages/playwright-core/src/server/instrumentation.ts b/packages/playwright-core/src/server/instrumentation.ts index 2a384fb16978c..e4fa37951ae6e 100644 --- a/packages/playwright-core/src/server/instrumentation.ts +++ b/packages/playwright-core/src/server/instrumentation.ts @@ -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; diff --git a/packages/playwright-core/src/server/network.ts b/packages/playwright-core/src/server/network.ts index 006f2f4cbff39..ace19ae0aa228 100644 --- a/packages/playwright-core/src/server/network.ts +++ b/packages/playwright-core/src/server/network.ts @@ -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'; diff --git a/packages/playwright-core/src/server/page.ts b/packages/playwright-core/src/server/page.ts index 48c0827c08a4a..ed8946676a280 100644 --- a/packages/playwright-core/src/server/page.ts +++ b/packages/playwright-core/src/server/page.ts @@ -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'; diff --git a/packages/playwright-core/src/server/recorder.ts b/packages/playwright-core/src/server/recorder.ts index 16f9d791e1610..c53bf049771f4 100644 --- a/packages/playwright-core/src/server/recorder.ts +++ b/packages/playwright-core/src/server/recorder.ts @@ -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'; diff --git a/packages/playwright-core/src/server/recorder/contextRecorder.ts b/packages/playwright-core/src/server/recorder/contextRecorder.ts index d7a3c908e8800..2df8f679aa3f7 100644 --- a/packages/playwright-core/src/server/recorder/contextRecorder.ts +++ b/packages/playwright-core/src/server/recorder/contextRecorder.ts @@ -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'; diff --git a/packages/playwright-core/src/server/recorder/recorderCollection.ts b/packages/playwright-core/src/server/recorder/recorderCollection.ts index 2643dece9131b..6fd48a146c794 100644 --- a/packages/playwright-core/src/server/recorder/recorderCollection.ts +++ b/packages/playwright-core/src/server/recorder/recorderCollection.ts @@ -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 { diff --git a/packages/playwright-core/src/server/socksInterceptor.ts b/packages/playwright-core/src/server/socksInterceptor.ts index 498e8bfe7382c..223cf68692d46 100644 --- a/packages/playwright-core/src/server/socksInterceptor.ts +++ b/packages/playwright-core/src/server/socksInterceptor.ts @@ -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'; diff --git a/packages/playwright-core/src/server/trace/recorder/tracing.ts b/packages/playwright-core/src/server/trace/recorder/tracing.ts index c19c0a33d9918..bf181402c1433 100644 --- a/packages/playwright-core/src/server/trace/recorder/tracing.ts +++ b/packages/playwright-core/src/server/trace/recorder/tracing.ts @@ -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'; diff --git a/packages/playwright-core/src/server/types.ts b/packages/playwright-core/src/server/types.ts index b58ea5af83bca..767ca17ac8e5b 100644 --- a/packages/playwright-core/src/server/types.ts +++ b/packages/playwright-core/src/server/types.ts @@ -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, diff --git a/packages/playwright-core/src/server/webkit/wkAccessibility.ts b/packages/playwright-core/src/server/webkit/wkAccessibility.ts index 80c855ea7b852..d73dc574f9697 100644 --- a/packages/playwright-core/src/server/webkit/wkAccessibility.ts +++ b/packages/playwright-core/src/server/webkit/wkAccessibility.ts @@ -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; diff --git a/packages/playwright-core/src/server/webkit/wkBrowser.ts b/packages/playwright-core/src/server/webkit/wkBrowser.ts index 4e5467fd17cb7..c6eb8a0e23e35 100644 --- a/packages/playwright-core/src/server/webkit/wkBrowser.ts +++ b/packages/playwright-core/src/server/webkit/wkBrowser.ts @@ -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'; diff --git a/packages/playwright-core/src/utils/expectUtils.ts b/packages/playwright-core/src/utils/expectUtils.ts index 0ae21e860270b..9c5e043cb8b50 100644 --- a/packages/playwright-core/src/utils/expectUtils.ts +++ b/packages/playwright-core/src/utils/expectUtils.ts @@ -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[] { diff --git a/packages/playwright-core/src/utils/isomorphic/recorderUtils.ts b/packages/playwright-core/src/utils/isomorphic/recorderUtils.ts index 7ef45e5ecefc2..82c387bf6c4d1 100644 --- a/packages/playwright-core/src/utils/isomorphic/recorderUtils.ts +++ b/packages/playwright-core/src/utils/isomorphic/recorderUtils.ts @@ -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) { diff --git a/packages/playwright-core/src/utils/isomorphic/traceUtils.ts b/packages/playwright-core/src/utils/isomorphic/traceUtils.ts index edb1e1c66081f..d467d52b62453 100644 --- a/packages/playwright-core/src/utils/isomorphic/traceUtils.ts +++ b/packages/playwright-core/src/utils/isomorphic/traceUtils.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import type { StackFrame } from '@protocol/channels'; +import type { StackFrame } from '@playwright/protocol/src/channels'; export type SerializedStackFrame = [number, number, number, string]; export type SerializedStack = [number, SerializedStackFrame[]]; diff --git a/packages/playwright-core/src/utils/stackTrace.ts b/packages/playwright-core/src/utils/stackTrace.ts index 2e40968ebcb75..016540f319907 100644 --- a/packages/playwright-core/src/utils/stackTrace.ts +++ b/packages/playwright-core/src/utils/stackTrace.ts @@ -16,7 +16,7 @@ import path from 'path'; import { parseStackTraceLine } from '../utilsBundle'; -import type { StackFrame } from '@protocol/channels'; +import type { StackFrame } from '@playwright/protocol/src/channels'; import { colors } from '../utilsBundle'; import { findRepeatedSubsequences } from './sequence'; diff --git a/packages/playwright-core/src/utils/traceUtils.ts b/packages/playwright-core/src/utils/traceUtils.ts index d0090b3665590..986b8f169e484 100644 --- a/packages/playwright-core/src/utils/traceUtils.ts +++ b/packages/playwright-core/src/utils/traceUtils.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import type { ClientSideCallMetadata } from '@protocol/channels'; +import type { ClientSideCallMetadata } from '@playwright/protocol/src/channels'; import type { SerializedClientSideCallMetadata, SerializedStack, SerializedStackFrame } from './isomorphic/traceUtils'; export function serializeClientSideCallMetadata(metadatas: ClientSideCallMetadata[]): SerializedClientSideCallMetadata { diff --git a/packages/playwright-core/src/utilsBundle.ts b/packages/playwright-core/src/utilsBundle.ts index 72bcee397ecf2..644b1b928ac42 100644 --- a/packages/playwright-core/src/utilsBundle.ts +++ b/packages/playwright-core/src/utilsBundle.ts @@ -39,7 +39,7 @@ export const wsReceiver = require('./utilsBundleImpl').wsReceiver; export const wsSender = require('./utilsBundleImpl').wsSender; export type { Command } from '../bundles/utils/node_modules/commander'; export type { WebSocket, WebSocketServer, RawData as WebSocketRawData, EventEmitter as WebSocketEventEmitter } from '../bundles/utils/node_modules/@types/ws'; -import type { StackFrame } from '@protocol/channels'; +import type { StackFrame } from '@playwright/protocol/src/channels'; const StackUtils: typeof import('../bundles/utils/node_modules/@types/stack-utils') = require('./utilsBundleImpl').StackUtils; const stackUtils = new StackUtils({ internals: StackUtils.nodeInternals() }); diff --git a/packages/playwright/src/matchers/matcherHint.ts b/packages/playwright/src/matchers/matcherHint.ts index dc4264d56b91c..8448e72576c07 100644 --- a/packages/playwright/src/matchers/matcherHint.ts +++ b/packages/playwright/src/matchers/matcherHint.ts @@ -17,7 +17,7 @@ import { colors } from 'playwright-core/lib/utilsBundle'; import type { ExpectMatcherState } from '../../types/test'; import type { Locator } from 'playwright-core'; -import type { StackFrame } from '@protocol/channels'; +import type { StackFrame } from '@playwright/protocol/src/channels'; import { stringifyStackFrames } from 'playwright-core/lib/utils'; export const kNoElementsFoundError = ''; diff --git a/packages/playwright/src/util.ts b/packages/playwright/src/util.ts index f7f91d3198e51..e81faf45137f3 100644 --- a/packages/playwright/src/util.ts +++ b/packages/playwright/src/util.ts @@ -15,7 +15,7 @@ */ import fs from 'fs'; -import type { StackFrame } from '@protocol/channels'; +import type { StackFrame } from '@playwright/protocol/src/channels'; import util from 'util'; import path from 'path'; import url from 'url'; diff --git a/packages/playwright/src/worker/testInfo.ts b/packages/playwright/src/worker/testInfo.ts index 8b965e0a14577..c956e71e54db9 100644 --- a/packages/playwright/src/worker/testInfo.ts +++ b/packages/playwright/src/worker/testInfo.ts @@ -27,7 +27,7 @@ import type { FullConfig, Location } from '../../types/testReporter'; import { debugTest, filteredStackTrace, formatLocation, getContainedPath, normalizeAndSaveAttachment, trimLongString, windowsFilesystemFriendlyLength } from '../util'; import { TestTracing } from './testTracing'; import type { Attachment } from './testTracing'; -import type { StackFrame } from '@protocol/channels'; +import type { StackFrame } from '@playwright/protocol/src/channels'; import { testInfoError } from './util'; export interface TestStepInternal { diff --git a/packages/playwright/src/worker/testTracing.ts b/packages/playwright/src/worker/testTracing.ts index eb0ce9d80700f..08e35957287e4 100644 --- a/packages/playwright/src/worker/testTracing.ts +++ b/packages/playwright/src/worker/testTracing.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import type { SerializedError, StackFrame } from '@protocol/channels'; +import type { SerializedError, StackFrame } from '@playwright/protocol/src/channels'; import type * as trace from '@trace/trace'; import type EventEmitter from 'events'; import fs from 'fs'; diff --git a/packages/protocol/package.json b/packages/protocol/package.json new file mode 100644 index 0000000000000..242600a351098 --- /dev/null +++ b/packages/protocol/package.json @@ -0,0 +1,3 @@ +{ + "name": "@playwright/protocol" +} \ No newline at end of file diff --git a/packages/recorder/tsconfig.json b/packages/recorder/tsconfig.json index 16546d6e0de1c..46c99fea4f0ca 100644 --- a/packages/recorder/tsconfig.json +++ b/packages/recorder/tsconfig.json @@ -18,7 +18,6 @@ "useUnknownInCatchVariables": false, "paths": { "@isomorphic/*": ["../playwright-core/src/utils/isomorphic/*"], - "@protocol/*": ["../protocol/src/*"], "@recorder/*": ["../recorder/src/*"], "@web/*": ["../web/src/*"], } diff --git a/packages/recorder/vite.config.ts b/packages/recorder/vite.config.ts index a72a43f203731..61c60e05c1de7 100644 --- a/packages/recorder/vite.config.ts +++ b/packages/recorder/vite.config.ts @@ -26,7 +26,6 @@ export default defineConfig({ resolve: { alias: { '@isomorphic': path.resolve(__dirname, '../playwright-core/src/utils/isomorphic'), - '@protocol': path.resolve(__dirname, '../protocol/src'), '@web': path.resolve(__dirname, '../web/src'), }, }, diff --git a/packages/trace-viewer/src/ui/callTab.tsx b/packages/trace-viewer/src/ui/callTab.tsx index 1ab3b5b46f4b9..2ec3307daaa3f 100644 --- a/packages/trace-viewer/src/ui/callTab.tsx +++ b/packages/trace-viewer/src/ui/callTab.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import type { SerializedValue } from '@protocol/channels'; +import type { SerializedValue } from '@playwright/protocol/src/channels'; import type { ActionTraceEvent } from '@trace/trace'; import { clsx, msToString } from '@web/uiUtils'; import * as React from 'react'; diff --git a/packages/trace-viewer/src/ui/consoleTab.tsx b/packages/trace-viewer/src/ui/consoleTab.tsx index cdc3cb7e937ff..ac424dfa88066 100644 --- a/packages/trace-viewer/src/ui/consoleTab.tsx +++ b/packages/trace-viewer/src/ui/consoleTab.tsx @@ -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 React from 'react'; import './consoleTab.css'; import type * as modelUtil from './modelUtil'; diff --git a/packages/trace-viewer/src/ui/errorsTab.tsx b/packages/trace-viewer/src/ui/errorsTab.tsx index acf5bf838ee83..084d13b2ea07f 100644 --- a/packages/trace-viewer/src/ui/errorsTab.tsx +++ b/packages/trace-viewer/src/ui/errorsTab.tsx @@ -20,7 +20,7 @@ import type * as modelUtil from './modelUtil'; import { PlaceholderPanel } from './placeholderPanel'; import { renderAction } from './actionList'; import type { Language } from '@isomorphic/locatorGenerators'; -import type { StackFrame } from '@protocol/channels'; +import type { StackFrame } from '@playwright/protocol/src/channels'; export type ErrorDescription = { action?: modelUtil.ActionTraceEventInContext; diff --git a/packages/trace-viewer/src/ui/modelUtil.ts b/packages/trace-viewer/src/ui/modelUtil.ts index 8badcbd87e768..9b18fdf4b5170 100644 --- a/packages/trace-viewer/src/ui/modelUtil.ts +++ b/packages/trace-viewer/src/ui/modelUtil.ts @@ -19,7 +19,7 @@ import type { ResourceSnapshot } from '@trace/snapshot'; import type * as trace from '@trace/trace'; import type { ActionTraceEvent } from '@trace/trace'; import type { ActionEntry, ContextEntry, PageEntry } from '../types/entries'; -import type { StackFrame } from '@protocol/channels'; +import type { StackFrame } from '@playwright/protocol/src/channels'; const contextSymbol = Symbol('context'); const nextInContextSymbol = Symbol('next'); diff --git a/packages/trace-viewer/src/ui/sourceTab.tsx b/packages/trace-viewer/src/ui/sourceTab.tsx index 1dd9170f67628..a1ea50425e7e3 100644 --- a/packages/trace-viewer/src/ui/sourceTab.tsx +++ b/packages/trace-viewer/src/ui/sourceTab.tsx @@ -22,7 +22,7 @@ import { StackTraceView } from './stackTrace'; import { CodeMirrorWrapper } from '@web/components/codeMirrorWrapper'; import type { SourceHighlight } from '@web/components/codeMirrorWrapper'; import type { SourceLocation, SourceModel } from './modelUtil'; -import type { StackFrame } from '@protocol/channels'; +import type { StackFrame } from '@playwright/protocol/src/channels'; import { CopyToClipboard } from './copyToClipboard'; import { ToolbarButton } from '@web/components/toolbarButton'; import { Toolbar } from '@web/components/toolbar'; diff --git a/packages/trace-viewer/src/ui/stackTrace.tsx b/packages/trace-viewer/src/ui/stackTrace.tsx index 6a0bad1672742..1da87c345d875 100644 --- a/packages/trace-viewer/src/ui/stackTrace.tsx +++ b/packages/trace-viewer/src/ui/stackTrace.tsx @@ -17,7 +17,7 @@ import * as React from 'react'; import './stackTrace.css'; import { ListView } from '@web/components/listView'; -import type { StackFrame } from '@protocol/channels'; +import type { StackFrame } from '@playwright/protocol/src/channels'; const StackFrameListView = ListView; diff --git a/packages/trace-viewer/tsconfig.json b/packages/trace-viewer/tsconfig.json index 41b2ed39480db..fccebc4c31381 100644 --- a/packages/trace-viewer/tsconfig.json +++ b/packages/trace-viewer/tsconfig.json @@ -18,7 +18,6 @@ "paths": { "@injected/*": ["../playwright-core/src/server/injected/*"], "@isomorphic/*": ["../playwright-core/src/utils/isomorphic/*"], - "@protocol/*": ["../protocol/src/*"], "@recorder/*": ["../recorder/src/*"], "@testIsomorphic/*": ["../playwright/src/isomorphic/*"], "@trace/*": ["../trace/src/*"], diff --git a/packages/trace-viewer/vite.config.ts b/packages/trace-viewer/vite.config.ts index c26e020fded13..dd954ca6278d3 100644 --- a/packages/trace-viewer/vite.config.ts +++ b/packages/trace-viewer/vite.config.ts @@ -33,7 +33,6 @@ export default defineConfig({ alias: { '@injected': path.resolve(__dirname, '../playwright-core/src/server/injected'), '@isomorphic': path.resolve(__dirname, '../playwright-core/src/utils/isomorphic'), - '@protocol': path.resolve(__dirname, '../protocol/src'), '@testIsomorphic': path.resolve(__dirname, '../playwright/src/isomorphic'), '@trace': path.resolve(__dirname, '../trace/src'), '@web': path.resolve(__dirname, '../web/src'), diff --git a/packages/trace-viewer/vite.sw.config.ts b/packages/trace-viewer/vite.sw.config.ts index 60e90b96ace12..6c49ffc6ce3c7 100644 --- a/packages/trace-viewer/vite.sw.config.ts +++ b/packages/trace-viewer/vite.sw.config.ts @@ -29,7 +29,6 @@ export default defineConfig({ resolve: { alias: { '@isomorphic': path.resolve(__dirname, '../playwright-core/src/utils/isomorphic'), - '@protocol': path.resolve(__dirname, '../protocol/src'), '@testIsomorphic': path.resolve(__dirname, '../playwright-core/src/utils/testIsomorphic'), '@trace': path.resolve(__dirname, '../trace/src'), '@web': path.resolve(__dirname, '../web/src'), diff --git a/packages/trace/src/trace.ts b/packages/trace/src/trace.ts index 81fc4ab428cea..bc1336f4360e1 100644 --- a/packages/trace/src/trace.ts +++ b/packages/trace/src/trace.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import type { Point, SerializedError, StackFrame } from '@protocol/channels'; +import type { Point, SerializedError, StackFrame } from '@playwright/protocol/src/channels'; import type { Language } from '../../playwright-core/src/utils/isomorphic/locatorGenerators'; import type { FrameSnapshot, ResourceSnapshot } from './snapshot'; diff --git a/tests/config/debugControllerBackend.ts b/tests/config/debugControllerBackend.ts index 9f67d44e50d34..441e778cde32e 100644 --- a/tests/config/debugControllerBackend.ts +++ b/tests/config/debugControllerBackend.ts @@ -16,7 +16,7 @@ import WebSocket from 'ws'; import { EventEmitter } from 'events'; -import type * as channels from '@protocol/channels'; +import type * as channels from '@playwright/protocol/src/channels'; export type ProtocolRequest = { id: number; diff --git a/tests/library/debug-controller.spec.ts b/tests/library/debug-controller.spec.ts index c3fb643665cf9..779bc7fddfc89 100644 --- a/tests/library/debug-controller.spec.ts +++ b/tests/library/debug-controller.spec.ts @@ -19,7 +19,7 @@ import { PlaywrightServer } from '../../packages/playwright-core/lib/remote/play import { createGuid } from '../../packages/playwright-core/lib/utils/crypto'; import { Backend } from '../config/debugControllerBackend'; import type { Browser, BrowserContext } from '@playwright/test'; -import type * as channels from '@protocol/channels'; +import type * as channels from '@playwright/protocol/src/channels'; import { roundBox } from '../page/pageTest'; type BrowserWithReuse = Browser & { _newContextForReuse: () => Promise }; diff --git a/tests/library/tracing.spec.ts b/tests/library/tracing.spec.ts index dfd4fc168da8f..c0e2d860c5433 100644 --- a/tests/library/tracing.spec.ts +++ b/tests/library/tracing.spec.ts @@ -19,7 +19,7 @@ import { jpegjs } from 'playwright-core/lib/utilsBundle'; import path from 'path'; import { browserTest, contextTest as test, expect } from '../config/browserTest'; import { parseTraceRaw } from '../config/utils'; -import type { StackFrame } from '@protocol/channels'; +import type { StackFrame } from '@playwright/protocol/src/channels'; import type { ActionTraceEvent } from '../../packages/trace/src/trace'; import { artifactsFolderName } from '../../packages/playwright/src/isomorphic/folders'; diff --git a/tests/tsconfig.json b/tests/tsconfig.json index 1a1e3d7527c34..41868a0e81885 100644 --- a/tests/tsconfig.json +++ b/tests/tsconfig.json @@ -12,7 +12,6 @@ "baseUrl": "..", "paths": { "@isomorphic/*": ["packages/playwright-core/src/utils/isomorphic/*"], - "@protocol/*": ["packages/protocol/src/*"], "@recorder/*": ["packages/recorder/src/*"], "@trace/*": ["packages/trace/src/*"], "@web/*": ["packages/web/src/*"], diff --git a/tsconfig.json b/tsconfig.json index acb0e0d63deb5..46aadbeea18ac 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,6 @@ "@html-reporter/*": ["./packages/html-reporter/src/*"], "@injected/*": ["./packages/playwright-core/src/server/injected/*"], "@isomorphic/*": ["./packages/playwright-core/src/utils/isomorphic/*"], - "@protocol/*": ["./packages/protocol/src/*"], "@recorder/*": ["./packages/recorder/src/*"], "@testIsomorphic/*": ["./packages/playwright/src/isomorphic/*"], "@trace/*": ["./packages/trace/src/*"],