mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: make bundles typed (#13620)
This commit is contained in:
parent
ed0dcdabc9
commit
63ea81ec54
588
package-lock.json
generated
588
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -53,10 +53,6 @@
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.17.9",
|
||||
"@babel/plugin-transform-typescript": "^7.16.8",
|
||||
"@babel/preset-react": "^7.16.7",
|
||||
"@types/babel__code-frame": "^7.0.3",
|
||||
"@types/babel__core": "^7.1.18",
|
||||
"@types/babel__helper-plugin-utils": "^7.10.0",
|
||||
"@types/debug": "^4.1.7",
|
||||
"@types/formidable": "^2.0.4",
|
||||
"@types/mime": "^2.0.3",
|
||||
"@types/minimatch": "^3.0.5",
|
||||
@ -64,24 +60,20 @@
|
||||
"@types/node": "=14.17.15",
|
||||
"@types/pngjs": "^6.0.1",
|
||||
"@types/progress": "^2.0.5",
|
||||
"@types/proper-lockfile": "^4.1.2",
|
||||
"@types/proxy-from-env": "^1.0.1",
|
||||
"@types/react": "^17.0.38",
|
||||
"@types/react-dom": "^17.0.11",
|
||||
"@types/resize-observer-browser": "^0.1.6",
|
||||
"@types/rimraf": "^3.0.2",
|
||||
"@types/source-map-support": "^0.5.4",
|
||||
"@types/stack-utils": "^2.0.1",
|
||||
"@types/ws": "8.2.2",
|
||||
"@types/xml2js": "^0.4.9",
|
||||
"@types/yauzl": "^2.10.0",
|
||||
"@types/yazl": "^2.4.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
||||
"@typescript-eslint/parser": "^5.10.2",
|
||||
"@vitejs/plugin-react": "^1.0.7",
|
||||
"@zip.js/zip.js": "^2.4.2",
|
||||
"ansi-to-html": "^0.7.2",
|
||||
"chokidar": "^3.5.3",
|
||||
"colors": "^1.4.0",
|
||||
"commonmark": "^0.30.0",
|
||||
"concurrently": "^6.2.1",
|
||||
"cross-env": "^7.0.3",
|
||||
|
@ -7,41 +7,44 @@ This project incorporates components from the projects listed below. The origina
|
||||
1. agent-base@6.0.2 (https://github.com/TooTallNate/node-agent-base)
|
||||
2. balanced-match@1.0.2 (https://github.com/juliangruber/balanced-match)
|
||||
3. brace-expansion@1.1.11 (https://github.com/juliangruber/brace-expansion)
|
||||
4. concat-map@0.0.1 (https://github.com/substack/node-concat-map)
|
||||
5. debug@4.3.4 (https://github.com/debug-js/debug)
|
||||
6. escape-string-regexp@2.0.0 (https://github.com/sindresorhus/escape-string-regexp)
|
||||
7. fs.realpath@1.0.0 (https://github.com/isaacs/fs.realpath)
|
||||
8. glob@7.2.0 (https://github.com/isaacs/node-glob)
|
||||
9. graceful-fs@4.2.10 (https://github.com/isaacs/node-graceful-fs)
|
||||
10. https-proxy-agent@5.0.0 (https://github.com/TooTallNate/node-https-proxy-agent)
|
||||
11. inflight@1.0.6 (https://github.com/npm/inflight)
|
||||
12. inherits@2.0.4 (https://github.com/isaacs/inherits)
|
||||
13. ip@1.1.5 (https://github.com/indutny/node-ip)
|
||||
14. minimatch@3.1.2 (https://github.com/isaacs/minimatch)
|
||||
15. ms@2.1.2 (https://github.com/zeit/ms)
|
||||
16. once@1.4.0 (https://github.com/isaacs/once)
|
||||
17. path-is-absolute@1.0.1 (https://github.com/sindresorhus/path-is-absolute)
|
||||
18. proper-lockfile@4.1.2 (https://github.com/moxystudio/node-proper-lockfile)
|
||||
19. proxy-from-env@1.1.0 (https://github.com/Rob--W/proxy-from-env)
|
||||
20. retry@0.12.0 (https://github.com/tim-kos/node-retry)
|
||||
21. rimraf@3.0.2 (https://github.com/isaacs/rimraf)
|
||||
22. signal-exit@3.0.7 (https://github.com/tapjs/signal-exit)
|
||||
23. smart-buffer@4.2.0 (https://github.com/JoshGlazebrook/smart-buffer)
|
||||
24. socks-proxy-agent@6.1.1 (https://github.com/TooTallNate/node-socks-proxy-agent)
|
||||
25. socks@2.6.2 (https://github.com/JoshGlazebrook/socks)
|
||||
26. stack-utils@2.0.5 (https://github.com/tapjs/stack-utils)
|
||||
27. wrappy@1.0.2 (https://github.com/npm/wrappy)
|
||||
28. @types/node@17.0.24 (https://github.com/DefinitelyTyped/DefinitelyTyped)
|
||||
29. @types/yauzl@2.10.0 (https://github.com/DefinitelyTyped/DefinitelyTyped)
|
||||
30. buffer-crc32@0.2.13 (https://github.com/brianloveswords/buffer-crc32)
|
||||
31. end-of-stream@1.4.4 (https://github.com/mafintosh/end-of-stream)
|
||||
32. extract-zip@2.0.1 (https://github.com/maxogden/extract-zip)
|
||||
33. fd-slicer@1.1.0 (https://github.com/andrewrk/node-fd-slicer)
|
||||
34. get-stream@5.2.0 (https://github.com/sindresorhus/get-stream)
|
||||
35. pend@1.2.0 (https://github.com/andrewrk/node-pend)
|
||||
36. pump@3.0.0 (https://github.com/mafintosh/pump)
|
||||
37. yauzl@2.10.0 (https://github.com/thejoshwolfe/yauzl)
|
||||
38. yazl@2.5.1 (https://github.com/thejoshwolfe/yazl)
|
||||
4. colors@1.4.0 (https://github.com/Marak/colors.js)
|
||||
5. commander@8.3.0 (https://github.com/tj/commander.js)
|
||||
6. concat-map@0.0.1 (https://github.com/substack/node-concat-map)
|
||||
7. debug@4.3.3 (https://github.com/debug-js/debug)
|
||||
8. escape-string-regexp@2.0.0 (https://github.com/sindresorhus/escape-string-regexp)
|
||||
9. fs.realpath@1.0.0 (https://github.com/isaacs/fs.realpath)
|
||||
10. glob@7.2.0 (https://github.com/isaacs/node-glob)
|
||||
11. graceful-fs@4.2.10 (https://github.com/isaacs/node-graceful-fs)
|
||||
12. https-proxy-agent@5.0.0 (https://github.com/TooTallNate/node-https-proxy-agent)
|
||||
13. inflight@1.0.6 (https://github.com/npm/inflight)
|
||||
14. inherits@2.0.4 (https://github.com/isaacs/inherits)
|
||||
15. ip@1.1.5 (https://github.com/indutny/node-ip)
|
||||
16. minimatch@3.1.2 (https://github.com/isaacs/minimatch)
|
||||
17. ms@2.1.2 (https://github.com/zeit/ms)
|
||||
18. once@1.4.0 (https://github.com/isaacs/once)
|
||||
19. path-is-absolute@1.0.1 (https://github.com/sindresorhus/path-is-absolute)
|
||||
20. proper-lockfile@4.1.2 (https://github.com/moxystudio/node-proper-lockfile)
|
||||
21. proxy-from-env@1.1.0 (https://github.com/Rob--W/proxy-from-env)
|
||||
22. retry@0.12.0 (https://github.com/tim-kos/node-retry)
|
||||
23. rimraf@3.0.2 (https://github.com/isaacs/rimraf)
|
||||
24. signal-exit@3.0.7 (https://github.com/tapjs/signal-exit)
|
||||
25. smart-buffer@4.2.0 (https://github.com/JoshGlazebrook/smart-buffer)
|
||||
26. socks-proxy-agent@6.1.1 (https://github.com/TooTallNate/node-socks-proxy-agent)
|
||||
27. socks@2.6.2 (https://github.com/JoshGlazebrook/socks)
|
||||
28. stack-utils@2.0.5 (https://github.com/tapjs/stack-utils)
|
||||
29. wrappy@1.0.2 (https://github.com/npm/wrappy)
|
||||
30. @types/node@17.0.24 (https://github.com/DefinitelyTyped/DefinitelyTyped)
|
||||
31. @types/yauzl@2.10.0 (https://github.com/DefinitelyTyped/DefinitelyTyped)
|
||||
32. buffer-crc32@0.2.13 (https://github.com/brianloveswords/buffer-crc32)
|
||||
33. debug@4.3.4 (https://github.com/debug-js/debug)
|
||||
34. end-of-stream@1.4.4 (https://github.com/mafintosh/end-of-stream)
|
||||
35. extract-zip@2.0.1 (https://github.com/maxogden/extract-zip)
|
||||
36. fd-slicer@1.1.0 (https://github.com/andrewrk/node-fd-slicer)
|
||||
37. get-stream@5.2.0 (https://github.com/sindresorhus/get-stream)
|
||||
38. pend@1.2.0 (https://github.com/andrewrk/node-pend)
|
||||
39. pump@3.0.0 (https://github.com/mafintosh/pump)
|
||||
40. yauzl@2.10.0 (https://github.com/thejoshwolfe/yauzl)
|
||||
41. yazl@2.5.1 (https://github.com/thejoshwolfe/yazl)
|
||||
|
||||
%% agent-base@6.0.2 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
@ -245,6 +248,63 @@ SOFTWARE.
|
||||
=========================================
|
||||
END OF brace-expansion@1.1.11 AND INFORMATION
|
||||
|
||||
%% colors@1.4.0 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Original Library
|
||||
- Copyright (c) Marak Squires
|
||||
|
||||
Additional Functionality
|
||||
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
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.
|
||||
=========================================
|
||||
END OF colors@1.4.0 AND INFORMATION
|
||||
|
||||
%% commander@8.3.0 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
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:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
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.
|
||||
=========================================
|
||||
END OF commander@8.3.0 AND INFORMATION
|
||||
|
||||
%% concat-map@0.0.1 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
This software is released under the MIT license:
|
||||
@ -268,7 +328,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF concat-map@0.0.1 AND INFORMATION
|
||||
|
||||
%% debug@4.3.4 NOTICES AND INFORMATION BEGIN HERE
|
||||
%% debug@4.3.3 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
(The MIT License)
|
||||
|
||||
@ -290,7 +350,7 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMA
|
||||
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.
|
||||
=========================================
|
||||
END OF debug@4.3.4 AND INFORMATION
|
||||
END OF debug@4.3.3 AND INFORMATION
|
||||
|
||||
%% escape-string-regexp@2.0.0 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
@ -1216,6 +1276,30 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL
|
||||
=========================================
|
||||
END OF buffer-crc32@0.2.13 AND INFORMATION
|
||||
|
||||
%% debug@4.3.4 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
|
||||
Copyright (c) 2018-2021 Josh Junon
|
||||
|
||||
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:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
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.
|
||||
=========================================
|
||||
END OF debug@4.3.4 AND INFORMATION
|
||||
|
||||
%% end-of-stream@1.4.4 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
|
202
packages/playwright-core/bundles/utils/package-lock.json
generated
202
packages/playwright-core/bundles/utils/package-lock.json
generated
@ -8,14 +8,101 @@
|
||||
"name": "utils-bundle",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"colors": "1.4.0",
|
||||
"commander": "8.3.0",
|
||||
"debug": "4.3.3",
|
||||
"https-proxy-agent": "5.0.0",
|
||||
"proper-lockfile": "4.1.2",
|
||||
"proxy-from-env": "1.1.0",
|
||||
"rimraf": "3.0.2",
|
||||
"socks-proxy-agent": "6.1.1",
|
||||
"stack-utils": "2.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/debug": "^4.1.7",
|
||||
"@types/proper-lockfile": "^4.1.2",
|
||||
"@types/proxy-from-env": "^1.0.1",
|
||||
"@types/rimraf": "^3.0.2",
|
||||
"@types/stack-utils": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/debug": {
|
||||
"version": "4.1.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz",
|
||||
"integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/ms": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/glob": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
|
||||
"integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/minimatch": "*",
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz",
|
||||
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/ms": {
|
||||
"version": "0.7.31",
|
||||
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz",
|
||||
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "17.0.25",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz",
|
||||
"integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/proper-lockfile": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/proper-lockfile/-/proper-lockfile-4.1.2.tgz",
|
||||
"integrity": "sha512-kd4LMvcnpYkspDcp7rmXKedn8iJSCoa331zRRamUp5oanKt/CefbEGPQP7G89enz7sKD4bvsr8mHSsC8j5WOvA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/retry": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/proxy-from-env": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/proxy-from-env/-/proxy-from-env-1.0.1.tgz",
|
||||
"integrity": "sha512-luG++TFHyS61eKcfkR1CVV6a1GMNXDjtqEQIIfaSHax75xp0HU3SlezjOi1yqubJwrG8e9DeW59n6wTblIDwFg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/retry": {
|
||||
"version": "0.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz",
|
||||
"integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/rimraf": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz",
|
||||
"integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/glob": "*",
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/stack-utils": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",
|
||||
"integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
@ -41,15 +128,31 @@
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/colors": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
|
||||
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
|
||||
"engines": {
|
||||
"node": ">=0.1.90"
|
||||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
|
||||
"integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
|
||||
"engines": {
|
||||
"node": ">= 12"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
@ -257,6 +360,83 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/debug": {
|
||||
"version": "4.1.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz",
|
||||
"integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/ms": "*"
|
||||
}
|
||||
},
|
||||
"@types/glob": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
|
||||
"integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/minimatch": "*",
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz",
|
||||
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/ms": {
|
||||
"version": "0.7.31",
|
||||
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz",
|
||||
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "17.0.25",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz",
|
||||
"integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/proper-lockfile": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/proper-lockfile/-/proper-lockfile-4.1.2.tgz",
|
||||
"integrity": "sha512-kd4LMvcnpYkspDcp7rmXKedn8iJSCoa331zRRamUp5oanKt/CefbEGPQP7G89enz7sKD4bvsr8mHSsC8j5WOvA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/retry": "*"
|
||||
}
|
||||
},
|
||||
"@types/proxy-from-env": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/proxy-from-env/-/proxy-from-env-1.0.1.tgz",
|
||||
"integrity": "sha512-luG++TFHyS61eKcfkR1CVV6a1GMNXDjtqEQIIfaSHax75xp0HU3SlezjOi1yqubJwrG8e9DeW59n6wTblIDwFg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/retry": {
|
||||
"version": "0.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz",
|
||||
"integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/rimraf": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz",
|
||||
"integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/glob": "*",
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/stack-utils": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",
|
||||
"integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==",
|
||||
"dev": true
|
||||
},
|
||||
"agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
@ -279,15 +459,25 @@
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"colors": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
|
||||
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA=="
|
||||
},
|
||||
"commander": {
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
|
||||
"integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
|
@ -3,17 +3,27 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"esbuild": "esbuild ./src/utilsBundle.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019",
|
||||
"esbuild": "esbuild ./src/utilsBundleImpl.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019",
|
||||
"build": "npm ci && npm run esbuild -- --minify",
|
||||
"watch": "npm ci && npm run esbuild -- --watch --sourcemap",
|
||||
"generate-license": "node ../../../../utils/generate_third_party_notice.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"colors": "1.4.0",
|
||||
"commander": "8.3.0",
|
||||
"debug": "4.3.3",
|
||||
"https-proxy-agent": "5.0.0",
|
||||
"proper-lockfile": "4.1.2",
|
||||
"proxy-from-env": "1.1.0",
|
||||
"socks-proxy-agent": "6.1.1",
|
||||
"stack-utils": "2.0.5",
|
||||
"rimraf": "3.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/debug": "^4.1.7",
|
||||
"@types/proper-lockfile": "^4.1.2",
|
||||
"@types/proxy-from-env": "^1.0.1",
|
||||
"@types/rimraf": "^3.0.2",
|
||||
"@types/stack-utils": "^2.0.1"
|
||||
}
|
||||
}
|
||||
|
@ -14,15 +14,25 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import rimrafLibrary from 'rimraf';
|
||||
export const rimraf = rimrafLibrary;
|
||||
import colorsLibrary from 'colors/safe';
|
||||
export const colors = colorsLibrary;
|
||||
|
||||
import debugLibrary from 'debug';
|
||||
export const debug = debugLibrary;
|
||||
|
||||
export { getProxyForUrl } from 'proxy-from-env';
|
||||
|
||||
export { HttpsProxyAgent } from 'https-proxy-agent';
|
||||
|
||||
import lockfileLibrary from 'proper-lockfile';
|
||||
export const lockfile = lockfileLibrary;
|
||||
|
||||
export { program } from 'commander';
|
||||
|
||||
import rimrafLibrary from 'rimraf';
|
||||
export const rimraf = rimrafLibrary;
|
||||
|
||||
export { SocksProxyAgent } from 'socks-proxy-agent';
|
||||
|
||||
import StackUtilsLibrary from 'stack-utils';
|
||||
export const StackUtils = StackUtilsLibrary;
|
||||
|
||||
export { HttpsProxyAgent } from 'https-proxy-agent';
|
||||
export { SocksProxyAgent } from 'socks-proxy-agent';
|
||||
export { getProxyForUrl } from 'proxy-from-env';
|
@ -11,19 +11,32 @@
|
||||
"extract-zip": "2.0.1",
|
||||
"yauzl": "2.10.0",
|
||||
"yazl": "2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/yauzl": "^2.10.0",
|
||||
"@types/yazl": "^2.4.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "17.0.24",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.24.tgz",
|
||||
"integrity": "sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g==",
|
||||
"optional": true
|
||||
"devOptional": true
|
||||
},
|
||||
"node_modules/@types/yauzl": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz",
|
||||
"integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==",
|
||||
"optional": true,
|
||||
"devOptional": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/yazl": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/yazl/-/yazl-2.4.2.tgz",
|
||||
"integrity": "sha512-T+9JH8O2guEjXNxqmybzQ92mJUh2oCwDDMSSimZSe1P+pceZiFROZLYmcbqkzV5EUwz6VwcKXCO2S2yUpra6XQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
@ -156,13 +169,22 @@
|
||||
"version": "17.0.24",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.24.tgz",
|
||||
"integrity": "sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g==",
|
||||
"optional": true
|
||||
"devOptional": true
|
||||
},
|
||||
"@types/yauzl": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz",
|
||||
"integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==",
|
||||
"optional": true,
|
||||
"devOptional": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/yazl": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/yazl/-/yazl-2.4.2.tgz",
|
||||
"integrity": "sha512-T+9JH8O2guEjXNxqmybzQ92mJUh2oCwDDMSSimZSe1P+pceZiFROZLYmcbqkzV5EUwz6VwcKXCO2S2yUpra6XQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"esbuild": "esbuild ./src/zipBundle.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019",
|
||||
"esbuild": "esbuild ./src/zipBundleImpl.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019",
|
||||
"build": "npm ci && npm run esbuild -- --minify",
|
||||
"watch": "npm ci && npm run esbuild -- --watch --sourcemap",
|
||||
"generate-license": "node ../../../../utils/generate_third_party_notice.js"
|
||||
@ -12,5 +12,9 @@
|
||||
"extract-zip": "2.0.1",
|
||||
"yauzl": "2.10.0",
|
||||
"yazl": "2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/yauzl": "^2.10.0",
|
||||
"@types/yazl": "^2.4.2"
|
||||
}
|
||||
}
|
||||
|
@ -44,9 +44,6 @@
|
||||
"playwright": "./cli.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": "8.3.0",
|
||||
"colors": "1.4.0",
|
||||
"debug": "4.3.3",
|
||||
"jpeg-js": "0.4.3",
|
||||
"mime": "3.0.0",
|
||||
"pngjs": "6.0.0",
|
||||
|
@ -8,6 +8,7 @@
|
||||
../server/injected/
|
||||
../server/trace
|
||||
../utils
|
||||
../utilsBundle.ts
|
||||
|
||||
[cli.ts]
|
||||
../server/trace/viewer/traceViewer.ts
|
||||
|
@ -21,8 +21,8 @@
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import type { Command } from 'commander';
|
||||
import { program } from 'commander';
|
||||
import type { Command } from '../utilsBundle';
|
||||
import { program } from '../utilsBundle';
|
||||
import { runDriver, runServer, printApiJson, launchBrowserServer } from './driver';
|
||||
import { showTraceViewer } from '../server/trace/viewer/traceViewer';
|
||||
import * as playwright from '../..';
|
||||
@ -597,6 +597,7 @@ function lookupBrowserType(options: Options): BrowserType {
|
||||
if (browserType)
|
||||
return browserType;
|
||||
program.help();
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
function validateOptions(options: Options) {
|
||||
|
@ -2,3 +2,4 @@
|
||||
../common/
|
||||
../protocol/
|
||||
../utils/**
|
||||
../utilsBundle.ts
|
||||
|
@ -1,2 +1,3 @@
|
||||
[*]
|
||||
../utils/
|
||||
../utils/
|
||||
../utilsBundle.ts
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import debug from 'debug';
|
||||
import { debug } from '../utilsBundle';
|
||||
import fs from 'fs';
|
||||
|
||||
const debugLoggerColorMap = {
|
||||
|
@ -17,11 +17,10 @@
|
||||
import http from 'http';
|
||||
import https from 'https';
|
||||
import net from 'net';
|
||||
import { getProxyForUrl } from '../utilsBundle';
|
||||
import { HttpsProxyAgent } from '../utilsBundle';
|
||||
import * as URL from 'url';
|
||||
|
||||
const { HttpsProxyAgent }: typeof import('../../bundles/utils/node_modules/https-proxy-agent') = require('../utilsBundle');
|
||||
const { getProxyForUrl }: typeof import('proxy-from-env') = require('../utilsBundle');
|
||||
|
||||
export async function createSocket(host: string, port: number): Promise<net.Socket> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const socket = net.createConnection({ host, port });
|
||||
|
@ -5,3 +5,4 @@
|
||||
../remote/
|
||||
../server/
|
||||
../utils/
|
||||
../utilsBundle.ts
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import type { GridAgentLaunchOptions, GridFactory } from './gridServer';
|
||||
import https from 'https';
|
||||
import debug from 'debug';
|
||||
import { debug } from '../utilsBundle';
|
||||
|
||||
const repoName = process.env.GITHUB_AGENT_REPO;
|
||||
if (!repoName)
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import debug from 'debug';
|
||||
import { debug } from '../utilsBundle';
|
||||
import WebSocket from 'ws';
|
||||
import { fork } from 'child_process';
|
||||
import { getPlaywrightVersion } from '../common/userAgent';
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import debug from 'debug';
|
||||
import { debug } from '../utilsBundle';
|
||||
import WebSocket from 'ws';
|
||||
import { PlaywrightConnection } from '../remote/playwrightConnection';
|
||||
import { gracefullyCloseAll } from '../utils/processLauncher';
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import debug from 'debug';
|
||||
import { debug } from '../utilsBundle';
|
||||
import { EventEmitter } from 'events';
|
||||
import { URL } from 'url';
|
||||
import type { Server as WebSocketServer } from 'ws';
|
||||
|
@ -4,3 +4,4 @@
|
||||
../dispatchers/
|
||||
../server/
|
||||
../utils/
|
||||
../utilsBundle.ts
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import debug from 'debug';
|
||||
import { debug } from '../utilsBundle';
|
||||
import * as http from 'http';
|
||||
import WebSocket from 'ws';
|
||||
import type { Browser } from '../server/browser';
|
||||
|
@ -3,6 +3,8 @@
|
||||
../generated/
|
||||
../protocol/
|
||||
../utils/
|
||||
../utilsBundle.ts
|
||||
../zipBundle.ts
|
||||
./
|
||||
./injected/
|
||||
./isomorphic/
|
||||
|
@ -3,4 +3,5 @@
|
||||
../../common/
|
||||
../../protocol/
|
||||
../../utils/
|
||||
../../utilsBundle.ts
|
||||
../chromium/
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import debug from 'debug';
|
||||
import { debug } from '../../utilsBundle';
|
||||
import type * as types from '../types';
|
||||
import { EventEmitter } from 'events';
|
||||
import fs from 'fs';
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import debug from 'debug';
|
||||
import { debug } from '../../utilsBundle';
|
||||
import type * as types from '../types';
|
||||
import * as net from 'net';
|
||||
import { EventEmitter } from 'events';
|
||||
|
@ -2,4 +2,5 @@
|
||||
../../common/
|
||||
../../protocol/
|
||||
../../utils/
|
||||
../../zipBundle.ts
|
||||
../**
|
||||
|
@ -22,9 +22,7 @@ import { ManualPromise } from '../../utils/manualPromise';
|
||||
import { assert, createGuid } from '../../utils';
|
||||
import type { DispatcherScope } from './dispatcher';
|
||||
import { Dispatcher } from './dispatcher';
|
||||
|
||||
const yazl: typeof import('yazl') = require('../../zipBundle').yazl;
|
||||
const yauzl: typeof import('yauzl') = require('../../zipBundle').yauzl;
|
||||
import { yazl, yauzl } from '../../zipBundle';
|
||||
|
||||
export class LocalUtilsDispatcher extends Dispatcher<{ guid: string }, channels.LocalUtilsChannel> implements channels.LocalUtilsChannel {
|
||||
_type_LocalUtils: boolean;
|
||||
|
@ -36,9 +36,7 @@ import { ProgressController } from './progress';
|
||||
import { Tracing } from './trace/recorder/tracing';
|
||||
import type * as types from './types';
|
||||
import type { HeadersArray, ProxySettings } from './types';
|
||||
|
||||
const { HttpsProxyAgent }: typeof import('../../bundles/utils/node_modules/https-proxy-agent') = require('../utilsBundle');
|
||||
const { SocksProxyAgent }: typeof import('../../bundles/utils/node_modules/socks-proxy-agent') = require('../utilsBundle');
|
||||
import { HttpsProxyAgent, SocksProxyAgent } from '../utilsBundle';
|
||||
|
||||
type FetchRequestOptions = {
|
||||
userAgent: string;
|
||||
|
@ -4,6 +4,7 @@
|
||||
../../common/
|
||||
../../protocol/
|
||||
../../utils/**
|
||||
../../zipBundle.ts
|
||||
|
||||
[recorderApp.ts]
|
||||
../chromium/crApp.ts
|
||||
|
@ -22,8 +22,7 @@ import { getUserAgent } from '../../common/userAgent';
|
||||
import { existsAsync } from '../../utils/fileUtils';
|
||||
import { debugLogger } from '../../common/debugLogger';
|
||||
import { download } from './download';
|
||||
|
||||
const extract: typeof import('../../../bundles/zip/node_modules/extract-zip') = require('../../zipBundle').extract;
|
||||
import { extract } from '../../zipBundle';
|
||||
|
||||
export async function downloadBrowserWithProgressBar(title: string, browserDirectory: string, executablePath: string, downloadURL: string, downloadFileName: string): Promise<boolean> {
|
||||
const progressBarName = `Playwright build of ${title}`;
|
||||
|
@ -19,6 +19,7 @@ import * as os from 'os';
|
||||
import path from 'path';
|
||||
import * as util from 'util';
|
||||
import * as fs from 'fs';
|
||||
import { lockfile } from '../../utilsBundle';
|
||||
import { getUbuntuVersion } from '../../utils/ubuntuVersion';
|
||||
import { fetchData } from '../../common/netUtils';
|
||||
import { getClientLanguage } from '../../common/userAgent';
|
||||
@ -32,8 +33,6 @@ import { installDependenciesLinux, installDependenciesWindows, validateDependenc
|
||||
import { downloadBrowserWithProgressBar, logPolitely } from './browserFetcher';
|
||||
export { writeDockerVersion } from './dependencies';
|
||||
|
||||
const lockfile: typeof import('proper-lockfile') = require('../../utilsBundle').lockfile;
|
||||
|
||||
const PACKAGE_PATH = path.join(__dirname, '..', '..', '..');
|
||||
const BIN_PATH = path.join(__dirname, '..', '..', '..', 'bin');
|
||||
|
||||
|
@ -4,4 +4,5 @@
|
||||
../../../common/
|
||||
../../../protocol/
|
||||
../../../utils/
|
||||
../../../zipBundle.ts
|
||||
../common/
|
||||
|
@ -41,8 +41,7 @@ import type * as trace from '../common/traceEvents';
|
||||
import { VERSION } from '../common/traceEvents';
|
||||
import type { SnapshotterBlob, SnapshotterDelegate } from './snapshotter';
|
||||
import { Snapshotter } from './snapshotter';
|
||||
|
||||
const yazl: typeof import('yazl') = require('../../../zipBundle').yazl;
|
||||
import { yazl } from '../../../zipBundle';
|
||||
|
||||
export type TracerOptions = {
|
||||
name?: string;
|
||||
|
@ -2,3 +2,4 @@
|
||||
./
|
||||
../third_party/diff_match_patch
|
||||
../third_party/pixelmatch
|
||||
../utilsBundle.ts
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import colors from 'colors/safe';
|
||||
import { colors } from '../utilsBundle';
|
||||
import jpeg from 'jpeg-js';
|
||||
import pixelmatch from '../third_party/pixelmatch';
|
||||
import { diff_match_patch, DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL } from '../third_party/diff_match_patch';
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
const rimraf: typeof import('rimraf') = require('../utilsBundle').rimraf;
|
||||
import { rimraf } from '../utilsBundle';
|
||||
|
||||
export const existsAsync = (path: string): Promise<boolean> => new Promise(resolve => fs.stat(path, err => resolve(!err)));
|
||||
|
||||
|
@ -20,8 +20,7 @@ import * as readline from 'readline';
|
||||
import { eventsHelper } from './eventsHelper';
|
||||
import { isUnderTest } from './';
|
||||
import { removeFolders } from './fileUtils';
|
||||
|
||||
const rimraf: typeof import('rimraf') = require('../utilsBundle').rimraf;
|
||||
import { rimraf } from '../utilsBundle';
|
||||
|
||||
export type Env = {[key: string]: string | number | boolean | undefined};
|
||||
|
||||
|
@ -15,10 +15,9 @@
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import { StackUtils } from '../utilsBundle';
|
||||
import { isUnderTest } from './';
|
||||
|
||||
const StackUtils: typeof import('stack-utils') = require('../utilsBundle').StackUtils;
|
||||
|
||||
const stackUtils = new StackUtils();
|
||||
|
||||
export function rewriteErrorMessage<E extends Error>(e: E, newMessage: string): E {
|
||||
|
26
packages/playwright-core/src/utilsBundle.ts
Normal file
26
packages/playwright-core/src/utilsBundle.ts
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export const colors: typeof import('../bundles/utils/node_modules/colors/safe') = require('./utilsBundleImpl').colors;
|
||||
export const debug: typeof import('../bundles/utils/node_modules/@types/debug') = require('./utilsBundleImpl').debug;
|
||||
export const getProxyForUrl: typeof import('../bundles/utils/node_modules/@types/proxy-from-env').getProxyForUrl = require('./utilsBundleImpl').getProxyForUrl;
|
||||
export const HttpsProxyAgent: typeof import('../bundles/utils/node_modules/https-proxy-agent').HttpsProxyAgent = require('./utilsBundleImpl').HttpsProxyAgent;
|
||||
export const lockfile: typeof import('../bundles/utils/node_modules/@types/proper-lockfile') = require('./utilsBundleImpl').lockfile;
|
||||
export const program: typeof import('../bundles/utils/node_modules/commander').program = require('./utilsBundleImpl').program;
|
||||
export const rimraf: typeof import('../bundles/utils/node_modules/@types/rimraf') = require('./utilsBundleImpl').rimraf;
|
||||
export const SocksProxyAgent: typeof import('../bundles/utils/node_modules/socks-proxy-agent').SocksProxyAgent = require('./utilsBundleImpl').SocksProxyAgent;
|
||||
export const StackUtils: typeof import('../bundles/utils/node_modules/@types/stack-utils') = require('./utilsBundleImpl').StackUtils;
|
||||
export type { Command } from '../bundles/utils/node_modules/commander';
|
20
packages/playwright-core/src/zipBundle.ts
Normal file
20
packages/playwright-core/src/zipBundle.ts
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export const yazl: typeof import('../bundles/zip/node_modules/@types/yazl') = require('./zipBundleImpl').yazl;
|
||||
export type { ZipFile } from '../bundles/zip/node_modules/@types/yazl';
|
||||
export const yauzl: typeof import('../bundles/zip/node_modules/@types/yauzl') = require('./zipBundleImpl').yauzl;
|
||||
export const extract: typeof import('../bundles/zip/node_modules/extract-zip') = require('./zipBundleImpl').extract;
|
117
packages/playwright-test/bundles/babel/package-lock.json
generated
117
packages/playwright-test/bundles/babel/package-lock.json
generated
@ -26,6 +26,11 @@
|
||||
"@babel/plugin-syntax-optional-catch-binding": "7.8.3",
|
||||
"@babel/plugin-transform-modules-commonjs": "7.16.8",
|
||||
"@babel/preset-typescript": "7.16.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/babel__code-frame": "^7.0.3",
|
||||
"@types/babel__core": "^7.1.18",
|
||||
"@types/babel__helper-plugin-utils": "^7.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
@ -701,6 +706,62 @@
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/babel__code-frame": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__code-frame/-/babel__code-frame-7.0.3.tgz",
|
||||
"integrity": "sha512-2TN6oiwtNjOezilFVl77zwdNPwQWaDBBCCWWxyo1ctiO3vAtd7H/aB/CBJdw9+kqq3+latD0SXoedIuHySSZWw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/babel__core": {
|
||||
"version": "7.1.19",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz",
|
||||
"integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.1.0",
|
||||
"@babel/types": "^7.0.0",
|
||||
"@types/babel__generator": "*",
|
||||
"@types/babel__template": "*",
|
||||
"@types/babel__traverse": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/babel__generator": {
|
||||
"version": "7.6.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz",
|
||||
"integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/babel__helper-plugin-utils": {
|
||||
"version": "7.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__helper-plugin-utils/-/babel__helper-plugin-utils-7.10.0.tgz",
|
||||
"integrity": "sha512-60YtHzhQ9HAkToHVV+TB4VLzBn9lrfgrsOjiJMtbv/c1jPdekBxaByd6DMsGBzROXWoIL6U3lEFvvbu69RkUoA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/babel__core": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/babel__template": {
|
||||
"version": "7.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz",
|
||||
"integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.1.0",
|
||||
"@babel/types": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/babel__traverse": {
|
||||
"version": "7.17.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.0.tgz",
|
||||
"integrity": "sha512-r8aveDbd+rzGP+ykSdF3oPuTVRWRfbBiHl0rVDM2yNEmSMXfkObQLV46b4RnCv3Lra51OlfnZhkkFaDl2MIRaA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
@ -1510,6 +1571,62 @@
|
||||
"to-fast-properties": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@types/babel__code-frame": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__code-frame/-/babel__code-frame-7.0.3.tgz",
|
||||
"integrity": "sha512-2TN6oiwtNjOezilFVl77zwdNPwQWaDBBCCWWxyo1ctiO3vAtd7H/aB/CBJdw9+kqq3+latD0SXoedIuHySSZWw==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/babel__core": {
|
||||
"version": "7.1.19",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz",
|
||||
"integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/parser": "^7.1.0",
|
||||
"@babel/types": "^7.0.0",
|
||||
"@types/babel__generator": "*",
|
||||
"@types/babel__template": "*",
|
||||
"@types/babel__traverse": "*"
|
||||
}
|
||||
},
|
||||
"@types/babel__generator": {
|
||||
"version": "7.6.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz",
|
||||
"integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"@types/babel__helper-plugin-utils": {
|
||||
"version": "7.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__helper-plugin-utils/-/babel__helper-plugin-utils-7.10.0.tgz",
|
||||
"integrity": "sha512-60YtHzhQ9HAkToHVV+TB4VLzBn9lrfgrsOjiJMtbv/c1jPdekBxaByd6DMsGBzROXWoIL6U3lEFvvbu69RkUoA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/babel__core": "*"
|
||||
}
|
||||
},
|
||||
"@types/babel__template": {
|
||||
"version": "7.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz",
|
||||
"integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/parser": "^7.1.0",
|
||||
"@babel/types": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"@types/babel__traverse": {
|
||||
"version": "7.17.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.0.tgz",
|
||||
"integrity": "sha512-r8aveDbd+rzGP+ykSdF3oPuTVRWRfbBiHl0rVDM2yNEmSMXfkObQLV46b4RnCv3Lra51OlfnZhkkFaDl2MIRaA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.3.0"
|
||||
}
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
|
@ -3,7 +3,7 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"esbuild": "esbuild ./src/babelBundle.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019",
|
||||
"esbuild": "esbuild ./src/babelBundleImpl.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019",
|
||||
"build": "npm ci && npm run esbuild -- --minify",
|
||||
"watch": "npm ci && npm run esbuild -- --watch --sourcemap",
|
||||
"generate-license": "node ../../../../utils/generate_third_party_notice.js"
|
||||
@ -27,5 +27,10 @@
|
||||
"@babel/plugin-syntax-optional-catch-binding": "7.8.3",
|
||||
"@babel/plugin-transform-modules-commonjs": "7.16.8",
|
||||
"@babel/preset-typescript": "7.16.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/babel__code-frame": "^7.0.3",
|
||||
"@types/babel__core": "^7.1.18",
|
||||
"@types/babel__helper-plugin-utils": "^7.10.0"
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"esbuild": "esbuild ./src/expectBundle.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019",
|
||||
"esbuild": "esbuild ./src/expectBundleImpl.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019",
|
||||
"build": "npm ci && npm run esbuild -- --minify",
|
||||
"watch": "npm ci && npm run esbuild -- --watch --sourcemap",
|
||||
"generate-license": "node ../../../../utils/generate_third_party_notice.js"
|
||||
|
@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import expect from 'expect';
|
||||
export const expectLibrary = expect;
|
||||
import expectLibrary from 'expect';
|
||||
export const expect = expectLibrary;
|
||||
|
||||
export {
|
||||
INVERTED_COLOR,
|
@ -29,9 +29,6 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"colors": "1.4.0",
|
||||
"commander": "8.3.0",
|
||||
"debug": "4.3.3",
|
||||
"json5": "2.2.1",
|
||||
"mime": "3.0.0",
|
||||
"minimatch": "3.0.4",
|
||||
|
24
packages/playwright-test/src/babelBundle.ts
Normal file
24
packages/playwright-test/src/babelBundle.ts
Normal file
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { BabelFileResult } from '../bundles/babel/node_modules/@types/babel__core';
|
||||
export const codeFrameColumns: typeof import('../bundles/babel/node_modules/@types/babel__code-frame').codeFrameColumns = require('./babelBundleImpl').codeFrameColumns;
|
||||
export const declare: typeof import('../bundles/babel/node_modules/@types/babel__helper-plugin-utils').declare = require('./babelBundleImpl').declare;
|
||||
export const types: typeof import('../bundles/babel/node_modules/@types/babel__core').types = require('./babelBundleImpl').types;
|
||||
export type BabelTransformFunction = (filename: string, isTypeScript: boolean, isModule: boolean, scriptPreprocessor: string | undefined, additionalPlugin: [string]) => BabelFileResult;
|
||||
export const babelTransform: BabelTransformFunction = require('./babelBundleImpl').babelTransform;
|
||||
export type { NodePath, types as T } from '../bundles/babel/node_modules/@types/babel__core';
|
||||
export type { BabelAPI } from '../bundles/babel/node_modules/@types/babel__helper-plugin-utils';
|
@ -16,7 +16,7 @@
|
||||
|
||||
/* eslint-disable no-console */
|
||||
|
||||
import type { Command } from 'commander';
|
||||
import type { Command } from 'playwright-core/lib/utilsBundle';
|
||||
import fs from 'fs';
|
||||
import url from 'url';
|
||||
import path from 'path';
|
||||
|
@ -43,13 +43,12 @@ import type { Expect } from './types';
|
||||
import { currentTestInfo } from './globals';
|
||||
import { serializeError, captureStackTrace, currentExpectTimeout } from './util';
|
||||
import { monotonicTime } from 'playwright-core/lib/utils';
|
||||
|
||||
const { expectLibrary } = require('./expectBundle');
|
||||
const {
|
||||
import {
|
||||
expect as expectLibrary,
|
||||
INVERTED_COLOR,
|
||||
RECEIVED_COLOR,
|
||||
printReceived,
|
||||
} = require('./expectBundle');
|
||||
} from './expectBundle';
|
||||
|
||||
// from expect/build/types
|
||||
export type SyncExpectationResult = {
|
||||
|
20
packages/playwright-test/src/expectBundle.ts
Normal file
20
packages/playwright-test/src/expectBundle.ts
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export const expect: typeof import('../bundles/expect/node_modules/expect') = require('./expectBundleImpl').expect;
|
||||
export const INVERTED_COLOR: typeof import('../bundles/expect/node_modules/jest-matcher-utils').INVERTED_COLOR = require('./expectBundleImpl').INVERTED_COLOR;
|
||||
export const RECEIVED_COLOR: typeof import('../bundles/expect/node_modules/jest-matcher-utils').RECEIVED_COLOR = require('./expectBundleImpl').RECEIVED_COLOR;
|
||||
export const printReceived: typeof import('../bundles/expect/node_modules/jest-matcher-utils').printReceived = require('./expectBundleImpl').printReceived;
|
@ -26,7 +26,7 @@ import {
|
||||
addSuffixToFilePath, serializeError, sanitizeForFilePath,
|
||||
trimLongString, callLogText, currentExpectTimeout,
|
||||
expectTypes, captureStackTrace } from '../util';
|
||||
import colors from 'colors/safe';
|
||||
import { colors } from 'playwright-core/lib/utilsBundle';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import * as mime from 'mime';
|
||||
|
@ -1,3 +1,3 @@
|
||||
[*]
|
||||
../util.ts
|
||||
../babelBundle
|
||||
../babelBundle.ts
|
||||
|
@ -14,15 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import colors from 'colors/safe';
|
||||
import { colors } from 'playwright-core/lib/utilsBundle';
|
||||
import fs from 'fs';
|
||||
import milliseconds from 'ms';
|
||||
import path from 'path';
|
||||
import { StackUtils } from 'playwright-core/lib/utilsBundle';
|
||||
import type { FullConfig, TestCase, Suite, TestResult, TestError, Reporter, FullResult, TestStep, Location } from '../../types/testReporter';
|
||||
import type { FullConfigInternal } from '../types';
|
||||
|
||||
const { codeFrameColumns } = require('../babelBundle');
|
||||
const StackUtils: typeof import('stack-utils') = require('playwright-core/lib/utilsBundle').StackUtils;
|
||||
import { codeFrameColumns } from '../babelBundle';
|
||||
const stackUtils = new StackUtils();
|
||||
|
||||
export type TestResultOutput = { chunk: string | Buffer, type: 'stdout' | 'stderr' };
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import colors from 'colors/safe';
|
||||
import { colors } from 'playwright-core/lib/utilsBundle';
|
||||
import { BaseReporter } from './base';
|
||||
import type { FullResult, TestCase, TestResult, FullConfig, Suite } from '../../types/testReporter';
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import colors from 'colors/safe';
|
||||
import { colors } from 'playwright-core/lib/utilsBundle';
|
||||
import fs from 'fs';
|
||||
import open from 'open';
|
||||
import path from 'path';
|
||||
@ -29,9 +29,8 @@ import RawReporter from './raw';
|
||||
import { stripAnsiEscapes } from './base';
|
||||
import { getPackageJsonPath } from '../util';
|
||||
import type { FullConfigInternal } from '../types';
|
||||
|
||||
import type { ZipFile } from 'yazl';
|
||||
const yazl: typeof import('yazl') = require('playwright-core/lib/zipBundle').yazl;
|
||||
import type { ZipFile } from 'playwright-core/lib/zipBundle';
|
||||
import { yazl } from 'playwright-core/lib/zipBundle';
|
||||
|
||||
export type Stats = {
|
||||
total: number;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import colors from 'colors/safe';
|
||||
import { colors } from 'playwright-core/lib/utilsBundle';
|
||||
import { BaseReporter, formatFailure, formatTestTitle } from './base';
|
||||
import type { FullConfig, TestCase, Suite, TestResult, FullResult } from '../../types/testReporter';
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
/* eslint-disable no-console */
|
||||
import colors from 'colors/safe';
|
||||
import { colors } from 'playwright-core/lib/utilsBundle';
|
||||
import milliseconds from 'ms';
|
||||
import { BaseReporter, formatTestTitle } from './base';
|
||||
import type { FullConfig, FullResult, Suite, TestCase, TestResult, TestStep } from '../../types/testReporter';
|
||||
|
@ -22,8 +22,7 @@ import { sanitizeForFilePath } from '../util';
|
||||
import { formatResultFailure } from './base';
|
||||
import { toPosixPath, serializePatterns } from './json';
|
||||
import { MultiMap } from 'playwright-core/lib/utils/multimap';
|
||||
|
||||
const { codeFrameColumns } = require('../babelBundle');
|
||||
import { codeFrameColumns } from '../babelBundle';
|
||||
|
||||
export type JsonLocation = Location;
|
||||
export type JsonError = string;
|
||||
|
@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { rimraf } from 'playwright-core/lib/utilsBundle';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { promisify } from 'util';
|
||||
@ -45,7 +46,6 @@ import { raceAgainstTimeout } from 'playwright-core/lib/utils/timeoutRunner';
|
||||
import { SigIntWatcher } from './sigIntWatcher';
|
||||
import { GlobalInfoImpl } from './globalInfo';
|
||||
|
||||
const rimraf: typeof import('rimraf') = require('playwright-core/lib/utilsBundle').rimraf;
|
||||
const removeFolderAsync = promisify(rimraf);
|
||||
const readDirAsync = promisify(fs.readdir);
|
||||
const readFileAsync = promisify(fs.readFile);
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import colors from 'colors/safe';
|
||||
import { colors } from 'playwright-core/lib/utilsBundle';
|
||||
import { TimeoutRunner, TimeoutRunnerError } from 'playwright-core/lib/utils/timeoutRunner';
|
||||
import type { TestError } from '../types/test';
|
||||
import type { Location } from './types';
|
||||
|
@ -25,6 +25,7 @@ import type { Location } from './types';
|
||||
import type { TsConfigLoaderResult } from './third_party/tsconfig-loader';
|
||||
import { tsConfigLoader } from './third_party/tsconfig-loader';
|
||||
import Module from 'module';
|
||||
import type { BabelTransformFunction } from './babelBundle';
|
||||
|
||||
const version = 8;
|
||||
const cacheDir = process.env.PWTEST_CACHE_DIR || path.join(os.tmpdir(), 'playwright-transform-cache');
|
||||
@ -183,7 +184,7 @@ export function transformHook(code: string, filename: string, isModule = false):
|
||||
process.env.BROWSERSLIST_IGNORE_OLD_DATA = 'true';
|
||||
|
||||
try {
|
||||
const { babelTransform } = require('./babelBundle');
|
||||
const { babelTransform }: { babelTransform: BabelTransformFunction } = require('./babelBundle');
|
||||
const result = babelTransform(filename, isTypeScript, isModule, hasPreprocessor ? scriptPreprocessor : undefined, [require.resolve('./tsxTransform')]);
|
||||
if (result.code) {
|
||||
fs.mkdirSync(path.dirname(cachePath), { recursive: true });
|
||||
|
@ -14,9 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { NodePath, types as T } from '@babel/core';
|
||||
import type { BabelAPI } from '@babel/helper-plugin-utils';
|
||||
const { types, declare } = require('./babelBundle');
|
||||
import type { NodePath, T, BabelAPI } from './babelBundle';
|
||||
import { types, declare } from './babelBundle';
|
||||
const t: typeof T = types;
|
||||
|
||||
export default declare((api: BabelAPI) => {
|
||||
|
@ -19,10 +19,9 @@ import * as mime from 'mime';
|
||||
import util from 'util';
|
||||
import path from 'path';
|
||||
import url from 'url';
|
||||
import colors from 'colors/safe';
|
||||
import { colors, debug } from 'playwright-core/lib/utilsBundle';
|
||||
import type { TestError, Location } from './types';
|
||||
import { default as minimatch } from 'minimatch';
|
||||
import debug from 'debug';
|
||||
import { calculateSha1, isRegExp } from 'playwright-core/lib/utils';
|
||||
import { isInternalFileName } from 'playwright-core/lib/utils/stackTrace';
|
||||
import { currentTestInfo } from './globals';
|
||||
@ -32,7 +31,8 @@ import { captureStackTrace as coreCaptureStackTrace } from 'playwright-core/lib/
|
||||
export type { ParsedStackTrace };
|
||||
|
||||
const PLAYWRIGHT_CORE_PATH = path.dirname(require.resolve('playwright-core'));
|
||||
const EXPECT_PATH = path.dirname(require.resolve('./expectBundle'));
|
||||
const EXPECT_PATH = require.resolve('./expectBundle');
|
||||
const EXPECT_PATH_IMPL = require.resolve('./expectBundleImpl');
|
||||
const PLAYWRIGHT_TEST_PATH = path.join(__dirname, '..');
|
||||
|
||||
function filterStackTrace(e: Error) {
|
||||
@ -71,7 +71,7 @@ export function captureStackTrace(customApiName?: string): ParsedStackTrace {
|
||||
const frameTexts = [];
|
||||
for (let i = 0; i < stackTrace.frames.length; ++i) {
|
||||
const frame = stackTrace.frames[i];
|
||||
if (frame.file.startsWith(EXPECT_PATH))
|
||||
if (frame.file === EXPECT_PATH || frame.file === EXPECT_PATH_IMPL)
|
||||
continue;
|
||||
frames.push(frame);
|
||||
frameTexts.push(stackTrace.frameTexts[i]);
|
||||
|
@ -17,7 +17,7 @@
|
||||
import http from 'http';
|
||||
import https from 'https';
|
||||
import net from 'net';
|
||||
import debug from 'debug';
|
||||
import { debug } from 'playwright-core/lib/utilsBundle';
|
||||
import { raceAgainstTimeout } from 'playwright-core/lib/utils/timeoutRunner';
|
||||
import type { WebServerConfig } from './types';
|
||||
import { launchProcess } from 'playwright-core/lib/utils/processLauncher';
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import colors from 'colors/safe';
|
||||
import { colors, rimraf } from 'playwright-core/lib/utilsBundle';
|
||||
import util from 'util';
|
||||
import { EventEmitter } from 'events';
|
||||
import { relativeFilePath, serializeError } from './util';
|
||||
@ -30,7 +30,6 @@ import { TestInfoImpl } from './testInfo';
|
||||
import type { TimeSlot } from './timeoutManager';
|
||||
import { TimeoutManager } from './timeoutManager';
|
||||
|
||||
const rimraf: typeof import('rimraf') = require('playwright-core/lib/utilsBundle').rimraf;
|
||||
const removeFolderAsync = util.promisify(rimraf);
|
||||
|
||||
export class WorkerRunner extends EventEmitter {
|
||||
|
@ -18,6 +18,7 @@ import type { JSONReport, JSONReportSuite } from '@playwright/test/reporter';
|
||||
import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import { rimraf } from 'playwright-core/lib/utilsBundle';
|
||||
import { PNG } from 'pngjs';
|
||||
import { promisify } from 'util';
|
||||
import type { CommonFixtures } from '../config/commonFixtures';
|
||||
@ -27,7 +28,6 @@ import { serverFixtures } from '../config/serverFixtures';
|
||||
import type { TestInfo } from './stable-test-runner';
|
||||
import { test as base } from './stable-test-runner';
|
||||
|
||||
const rimraf: typeof import('rimraf') = require('playwright-core/lib/utilsBundle').rimraf;
|
||||
const removeFolderAsync = promisify(rimraf);
|
||||
|
||||
type RunResult = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user