@browserless/goto 9.6.2 → 9.6.6

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 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.2",
5
+ "version": "9.6.6",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -29,7 +29,7 @@
29
29
  "puppeteer"
30
30
  ],
31
31
  "dependencies": {
32
- "@browserless/devices": "^9.4.1",
32
+ "@browserless/devices": "^9.6.6",
33
33
  "@cliqz/adblocker-puppeteer": "~1.23.8",
34
34
  "debug-logfmt": "~1.0.4",
35
35
  "got": "~11.8.5",
@@ -40,7 +40,7 @@
40
40
  "shallow-equal": "~1.2.1",
41
41
  "time-span": "~4.0.0",
42
42
  "top-user-agents": "~1.0.45",
43
- "tough-cookie": "~4.0.0",
43
+ "tough-cookie": "~4.1.0",
44
44
  "unique-random-array": "~2.0.0"
45
45
  },
46
46
  "devDependencies": {
@@ -59,15 +59,16 @@
59
59
  ],
60
60
  "scripts": {
61
61
  "postinstall": "node scripts/postinstall",
62
- "test": "NODE_ENV=test ava"
62
+ "test": "ava"
63
63
  },
64
64
  "license": "MIT",
65
65
  "ava": {
66
66
  "files": [
67
67
  "!test/fixtures"
68
68
  ],
69
- "timeout": "2m",
69
+ "serial": true,
70
+ "timeout": "30s",
70
71
  "verbose": true
71
72
  },
72
- "gitHead": "e29ac9d5b86e7db27429130abc9689bbf39025dd"
73
+ "gitHead": "74da0ac7388ee354aec0517218afb143ec6a095d"
73
74
  }
package/src/engine.bin CHANGED
Binary file
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({