Merge branch 'main' into ai-error-conversation

This commit is contained in:
Simon Knott 2025-02-13 11:58:16 +01:00
commit e6b81d85d8
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
188 changed files with 1339 additions and 1010 deletions

View file

@ -334,6 +334,8 @@ Whether to populate `'git.commit.info'` field of the [`property: TestConfig.meta
This information will appear in the HTML and JSON reports and is available in the Reporter API.
On Github Actions, this feature is enabled by default.
**Usage**
```js title="playwright.config.ts"

View file

@ -15,7 +15,7 @@
-->
<!DOCTYPE html>
<html>
<html style='scrollbar-gutter: stable both-edges;'>
<head>
<meta charset='UTF-8'>
<meta name='color-scheme' content='dark light'>

View file

@ -39,7 +39,7 @@
},
{
"name": "webkit",
"revision": "2132",
"revision": "2134",
"installByDefault": true,
"revisionOverrides": {
"debian11-x64": "2105",

View file

@ -167,6 +167,7 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
"license": "MIT",
"engines": {
"node": ">=0.1.90"
}

View file

@ -8,10 +8,15 @@
**
[inprocess.ts]
common/
utils/
server/utils
[outofprocess.ts]
client/
common/
protocol/
utils/
common/
utils/isomorphic
server/utils
common/

View file

@ -16,7 +16,7 @@
import { PlaywrightServer } from './remote/playwrightServer';
import { createPlaywright } from './server/playwright';
import { createGuid } from './utils';
import { createGuid } from './server/utils/crypto';
import { ws } from './utilsBundle';
import type { BrowserServer } from './client/browserType';

View file

@ -20,8 +20,8 @@ import { PlaywrightServer } from './remote/playwrightServer';
import { helper } from './server/helper';
import { serverSideCallMetadata } from './server/instrumentation';
import { createPlaywright } from './server/playwright';
import { createGuid } from './utils';
import { rewriteErrorMessage } from './utils/stackTrace';
import { createGuid } from './server/utils/crypto';
import { rewriteErrorMessage } from './utils/isomorphic/stackTrace';
import { ws } from './utilsBundle';
import type { BrowserServer, BrowserServerLauncher } from './client/browserType';

View file

@ -19,7 +19,7 @@
import * as fs from 'fs';
import * as playwright from '../..';
import { PipeTransport } from '../protocol/transport';
import { PipeTransport } from '../utils/pipeTransport';
import { PlaywrightServer } from '../remote/playwrightServer';
import { DispatcherConnection, PlaywrightDispatcher, RootDispatcher, createPlaywright } from '../server';
import { gracefullyProcessExitDoNotHang } from '../server/utils/processLauncher';

View file

@ -21,16 +21,16 @@ import { ChannelOwner } from './channelOwner';
import { TargetClosedError, isTargetClosedError } from './errors';
import { Events } from './events';
import { Waiter } from './waiter';
import { TimeoutSettings } from '../common/timeoutSettings';
import { isRegExp, isString } from '../utils/rtti';
import { monotonicTime } from '../utils/time';
import { raceAgainstDeadline } from '../utils/timeoutRunner';
import { TimeoutSettings } from '../utils/isomorphic/timeoutSettings';
import { isRegExp, isString } from '../utils/isomorphic/rtti';
import { monotonicTime } from '../utils/isomorphic/time';
import { raceAgainstDeadline } from '../utils/isomorphic/timeoutRunner';
import type { Page } from './page';
import type * as types from './types';
import type * as api from '../../types/types';
import type { AndroidServerLauncherImpl } from '../androidServerImpl';
import type { Platform } from '../utils/platform';
import type { Platform } from '../common/platform';
import type * as channels from '@protocol/channels';
type Direction = 'down' | 'up' | 'left' | 'right';

View file

@ -16,7 +16,7 @@
import { ChannelOwner } from './channelOwner';
import { Stream } from './stream';
import { mkdirIfNeeded } from '../utils/fileUtils';
import { mkdirIfNeeded } from '../common/fileUtils';
import type * as channels from '@protocol/channels';
import type { Readable } from 'stream';

View file

@ -20,7 +20,7 @@ import { CDPSession } from './cdpSession';
import { ChannelOwner } from './channelOwner';
import { isTargetClosedError } from './errors';
import { Events } from './events';
import { mkdirIfNeeded } from '../utils/fileUtils';
import { mkdirIfNeeded } from '../common/fileUtils';
import type { BrowserType } from './browserType';
import type { Page } from './page';

View file

@ -34,19 +34,19 @@ import { Tracing } from './tracing';
import { Waiter } from './waiter';
import { WebError } from './webError';
import { Worker } from './worker';
import { TimeoutSettings } from '../common/timeoutSettings';
import { mkdirIfNeeded } from '../utils/fileUtils';
import { headersObjectToArray } from '../utils/headers';
import { TimeoutSettings } from '../utils/isomorphic/timeoutSettings';
import { mkdirIfNeeded } from '../common/fileUtils';
import { headersObjectToArray } from '../utils/isomorphic/headers';
import { urlMatchesEqual } from '../utils/isomorphic/urlMatch';
import { isRegExp, isString } from '../utils/rtti';
import { rewriteErrorMessage } from '../utils/stackTrace';
import { isRegExp, isString } from '../utils/isomorphic/rtti';
import { rewriteErrorMessage } from '../utils/isomorphic/stackTrace';
import type { BrowserType } from './browserType';
import type { BrowserContextOptions, Headers, LaunchOptions, StorageState, WaitForEventOptions } from './types';
import type * as structs from '../../types/structs';
import type * as api from '../../types/types';
import type { URLMatch } from '../utils/isomorphic/urlMatch';
import type { Platform } from '../utils/platform';
import type { Platform } from '../common/platform';
import type * as channels from '@protocol/channels';
export class BrowserContext extends ChannelOwner<channels.BrowserContextChannel> implements api.BrowserContext {

View file

@ -21,10 +21,10 @@ import { BrowserContext, prepareBrowserContextParams } from './browserContext';
import { ChannelOwner } from './channelOwner';
import { envObjectToArray } from './clientHelper';
import { Events } from './events';
import { assert } from '../utils/debug';
import { headersObjectToArray } from '../utils/headers';
import { monotonicTime } from '../utils/time';
import { raceAgainstDeadline } from '../utils/timeoutRunner';
import { assert } from '../utils/isomorphic/debug';
import { headersObjectToArray } from '../utils/isomorphic/headers';
import { monotonicTime } from '../utils/isomorphic/time';
import { raceAgainstDeadline } from '../utils/isomorphic/timeoutRunner';
import type { Playwright } from './playwright';
import type { ConnectOptions, LaunchOptions, LaunchPersistentContextOptions, LaunchServerOptions, Logger } from './types';
@ -100,7 +100,7 @@ export class BrowserType extends ChannelOwner<channels.BrowserTypeChannel> imple
ignoreAllDefaultArgs: !!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs),
env: options.env ? envObjectToArray(options.env) : undefined,
channel: options.channel,
userDataDir: path.isAbsolute(userDataDir) ? userDataDir : path.resolve(userDataDir),
userDataDir: (path.isAbsolute(userDataDir) || !userDataDir) ? userDataDir : path.resolve(userDataDir),
};
return await this._wrapApiCall(async () => {
const result = await this._channel.launchPersistentContext(persistentParams);

View file

@ -16,16 +16,15 @@
import { EventEmitter } from './eventEmitter';
import { ValidationError, maybeFindValidator } from '../protocol/validator';
import { isUnderTest } from '../utils/debug';
import { debugLogger } from '../utils/debugLogger';
import { captureLibraryStackTrace, stringifyStackFrames } from '../utils/stackTrace';
import { isUnderTest } from '../utils/isomorphic/debug';
import { captureLibraryStackTrace, stringifyStackFrames } from '../utils/isomorphic/stackTrace';
import { zones } from '../utils/zones';
import type { ClientInstrumentation } from './clientInstrumentation';
import type { Connection } from './connection';
import type { Logger } from './types';
import type { ValidatorContext } from '../protocol/validator';
import type { Platform } from '../utils/platform';
import type { Platform } from '../common/platform';
import type * as channels from '@protocol/channels';
type Listener = (...args: any[]) => void;
@ -158,7 +157,7 @@ export abstract class ChannelOwner<T extends channels.Channel = channels.Channel
apiZone.params = params;
apiZone.reported = true;
this._instrumentation.onApiCallBegin(apiZone);
logApiCall(this._logger, `=> ${apiZone.apiName} started`);
logApiCall(this._platform, this._logger, `=> ${apiZone.apiName} started`);
return await this._connection.sendMessageToServer(this, prop, validatedParams, apiZone.apiName, apiZone.frames, apiZone.stepId);
}
// Since this api call is either internal, or has already been reported/traced once,
@ -183,13 +182,13 @@ export abstract class ChannelOwner<T extends channels.Channel = channels.Channel
if (isInternal === undefined)
isInternal = this._isInternalType;
const stackTrace = captureLibraryStackTrace();
const stackTrace = captureLibraryStackTrace(this._platform.pathSeparator);
const apiZone: ApiZone = { apiName: stackTrace.apiName, frames: stackTrace.frames, isInternal, reported: false, userData: undefined, stepId: undefined };
try {
const result = await zones.run('apiZone', apiZone, async () => await func(apiZone));
if (!isInternal) {
logApiCall(logger, `<= ${apiZone.apiName} succeeded`);
logApiCall(this._platform, logger, `<= ${apiZone.apiName} succeeded`);
this._instrumentation.onApiCallEnd(apiZone);
}
return result;
@ -204,7 +203,7 @@ export abstract class ChannelOwner<T extends channels.Channel = channels.Channel
e.stack = '';
if (!isInternal) {
apiZone.error = e;
logApiCall(logger, `<= ${apiZone.apiName} failed`);
logApiCall(this._platform, logger, `<= ${apiZone.apiName} failed`);
this._instrumentation.onApiCallEnd(apiZone);
}
throw e;
@ -227,10 +226,10 @@ export abstract class ChannelOwner<T extends channels.Channel = channels.Channel
}
}
function logApiCall(logger: Logger | undefined, message: string) {
function logApiCall(platform: Platform, logger: Logger | undefined, message: string) {
if (logger && logger.isEnabled('api', 'info'))
logger.log('api', 'info', message, [], { color: 'cyan' });
debugLogger.log('api', message);
platform.log('api', message);
}
function tChannelImplToWire(names: '*' | string[], arg: any, path: string, context: ValidatorContext) {

View file

@ -15,10 +15,10 @@
* limitations under the License.
*/
import { isString } from '../utils/rtti';
import { isString } from '../utils/isomorphic/rtti';
import type * as types from './types';
import type { Platform } from '../utils/platform';
import type { Platform } from '../common/platform';
export function envObjectToArray(env: types.Env): { name: string, value: string }[] {
const result: { name: string, value: string }[] = [];

View file

@ -42,14 +42,13 @@ import { Tracing } from './tracing';
import { Worker } from './worker';
import { WritableStream } from './writableStream';
import { ValidationError, findValidator } from '../protocol/validator';
import { debugLogger } from '../utils/debugLogger';
import { formatCallLog, rewriteErrorMessage } from '../utils/stackTrace';
import { formatCallLog, rewriteErrorMessage } from '../utils/isomorphic/stackTrace';
import { zones } from '../utils/zones';
import type { ClientInstrumentation } from './clientInstrumentation';
import type { HeadersArray } from './types';
import type { ValidatorContext } from '../protocol/validator';
import type { Platform } from '../utils/platform';
import type { Platform } from '../common/platform';
import type * as channels from '@protocol/channels';
class Root extends ChannelOwner<channels.RootChannel> {
@ -139,9 +138,9 @@ export class Connection extends EventEmitter {
const type = object._type;
const id = ++this._lastId;
const message = { id, guid, method, params };
if (debugLogger.isEnabled('channel')) {
if (this.platform.isLogEnabled('channel')) {
// Do not include metadata in debug logs to avoid noise.
debugLogger.log('channel', 'SEND> ' + JSON.stringify(message));
this.platform.log('channel', 'SEND> ' + JSON.stringify(message));
}
const location = frames[0] ? { file: frames[0].file, line: frames[0].line, column: frames[0].column } : undefined;
const metadata: channels.Metadata = { apiName, location, internal: !apiName, stepId };
@ -159,15 +158,15 @@ export class Connection extends EventEmitter {
const { id, guid, method, params, result, error, log } = message as any;
if (id) {
if (debugLogger.isEnabled('channel'))
debugLogger.log('channel', '<RECV ' + JSON.stringify(message));
if (this.platform.isLogEnabled('channel'))
this.platform.log('channel', '<RECV ' + JSON.stringify(message));
const callback = this._callbacks.get(id);
if (!callback)
throw new Error(`Cannot find command to respond: ${id}`);
this._callbacks.delete(id);
if (error && !result) {
const parsedError = parseError(error);
rewriteErrorMessage(parsedError, parsedError.message + formatCallLog(log));
rewriteErrorMessage(parsedError, parsedError.message + formatCallLog(this.platform, log));
callback.reject(parsedError);
} else {
const validator = findValidator(callback.type, callback.method, 'Result');
@ -176,8 +175,8 @@ export class Connection extends EventEmitter {
return;
}
if (debugLogger.isEnabled('channel'))
debugLogger.log('channel', '<EVENT ' + JSON.stringify(message));
if (this.platform.isLogEnabled('channel'))
this.platform.log('channel', '<EVENT ' + JSON.stringify(message));
if (method === '__create__') {
this._createRemoteObject(guid, params.type, params.guid, params.initializer);
return;

View file

@ -18,7 +18,7 @@ import { JSHandle } from './jsHandle';
import { Page } from './page';
import type * as api from '../../types/types';
import type { Platform } from '../utils/platform';
import type { Platform } from '../common/platform';
import type * as channels from '@protocol/channels';
type ConsoleMessageLocation = channels.BrowserContextConsoleEvent['location'];

View file

@ -22,7 +22,7 @@ import { TargetClosedError, isTargetClosedError } from './errors';
import { Events } from './events';
import { JSHandle, parseResult, serializeArgument } from './jsHandle';
import { Waiter } from './waiter';
import { TimeoutSettings } from '../common/timeoutSettings';
import { TimeoutSettings } from '../utils/isomorphic/timeoutSettings';
import type { Page } from './page';
import type { BrowserContextOptions, Env, Headers, WaitForEventOptions } from './types';

View file

@ -19,9 +19,9 @@ import { promisify } from 'util';
import { Frame } from './frame';
import { JSHandle, parseResult, serializeArgument } from './jsHandle';
import { assert } from '../utils/debug';
import { fileUploadSizeLimit, mkdirIfNeeded } from '../utils/fileUtils';
import { isString } from '../utils/rtti';
import { assert } from '../utils/isomorphic/debug';
import { fileUploadSizeLimit, mkdirIfNeeded } from '../common/fileUtils';
import { isString } from '../utils/isomorphic/rtti';
import { mime } from '../utilsBundle';
import { WritableStream } from './writableStream';
@ -31,7 +31,7 @@ import type { Locator } from './locator';
import type { FilePayload, Rect, SelectOption, SelectOptionOptions } from './types';
import type * as structs from '../../types/structs';
import type * as api from '../../types/types';
import type { Platform } from '../utils/platform';
import type { Platform } from '../common/platform';
import type * as channels from '@protocol/channels';
const pipelineAsync = promisify(pipeline);

View file

@ -15,7 +15,7 @@
*/
import { parseSerializedValue, serializeValue } from '../protocol/serializers';
import { isError } from '../utils/rtti';
import { isError } from '../utils/isomorphic/rtti';
import type { SerializedError } from '@protocol/channels';

View file

@ -24,7 +24,7 @@
import { EventEmitter as OriginalEventEmitter } from 'events';
import { isUnderTest } from '../utils/debug';
import { isUnderTest } from '../utils/isomorphic/debug';
import type { EventEmitter as EventEmitterType } from 'events';

View file

@ -19,17 +19,17 @@ import { ChannelOwner } from './channelOwner';
import { TargetClosedError, isTargetClosedError } from './errors';
import { RawHeaders } from './network';
import { Tracing } from './tracing';
import { assert } from '../utils/debug';
import { mkdirIfNeeded } from '../utils/fileUtils';
import { headersObjectToArray } from '../utils/headers';
import { isString } from '../utils/rtti';
import { assert } from '../utils/isomorphic/debug';
import { mkdirIfNeeded } from '../common/fileUtils';
import { headersObjectToArray } from '../utils/isomorphic/headers';
import { isString } from '../utils/isomorphic/rtti';
import type { Playwright } from './playwright';
import type { ClientCertificate, FilePayload, Headers, SetStorageState, StorageState } from './types';
import type { Serializable } from '../../types/structs';
import type * as api from '../../types/types';
import type { HeadersArray, NameValue } from '../common/types';
import type { Platform } from '../utils/platform';
import type { Platform } from '../common/platform';
import type * as channels from '@protocol/channels';
import type * as fs from 'fs';

View file

@ -26,7 +26,7 @@ import { FrameLocator, Locator, testIdAttributeName } from './locator';
import * as network from './network';
import { kLifecycleEvents } from './types';
import { Waiter } from './waiter';
import { assert } from '../utils/debug';
import { assert } from '../utils/isomorphic/debug';
import { getByAltTextSelector, getByLabelSelector, getByPlaceholderSelector, getByRoleSelector, getByTestIdSelector, getByTextSelector, getByTitleSelector } from '../utils/isomorphic/locatorUtils';
import { urlMatches } from '../utils/isomorphic/urlMatch';

View file

@ -14,8 +14,6 @@
* limitations under the License.
*/
import { debugLogger } from '../utils/debugLogger';
import type { BrowserContext } from './browserContext';
import type { LocalUtils } from './localUtils';
import type { Route } from './network';
@ -57,7 +55,7 @@ export class HarRouter {
});
if (response.action === 'redirect') {
debugLogger.log('api', `HAR: ${route.request().url()} redirected to ${response.redirectURL}`);
route._platform.log('api', `HAR: ${route.request().url()} redirected to ${response.redirectURL}`);
await route._redirectNavigationRequest(response.redirectURL!);
return;
}
@ -79,7 +77,7 @@ export class HarRouter {
}
if (response.action === 'error')
debugLogger.log('api', 'HAR: ' + response.message!);
route._platform.log('api', 'HAR: ' + response.message!);
// Report the error, but fall through to the default handler.
if (this._notFoundAction === 'abort') {

View file

@ -16,11 +16,11 @@
import { ChannelOwner } from './channelOwner';
import { Connection } from './connection';
import * as localUtils from '../utils/localUtils';
import * as localUtils from '../common/localUtils';
import type { HeadersArray, Size } from './types';
import type { HarBackend } from '../utils/harBackend';
import type { Platform } from '../utils/platform';
import type { HarBackend } from '../common/harBackend';
import type { Platform } from '../common/platform';
import type * as channels from '@protocol/channels';
type DeviceDescriptor = {
@ -51,7 +51,7 @@ export class LocalUtils extends ChannelOwner<channels.LocalUtilsChannel> {
}
async harOpen(params: channels.LocalUtilsHarOpenParams): Promise<channels.LocalUtilsHarOpenResult> {
return await localUtils.harOpen(this._harBackends, params);
return await localUtils.harOpen(this._platform, this._harBackends, params);
}
async harLookup(params: channels.LocalUtilsHarLookupParams): Promise<channels.LocalUtilsHarLookupResult> {

View file

@ -19,8 +19,8 @@ import { parseResult, serializeArgument } from './jsHandle';
import { asLocator } from '../utils/isomorphic/locatorGenerators';
import { getByAltTextSelector, getByLabelSelector, getByPlaceholderSelector, getByRoleSelector, getByTestIdSelector, getByTextSelector, getByTitleSelector } from '../utils/isomorphic/locatorUtils';
import { escapeForTextSelector } from '../utils/isomorphic/stringUtils';
import { isString } from '../utils/rtti';
import { monotonicTime } from '../utils/time';
import { isString } from '../utils/isomorphic/rtti';
import { monotonicTime } from '../utils/isomorphic/time';
import type { Frame } from './frame';
import type { FilePayload, FrameExpectParams, Rect, SelectOption, SelectOptionOptions, TimeoutOptions } from './types';

View file

@ -23,13 +23,13 @@ import { APIResponse } from './fetch';
import { Frame } from './frame';
import { Waiter } from './waiter';
import { Worker } from './worker';
import { assert } from '../utils/debug';
import { headersObjectToArray } from '../utils/headers';
import { assert } from '../utils/isomorphic/debug';
import { headersObjectToArray } from '../utils/isomorphic/headers';
import { urlMatches } from '../utils/isomorphic/urlMatch';
import { LongStandingScope, ManualPromise } from '../utils/manualPromise';
import { MultiMap } from '../utils/multimap';
import { isRegExp, isString } from '../utils/rtti';
import { rewriteErrorMessage } from '../utils/stackTrace';
import { LongStandingScope, ManualPromise } from '../utils/isomorphic/manualPromise';
import { MultiMap } from '../utils/isomorphic/multimap';
import { isRegExp, isString } from '../utils/isomorphic/rtti';
import { rewriteErrorMessage } from '../utils/isomorphic/stackTrace';
import { zones } from '../utils/zones';
import { mime } from '../utilsBundle';

View file

@ -33,14 +33,14 @@ import { Response, Route, RouteHandler, WebSocket, WebSocketRoute, WebSocketRou
import { Video } from './video';
import { Waiter } from './waiter';
import { Worker } from './worker';
import { TimeoutSettings } from '../common/timeoutSettings';
import { assert } from '../utils/debug';
import { mkdirIfNeeded } from '../utils/fileUtils';
import { headersObjectToArray } from '../utils/headers';
import { TimeoutSettings } from '../utils/isomorphic/timeoutSettings';
import { assert } from '../utils/isomorphic/debug';
import { mkdirIfNeeded } from '../common/fileUtils';
import { headersObjectToArray } from '../utils/isomorphic/headers';
import { trimStringWithEllipsis } from '../utils/isomorphic/stringUtils';
import { urlMatches, urlMatchesEqual } from '../utils/isomorphic/urlMatch';
import { LongStandingScope } from '../utils/manualPromise';
import { isObject, isRegExp, isString } from '../utils/rtti';
import { LongStandingScope } from '../utils/isomorphic/manualPromise';
import { isObject, isRegExp, isString } from '../utils/isomorphic/rtti';
import type { BrowserContext } from './browserContext';
import type { Clock } from './clock';

View file

@ -17,19 +17,25 @@
import { ChannelOwner } from './channelOwner';
import { evaluationScript } from './clientHelper';
import { setTestIdAttribute, testIdAttributeName } from './locator';
import { nodePlatform } from '../utils/platform';
import { emptyPlatform } from '../common/platform';
import type { SelectorEngine } from './types';
import type * as api from '../../types/types';
import type * as channels from '@protocol/channels';
import type { Platform } from '../common/platform';
let platform = emptyPlatform;
export function setPlatformForSelectors(p: Platform) {
platform = p;
}
export class Selectors implements api.Selectors {
private _channels = new Set<SelectorsOwner>();
private _registrations: channels.SelectorsRegisterParams[] = [];
async register(name: string, script: string | (() => SelectorEngine) | { path?: string, content?: string }, options: { contentScript?: boolean } = {}): Promise<void> {
const source = await evaluationScript(nodePlatform, script, undefined, false);
const source = await evaluationScript(platform, script, undefined, false);
const params = { ...options, name, source };
for (const channel of this._channels)
await channel._channel.register(params);

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { ManualPromise } from '../utils/manualPromise';
import { ManualPromise } from '../utils/isomorphic/manualPromise';
import type { Artifact } from './artifact';
import type { Connection } from './connection';

View file

@ -15,8 +15,7 @@
*/
import { TimeoutError } from './errors';
import { createGuid } from '../utils/crypto';
import { rewriteErrorMessage } from '../utils/stackTrace';
import { rewriteErrorMessage } from '../utils/isomorphic/stackTrace';
import { zones } from '../utils/zones';
import type { ChannelOwner } from './channelOwner';
@ -35,7 +34,7 @@ export class Waiter {
private _savedZone: Zone;
constructor(channelOwner: ChannelOwner<channels.EventTargetChannel>, event: string) {
this._waitId = createGuid();
this._waitId = channelOwner._platform.createGuid();
this._channelOwner = channelOwner;
this._savedZone = zones.current().without('apiZone');

View file

@ -18,7 +18,7 @@ import { ChannelOwner } from './channelOwner';
import { TargetClosedError } from './errors';
import { Events } from './events';
import { JSHandle, assertMaxArguments, parseResult, serializeArgument } from './jsHandle';
import { LongStandingScope } from '../utils/manualPromise';
import { LongStandingScope } from '../utils/isomorphic/manualPromise';
import type { BrowserContext } from './browserContext';
import type { Page } from './page';

View file

@ -1,4 +1,5 @@
[*]
../utils/
../utils/isomorphic/
../utilsBundle.ts
../zipBundle.ts

View file

@ -14,24 +14,24 @@
* limitations under the License.
*/
import * as fs from 'fs';
import * as path from 'path';
import { ZipFile } from '../utils/zipFile';
import { createGuid } from './crypto';
import { ZipFile } from './zipFile';
import type { HeadersArray } from '../common/types';
import type { HeadersArray } from './types';
import type * as har from '@trace/har';
import type { Platform } from './platform';
const redirectStatus = [301, 302, 303, 307, 308];
export class HarBackend {
readonly id = createGuid();
readonly id: string;
private _harFile: har.HARFile;
private _zipFile: ZipFile | null;
private _baseDir: string | null;
private _platform: Platform;
constructor(harFile: har.HARFile, baseDir: string | null, zipFile: ZipFile | null) {
constructor(platform: Platform, harFile: har.HARFile, baseDir: string | null, zipFile: ZipFile | null) {
this._platform = platform;
this.id = platform.createGuid();
this._harFile = harFile;
this._baseDir = baseDir;
this._zipFile = zipFile;
@ -79,7 +79,7 @@ export class HarBackend {
if (this._zipFile)
buffer = await this._zipFile.read(file);
else
buffer = await fs.promises.readFile(path.resolve(this._baseDir!, file));
buffer = await this._platform.fs().promises.readFile(this._platform.path().resolve(this._baseDir!, file));
} else {
buffer = Buffer.from(content.text || '', content.encoding === 'base64' ? 'base64' : 'utf-8');
}

View file

@ -20,11 +20,11 @@ import * as path from 'path';
import { removeFolders } from './fileUtils';
import { HarBackend } from './harBackend';
import { ManualPromise } from './manualPromise';
import { ZipFile } from './zipFile';
import { ManualPromise } from '../utils/isomorphic/manualPromise';
import { ZipFile } from '../utils/zipFile';
import { yauzl, yazl } from '../zipBundle';
import { serializeClientSideCallMetadata } from '../utils';
import { assert, calculateSha1 } from '../utils';
import { serializeClientSideCallMetadata } from '../utils/isomorphic/traceUtils';
import { assert } from '../utils/isomorphic/debug';
import type { Platform } from './platform';
import type * as channels from '@protocol/channels';
@ -77,7 +77,7 @@ export async function zip(platform: Platform, stackSessions: Map<string, StackSe
sourceFiles.add(file);
}
for (const sourceFile of sourceFiles)
addFile(sourceFile, 'resources/src@' + calculateSha1(sourceFile) + '.txt');
addFile(sourceFile, 'resources/src@' + await platform.calculateSha1(sourceFile) + '.txt');
}
if (params.mode === 'write') {
@ -137,7 +137,7 @@ async function deleteStackSession(platform: Platform, stackSessions: Map<string,
stackSessions.delete(stacksId!);
}
export async function harOpen(harBackends: Map<string, HarBackend>, params: channels.LocalUtilsHarOpenParams): Promise<channels.LocalUtilsHarOpenResult> {
export async function harOpen(platform: Platform, harBackends: Map<string, HarBackend>, params: channels.LocalUtilsHarOpenParams): Promise<channels.LocalUtilsHarOpenResult> {
let harBackend: HarBackend;
if (params.file.endsWith('.zip')) {
const zipFile = new ZipFile(params.file);
@ -147,10 +147,10 @@ export async function harOpen(harBackends: Map<string, HarBackend>, params: chan
return { error: 'Specified archive does not have a .har file' };
const har = await zipFile.read(harEntryName);
const harFile = JSON.parse(har.toString()) as har.HARFile;
harBackend = new HarBackend(harFile, null, zipFile);
harBackend = new HarBackend(platform, harFile, null, zipFile);
} else {
const harFile = JSON.parse(await fs.promises.readFile(params.file, 'utf-8')) as har.HARFile;
harBackend = new HarBackend(harFile, path.dirname(params.file), null);
harBackend = new HarBackend(platform, harFile, path.dirname(params.file), null);
}
harBackends.set(harBackend.id, harBackend);
return { harId: harBackend.id };

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 * as crypto from 'crypto';
import * as fs from 'fs';
import * as path from 'path';
import { webColors, noColors } from '../utils/isomorphic/colors';
import type { Colors } from '../utils/isomorphic/colors';
export type Platform = {
calculateSha1(text: string): Promise<string>;
colors: Colors;
createGuid: () => string;
fs: () => typeof fs;
inspectCustom: symbol | undefined;
isLogEnabled(name: 'api' | 'channel'): boolean;
log(name: 'api' | 'channel', message: string | Error | object): void;
path: () => typeof path;
pathSeparator: string;
ws?: (url: string) => WebSocket;
};
export const webPlatform: Platform = {
calculateSha1: async (text: string) => {
const bytes = new TextEncoder().encode(text);
const hashBuffer = await crypto.subtle.digest('SHA-1', bytes);
return Array.from(new Uint8Array(hashBuffer), b => b.toString(16).padStart(2, '0')).join('');
},
colors: webColors,
createGuid: () => {
return Array.from(crypto.getRandomValues(new Uint8Array(16)), b => b.toString(16).padStart(2, '0')).join('');
},
fs: () => {
throw new Error('File system is not available');
},
inspectCustom: undefined,
isLogEnabled(name: 'api' | 'channel') {
return false;
},
log(name: 'api' | 'channel', message: string | Error | object) {},
path: () => {
throw new Error('Path module is not available');
},
pathSeparator: '/',
ws: (url: string) => new WebSocket(url),
};
export const emptyPlatform: Platform = {
calculateSha1: async () => {
throw new Error('Not implemented');
},
colors: noColors,
createGuid: () => {
throw new Error('Not implemented');
},
fs: () => {
throw new Error('Not implemented');
},
inspectCustom: undefined,
isLogEnabled(name: 'api' | 'channel') {
return false;
},
log(name: 'api' | 'channel', message: string | Error | object) { },
path: () => {
throw new Error('Function not implemented.');
},
pathSeparator: '/'
};

View file

@ -14,17 +14,29 @@
* limitations under the License.
*/
import path from 'path';
import { AndroidServerLauncherImpl } from './androidServerImpl';
import { BrowserServerLauncherImpl } from './browserServerImpl';
import { Connection } from './client/connection';
import { DispatcherConnection, PlaywrightDispatcher, RootDispatcher, createPlaywright } from './server';
import { setLibraryStackPrefix } from './utils/isomorphic/stackTrace';
import { setDebugMode } from './utils/isomorphic/debug';
import { getFromENV } from './server/utils/env';
import { nodePlatform } from './server/utils/nodePlatform';
import { setPlatformForSelectors } from './client/selectors';
import type { Playwright as PlaywrightAPI } from './client/playwright';
import type { Language } from './utils';
import type { Platform } from './utils/platform';
import type { Platform } from './common/platform';
export function createInProcessPlaywright(platform: Platform): PlaywrightAPI {
const playwright = createPlaywright({ sdkLanguage: (process.env.PW_LANG_NAME as Language | undefined) || 'javascript' });
setDebugMode(getFromENV('PWDEBUG') || '');
setPlatformForSelectors(nodePlatform);
setLibraryStackPrefix(path.join(__dirname, '..'));
const clientConnection = new Connection(undefined, platform, undefined, []);
clientConnection.useRawBuffers();

View file

@ -15,6 +15,6 @@
*/
import { createInProcessPlaywright } from './inProcessFactory';
import { nodePlatform } from './utils/platform';
import { nodePlatform } from './server/utils/nodePlatform';
module.exports = createInProcessPlaywright(nodePlatform);

View file

@ -18,9 +18,9 @@ import * as childProcess from 'child_process';
import * as path from 'path';
import { Connection } from './client/connection';
import { PipeTransport } from './protocol/transport';
import { ManualPromise } from './utils/manualPromise';
import { nodePlatform } from './utils/platform';
import { PipeTransport } from './utils/pipeTransport';
import { ManualPromise } from './utils/isomorphic/manualPromise';
import { nodePlatform } from './server/utils/nodePlatform';
import type { Playwright } from './client/playwright';

View file

@ -6,4 +6,5 @@
../server/dispatchers/
../server/utils/
../utils/
../utils/isomorphic
../utilsBundle.ts

View file

@ -23,7 +23,7 @@ import { serverSideCallMetadata } from '../server/instrumentation';
import { assert, isUnderTest } from '../utils';
import { startProfiling, stopProfiling } from '../server/utils/profiler';
import { monotonicTime } from '../utils';
import { debugLogger } from '../utils/debugLogger';
import { debugLogger } from '../server/utils/debugLogger';
import type { DispatcherScope, Playwright } from '../server';
import type { LaunchOptions } from '../server/types';

View file

@ -16,11 +16,11 @@
import { PlaywrightConnection } from './playwrightConnection';
import { createPlaywright } from '../server/playwright';
import { debugLogger } from '../utils/debugLogger';
import { Semaphore } from '../utils/semaphore';
import { debugLogger } from '../server/utils/debugLogger';
import { Semaphore } from '../utils/isomorphic/semaphore';
import { WSServer } from '../server/utils/wsServer';
import { wrapInASCIIBox } from '../server/utils/ascii';
import { getPlaywrightVersion } from '../utils/userAgent';
import { getPlaywrightVersion } from '../server/utils/userAgent';
import type { ClientType } from './playwrightConnection';
import type { SocksProxy } from '../server/utils/socksProxy';

View file

@ -3,6 +3,7 @@
../../common/
../../protocol/
../../utils/
../../utils/isomorphic/
../../utilsBundle.ts
../chromium/
../utils

View file

@ -19,10 +19,13 @@ import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import { TimeoutSettings } from '../../common/timeoutSettings';
import { PipeTransport } from '../../protocol/transport';
import { createGuid, getPackageManagerExecCommand, isUnderTest, makeWaitForNextTask } from '../../utils';
import { RecentLogsCollector } from '../../utils/debugLogger';
import { TimeoutSettings } from '../../utils/isomorphic/timeoutSettings';
import { PipeTransport } from '../../utils/pipeTransport';
import { createGuid } from '../utils/crypto';
import { isUnderTest } from '../../utils/isomorphic/debug';
import { getPackageManagerExecCommand } from '../utils/env';
import { makeWaitForNextTask } from '../../utils/task';
import { RecentLogsCollector } from '../utils/debugLogger';
import { debug } from '../../utilsBundle';
import { wsReceiver, wsSender } from '../../utilsBundle';
import { validateBrowserContextOptions } from '../browserContext';

View file

@ -17,7 +17,8 @@
import { EventEmitter } from 'events';
import * as net from 'net';
import { assert, createGuid } from '../../utils';
import { assert } from '../../utils/isomorphic/debug';
import { createGuid } from '../utils/crypto';
import { debug } from '../../utilsBundle';
import type { Backend, DeviceBackend, SocketBackend } from './android';

View file

@ -19,7 +19,7 @@ import * as fs from 'fs';
import { assert } from '../utils';
import { TargetClosedError } from './errors';
import { SdkObject } from './instrumentation';
import { ManualPromise } from '../utils/manualPromise';
import { ManualPromise } from '../utils/isomorphic/manualPromise';
type SaveCallback = (localPath: string, error?: Error) => Promise<void>;
type CancelCallback = () => Promise<void>;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { eventsHelper } from '../../utils/eventsHelper';
import { eventsHelper } from '../utils/eventsHelper';
import { Browser } from '../browser';
import { BrowserContext, assertBrowserContextIsNotOwned } from '../browserContext';
import * as network from '../network';
@ -23,7 +23,7 @@ import { bidiBytesValueToString } from './bidiNetworkManager';
import { BidiPage } from './bidiPage';
import * as bidi from './third_party/bidiProtocol';
import type { RegisteredListener } from '../../utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type { BrowserOptions } from '../browser';
import type { SdkObject } from '../instrumentation';
import type { InitScript, Page } from '../page';

View file

@ -16,11 +16,11 @@
import { EventEmitter } from 'events';
import { debugLogger } from '../../utils/debugLogger';
import { debugLogger } from '../utils/debugLogger';
import { helper } from '../helper';
import { ProtocolError } from '../protocolError';
import type { RecentLogsCollector } from '../../utils/debugLogger';
import type { RecentLogsCollector } from '../utils/debugLogger';
import type { ConnectionTransport, ProtocolRequest, ProtocolResponse } from '../transport';
import type { ProtocolLogger } from '../types';
import type * as bidiCommands from './third_party/bidiCommands';

View file

@ -16,6 +16,7 @@
import { parseEvaluationResultValue } from '../isomorphic/utilityScriptSerializers';
import * as js from '../javascript';
import * as dom from '../dom';
import { BidiDeserializer } from './third_party/bidiDeserializer';
import * as bidi from './third_party/bidiProtocol';
import { BidiSerializer } from './third_party/bidiSerializer';
@ -137,7 +138,45 @@ export class BidiExecutionContext implements js.ExecutionContextDelegate {
});
}
async rawCallFunction(functionDeclaration: string, arg: bidi.Script.LocalValue): Promise<bidi.Script.RemoteValue> {
async nodeIdForElementHandle(handle: dom.ElementHandle): Promise<bidi.Script.SharedReference> {
const shared = await this._remoteValueForReference({ handle: handle._objectId });
// TODO: store sharedId in the handle.
if (!('sharedId' in shared))
throw new Error('Element is not a node');
return {
sharedId: shared.sharedId!,
};
}
async remoteObjectForNodeId(nodeId: bidi.Script.SharedReference): Promise<js.RemoteObject> {
const result = await this._remoteValueForReference(nodeId);
if ('handle' in result)
return { objectId: result.handle!, ...result };
throw new Error('Can\'t get remote object for nodeId');
}
async contentFrameIdForFrame(handle: dom.ElementHandle) {
const contentWindow = await this._rawCallFunction('e => e.contentWindow', { handle: handle._objectId });
if (contentWindow?.type === 'window')
return contentWindow.value.context;
return null;
}
async frameIdForWindowHandle(handle: js.JSHandle): Promise<string | null> {
if (!handle._objectId)
throw new Error('JSHandle is not a DOM node handle');
const contentWindow = await this._remoteValueForReference({ handle: handle._objectId });
if (contentWindow.type === 'window')
return contentWindow.value.context;
return null;
}
private async _remoteValueForReference(reference: bidi.Script.RemoteReference) {
return await this._rawCallFunction('e => e', reference);
}
private async _rawCallFunction(functionDeclaration: string, arg: bidi.Script.LocalValue): Promise<bidi.Script.RemoteValue> {
const response = await this._session.send('script.callFunction', {
functionDeclaration,
target: this._target,

View file

@ -79,6 +79,9 @@ export class RawMouseImpl implements input.RawMouse {
}
async move(x: number, y: number, button: types.MouseButton | 'none', buttons: Set<types.MouseButton>, modifiers: Set<types.KeyboardModifier>, forClick: boolean): Promise<void> {
// Bidi throws when x/y are not integers.
x = Math.floor(x);
y = Math.floor(y);
await this._performActions([{ type: 'pointerMove', x, y }]);
}
@ -91,6 +94,9 @@ export class RawMouseImpl implements input.RawMouse {
}
async wheel(x: number, y: number, buttons: Set<types.MouseButton>, modifiers: Set<types.KeyboardModifier>, deltaX: number, deltaY: number): Promise<void> {
// Bidi throws when x/y are not integers.
x = Math.floor(x);
y = Math.floor(y);
await this._session.send('input.performActions', {
context: this._session.sessionId,
actions: [

View file

@ -14,12 +14,12 @@
* limitations under the License.
*/
import { eventsHelper } from '../../utils/eventsHelper';
import { eventsHelper } from '../utils/eventsHelper';
import { parseRawCookie } from '../cookieStore';
import * as network from '../network';
import * as bidi from './third_party/bidiProtocol';
import type { RegisteredListener } from '../../utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type * as frames from '../frames';
import type { Page } from '../page';
import type * as types from '../types';

View file

@ -17,7 +17,7 @@
import * as bidiMapper from 'chromium-bidi/lib/cjs/bidiMapper/BidiMapper';
import * as bidiCdpConnection from 'chromium-bidi/lib/cjs/cdp/CdpConnection';
import { debugLogger } from '../../utils/debugLogger';
import { debugLogger } from '../utils/debugLogger';
import type { ConnectionTransport, ProtocolRequest, ProtocolResponse } from '../transport';
import type { ChromiumBidi } from 'chromium-bidi/lib/cjs/protocol/protocol';

View file

@ -15,7 +15,7 @@
*/
import { assert } from '../../utils';
import { eventsHelper } from '../../utils/eventsHelper';
import { eventsHelper } from '../utils/eventsHelper';
import { BrowserContext } from '../browserContext';
import * as dialog from '../dialog';
import * as dom from '../dom';
@ -26,7 +26,7 @@ import { BidiNetworkManager } from './bidiNetworkManager';
import { BidiPDF } from './bidiPdf';
import * as bidi from './third_party/bidiProtocol';
import type { RegisteredListener } from '../../utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type * as accessibility from '../accessibility';
import type * as frames from '../frames';
import type { InitScript, PageDelegate } from '../page';
@ -413,17 +413,22 @@ export class BidiPage implements PageDelegate {
async getContentFrame(handle: dom.ElementHandle): Promise<frames.Frame | null> {
const executionContext = toBidiExecutionContext(handle._context);
const contentWindow = await executionContext.rawCallFunction('e => e.contentWindow', { handle: handle._objectId });
if (contentWindow.type === 'window') {
const frameId = contentWindow.value.context;
const result = this._page._frameManager.frame(frameId);
return result;
}
return null;
const frameId = await executionContext.contentFrameIdForFrame(handle);
if (!frameId)
return null;
return this._page._frameManager.frame(frameId);
}
async getOwnerFrame(handle: dom.ElementHandle): Promise<string | null> {
throw new Error('Method not implemented.');
// TODO: switch to utility world?
const windowHandle = await handle.evaluateHandle(node => {
const doc = node.ownerDocument ?? node as Document;
return doc.defaultView;
});
if (!windowHandle)
return null;
const executionContext = toBidiExecutionContext(handle._context);
return executionContext.frameIdForWindowHandle(windowHandle);
}
isElementHandle(remoteObject: bidi.Script.RemoteValue): boolean {
@ -515,24 +520,25 @@ export class BidiPage implements PageDelegate {
}
async setInputFiles(handle: dom.ElementHandle<HTMLInputElement>, files: types.FilePayload[]): Promise<void> {
throw new Error('Method not implemented.');
throw new Error('Setting FilePayloads is not supported in Bidi.');
}
async setInputFilePaths(handle: dom.ElementHandle<HTMLInputElement>, paths: string[]): Promise<void> {
throw new Error('Method not implemented.');
const fromContext = toBidiExecutionContext(handle._context);
await this._session.send('input.setFiles', {
context: this._session.sessionId,
element: await fromContext.nodeIdForElementHandle(handle),
files: paths,
});
}
async adoptElementHandle<T extends Node>(handle: dom.ElementHandle<T>, to: dom.FrameExecutionContext): Promise<dom.ElementHandle<T>> {
const fromContext = toBidiExecutionContext(handle._context);
const shared = await fromContext.rawCallFunction('x => x', { handle: handle._objectId });
// TODO: store sharedId in the handle.
if (!('sharedId' in shared))
throw new Error('Element is not a node');
const sharedId = shared.sharedId!;
const nodeId = await fromContext.nodeIdForElementHandle(handle);
const executionContext = toBidiExecutionContext(to);
const result = await executionContext.rawCallFunction('x => x', { sharedId });
if ('handle' in result)
return to.createHandle({ objectId: result.handle!, ...result }) as dom.ElementHandle<T>;
const objectId = await executionContext.remoteObjectForNodeId(nodeId);
if (objectId)
return to.createHandle(objectId) as dom.ElementHandle<T>;
throw new Error('Failed to adopt element handle.');
}

View file

@ -24,7 +24,7 @@ import { ClientCertificatesProxy } from './socksClientCertificatesInterceptor';
import type { CallMetadata } from './instrumentation';
import type * as types from './types';
import type { ProxySettings } from './types';
import type { RecentLogsCollector } from '../utils/debugLogger';
import type { RecentLogsCollector } from './utils/debugLogger';
import type * as channels from '@protocol/channels';
import type { ChildProcess } from 'child_process';

View file

@ -18,8 +18,9 @@
import * as fs from 'fs';
import * as path from 'path';
import { TimeoutSettings } from '../common/timeoutSettings';
import { createGuid, debugMode } from '../utils';
import { TimeoutSettings } from '../utils/isomorphic/timeoutSettings';
import { createGuid } from './utils/crypto';
import { debugMode } from '../utils/isomorphic/debug';
import { Clock } from './clock';
import { Debugger } from './debugger';
import { BrowserContextAPIRequestContext } from './fetch';

View file

@ -19,7 +19,7 @@ import * as os from 'os';
import * as path from 'path';
import { normalizeProxySettings, validateBrowserContextOptions } from './browserContext';
import { DEFAULT_TIMEOUT, TimeoutSettings } from '../common/timeoutSettings';
import { DEFAULT_TIMEOUT, TimeoutSettings } from '../utils/isomorphic/timeoutSettings';
import { ManualPromise, assert, debugMode } from '../utils';
import { existsAsync } from './utils/fileUtils';
import { helper } from './helper';
@ -31,7 +31,7 @@ import { isProtocolError } from './protocolError';
import { registry } from './registry';
import { ClientCertificatesProxy } from './socksClientCertificatesInterceptor';
import { WebSocketTransport } from './transport';
import { RecentLogsCollector } from '../utils/debugLogger';
import { RecentLogsCollector } from './utils/debugLogger';
import type { Browser, BrowserOptions, BrowserProcess } from './browser';
import type { BrowserContext } from './browserContext';

View file

@ -22,13 +22,13 @@ import * as path from 'path';
import { chromiumSwitches } from './chromiumSwitches';
import { CRBrowser } from './crBrowser';
import { kBrowserCloseMessageId } from './crConnection';
import { TimeoutSettings } from '../../common/timeoutSettings';
import { TimeoutSettings } from '../../utils/isomorphic/timeoutSettings';
import { debugMode, headersArrayToObject, headersObjectToArray, } from '../../utils';
import { wrapInASCIIBox } from '../utils/ascii';
import { RecentLogsCollector } from '../../utils/debugLogger';
import { ManualPromise } from '../../utils/manualPromise';
import { RecentLogsCollector } from '../utils/debugLogger';
import { ManualPromise } from '../../utils/isomorphic/manualPromise';
import { fetchData } from '../utils/network';
import { getUserAgent } from '../../utils/userAgent';
import { getUserAgent } from '../utils/userAgent';
import { validateBrowserContextOptions } from '../browserContext';
import { BrowserType, kNoXServerRunningError } from '../browserType';
import { BrowserReadyState } from '../browserType';

View file

@ -37,11 +37,10 @@ export const chromiumSwitches = [
// PaintHolding - https://github.com/microsoft/playwright/issues/28023
// ThirdPartyStoragePartitioning - https://github.com/microsoft/playwright/issues/32230
// LensOverlay - Hides the Lens feature in the URL address bar. Its not working in unofficial builds.
// PlzDedicatedWorker - https://github.com/microsoft/playwright/issues/31747
// DeferRendererTasksAfterInput - this makes Page.frameScheduledNavigation arrive much later after a click,
// making our navigation auto-wait after click not working. Can be removed once we deperecate noWaitAfter.
// See https://github.com/microsoft/playwright/pull/34372.
'--disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding,ThirdPartyStoragePartitioning,LensOverlay,PlzDedicatedWorker,DeferRendererTasksAfterInput',
'--disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding,ThirdPartyStoragePartitioning,LensOverlay,DeferRendererTasksAfterInput',
'--allow-pre-commit-input',
'--disable-hang-monitor',
'--disable-ipc-flooding-protection',

View file

@ -17,7 +17,8 @@
import * as path from 'path';
import { assert, createGuid } from '../../utils';
import { assert } from '../../utils/isomorphic/debug';
import { createGuid } from '../utils/crypto';
import { Artifact } from '../artifact';
import { Browser } from '../browser';
import { BrowserContext, assertBrowserContextIsNotOwned, verifyGeolocation } from '../browserContext';

View file

@ -18,14 +18,14 @@
import { EventEmitter } from 'events';
import { assert, eventsHelper } from '../../utils';
import { debugLogger } from '../../utils/debugLogger';
import { debugLogger } from '../utils/debugLogger';
import { helper } from '../helper';
import { ProtocolError } from '../protocolError';
import type { RegisteredListener } from '../../utils';
import type { ConnectionTransport, ProtocolRequest, ProtocolResponse } from '../transport';
import type { Protocol } from './protocol';
import type { RecentLogsCollector } from '../../utils/debugLogger';
import type { RecentLogsCollector } from '../utils/debugLogger';
import type { ProtocolLogger } from '../types';

View file

@ -16,11 +16,11 @@
*/
import { assert } from '../../utils';
import { eventsHelper } from '../../utils/eventsHelper';
import { eventsHelper } from '../utils/eventsHelper';
import type { CRSession } from './crConnection';
import type { Protocol } from './protocol';
import type { RegisteredListener } from '../../utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type * as channels from '@protocol/channels';

View file

@ -16,7 +16,7 @@
*/
import { getExceptionMessage, releaseObject } from './crProtocolHelper';
import { rewriteErrorMessage } from '../../utils/stackTrace';
import { rewriteErrorMessage } from '../../utils/isomorphic/stackTrace';
import { parseEvaluationResultValue } from '../isomorphic/utilityScriptSerializers';
import * as js from '../javascript';
import { isSessionClosedError } from '../protocolError';

View file

@ -16,14 +16,14 @@
*/
import { assert, headersArrayToObject, headersObjectToArray } from '../../utils';
import { eventsHelper } from '../../utils/eventsHelper';
import { eventsHelper } from '../utils/eventsHelper';
import { helper } from '../helper';
import * as network from '../network';
import { isProtocolError, isSessionClosedError } from '../protocolError';
import type { CRSession } from './crConnection';
import type { Protocol } from './protocol';
import type { RegisteredListener } from '../../utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type * as contexts from '../browserContext';
import type * as frames from '../frames';
import type { Page } from '../page';

View file

@ -17,9 +17,10 @@
import * as path from 'path';
import { assert, createGuid } from '../../utils';
import { eventsHelper } from '../../utils/eventsHelper';
import { rewriteErrorMessage } from '../../utils/stackTrace';
import { assert } from '../../utils/isomorphic/debug';
import { createGuid } from '../utils/crypto';
import { eventsHelper } from '../utils/eventsHelper';
import { rewriteErrorMessage } from '../../utils/isomorphic/stackTrace';
import * as dialog from '../dialog';
import * as dom from '../dom';
import * as frames from '../frames';
@ -45,7 +46,7 @@ import { isSessionClosedError } from '../protocolError';
import type { CRSession } from './crConnection';
import type { Protocol } from './protocol';
import type { RegisteredListener } from '../../utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type { InitScript, PageDelegate } from '../page';
import type { Progress } from '../progress';
import type * as types from '../types';

View file

@ -17,7 +17,7 @@
import * as fs from 'fs';
import { splitErrorMessage } from '../../utils/stackTrace';
import { splitErrorMessage } from '../../utils/isomorphic/stackTrace';
import { mkdirIfNeeded } from '../utils/fileUtils';
import type { CRSession } from './crConnection';

View file

@ -31,7 +31,8 @@ import { Recorder } from '../recorder';
import { TracingDispatcher } from './tracingDispatcher';
import { WebSocketRouteDispatcher } from './webSocketRouteDispatcher';
import { WritableStreamDispatcher } from './writableStreamDispatcher';
import { createGuid, urlMatches } from '../../utils';
import { createGuid } from '../utils/crypto';
import { urlMatches } from '../../utils/isomorphic/urlMatch';
import { RecorderApp } from '../recorder/recorderApp';
import type { Artifact } from '../artifact';

View file

@ -19,7 +19,7 @@ import { DebugController } from '../debugController';
import { Dispatcher } from './dispatcher';
import type { DispatcherConnection, RootDispatcher } from './dispatcher';
import type { RegisteredListener } from '../../utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type * as channels from '@protocol/channels';

View file

@ -16,7 +16,7 @@
import { EventEmitter } from 'events';
import { eventsHelper } from '../..//utils/eventsHelper';
import { eventsHelper } from '../utils/eventsHelper';
import { ValidationError, createMetadataValidator, findValidator } from '../../protocol/validator';
import { LongStandingScope, assert, compressCallLog, isUnderTest, monotonicTime, rewriteErrorMessage } from '../../utils';
import { TargetClosedError, isTargetClosedError, serializeError } from '../errors';
@ -25,7 +25,7 @@ import { isProtocolError } from '../protocolError';
import type { CallMetadata } from '../instrumentation';
import type { PlaywrightDispatcher } from './playwrightDispatcher';
import type { RegisteredListener } from '../..//utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type { ValidatorContext } from '../../protocol/validator';
import type * as channels from '@protocol/channels';

View file

@ -15,7 +15,7 @@
*/
import { Dispatcher } from './dispatcher';
import { createGuid } from '../../utils';
import { createGuid } from '../utils/crypto';
import type { LocalUtilsDispatcher } from './localUtilsDispatcher';
import type * as channels from '@protocol/channels';

View file

@ -16,9 +16,9 @@
import { Dispatcher } from './dispatcher';
import { SdkObject } from '../../server/instrumentation';
import * as localUtils from '../../utils/localUtils';
import { nodePlatform } from '../../utils/platform';
import { getUserAgent } from '../../utils/userAgent';
import * as localUtils from '../../common/localUtils';
import { nodePlatform } from '../utils/nodePlatform';
import { getUserAgent } from '../utils/userAgent';
import { deviceDescriptors as descriptors } from '../deviceDescriptors';
import { JsonPipeDispatcher } from '../dispatchers/jsonPipeDispatcher';
import { Progress, ProgressController } from '../progress';
@ -26,7 +26,7 @@ import { SocksInterceptor } from '../socksInterceptor';
import { WebSocketTransport } from '../transport';
import { fetchData } from '../utils/network';
import type { HarBackend } from '../../utils/harBackend';
import type { HarBackend } from '../../common/harBackend';
import type { CallMetadata } from '../instrumentation';
import type { Playwright } from '../playwright';
import type { RootDispatcher } from './dispatcher';
@ -54,7 +54,7 @@ export class LocalUtilsDispatcher extends Dispatcher<{ guid: string }, channels.
}
async harOpen(params: channels.LocalUtilsHarOpenParams, metadata: CallMetadata): Promise<channels.LocalUtilsHarOpenResult> {
return await localUtils.harOpen(this._harBackends, params);
return await localUtils.harOpen(nodePlatform, this._harBackends, params);
}
async harLookup(params: channels.LocalUtilsHarLookupParams, metadata: CallMetadata): Promise<channels.LocalUtilsHarLookupResult> {

View file

@ -25,7 +25,8 @@ import { RequestDispatcher } from './networkDispatchers';
import { ResponseDispatcher } from './networkDispatchers';
import { RouteDispatcher, WebSocketDispatcher } from './networkDispatchers';
import { WebSocketRouteDispatcher } from './webSocketRouteDispatcher';
import { createGuid, urlMatches } from '../../utils';
import { createGuid } from '../utils/crypto';
import { urlMatches } from '../../utils/isomorphic/urlMatch';
import type { Artifact } from '../artifact';
import type { BrowserContext } from '../browserContext';

View file

@ -25,12 +25,12 @@ import { ElectronDispatcher } from './electronDispatcher';
import { LocalUtilsDispatcher } from './localUtilsDispatcher';
import { APIRequestContextDispatcher } from './networkDispatchers';
import { SelectorsDispatcher } from './selectorsDispatcher';
import { createGuid } from '../../utils';
import { eventsHelper } from '../../utils/eventsHelper';
import { createGuid } from '../utils/crypto';
import { eventsHelper } from '../utils/eventsHelper';
import type { RootDispatcher } from './dispatcher';
import type { SocksSocketClosedPayload, SocksSocketDataPayload, SocksSocketRequestedPayload } from '../utils/socksProxy';
import type { RegisteredListener } from '../../utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type { AndroidDevice } from '../android/android';
import type { Browser } from '../browser';
import type { Playwright } from '../playwright';

View file

@ -15,7 +15,8 @@
*/
import { Dispatcher } from './dispatcher';
import { ManualPromise, createGuid } from '../../utils';
import { ManualPromise } from '../../utils/isomorphic/manualPromise';
import { createGuid } from '../utils/crypto';
import type { ArtifactDispatcher } from './artifactDispatcher';
import type * as channels from '@protocol/channels';

View file

@ -18,8 +18,9 @@ import { Page } from '../page';
import { Dispatcher, existingDispatcher } from './dispatcher';
import { PageDispatcher } from './pageDispatcher';
import * as webSocketMockSource from '../../generated/webSocketMockSource';
import { createGuid, urlMatches } from '../../utils';
import { eventsHelper } from '../../utils/eventsHelper';
import { createGuid } from '../utils/crypto';
import { urlMatches } from '../../utils/isomorphic/urlMatch';
import { eventsHelper } from '../utils/eventsHelper';
import type { BrowserContextDispatcher } from './browserContextDispatcher';
import type { BrowserContext } from '../browserContext';

View file

@ -17,7 +17,7 @@
import * as fs from 'fs';
import { Dispatcher } from './dispatcher';
import { createGuid } from '../../utils';
import { createGuid } from '../utils/crypto';
import type { BrowserContextDispatcher } from './browserContextDispatcher';
import type * as channels from '@protocol/channels';

View file

@ -2,5 +2,6 @@
../
../../common/
../../utils/
../../utils/isomorphic/
../chromium/
../utils

View file

@ -19,11 +19,11 @@ import * as os from 'os';
import * as path from 'path';
import * as readline from 'readline';
import { TimeoutSettings } from '../../common/timeoutSettings';
import { TimeoutSettings } from '../../utils/isomorphic/timeoutSettings';
import { ManualPromise } from '../../utils';
import { wrapInASCIIBox } from '../utils/ascii';
import { RecentLogsCollector } from '../../utils/debugLogger';
import { eventsHelper } from '../../utils/eventsHelper';
import { RecentLogsCollector } from '../utils/debugLogger';
import { eventsHelper } from '../utils/eventsHelper';
import { validateBrowserContextOptions } from '../browserContext';
import { CRBrowser } from '../chromium/crBrowser';
import { CRConnection } from '../chromium/crConnection';

View file

@ -21,9 +21,10 @@ import { TLSSocket } from 'tls';
import * as url from 'url';
import * as zlib from 'zlib';
import { TimeoutSettings } from '../common/timeoutSettings';
import { assert, constructURLBasedOnBaseURL, createGuid, eventsHelper, monotonicTime } from '../utils';
import { getUserAgent } from '../utils/userAgent';
import { TimeoutSettings } from '../utils/isomorphic/timeoutSettings';
import { assert, constructURLBasedOnBaseURL, eventsHelper, monotonicTime } from '../utils';
import { createGuid } from './utils/crypto';
import { getUserAgent } from './utils/userAgent';
import { HttpsProxyAgent, SocksProxyAgent } from '../utilsBundle';
import { BrowserContext, verifyClientCertificates } from './browserContext';
import { CookieStore, domainMatches, parseRawCookie } from './cookieStore';

View file

@ -17,8 +17,8 @@
import * as fs from 'fs';
import * as path from 'path';
import { assert } from '../utils/debug';
import { fileUploadSizeLimit } from '../utils/fileUtils';
import { assert } from '../utils/isomorphic/debug';
import { fileUploadSizeLimit } from '../common/fileUtils';
import { mime } from '../utilsBundle';
import type { WritableStreamDispatcher } from './dispatchers/writableStreamDispatcher';

View file

@ -17,13 +17,13 @@
import { EventEmitter } from 'events';
import { debugLogger } from '../../utils/debugLogger';
import { debugLogger } from '../utils/debugLogger';
import { helper } from '../helper';
import { ProtocolError } from '../protocolError';
import type { ConnectionTransport, ProtocolRequest, ProtocolResponse } from '../transport';
import type { Protocol } from './protocol';
import type { RecentLogsCollector } from '../../utils/debugLogger';
import type { RecentLogsCollector } from '../utils/debugLogger';
import type { ProtocolLogger } from '../types';

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { rewriteErrorMessage } from '../../utils/stackTrace';
import { rewriteErrorMessage } from '../../utils/isomorphic/stackTrace';
import { parseEvaluationResultValue } from '../isomorphic/utilityScriptSerializers';
import * as js from '../javascript';
import { isSessionClosedError } from '../protocolError';

View file

@ -15,12 +15,12 @@
* limitations under the License.
*/
import { eventsHelper } from '../../utils/eventsHelper';
import { eventsHelper } from '../utils/eventsHelper';
import * as network from '../network';
import type { FFSession } from './ffConnection';
import type { HeadersArray } from '../../server/types';
import type { RegisteredListener } from '../../utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type * as frames from '../frames';
import type { Page } from '../page';
import type * as types from '../types';

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { eventsHelper } from '../../utils/eventsHelper';
import { eventsHelper } from '../utils/eventsHelper';
import * as dialog from '../dialog';
import * as dom from '../dom';
import { InitScript } from '../page';
@ -25,15 +25,15 @@ import { FFSession } from './ffConnection';
import { FFExecutionContext } from './ffExecutionContext';
import { RawKeyboardImpl, RawMouseImpl, RawTouchscreenImpl } from './ffInput';
import { FFNetworkManager } from './ffNetworkManager';
import { debugLogger } from '../../utils/debugLogger';
import { splitErrorMessage } from '../../utils/stackTrace';
import { debugLogger } from '../utils/debugLogger';
import { splitErrorMessage } from '../../utils/isomorphic/stackTrace';
import { BrowserContext } from '../browserContext';
import { TargetClosedError } from '../errors';
import type { Progress } from '../progress';
import type { FFBrowserContext } from './ffBrowser';
import type { Protocol } from './protocol';
import type { RegisteredListener } from '../../utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type * as frames from '../frames';
import type { PageDelegate } from '../page';
import type * as types from '../types';

View file

@ -29,10 +29,10 @@ import { ProgressController } from './progress';
import * as types from './types';
import { LongStandingScope, asLocator, assert, compressCallLog, constructURLBasedOnBaseURL, makeWaitForNextTask, monotonicTime } from '../utils';
import { isSessionClosedError } from './protocolError';
import { debugLogger } from '../utils/debugLogger';
import { eventsHelper } from '../utils/eventsHelper';
import { debugLogger } from './utils/debugLogger';
import { eventsHelper } from './utils/eventsHelper';
import { isInvalidSelectorError } from '../utils/isomorphic/selectorParser';
import { ManualPromise } from '../utils/manualPromise';
import { ManualPromise } from '../utils/isomorphic/manualPromise';
import type { ConsoleMessage } from './console';
import type { Dialog } from './dialog';
@ -40,7 +40,7 @@ import type { ElementStateWithoutStable, FrameExpectParams, InjectedScript } fro
import type { CallMetadata } from './instrumentation';
import type { Progress } from './progress';
import type { ScreenshotOptions } from './screenshotter';
import type { RegisteredListener } from '../utils/eventsHelper';
import type { RegisteredListener } from './utils/eventsHelper';
import type { ParsedSelector } from '../utils/isomorphic/selectorParser';
import type * as channels from '@protocol/channels';

View file

@ -19,8 +19,8 @@ import * as path from 'path';
import { Artifact } from '../artifact';
import { HarTracer } from './harTracer';
import { createGuid } from '../../utils';
import { ManualPromise } from '../../utils/manualPromise';
import { createGuid } from '../utils/crypto';
import { ManualPromise } from '../../utils/isomorphic/manualPromise';
import { yazl } from '../../zipBundle';
import type { BrowserContext } from '../browserContext';

View file

@ -16,8 +16,8 @@
import { assert, calculateSha1, monotonicTime } from '../../utils';
import { getPlaywrightVersion, isTextualMimeType, urlMatches } from '../../utils';
import { eventsHelper } from '../../utils/eventsHelper';
import { ManualPromise } from '../../utils/manualPromise';
import { eventsHelper } from '../utils/eventsHelper';
import { ManualPromise } from '../../utils/isomorphic/manualPromise';
import { mime } from '../../utilsBundle';
import { BrowserContext } from '../browserContext';
import { APIRequestContext } from '../fetch';
@ -25,7 +25,7 @@ import { Frame } from '../frames';
import { helper } from '../helper';
import * as network from '../network';
import type { RegisteredListener } from '../../utils/eventsHelper';
import type { RegisteredListener } from '../utils/eventsHelper';
import type { APIRequestEvent, APIRequestFinishedEvent } from '../fetch';
import type { Page } from '../page';
import type { Worker } from '../page';

View file

@ -15,12 +15,12 @@
* limitations under the License.
*/
import { debugLogger } from '../utils/debugLogger';
import { eventsHelper } from '../utils/eventsHelper';
import { debugLogger } from './utils/debugLogger';
import { eventsHelper } from './utils/eventsHelper';
import type { Progress } from './progress';
import type * as types from './types';
import type { RegisteredListener } from '../utils/eventsHelper';
import type { RegisteredListener } from './utils/eventsHelper';
import type { EventEmitter } from 'events';

View file

@ -16,7 +16,7 @@
import { EventEmitter } from 'events';
import { createGuid } from '../utils';
import { createGuid } from './utils/crypto';
import type { Browser } from './browser';
import type { BrowserContext } from './browserContext';

View file

@ -18,7 +18,7 @@ import { SdkObject } from './instrumentation';
import * as utilityScriptSource from '../generated/utilityScriptSource';
import { isUnderTest } from '../utils';
import { serializeAsCallArgument } from './isomorphic/utilityScriptSerializers';
import { LongStandingScope } from '../utils/manualPromise';
import { LongStandingScope } from '../utils/isomorphic/manualPromise';
import type * as dom from './dom';
import type { UtilityScript } from './injected/utilityScript';

View file

@ -18,7 +18,7 @@ import { assert } from '../utils';
import { BrowserContext } from './browserContext';
import { APIRequestContext } from './fetch';
import { SdkObject } from './instrumentation';
import { ManualPromise } from '../utils/manualPromise';
import { ManualPromise } from '../utils/isomorphic/manualPromise';
import type * as contexts from './browserContext';
import type * as frames from './frames';

View file

@ -28,13 +28,14 @@ import { parseEvaluationResultValue, source } from './isomorphic/utilityScriptSe
import * as js from './javascript';
import { ProgressController } from './progress';
import { Screenshotter, validateScreenshotOptions } from './screenshotter';
import { TimeoutSettings } from '../common/timeoutSettings';
import { LongStandingScope, assert, compressCallLog, createGuid, trimStringWithEllipsis } from '../utils';
import { TimeoutSettings } from '../utils/isomorphic/timeoutSettings';
import { LongStandingScope, assert, compressCallLog, trimStringWithEllipsis } from '../utils';
import { createGuid } from './utils/crypto';
import { asLocator } from '../utils';
import { getComparator } from './utils/comparators';
import { debugLogger } from '../utils/debugLogger';
import { debugLogger } from './utils/debugLogger';
import { isInvalidSelectorError } from '../utils/isomorphic/selectorParser';
import { ManualPromise } from '../utils/manualPromise';
import { ManualPromise } from '../utils/isomorphic/manualPromise';
import type { Artifact } from './artifact';
import type * as dom from './dom';

View file

@ -16,7 +16,7 @@
*/
import { makeWaitForNextTask } from '../utils';
import { debugLogger } from '../utils/debugLogger';
import { debugLogger } from './utils/debugLogger';
import type { ConnectionTransport, ProtocolRequest, ProtocolResponse } from './transport';

View file

@ -16,11 +16,11 @@
import { TimeoutError } from './errors';
import { assert, monotonicTime } from '../utils';
import { ManualPromise } from '../utils/manualPromise';
import { ManualPromise } from '../utils/isomorphic/manualPromise';
import type { CallMetadata, Instrumentation, SdkObject } from './instrumentation';
import type { Progress as CommonProgress } from '../common/progress';
import type { LogName } from '../utils/debugLogger';
import type { LogName } from './utils/debugLogger';
export interface Progress extends CommonProgress {
metadata: CallMetadata;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { rewriteErrorMessage } from '../utils/stackTrace';
import { rewriteErrorMessage } from '../utils/isomorphic/stackTrace';
export class ProtocolError extends Error {
type: 'error' | 'closed' | 'crashed';

View file

@ -19,7 +19,7 @@ import { EventEmitter } from 'events';
import { RecorderCollection } from './recorderCollection';
import * as recorderSource from '../../generated/pollingRecorderSource';
import { eventsHelper, monotonicTime, quoteCSSAttributeValue } from '../../utils';
import { raceAgainstDeadline } from '../../utils/timeoutRunner';
import { raceAgainstDeadline } from '../../utils/isomorphic/timeoutRunner';
import { BrowserContext } from '../browserContext';
import { languageSet } from '../codegen/languages';
import { Frame } from '../frames';

View file

@ -18,8 +18,8 @@ import { EventEmitter } from 'events';
import { performAction } from './recorderRunner';
import { collapseActions } from './recorderUtils';
import { isUnderTest } from '../../utils/debug';
import { monotonicTime } from '../../utils/time';
import { isUnderTest } from '../../utils/isomorphic/debug';
import { monotonicTime } from '../../utils/isomorphic/time';
import type { Signal } from '../../../../recorder/src/actions';
import type { Frame } from '../frames';

View file

@ -20,10 +20,10 @@ import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import { debugLogger } from '../../utils/debugLogger';
import { ManualPromise } from '../../utils/manualPromise';
import { getUserAgent } from '../../utils/userAgent';
import { colors, progress as ProgressBar } from '../../utilsBundle';
import { debugLogger } from '../utils/debugLogger';
import { ManualPromise } from '../../utils/isomorphic/manualPromise';
import { getUserAgent } from '../utils/userAgent';
import { progress as ProgressBar, colors } from '../../utilsBundle';
import { existsAsync } from '../utils/fileUtils';
import { browserDirectoryToMarkerFilePath } from '.';

View file

@ -21,9 +21,9 @@ import * as path from 'path';
import { deps } from './nativeDeps';
import { wrapInASCIIBox } from '../utils/ascii';
import { hostPlatform, isOfficiallySupportedPlatform } from '../../utils/hostPlatform';
import { hostPlatform, isOfficiallySupportedPlatform } from '../utils/hostPlatform';
import { spawnAsync } from '../utils/spawnAsync';
import { getPlaywrightVersion } from '../../utils/userAgent';
import { getPlaywrightVersion } from '../utils/userAgent';
import { buildPlaywrightCLICommand, registry } from '.';

View file

@ -25,16 +25,16 @@ import { dockerVersion, readDockerVersionSync, transformCommandsForRoot } from '
import { installDependenciesLinux, installDependenciesWindows, validateDependenciesLinux, validateDependenciesWindows } from './dependencies';
import { calculateSha1, getAsBooleanFromENV, getFromENV, getPackageManagerExecCommand } from '../../utils';
import { wrapInASCIIBox } from '../utils/ascii';
import { debugLogger } from '../../utils/debugLogger';
import { hostPlatform, isOfficiallySupportedPlatform } from '../../utils/hostPlatform';
import { debugLogger } from '../utils/debugLogger';
import { hostPlatform, isOfficiallySupportedPlatform } from '../utils/hostPlatform';
import { fetchData } from '../utils/network';
import { spawnAsync } from '../utils/spawnAsync';
import { getEmbedderName } from '../../utils/userAgent';
import { getEmbedderName } from '../utils/userAgent';
import { lockfile } from '../../utilsBundle';
import { canAccessFile, existsAsync, removeFolders } from '../utils/fileUtils';
import type { DependencyGroup } from './dependencies';
import type { HostPlatform } from '../../utils/hostPlatform';
import type { HostPlatform } from '../utils/hostPlatform';
export { writeDockerVersion } from './dependencies';

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