patchright-core 1.48.2 → 1.49.1

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.
Files changed (110) hide show
  1. package/README.md +2 -2
  2. package/ThirdPartyNotices.txt +70 -384
  3. package/bin/reinstall_chrome_beta_linux.sh +10 -8
  4. package/bin/reinstall_chrome_stable_linux.sh +10 -8
  5. package/bin/reinstall_msedge_beta_linux.sh +11 -9
  6. package/bin/reinstall_msedge_dev_linux.sh +11 -9
  7. package/bin/reinstall_msedge_stable_linux.sh +11 -9
  8. package/browsers.json +19 -11
  9. package/lib/cli/program.js +23 -5
  10. package/lib/client/channelOwner.js +2 -2
  11. package/lib/client/locator.js +7 -0
  12. package/lib/client/network.js +5 -0
  13. package/lib/client/page.js +4 -2
  14. package/lib/client/tracing.js +13 -0
  15. package/lib/client/waiter.js +15 -11
  16. package/lib/generated/consoleApiSource.js +1 -1
  17. package/lib/generated/injectedScriptSource.js +1 -1
  18. package/lib/generated/pollingRecorderSource.js +1 -1
  19. package/lib/generated/webSocketMockSource.js +1 -1
  20. package/lib/protocol/validator.js +23 -3
  21. package/lib/server/ariaSnapshot.js +33 -0
  22. package/lib/server/bidi/bidiChromium.js +1 -1
  23. package/lib/server/bidi/bidiConnection.js +0 -2
  24. package/lib/server/bidi/bidiExecutionContext.js +0 -3
  25. package/lib/server/browserType.js +4 -1
  26. package/lib/server/chromium/chromium.js +6 -2
  27. package/lib/server/chromium/crExecutionContext.js +0 -13
  28. package/lib/server/chromium/crNetworkManager.js +1 -1
  29. package/lib/server/chromium/crPage.js +4 -5
  30. package/lib/server/codegen/csharp.js +11 -16
  31. package/lib/server/codegen/java.js +4 -7
  32. package/lib/server/codegen/javascript.js +28 -6
  33. package/lib/server/codegen/python.js +12 -16
  34. package/lib/server/debugController.js +8 -5
  35. package/lib/server/deviceDescriptorsSource.json +127 -127
  36. package/lib/server/dispatchers/androidDispatcher.js +13 -2
  37. package/lib/server/dispatchers/debugControllerDispatcher.js +1 -1
  38. package/lib/server/dispatchers/dispatcher.js +1 -1
  39. package/lib/server/dispatchers/frameDispatcher.js +8 -1
  40. package/lib/server/dispatchers/tracingDispatcher.js +10 -0
  41. package/lib/server/dom.js +79 -36
  42. package/lib/server/fetch.js +30 -17
  43. package/lib/server/firefox/ffExecutionContext.js +0 -12
  44. package/lib/server/firefox/ffNetworkManager.js +1 -1
  45. package/lib/server/frames.js +55 -62
  46. package/lib/server/index.js +0 -6
  47. package/lib/server/javascript.js +0 -6
  48. package/lib/server/page.js +32 -5
  49. package/lib/server/progress.js +0 -3
  50. package/lib/server/recorder/recorderApp.js +6 -15
  51. package/lib/server/recorder/recorderInTraceViewer.js +3 -3
  52. package/lib/server/recorder/recorderUtils.js +2 -1
  53. package/lib/server/recorder.js +66 -31
  54. package/lib/server/registry/index.js +70 -23
  55. package/lib/server/registry/nativeDeps.js +6 -3
  56. package/lib/server/socksClientCertificatesInterceptor.js +1 -1
  57. package/lib/server/trace/recorder/snapshotter.js +1 -12
  58. package/lib/server/trace/recorder/snapshotterInjected.js +19 -1
  59. package/lib/server/trace/recorder/tracing.js +69 -15
  60. package/lib/server/trace/test/inMemorySnapshotter.js +3 -3
  61. package/lib/server/trace/viewer/traceViewer.js +2 -1
  62. package/lib/server/webkit/wkBrowser.js +2 -2
  63. package/lib/server/webkit/wkExecutionContext.js +0 -13
  64. package/lib/server/webkit/wkPage.js +4 -0
  65. package/lib/utils/comparators.js +12 -30
  66. package/lib/utils/crypto.js +1 -4
  67. package/lib/utils/hostPlatform.js +6 -0
  68. package/lib/utils/isomorphic/ariaSnapshot.js +267 -0
  69. package/lib/utils/isomorphic/locatorGenerators.js +23 -5
  70. package/lib/utils/isomorphic/recorderUtils.js +36 -4
  71. package/lib/utils/isomorphic/stringUtils.js +30 -0
  72. package/lib/utils/isomorphic/urlMatch.js +5 -1
  73. package/lib/utils/network.js +1 -1
  74. package/lib/utils/sequence.js +64 -0
  75. package/lib/utils/stackTrace.js +16 -3
  76. package/lib/utils/zones.js +32 -23
  77. package/lib/utilsBundle.js +4 -5
  78. package/lib/utilsBundleImpl/index.js +190 -33
  79. package/lib/vite/htmlReport/index.html +19 -16
  80. package/lib/vite/recorder/assets/codeMirrorModule-AFvV6hAs.js +24 -0
  81. package/lib/vite/recorder/assets/index-_cTWgVuJ.js +184 -0
  82. package/lib/vite/recorder/assets/{index-BW-aOBcL.css → index-iA1aAGZg.css} +1 -1
  83. package/lib/vite/recorder/index.html +2 -2
  84. package/lib/vite/traceViewer/assets/codeMirrorModule-BWCrdKft.js +24 -0
  85. package/lib/vite/traceViewer/assets/inspectorTab-C_9qyxv5.js +68 -0
  86. package/lib/vite/traceViewer/assets/workbench-DsQEOQud.js +9 -0
  87. package/lib/vite/traceViewer/{embedded.BlHoW5LY.js → embedded.D4x_-tXl.js} +1 -1
  88. package/lib/vite/traceViewer/embedded.html +5 -5
  89. package/lib/vite/traceViewer/{index.DaWVfou1.js → index.BskMikzx.js} +1 -1
  90. package/lib/vite/traceViewer/index.html +24 -7
  91. package/lib/vite/traceViewer/{inspectorTab.DLjBDrQR.css → inspectorTab.DEOUW62d.css} +1 -1
  92. package/lib/vite/traceViewer/recorder.Dsk1wX5k.js +2 -0
  93. package/lib/vite/traceViewer/recorder.html +3 -3
  94. package/lib/vite/traceViewer/sw.bundle.js +3 -3
  95. package/lib/vite/traceViewer/uiMode.CzKr-TMc.js +5 -0
  96. package/lib/vite/traceViewer/uiMode.html +6 -6
  97. package/lib/vite/traceViewer/{uiMode.CAYqod-m.css → uiMode.voC1ZiOQ.css} +1 -1
  98. package/lib/vite/traceViewer/workbench.C-zR9ysA.css +1 -0
  99. package/package.json +1 -1
  100. package/types/protocol.d.ts +58 -10
  101. package/types/types.d.ts +116 -20
  102. package/lib/third_party/diff_match_patch.js +0 -2222
  103. package/lib/vite/recorder/assets/codeMirrorModule-baozm8ur.js +0 -24
  104. package/lib/vite/recorder/assets/index-2ElAIWFB.js +0 -42
  105. package/lib/vite/traceViewer/assets/codeMirrorModule-Bh1rfd2w.js +0 -24
  106. package/lib/vite/traceViewer/assets/inspectorTab-7GHnKvSD.js +0 -64
  107. package/lib/vite/traceViewer/assets/workbench-DPQnTHYP.js +0 -9
  108. package/lib/vite/traceViewer/recorder.C4zxcvd2.js +0 -2
  109. package/lib/vite/traceViewer/uiMode.mTXWniJb.js +0 -5
  110. package/lib/vite/traceViewer/workbench.D3JVcA9K.css +0 -1
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # playwright-core
1
+ # patchright-core
2
2
 
3
- This package contains the no-browser flavor of [Playwright](http://github.com/microsoft/playwright).
3
+ This package contains the no-browser flavor of [Patchright-NodeJS](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs).
@@ -6,16 +6,17 @@ 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@6.0.2 (https://github.com/TooTallNate/node-agent-base)
9
+ - agent-base@7.1.1 (https://github.com/TooTallNate/proxy-agents)
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)
13
- - codemirror-shadow-1@0.0.1 (https://github.com/codemirror/CodeMirror)
13
+ - codemirror@5.65.18 (https://github.com/codemirror/CodeMirror)
14
14
  - colors@1.4.0 (https://github.com/Marak/colors.js)
15
15
  - commander@8.3.0 (https://github.com/tj/commander.js)
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
+ - diff@7.0.0 (https://github.com/kpdecker/jsdiff)
19
20
  - dotenv@16.4.5 (https://github.com/motdotla/dotenv)
20
21
  - end-of-stream@1.4.4 (https://github.com/mafintosh/end-of-stream)
21
22
  - escape-string-regexp@2.0.0 (https://github.com/sindresorhus/escape-string-regexp)
@@ -23,7 +24,7 @@ This project incorporates components from the projects listed below. The origina
23
24
  - fd-slicer@1.1.0 (https://github.com/andrewrk/node-fd-slicer)
24
25
  - get-stream@5.2.0 (https://github.com/sindresorhus/get-stream)
25
26
  - graceful-fs@4.2.10 (https://github.com/isaacs/node-graceful-fs)
26
- - https-proxy-agent@5.0.0 (https://github.com/TooTallNate/node-https-proxy-agent)
27
+ - https-proxy-agent@7.0.5 (https://github.com/TooTallNate/proxy-agents)
27
28
  - ip-address@9.0.5 (https://github.com/beaugunderson/ip-address)
28
29
  - is-docker@2.2.1 (https://github.com/sindresorhus/is-docker)
29
30
  - is-wsl@2.2.0 (https://github.com/sindresorhus/is-wsl)
@@ -42,12 +43,13 @@ This project incorporates components from the projects listed below. The origina
42
43
  - retry@0.12.0 (https://github.com/tim-kos/node-retry)
43
44
  - signal-exit@3.0.7 (https://github.com/tapjs/signal-exit)
44
45
  - smart-buffer@4.2.0 (https://github.com/JoshGlazebrook/smart-buffer)
45
- - socks-proxy-agent@6.1.1 (https://github.com/TooTallNate/node-socks-proxy-agent)
46
+ - socks-proxy-agent@8.0.4 (https://github.com/TooTallNate/proxy-agents)
46
47
  - socks@2.8.3 (https://github.com/JoshGlazebrook/socks)
47
48
  - sprintf-js@1.1.3 (https://github.com/alexei/sprintf.js)
48
49
  - stack-utils@2.0.5 (https://github.com/tapjs/stack-utils)
49
50
  - wrappy@1.0.2 (https://github.com/npm/wrappy)
50
51
  - ws@8.17.1 (https://github.com/websockets/ws)
52
+ - yaml@2.6.0 (https://github.com/eemeli/yaml)
51
53
  - yauzl@2.10.0 (https://github.com/thejoshwolfe/yauzl)
52
54
  - yazl@2.5.1 (https://github.com/thejoshwolfe/yazl)
53
55
 
@@ -103,128 +105,11 @@ MIT License
103
105
  =========================================
104
106
  END OF @types/yauzl@2.10.0 AND INFORMATION
105
107
 
106
- %% agent-base@6.0.2 NOTICES AND INFORMATION BEGIN HERE
108
+ %% agent-base@7.1.1 NOTICES AND INFORMATION BEGIN HERE
107
109
  =========================================
108
- agent-base
109
- ==========
110
- ### Turn a function into an [`http.Agent`][http.Agent] instance
111
- [![Build Status](https://github.com/TooTallNate/node-agent-base/workflows/Node%20CI/badge.svg)](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
-
225
110
  (The MIT License)
226
111
 
227
- Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
112
+ Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
228
113
 
229
114
  Permission is hereby granted, free of charge, to any person obtaining
230
115
  a copy of this software and associated documentation files (the
@@ -244,14 +129,8 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
244
129
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
245
130
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
246
131
  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
253
132
  =========================================
254
- END OF agent-base@6.0.2 AND INFORMATION
133
+ END OF agent-base@7.1.1 AND INFORMATION
255
134
 
256
135
  %% balanced-match@1.0.2 NOTICES AND INFORMATION BEGIN HERE
257
136
  =========================================
@@ -329,7 +208,7 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL
329
208
  =========================================
330
209
  END OF buffer-crc32@0.2.13 AND INFORMATION
331
210
 
332
- %% codemirror-shadow-1@0.0.1 NOTICES AND INFORMATION BEGIN HERE
211
+ %% codemirror@5.65.18 NOTICES AND INFORMATION BEGIN HERE
333
212
  =========================================
334
213
  MIT License
335
214
 
@@ -353,7 +232,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
353
232
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
354
233
  THE SOFTWARE.
355
234
  =========================================
356
- END OF codemirror-shadow-1@0.0.1 AND INFORMATION
235
+ END OF codemirror@5.65.18 AND INFORMATION
357
236
 
358
237
  %% colors@1.4.0 NOTICES AND INFORMATION BEGIN HERE
359
238
  =========================================
@@ -473,6 +352,40 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
473
352
  =========================================
474
353
  END OF define-lazy-prop@2.0.0 AND INFORMATION
475
354
 
355
+ %% diff@7.0.0 NOTICES AND INFORMATION BEGIN HERE
356
+ =========================================
357
+ BSD 3-Clause License
358
+
359
+ Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>
360
+ All rights reserved.
361
+
362
+ Redistribution and use in source and binary forms, with or without
363
+ modification, are permitted provided that the following conditions are met:
364
+
365
+ 1. Redistributions of source code must retain the above copyright notice, this
366
+ list of conditions and the following disclaimer.
367
+
368
+ 2. Redistributions in binary form must reproduce the above copyright notice,
369
+ this list of conditions and the following disclaimer in the documentation
370
+ and/or other materials provided with the distribution.
371
+
372
+ 3. Neither the name of the copyright holder nor the names of its
373
+ contributors may be used to endorse or promote products derived from
374
+ this software without specific prior written permission.
375
+
376
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
377
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
378
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
379
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
380
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
381
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
382
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
383
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
384
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
385
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
386
+ =========================================
387
+ END OF diff@7.0.0 AND INFORMATION
388
+
476
389
  %% dotenv@16.4.5 NOTICES AND INFORMATION BEGIN HERE
477
390
  =========================================
478
391
  Copyright (c) 2015, Scott Motte
@@ -629,124 +542,11 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
629
542
  =========================================
630
543
  END OF graceful-fs@4.2.10 AND INFORMATION
631
544
 
632
- %% https-proxy-agent@5.0.0 NOTICES AND INFORMATION BEGIN HERE
545
+ %% https-proxy-agent@7.0.5 NOTICES AND INFORMATION BEGIN HERE
633
546
  =========================================
634
- https-proxy-agent
635
- ================
636
- ### An HTTP(s) proxy `http.Agent` implementation for HTTPS
637
- [![Build Status](https://github.com/TooTallNate/node-https-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-https-proxy-agent/actions?workflow=Node+CI)
638
-
639
- This module provides an `http.Agent` implementation that connects to a specified
640
- HTTP or HTTPS proxy server, and can be used with the built-in `https` module.
641
-
642
- Specifically, this `Agent` implementation connects to an intermediary "proxy"
643
- server and issues the [CONNECT HTTP method][CONNECT], which tells the proxy to
644
- open a direct TCP connection to the destination server.
645
-
646
- Since this agent implements the CONNECT HTTP method, it also works with other
647
- protocols that use this method when connecting over proxies (i.e. WebSockets).
648
- See the "Examples" section below for more.
649
-
650
-
651
- Installation
652
- ------------
653
-
654
- Install with `npm`:
655
-
656
- ``` bash
657
- $ npm install https-proxy-agent
658
- ```
659
-
660
-
661
- Examples
662
- --------
663
-
664
- #### `https` module example
665
-
666
- ``` js
667
- var url = require('url');
668
- var https = require('https');
669
- var HttpsProxyAgent = require('https-proxy-agent');
670
-
671
- // HTTP/HTTPS proxy to connect to
672
- var proxy = process.env.http_proxy || 'http://168.63.76.32:3128';
673
- console.log('using proxy server %j', proxy);
674
-
675
- // HTTPS endpoint for the proxy to connect to
676
- var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate';
677
- console.log('attempting to GET %j', endpoint);
678
- var options = url.parse(endpoint);
679
-
680
- // create an instance of the `HttpsProxyAgent` class with the proxy server information
681
- var agent = new HttpsProxyAgent(proxy);
682
- options.agent = agent;
683
-
684
- https.get(options, function (res) {
685
- console.log('"response" event!', res.headers);
686
- res.pipe(process.stdout);
687
- });
688
- ```
689
-
690
- #### `ws` WebSocket connection example
691
-
692
- ``` js
693
- var url = require('url');
694
- var WebSocket = require('ws');
695
- var HttpsProxyAgent = require('https-proxy-agent');
696
-
697
- // HTTP/HTTPS proxy to connect to
698
- var proxy = process.env.http_proxy || 'http://168.63.76.32:3128';
699
- console.log('using proxy server %j', proxy);
700
-
701
- // WebSocket endpoint for the proxy to connect to
702
- var endpoint = process.argv[2] || 'ws://echo.websocket.org';
703
- var parsed = url.parse(endpoint);
704
- console.log('attempting to connect to WebSocket %j', endpoint);
705
-
706
- // create an instance of the `HttpsProxyAgent` class with the proxy server information
707
- var options = url.parse(proxy);
708
-
709
- var agent = new HttpsProxyAgent(options);
710
-
711
- // finally, initiate the WebSocket connection
712
- var socket = new WebSocket(endpoint, { agent: agent });
713
-
714
- socket.on('open', function () {
715
- console.log('"open" event!');
716
- socket.send('hello world');
717
- });
718
-
719
- socket.on('message', function (data, flags) {
720
- console.log('"message" event! %j %j', data, flags);
721
- socket.close();
722
- });
723
- ```
724
-
725
- API
726
- ---
727
-
728
- ### new HttpsProxyAgent(Object options)
729
-
730
- The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects
731
- to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket
732
- requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT].
733
-
734
- The `options` argument may either be a string URI of the proxy server to use, or an
735
- "options" object with more specific properties:
736
-
737
- * `host` - String - Proxy host to connect to (may use `hostname` as well). Required.
738
- * `port` - Number - Proxy port to connect to. Required.
739
- * `protocol` - String - If `https:`, then use TLS to connect to the proxy.
740
- * `headers` - Object - Additional HTTP headers to be sent on the HTTP CONNECT method.
741
- * Any other options given are passed to the `net.connect()`/`tls.connect()` functions.
742
-
743
-
744
- License
745
- -------
746
-
747
547
  (The MIT License)
748
548
 
749
- Copyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
549
+ Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
750
550
 
751
551
  Permission is hereby granted, free of charge, to any person obtaining
752
552
  a copy of this software and associated documentation files (the
@@ -766,10 +566,8 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
766
566
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
767
567
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
768
568
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
769
-
770
- [CONNECT]: http://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_Tunneling
771
569
  =========================================
772
- END OF https-proxy-agent@5.0.0 AND INFORMATION
570
+ END OF https-proxy-agent@7.0.5 AND INFORMATION
773
571
 
774
572
  %% ip-address@9.0.5 NOTICES AND INFORMATION BEGIN HERE
775
573
  =========================================
@@ -1207,141 +1005,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1207
1005
  =========================================
1208
1006
  END OF smart-buffer@4.2.0 AND INFORMATION
1209
1007
 
1210
- %% socks-proxy-agent@6.1.1 NOTICES AND INFORMATION BEGIN HERE
1008
+ %% socks-proxy-agent@8.0.4 NOTICES AND INFORMATION BEGIN HERE
1211
1009
  =========================================
1212
- socks-proxy-agent
1213
- ================
1214
- ### A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
1215
- [![Build Status](https://github.com/TooTallNate/node-socks-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-socks-proxy-agent/actions?workflow=Node+CI)
1216
-
1217
- This module provides an `http.Agent` implementation that connects to a
1218
- specified SOCKS proxy server, and can be used with the built-in `http`
1219
- and `https` modules.
1220
-
1221
- It can also be used in conjunction with the `ws` module to establish a WebSocket
1222
- connection over a SOCKS proxy. See the "Examples" section below.
1223
-
1224
- Installation
1225
- ------------
1226
-
1227
- Install with `npm`:
1228
-
1229
- ``` bash
1230
- $ npm install socks-proxy-agent
1231
- ```
1232
-
1233
-
1234
- Examples
1235
- --------
1236
-
1237
- #### TypeScript example
1238
-
1239
- ```ts
1240
- import https from 'https';
1241
- import { SocksProxyAgent } from 'socks-proxy-agent';
1242
-
1243
- const info = {
1244
- host: 'br41.nordvpn.com',
1245
- userId: 'your-name@gmail.com',
1246
- password: 'abcdef12345124'
1247
- };
1248
- const agent = new SocksProxyAgent(info);
1249
-
1250
- https.get('https://jsonip.org', { agent }, (res) => {
1251
- console.log(res.headers);
1252
- res.pipe(process.stdout);
1253
- });
1254
- ```
1255
-
1256
- #### `http` module example
1257
-
1258
- ```js
1259
- var url = require('url');
1260
- var http = require('http');
1261
- var SocksProxyAgent = require('socks-proxy-agent');
1262
-
1263
- // SOCKS proxy to connect to
1264
- var proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';
1265
- console.log('using proxy server %j', proxy);
1266
-
1267
- // HTTP endpoint for the proxy to connect to
1268
- var endpoint = process.argv[2] || 'http://nodejs.org/api/';
1269
- console.log('attempting to GET %j', endpoint);
1270
- var opts = url.parse(endpoint);
1271
-
1272
- // create an instance of the `SocksProxyAgent` class with the proxy server information
1273
- var agent = new SocksProxyAgent(proxy);
1274
- opts.agent = agent;
1275
-
1276
- http.get(opts, function (res) {
1277
- console.log('"response" event!', res.headers);
1278
- res.pipe(process.stdout);
1279
- });
1280
- ```
1281
-
1282
- #### `https` module example
1283
-
1284
- ```js
1285
- var url = require('url');
1286
- var https = require('https');
1287
- var SocksProxyAgent = require('socks-proxy-agent');
1288
-
1289
- // SOCKS proxy to connect to
1290
- var proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';
1291
- console.log('using proxy server %j', proxy);
1292
-
1293
- // HTTP endpoint for the proxy to connect to
1294
- var endpoint = process.argv[2] || 'https://encrypted.google.com/';
1295
- console.log('attempting to GET %j', endpoint);
1296
- var opts = url.parse(endpoint);
1297
-
1298
- // create an instance of the `SocksProxyAgent` class with the proxy server information
1299
- var agent = new SocksProxyAgent(proxy);
1300
- opts.agent = agent;
1301
-
1302
- https.get(opts, function (res) {
1303
- console.log('"response" event!', res.headers);
1304
- res.pipe(process.stdout);
1305
- });
1306
- ```
1307
-
1308
- #### `ws` WebSocket connection example
1309
-
1310
- ``` js
1311
- var WebSocket = require('ws');
1312
- var SocksProxyAgent = require('socks-proxy-agent');
1313
-
1314
- // SOCKS proxy to connect to
1315
- var proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';
1316
- console.log('using proxy server %j', proxy);
1317
-
1318
- // WebSocket endpoint for the proxy to connect to
1319
- var endpoint = process.argv[2] || 'ws://echo.websocket.org';
1320
- console.log('attempting to connect to WebSocket %j', endpoint);
1321
-
1322
- // create an instance of the `SocksProxyAgent` class with the proxy server information
1323
- var agent = new SocksProxyAgent(proxy);
1324
-
1325
- // initiate the WebSocket connection
1326
- var socket = new WebSocket(endpoint, { agent: agent });
1327
-
1328
- socket.on('open', function () {
1329
- console.log('"open" event!');
1330
- socket.send('hello world');
1331
- });
1332
-
1333
- socket.on('message', function (data, flags) {
1334
- console.log('"message" event! %j %j', data, flags);
1335
- socket.close();
1336
- });
1337
- ```
1338
-
1339
- License
1340
- -------
1341
-
1342
1010
  (The MIT License)
1343
1011
 
1344
- Copyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
1012
+ Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
1345
1013
 
1346
1014
  Permission is hereby granted, free of charge, to any person obtaining
1347
1015
  a copy of this software and associated documentation files (the
@@ -1362,7 +1030,7 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
1362
1030
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1363
1031
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1364
1032
  =========================================
1365
- END OF socks-proxy-agent@6.1.1 AND INFORMATION
1033
+ END OF socks-proxy-agent@8.0.4 AND INFORMATION
1366
1034
 
1367
1035
  %% socks@2.8.3 NOTICES AND INFORMATION BEGIN HERE
1368
1036
  =========================================
@@ -1489,6 +1157,24 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1489
1157
  =========================================
1490
1158
  END OF ws@8.17.1 AND INFORMATION
1491
1159
 
1160
+ %% yaml@2.6.0 NOTICES AND INFORMATION BEGIN HERE
1161
+ =========================================
1162
+ Copyright Eemeli Aro <eemeli@gmail.com>
1163
+
1164
+ Permission to use, copy, modify, and/or distribute this software for any purpose
1165
+ with or without fee is hereby granted, provided that the above copyright notice
1166
+ and this permission notice appear in all copies.
1167
+
1168
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1169
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
1170
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1171
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
1172
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
1173
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
1174
+ THIS SOFTWARE.
1175
+ =========================================
1176
+ END OF yaml@2.6.0 AND INFORMATION
1177
+
1492
1178
  %% yauzl@2.10.0 NOTICES AND INFORMATION BEGIN HERE
1493
1179
  =========================================
1494
1180
  The MIT License (MIT)
@@ -1543,6 +1229,6 @@ END OF yazl@2.5.1 AND INFORMATION
1543
1229
 
1544
1230
  SUMMARY BEGIN HERE
1545
1231
  =========================================
1546
- Total Packages: 46
1232
+ Total Packages: 48
1547
1233
  =========================================
1548
1234
  END OF SUMMARY
@@ -7,15 +7,17 @@ if [[ $(arch) == "aarch64" ]]; then
7
7
  exit 1
8
8
  fi
9
9
 
10
- if [[ ! -f "/etc/os-release" ]]; then
11
- echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
12
- exit 1
13
- fi
10
+ if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
11
+ if [[ ! -f "/etc/os-release" ]]; then
12
+ echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
13
+ exit 1
14
+ fi
14
15
 
15
- ID=$(bash -c 'source /etc/os-release && echo $ID')
16
- if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
17
- echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
18
- exit 1
16
+ ID=$(bash -c 'source /etc/os-release && echo $ID')
17
+ if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
18
+ echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
19
+ exit 1
20
+ fi
19
21
  fi
20
22
 
21
23
  # 1. make sure to remove old beta if any.
@@ -7,15 +7,17 @@ if [[ $(arch) == "aarch64" ]]; then
7
7
  exit 1
8
8
  fi
9
9
 
10
- if [[ ! -f "/etc/os-release" ]]; then
11
- echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
12
- exit 1
13
- fi
10
+ if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
11
+ if [[ ! -f "/etc/os-release" ]]; then
12
+ echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
13
+ exit 1
14
+ fi
14
15
 
15
- ID=$(bash -c 'source /etc/os-release && echo $ID')
16
- if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
17
- echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
18
- exit 1
16
+ ID=$(bash -c 'source /etc/os-release && echo $ID')
17
+ if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
18
+ echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
19
+ exit 1
20
+ fi
19
21
  fi
20
22
 
21
23
  # 1. make sure to remove old stable if any.
@@ -8,15 +8,17 @@ if [[ $(arch) == "aarch64" ]]; then
8
8
  exit 1
9
9
  fi
10
10
 
11
- if [[ ! -f "/etc/os-release" ]]; then
12
- echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
13
- exit 1
14
- fi
15
-
16
- ID=$(bash -c 'source /etc/os-release && echo $ID')
17
- if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
18
- echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
19
- exit 1
11
+ if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
12
+ if [[ ! -f "/etc/os-release" ]]; then
13
+ echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
14
+ exit 1
15
+ fi
16
+
17
+ ID=$(bash -c 'source /etc/os-release && echo $ID')
18
+ if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
19
+ echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
20
+ exit 1
21
+ fi
20
22
  fi
21
23
 
22
24
  # 1. make sure to remove old beta if any.