chore: move event utils to server (#34761)
This commit is contained in:
parent
0eeba380f2
commit
c31ce783b7
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -19,7 +19,7 @@ import * as path from 'path';
|
|||
|
||||
import { assert } from '../../utils/debug';
|
||||
import { createGuid } from '../utils/crypto';
|
||||
import { eventsHelper } from '../../utils/eventsHelper';
|
||||
import { eventsHelper } from '../utils/eventsHelper';
|
||||
import { rewriteErrorMessage } from '../../utils/stackTrace';
|
||||
import * as dialog from '../dialog';
|
||||
import * as dom from '../dom';
|
||||
|
@ -46,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';
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -26,11 +26,11 @@ import { LocalUtilsDispatcher } from './localUtilsDispatcher';
|
|||
import { APIRequestContextDispatcher } from './networkDispatchers';
|
||||
import { SelectorsDispatcher } from './selectorsDispatcher';
|
||||
import { createGuid } from '../utils/crypto';
|
||||
import { eventsHelper } from '../../utils/eventsHelper';
|
||||
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';
|
||||
|
|
|
@ -20,7 +20,7 @@ import { PageDispatcher } from './pageDispatcher';
|
|||
import * as webSocketMockSource from '../../generated/webSocketMockSource';
|
||||
import { createGuid } from '../utils/crypto';
|
||||
import { urlMatches } from '../../utils/isomorphic/urlMatch';
|
||||
import { eventsHelper } from '../../utils/eventsHelper';
|
||||
import { eventsHelper } from '../utils/eventsHelper';
|
||||
|
||||
import type { BrowserContextDispatcher } from './browserContextDispatcher';
|
||||
import type { BrowserContext } from '../browserContext';
|
||||
|
|
|
@ -23,7 +23,7 @@ import { TimeoutSettings } from '../../common/timeoutSettings';
|
|||
import { ManualPromise } from '../../utils';
|
||||
import { wrapInASCIIBox } from '../utils/ascii';
|
||||
import { RecentLogsCollector } from '../../utils/debugLogger';
|
||||
import { eventsHelper } from '../../utils/eventsHelper';
|
||||
import { eventsHelper } from '../utils/eventsHelper';
|
||||
import { validateBrowserContextOptions } from '../browserContext';
|
||||
import { CRBrowser } from '../chromium/crBrowser';
|
||||
import { CRConnection } from '../chromium/crConnection';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
@ -33,7 +33,7 @@ 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';
|
||||
|
|
|
@ -30,7 +30,7 @@ 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 { eventsHelper } from './utils/eventsHelper';
|
||||
import { isInvalidSelectorError } from '../utils/isomorphic/selectorParser';
|
||||
import { ManualPromise } from '../utils/isomorphic/manualPromise';
|
||||
|
||||
|
@ -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';
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import { assert, calculateSha1, monotonicTime } from '../../utils';
|
||||
import { getPlaywrightVersion, isTextualMimeType, urlMatches } from '../../utils';
|
||||
import { eventsHelper } from '../../utils/eventsHelper';
|
||||
import { eventsHelper } from '../utils/eventsHelper';
|
||||
import { ManualPromise } from '../../utils/isomorphic/manualPromise';
|
||||
import { mime } from '../../utilsBundle';
|
||||
import { BrowserContext } from '../browserContext';
|
||||
|
@ -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';
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
*/
|
||||
|
||||
import { debugLogger } from '../utils/debugLogger';
|
||||
import { eventsHelper } from '../utils/eventsHelper';
|
||||
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';
|
||||
|
||||
|
||||
|
|
|
@ -18,13 +18,13 @@ import { frameSnapshotStreamer } from './snapshotterInjected';
|
|||
import { monotonicTime } from '../../../utils/isomorphic/time';
|
||||
import { calculateSha1, createGuid } from '../../utils/crypto';
|
||||
import { debugLogger } from '../../../utils/debugLogger';
|
||||
import { eventsHelper } from '../../../utils/eventsHelper';
|
||||
import { eventsHelper } from '../../utils/eventsHelper';
|
||||
import { mime } from '../../../utilsBundle';
|
||||
import { BrowserContext } from '../../browserContext';
|
||||
import { Page } from '../../page';
|
||||
|
||||
import type { SnapshotData } from './snapshotterInjected';
|
||||
import type { RegisteredListener } from '../../../utils/eventsHelper';
|
||||
import type { RegisteredListener } from '../../utils/eventsHelper';
|
||||
import type { Frame } from '../../frames';
|
||||
import type { FrameSnapshot } from '@trace/snapshot';
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import { Snapshotter } from './snapshotter';
|
|||
import { commandsWithTracingSnapshots } from '../../../protocol/debug';
|
||||
import { assert } from '../../../utils/debug';
|
||||
import { monotonicTime } from '../../../utils/isomorphic/time';
|
||||
import { eventsHelper } from '../../../utils/eventsHelper';
|
||||
import { eventsHelper } from '../../utils/eventsHelper';
|
||||
import { createGuid } from '../../utils/crypto';
|
||||
import { Artifact } from '../../artifact';
|
||||
import { BrowserContext } from '../../browserContext';
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { isRegExp, isString } from './isomorphic/rtti';
|
||||
import { isRegExp, isString } from '../../utils/isomorphic/rtti';
|
||||
|
||||
import type { ExpectedTextValue } from '@protocol/channels';
|
||||
|
|
@ -20,7 +20,7 @@ import * as path from 'path';
|
|||
import { assert, debugAssert } from '../../utils';
|
||||
import { headersArrayToObject } from '../../utils/isomorphic/headers';
|
||||
import { createGuid } from '../utils/crypto';
|
||||
import { eventsHelper } from '../../utils/eventsHelper';
|
||||
import { eventsHelper } from '../utils/eventsHelper';
|
||||
import { hostPlatform } from '../../utils/hostPlatform';
|
||||
import { splitErrorMessage } from '../../utils/stackTrace';
|
||||
import { PNG, jpegjs } from '../../utilsBundle';
|
||||
|
@ -43,7 +43,7 @@ import { debugLogger } from '../../utils/debugLogger';
|
|||
|
||||
import type { Protocol } from './protocol';
|
||||
import type { WKBrowserContext } from './wkBrowser';
|
||||
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 { JSHandle } from '../javascript';
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
*/
|
||||
|
||||
import { assert } from '../../utils';
|
||||
import { eventsHelper } from '../../utils/eventsHelper';
|
||||
import { eventsHelper } from '../utils/eventsHelper';
|
||||
|
||||
import type { Protocol } from './protocol';
|
||||
import type { WKSession } from './wkConnection';
|
||||
import type { WKPage } from './wkPage';
|
||||
import type { RegisteredListener } from '../../utils/eventsHelper';
|
||||
import type { RegisteredListener } from '../utils/eventsHelper';
|
||||
import type * as network from '../network';
|
||||
|
||||
export class WKProvisionalPage {
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { eventsHelper } from '../../utils/eventsHelper';
|
||||
import { eventsHelper } from '../utils/eventsHelper';
|
||||
import { Worker } from '../page';
|
||||
import { WKSession } from './wkConnection';
|
||||
import { WKExecutionContext } from './wkExecutionContext';
|
||||
|
||||
import type { Protocol } from './protocol';
|
||||
import type { RegisteredListener } from '../../utils/eventsHelper';
|
||||
import type { RegisteredListener } from '../utils/eventsHelper';
|
||||
import type { Page } from '../page';
|
||||
import type * as types from '../types';
|
||||
|
||||
|
|
|
@ -27,8 +27,6 @@ export * from './utils/isomorphic/urlMatch';
|
|||
export * from './utils/debug';
|
||||
export * from './utils/debugLogger';
|
||||
export * from './utils/env';
|
||||
export * from './utils/eventsHelper';
|
||||
export * from './utils/expectUtils';
|
||||
export * from './utils/hostPlatform';
|
||||
export * from './utils/isomorphic/headers';
|
||||
export * from './utils/isomorphic/semaphore';
|
||||
|
@ -42,6 +40,8 @@ export * from './utils/zones';
|
|||
export * from './server/utils/ascii';
|
||||
export * from './server/utils/comparators';
|
||||
export * from './server/utils/crypto';
|
||||
export * from './server/utils/eventsHelper';
|
||||
export * from './server/utils/expectUtils';
|
||||
export * from './server/utils/fileUtils';
|
||||
export * from './server/utils/httpServer';
|
||||
export * from './server/utils/network';
|
||||
|
|
Loading…
Reference in New Issue