browserless 13.6.11 → 13.7.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.
- package/package.json +5 -6
- package/src/index.js +2 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "browserless",
|
|
3
3
|
"description": "The headless Chrome/Chromium driver on top of Puppeteer. Take screenshots, generate PDFs, extract text and HTML with a production-ready API.",
|
|
4
4
|
"homepage": "https://browserless.js.org",
|
|
5
|
-
"version": "13.
|
|
5
|
+
"version": "13.7.1",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"author": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@browserless/errors": "13.6.10",
|
|
39
|
-
"@browserless/goto": "13.
|
|
40
|
-
"@browserless/pdf": "13.
|
|
41
|
-
"@browserless/screenshot": "13.
|
|
39
|
+
"@browserless/goto": "13.7.1",
|
|
40
|
+
"@browserless/pdf": "13.7.1",
|
|
41
|
+
"@browserless/screenshot": "13.7.1",
|
|
42
42
|
"debug-logfmt": "~1.4.10",
|
|
43
43
|
"kill-process-group": "~1.0.13",
|
|
44
44
|
"p-reflect": "~2.1.0",
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"superlock": "~1.3.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@browserless/test": "13.6.11",
|
|
52
51
|
"ava": "5",
|
|
53
52
|
"ps-list": "7",
|
|
54
53
|
"puppeteer": "25",
|
|
@@ -70,5 +69,5 @@
|
|
|
70
69
|
"timeout": "2m",
|
|
71
70
|
"workerThreads": false
|
|
72
71
|
},
|
|
73
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "366c1854294079765b40ebc755981142ab78f1ac"
|
|
74
73
|
}
|
package/src/index.js
CHANGED
|
@@ -150,7 +150,9 @@ module.exports = ({ timeout: globalTimeout = 30000, ...launchOpts } = {}) => {
|
|
|
150
150
|
const isRetryable =
|
|
151
151
|
error.code === 'EBRWSRCONTEXTCONNRESET' || error.code === 'EPROTOCOL'
|
|
152
152
|
if (!isRetryable) throw error
|
|
153
|
+
const previousContextPromise = _contextPromise
|
|
153
154
|
_contextPromise = createBrowserContext(contextOpts)
|
|
155
|
+
await pReflect(previousContextPromise.then(ctx => ctx.close()))
|
|
154
156
|
const { message, attemptNumber, retriesLeft } = error
|
|
155
157
|
debug('retry', { attemptNumber, retriesLeft, message })
|
|
156
158
|
}
|