@browserless/goto 9.6.2 → 9.6.4
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 +12 -0
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.6.
|
|
5
|
+
"version": "9.6.4",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "hello@microlink.io",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"timeout": "2m",
|
|
70
70
|
"verbose": true
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "b76bea9e809c491bae88f010b96fac20cdd048de"
|
|
73
73
|
}
|
package/src/index.js
CHANGED
|
@@ -198,12 +198,14 @@ module.exports = ({
|
|
|
198
198
|
javascript = true,
|
|
199
199
|
mediaType,
|
|
200
200
|
modules,
|
|
201
|
+
password,
|
|
201
202
|
scripts,
|
|
202
203
|
scroll,
|
|
203
204
|
styles,
|
|
204
205
|
timeout = globalTimeout,
|
|
205
206
|
timezone,
|
|
206
207
|
url,
|
|
208
|
+
username,
|
|
207
209
|
waitForFunction,
|
|
208
210
|
waitForSelector,
|
|
209
211
|
waitForTimeout,
|
|
@@ -222,6 +224,16 @@ module.exports = ({
|
|
|
222
224
|
|
|
223
225
|
const prePromises = []
|
|
224
226
|
|
|
227
|
+
if (username || password) {
|
|
228
|
+
prePromises.push(
|
|
229
|
+
run({
|
|
230
|
+
fn: page.authenticate({ username, password }),
|
|
231
|
+
timeout: actionTimeout,
|
|
232
|
+
debug: 'authenticate'
|
|
233
|
+
})
|
|
234
|
+
)
|
|
235
|
+
}
|
|
236
|
+
|
|
225
237
|
if (modules || scripts || styles) {
|
|
226
238
|
prePromises.push(
|
|
227
239
|
run({
|