patchright-core 1.50.0 → 1.51.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/ThirdPartyNotices.txt +381 -55
- package/browsers.json +22 -10
- package/index.js +0 -1
- package/lib/androidServerImpl.js +4 -4
- package/lib/browserServerImpl.js +18 -9
- package/lib/cli/driver.js +6 -6
- package/lib/cli/program.js +9 -9
- package/lib/cli/programWithTestStub.js +2 -1
- package/lib/client/android.js +37 -58
- package/lib/client/artifact.js +4 -7
- package/lib/client/browser.js +10 -15
- package/lib/client/browserContext.js +77 -73
- package/lib/client/browserType.js +30 -64
- package/lib/client/channelOwner.js +23 -20
- package/lib/client/clientHelper.js +5 -7
- package/lib/client/clientStackTrace.js +65 -0
- package/lib/client/connection.js +46 -39
- package/lib/client/consoleMessage.js +4 -7
- package/lib/client/electron.js +10 -10
- package/lib/client/elementHandle.js +32 -33
- package/lib/client/errors.js +2 -2
- package/lib/client/eventEmitter.js +5 -8
- package/lib/client/fetch.js +60 -61
- package/lib/client/fileUtils.js +31 -0
- package/lib/client/frame.js +30 -29
- package/lib/client/harRouter.js +7 -9
- package/lib/client/jsHandle.js +3 -4
- package/lib/client/localUtils.js +24 -0
- package/lib/client/locator.js +37 -18
- package/lib/client/network.js +40 -40
- package/lib/client/page.js +59 -55
- package/lib/client/platform.js +71 -0
- package/lib/client/playwright.js +21 -1
- package/lib/client/selectors.js +8 -2
- package/lib/client/stream.js +2 -21
- package/lib/client/timeoutSettings.js +65 -0
- package/lib/client/tracing.js +10 -7
- package/lib/client/video.js +2 -2
- package/lib/client/waiter.js +5 -6
- package/lib/client/webSocket.js +106 -0
- package/lib/client/worker.js +12 -10
- package/lib/client/writableStream.js +2 -21
- package/lib/generated/consoleApiSource.js +1 -1
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/generated/pollingRecorderSource.js +1 -1
- package/lib/inProcessFactory.js +6 -3
- package/lib/outofprocess.js +12 -8
- package/lib/protocol/validator.js +64 -13
- package/lib/protocol/validatorPrimitives.js +1 -2
- package/lib/remote/playwrightConnection.js +18 -10
- package/lib/remote/playwrightServer.js +20 -7
- package/lib/server/android/android.js +17 -14
- package/lib/server/android/backendAdb.js +14 -14
- package/lib/server/artifact.js +3 -3
- package/lib/server/bidi/bidiBrowser.js +2 -2
- package/lib/server/bidi/bidiChromium.js +4 -3
- package/lib/server/bidi/bidiConnection.js +1 -1
- package/lib/server/bidi/bidiExecutionContext.js +70 -40
- package/lib/server/bidi/bidiFirefox.js +4 -3
- package/lib/server/bidi/bidiInput.js +5 -8
- package/lib/server/bidi/bidiNetworkManager.js +3 -3
- package/lib/server/bidi/bidiOverCdp.js +2 -2
- package/lib/server/bidi/bidiPage.js +30 -46
- package/lib/server/bidi/third_party/firefoxPrefs.js +19 -3
- package/lib/server/browser.js +2 -2
- package/lib/server/browserContext.js +37 -40
- package/lib/server/browserType.js +18 -17
- package/lib/{utils/sequence.js → server/callLog.js} +18 -3
- package/lib/server/chromium/chromium.js +14 -14
- package/lib/server/chromium/chromiumSwitches.js +32 -1
- package/lib/server/chromium/crBrowser.js +15 -14
- package/lib/server/chromium/crConnection.js +2 -2
- package/lib/server/chromium/crCoverage.js +1 -1
- package/lib/server/chromium/crDevTools.js +1 -1
- package/lib/server/chromium/crDragDrop.js +1 -1
- package/lib/server/chromium/crExecutionContext.js +25 -17
- package/lib/server/chromium/crInput.js +2 -2
- package/lib/server/chromium/crNetworkManager.js +73 -26
- package/lib/server/chromium/crPage.js +22 -23
- package/lib/server/chromium/crPdf.js +1 -1
- package/lib/server/chromium/crProtocolHelper.js +3 -3
- package/lib/server/chromium/crServiceWorker.js +2 -2
- package/lib/server/chromium/videoRecorder.js +2 -2
- package/lib/server/clock.js +1 -1
- package/lib/server/codegen/javascript.js +1 -1
- package/lib/server/codegen/languages.js +2 -2
- package/lib/server/debugController.js +3 -3
- package/lib/server/deviceDescriptors.js +1 -1
- package/lib/server/deviceDescriptorsSource.json +131 -131
- package/lib/server/dispatchers/androidDispatcher.js +1 -1
- package/lib/server/dispatchers/artifactDispatcher.js +3 -3
- package/lib/server/dispatchers/browserContextDispatcher.js +19 -19
- package/lib/server/dispatchers/browserTypeDispatcher.js +1 -1
- package/lib/server/dispatchers/cdpSessionDispatcher.js +1 -1
- package/lib/server/dispatchers/dispatcher.js +27 -25
- package/lib/server/dispatchers/electronDispatcher.js +3 -3
- package/lib/server/dispatchers/elementHandlerDispatcher.js +7 -2
- package/lib/server/dispatchers/frameDispatcher.js +4 -4
- package/lib/server/dispatchers/jsHandleDispatcher.js +2 -2
- package/lib/server/dispatchers/jsonPipeDispatcher.js +2 -2
- package/lib/server/dispatchers/localUtilsDispatcher.js +25 -298
- package/lib/server/dispatchers/networkDispatchers.js +3 -3
- package/lib/server/dispatchers/pageDispatcher.js +11 -9
- package/lib/server/dispatchers/playwrightDispatcher.js +5 -5
- package/lib/server/dispatchers/streamDispatcher.js +4 -3
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +8 -7
- package/lib/server/dispatchers/writableStreamDispatcher.js +5 -6
- package/lib/server/dom.js +18 -12
- package/lib/server/download.js +1 -1
- package/lib/server/electron/electron.js +17 -16
- package/lib/server/errors.js +1 -1
- package/lib/server/fetch.js +50 -45
- package/lib/server/fileUploadUtils.js +7 -4
- package/lib/server/firefox/ffBrowser.js +11 -3
- package/lib/server/firefox/ffConnection.js +1 -1
- package/lib/server/firefox/ffExecutionContext.js +25 -17
- package/lib/server/firefox/ffNetworkManager.js +2 -2
- package/lib/server/firefox/ffPage.js +15 -21
- package/lib/server/firefox/firefox.js +7 -9
- package/lib/server/frameSelectors.js +1 -1
- package/lib/server/frames.js +366 -209
- package/lib/server/har/harRecorder.js +4 -4
- package/lib/server/har/harTracer.js +7 -8
- package/lib/server/harBackend.js +157 -0
- package/lib/server/helper.js +2 -2
- package/lib/server/index.js +1 -8
- package/lib/server/input.js +1 -1
- package/lib/server/instrumentation.js +2 -2
- package/lib/server/isomorphic/utilityScriptSerializers.js +3 -0
- package/lib/server/javascript.js +46 -33
- package/lib/server/launchApp.js +2 -2
- package/lib/server/localUtils.js +203 -0
- package/lib/server/network.js +3 -3
- package/lib/server/page.js +41 -22
- package/lib/server/pipeTransport.js +1 -1
- package/lib/server/playwright.js +5 -5
- package/lib/server/progress.js +1 -1
- package/lib/server/protocolError.js +1 -1
- package/lib/server/recorder/contextRecorder.js +3 -3
- package/lib/server/recorder/recorderApp.js +18 -12
- package/lib/server/recorder/recorderCollection.js +4 -4
- package/lib/server/recorder/throttledFile.js +3 -4
- package/lib/server/recorder.js +7 -5
- package/lib/server/registry/browserFetcher.js +9 -7
- package/lib/server/registry/dependencies.js +15 -15
- package/lib/server/registry/index.js +38 -44
- package/lib/server/registry/oopDownloadBrowserMain.js +3 -3
- package/lib/server/screenshotter.js +1 -1
- package/lib/server/selectors.js +3 -3
- package/lib/server/socksClientCertificatesInterceptor.js +9 -9
- package/lib/server/socksInterceptor.js +8 -5
- package/lib/server/storageScript.js +160 -0
- package/lib/{common → server}/timeoutSettings.js +6 -5
- package/lib/server/trace/recorder/snapshotter.js +9 -8
- package/lib/server/trace/recorder/tracing.js +40 -31
- package/lib/server/trace/test/inMemorySnapshotter.js +4 -4
- package/lib/server/trace/viewer/traceViewer.js +13 -5
- package/lib/server/transport.js +2 -2
- package/lib/{utils → server/utils}/comparators.js +4 -4
- package/lib/{utils → server/utils}/crypto.js +4 -4
- package/lib/{utils → server/utils}/debug.js +4 -12
- package/lib/{utils → server/utils}/debugLogger.js +2 -2
- package/lib/{utils → server/utils}/env.js +4 -0
- package/lib/{utils → server/utils}/expectUtils.js +1 -1
- package/lib/{utils → server/utils}/fileUtils.js +4 -5
- package/lib/{utils/happy-eyeballs.js → server/utils/happyEyeballs.js} +22 -24
- package/lib/{utils → server/utils}/hostPlatform.js +1 -1
- package/lib/{utils → server/utils}/httpServer.js +8 -12
- package/lib/{utils → server/utils}/linuxUtils.js +3 -23
- package/lib/{utils → server/utils}/network.js +5 -5
- package/lib/server/utils/nodePlatform.js +140 -0
- package/lib/{protocol/transport.js → server/utils/pipeTransport.js} +2 -2
- package/lib/{utils → server/utils}/processLauncher.js +5 -5
- package/lib/{utils → server/utils}/profiler.js +5 -6
- package/lib/{common → server/utils}/socksProxy.js +10 -9
- package/lib/{utils → server/utils}/userAgent.js +2 -16
- package/lib/{utils → server/utils}/wsServer.js +3 -3
- package/lib/{utils → server/utils}/zipFile.js +1 -1
- package/lib/{utils → server/utils}/zones.js +9 -24
- package/lib/server/webkit/webkit.js +4 -4
- package/lib/server/webkit/wkBrowser.js +4 -4
- package/lib/server/webkit/wkConnection.js +1 -1
- package/lib/server/webkit/wkExecutionContext.js +25 -17
- package/lib/server/webkit/wkInput.js +2 -2
- package/lib/server/webkit/wkInterceptableRequest.js +2 -2
- package/lib/server/webkit/wkPage.js +41 -40
- package/lib/server/webkit/wkProvisionalPage.js +1 -1
- package/lib/server/webkit/wkWorkers.js +2 -2
- package/lib/utils/isomorphic/ariaSnapshot.js +2 -1
- package/lib/utils/isomorphic/assert.js +25 -0
- package/lib/utils/isomorphic/colors.js +65 -0
- package/lib/utils/isomorphic/cssParser.js +1 -1
- package/lib/utils/isomorphic/locatorGenerators.js +13 -1
- package/lib/utils/isomorphic/locatorParser.js +2 -2
- package/lib/utils/{manualPromise.js → isomorphic/manualPromise.js} +3 -5
- package/lib/utils/isomorphic/mimeType.js +11 -3
- package/lib/utils/{multimap.js → isomorphic/multimap.js} +1 -3
- package/lib/utils/{rtti.js → isomorphic/rtti.js} +2 -5
- package/lib/utils/isomorphic/stackTrace.js +169 -0
- package/lib/utils/isomorphic/stringUtils.js +1 -1
- package/lib/utils/{time.js → isomorphic/time.js} +1 -13
- package/lib/utils/{timeoutRunner.js → isomorphic/timeoutRunner.js} +4 -4
- package/lib/utils/isomorphic/traceUtils.js +23 -0
- package/lib/{utils/index.js → utils.js} +200 -121
- package/lib/utilsBundle.js +1 -25
- package/lib/utilsBundleImpl/index.js +119 -121
- package/lib/vite/htmlReport/index.html +20 -20
- package/lib/vite/recorder/assets/codeMirrorModule-B9YMkrwa.js +24 -0
- package/lib/vite/recorder/assets/index-ELPgmkwA.js +184 -0
- package/lib/vite/recorder/index.html +2 -2
- package/lib/vite/traceViewer/assets/codeMirrorModule-DpJ-EmBQ.js +24 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-DTenqiGw.js +259 -0
- package/lib/vite/traceViewer/assets/{xtermModule-BeNbaIVa.js → xtermModule-BoAIEibi.js} +7 -7
- package/lib/vite/traceViewer/defaultSettingsView.5fN5lw10.css +1 -0
- package/lib/vite/traceViewer/index.CUq7VgrV.js +2 -0
- package/lib/vite/traceViewer/index.html +4 -4
- package/lib/vite/traceViewer/sw.bundle.js +3 -3
- package/lib/vite/traceViewer/uiMode.CHJSAD7F.js +5 -0
- package/lib/vite/traceViewer/uiMode.html +4 -4
- package/lib/zipBundleImpl.js +4 -4
- package/package.json +7 -7
- package/types/protocol.d.ts +123 -99
- package/types/types.d.ts +110 -38
- package/lib/utils/stackTrace.js +0 -134
- package/lib/utils/traceUtils.js +0 -44
- package/lib/vite/recorder/assets/codeMirrorModule-3Qn3tPnZ.js +0 -24
- package/lib/vite/recorder/assets/index-Bek6JFv8.js +0 -184
- package/lib/vite/traceViewer/assets/codeMirrorModule-aLkSUGpW.js +0 -24
- package/lib/vite/traceViewer/assets/defaultSettingsView-CxUo6zd3.js +0 -243
- package/lib/vite/traceViewer/defaultSettingsView.DtIkrKWn.css +0 -1
- package/lib/vite/traceViewer/index.Bhu5cv5R.js +0 -2
- package/lib/vite/traceViewer/uiMode.BBy7FOVd.js +0 -5
- /package/lib/{utils → server/utils}/ascii.js +0 -0
- /package/lib/{utils → server/utils}/eventsHelper.js +0 -0
- /package/lib/{image_tools → server/utils/image_tools}/colorUtils.js +0 -0
- /package/lib/{image_tools → server/utils/image_tools}/compare.js +0 -0
- /package/lib/{image_tools → server/utils/image_tools}/imageChannel.js +0 -0
- /package/lib/{image_tools → server/utils/image_tools}/stats.js +0 -0
- /package/lib/{utils → server/utils}/spawnAsync.js +0 -0
- /package/lib/{utils → server/utils}/task.js +0 -0
- /package/lib/utils/{headers.js → isomorphic/headers.js} +0 -0
- /package/lib/utils/{semaphore.js → isomorphic/semaphore.js} +0 -0
- /package/lib/{common → utils/isomorphic}/types.js +0 -0
- /package/lib/vite/recorder/assets/{codeMirrorModule-ez37Vkbh.css → codeMirrorModule-C3UTv-Ge.css} +0 -0
- /package/lib/vite/recorder/assets/{index-CAQewHss.css → index-eHBmevrY.css} +0 -0
- /package/lib/vite/traceViewer/{codeMirrorModule.ez37Vkbh.css → codeMirrorModule.C3UTv-Ge.css} +0 -0
- /package/lib/vite/traceViewer/{index.CrbWWHbf.css → index.CFOW-Ezb.css} +0 -0
- /package/lib/vite/traceViewer/{uiMode.Be_ME-Go.css → uiMode.BatfzHMG.css} +0 -0
- /package/lib/vite/traceViewer/{xtermModule.DSXBckUd.css → xtermModule.Beg8tuEN.css} +0 -0
package/ThirdPartyNotices.txt
CHANGED
|
@@ -6,7 +6,7 @@ This project incorporates components from the projects listed below. The origina
|
|
|
6
6
|
|
|
7
7
|
- @types/node@17.0.24 (https://github.com/DefinitelyTyped/DefinitelyTyped)
|
|
8
8
|
- @types/yauzl@2.10.0 (https://github.com/DefinitelyTyped/DefinitelyTyped)
|
|
9
|
-
- agent-base@
|
|
9
|
+
- agent-base@6.0.2 (https://github.com/TooTallNate/node-agent-base)
|
|
10
10
|
- balanced-match@1.0.2 (https://github.com/juliangruber/balanced-match)
|
|
11
11
|
- brace-expansion@1.1.11 (https://github.com/juliangruber/brace-expansion)
|
|
12
12
|
- buffer-crc32@0.2.13 (https://github.com/brianloveswords/buffer-crc32)
|
|
@@ -19,12 +19,11 @@ This project incorporates components from the projects listed below. The origina
|
|
|
19
19
|
- diff@7.0.0 (https://github.com/kpdecker/jsdiff)
|
|
20
20
|
- dotenv@16.4.5 (https://github.com/motdotla/dotenv)
|
|
21
21
|
- end-of-stream@1.4.4 (https://github.com/mafintosh/end-of-stream)
|
|
22
|
-
- escape-string-regexp@2.0.0 (https://github.com/sindresorhus/escape-string-regexp)
|
|
23
22
|
- extract-zip@2.0.1 (https://github.com/maxogden/extract-zip)
|
|
24
23
|
- fd-slicer@1.1.0 (https://github.com/andrewrk/node-fd-slicer)
|
|
25
24
|
- get-stream@5.2.0 (https://github.com/sindresorhus/get-stream)
|
|
26
25
|
- graceful-fs@4.2.10 (https://github.com/isaacs/node-graceful-fs)
|
|
27
|
-
- https-proxy-agent@
|
|
26
|
+
- https-proxy-agent@5.0.1 (https://github.com/TooTallNate/node-https-proxy-agent)
|
|
28
27
|
- ip-address@9.0.5 (https://github.com/beaugunderson/ip-address)
|
|
29
28
|
- is-docker@2.2.1 (https://github.com/sindresorhus/is-docker)
|
|
30
29
|
- is-wsl@2.2.0 (https://github.com/sindresorhus/is-wsl)
|
|
@@ -43,10 +42,9 @@ This project incorporates components from the projects listed below. The origina
|
|
|
43
42
|
- retry@0.12.0 (https://github.com/tim-kos/node-retry)
|
|
44
43
|
- signal-exit@3.0.7 (https://github.com/tapjs/signal-exit)
|
|
45
44
|
- smart-buffer@4.2.0 (https://github.com/JoshGlazebrook/smart-buffer)
|
|
46
|
-
- socks-proxy-agent@
|
|
45
|
+
- socks-proxy-agent@6.1.1 (https://github.com/TooTallNate/node-socks-proxy-agent)
|
|
47
46
|
- socks@2.8.3 (https://github.com/JoshGlazebrook/socks)
|
|
48
47
|
- sprintf-js@1.1.3 (https://github.com/alexei/sprintf.js)
|
|
49
|
-
- stack-utils@2.0.5 (https://github.com/tapjs/stack-utils)
|
|
50
48
|
- wrappy@1.0.2 (https://github.com/npm/wrappy)
|
|
51
49
|
- ws@8.17.1 (https://github.com/websockets/ws)
|
|
52
50
|
- yaml@2.6.0 (https://github.com/eemeli/yaml)
|
|
@@ -105,11 +103,128 @@ MIT License
|
|
|
105
103
|
=========================================
|
|
106
104
|
END OF @types/yauzl@2.10.0 AND INFORMATION
|
|
107
105
|
|
|
108
|
-
%% agent-base@
|
|
106
|
+
%% agent-base@6.0.2 NOTICES AND INFORMATION BEGIN HERE
|
|
109
107
|
=========================================
|
|
108
|
+
agent-base
|
|
109
|
+
==========
|
|
110
|
+
### Turn a function into an [`http.Agent`][http.Agent] instance
|
|
111
|
+
[](https://github.com/TooTallNate/node-agent-base/actions?workflow=Node+CI)
|
|
112
|
+
|
|
113
|
+
This module provides an `http.Agent` generator. That is, you pass it an async
|
|
114
|
+
callback function, and it returns a new `http.Agent` instance that will invoke the
|
|
115
|
+
given callback function when sending outbound HTTP requests.
|
|
116
|
+
|
|
117
|
+
#### Some subclasses:
|
|
118
|
+
|
|
119
|
+
Here's some more interesting uses of `agent-base`.
|
|
120
|
+
Send a pull request to list yours!
|
|
121
|
+
|
|
122
|
+
* [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints
|
|
123
|
+
* [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints
|
|
124
|
+
* [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS
|
|
125
|
+
* [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
Installation
|
|
129
|
+
------------
|
|
130
|
+
|
|
131
|
+
Install with `npm`:
|
|
132
|
+
|
|
133
|
+
``` bash
|
|
134
|
+
$ npm install agent-base
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
Example
|
|
139
|
+
-------
|
|
140
|
+
|
|
141
|
+
Here's a minimal example that creates a new `net.Socket` connection to the server
|
|
142
|
+
for every HTTP request (i.e. the equivalent of `agent: false` option):
|
|
143
|
+
|
|
144
|
+
```js
|
|
145
|
+
var net = require('net');
|
|
146
|
+
var tls = require('tls');
|
|
147
|
+
var url = require('url');
|
|
148
|
+
var http = require('http');
|
|
149
|
+
var agent = require('agent-base');
|
|
150
|
+
|
|
151
|
+
var endpoint = 'http://nodejs.org/api/';
|
|
152
|
+
var parsed = url.parse(endpoint);
|
|
153
|
+
|
|
154
|
+
// This is the important part!
|
|
155
|
+
parsed.agent = agent(function (req, opts) {
|
|
156
|
+
var socket;
|
|
157
|
+
// `secureEndpoint` is true when using the https module
|
|
158
|
+
if (opts.secureEndpoint) {
|
|
159
|
+
socket = tls.connect(opts);
|
|
160
|
+
} else {
|
|
161
|
+
socket = net.connect(opts);
|
|
162
|
+
}
|
|
163
|
+
return socket;
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
// Everything else works just like normal...
|
|
167
|
+
http.get(parsed, function (res) {
|
|
168
|
+
console.log('"response" event!', res.headers);
|
|
169
|
+
res.pipe(process.stdout);
|
|
170
|
+
});
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Returning a Promise or using an `async` function is also supported:
|
|
174
|
+
|
|
175
|
+
```js
|
|
176
|
+
agent(async function (req, opts) {
|
|
177
|
+
await sleep(1000);
|
|
178
|
+
// etc…
|
|
179
|
+
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Return another `http.Agent` instance to "pass through" the responsibility
|
|
183
|
+
for that HTTP request to that agent:
|
|
184
|
+
|
|
185
|
+
```js
|
|
186
|
+
agent(function (req, opts) {
|
|
187
|
+
return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
|
|
188
|
+
});
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
API
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Agent(Function callback[, Object options]) → [http.Agent][]
|
|
196
|
+
|
|
197
|
+
Creates a base `http.Agent` that will execute the callback function `callback`
|
|
198
|
+
for every HTTP request that it is used as the `agent` for. The callback function
|
|
199
|
+
is responsible for creating a `stream.Duplex` instance of some kind that will be
|
|
200
|
+
used as the underlying socket in the HTTP request.
|
|
201
|
+
|
|
202
|
+
The `options` object accepts the following properties:
|
|
203
|
+
|
|
204
|
+
* `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional).
|
|
205
|
+
|
|
206
|
+
The callback function should have the following signature:
|
|
207
|
+
|
|
208
|
+
### callback(http.ClientRequest req, Object options, Function cb) → undefined
|
|
209
|
+
|
|
210
|
+
The ClientRequest `req` can be accessed to read request headers and
|
|
211
|
+
and the path, etc. The `options` object contains the options passed
|
|
212
|
+
to the `http.request()`/`https.request()` function call, and is formatted
|
|
213
|
+
to be directly passed to `net.connect()`/`tls.connect()`, or however
|
|
214
|
+
else you want a Socket to be created. Pass the created socket to
|
|
215
|
+
the callback function `cb` once created, and the HTTP request will
|
|
216
|
+
continue to proceed.
|
|
217
|
+
|
|
218
|
+
If the `https` module is used to invoke the HTTP request, then the
|
|
219
|
+
`secureEndpoint` property on `options` _will be set to `true`_.
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
License
|
|
223
|
+
-------
|
|
224
|
+
|
|
110
225
|
(The MIT License)
|
|
111
226
|
|
|
112
|
-
Copyright (c) 2013 Nathan Rajlich
|
|
227
|
+
Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
|
113
228
|
|
|
114
229
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
115
230
|
a copy of this software and associated documentation files (the
|
|
@@ -129,8 +244,14 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
|
129
244
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
130
245
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
131
246
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
247
|
+
|
|
248
|
+
[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent
|
|
249
|
+
[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
|
|
250
|
+
[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent
|
|
251
|
+
[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
|
|
252
|
+
[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent
|
|
132
253
|
=========================================
|
|
133
|
-
END OF agent-base@
|
|
254
|
+
END OF agent-base@6.0.2 AND INFORMATION
|
|
134
255
|
|
|
135
256
|
%% balanced-match@1.0.2 NOTICES AND INFORMATION BEGIN HERE
|
|
136
257
|
=========================================
|
|
@@ -440,20 +561,6 @@ THE SOFTWARE.
|
|
|
440
561
|
=========================================
|
|
441
562
|
END OF end-of-stream@1.4.4 AND INFORMATION
|
|
442
563
|
|
|
443
|
-
%% escape-string-regexp@2.0.0 NOTICES AND INFORMATION BEGIN HERE
|
|
444
|
-
=========================================
|
|
445
|
-
MIT License
|
|
446
|
-
|
|
447
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
448
|
-
|
|
449
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
450
|
-
|
|
451
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
452
|
-
|
|
453
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
454
|
-
=========================================
|
|
455
|
-
END OF escape-string-regexp@2.0.0 AND INFORMATION
|
|
456
|
-
|
|
457
564
|
%% extract-zip@2.0.1 NOTICES AND INFORMATION BEGIN HERE
|
|
458
565
|
=========================================
|
|
459
566
|
Copyright (c) 2014 Max Ogden and other contributors
|
|
@@ -542,11 +649,124 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
542
649
|
=========================================
|
|
543
650
|
END OF graceful-fs@4.2.10 AND INFORMATION
|
|
544
651
|
|
|
545
|
-
%% https-proxy-agent@
|
|
652
|
+
%% https-proxy-agent@5.0.1 NOTICES AND INFORMATION BEGIN HERE
|
|
546
653
|
=========================================
|
|
654
|
+
https-proxy-agent
|
|
655
|
+
================
|
|
656
|
+
### An HTTP(s) proxy `http.Agent` implementation for HTTPS
|
|
657
|
+
[](https://github.com/TooTallNate/node-https-proxy-agent/actions?workflow=Node+CI)
|
|
658
|
+
|
|
659
|
+
This module provides an `http.Agent` implementation that connects to a specified
|
|
660
|
+
HTTP or HTTPS proxy server, and can be used with the built-in `https` module.
|
|
661
|
+
|
|
662
|
+
Specifically, this `Agent` implementation connects to an intermediary "proxy"
|
|
663
|
+
server and issues the [CONNECT HTTP method][CONNECT], which tells the proxy to
|
|
664
|
+
open a direct TCP connection to the destination server.
|
|
665
|
+
|
|
666
|
+
Since this agent implements the CONNECT HTTP method, it also works with other
|
|
667
|
+
protocols that use this method when connecting over proxies (i.e. WebSockets).
|
|
668
|
+
See the "Examples" section below for more.
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
Installation
|
|
672
|
+
------------
|
|
673
|
+
|
|
674
|
+
Install with `npm`:
|
|
675
|
+
|
|
676
|
+
``` bash
|
|
677
|
+
$ npm install https-proxy-agent
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
Examples
|
|
682
|
+
--------
|
|
683
|
+
|
|
684
|
+
#### `https` module example
|
|
685
|
+
|
|
686
|
+
``` js
|
|
687
|
+
var url = require('url');
|
|
688
|
+
var https = require('https');
|
|
689
|
+
var HttpsProxyAgent = require('https-proxy-agent');
|
|
690
|
+
|
|
691
|
+
// HTTP/HTTPS proxy to connect to
|
|
692
|
+
var proxy = process.env.http_proxy || 'http://168.63.76.32:3128';
|
|
693
|
+
console.log('using proxy server %j', proxy);
|
|
694
|
+
|
|
695
|
+
// HTTPS endpoint for the proxy to connect to
|
|
696
|
+
var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate';
|
|
697
|
+
console.log('attempting to GET %j', endpoint);
|
|
698
|
+
var options = url.parse(endpoint);
|
|
699
|
+
|
|
700
|
+
// create an instance of the `HttpsProxyAgent` class with the proxy server information
|
|
701
|
+
var agent = new HttpsProxyAgent(proxy);
|
|
702
|
+
options.agent = agent;
|
|
703
|
+
|
|
704
|
+
https.get(options, function (res) {
|
|
705
|
+
console.log('"response" event!', res.headers);
|
|
706
|
+
res.pipe(process.stdout);
|
|
707
|
+
});
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
#### `ws` WebSocket connection example
|
|
711
|
+
|
|
712
|
+
``` js
|
|
713
|
+
var url = require('url');
|
|
714
|
+
var WebSocket = require('ws');
|
|
715
|
+
var HttpsProxyAgent = require('https-proxy-agent');
|
|
716
|
+
|
|
717
|
+
// HTTP/HTTPS proxy to connect to
|
|
718
|
+
var proxy = process.env.http_proxy || 'http://168.63.76.32:3128';
|
|
719
|
+
console.log('using proxy server %j', proxy);
|
|
720
|
+
|
|
721
|
+
// WebSocket endpoint for the proxy to connect to
|
|
722
|
+
var endpoint = process.argv[2] || 'ws://echo.websocket.org';
|
|
723
|
+
var parsed = url.parse(endpoint);
|
|
724
|
+
console.log('attempting to connect to WebSocket %j', endpoint);
|
|
725
|
+
|
|
726
|
+
// create an instance of the `HttpsProxyAgent` class with the proxy server information
|
|
727
|
+
var options = url.parse(proxy);
|
|
728
|
+
|
|
729
|
+
var agent = new HttpsProxyAgent(options);
|
|
730
|
+
|
|
731
|
+
// finally, initiate the WebSocket connection
|
|
732
|
+
var socket = new WebSocket(endpoint, { agent: agent });
|
|
733
|
+
|
|
734
|
+
socket.on('open', function () {
|
|
735
|
+
console.log('"open" event!');
|
|
736
|
+
socket.send('hello world');
|
|
737
|
+
});
|
|
738
|
+
|
|
739
|
+
socket.on('message', function (data, flags) {
|
|
740
|
+
console.log('"message" event! %j %j', data, flags);
|
|
741
|
+
socket.close();
|
|
742
|
+
});
|
|
743
|
+
```
|
|
744
|
+
|
|
745
|
+
API
|
|
746
|
+
---
|
|
747
|
+
|
|
748
|
+
### new HttpsProxyAgent(Object options)
|
|
749
|
+
|
|
750
|
+
The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects
|
|
751
|
+
to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket
|
|
752
|
+
requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT].
|
|
753
|
+
|
|
754
|
+
The `options` argument may either be a string URI of the proxy server to use, or an
|
|
755
|
+
"options" object with more specific properties:
|
|
756
|
+
|
|
757
|
+
* `host` - String - Proxy host to connect to (may use `hostname` as well). Required.
|
|
758
|
+
* `port` - Number - Proxy port to connect to. Required.
|
|
759
|
+
* `protocol` - String - If `https:`, then use TLS to connect to the proxy.
|
|
760
|
+
* `headers` - Object - Additional HTTP headers to be sent on the HTTP CONNECT method.
|
|
761
|
+
* Any other options given are passed to the `net.connect()`/`tls.connect()` functions.
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
License
|
|
765
|
+
-------
|
|
766
|
+
|
|
547
767
|
(The MIT License)
|
|
548
768
|
|
|
549
|
-
Copyright (c) 2013 Nathan Rajlich
|
|
769
|
+
Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
|
550
770
|
|
|
551
771
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
552
772
|
a copy of this software and associated documentation files (the
|
|
@@ -566,8 +786,10 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
|
566
786
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
567
787
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
568
788
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
789
|
+
|
|
790
|
+
[CONNECT]: http://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_Tunneling
|
|
569
791
|
=========================================
|
|
570
|
-
END OF https-proxy-agent@
|
|
792
|
+
END OF https-proxy-agent@5.0.1 AND INFORMATION
|
|
571
793
|
|
|
572
794
|
%% ip-address@9.0.5 NOTICES AND INFORMATION BEGIN HERE
|
|
573
795
|
=========================================
|
|
@@ -1005,11 +1227,141 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
1005
1227
|
=========================================
|
|
1006
1228
|
END OF smart-buffer@4.2.0 AND INFORMATION
|
|
1007
1229
|
|
|
1008
|
-
%% socks-proxy-agent@
|
|
1230
|
+
%% socks-proxy-agent@6.1.1 NOTICES AND INFORMATION BEGIN HERE
|
|
1009
1231
|
=========================================
|
|
1232
|
+
socks-proxy-agent
|
|
1233
|
+
================
|
|
1234
|
+
### A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
|
|
1235
|
+
[](https://github.com/TooTallNate/node-socks-proxy-agent/actions?workflow=Node+CI)
|
|
1236
|
+
|
|
1237
|
+
This module provides an `http.Agent` implementation that connects to a
|
|
1238
|
+
specified SOCKS proxy server, and can be used with the built-in `http`
|
|
1239
|
+
and `https` modules.
|
|
1240
|
+
|
|
1241
|
+
It can also be used in conjunction with the `ws` module to establish a WebSocket
|
|
1242
|
+
connection over a SOCKS proxy. See the "Examples" section below.
|
|
1243
|
+
|
|
1244
|
+
Installation
|
|
1245
|
+
------------
|
|
1246
|
+
|
|
1247
|
+
Install with `npm`:
|
|
1248
|
+
|
|
1249
|
+
``` bash
|
|
1250
|
+
$ npm install socks-proxy-agent
|
|
1251
|
+
```
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
Examples
|
|
1255
|
+
--------
|
|
1256
|
+
|
|
1257
|
+
#### TypeScript example
|
|
1258
|
+
|
|
1259
|
+
```ts
|
|
1260
|
+
import https from 'https';
|
|
1261
|
+
import { SocksProxyAgent } from 'socks-proxy-agent';
|
|
1262
|
+
|
|
1263
|
+
const info = {
|
|
1264
|
+
host: 'br41.nordvpn.com',
|
|
1265
|
+
userId: 'your-name@gmail.com',
|
|
1266
|
+
password: 'abcdef12345124'
|
|
1267
|
+
};
|
|
1268
|
+
const agent = new SocksProxyAgent(info);
|
|
1269
|
+
|
|
1270
|
+
https.get('https://jsonip.org', { agent }, (res) => {
|
|
1271
|
+
console.log(res.headers);
|
|
1272
|
+
res.pipe(process.stdout);
|
|
1273
|
+
});
|
|
1274
|
+
```
|
|
1275
|
+
|
|
1276
|
+
#### `http` module example
|
|
1277
|
+
|
|
1278
|
+
```js
|
|
1279
|
+
var url = require('url');
|
|
1280
|
+
var http = require('http');
|
|
1281
|
+
var SocksProxyAgent = require('socks-proxy-agent');
|
|
1282
|
+
|
|
1283
|
+
// SOCKS proxy to connect to
|
|
1284
|
+
var proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';
|
|
1285
|
+
console.log('using proxy server %j', proxy);
|
|
1286
|
+
|
|
1287
|
+
// HTTP endpoint for the proxy to connect to
|
|
1288
|
+
var endpoint = process.argv[2] || 'http://nodejs.org/api/';
|
|
1289
|
+
console.log('attempting to GET %j', endpoint);
|
|
1290
|
+
var opts = url.parse(endpoint);
|
|
1291
|
+
|
|
1292
|
+
// create an instance of the `SocksProxyAgent` class with the proxy server information
|
|
1293
|
+
var agent = new SocksProxyAgent(proxy);
|
|
1294
|
+
opts.agent = agent;
|
|
1295
|
+
|
|
1296
|
+
http.get(opts, function (res) {
|
|
1297
|
+
console.log('"response" event!', res.headers);
|
|
1298
|
+
res.pipe(process.stdout);
|
|
1299
|
+
});
|
|
1300
|
+
```
|
|
1301
|
+
|
|
1302
|
+
#### `https` module example
|
|
1303
|
+
|
|
1304
|
+
```js
|
|
1305
|
+
var url = require('url');
|
|
1306
|
+
var https = require('https');
|
|
1307
|
+
var SocksProxyAgent = require('socks-proxy-agent');
|
|
1308
|
+
|
|
1309
|
+
// SOCKS proxy to connect to
|
|
1310
|
+
var proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';
|
|
1311
|
+
console.log('using proxy server %j', proxy);
|
|
1312
|
+
|
|
1313
|
+
// HTTP endpoint for the proxy to connect to
|
|
1314
|
+
var endpoint = process.argv[2] || 'https://encrypted.google.com/';
|
|
1315
|
+
console.log('attempting to GET %j', endpoint);
|
|
1316
|
+
var opts = url.parse(endpoint);
|
|
1317
|
+
|
|
1318
|
+
// create an instance of the `SocksProxyAgent` class with the proxy server information
|
|
1319
|
+
var agent = new SocksProxyAgent(proxy);
|
|
1320
|
+
opts.agent = agent;
|
|
1321
|
+
|
|
1322
|
+
https.get(opts, function (res) {
|
|
1323
|
+
console.log('"response" event!', res.headers);
|
|
1324
|
+
res.pipe(process.stdout);
|
|
1325
|
+
});
|
|
1326
|
+
```
|
|
1327
|
+
|
|
1328
|
+
#### `ws` WebSocket connection example
|
|
1329
|
+
|
|
1330
|
+
``` js
|
|
1331
|
+
var WebSocket = require('ws');
|
|
1332
|
+
var SocksProxyAgent = require('socks-proxy-agent');
|
|
1333
|
+
|
|
1334
|
+
// SOCKS proxy to connect to
|
|
1335
|
+
var proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';
|
|
1336
|
+
console.log('using proxy server %j', proxy);
|
|
1337
|
+
|
|
1338
|
+
// WebSocket endpoint for the proxy to connect to
|
|
1339
|
+
var endpoint = process.argv[2] || 'ws://echo.websocket.org';
|
|
1340
|
+
console.log('attempting to connect to WebSocket %j', endpoint);
|
|
1341
|
+
|
|
1342
|
+
// create an instance of the `SocksProxyAgent` class with the proxy server information
|
|
1343
|
+
var agent = new SocksProxyAgent(proxy);
|
|
1344
|
+
|
|
1345
|
+
// initiate the WebSocket connection
|
|
1346
|
+
var socket = new WebSocket(endpoint, { agent: agent });
|
|
1347
|
+
|
|
1348
|
+
socket.on('open', function () {
|
|
1349
|
+
console.log('"open" event!');
|
|
1350
|
+
socket.send('hello world');
|
|
1351
|
+
});
|
|
1352
|
+
|
|
1353
|
+
socket.on('message', function (data, flags) {
|
|
1354
|
+
console.log('"message" event! %j %j', data, flags);
|
|
1355
|
+
socket.close();
|
|
1356
|
+
});
|
|
1357
|
+
```
|
|
1358
|
+
|
|
1359
|
+
License
|
|
1360
|
+
-------
|
|
1361
|
+
|
|
1010
1362
|
(The MIT License)
|
|
1011
1363
|
|
|
1012
|
-
Copyright (c) 2013 Nathan Rajlich
|
|
1364
|
+
Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
|
1013
1365
|
|
|
1014
1366
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
1015
1367
|
a copy of this software and associated documentation files (the
|
|
@@ -1030,7 +1382,7 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
1030
1382
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
1031
1383
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1032
1384
|
=========================================
|
|
1033
|
-
END OF socks-proxy-agent@
|
|
1385
|
+
END OF socks-proxy-agent@6.1.1 AND INFORMATION
|
|
1034
1386
|
|
|
1035
1387
|
%% socks@2.8.3 NOTICES AND INFORMATION BEGIN HERE
|
|
1036
1388
|
=========================================
|
|
@@ -1086,32 +1438,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
1086
1438
|
=========================================
|
|
1087
1439
|
END OF sprintf-js@1.1.3 AND INFORMATION
|
|
1088
1440
|
|
|
1089
|
-
%% stack-utils@2.0.5 NOTICES AND INFORMATION BEGIN HERE
|
|
1090
|
-
=========================================
|
|
1091
|
-
The MIT License (MIT)
|
|
1092
|
-
|
|
1093
|
-
Copyright (c) Isaac Z. Schlueter <i@izs.me>, James Talmage <james@talmage.io> (github.com/jamestalmage), and Contributors
|
|
1094
|
-
|
|
1095
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1096
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
1097
|
-
in the Software without restriction, including without limitation the rights
|
|
1098
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1099
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
1100
|
-
furnished to do so, subject to the following conditions:
|
|
1101
|
-
|
|
1102
|
-
The above copyright notice and this permission notice shall be included in
|
|
1103
|
-
all copies or substantial portions of the Software.
|
|
1104
|
-
|
|
1105
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1106
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1107
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1108
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1109
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1110
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1111
|
-
THE SOFTWARE.
|
|
1112
|
-
=========================================
|
|
1113
|
-
END OF stack-utils@2.0.5 AND INFORMATION
|
|
1114
|
-
|
|
1115
1441
|
%% wrappy@1.0.2 NOTICES AND INFORMATION BEGIN HERE
|
|
1116
1442
|
=========================================
|
|
1117
1443
|
The ISC License
|
|
@@ -1229,6 +1555,6 @@ END OF yazl@2.5.1 AND INFORMATION
|
|
|
1229
1555
|
|
|
1230
1556
|
SUMMARY BEGIN HERE
|
|
1231
1557
|
=========================================
|
|
1232
|
-
Total Packages:
|
|
1558
|
+
Total Packages: 46
|
|
1233
1559
|
=========================================
|
|
1234
1560
|
END OF SUMMARY
|
package/browsers.json
CHANGED
|
@@ -3,31 +3,43 @@
|
|
|
3
3
|
"browsers": [
|
|
4
4
|
{
|
|
5
5
|
"name": "chromium",
|
|
6
|
-
"revision": "
|
|
6
|
+
"revision": "1161",
|
|
7
7
|
"installByDefault": true,
|
|
8
|
-
"browserVersion": "
|
|
8
|
+
"browserVersion": "134.0.6998.35"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "chromium-headless-shell",
|
|
12
|
+
"revision": "1161",
|
|
13
|
+
"installByDefault": true,
|
|
14
|
+
"browserVersion": "134.0.6998.35"
|
|
9
15
|
},
|
|
10
16
|
{
|
|
11
17
|
"name": "chromium-tip-of-tree",
|
|
12
|
-
"revision": "
|
|
18
|
+
"revision": "1304",
|
|
19
|
+
"installByDefault": false,
|
|
20
|
+
"browserVersion": "135.0.7021.0"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "chromium-tip-of-tree-headless-shell",
|
|
24
|
+
"revision": "1304",
|
|
13
25
|
"installByDefault": false,
|
|
14
|
-
"browserVersion": "
|
|
26
|
+
"browserVersion": "135.0.7021.0"
|
|
15
27
|
},
|
|
16
28
|
{
|
|
17
29
|
"name": "firefox",
|
|
18
|
-
"revision": "
|
|
30
|
+
"revision": "1475",
|
|
19
31
|
"installByDefault": true,
|
|
20
|
-
"browserVersion": "
|
|
32
|
+
"browserVersion": "135.0"
|
|
21
33
|
},
|
|
22
34
|
{
|
|
23
35
|
"name": "firefox-beta",
|
|
24
|
-
"revision": "
|
|
36
|
+
"revision": "1471",
|
|
25
37
|
"installByDefault": false,
|
|
26
|
-
"browserVersion": "
|
|
38
|
+
"browserVersion": "136.0b4"
|
|
27
39
|
},
|
|
28
40
|
{
|
|
29
41
|
"name": "webkit",
|
|
30
|
-
"revision": "
|
|
42
|
+
"revision": "2140",
|
|
31
43
|
"installByDefault": true,
|
|
32
44
|
"revisionOverrides": {
|
|
33
45
|
"debian11-x64": "2105",
|
|
@@ -41,7 +53,7 @@
|
|
|
41
53
|
"ubuntu20.04-x64": "2092",
|
|
42
54
|
"ubuntu20.04-arm64": "2092"
|
|
43
55
|
},
|
|
44
|
-
"browserVersion": "18.
|
|
56
|
+
"browserVersion": "18.4"
|
|
45
57
|
},
|
|
46
58
|
{
|
|
47
59
|
"name": "ffmpeg",
|
package/index.js
CHANGED
package/lib/androidServerImpl.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AndroidServerLauncherImpl = void 0;
|
|
7
|
-
var _utilsBundle = require("./utilsBundle");
|
|
8
|
-
var _utils = require("./utils");
|
|
9
|
-
var _playwright = require("./server/playwright");
|
|
10
7
|
var _playwrightServer = require("./remote/playwrightServer");
|
|
8
|
+
var _playwright = require("./server/playwright");
|
|
9
|
+
var _crypto = require("./server/utils/crypto");
|
|
10
|
+
var _utilsBundle = require("./utilsBundle");
|
|
11
11
|
/**
|
|
12
12
|
* Copyright (c) Microsoft Corporation.
|
|
13
13
|
*
|
|
@@ -43,7 +43,7 @@ class AndroidServerLauncherImpl {
|
|
|
43
43
|
}
|
|
44
44
|
if (devices.length > 1) throw new Error(`More than one device found. Please specify deviceSerialNumber`);
|
|
45
45
|
const device = devices[0];
|
|
46
|
-
const path = options.wsPath ? options.wsPath.startsWith('/') ? options.wsPath : `/${options.wsPath}` : `/${(0,
|
|
46
|
+
const path = options.wsPath ? options.wsPath.startsWith('/') ? options.wsPath : `/${options.wsPath}` : `/${(0, _crypto.createGuid)()}`;
|
|
47
47
|
|
|
48
48
|
// 2. Start the server
|
|
49
49
|
const server = new _playwrightServer.PlaywrightServer({
|
package/lib/browserServerImpl.js
CHANGED
|
@@ -4,15 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BrowserServerLauncherImpl = void 0;
|
|
7
|
-
var
|
|
8
|
-
var _clientHelper = require("./client/clientHelper");
|
|
9
|
-
var _utils = require("./utils");
|
|
10
|
-
var _instrumentation = require("./server/instrumentation");
|
|
11
|
-
var _playwright = require("./server/playwright");
|
|
7
|
+
var _socksProxy = require("./server/utils/socksProxy");
|
|
12
8
|
var _playwrightServer = require("./remote/playwrightServer");
|
|
13
9
|
var _helper = require("./server/helper");
|
|
14
|
-
var
|
|
15
|
-
var
|
|
10
|
+
var _instrumentation = require("./server/instrumentation");
|
|
11
|
+
var _playwright = require("./server/playwright");
|
|
12
|
+
var _crypto = require("./server/utils/crypto");
|
|
13
|
+
var _stackTrace = require("./utils/isomorphic/stackTrace");
|
|
14
|
+
var _utilsBundle = require("./utilsBundle");
|
|
16
15
|
/**
|
|
17
16
|
* Copyright (c) Microsoft Corporation.
|
|
18
17
|
*
|
|
@@ -49,13 +48,13 @@ class BrowserServerLauncherImpl {
|
|
|
49
48
|
...options,
|
|
50
49
|
ignoreDefaultArgs: Array.isArray(options.ignoreDefaultArgs) ? options.ignoreDefaultArgs : undefined,
|
|
51
50
|
ignoreAllDefaultArgs: !!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs),
|
|
52
|
-
env: options.env ?
|
|
51
|
+
env: options.env ? envObjectToArray(options.env) : undefined
|
|
53
52
|
}, toProtocolLogger(options.logger)).catch(e => {
|
|
54
53
|
const log = _helper.helper.formatBrowserLogs(metadata.log);
|
|
55
54
|
(0, _stackTrace.rewriteErrorMessage)(e, `${e.message} Failed to launch browser.${log}`);
|
|
56
55
|
throw e;
|
|
57
56
|
});
|
|
58
|
-
const path = options.wsPath ? options.wsPath.startsWith('/') ? options.wsPath : `/${options.wsPath}` : `/${(0,
|
|
57
|
+
const path = options.wsPath ? options.wsPath.startsWith('/') ? options.wsPath : `/${options.wsPath}` : `/${(0, _crypto.createGuid)()}`;
|
|
59
58
|
|
|
60
59
|
// 2. Start the server
|
|
61
60
|
const server = new _playwrightServer.PlaywrightServer({
|
|
@@ -89,4 +88,14 @@ function toProtocolLogger(logger) {
|
|
|
89
88
|
return logger ? (direction, message) => {
|
|
90
89
|
if (logger.isEnabled('protocol', 'verbose')) logger.log('protocol', 'verbose', (direction === 'send' ? 'SEND ► ' : '◀ RECV ') + JSON.stringify(message), [], {});
|
|
91
90
|
} : undefined;
|
|
91
|
+
}
|
|
92
|
+
function envObjectToArray(env) {
|
|
93
|
+
const result = [];
|
|
94
|
+
for (const name in env) {
|
|
95
|
+
if (!Object.is(env[name], undefined)) result.push({
|
|
96
|
+
name,
|
|
97
|
+
value: String(env[name])
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return result;
|
|
92
101
|
}
|