chore: move protocol and trace types into the top-level packages (#17486)

This commit is contained in:
Pavel Feldman 2022-09-20 18:41:51 -07:00 committed by GitHub
parent cd9a5946d2
commit df143031e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
146 changed files with 529 additions and 381 deletions

View file

@ -14,7 +14,7 @@
limitations under the License.
*/
import type { TestCaseSummary } from '@playwright-test/reporters/html';
import type { TestCaseSummary } from './types';
export class Filter {
project: string[] = [];

View file

@ -14,7 +14,7 @@
limitations under the License.
*/
import type { Stats } from '@playwright-test/reporters/html';
import type { Stats } from './types';
import * as React from 'react';
import './colors.css';
import './common.css';

View file

@ -14,7 +14,7 @@
limitations under the License.
*/
import type { TestAttachment } from '@playwright-test/reporters/html';
import type { TestAttachment } from './types';
import * as React from 'react';
import { AttachmentLink } from './links';
import type { TabbedPaneTab } from './tabbedPane';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type { HTMLReport } from '@playwright-test/reporters/html';
import type { HTMLReport } from './types';
import type zip from '@zip.js/zip.js';
// @ts-ignore
import zipImport from '@zip.js/zip.js/dist/zip-no-worker-inflate.min.js';

View file

@ -14,7 +14,7 @@
limitations under the License.
*/
import type { TestAttachment } from '@playwright-test/reporters/html';
import type { TestAttachment } from './types';
import * as React from 'react';
import * as icons from './icons';
import { TreeItem } from './treeItem';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type { HTMLReport } from '@playwright-test/reporters/html';
import type { HTMLReport } from './types';
export interface LoadedReport {
json(): HTMLReport;

View file

@ -14,7 +14,7 @@
limitations under the License.
*/
import type { TestCase, TestFile } from '@playwright-test/reporters/html';
import type { TestCase, TestFile } from './types';
import * as React from 'react';
import './colors.css';
import './common.css';

View file

@ -17,7 +17,7 @@
import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';
import { TestCaseView } from './testCaseView';
import type { TestCase, TestResult } from '../../playwright-test/src/reporters/html';
import type { TestCase, TestResult } from './types';
test.use({ viewport: { width: 800, height: 600 } });

View file

@ -14,7 +14,7 @@
limitations under the License.
*/
import type { TestCase } from '@playwright-test/reporters/html';
import type { TestCase } from './types';
import * as React from 'react';
import { TabbedPane } from './tabbedPane';
import { AutoChip } from './chip';

View file

@ -14,7 +14,7 @@
limitations under the License.
*/
import type { HTMLReport, TestCaseSummary, TestFileSummary } from '@playwright-test/reporters/html';
import type { HTMLReport, TestCaseSummary, TestFileSummary } from './types';
import * as React from 'react';
import { msToString } from './uiUtils';
import { Chip } from './chip';

View file

@ -14,7 +14,7 @@
limitations under the License.
*/
import type { HTMLReport, TestFileSummary } from '@playwright-test/reporters/html';
import type { HTMLReport, TestFileSummary } from './types';
import * as React from 'react';
import type { Filter } from './filter';
import { TestFileView } from './testFileView';

View file

@ -14,7 +14,7 @@
limitations under the License.
*/
import type { TestAttachment, TestCase, TestResult, TestStep } from '@playwright-test/reporters/html';
import type { TestAttachment, TestCase, TestResult, TestStep } from './types';
import ansi2html from 'ansi-to-html';
import * as React from 'react';
import { TreeItem } from './treeItem';

View file

@ -0,0 +1,102 @@
/**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { Metadata } from '@protocol/channels';
export type Stats = {
total: number;
expected: number;
unexpected: number;
flaky: number;
skipped: number;
ok: boolean;
duration: number;
};
export type Location = {
file: string;
line: number;
column: number;
};
export type HTMLReport = {
metadata: Metadata;
files: TestFileSummary[];
stats: Stats;
projectNames: string[];
};
export type TestFile = {
fileId: string;
fileName: string;
tests: TestCase[];
};
export type TestFileSummary = {
fileId: string;
fileName: string;
tests: TestCaseSummary[];
stats: Stats;
};
export type TestCaseSummary = {
testId: string,
title: string;
path: string[];
projectName: string;
location: Location;
annotations: { type: string, description?: string }[];
outcome: 'skipped' | 'expected' | 'unexpected' | 'flaky';
duration: number;
ok: boolean;
results: TestResultSummary[];
};
export type TestResultSummary = {
attachments: { name: string, contentType: string, path?: string }[];
};
export type TestCase = Omit<TestCaseSummary, 'results'> & {
results: TestResult[];
};
export type TestAttachment = {
name: string;
body?: string;
path?: string;
contentType: string;
};
export type TestResult = {
retry: number;
startTime: string;
duration: number;
steps: TestStep[];
errors: string[];
attachments: TestAttachment[];
status: 'passed' | 'failed' | 'timedOut' | 'skipped' | 'interrupted';
};
export type TestStep = {
title: string;
startTime: string;
duration: number;
location?: Location;
snippet?: string;
error?: string;
steps: TestStep[];
count: number;
};

View file

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

View file

@ -28,7 +28,6 @@ export default defineConfig({
resolve: {
alias: {
'@web': path.resolve(__dirname, '../web/src'),
'@playwright-core': path.resolve(__dirname, '../playwright-core/src'),
},
},
build: {

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/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 } from '../utils';
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/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 '@protocol/channels';
import * as fs from 'fs';
import { Stream } from './stream';
import { mkdirIfNeeded } from '../utils/fileUtils';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/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 '@protocol/channels';
import fs from 'fs';
import { ChannelOwner } from './channelOwner';
import { evaluationScript } from './clientHelper';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/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 '@protocol/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 'events';
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/channels';
import { maybeFindValidator, ValidationError, type ValidatorContext } from '../protocol/validator';
import { debugLogger } from '../common/debugLogger';
import type { ParsedStackTrace } from '../utils/stackTrace';

View file

@ -30,7 +30,7 @@ import { parseError } from '../protocol/serializers';
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 '@protocol/channels';
import { Stream } from './stream';
import { WritableStream } from './writableStream';
import { debugLogger } from '../common/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 '@protocol/channels';
import { ChannelOwner } from './channelOwner';
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 '@protocol/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 '@protocol/channels';
import { ChannelOwner } from './channelOwner';
import type * as api from '../../types/types';

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 '@protocol/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 '@protocol/channels';
import { Frame } from './frame';
import type { Locator } from './locator';
import { JSHandle, serializeArgument, parseResult } from './jsHandle';

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 } from '../common/types';
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/channels';
import { kBrowserOrContextClosedError } from '../common/errors';
import { assert, headersObjectToArray, isFilePayload, isString, objectToArray } from '../utils';
import { mkdirIfNeeded } from '../utils/fileUtils';

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 '@protocol/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 '@protocol/channels';
import { ChannelOwner } from './channelOwner';
import { FrameLocator, Locator, type LocatorOptions } from './locator';
import { ElementHandle, convertSelectOptionValues, convertInputFiles } from './elementHandle';

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/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 '@protocol/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 '@protocol/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 '@protocol/channels';
import { ChannelOwner } from './channelOwner';
export class LocalUtils extends ChannelOwner<channels.LocalUtilsChannel> {

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 '@protocol/channels';
import type { ParsedStackTrace } from '../utils/stackTrace';
import * as util from 'util';
import { isRegExp, monotonicTime } from '../utils';

View file

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

View file

@ -22,7 +22,7 @@ import type * as api from '../../types/types';
import { isSafeCloseError } from '../common/errors';
import { urlMatches } from '../common/netUtils';
import { TimeoutSettings } from '../common/timeoutSettings';
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/channels';
import { parseError, serializeError } from '../protocol/serializers';
import { assert, headersObjectToArray, isObject, isRegExp, isString } from '../utils';
import { mkdirIfNeeded } from '../utils/fileUtils';

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/channels';
import { TimeoutError } from '../common/errors';
import type * as socks from '../common/socksProxy';
import { Android } from './android';

View file

@ -15,7 +15,7 @@
*/
import { evaluationScript } from './clientHelper';
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/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 '@protocol/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 '@protocol/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 '@protocol/channels';
import type { Size } from '../common/types';
export type { Size, Point, Rect, Quad, URLMatch, TimeoutOptions, HeadersArray } from '../common/types';

View file

@ -18,7 +18,7 @@ import type { EventEmitter } from 'events';
import { rewriteErrorMessage } from '../utils/stackTrace';
import { TimeoutError } from '../common/errors';
import { createGuid } from '../utils';
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/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 '@protocol/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 '@protocol/channels';
import { ChannelOwner } from './channelOwner';
export class WritableStream extends ChannelOwner<channels.WritableStreamChannel> {

View file

@ -0,0 +1,143 @@
/**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// This file is generated by generate_channels.js, do not edit manually.
export const commandsWithTracingSnapshots = new Set([
'EventTarget.waitForEventInfo',
'BrowserContext.waitForEventInfo',
'Page.waitForEventInfo',
'WebSocket.waitForEventInfo',
'ElectronApplication.waitForEventInfo',
'AndroidDevice.waitForEventInfo',
'Page.goBack',
'Page.goForward',
'Page.reload',
'Page.expectScreenshot',
'Page.screenshot',
'Page.setViewportSize',
'Page.keyboardDown',
'Page.keyboardUp',
'Page.keyboardInsertText',
'Page.keyboardType',
'Page.keyboardPress',
'Page.mouseMove',
'Page.mouseDown',
'Page.mouseUp',
'Page.mouseClick',
'Page.mouseWheel',
'Page.touchscreenTap',
'Frame.evalOnSelector',
'Frame.evalOnSelectorAll',
'Frame.addScriptTag',
'Frame.addStyleTag',
'Frame.check',
'Frame.click',
'Frame.dragAndDrop',
'Frame.dblclick',
'Frame.dispatchEvent',
'Frame.evaluateExpression',
'Frame.evaluateExpressionHandle',
'Frame.fill',
'Frame.focus',
'Frame.getAttribute',
'Frame.goto',
'Frame.hover',
'Frame.innerHTML',
'Frame.innerText',
'Frame.inputValue',
'Frame.isChecked',
'Frame.isDisabled',
'Frame.isEnabled',
'Frame.isHidden',
'Frame.isVisible',
'Frame.isEditable',
'Frame.press',
'Frame.selectOption',
'Frame.setContent',
'Frame.setInputFiles',
'Frame.setInputFilePaths',
'Frame.tap',
'Frame.textContent',
'Frame.type',
'Frame.uncheck',
'Frame.waitForTimeout',
'Frame.waitForFunction',
'Frame.waitForSelector',
'Frame.expect',
'JSHandle.evaluateExpression',
'ElementHandle.evaluateExpression',
'JSHandle.evaluateExpressionHandle',
'ElementHandle.evaluateExpressionHandle',
'ElementHandle.evalOnSelector',
'ElementHandle.evalOnSelectorAll',
'ElementHandle.check',
'ElementHandle.click',
'ElementHandle.dblclick',
'ElementHandle.dispatchEvent',
'ElementHandle.fill',
'ElementHandle.hover',
'ElementHandle.innerHTML',
'ElementHandle.innerText',
'ElementHandle.inputValue',
'ElementHandle.isChecked',
'ElementHandle.isDisabled',
'ElementHandle.isEditable',
'ElementHandle.isEnabled',
'ElementHandle.isHidden',
'ElementHandle.isVisible',
'ElementHandle.press',
'ElementHandle.screenshot',
'ElementHandle.scrollIntoViewIfNeeded',
'ElementHandle.selectOption',
'ElementHandle.selectText',
'ElementHandle.setInputFiles',
'ElementHandle.setInputFilePaths',
'ElementHandle.tap',
'ElementHandle.textContent',
'ElementHandle.type',
'ElementHandle.uncheck',
'ElementHandle.waitForElementState',
'ElementHandle.waitForSelector'
]);
export const pausesBeforeInputActions = new Set([
'Frame.check',
'Frame.click',
'Frame.dragAndDrop',
'Frame.dblclick',
'Frame.fill',
'Frame.hover',
'Frame.press',
'Frame.selectOption',
'Frame.setInputFiles',
'Frame.setInputFilePaths',
'Frame.tap',
'Frame.type',
'Frame.uncheck',
'ElementHandle.check',
'ElementHandle.click',
'ElementHandle.dblclick',
'ElementHandle.fill',
'ElementHandle.hover',
'ElementHandle.press',
'ElementHandle.selectOption',
'ElementHandle.setInputFiles',
'ElementHandle.setInputFilePaths',
'ElementHandle.tap',
'ElementHandle.type',
'ElementHandle.uncheck'
]);

View file

@ -15,7 +15,7 @@
*/
import { TimeoutError } from '../common/errors';
import type { SerializedError, SerializedValue } from './channels';
import type { SerializedError, SerializedValue } from '@protocol/channels';
export function serializeError(e: any): SerializedError {
if (isError(e))

View file

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

View file

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

View file

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

View file

@ -15,7 +15,7 @@
*/
import type * as types from './types';
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/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 } 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 '@protocol/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 '@protocol/channels';
import { DEFAULT_TIMEOUT, TimeoutSettings } from '../common/timeoutSettings';
import { debugMode } from '../utils';
import { existsAsync } from '../utils/fileUtils';

View file

@ -30,7 +30,7 @@ import { CRDevTools } from './crDevTools';
import type { BrowserOptions, BrowserProcess, PlaywrightOptions } from '../browser';
import { Browser } from '../browser';
import type * as types from '../types';
import type * as channels from '../../protocol/channels';
import type * as channels from '@protocol/channels';
import type { HTTPRequestParams } from '../../common/netUtils';
import { NET_DEFAULT_TIMEOUT } from '../../common/netUtils';
import { fetchData } from '../../common/netUtils';

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 '@protocol/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

@ -26,7 +26,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 '@protocol/channels';
import type { CRSession } 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 '@protocol/channels';
import { assert } from '../../utils';
export class CRCoverage {

View file

@ -30,7 +30,7 @@ import type { PageBinding, 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 '@protocol/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 '@protocol/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 '@protocol/channels';
class Cookie {
private _raw: channels.NetworkCookie;

View file

@ -18,7 +18,7 @@ import { EventEmitter } from 'events';
import { debugMode, isUnderTest, monotonicTime } from '../utils';
import { BrowserContext } from './browserContext';
import type { CallMetadata, InstrumentationListener, SdkObject } from './instrumentation';
import { commandsWithTracingSnapshots, pausesBeforeInputActions } from '../protocol/channels';
import { commandsWithTracingSnapshots, pausesBeforeInputActions } from '../protocol/debug';
const symbol = Symbol('Debugger');

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 '@protocol/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 '@protocol/channels';
import { Dispatcher } from './dispatcher';
import type { DispatcherScope } from './dispatcher';
import { StreamDispatcher } from './streamDispatcher';

View file

@ -19,7 +19,7 @@ import { Dispatcher, lookupDispatcher } 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 '@protocol/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 '@protocol/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 '@protocol/channels';
import type { RootDispatcher } from './dispatcher';
import { Dispatcher } from './dispatcher';
import { BrowserContextDispatcher } from './browserContextDispatcher';

View file

@ -16,7 +16,7 @@
import type { CRSession } from '../chromium/crConnection';
import { CRSessionEvents } from '../chromium/crConnection';
import type * as channels from '../../protocol/channels';
import type * as channels from '@protocol/channels';
import { Dispatcher } from './dispatcher';
import type { BrowserDispatcher } from './browserDispatcher';
import type { BrowserContextDispatcher } from './browserContextDispatcher';

View file

@ -15,7 +15,7 @@
*/
import type { ConsoleMessage } from '../console';
import type * as channels from '../../protocol/channels';
import type * as channels from '@protocol/channels';
import type { PageDispatcher } from './pageDispatcher';
import { Dispatcher } from './dispatcher';
import { ElementHandleDispatcher } from './elementHandlerDispatcher';

View file

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

View file

@ -15,7 +15,7 @@
*/
import { EventEmitter } from 'events';
import type * as channels from '../../protocol/channels';
import type * as channels from '@protocol/channels';
import { serializeError } from '../../protocol/serializers';
import { findValidator, ValidationError, createMetadataValidator, type ValidatorContext } from '../../protocol/validator';
import { assert, debugAssert, isUnderTest, monotonicTime } from '../../utils';

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 '@protocol/channels';
import { BrowserContextDispatcher } from './browserContextDispatcher';
import type { PageDispatcher } from './pageDispatcher';
import { parseArgument, serializeResult } from './jsHandleDispatcher';

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 '@protocol/channels';
import { existingDispatcher, lookupNullableDispatcher } 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 '@protocol/channels';
import { Dispatcher, lookupNullableDispatcher, 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 '@protocol/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 '@protocol/channels';
import { Dispatcher } from './dispatcher';
import { createGuid } from '../../utils';
import { serializeError } from '../../protocol/serializers';

View file

@ -17,14 +17,14 @@
import type EventEmitter from 'events';
import fs from 'fs';
import path from 'path';
import type * as channels from '../../protocol/channels';
import type * as channels from '@protocol/channels';
import { ManualPromise } from '../../utils/manualPromise';
import { assert, createGuid } from '../../utils';
import type { RootDispatcher } from './dispatcher';
import { Dispatcher } from './dispatcher';
import { yazl, yauzl } from '../../zipBundle';
import { ZipFile } from '../../utils/zipFile';
import type * as har from '../har/har';
import type * as har from '@trace/har';
import type { HeadersArray } from '../types';
export class LocalUtilsDispatcher extends Dispatcher<{ guid: string }, channels.LocalUtilsChannel, RootDispatcher> implements channels.LocalUtilsChannel {

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '../../protocol/channels';
import type * as channels from '@protocol/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 '@protocol/channels';
import { Dispatcher, existingDispatcher, lookupDispatcher, lookupNullableDispatcher } from './dispatcher';
import { parseError, serializeError } from '../../protocol/serializers';
import { ConsoleMessageDispatcher } from './consoleMessageDispatcher';

View file

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

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import type * as channels from '../../protocol/channels';
import type * as channels from '@protocol/channels';
import { ReuseController } from '../reuseController';
import type { DispatcherConnection, RootDispatcher } from './dispatcher';
import { Dispatcher } from './dispatcher';

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 '@protocol/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 '@protocol/channels';
import { Dispatcher } from './dispatcher';
import type * as stream from 'stream';
import { createGuid } from '../../utils';

View file

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

View file

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

View file

@ -16,7 +16,7 @@
import { mime } from '../utilsBundle';
import * as injectedScriptSource from '../generated/injectedScriptSource';
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/channels';
import { isSessionClosedError } from './protocolError';
import type { ScreenshotOptions } from './screenshotter';
import type * as frames from './frames';

View file

@ -40,7 +40,7 @@ import type * as childProcess from 'child_process';
import * as readline from 'readline';
import { RecentLogsCollector } from '../../common/debugLogger';
import { serverSideCallMetadata, SdkObject } from '../instrumentation';
import type * as channels from '../../protocol/channels';
import type * as channels from '@protocol/channels';
const ARTIFACTS_FOLDER = path.join(os.tmpdir(), 'playwright-artifacts-');

View file

@ -21,7 +21,7 @@ import { pipeline, Transform } from 'stream';
import url from 'url';
import zlib from 'zlib';
import type { HTTPCredentials } from '../../types/types';
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/channels';
import { TimeoutSettings } from '../common/timeoutSettings';
import { getUserAgent } from '../common/userAgent';
import { assert, createGuid, monotonicTime } 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 '@protocol/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

@ -24,7 +24,7 @@ import * as network from '../network';
import type { Page, PageBinding, 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 '@protocol/channels';
import { ConnectionEvents, FFConnection } 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 '@protocol/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 '@protocol/channels';
import type { ConsoleMessage } from './console';
import * as dom from './dom';
import { helper } from './helper';

View file

@ -18,9 +18,9 @@ import fs from 'fs';
import path from 'path';
import { Artifact } from '../artifact';
import type { BrowserContext } from '../browserContext';
import type * as har from './har';
import type * as har from '@trace/har';
import { HarTracer } from './harTracer';
import type * as channels from '../../protocol/channels';
import type * as channels from '@protocol/channels';
import { yazl } from '../../zipBundle';
import type { ZipFile } from '../../zipBundle';
import { ManualPromise } from '../../utils/manualPromise';

View file

@ -21,7 +21,7 @@ import { helper } from '../helper';
import * as network from '../network';
import type { Worker } from '../page';
import type { Page } from '../page';
import type * as har from './har';
import type * as har from '@trace/har';
import { assert, calculateSha1, monotonicTime } from '../../utils';
import type { RegisteredListener } from '../../utils/eventsHelper';
import { eventsHelper } from '../../utils/eventsHelper';

View file

@ -26,7 +26,7 @@ import { SelectorEvaluatorImpl } from './selectorEvaluator';
import { enclosingShadowRootOrDocument, isElementVisible, parentElementOrShadowHost } from './domUtils';
import type { CSSComplexSelectorList } from '../isomorphic/cssParser';
import { generateSelector } from './selectorGenerator';
import type * as channels from '../../protocol/channels';
import type * as channels from '@protocol/channels';
import { Highlight } from './highlight';
import { getAriaDisabled, getAriaRole, getElementAccessibleName } from './roleUtils';
import { kLayoutSelectorNames, type LayoutSelectorName, layoutSelectorScore } from './layoutSelectorUtils';

View file

@ -33,8 +33,8 @@ export type Attribution = {
frame?: Frame;
};
import type { CallMetadata } from '../protocol/callMetadata';
export type { CallMetadata } from '../protocol/callMetadata';
import type { CallMetadata } from '@protocol/callMetadata';
export type { CallMetadata } from '@protocol/callMetadata';
export const kTestSdkObjects = new WeakSet<SdkObject>();

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 '@protocol/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 * as network from './network';
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/channels';
import type { ScreenshotOptions } from './screenshotter';
import { Screenshotter, validateScreenshotOptions } from './screenshotter';
import { TimeoutSettings } from '../common/timeoutSettings';

View file

@ -16,7 +16,7 @@
import * as fs from 'fs';
import type * as actions from './recorder/recorderActions';
import type * as channels from '../protocol/channels';
import type * as channels from '@protocol/channels';
import type { ActionInContext } from './recorder/codeGenerator';
import { CodeGenerator } from './recorder/codeGenerator';
import { toClickOptions, toModifiers } from './recorder/utils';

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