@browserless/goto 9.3.0-beta.8 → 9.3.0-beta.9
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 +2 -2
- package/src/index.js +3 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@browserless/goto",
|
|
3
3
|
"description": "Go to a page aborting unnecessary requests",
|
|
4
4
|
"homepage": "https://browserless.js.org/#/?id=gotopage-options",
|
|
5
|
-
"version": "9.3.0-beta.
|
|
5
|
+
"version": "9.3.0-beta.9",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "hello@microlink.io",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"timeout": "2m",
|
|
69
69
|
"verbose": true
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "5917cbb975fba39b208fe7820d16a5655fa75420"
|
|
72
72
|
}
|
package/src/index.js
CHANGED
|
@@ -117,6 +117,7 @@ module.exports = ({
|
|
|
117
117
|
...deviceOpts
|
|
118
118
|
}) => {
|
|
119
119
|
const baseTimeout = globalTimeout * (1 / 2)
|
|
120
|
+
const gotoTimeout = timeout * 0.8
|
|
120
121
|
const actionTimeout = baseTimeout * (1 / 8)
|
|
121
122
|
|
|
122
123
|
const getDevice = createDevices(deviceOpts)
|
|
@@ -277,7 +278,7 @@ module.exports = ({
|
|
|
277
278
|
|
|
278
279
|
const { value } = await run({
|
|
279
280
|
fn: html ? page.setContent(html, args) : page.goto(url, args),
|
|
280
|
-
timeout:
|
|
281
|
+
timeout: gotoTimeout,
|
|
281
282
|
debug: html ? 'html' : 'url'
|
|
282
283
|
})
|
|
283
284
|
|
|
@@ -288,7 +289,7 @@ module.exports = ({
|
|
|
288
289
|
waitForTimeout
|
|
289
290
|
})) {
|
|
290
291
|
if (value) {
|
|
291
|
-
await run({ fn: page[key](value), timeout:
|
|
292
|
+
await run({ fn: page[key](value), timeout: gotoTimeout, debug: { [key]: value } })
|
|
292
293
|
}
|
|
293
294
|
}
|
|
294
295
|
|