@checkly/playwright-core 1.42.17 → 1.47.11
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/ThirdPartyNotices.txt +144 -109
- package/browsers.json +15 -25
- package/lib/androidServerImpl.js +1 -1
- package/lib/browserServerImpl.js +1 -1
- package/lib/cli/driver.js +1 -3
- package/lib/cli/program.js +5 -10
- package/lib/client/android.js +1 -1
- package/lib/client/api.js +7 -0
- package/lib/client/browserContext.js +37 -5
- package/lib/client/browserType.js +19 -11
- package/lib/client/channelOwner.js +19 -16
- package/lib/client/clientInstrumentation.js +17 -7
- package/lib/client/clock.js +68 -0
- package/lib/client/connection.js +9 -6
- package/lib/client/electron.js +7 -5
- package/lib/client/elementHandle.js +44 -14
- package/lib/client/eventEmitter.js +314 -0
- package/lib/client/fetch.js +81 -28
- package/lib/client/frame.js +2 -4
- package/lib/client/jsHandle.js +7 -1
- package/lib/client/locator.js +9 -0
- package/lib/client/network.js +12 -9
- package/lib/client/page.js +45 -23
- package/lib/client/playwright.js +3 -0
- package/lib/client/tracing.js +7 -4
- package/lib/common/socksProxy.js +2 -2
- package/lib/generated/clockSource.js +7 -0
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/generated/recorderSource.js +1 -1
- package/lib/generated/utilityScriptSource.js +1 -1
- package/lib/protocol/serializers.js +12 -11
- package/lib/protocol/validator.js +137 -55
- package/lib/server/bidi/bidiBrowser.js +296 -0
- package/lib/server/bidi/bidiConnection.js +206 -0
- package/lib/server/bidi/bidiExecutionContext.js +162 -0
- package/lib/server/bidi/bidiFirefox.js +110 -0
- package/lib/server/bidi/bidiInput.js +174 -0
- package/lib/server/bidi/bidiNetworkManager.js +304 -0
- package/lib/server/bidi/bidiPage.js +456 -0
- package/lib/server/bidi/third_party/bidiDeserializer.js +93 -0
- package/lib/server/bidi/third_party/bidiKeyboard.js +238 -0
- package/lib/server/bidi/third_party/bidiProtocol.js +139 -0
- package/lib/server/bidi/third_party/bidiSerializer.js +144 -0
- package/lib/server/browser.js +9 -1
- package/lib/server/browserContext.js +97 -22
- package/lib/server/browserType.js +27 -20
- package/lib/server/chromium/chromium.js +30 -15
- package/lib/server/chromium/chromiumSwitches.js +6 -3
- package/lib/server/chromium/crBrowser.js +11 -17
- package/lib/server/chromium/crConnection.js +2 -2
- package/lib/server/chromium/crDragDrop.js +28 -29
- package/lib/server/chromium/crNetworkManager.js +130 -84
- package/lib/server/chromium/crPage.js +34 -79
- package/lib/server/chromium/crProtocolHelper.js +3 -1
- package/lib/server/chromium/crServiceWorker.js +20 -23
- package/lib/server/chromium/videoRecorder.js +1 -1
- package/lib/server/clock.js +125 -0
- package/lib/server/codegen/csharp.js +299 -0
- package/lib/server/codegen/java.js +235 -0
- package/lib/server/codegen/javascript.js +223 -0
- package/lib/server/codegen/jsonl.js +47 -0
- package/lib/server/codegen/language.js +76 -0
- package/lib/server/codegen/languages.js +30 -0
- package/lib/server/codegen/python.js +265 -0
- package/lib/server/codegen/types.js +5 -0
- package/lib/server/debugController.js +3 -5
- package/lib/server/deviceDescriptors.js +9 -4
- package/lib/server/deviceDescriptorsSource.json +239 -119
- package/lib/server/dispatchers/androidDispatcher.js +1 -1
- package/lib/server/dispatchers/browserContextDispatcher.js +51 -7
- package/lib/server/dispatchers/dispatcher.js +36 -40
- package/lib/server/dispatchers/frameDispatcher.js +1 -2
- package/lib/server/dispatchers/jsHandleDispatcher.js +1 -1
- package/lib/server/dispatchers/jsonPipeDispatcher.js +4 -6
- package/lib/server/dispatchers/localUtilsDispatcher.js +19 -5
- package/lib/server/dispatchers/networkDispatchers.js +2 -2
- package/lib/server/dispatchers/pageDispatcher.js +5 -2
- package/lib/server/dispatchers/playwrightDispatcher.js +1 -0
- package/lib/server/dispatchers/writableStreamDispatcher.js +8 -5
- package/lib/server/dom.js +90 -53
- package/lib/server/electron/electron.js +21 -4
- package/lib/server/fetch.js +74 -25
- package/lib/server/fileUploadUtils.js +7 -3
- package/lib/server/firefox/ffBrowser.js +36 -25
- package/lib/server/firefox/ffConnection.js +2 -2
- package/lib/server/firefox/ffNetworkManager.js +6 -4
- package/lib/server/firefox/ffPage.js +22 -24
- package/lib/server/firefox/firefox.js +25 -6
- package/lib/server/frameSelectors.js +2 -2
- package/lib/server/frames.js +205 -159
- package/lib/server/har/harTracer.js +4 -12
- package/lib/server/helper.js +3 -3
- package/lib/server/index.js +18 -0
- package/lib/server/input.js +18 -8
- package/lib/server/instrumentation.js +0 -4
- package/lib/server/isomorphic/utilityScriptSerializers.js +19 -5
- package/lib/server/javascript.js +3 -2
- package/lib/server/launchApp.js +3 -2
- package/lib/server/network.js +14 -4
- package/lib/server/page.js +75 -46
- package/lib/server/playwright.js +5 -2
- package/lib/server/recorder/codeGenerator.js +2 -1
- package/lib/server/recorder/contextRecorder.js +316 -0
- package/lib/server/recorder/csharp.js +2 -1
- package/lib/server/recorder/java.js +2 -1
- package/lib/server/recorder/javascript.js +2 -1
- package/lib/server/recorder/jsonl.js +2 -1
- package/lib/server/recorder/language.js +2 -1
- package/lib/server/recorder/python.js +2 -1
- package/lib/server/recorder/recorderApp.js +14 -5
- package/lib/server/recorder/recorderCollection.js +127 -0
- package/lib/server/recorder/recorderRunner.js +177 -0
- package/lib/server/recorder/recorderUtils.js +23 -0
- package/lib/server/recorder/throttledFile.js +46 -0
- package/lib/server/recorder/utils.js +2 -1
- package/lib/server/recorder.js +42 -418
- package/lib/server/registry/index.js +99 -100
- package/lib/server/registry/nativeDeps.js +107 -0
- package/lib/server/screenshotter.js +6 -12
- package/lib/server/socksClientCertificatesInterceptor.js +328 -0
- package/lib/server/trace/recorder/snapshotter.js +4 -1
- package/lib/server/trace/recorder/tracing.js +27 -96
- package/lib/server/trace/viewer/traceViewer.js +54 -67
- package/lib/server/transport.js +1 -1
- package/lib/server/webkit/webkit.js +5 -5
- package/lib/server/webkit/wkBrowser.js +14 -14
- package/lib/server/webkit/wkConnection.js +3 -3
- package/lib/server/webkit/wkInterceptableRequest.js +8 -4
- package/lib/server/webkit/wkPage.js +52 -34
- package/lib/server/webkit/wkProvisionalPage.js +36 -1
- package/lib/utils/crypto.js +141 -0
- package/lib/utils/debugLogger.js +2 -0
- package/lib/utils/env.js +4 -2
- package/lib/utils/expectUtils.js +33 -0
- package/lib/utils/fileUtils.js +140 -1
- package/lib/utils/glob.js +2 -1
- package/lib/utils/happy-eyeballs.js +29 -2
- package/lib/utils/hostPlatform.js +13 -4
- package/lib/utils/httpServer.js +54 -13
- package/lib/utils/index.js +53 -31
- package/lib/utils/isomorphic/cssTokenizer.js +1 -1
- package/lib/utils/isomorphic/locatorParser.js +1 -1
- package/lib/utils/isomorphic/mimeType.js +29 -0
- package/lib/utils/isomorphic/stringUtils.js +28 -1
- package/lib/utils/isomorphic/urlMatch.js +120 -0
- package/lib/utils/mimeType.js +2 -1
- package/lib/utils/network.js +7 -35
- package/lib/utils/stackTrace.js +2 -4
- package/lib/utils/timeoutRunner.js +11 -76
- package/lib/utils/zones.js +23 -60
- package/lib/utilsBundle.js +2 -1
- package/lib/utilsBundleImpl/index.js +33 -31
- package/lib/vite/htmlReport/index.html +12 -12
- package/lib/vite/recorder/assets/codeMirrorModule-BN0yUF4I.js +24 -0
- package/lib/vite/recorder/assets/{codicon-zGuYmc9o.ttf → codicon-DCmgc-ay.ttf} +0 -0
- package/lib/vite/recorder/assets/index-B-MT5gKo.css +1 -0
- package/lib/vite/recorder/assets/index-DVt3E1Ef.js +47 -0
- package/lib/vite/recorder/index.html +2 -2
- package/lib/vite/traceViewer/assets/codeMirrorModule-5yiV-3wl.js +16831 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-B7Z3vq11.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-C6p3E9Zg.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-CcviAl53.js +16831 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-CqYUz5ms.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-DS3v0XrQ.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-Dx6AXgMV.js +16838 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-T_sdMrbM.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-V7N6ppkd.js +15585 -0
- package/lib/vite/traceViewer/assets/testServerConnection-D-tXL3sj.js +224 -0
- package/lib/vite/traceViewer/assets/testServerConnection-DeE2kSzz.js +1 -0
- package/lib/vite/traceViewer/assets/workbench-Bjkiwcr1.js +19119 -0
- package/lib/vite/traceViewer/assets/workbench-C43LWZEX.js +72 -0
- package/lib/vite/traceViewer/assets/workbench-C5OQh9VX.js +19119 -0
- package/lib/vite/traceViewer/assets/workbench-Crj6jzdv.js +19119 -0
- package/lib/vite/traceViewer/assets/workbench-DrQjKdyE.js +72 -0
- package/lib/vite/traceViewer/assets/workbench-Pa1v1Ojh.js +72 -0
- package/lib/vite/traceViewer/assets/workbench-caTaZnzx.js +72 -0
- package/lib/vite/traceViewer/assets/workbench-u2lRPMOT.js +72 -0
- package/lib/vite/traceViewer/assets/wsPort-EUvw-dwH.js +18540 -0
- package/lib/vite/traceViewer/assets/xtermModule-CZ7sDYXB.js +6529 -0
- package/lib/vite/traceViewer/assets/xtermModule-_6TC5FYT.js +6529 -0
- package/lib/vite/traceViewer/codeMirrorModule.Cy8X9Wtw.css +344 -0
- package/lib/vite/traceViewer/codeMirrorModule.svF_VrcJ.css +344 -0
- package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/lib/vite/traceViewer/embedded.BBZ9gQEw.js +104 -0
- package/lib/vite/traceViewer/embedded.BQq6Psnz.js +104 -0
- package/lib/vite/traceViewer/embedded.BVDVQOzc.js +2 -0
- package/lib/vite/traceViewer/embedded.Bn8Ptzv6.js +2 -0
- package/lib/vite/traceViewer/embedded.CvhnUgIi.js +2 -0
- package/lib/vite/traceViewer/embedded.D27cnKiB.js +104 -0
- package/lib/vite/traceViewer/embedded.DPqrDeET.js +2 -0
- package/lib/vite/traceViewer/embedded.DbzY7Q8w.js +2 -0
- package/lib/vite/traceViewer/embedded.DjZq4InJ.css +68 -0
- package/lib/vite/traceViewer/embedded.html +16 -0
- package/lib/vite/traceViewer/embedded.w7WN2u1R.css +1 -0
- package/lib/vite/traceViewer/index.5mge2rY_.css +124 -0
- package/lib/vite/traceViewer/index.6KJ-JQ0L.js +180 -0
- package/lib/vite/traceViewer/index.B8dgQwuN.js +2 -0
- package/lib/vite/traceViewer/index.BGj8jY3H.js +2 -0
- package/lib/vite/traceViewer/index.BSak5QT9.js +2 -0
- package/lib/vite/traceViewer/index.C0EgJ4oW.js +195 -0
- package/lib/vite/traceViewer/index.CUpI-BFe.js +195 -0
- package/lib/vite/traceViewer/{index.-g_5lMbJ.css → index.CrbWWHbf.css} +1 -1
- package/lib/vite/traceViewer/index.DkRbtWVo.js +195 -0
- package/lib/vite/traceViewer/index.QanXxRUb.css +131 -0
- package/lib/vite/traceViewer/index._cX8k4co.js +2 -0
- package/lib/vite/traceViewer/index.html +5 -4
- package/lib/vite/traceViewer/index.pMAN88y-.js +2 -0
- package/lib/vite/traceViewer/snapshot.html +1 -1
- package/lib/vite/traceViewer/sw.bundle.js +3 -4
- package/lib/vite/traceViewer/uiMode.D-tg1Oci.js +1730 -0
- package/lib/vite/traceViewer/uiMode.D3cNFP6u.css +1 -0
- package/lib/vite/traceViewer/uiMode.DKjMBMlc.js +1730 -0
- package/lib/vite/traceViewer/uiMode.DVWUEIHq.css +1424 -0
- package/lib/vite/traceViewer/uiMode.DVrL7a1K.js +10 -0
- package/lib/vite/traceViewer/uiMode.Dg9oJCQU.js +10 -0
- package/lib/vite/traceViewer/uiMode.DwZAzstF.js +10 -0
- package/lib/vite/traceViewer/uiMode.O07awP3T.js +10 -0
- package/lib/vite/traceViewer/uiMode.gGHHTsyL.js +1730 -0
- package/lib/vite/traceViewer/uiMode.html +5 -4
- package/lib/vite/traceViewer/uiMode.iq7CyYy7.js +1490 -0
- package/lib/vite/traceViewer/uiMode.jY2s-9ps.js +10 -0
- package/lib/vite/traceViewer/uiMode.xvJHbkzl.css +1324 -0
- package/lib/vite/traceViewer/workbench.B3X2QtYa.css +3702 -0
- package/lib/vite/traceViewer/workbench.DjbIuxix.css +1 -0
- package/lib/vite/traceViewer/workbench.DyTpxWVb.css +1 -0
- package/lib/vite/traceViewer/workbench.wuxQoE2z.css +3703 -0
- package/lib/vite/traceViewer/wsPort.p5jUwABW.css +3450 -0
- package/lib/vite/traceViewer/xtermModule.4oRVGWQ-.css +209 -0
- package/lib/vite/traceViewer/xtermModule.OKEVRlkP.css +209 -0
- package/package.json +2 -2
- package/types/protocol.d.ts +960 -78
- package/types/structs.d.ts +1 -1
- package/types/types.d.ts +3083 -2448
- package/lib/vite/recorder/assets/codeMirrorModule-I9ks4y7D.js +0 -24
- package/lib/vite/recorder/assets/index-ljsTwXtJ.css +0 -1
- package/lib/vite/recorder/assets/index-yg8ypzl6.js +0 -47
- package/lib/vite/traceViewer/assets/codeMirrorModule-0bpaqixv.js +0 -24
- package/lib/vite/traceViewer/assets/wsPort-_JBDEilC.js +0 -69
- package/lib/vite/traceViewer/index.u51inEcm.js +0 -2
- package/lib/vite/traceViewer/uiMode.Fb0bNA4H.js +0 -10
- package/lib/vite/traceViewer/uiMode.pWy0Re7G.css +0 -1
- package/lib/vite/traceViewer/wsPort.zR1WIy9-.css +0 -1
- /package/lib/vite/recorder/assets/{codeMirrorModule-Hs9-1ZG4.css → codeMirrorModule-ez37Vkbh.css} +0 -0
- /package/lib/vite/traceViewer/assets/{xtermModule-Yt6xwiJ_.js → xtermModule-BeNbaIVa.js} +0 -0
- /package/lib/vite/traceViewer/{codeMirrorModule.Hs9-1ZG4.css → codeMirrorModule.ez37Vkbh.css} +0 -0
- /package/lib/vite/traceViewer/{xtermModule.0lwXJFHT.css → xtermModule.DSXBckUd.css} +0 -0
package/ThirdPartyNotices.txt
CHANGED
|
@@ -16,6 +16,7 @@ This project incorporates components from the projects listed below. The origina
|
|
|
16
16
|
- concat-map@0.0.1 (https://github.com/substack/node-concat-map)
|
|
17
17
|
- debug@4.3.4 (https://github.com/debug-js/debug)
|
|
18
18
|
- define-lazy-prop@2.0.0 (https://github.com/sindresorhus/define-lazy-prop)
|
|
19
|
+
- dotenv@16.4.5 (https://github.com/motdotla/dotenv)
|
|
19
20
|
- end-of-stream@1.4.4 (https://github.com/mafintosh/end-of-stream)
|
|
20
21
|
- escape-string-regexp@2.0.0 (https://github.com/sindresorhus/escape-string-regexp)
|
|
21
22
|
- extract-zip@2.0.1 (https://github.com/maxogden/extract-zip)
|
|
@@ -23,10 +24,11 @@ This project incorporates components from the projects listed below. The origina
|
|
|
23
24
|
- get-stream@5.2.0 (https://github.com/sindresorhus/get-stream)
|
|
24
25
|
- graceful-fs@4.2.10 (https://github.com/isaacs/node-graceful-fs)
|
|
25
26
|
- https-proxy-agent@5.0.0 (https://github.com/TooTallNate/node-https-proxy-agent)
|
|
26
|
-
- ip@
|
|
27
|
+
- ip-address@9.0.5 (https://github.com/beaugunderson/ip-address)
|
|
27
28
|
- is-docker@2.2.1 (https://github.com/sindresorhus/is-docker)
|
|
28
29
|
- is-wsl@2.2.0 (https://github.com/sindresorhus/is-wsl)
|
|
29
30
|
- jpeg-js@0.4.4 (https://github.com/eugeneware/jpeg-js)
|
|
31
|
+
- jsbn@1.1.0 (https://github.com/andyperlitch/jsbn)
|
|
30
32
|
- mime@3.0.0 (https://github.com/broofa/mime)
|
|
31
33
|
- minimatch@3.1.2 (https://github.com/isaacs/minimatch)
|
|
32
34
|
- ms@2.1.2 (https://github.com/zeit/ms)
|
|
@@ -41,10 +43,11 @@ This project incorporates components from the projects listed below. The origina
|
|
|
41
43
|
- signal-exit@3.0.7 (https://github.com/tapjs/signal-exit)
|
|
42
44
|
- smart-buffer@4.2.0 (https://github.com/JoshGlazebrook/smart-buffer)
|
|
43
45
|
- socks-proxy-agent@6.1.1 (https://github.com/TooTallNate/node-socks-proxy-agent)
|
|
44
|
-
- socks@2.
|
|
46
|
+
- socks@2.8.3 (https://github.com/JoshGlazebrook/socks)
|
|
47
|
+
- sprintf-js@1.1.3 (https://github.com/alexei/sprintf.js)
|
|
45
48
|
- stack-utils@2.0.5 (https://github.com/tapjs/stack-utils)
|
|
46
49
|
- wrappy@1.0.2 (https://github.com/npm/wrappy)
|
|
47
|
-
- ws@8.
|
|
50
|
+
- ws@8.17.1 (https://github.com/websockets/ws)
|
|
48
51
|
- yauzl@2.10.0 (https://github.com/thejoshwolfe/yauzl)
|
|
49
52
|
- yazl@2.5.1 (https://github.com/thejoshwolfe/yazl)
|
|
50
53
|
|
|
@@ -470,6 +473,34 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
470
473
|
=========================================
|
|
471
474
|
END OF define-lazy-prop@2.0.0 AND INFORMATION
|
|
472
475
|
|
|
476
|
+
%% dotenv@16.4.5 NOTICES AND INFORMATION BEGIN HERE
|
|
477
|
+
=========================================
|
|
478
|
+
Copyright (c) 2015, Scott Motte
|
|
479
|
+
All rights reserved.
|
|
480
|
+
|
|
481
|
+
Redistribution and use in source and binary forms, with or without
|
|
482
|
+
modification, are permitted provided that the following conditions are met:
|
|
483
|
+
|
|
484
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
485
|
+
list of conditions and the following disclaimer.
|
|
486
|
+
|
|
487
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
488
|
+
this list of conditions and the following disclaimer in the documentation
|
|
489
|
+
and/or other materials provided with the distribution.
|
|
490
|
+
|
|
491
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
492
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
493
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
494
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
495
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
496
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
497
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
498
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
499
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
500
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
501
|
+
=========================================
|
|
502
|
+
END OF dotenv@16.4.5 AND INFORMATION
|
|
503
|
+
|
|
473
504
|
%% end-of-stream@1.4.4 NOTICES AND INFORMATION BEGIN HERE
|
|
474
505
|
=========================================
|
|
475
506
|
The MIT License (MIT)
|
|
@@ -740,100 +771,29 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
740
771
|
=========================================
|
|
741
772
|
END OF https-proxy-agent@5.0.0 AND INFORMATION
|
|
742
773
|
|
|
743
|
-
%% ip@
|
|
774
|
+
%% ip-address@9.0.5 NOTICES AND INFORMATION BEGIN HERE
|
|
744
775
|
=========================================
|
|
745
|
-
|
|
746
|
-
[](https://www.npmjs.com/package/ip)
|
|
747
|
-
|
|
748
|
-
IP address utilities for node.js
|
|
749
|
-
|
|
750
|
-
## Installation
|
|
751
|
-
|
|
752
|
-
### npm
|
|
753
|
-
```shell
|
|
754
|
-
npm install ip
|
|
755
|
-
```
|
|
776
|
+
Copyright (C) 2011 by Beau Gunderson
|
|
756
777
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
## Usage
|
|
764
|
-
Get your ip address, compare ip addresses, validate ip addresses, etc.
|
|
765
|
-
|
|
766
|
-
```js
|
|
767
|
-
var ip = require('ip');
|
|
768
|
-
|
|
769
|
-
ip.address() // my ip address
|
|
770
|
-
ip.isEqual('::1', '::0:1'); // true
|
|
771
|
-
ip.toBuffer('127.0.0.1') // Buffer([127, 0, 0, 1])
|
|
772
|
-
ip.toString(new Buffer([127, 0, 0, 1])) // 127.0.0.1
|
|
773
|
-
ip.fromPrefixLen(24) // 255.255.255.0
|
|
774
|
-
ip.mask('192.168.1.134', '255.255.255.0') // 192.168.1.0
|
|
775
|
-
ip.cidr('192.168.1.134/26') // 192.168.1.128
|
|
776
|
-
ip.not('255.255.255.0') // 0.0.0.255
|
|
777
|
-
ip.or('192.168.1.134', '0.0.0.255') // 192.168.1.255
|
|
778
|
-
ip.isPrivate('127.0.0.1') // true
|
|
779
|
-
ip.isV4Format('127.0.0.1'); // true
|
|
780
|
-
ip.isV6Format('::ffff:127.0.0.1'); // true
|
|
781
|
-
|
|
782
|
-
// operate on buffers in-place
|
|
783
|
-
var buf = new Buffer(128);
|
|
784
|
-
var offset = 64;
|
|
785
|
-
ip.toBuffer('127.0.0.1', buf, offset); // [127, 0, 0, 1] at offset 64
|
|
786
|
-
ip.toString(buf, offset, 4); // '127.0.0.1'
|
|
787
|
-
|
|
788
|
-
// subnet information
|
|
789
|
-
ip.subnet('192.168.1.134', '255.255.255.192')
|
|
790
|
-
// { networkAddress: '192.168.1.128',
|
|
791
|
-
// firstAddress: '192.168.1.129',
|
|
792
|
-
// lastAddress: '192.168.1.190',
|
|
793
|
-
// broadcastAddress: '192.168.1.191',
|
|
794
|
-
// subnetMask: '255.255.255.192',
|
|
795
|
-
// subnetMaskLength: 26,
|
|
796
|
-
// numHosts: 62,
|
|
797
|
-
// length: 64,
|
|
798
|
-
// contains: function(addr){...} }
|
|
799
|
-
ip.cidrSubnet('192.168.1.134/26')
|
|
800
|
-
// Same as previous.
|
|
801
|
-
|
|
802
|
-
// range checking
|
|
803
|
-
ip.cidrSubnet('192.168.1.134/26').contains('192.168.1.190') // true
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
// ipv4 long conversion
|
|
807
|
-
ip.toLong('127.0.0.1'); // 2130706433
|
|
808
|
-
ip.fromLong(2130706433); // '127.0.0.1'
|
|
809
|
-
```
|
|
810
|
-
|
|
811
|
-
### License
|
|
812
|
-
|
|
813
|
-
This software is licensed under the MIT License.
|
|
814
|
-
|
|
815
|
-
Copyright Fedor Indutny, 2012.
|
|
816
|
-
|
|
817
|
-
Permission is hereby granted, free of charge, to any person obtaining a
|
|
818
|
-
copy of this software and associated documentation files (the
|
|
819
|
-
"Software"), to deal in the Software without restriction, including
|
|
820
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
821
|
-
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
822
|
-
persons to whom the Software is furnished to do so, subject to the
|
|
823
|
-
following conditions:
|
|
778
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
779
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
780
|
+
in the Software without restriction, including without limitation the rights
|
|
781
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
782
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
783
|
+
furnished to do so, subject to the following conditions:
|
|
824
784
|
|
|
825
|
-
The above copyright notice and this permission notice shall be included
|
|
826
|
-
|
|
785
|
+
The above copyright notice and this permission notice shall be included in
|
|
786
|
+
all copies or substantial portions of the Software.
|
|
827
787
|
|
|
828
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
788
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
789
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
790
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
791
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
792
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
793
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
794
|
+
THE SOFTWARE.
|
|
835
795
|
=========================================
|
|
836
|
-
END OF ip@
|
|
796
|
+
END OF ip-address@9.0.5 AND INFORMATION
|
|
837
797
|
|
|
838
798
|
%% is-docker@2.2.1 NOTICES AND INFORMATION BEGIN HERE
|
|
839
799
|
=========================================
|
|
@@ -893,6 +853,51 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
893
853
|
=========================================
|
|
894
854
|
END OF jpeg-js@0.4.4 AND INFORMATION
|
|
895
855
|
|
|
856
|
+
%% jsbn@1.1.0 NOTICES AND INFORMATION BEGIN HERE
|
|
857
|
+
=========================================
|
|
858
|
+
Licensing
|
|
859
|
+
---------
|
|
860
|
+
|
|
861
|
+
This software is covered under the following copyright:
|
|
862
|
+
|
|
863
|
+
/*
|
|
864
|
+
* Copyright (c) 2003-2005 Tom Wu
|
|
865
|
+
* All Rights Reserved.
|
|
866
|
+
*
|
|
867
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
868
|
+
* a copy of this software and associated documentation files (the
|
|
869
|
+
* "Software"), to deal in the Software without restriction, including
|
|
870
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
871
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
872
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
873
|
+
* the following conditions:
|
|
874
|
+
*
|
|
875
|
+
* The above copyright notice and this permission notice shall be
|
|
876
|
+
* included in all copies or substantial portions of the Software.
|
|
877
|
+
*
|
|
878
|
+
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
|
879
|
+
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
880
|
+
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
881
|
+
*
|
|
882
|
+
* IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
|
|
883
|
+
* INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
|
|
884
|
+
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
|
|
885
|
+
* THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
|
|
886
|
+
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
887
|
+
*
|
|
888
|
+
* In addition, the following condition applies:
|
|
889
|
+
*
|
|
890
|
+
* All redistributions must retain an intact copy of this copyright notice
|
|
891
|
+
* and disclaimer.
|
|
892
|
+
*/
|
|
893
|
+
|
|
894
|
+
Address all questions regarding this license to:
|
|
895
|
+
|
|
896
|
+
Tom Wu
|
|
897
|
+
tjw@cs.Stanford.EDU
|
|
898
|
+
=========================================
|
|
899
|
+
END OF jsbn@1.1.0 AND INFORMATION
|
|
900
|
+
|
|
896
901
|
%% mime@3.0.0 NOTICES AND INFORMATION BEGIN HERE
|
|
897
902
|
=========================================
|
|
898
903
|
The MIT License (MIT)
|
|
@@ -1359,7 +1364,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
1359
1364
|
=========================================
|
|
1360
1365
|
END OF socks-proxy-agent@6.1.1 AND INFORMATION
|
|
1361
1366
|
|
|
1362
|
-
%% socks@2.
|
|
1367
|
+
%% socks@2.8.3 NOTICES AND INFORMATION BEGIN HERE
|
|
1363
1368
|
=========================================
|
|
1364
1369
|
The MIT License (MIT)
|
|
1365
1370
|
|
|
@@ -1382,7 +1387,36 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
1382
1387
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
1383
1388
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1384
1389
|
=========================================
|
|
1385
|
-
END OF socks@2.
|
|
1390
|
+
END OF socks@2.8.3 AND INFORMATION
|
|
1391
|
+
|
|
1392
|
+
%% sprintf-js@1.1.3 NOTICES AND INFORMATION BEGIN HERE
|
|
1393
|
+
=========================================
|
|
1394
|
+
Copyright (c) 2007-present, Alexandru Mărășteanu <hello@alexei.ro>
|
|
1395
|
+
All rights reserved.
|
|
1396
|
+
|
|
1397
|
+
Redistribution and use in source and binary forms, with or without
|
|
1398
|
+
modification, are permitted provided that the following conditions are met:
|
|
1399
|
+
* Redistributions of source code must retain the above copyright
|
|
1400
|
+
notice, this list of conditions and the following disclaimer.
|
|
1401
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
1402
|
+
notice, this list of conditions and the following disclaimer in the
|
|
1403
|
+
documentation and/or other materials provided with the distribution.
|
|
1404
|
+
* Neither the name of this software nor the names of its contributors may be
|
|
1405
|
+
used to endorse or promote products derived from this software without
|
|
1406
|
+
specific prior written permission.
|
|
1407
|
+
|
|
1408
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
1409
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
1410
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
1411
|
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
|
1412
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
1413
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
1414
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
1415
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
1416
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
1417
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1418
|
+
=========================================
|
|
1419
|
+
END OF sprintf-js@1.1.3 AND INFORMATION
|
|
1386
1420
|
|
|
1387
1421
|
%% stack-utils@2.0.5 NOTICES AND INFORMATION BEGIN HERE
|
|
1388
1422
|
=========================================
|
|
@@ -1430,29 +1464,30 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
1430
1464
|
=========================================
|
|
1431
1465
|
END OF wrappy@1.0.2 AND INFORMATION
|
|
1432
1466
|
|
|
1433
|
-
%% ws@8.
|
|
1467
|
+
%% ws@8.17.1 NOTICES AND INFORMATION BEGIN HERE
|
|
1434
1468
|
=========================================
|
|
1435
1469
|
Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
|
|
1470
|
+
Copyright (c) 2013 Arnout Kazemier and contributors
|
|
1471
|
+
Copyright (c) 2016 Luigi Pinca and contributors
|
|
1436
1472
|
|
|
1437
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1473
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
1474
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
1475
|
+
the Software without restriction, including without limitation the rights to
|
|
1476
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
1477
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
1478
|
+
subject to the following conditions:
|
|
1443
1479
|
|
|
1444
1480
|
The above copyright notice and this permission notice shall be included in all
|
|
1445
1481
|
copies or substantial portions of the Software.
|
|
1446
1482
|
|
|
1447
1483
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1448
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
SOFTWARE.
|
|
1484
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
1485
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
1486
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
1487
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
1488
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1454
1489
|
=========================================
|
|
1455
|
-
END OF ws@8.
|
|
1490
|
+
END OF ws@8.17.1 AND INFORMATION
|
|
1456
1491
|
|
|
1457
1492
|
%% yauzl@2.10.0 NOTICES AND INFORMATION BEGIN HERE
|
|
1458
1493
|
=========================================
|
|
@@ -1508,6 +1543,6 @@ END OF yazl@2.5.1 AND INFORMATION
|
|
|
1508
1543
|
|
|
1509
1544
|
SUMMARY BEGIN HERE
|
|
1510
1545
|
=========================================
|
|
1511
|
-
Total Packages:
|
|
1546
|
+
Total Packages: 46
|
|
1512
1547
|
=========================================
|
|
1513
1548
|
END OF SUMMARY
|
package/browsers.json
CHANGED
|
@@ -3,60 +3,50 @@
|
|
|
3
3
|
"browsers": [
|
|
4
4
|
{
|
|
5
5
|
"name": "chromium",
|
|
6
|
-
"revision": "
|
|
6
|
+
"revision": "1134",
|
|
7
7
|
"installByDefault": true,
|
|
8
|
-
"browserVersion": "
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"name": "chromium-with-symbols",
|
|
12
|
-
"revision": "1105",
|
|
13
|
-
"installByDefault": false,
|
|
14
|
-
"browserVersion": "123.0.6312.4"
|
|
8
|
+
"browserVersion": "129.0.6668.29"
|
|
15
9
|
},
|
|
16
10
|
{
|
|
17
11
|
"name": "chromium-tip-of-tree",
|
|
18
|
-
"revision": "
|
|
12
|
+
"revision": "1256",
|
|
19
13
|
"installByDefault": false,
|
|
20
|
-
"browserVersion": "
|
|
14
|
+
"browserVersion": "130.0.6695.0"
|
|
21
15
|
},
|
|
22
16
|
{
|
|
23
17
|
"name": "firefox",
|
|
24
|
-
"revision": "
|
|
18
|
+
"revision": "1463",
|
|
25
19
|
"installByDefault": true,
|
|
26
|
-
"browserVersion": "
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "firefox-asan",
|
|
30
|
-
"revision": "1440",
|
|
31
|
-
"installByDefault": false,
|
|
32
|
-
"browserVersion": "123.0"
|
|
20
|
+
"browserVersion": "130.0"
|
|
33
21
|
},
|
|
34
22
|
{
|
|
35
23
|
"name": "firefox-beta",
|
|
36
|
-
"revision": "
|
|
24
|
+
"revision": "1462",
|
|
37
25
|
"installByDefault": false,
|
|
38
|
-
"browserVersion": "
|
|
26
|
+
"browserVersion": "130.0b2"
|
|
39
27
|
},
|
|
40
28
|
{
|
|
41
29
|
"name": "webkit",
|
|
42
|
-
"revision": "
|
|
30
|
+
"revision": "2070",
|
|
43
31
|
"installByDefault": true,
|
|
44
32
|
"revisionOverrides": {
|
|
45
33
|
"mac10.14": "1446",
|
|
46
34
|
"mac10.15": "1616",
|
|
47
35
|
"mac11": "1816",
|
|
48
|
-
"mac11-arm64": "1816"
|
|
36
|
+
"mac11-arm64": "1816",
|
|
37
|
+
"mac12": "2009",
|
|
38
|
+
"mac12-arm64": "2009"
|
|
49
39
|
},
|
|
50
|
-
"browserVersion": "
|
|
40
|
+
"browserVersion": "18.0"
|
|
51
41
|
},
|
|
52
42
|
{
|
|
53
43
|
"name": "ffmpeg",
|
|
54
|
-
"revision": "
|
|
44
|
+
"revision": "1010",
|
|
55
45
|
"installByDefault": true
|
|
56
46
|
},
|
|
57
47
|
{
|
|
58
48
|
"name": "android",
|
|
59
|
-
"revision": "
|
|
49
|
+
"revision": "1001",
|
|
60
50
|
"installByDefault": false
|
|
61
51
|
}
|
|
62
52
|
]
|
package/lib/androidServerImpl.js
CHANGED
|
@@ -52,7 +52,7 @@ class AndroidServerLauncherImpl {
|
|
|
52
52
|
maxConnections: 1,
|
|
53
53
|
preLaunchedAndroidDevice: device
|
|
54
54
|
});
|
|
55
|
-
const wsEndpoint = await server.listen(options.port);
|
|
55
|
+
const wsEndpoint = await server.listen(options.port, options.host);
|
|
56
56
|
|
|
57
57
|
// 3. Return the BrowserServer interface
|
|
58
58
|
const browserServer = new _utilsBundle.ws.EventEmitter();
|
package/lib/browserServerImpl.js
CHANGED
|
@@ -65,7 +65,7 @@ class BrowserServerLauncherImpl {
|
|
|
65
65
|
preLaunchedBrowser: browser,
|
|
66
66
|
preLaunchedSocksProxy: socksProxy
|
|
67
67
|
});
|
|
68
|
-
const wsEndpoint = await server.listen(options.port);
|
|
68
|
+
const wsEndpoint = await server.listen(options.port, options.host);
|
|
69
69
|
|
|
70
70
|
// 3. Return the BrowserServer interface
|
|
71
71
|
const browserServer = new _utilsBundle.ws.EventEmitter();
|
package/lib/cli/driver.js
CHANGED
|
@@ -53,9 +53,7 @@ function runDriver() {
|
|
|
53
53
|
// Certain Language Binding JSON parsers (e.g. .NET) do not like strings with lone surrogates.
|
|
54
54
|
const isJavaScriptLanguageBinding = !process.env.PW_LANG_NAME || process.env.PW_LANG_NAME === 'javascript';
|
|
55
55
|
const replacer = !isJavaScriptLanguageBinding && String.prototype.toWellFormed ? (key, value) => {
|
|
56
|
-
if (typeof value === 'string')
|
|
57
|
-
// @ts-expect-error
|
|
58
|
-
return value.toWellFormed();
|
|
56
|
+
if (typeof value === 'string') return value.toWellFormed();
|
|
59
57
|
return value;
|
|
60
58
|
} : undefined;
|
|
61
59
|
dispatcherConnection.onmessage = message => transport.send(JSON.stringify(message, replacer));
|
package/lib/cli/program.js
CHANGED
|
@@ -229,18 +229,11 @@ _utilsBundle.program.command('show-trace [trace...]').option('-b, --browser <bro
|
|
|
229
229
|
if (options.browser === 'ff') options.browser = 'firefox';
|
|
230
230
|
if (options.browser === 'wk') options.browser = 'webkit';
|
|
231
231
|
const openOptions = {
|
|
232
|
-
headless: false,
|
|
233
232
|
host: options.host,
|
|
234
233
|
port: +options.port,
|
|
235
234
|
isServer: !!options.stdin
|
|
236
235
|
};
|
|
237
|
-
if (options.port !== undefined || options.host !== undefined)
|
|
238
|
-
(0, _traceViewer.openTraceInBrowser)(traces, openOptions).catch(logErrorAndExit);
|
|
239
|
-
} else {
|
|
240
|
-
(0, _traceViewer.openTraceViewerApp)(traces, options.browser, openOptions).then(page => {
|
|
241
|
-
page.on('close', () => (0, _utils.gracefullyProcessExitDoNotHang)(0));
|
|
242
|
-
}).catch(logErrorAndExit);
|
|
243
|
-
}
|
|
236
|
+
if (options.port !== undefined || options.host !== undefined) (0, _traceViewer.runTraceInBrowser)(traces, openOptions).catch(logErrorAndExit);else (0, _traceViewer.runTraceViewerApp)(traces, options.browser, openOptions, true).catch(logErrorAndExit);
|
|
244
237
|
}).addHelpText('afterAll', `
|
|
245
238
|
Examples:
|
|
246
239
|
|
|
@@ -459,6 +452,9 @@ async function codegen(options, url) {
|
|
|
459
452
|
launchOptions,
|
|
460
453
|
contextOptions
|
|
461
454
|
} = await launchContext(options, !!process.env.PWTEST_CLI_HEADLESS, process.env.PWTEST_CLI_EXECUTABLE_PATH);
|
|
455
|
+
_utilsBundle.dotenv.config({
|
|
456
|
+
path: 'playwright.env'
|
|
457
|
+
});
|
|
462
458
|
await context._enableRecorder({
|
|
463
459
|
language,
|
|
464
460
|
launchOptions,
|
|
@@ -467,8 +463,7 @@ async function codegen(options, url) {
|
|
|
467
463
|
saveStorage: options.saveStorage,
|
|
468
464
|
mode: 'recording',
|
|
469
465
|
testIdAttributeName,
|
|
470
|
-
outputFile: outputFile ? _path.default.resolve(outputFile) : undefined
|
|
471
|
-
handleSIGINT: false
|
|
466
|
+
outputFile: outputFile ? _path.default.resolve(outputFile) : undefined
|
|
472
467
|
});
|
|
473
468
|
await openPage(context, url);
|
|
474
469
|
}
|
package/lib/client/android.js
CHANGED
package/lib/client/api.js
CHANGED
|
@@ -81,6 +81,12 @@ Object.defineProperty(exports, "CDPSession", {
|
|
|
81
81
|
return _cdpSession.CDPSession;
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
+
Object.defineProperty(exports, "Clock", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _clock.Clock;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
84
90
|
Object.defineProperty(exports, "ConsoleMessage", {
|
|
85
91
|
enumerable: true,
|
|
86
92
|
get: function () {
|
|
@@ -248,6 +254,7 @@ var _android = require("./android");
|
|
|
248
254
|
var _browser = require("./browser");
|
|
249
255
|
var _browserContext = require("./browserContext");
|
|
250
256
|
var _browserType = require("./browserType");
|
|
257
|
+
var _clock = require("./clock");
|
|
251
258
|
var _consoleMessage = require("./consoleMessage");
|
|
252
259
|
var _coverage = require("./coverage");
|
|
253
260
|
var _dialog = require("./dialog");
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.BrowserContext = void 0;
|
|
7
7
|
exports.prepareBrowserContextParams = prepareBrowserContextParams;
|
|
8
|
+
exports.toClientCertificatesProtocol = toClientCertificatesProtocol;
|
|
8
9
|
var _page = require("./page");
|
|
9
10
|
var _frame = require("./frame");
|
|
10
11
|
var network = _interopRequireWildcard(require("./network"));
|
|
@@ -18,7 +19,6 @@ var _events = require("./events");
|
|
|
18
19
|
var _timeoutSettings = require("../common/timeoutSettings");
|
|
19
20
|
var _waiter = require("./waiter");
|
|
20
21
|
var _utils = require("../utils");
|
|
21
|
-
var _fileUtils = require("../utils/fileUtils");
|
|
22
22
|
var _cdpSession = require("./cdpSession");
|
|
23
23
|
var _tracing = require("./tracing");
|
|
24
24
|
var _artifact = require("./artifact");
|
|
@@ -29,6 +29,7 @@ var _consoleMessage = require("./consoleMessage");
|
|
|
29
29
|
var _dialog = require("./dialog");
|
|
30
30
|
var _webError = require("./webError");
|
|
31
31
|
var _errors = require("./errors");
|
|
32
|
+
var _clock = require("./clock");
|
|
32
33
|
let _Symbol$asyncDispose;
|
|
33
34
|
/**
|
|
34
35
|
* Copyright 2017 Google Inc. All rights reserved.
|
|
@@ -71,6 +72,7 @@ class BrowserContext extends _channelOwner.ChannelOwner {
|
|
|
71
72
|
this._options = {};
|
|
72
73
|
this.request = void 0;
|
|
73
74
|
this.tracing = void 0;
|
|
75
|
+
this.clock = void 0;
|
|
74
76
|
this._backgroundPages = new Set();
|
|
75
77
|
this._serviceWorkers = new Set();
|
|
76
78
|
this._isChromium = void 0;
|
|
@@ -83,6 +85,7 @@ class BrowserContext extends _channelOwner.ChannelOwner {
|
|
|
83
85
|
this._isChromium = ((_this$_browser2 = this._browser) === null || _this$_browser2 === void 0 ? void 0 : _this$_browser2._name) === 'chromium';
|
|
84
86
|
this.tracing = _tracing.Tracing.from(initializer.tracing);
|
|
85
87
|
this.request = _fetch.APIRequestContext.from(initializer.requestContext);
|
|
88
|
+
this.clock = new _clock.Clock(this);
|
|
86
89
|
this._channel.on('bindingCall', ({
|
|
87
90
|
binding
|
|
88
91
|
}) => this._onBinding(_page.BindingCall.from(binding)));
|
|
@@ -257,8 +260,18 @@ class BrowserContext extends _channelOwner.ChannelOwner {
|
|
|
257
260
|
cookies
|
|
258
261
|
});
|
|
259
262
|
}
|
|
260
|
-
async clearCookies() {
|
|
261
|
-
await this._channel.clearCookies(
|
|
263
|
+
async clearCookies(options = {}) {
|
|
264
|
+
await this._channel.clearCookies({
|
|
265
|
+
name: (0, _utils.isString)(options.name) ? options.name : undefined,
|
|
266
|
+
nameRegexSource: (0, _utils.isRegExp)(options.name) ? options.name.source : undefined,
|
|
267
|
+
nameRegexFlags: (0, _utils.isRegExp)(options.name) ? options.name.flags : undefined,
|
|
268
|
+
domain: (0, _utils.isString)(options.domain) ? options.domain : undefined,
|
|
269
|
+
domainRegexSource: (0, _utils.isRegExp)(options.domain) ? options.domain.source : undefined,
|
|
270
|
+
domainRegexFlags: (0, _utils.isRegExp)(options.domain) ? options.domain.flags : undefined,
|
|
271
|
+
path: (0, _utils.isString)(options.path) ? options.path : undefined,
|
|
272
|
+
pathRegexSource: (0, _utils.isRegExp)(options.path) ? options.path.source : undefined,
|
|
273
|
+
pathRegexFlags: (0, _utils.isRegExp)(options.path) ? options.path.flags : undefined
|
|
274
|
+
});
|
|
262
275
|
}
|
|
263
276
|
async grantPermissions(permissions, options) {
|
|
264
277
|
await this._channel.grantPermissions({
|
|
@@ -391,7 +404,7 @@ class BrowserContext extends _channelOwner.ChannelOwner {
|
|
|
391
404
|
async storageState(options = {}) {
|
|
392
405
|
const state = await this._channel.storageState();
|
|
393
406
|
if (options.path) {
|
|
394
|
-
await (0,
|
|
407
|
+
await (0, _utils.mkdirIfNeeded)(options.path);
|
|
395
408
|
await _fs.default.promises.writeFile(options.path, JSON.stringify(state, undefined, 2), 'utf8');
|
|
396
409
|
}
|
|
397
410
|
return state;
|
|
@@ -417,6 +430,7 @@ class BrowserContext extends _channelOwner.ChannelOwner {
|
|
|
417
430
|
if (this._browser) this._browser._contexts.delete(this);
|
|
418
431
|
(_this$_browserType = this._browserType) === null || _this$_browserType === void 0 || (_this$_browserType = _this$_browserType._contexts) === null || _this$_browserType === void 0 || _this$_browserType.delete(this);
|
|
419
432
|
this._disposeHarRouters();
|
|
433
|
+
this.tracing._resetStackCounter();
|
|
420
434
|
this.emit(_events.Events.BrowserContext.Close, this);
|
|
421
435
|
}
|
|
422
436
|
async [_Symbol$asyncDispose]() {
|
|
@@ -426,6 +440,9 @@ class BrowserContext extends _channelOwner.ChannelOwner {
|
|
|
426
440
|
if (this._closeWasCalled) return;
|
|
427
441
|
this._closeReason = options.reason;
|
|
428
442
|
this._closeWasCalled = true;
|
|
443
|
+
await this._wrapApiCall(async () => {
|
|
444
|
+
await this.request.dispose(options);
|
|
445
|
+
}, true);
|
|
429
446
|
await this._wrapApiCall(async () => {
|
|
430
447
|
var _this$_browserType2;
|
|
431
448
|
await ((_this$_browserType2 = this._browserType) === null || _this$_browserType2 === void 0 ? void 0 : _this$_browserType2._willCloseContext(this));
|
|
@@ -491,7 +508,8 @@ async function prepareBrowserContextParams(options) {
|
|
|
491
508
|
colorScheme: options.colorScheme === null ? 'no-override' : options.colorScheme,
|
|
492
509
|
reducedMotion: options.reducedMotion === null ? 'no-override' : options.reducedMotion,
|
|
493
510
|
forcedColors: options.forcedColors === null ? 'no-override' : options.forcedColors,
|
|
494
|
-
acceptDownloads: toAcceptDownloadsProtocol(options.acceptDownloads)
|
|
511
|
+
acceptDownloads: toAcceptDownloadsProtocol(options.acceptDownloads),
|
|
512
|
+
clientCertificates: await toClientCertificatesProtocol(options.clientCertificates)
|
|
495
513
|
};
|
|
496
514
|
if (!contextParams.recordVideo && options.videosPath) {
|
|
497
515
|
contextParams.recordVideo = {
|
|
@@ -506,4 +524,18 @@ function toAcceptDownloadsProtocol(acceptDownloads) {
|
|
|
506
524
|
if (acceptDownloads === undefined) return undefined;
|
|
507
525
|
if (acceptDownloads) return 'accept';
|
|
508
526
|
return 'deny';
|
|
527
|
+
}
|
|
528
|
+
async function toClientCertificatesProtocol(certs) {
|
|
529
|
+
if (!certs) return undefined;
|
|
530
|
+
const bufferizeContent = async (value, path) => {
|
|
531
|
+
if (value) return value;
|
|
532
|
+
if (path) return await _fs.default.promises.readFile(path);
|
|
533
|
+
};
|
|
534
|
+
return await Promise.all(certs.map(async cert => ({
|
|
535
|
+
origin: cert.origin,
|
|
536
|
+
cert: await bufferizeContent(cert.cert, cert.certPath),
|
|
537
|
+
key: await bufferizeContent(cert.key, cert.keyPath),
|
|
538
|
+
pfx: await bufferizeContent(cert.pfx, cert.pfxPath),
|
|
539
|
+
passphrase: cert.passphrase
|
|
540
|
+
})));
|
|
509
541
|
}
|