@checkly/playwright-core 1.41.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +3 -0
- package/ThirdPartyNotices.txt +1513 -0
- package/bin/PrintDeps.exe +0 -0
- package/bin/README.md +2 -0
- package/bin/install_media_pack.ps1 +5 -0
- package/bin/reinstall_chrome_beta_linux.sh +40 -0
- package/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/bin/reinstall_chrome_beta_win.ps1 +23 -0
- package/bin/reinstall_chrome_stable_linux.sh +40 -0
- package/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/bin/reinstall_chrome_stable_win.ps1 +23 -0
- package/bin/reinstall_msedge_beta_linux.sh +40 -0
- package/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/bin/reinstall_msedge_beta_win.ps1 +22 -0
- package/bin/reinstall_msedge_dev_linux.sh +40 -0
- package/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/bin/reinstall_msedge_dev_win.ps1 +22 -0
- package/bin/reinstall_msedge_stable_linux.sh +40 -0
- package/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/bin/reinstall_msedge_stable_win.ps1 +23 -0
- package/browsers.json +64 -0
- package/cli.js +17 -0
- package/index.d.ts +17 -0
- package/index.js +33 -0
- package/index.mjs +28 -0
- package/lib/androidServerImpl.js +69 -0
- package/lib/browserServerImpl.js +92 -0
- package/lib/cli/driver.js +97 -0
- package/lib/cli/program.js +582 -0
- package/lib/cli/programWithTestStub.js +67 -0
- package/lib/client/accessibility.js +50 -0
- package/lib/client/android.js +473 -0
- package/lib/client/api.js +272 -0
- package/lib/client/artifact.js +79 -0
- package/lib/client/browser.js +145 -0
- package/lib/client/browserContext.js +509 -0
- package/lib/client/browserType.js +233 -0
- package/lib/client/cdpSession.js +53 -0
- package/lib/client/channelOwner.js +229 -0
- package/lib/client/clientHelper.js +57 -0
- package/lib/client/clientInstrumentation.js +40 -0
- package/lib/client/connection.js +327 -0
- package/lib/client/consoleMessage.js +55 -0
- package/lib/client/coverage.js +41 -0
- package/lib/client/dialog.js +57 -0
- package/lib/client/download.js +62 -0
- package/lib/client/electron.js +130 -0
- package/lib/client/elementHandle.js +291 -0
- package/lib/client/errors.js +77 -0
- package/lib/client/events.js +93 -0
- package/lib/client/fetch.js +343 -0
- package/lib/client/fileChooser.js +45 -0
- package/lib/client/frame.js +506 -0
- package/lib/client/harRouter.js +93 -0
- package/lib/client/input.js +111 -0
- package/lib/client/jsHandle.js +123 -0
- package/lib/client/jsonPipe.js +35 -0
- package/lib/client/localUtils.js +35 -0
- package/lib/client/locator.js +432 -0
- package/lib/client/network.js +601 -0
- package/lib/client/page.js +707 -0
- package/lib/client/playwright.js +74 -0
- package/lib/client/selectors.js +67 -0
- package/lib/client/stream.js +54 -0
- package/lib/client/tracing.js +135 -0
- package/lib/client/types.js +24 -0
- package/lib/client/video.js +51 -0
- package/lib/client/waiter.js +158 -0
- package/lib/client/webError.js +37 -0
- package/lib/client/worker.js +71 -0
- package/lib/client/writableStream.js +54 -0
- package/lib/common/socksProxy.js +569 -0
- package/lib/common/timeoutSettings.js +73 -0
- package/lib/common/types.js +5 -0
- package/lib/generated/consoleApiSource.js +7 -0
- package/lib/generated/injectedScriptSource.js +7 -0
- package/lib/generated/recorderSource.js +7 -0
- package/lib/generated/utilityScriptSource.js +7 -0
- package/lib/image_tools/colorUtils.js +98 -0
- package/lib/image_tools/compare.js +108 -0
- package/lib/image_tools/imageChannel.js +70 -0
- package/lib/image_tools/stats.js +102 -0
- package/lib/inProcessFactory.js +54 -0
- package/lib/inprocess.js +20 -0
- package/lib/outofprocess.js +67 -0
- package/lib/protocol/debug.js +27 -0
- package/lib/protocol/serializers.js +172 -0
- package/lib/protocol/transport.js +82 -0
- package/lib/protocol/validator.js +2599 -0
- package/lib/protocol/validatorPrimitives.js +139 -0
- package/lib/remote/playwrightConnection.js +274 -0
- package/lib/remote/playwrightServer.js +110 -0
- package/lib/server/accessibility.js +62 -0
- package/lib/server/android/android.js +441 -0
- package/lib/server/android/backendAdb.js +172 -0
- package/lib/server/artifact.js +104 -0
- package/lib/server/browser.js +129 -0
- package/lib/server/browserContext.js +609 -0
- package/lib/server/browserType.js +300 -0
- package/lib/server/chromium/appIcon.png +0 -0
- package/lib/server/chromium/chromium.js +346 -0
- package/lib/server/chromium/chromiumSwitches.js +41 -0
- package/lib/server/chromium/crAccessibility.js +237 -0
- package/lib/server/chromium/crBrowser.js +521 -0
- package/lib/server/chromium/crConnection.js +228 -0
- package/lib/server/chromium/crCoverage.js +246 -0
- package/lib/server/chromium/crDevTools.js +104 -0
- package/lib/server/chromium/crDragDrop.js +144 -0
- package/lib/server/chromium/crExecutionContext.js +156 -0
- package/lib/server/chromium/crInput.js +171 -0
- package/lib/server/chromium/crNetworkManager.js +723 -0
- package/lib/server/chromium/crPage.js +1173 -0
- package/lib/server/chromium/crPdf.js +147 -0
- package/lib/server/chromium/crProtocolHelper.js +131 -0
- package/lib/server/chromium/crServiceWorker.js +115 -0
- package/lib/server/chromium/defaultFontFamilies.js +145 -0
- package/lib/server/chromium/videoRecorder.js +155 -0
- package/lib/server/console.js +59 -0
- package/lib/server/cookieStore.js +112 -0
- package/lib/server/debugController.js +236 -0
- package/lib/server/debugger.js +132 -0
- package/lib/server/deviceDescriptors.js +21 -0
- package/lib/server/deviceDescriptorsSource.json +1549 -0
- package/lib/server/dialog.js +70 -0
- package/lib/server/dispatchers/androidDispatcher.js +193 -0
- package/lib/server/dispatchers/artifactDispatcher.js +118 -0
- package/lib/server/dispatchers/browserContextDispatcher.js +306 -0
- package/lib/server/dispatchers/browserDispatcher.js +170 -0
- package/lib/server/dispatchers/browserTypeDispatcher.js +55 -0
- package/lib/server/dispatchers/cdpSessionDispatcher.js +48 -0
- package/lib/server/dispatchers/debugControllerDispatcher.js +103 -0
- package/lib/server/dispatchers/dialogDispatcher.js +44 -0
- package/lib/server/dispatchers/dispatcher.js +400 -0
- package/lib/server/dispatchers/electronDispatcher.js +80 -0
- package/lib/server/dispatchers/elementHandlerDispatcher.js +228 -0
- package/lib/server/dispatchers/frameDispatcher.js +287 -0
- package/lib/server/dispatchers/jsHandleDispatcher.js +102 -0
- package/lib/server/dispatchers/jsonPipeDispatcher.js +61 -0
- package/lib/server/dispatchers/localUtilsDispatcher.js +399 -0
- package/lib/server/dispatchers/networkDispatchers.js +221 -0
- package/lib/server/dispatchers/pageDispatcher.js +363 -0
- package/lib/server/dispatchers/playwrightDispatcher.js +105 -0
- package/lib/server/dispatchers/selectorsDispatcher.js +36 -0
- package/lib/server/dispatchers/streamDispatcher.js +62 -0
- package/lib/server/dispatchers/tracingDispatcher.js +54 -0
- package/lib/server/dispatchers/writableStreamDispatcher.js +55 -0
- package/lib/server/dom.js +808 -0
- package/lib/server/download.js +53 -0
- package/lib/server/electron/electron.js +254 -0
- package/lib/server/electron/loader.js +57 -0
- package/lib/server/errors.js +68 -0
- package/lib/server/fetch.js +611 -0
- package/lib/server/fileChooser.js +42 -0
- package/lib/server/fileUploadUtils.js +71 -0
- package/lib/server/firefox/ffAccessibility.js +215 -0
- package/lib/server/firefox/ffBrowser.js +447 -0
- package/lib/server/firefox/ffConnection.js +168 -0
- package/lib/server/firefox/ffExecutionContext.js +138 -0
- package/lib/server/firefox/ffInput.js +150 -0
- package/lib/server/firefox/ffNetworkManager.js +231 -0
- package/lib/server/firefox/ffPage.js +558 -0
- package/lib/server/firefox/firefox.js +91 -0
- package/lib/server/formData.js +75 -0
- package/lib/server/frameSelectors.js +171 -0
- package/lib/server/frames.js +1597 -0
- package/lib/server/har/harRecorder.js +139 -0
- package/lib/server/har/harTracer.js +539 -0
- package/lib/server/helper.js +103 -0
- package/lib/server/index.js +96 -0
- package/lib/server/input.js +301 -0
- package/lib/server/instrumentation.js +74 -0
- package/lib/server/isomorphic/utilityScriptSerializers.js +212 -0
- package/lib/server/javascript.js +305 -0
- package/lib/server/launchApp.js +90 -0
- package/lib/server/macEditingCommands.js +139 -0
- package/lib/server/network.js +607 -0
- package/lib/server/page.js +793 -0
- package/lib/server/pipeTransport.js +85 -0
- package/lib/server/playwright.js +82 -0
- package/lib/server/progress.js +102 -0
- package/lib/server/protocolError.js +49 -0
- package/lib/server/recorder/codeGenerator.js +153 -0
- package/lib/server/recorder/csharp.js +310 -0
- package/lib/server/recorder/java.js +216 -0
- package/lib/server/recorder/javascript.js +229 -0
- package/lib/server/recorder/jsonl.js +47 -0
- package/lib/server/recorder/language.js +44 -0
- package/lib/server/recorder/python.js +275 -0
- package/lib/server/recorder/recorderActions.js +5 -0
- package/lib/server/recorder/recorderApp.js +181 -0
- package/lib/server/recorder/recorderUtils.js +48 -0
- package/lib/server/recorder/utils.js +45 -0
- package/lib/server/recorder.js +700 -0
- package/lib/server/registry/browserFetcher.js +168 -0
- package/lib/server/registry/dependencies.js +322 -0
- package/lib/server/registry/index.js +925 -0
- package/lib/server/registry/nativeDeps.js +383 -0
- package/lib/server/registry/oopDownloadBrowserMain.js +138 -0
- package/lib/server/screenshotter.js +354 -0
- package/lib/server/selectors.js +73 -0
- package/lib/server/socksInterceptor.js +100 -0
- package/lib/server/trace/recorder/snapshotter.js +168 -0
- package/lib/server/trace/recorder/snapshotterInjected.js +493 -0
- package/lib/server/trace/recorder/tracing.js +552 -0
- package/lib/server/trace/test/inMemorySnapshotter.js +93 -0
- package/lib/server/trace/viewer/traceViewer.js +229 -0
- package/lib/server/transport.js +191 -0
- package/lib/server/types.js +24 -0
- package/lib/server/usKeyboardLayout.js +555 -0
- package/lib/server/webkit/webkit.js +87 -0
- package/lib/server/webkit/wkAccessibility.js +194 -0
- package/lib/server/webkit/wkBrowser.js +328 -0
- package/lib/server/webkit/wkConnection.js +173 -0
- package/lib/server/webkit/wkExecutionContext.js +146 -0
- package/lib/server/webkit/wkInput.js +169 -0
- package/lib/server/webkit/wkInterceptableRequest.js +158 -0
- package/lib/server/webkit/wkPage.js +1198 -0
- package/lib/server/webkit/wkProvisionalPage.js +59 -0
- package/lib/server/webkit/wkWorkers.js +104 -0
- package/lib/third_party/diff_match_patch.js +2222 -0
- package/lib/third_party/pixelmatch.js +255 -0
- package/lib/utils/ascii.js +31 -0
- package/lib/utils/comparators.js +171 -0
- package/lib/utils/crypto.js +33 -0
- package/lib/utils/debug.js +46 -0
- package/lib/utils/debugLogger.js +89 -0
- package/lib/utils/env.js +47 -0
- package/lib/utils/eventsHelper.js +38 -0
- package/lib/utils/fileUtils.js +66 -0
- package/lib/utils/glob.js +83 -0
- package/lib/utils/happy-eyeballs.js +154 -0
- package/lib/utils/headers.js +52 -0
- package/lib/utils/hostPlatform.js +124 -0
- package/lib/utils/httpServer.js +195 -0
- package/lib/utils/index.js +324 -0
- package/lib/utils/isomorphic/cssParser.js +250 -0
- package/lib/utils/isomorphic/cssTokenizer.js +979 -0
- package/lib/utils/isomorphic/locatorGenerators.js +651 -0
- package/lib/utils/isomorphic/locatorParser.js +179 -0
- package/lib/utils/isomorphic/locatorUtils.js +62 -0
- package/lib/utils/isomorphic/selectorParser.js +397 -0
- package/lib/utils/isomorphic/stringUtils.js +107 -0
- package/lib/utils/isomorphic/traceUtils.js +39 -0
- package/lib/utils/linuxUtils.js +78 -0
- package/lib/utils/manualPromise.js +109 -0
- package/lib/utils/mimeType.js +29 -0
- package/lib/utils/multimap.js +75 -0
- package/lib/utils/network.js +189 -0
- package/lib/utils/processLauncher.js +248 -0
- package/lib/utils/profiler.js +53 -0
- package/lib/utils/rtti.js +41 -0
- package/lib/utils/semaphore.js +51 -0
- package/lib/utils/spawnAsync.js +45 -0
- package/lib/utils/stackTrace.js +123 -0
- package/lib/utils/task.js +58 -0
- package/lib/utils/time.js +37 -0
- package/lib/utils/timeoutRunner.js +131 -0
- package/lib/utils/traceUtils.js +44 -0
- package/lib/utils/userAgent.js +105 -0
- package/lib/utils/wsServer.js +125 -0
- package/lib/utils/zipFile.js +75 -0
- package/lib/utils/zones.js +99 -0
- package/lib/utilsBundle.js +81 -0
- package/lib/utilsBundleImpl/index.js +51 -0
- package/lib/utilsBundleImpl/xdg-open +1066 -0
- package/lib/vite/htmlReport/index.html +66 -0
- package/lib/vite/recorder/assets/codeMirrorModule-Hs9-1ZG4.css +1 -0
- package/lib/vite/recorder/assets/codeMirrorModule-I9ks4y7D.js +24 -0
- package/lib/vite/recorder/assets/codicon-zGuYmc9o.ttf +0 -0
- package/lib/vite/recorder/assets/index-ljsTwXtJ.css +1 -0
- package/lib/vite/recorder/assets/index-yg8ypzl6.js +47 -0
- package/lib/vite/recorder/index.html +29 -0
- package/lib/vite/recorder/playwright-logo.svg +9 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-GluP1cQ1.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-fqJB1XDu.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-y3M3aAqy.js +24 -0
- package/lib/vite/traceViewer/assets/wsPort-Rvwd4WC-.js +69 -0
- package/lib/vite/traceViewer/assets/wsPort-dlD7vDkY.js +69 -0
- package/lib/vite/traceViewer/assets/wsPort-qOE2NWrO.js +69 -0
- package/lib/vite/traceViewer/assets/xtermModule-Yt6xwiJ_.js +9 -0
- package/lib/vite/traceViewer/codeMirrorModule.Hs9-1ZG4.css +1 -0
- package/lib/vite/traceViewer/codicon.zGuYmc9o.ttf +0 -0
- package/lib/vite/traceViewer/index.-g_5lMbJ.css +1 -0
- package/lib/vite/traceViewer/index.4X7zDysg.js +2 -0
- package/lib/vite/traceViewer/index.HkJgzlGy.js +2 -0
- package/lib/vite/traceViewer/index.html +26 -0
- package/lib/vite/traceViewer/index.kRjx5sAJ.js +2 -0
- package/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/lib/vite/traceViewer/snapshot.html +21 -0
- package/lib/vite/traceViewer/sw.bundle.js +4 -0
- package/lib/vite/traceViewer/uiMode.1Wcp_Kto.js +10 -0
- package/lib/vite/traceViewer/uiMode.GTNzARcV.js +10 -0
- package/lib/vite/traceViewer/uiMode.html +17 -0
- package/lib/vite/traceViewer/uiMode.pWy0Re7G.css +1 -0
- package/lib/vite/traceViewer/uiMode.zV-7Lf9v.js +10 -0
- package/lib/vite/traceViewer/wsPort.kSgQKQ0y.css +1 -0
- package/lib/vite/traceViewer/xtermModule.0lwXJFHT.css +32 -0
- package/lib/zipBundle.js +25 -0
- package/lib/zipBundleImpl.js +5 -0
- package/package.json +43 -0
- package/types/protocol.d.ts +20304 -0
- package/types/structs.d.ts +45 -0
- package/types/types.d.ts +20626 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.helper = void 0;
|
|
7
|
+
var _debugLogger = require("../utils/debugLogger");
|
|
8
|
+
var _eventsHelper = require("../utils/eventsHelper");
|
|
9
|
+
/**
|
|
10
|
+
* Copyright 2017 Google Inc. All rights reserved.
|
|
11
|
+
* Modifications copyright (c) Microsoft Corporation.
|
|
12
|
+
*
|
|
13
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
14
|
+
* you may not use this file except in compliance with the License.
|
|
15
|
+
* You may obtain a copy of the License at
|
|
16
|
+
*
|
|
17
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
20
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
21
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
22
|
+
* See the License for the specific language governing permissions and
|
|
23
|
+
* limitations under the License.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
const MAX_LOG_LENGTH = process.env.MAX_LOG_LENGTH ? +process.env.MAX_LOG_LENGTH : Infinity;
|
|
27
|
+
class Helper {
|
|
28
|
+
static completeUserURL(urlString) {
|
|
29
|
+
if (urlString.startsWith('localhost') || urlString.startsWith('127.0.0.1')) urlString = 'http://' + urlString;
|
|
30
|
+
return urlString;
|
|
31
|
+
}
|
|
32
|
+
static enclosingIntRect(rect) {
|
|
33
|
+
const x = Math.floor(rect.x + 1e-3);
|
|
34
|
+
const y = Math.floor(rect.y + 1e-3);
|
|
35
|
+
const x2 = Math.ceil(rect.x + rect.width - 1e-3);
|
|
36
|
+
const y2 = Math.ceil(rect.y + rect.height - 1e-3);
|
|
37
|
+
return {
|
|
38
|
+
x,
|
|
39
|
+
y,
|
|
40
|
+
width: x2 - x,
|
|
41
|
+
height: y2 - y
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
static enclosingIntSize(size) {
|
|
45
|
+
return {
|
|
46
|
+
width: Math.floor(size.width + 1e-3),
|
|
47
|
+
height: Math.floor(size.height + 1e-3)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static getViewportSizeFromWindowFeatures(features) {
|
|
51
|
+
const widthString = features.find(f => f.startsWith('width='));
|
|
52
|
+
const heightString = features.find(f => f.startsWith('height='));
|
|
53
|
+
const width = widthString ? parseInt(widthString.substring(6), 10) : NaN;
|
|
54
|
+
const height = heightString ? parseInt(heightString.substring(7), 10) : NaN;
|
|
55
|
+
if (!Number.isNaN(width) && !Number.isNaN(height)) return {
|
|
56
|
+
width,
|
|
57
|
+
height
|
|
58
|
+
};
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
static waitForEvent(progress, emitter, event, predicate) {
|
|
62
|
+
const listeners = [];
|
|
63
|
+
const promise = new Promise((resolve, reject) => {
|
|
64
|
+
listeners.push(_eventsHelper.eventsHelper.addEventListener(emitter, event, eventArg => {
|
|
65
|
+
try {
|
|
66
|
+
if (predicate && !predicate(eventArg)) return;
|
|
67
|
+
_eventsHelper.eventsHelper.removeEventListeners(listeners);
|
|
68
|
+
resolve(eventArg);
|
|
69
|
+
} catch (e) {
|
|
70
|
+
_eventsHelper.eventsHelper.removeEventListeners(listeners);
|
|
71
|
+
reject(e);
|
|
72
|
+
}
|
|
73
|
+
}));
|
|
74
|
+
});
|
|
75
|
+
const dispose = () => _eventsHelper.eventsHelper.removeEventListeners(listeners);
|
|
76
|
+
if (progress) progress.cleanupWhenAborted(dispose);
|
|
77
|
+
return {
|
|
78
|
+
promise,
|
|
79
|
+
dispose
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
static secondsToRoundishMillis(value) {
|
|
83
|
+
return (value * 1000000 | 0) / 1000;
|
|
84
|
+
}
|
|
85
|
+
static millisToRoundishMillis(value) {
|
|
86
|
+
return (value * 1000 | 0) / 1000;
|
|
87
|
+
}
|
|
88
|
+
static debugProtocolLogger(protocolLogger) {
|
|
89
|
+
return (direction, message) => {
|
|
90
|
+
if (protocolLogger) protocolLogger(direction, message);
|
|
91
|
+
if (_debugLogger.debugLogger.isEnabled('protocol')) {
|
|
92
|
+
let text = JSON.stringify(message);
|
|
93
|
+
if (text.length > MAX_LOG_LENGTH) text = text.substring(0, MAX_LOG_LENGTH / 2) + ' <<<<<( LOG TRUNCATED )>>>>> ' + text.substring(text.length - MAX_LOG_LENGTH / 2);
|
|
94
|
+
_debugLogger.debugLogger.log('protocol', (direction === 'send' ? 'SEND ► ' : '◀ RECV ') + text);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static formatBrowserLogs(logs) {
|
|
99
|
+
if (!logs.length) return '';
|
|
100
|
+
return '\n' + logs.join('\n');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const helper = exports.helper = Helper;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DispatcherConnection", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _dispatcher.DispatcherConnection;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "PlaywrightDispatcher", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _playwrightDispatcher.PlaywrightDispatcher;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "Registry", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _registry.Registry;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "RootDispatcher", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _dispatcher.RootDispatcher;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "SocksProxy", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _socksProxy.SocksProxy;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "createPlaywright", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _playwright.createPlaywright;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "installBrowsersForNpmInstall", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _registry.installBrowsersForNpmInstall;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "installDefaultBrowsersForNpmInstall", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _registry.installDefaultBrowsersForNpmInstall;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "openTraceInBrowser", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _traceViewer.openTraceInBrowser;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "openTraceViewerApp", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _traceViewer.openTraceViewerApp;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "registry", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _registry.registry;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "registryDirectory", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _registry.registryDirectory;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "serverSideCallMetadata", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _instrumentation.serverSideCallMetadata;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "writeDockerVersion", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _registry.writeDockerVersion;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
var _registry = require("./registry");
|
|
91
|
+
var _dispatcher = require("./dispatchers/dispatcher");
|
|
92
|
+
var _playwrightDispatcher = require("./dispatchers/playwrightDispatcher");
|
|
93
|
+
var _playwright = require("./playwright");
|
|
94
|
+
var _traceViewer = require("./trace/viewer/traceViewer");
|
|
95
|
+
var _instrumentation = require("./instrumentation");
|
|
96
|
+
var _socksProxy = require("../common/socksProxy");
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.keypadLocation = exports.Touchscreen = exports.Mouse = exports.Keyboard = void 0;
|
|
7
|
+
var _utils = require("../utils");
|
|
8
|
+
var keyboardLayout = _interopRequireWildcard(require("./usKeyboardLayout"));
|
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
+
/**
|
|
12
|
+
* Copyright (c) Microsoft Corporation.
|
|
13
|
+
*
|
|
14
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License.
|
|
16
|
+
* You may obtain a copy of the License at
|
|
17
|
+
*
|
|
18
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
*
|
|
20
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
21
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
22
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23
|
+
* See the License for the specific language governing permissions and
|
|
24
|
+
* limitations under the License.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
const keypadLocation = exports.keypadLocation = keyboardLayout.keypadLocation;
|
|
28
|
+
const kModifiers = ['Alt', 'Control', 'Meta', 'Shift'];
|
|
29
|
+
class Keyboard {
|
|
30
|
+
constructor(raw, page) {
|
|
31
|
+
this._pressedModifiers = new Set();
|
|
32
|
+
this._pressedKeys = new Set();
|
|
33
|
+
this._raw = void 0;
|
|
34
|
+
this._page = void 0;
|
|
35
|
+
this._raw = raw;
|
|
36
|
+
this._page = page;
|
|
37
|
+
}
|
|
38
|
+
async down(key) {
|
|
39
|
+
const description = this._keyDescriptionForString(key);
|
|
40
|
+
const autoRepeat = this._pressedKeys.has(description.code);
|
|
41
|
+
this._pressedKeys.add(description.code);
|
|
42
|
+
if (kModifiers.includes(description.key)) this._pressedModifiers.add(description.key);
|
|
43
|
+
const text = description.text;
|
|
44
|
+
await this._raw.keydown(this._pressedModifiers, description.code, description.keyCode, description.keyCodeWithoutLocation, description.key, description.location, autoRepeat, text);
|
|
45
|
+
}
|
|
46
|
+
_keyDescriptionForString(keyString) {
|
|
47
|
+
let description = usKeyboardLayout.get(keyString);
|
|
48
|
+
(0, _utils.assert)(description, `Unknown key: "${keyString}"`);
|
|
49
|
+
const shift = this._pressedModifiers.has('Shift');
|
|
50
|
+
description = shift && description.shifted ? description.shifted : description;
|
|
51
|
+
|
|
52
|
+
// if any modifiers besides shift are pressed, no text should be sent
|
|
53
|
+
if (this._pressedModifiers.size > 1 || !this._pressedModifiers.has('Shift') && this._pressedModifiers.size === 1) return {
|
|
54
|
+
...description,
|
|
55
|
+
text: ''
|
|
56
|
+
};
|
|
57
|
+
return description;
|
|
58
|
+
}
|
|
59
|
+
async up(key) {
|
|
60
|
+
const description = this._keyDescriptionForString(key);
|
|
61
|
+
if (kModifiers.includes(description.key)) this._pressedModifiers.delete(description.key);
|
|
62
|
+
this._pressedKeys.delete(description.code);
|
|
63
|
+
await this._raw.keyup(this._pressedModifiers, description.code, description.keyCode, description.keyCodeWithoutLocation, description.key, description.location);
|
|
64
|
+
}
|
|
65
|
+
async insertText(text) {
|
|
66
|
+
await this._raw.sendText(text);
|
|
67
|
+
}
|
|
68
|
+
async type(text, options) {
|
|
69
|
+
const delay = options && options.delay || undefined;
|
|
70
|
+
for (const char of text) {
|
|
71
|
+
if (usKeyboardLayout.has(char)) {
|
|
72
|
+
await this.press(char, {
|
|
73
|
+
delay
|
|
74
|
+
});
|
|
75
|
+
} else {
|
|
76
|
+
if (delay) await new Promise(f => setTimeout(f, delay));
|
|
77
|
+
await this.insertText(char);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async press(key, options = {}) {
|
|
82
|
+
function split(keyString) {
|
|
83
|
+
const keys = [];
|
|
84
|
+
let building = '';
|
|
85
|
+
for (const char of keyString) {
|
|
86
|
+
if (char === '+' && building) {
|
|
87
|
+
keys.push(building);
|
|
88
|
+
building = '';
|
|
89
|
+
} else {
|
|
90
|
+
building += char;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
keys.push(building);
|
|
94
|
+
return keys;
|
|
95
|
+
}
|
|
96
|
+
const tokens = split(key);
|
|
97
|
+
key = tokens[tokens.length - 1];
|
|
98
|
+
for (let i = 0; i < tokens.length - 1; ++i) await this.down(tokens[i]);
|
|
99
|
+
await this.down(key);
|
|
100
|
+
if (options.delay) await new Promise(f => setTimeout(f, options.delay));
|
|
101
|
+
await this.up(key);
|
|
102
|
+
for (let i = tokens.length - 2; i >= 0; --i) await this.up(tokens[i]);
|
|
103
|
+
}
|
|
104
|
+
async _ensureModifiers(modifiers) {
|
|
105
|
+
for (const modifier of modifiers) {
|
|
106
|
+
if (!kModifiers.includes(modifier)) throw new Error('Unknown modifier ' + modifier);
|
|
107
|
+
}
|
|
108
|
+
const restore = Array.from(this._pressedModifiers);
|
|
109
|
+
for (const key of kModifiers) {
|
|
110
|
+
const needDown = modifiers.includes(key);
|
|
111
|
+
const isDown = this._pressedModifiers.has(key);
|
|
112
|
+
if (needDown && !isDown) await this.down(key);else if (!needDown && isDown) await this.up(key);
|
|
113
|
+
}
|
|
114
|
+
return restore;
|
|
115
|
+
}
|
|
116
|
+
_modifiers() {
|
|
117
|
+
return this._pressedModifiers;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
exports.Keyboard = Keyboard;
|
|
121
|
+
class Mouse {
|
|
122
|
+
constructor(raw, page) {
|
|
123
|
+
this._keyboard = void 0;
|
|
124
|
+
this._x = 0;
|
|
125
|
+
this._y = 0;
|
|
126
|
+
this._lastButton = 'none';
|
|
127
|
+
this._buttons = new Set();
|
|
128
|
+
this._raw = void 0;
|
|
129
|
+
this._page = void 0;
|
|
130
|
+
this._raw = raw;
|
|
131
|
+
this._page = page;
|
|
132
|
+
this._keyboard = this._page.keyboard;
|
|
133
|
+
}
|
|
134
|
+
async move(x, y, options = {}, metadata) {
|
|
135
|
+
if (metadata) metadata.point = {
|
|
136
|
+
x,
|
|
137
|
+
y
|
|
138
|
+
};
|
|
139
|
+
const {
|
|
140
|
+
steps = 1
|
|
141
|
+
} = options;
|
|
142
|
+
const fromX = this._x;
|
|
143
|
+
const fromY = this._y;
|
|
144
|
+
this._x = x;
|
|
145
|
+
this._y = y;
|
|
146
|
+
for (let i = 1; i <= steps; i++) {
|
|
147
|
+
const middleX = fromX + (x - fromX) * (i / steps);
|
|
148
|
+
const middleY = fromY + (y - fromY) * (i / steps);
|
|
149
|
+
await this._raw.move(middleX, middleY, this._lastButton, this._buttons, this._keyboard._modifiers(), !!options.forClick);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
async down(options = {}, metadata) {
|
|
153
|
+
if (metadata) metadata.point = {
|
|
154
|
+
x: this._x,
|
|
155
|
+
y: this._y
|
|
156
|
+
};
|
|
157
|
+
const {
|
|
158
|
+
button = 'left',
|
|
159
|
+
clickCount = 1
|
|
160
|
+
} = options;
|
|
161
|
+
this._lastButton = button;
|
|
162
|
+
this._buttons.add(button);
|
|
163
|
+
await this._raw.down(this._x, this._y, this._lastButton, this._buttons, this._keyboard._modifiers(), clickCount);
|
|
164
|
+
}
|
|
165
|
+
async up(options = {}, metadata) {
|
|
166
|
+
if (metadata) metadata.point = {
|
|
167
|
+
x: this._x,
|
|
168
|
+
y: this._y
|
|
169
|
+
};
|
|
170
|
+
const {
|
|
171
|
+
button = 'left',
|
|
172
|
+
clickCount = 1
|
|
173
|
+
} = options;
|
|
174
|
+
this._lastButton = 'none';
|
|
175
|
+
this._buttons.delete(button);
|
|
176
|
+
await this._raw.up(this._x, this._y, button, this._buttons, this._keyboard._modifiers(), clickCount);
|
|
177
|
+
}
|
|
178
|
+
async click(x, y, options = {}, metadata) {
|
|
179
|
+
if (metadata) metadata.point = {
|
|
180
|
+
x: this._x,
|
|
181
|
+
y: this._y
|
|
182
|
+
};
|
|
183
|
+
const {
|
|
184
|
+
delay = null,
|
|
185
|
+
clickCount = 1
|
|
186
|
+
} = options;
|
|
187
|
+
if (delay) {
|
|
188
|
+
this.move(x, y, {
|
|
189
|
+
forClick: true
|
|
190
|
+
});
|
|
191
|
+
for (let cc = 1; cc <= clickCount; ++cc) {
|
|
192
|
+
await this.down({
|
|
193
|
+
...options,
|
|
194
|
+
clickCount: cc
|
|
195
|
+
});
|
|
196
|
+
await new Promise(f => setTimeout(f, delay));
|
|
197
|
+
await this.up({
|
|
198
|
+
...options,
|
|
199
|
+
clickCount: cc
|
|
200
|
+
});
|
|
201
|
+
if (cc < clickCount) await new Promise(f => setTimeout(f, delay));
|
|
202
|
+
}
|
|
203
|
+
} else {
|
|
204
|
+
const promises = [];
|
|
205
|
+
promises.push(this.move(x, y, {
|
|
206
|
+
forClick: true
|
|
207
|
+
}));
|
|
208
|
+
for (let cc = 1; cc <= clickCount; ++cc) {
|
|
209
|
+
promises.push(this.down({
|
|
210
|
+
...options,
|
|
211
|
+
clickCount: cc
|
|
212
|
+
}));
|
|
213
|
+
promises.push(this.up({
|
|
214
|
+
...options,
|
|
215
|
+
clickCount: cc
|
|
216
|
+
}));
|
|
217
|
+
}
|
|
218
|
+
await Promise.all(promises);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
async dblclick(x, y, options = {}) {
|
|
222
|
+
await this.click(x, y, {
|
|
223
|
+
...options,
|
|
224
|
+
clickCount: 2
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
async wheel(deltaX, deltaY) {
|
|
228
|
+
await this._raw.wheel(this._x, this._y, this._buttons, this._keyboard._modifiers(), deltaX, deltaY);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
exports.Mouse = Mouse;
|
|
232
|
+
const aliases = new Map([['ShiftLeft', ['Shift']], ['ControlLeft', ['Control']], ['AltLeft', ['Alt']], ['MetaLeft', ['Meta']], ['Enter', ['\n', '\r']]]);
|
|
233
|
+
const usKeyboardLayout = buildLayoutClosure(keyboardLayout.USKeyboardLayout);
|
|
234
|
+
function buildLayoutClosure(layout) {
|
|
235
|
+
const result = new Map();
|
|
236
|
+
for (const code in layout) {
|
|
237
|
+
const definition = layout[code];
|
|
238
|
+
const description = {
|
|
239
|
+
key: definition.key || '',
|
|
240
|
+
keyCode: definition.keyCode || 0,
|
|
241
|
+
keyCodeWithoutLocation: definition.keyCodeWithoutLocation || definition.keyCode || 0,
|
|
242
|
+
code,
|
|
243
|
+
text: definition.text || '',
|
|
244
|
+
location: definition.location || 0
|
|
245
|
+
};
|
|
246
|
+
if (definition.key.length === 1) description.text = description.key;
|
|
247
|
+
|
|
248
|
+
// Generate shifted definition.
|
|
249
|
+
let shiftedDescription;
|
|
250
|
+
if (definition.shiftKey) {
|
|
251
|
+
(0, _utils.assert)(definition.shiftKey.length === 1);
|
|
252
|
+
shiftedDescription = {
|
|
253
|
+
...description
|
|
254
|
+
};
|
|
255
|
+
shiftedDescription.key = definition.shiftKey;
|
|
256
|
+
shiftedDescription.text = definition.shiftKey;
|
|
257
|
+
if (definition.shiftKeyCode) shiftedDescription.keyCode = definition.shiftKeyCode;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// Map from code: Digit3 -> { ... descrption, shifted }
|
|
261
|
+
result.set(code, {
|
|
262
|
+
...description,
|
|
263
|
+
shifted: shiftedDescription
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
// Map from aliases: Shift -> non-shiftable definition
|
|
267
|
+
if (aliases.has(code)) {
|
|
268
|
+
for (const alias of aliases.get(code)) result.set(alias, description);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Do not use numpad when converting keys to codes.
|
|
272
|
+
if (definition.location) continue;
|
|
273
|
+
|
|
274
|
+
// Map from key, no shifted
|
|
275
|
+
if (description.key.length === 1) result.set(description.key, description);
|
|
276
|
+
|
|
277
|
+
// Map from shiftKey, no shifted
|
|
278
|
+
if (shiftedDescription) result.set(shiftedDescription.key, {
|
|
279
|
+
...shiftedDescription,
|
|
280
|
+
shifted: undefined
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
return result;
|
|
284
|
+
}
|
|
285
|
+
class Touchscreen {
|
|
286
|
+
constructor(raw, page) {
|
|
287
|
+
this._raw = void 0;
|
|
288
|
+
this._page = void 0;
|
|
289
|
+
this._raw = raw;
|
|
290
|
+
this._page = page;
|
|
291
|
+
}
|
|
292
|
+
async tap(x, y, metadata) {
|
|
293
|
+
if (metadata) metadata.point = {
|
|
294
|
+
x,
|
|
295
|
+
y
|
|
296
|
+
};
|
|
297
|
+
if (!this._page._browserContext._options.hasTouch) throw new Error('hasTouch must be enabled on the browser context before using the touchscreen.');
|
|
298
|
+
await this._raw.tap(x, y, this._page.keyboard._modifiers());
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
exports.Touchscreen = Touchscreen;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SdkObject = void 0;
|
|
7
|
+
exports.createInstrumentation = createInstrumentation;
|
|
8
|
+
exports.kTestSdkObjects = void 0;
|
|
9
|
+
exports.serverSideCallMetadata = serverSideCallMetadata;
|
|
10
|
+
var _events = require("events");
|
|
11
|
+
var _utils = require("../utils");
|
|
12
|
+
/**
|
|
13
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14
|
+
*
|
|
15
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
* you may not use this file except in compliance with the License.
|
|
17
|
+
* You may obtain a copy of the License at
|
|
18
|
+
*
|
|
19
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
+
*
|
|
21
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
22
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
23
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
24
|
+
* See the License for the specific language governing permissions and
|
|
25
|
+
* limitations under the License.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
const kTestSdkObjects = exports.kTestSdkObjects = new WeakSet();
|
|
29
|
+
class SdkObject extends _events.EventEmitter {
|
|
30
|
+
constructor(parent, guidPrefix, guid) {
|
|
31
|
+
super();
|
|
32
|
+
this.guid = void 0;
|
|
33
|
+
this.attribution = void 0;
|
|
34
|
+
this.instrumentation = void 0;
|
|
35
|
+
this.guid = guid || `${guidPrefix || ''}@${(0, _utils.createGuid)()}`;
|
|
36
|
+
this.setMaxListeners(0);
|
|
37
|
+
this.attribution = {
|
|
38
|
+
...parent.attribution
|
|
39
|
+
};
|
|
40
|
+
this.instrumentation = parent.instrumentation;
|
|
41
|
+
if (process.env._PW_INTERNAL_COUNT_SDK_OBJECTS) kTestSdkObjects.add(this);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.SdkObject = SdkObject;
|
|
45
|
+
function createInstrumentation() {
|
|
46
|
+
const listeners = new Map();
|
|
47
|
+
return new Proxy({}, {
|
|
48
|
+
get: (obj, prop) => {
|
|
49
|
+
if (typeof prop !== 'string') return obj[prop];
|
|
50
|
+
if (prop === 'addListener') return (listener, context) => listeners.set(listener, context);
|
|
51
|
+
if (prop === 'removeListener') return listener => listeners.delete(listener);
|
|
52
|
+
if (!prop.startsWith('on')) return obj[prop];
|
|
53
|
+
return async (sdkObject, ...params) => {
|
|
54
|
+
for (const [listener, context] of listeners) {
|
|
55
|
+
var _prop, _ref;
|
|
56
|
+
if (!context || sdkObject.attribution.context === context) await ((_prop = (_ref = listener)[prop]) === null || _prop === void 0 ? void 0 : _prop.call(_ref, sdkObject, ...params));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function serverSideCallMetadata() {
|
|
63
|
+
return {
|
|
64
|
+
id: '',
|
|
65
|
+
startTime: 0,
|
|
66
|
+
endTime: 0,
|
|
67
|
+
wallTime: Date.now(),
|
|
68
|
+
type: 'Internal',
|
|
69
|
+
method: '',
|
|
70
|
+
params: {},
|
|
71
|
+
log: [],
|
|
72
|
+
isServerSide: true
|
|
73
|
+
};
|
|
74
|
+
}
|