@browserless.io/browserless 2.2.0 → 2.3.0-beta-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.
Files changed (80) hide show
  1. package/bin/browserless.js +25 -14
  2. package/build/browserless.d.ts +6 -1
  3. package/build/browserless.js +38 -20
  4. package/build/exports.core.d.ts +24 -0
  5. package/build/exports.core.js +26 -0
  6. package/build/exports.d.ts +38 -24
  7. package/build/exports.js +44 -26
  8. package/build/routes/chrome/http/content.post.body.json +8 -8
  9. package/build/routes/chrome/http/download.post.body.json +489 -11
  10. package/build/routes/chrome/http/download.post.query.json +69 -6
  11. package/build/routes/chrome/http/download.post.response.json +1 -0
  12. package/build/routes/chrome/http/function.post.body.json +489 -11
  13. package/build/routes/chrome/http/function.post.query.json +69 -6
  14. package/build/routes/chrome/http/function.post.response.json +1 -0
  15. package/build/routes/chrome/http/json-list.get.response.json +1 -49
  16. package/build/routes/chrome/http/json-new.put.response.json +1 -41
  17. package/build/routes/chrome/http/json-protocol.get.response.json +1 -3
  18. package/build/routes/chrome/http/json-version.get.response.json +1 -41
  19. package/build/routes/chrome/http/pdf.post.body.json +9 -153
  20. package/build/routes/chrome/http/pdf.post.query.json +69 -6
  21. package/build/routes/chrome/http/performance.post.body.json +494 -10
  22. package/build/routes/chrome/http/performance.post.query.json +69 -6
  23. package/build/routes/chrome/http/performance.post.response.json +1 -3
  24. package/build/routes/chrome/http/scrape.post.body.json +9 -56
  25. package/build/routes/chrome/http/scrape.post.response.json +1 -305
  26. package/build/routes/chrome/http/screenshot.post.body.json +9 -99
  27. package/build/routes/chrome/http/screenshot.post.query.json +69 -6
  28. package/build/routes/chrome/ws/browser.query.json +69 -6
  29. package/build/routes/chrome/ws/cdp.query.json +69 -6
  30. package/build/routes/chrome/ws/page.query.json +69 -6
  31. package/build/routes/chrome/ws/playwright.query.json +90 -7
  32. package/build/routes/chromium/http/content.post.body.json +8 -8
  33. package/build/routes/chromium/http/download.post.body.json +489 -11
  34. package/build/routes/chromium/http/download.post.query.json +69 -6
  35. package/build/routes/chromium/http/download.post.response.json +1 -0
  36. package/build/routes/chromium/http/function.post.body.json +489 -11
  37. package/build/routes/chromium/http/function.post.query.json +69 -6
  38. package/build/routes/chromium/http/function.post.response.json +1 -0
  39. package/build/routes/chromium/http/json-list.get.response.json +1 -49
  40. package/build/routes/chromium/http/json-new.put.response.json +1 -41
  41. package/build/routes/chromium/http/json-protocol.get.response.json +1 -3
  42. package/build/routes/chromium/http/json-version.get.response.json +1 -41
  43. package/build/routes/chromium/http/pdf.post.body.json +9 -153
  44. package/build/routes/chromium/http/pdf.post.query.json +69 -6
  45. package/build/routes/chromium/http/performance.post.body.json +494 -10
  46. package/build/routes/chromium/http/performance.post.query.json +69 -6
  47. package/build/routes/chromium/http/performance.post.response.json +1 -3
  48. package/build/routes/chromium/http/scrape.post.body.json +9 -56
  49. package/build/routes/chromium/http/scrape.post.response.json +1 -305
  50. package/build/routes/chromium/http/screenshot.post.body.json +9 -99
  51. package/build/routes/chromium/http/screenshot.post.query.json +69 -6
  52. package/build/routes/chromium/ws/browser.query.json +69 -6
  53. package/build/routes/chromium/ws/cdp.query.json +69 -6
  54. package/build/routes/chromium/ws/page.query.json +69 -6
  55. package/build/routes/chromium/ws/playwright.query.json +90 -7
  56. package/build/routes/firefox/ws/playwright.d.ts +5 -1
  57. package/build/routes/firefox/ws/playwright.query.json +90 -7
  58. package/build/routes/management/http/config.get.response.json +1 -104
  59. package/build/routes/management/http/metrics-total.get.response.json +1 -69
  60. package/build/routes/management/http/metrics.get.response.json +1 -91
  61. package/build/routes/management/http/sessions.get.response.json +1 -232
  62. package/build/routes/management/http/static.get.js +7 -7
  63. package/build/routes/webkit/ws/playwright.query.json +90 -7
  64. package/build/shared/utils/performance/main.js +1 -1
  65. package/docker/chrome/Dockerfile +2 -0
  66. package/docker/chromium/Dockerfile +2 -0
  67. package/docker/firefox/Dockerfile +2 -0
  68. package/docker/multi/Dockerfile +2 -0
  69. package/docker/webkit/Dockerfile +2 -0
  70. package/package.json +1 -2
  71. package/scripts/build-open-api.js +18 -9
  72. package/scripts/build-schemas.js +2 -3
  73. package/src/browserless.ts +61 -36
  74. package/src/exports.core.ts +26 -0
  75. package/src/exports.ts +48 -26
  76. package/src/router.ts +6 -2
  77. package/src/routes/firefox/ws/playwright.ts +3 -1
  78. package/src/routes/management/http/static.get.ts +14 -9
  79. package/src/shared/utils/performance/main.ts +1 -2
  80. package/static/docs/swagger.json +1338 -2287
@@ -1,8 +1,12 @@
1
1
  {
2
+ "additionalProperties": false,
2
3
  "type": "object",
3
4
  "properties": {
5
+ "blockAds": {
6
+ "description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
7
+ "type": "boolean"
8
+ },
4
9
  "launch": {
5
- "description": "Launch options, which can be either an object\nof puppeteer.launch options or playwright.launchServer\noptions, depending on the API. Must be either JSON\nobject, or a base64-encoded JSON object.",
6
10
  "anyOf": [
7
11
  {
8
12
  "$ref": "#/definitions/CDPLaunchOptions"
@@ -12,10 +16,6 @@
12
16
  }
13
17
  ]
14
18
  },
15
- "blockAds": {
16
- "description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
17
- "type": "boolean"
18
- },
19
19
  "record": {
20
20
  "description": "Whether or nor to record the session. The browser will run\nin \"head-full\" mode, and recording is started and closed\nvia the embedded browserless API. Please refer to the \"Recording\"\nsection in the live documentation site for more details.",
21
21
  "type": "boolean"
@@ -29,7 +29,6 @@
29
29
  "type": "string"
30
30
  }
31
31
  },
32
- "additionalProperties": false,
33
32
  "definitions": {
34
33
  "CDPLaunchOptions": {
35
34
  "type": "object",
@@ -114,6 +113,70 @@
114
113
  }
115
114
  },
116
115
  "additionalProperties": false
116
+ },
117
+ "BrowserServerOptions": {
118
+ "type": "object",
119
+ "properties": {
120
+ "args": {
121
+ "type": "array",
122
+ "items": {
123
+ "type": "string"
124
+ }
125
+ },
126
+ "chromiumSandbox": {
127
+ "type": "boolean"
128
+ },
129
+ "devtools": {
130
+ "type": "boolean"
131
+ },
132
+ "downloadsPath": {
133
+ "type": "string"
134
+ },
135
+ "headless": {
136
+ "type": "boolean"
137
+ },
138
+ "ignoreDefaultArgs": {
139
+ "anyOf": [
140
+ {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string"
144
+ }
145
+ },
146
+ {
147
+ "type": "boolean"
148
+ }
149
+ ]
150
+ },
151
+ "proxy": {
152
+ "type": "object",
153
+ "properties": {
154
+ "bypass": {
155
+ "type": "string"
156
+ },
157
+ "password": {
158
+ "type": "string"
159
+ },
160
+ "server": {
161
+ "type": "string"
162
+ },
163
+ "username": {
164
+ "type": "string"
165
+ }
166
+ },
167
+ "additionalProperties": false,
168
+ "required": [
169
+ "server"
170
+ ]
171
+ },
172
+ "timeout": {
173
+ "type": "number"
174
+ },
175
+ "tracesDir": {
176
+ "type": "string"
177
+ }
178
+ },
179
+ "additionalProperties": false
117
180
  }
118
181
  },
119
182
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -1,8 +1,12 @@
1
1
  {
2
+ "additionalProperties": false,
2
3
  "type": "object",
3
4
  "properties": {
5
+ "blockAds": {
6
+ "description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
7
+ "type": "boolean"
8
+ },
4
9
  "launch": {
5
- "description": "Launch options, which can be either an object\nof puppeteer.launch options or playwright.launchServer\noptions, depending on the API. Must be either JSON\nobject, or a base64-encoded JSON object.",
6
10
  "anyOf": [
7
11
  {
8
12
  "$ref": "#/definitions/CDPLaunchOptions"
@@ -12,10 +16,6 @@
12
16
  }
13
17
  ]
14
18
  },
15
- "blockAds": {
16
- "description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
17
- "type": "boolean"
18
- },
19
19
  "record": {
20
20
  "description": "Whether or nor to record the session. The browser will run\nin \"head-full\" mode, and recording is started and closed\nvia the embedded browserless API. Please refer to the \"Recording\"\nsection in the live documentation site for more details.",
21
21
  "type": "boolean"
@@ -29,7 +29,6 @@
29
29
  "type": "string"
30
30
  }
31
31
  },
32
- "additionalProperties": false,
33
32
  "definitions": {
34
33
  "CDPLaunchOptions": {
35
34
  "type": "object",
@@ -114,6 +113,70 @@
114
113
  }
115
114
  },
116
115
  "additionalProperties": false
116
+ },
117
+ "BrowserServerOptions": {
118
+ "type": "object",
119
+ "properties": {
120
+ "args": {
121
+ "type": "array",
122
+ "items": {
123
+ "type": "string"
124
+ }
125
+ },
126
+ "chromiumSandbox": {
127
+ "type": "boolean"
128
+ },
129
+ "devtools": {
130
+ "type": "boolean"
131
+ },
132
+ "downloadsPath": {
133
+ "type": "string"
134
+ },
135
+ "headless": {
136
+ "type": "boolean"
137
+ },
138
+ "ignoreDefaultArgs": {
139
+ "anyOf": [
140
+ {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string"
144
+ }
145
+ },
146
+ {
147
+ "type": "boolean"
148
+ }
149
+ ]
150
+ },
151
+ "proxy": {
152
+ "type": "object",
153
+ "properties": {
154
+ "bypass": {
155
+ "type": "string"
156
+ },
157
+ "password": {
158
+ "type": "string"
159
+ },
160
+ "server": {
161
+ "type": "string"
162
+ },
163
+ "username": {
164
+ "type": "string"
165
+ }
166
+ },
167
+ "additionalProperties": false,
168
+ "required": [
169
+ "server"
170
+ ]
171
+ },
172
+ "timeout": {
173
+ "type": "number"
174
+ },
175
+ "tracesDir": {
176
+ "type": "string"
177
+ }
178
+ },
179
+ "additionalProperties": false
117
180
  }
118
181
  },
119
182
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -1,8 +1,12 @@
1
1
  {
2
+ "additionalProperties": false,
2
3
  "type": "object",
3
4
  "properties": {
5
+ "blockAds": {
6
+ "description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
7
+ "type": "boolean"
8
+ },
4
9
  "launch": {
5
- "description": "Launch options, which can be either an object\nof puppeteer.launch options or playwright.launchServer\noptions, depending on the API. Must be either JSON\nobject, or a base64-encoded JSON object.",
6
10
  "anyOf": [
7
11
  {
8
12
  "$ref": "#/definitions/CDPLaunchOptions"
@@ -12,10 +16,6 @@
12
16
  }
13
17
  ]
14
18
  },
15
- "blockAds": {
16
- "description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
17
- "type": "boolean"
18
- },
19
19
  "record": {
20
20
  "description": "Whether or nor to record the session. The browser will run\nin \"head-full\" mode, and recording is started and closed\nvia the embedded browserless API. Please refer to the \"Recording\"\nsection in the live documentation site for more details.",
21
21
  "type": "boolean"
@@ -29,7 +29,6 @@
29
29
  "type": "string"
30
30
  }
31
31
  },
32
- "additionalProperties": false,
33
32
  "definitions": {
34
33
  "CDPLaunchOptions": {
35
34
  "type": "object",
@@ -114,6 +113,70 @@
114
113
  }
115
114
  },
116
115
  "additionalProperties": false
116
+ },
117
+ "BrowserServerOptions": {
118
+ "type": "object",
119
+ "properties": {
120
+ "args": {
121
+ "type": "array",
122
+ "items": {
123
+ "type": "string"
124
+ }
125
+ },
126
+ "chromiumSandbox": {
127
+ "type": "boolean"
128
+ },
129
+ "devtools": {
130
+ "type": "boolean"
131
+ },
132
+ "downloadsPath": {
133
+ "type": "string"
134
+ },
135
+ "headless": {
136
+ "type": "boolean"
137
+ },
138
+ "ignoreDefaultArgs": {
139
+ "anyOf": [
140
+ {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string"
144
+ }
145
+ },
146
+ {
147
+ "type": "boolean"
148
+ }
149
+ ]
150
+ },
151
+ "proxy": {
152
+ "type": "object",
153
+ "properties": {
154
+ "bypass": {
155
+ "type": "string"
156
+ },
157
+ "password": {
158
+ "type": "string"
159
+ },
160
+ "server": {
161
+ "type": "string"
162
+ },
163
+ "username": {
164
+ "type": "string"
165
+ }
166
+ },
167
+ "additionalProperties": false,
168
+ "required": [
169
+ "server"
170
+ ]
171
+ },
172
+ "timeout": {
173
+ "type": "number"
174
+ },
175
+ "tracesDir": {
176
+ "type": "string"
177
+ }
178
+ },
179
+ "additionalProperties": false
117
180
  }
118
181
  },
119
182
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -1,8 +1,12 @@
1
1
  {
2
+ "additionalProperties": false,
2
3
  "type": "object",
3
4
  "properties": {
5
+ "blockAds": {
6
+ "description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
7
+ "type": "boolean"
8
+ },
4
9
  "launch": {
5
- "description": "Launch options, which can be either an object\nof puppeteer.launch options or playwright.launchServer\noptions, depending on the API. Must be either JSON\nobject, or a base64-encoded JSON object.",
6
10
  "anyOf": [
7
11
  {
8
12
  "$ref": "#/definitions/CDPLaunchOptions"
@@ -12,10 +16,6 @@
12
16
  }
13
17
  ]
14
18
  },
15
- "blockAds": {
16
- "description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
17
- "type": "boolean"
18
- },
19
19
  "record": {
20
20
  "description": "Whether or nor to record the session. The browser will run\nin \"head-full\" mode, and recording is started and closed\nvia the embedded browserless API. Please refer to the \"Recording\"\nsection in the live documentation site for more details.",
21
21
  "type": "boolean"
@@ -29,7 +29,6 @@
29
29
  "type": "string"
30
30
  }
31
31
  },
32
- "additionalProperties": false,
33
32
  "definitions": {
34
33
  "CDPLaunchOptions": {
35
34
  "type": "object",
@@ -114,6 +113,70 @@
114
113
  }
115
114
  },
116
115
  "additionalProperties": false
116
+ },
117
+ "BrowserServerOptions": {
118
+ "type": "object",
119
+ "properties": {
120
+ "args": {
121
+ "type": "array",
122
+ "items": {
123
+ "type": "string"
124
+ }
125
+ },
126
+ "chromiumSandbox": {
127
+ "type": "boolean"
128
+ },
129
+ "devtools": {
130
+ "type": "boolean"
131
+ },
132
+ "downloadsPath": {
133
+ "type": "string"
134
+ },
135
+ "headless": {
136
+ "type": "boolean"
137
+ },
138
+ "ignoreDefaultArgs": {
139
+ "anyOf": [
140
+ {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string"
144
+ }
145
+ },
146
+ {
147
+ "type": "boolean"
148
+ }
149
+ ]
150
+ },
151
+ "proxy": {
152
+ "type": "object",
153
+ "properties": {
154
+ "bypass": {
155
+ "type": "string"
156
+ },
157
+ "password": {
158
+ "type": "string"
159
+ },
160
+ "server": {
161
+ "type": "string"
162
+ },
163
+ "username": {
164
+ "type": "string"
165
+ }
166
+ },
167
+ "additionalProperties": false,
168
+ "required": [
169
+ "server"
170
+ ]
171
+ },
172
+ "timeout": {
173
+ "type": "number"
174
+ },
175
+ "tracesDir": {
176
+ "type": "string"
177
+ }
178
+ },
179
+ "additionalProperties": false
117
180
  }
118
181
  },
119
182
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -1,21 +1,21 @@
1
1
  {
2
+ "additionalProperties": false,
2
3
  "type": "object",
3
4
  "properties": {
5
+ "blockAds": {
6
+ "description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
7
+ "type": "boolean"
8
+ },
4
9
  "launch": {
5
- "description": "Launch options, which can be either an object\nof puppeteer.launch options or playwright.launchServer\noptions, depending on the API. Must be either JSON\nobject, or a base64-encoded JSON object.",
6
10
  "anyOf": [
7
11
  {
8
- "$ref": "#/definitions/BrowserServerOptions"
12
+ "$ref": "#/definitions/CDPLaunchOptions"
9
13
  },
10
14
  {
11
15
  "type": "string"
12
16
  }
13
17
  ]
14
18
  },
15
- "blockAds": {
16
- "description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
17
- "type": "boolean"
18
- },
19
19
  "record": {
20
20
  "description": "Whether or nor to record the session. The browser will run\nin \"head-full\" mode, and recording is started and closed\nvia the embedded browserless API. Please refer to the \"Recording\"\nsection in the live documentation site for more details.",
21
21
  "type": "boolean"
@@ -29,8 +29,91 @@
29
29
  "type": "string"
30
30
  }
31
31
  },
32
- "additionalProperties": false,
33
32
  "definitions": {
33
+ "CDPLaunchOptions": {
34
+ "type": "object",
35
+ "properties": {
36
+ "args": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "string"
40
+ }
41
+ },
42
+ "defaultViewport": {
43
+ "type": "object",
44
+ "properties": {
45
+ "deviceScaleFactor": {
46
+ "type": "number"
47
+ },
48
+ "hasTouch": {
49
+ "type": "boolean"
50
+ },
51
+ "height": {
52
+ "type": "number"
53
+ },
54
+ "isLandscape": {
55
+ "type": "boolean"
56
+ },
57
+ "isMobile": {
58
+ "type": "boolean"
59
+ },
60
+ "width": {
61
+ "type": "number"
62
+ }
63
+ },
64
+ "additionalProperties": false,
65
+ "required": [
66
+ "height",
67
+ "width"
68
+ ]
69
+ },
70
+ "devtools": {
71
+ "type": "boolean"
72
+ },
73
+ "dumpio": {
74
+ "type": "boolean"
75
+ },
76
+ "headless": {
77
+ "enum": [
78
+ false,
79
+ "shell",
80
+ true
81
+ ]
82
+ },
83
+ "ignoreDefaultArgs": {
84
+ "anyOf": [
85
+ {
86
+ "type": "array",
87
+ "items": {
88
+ "type": "string"
89
+ }
90
+ },
91
+ {
92
+ "type": "boolean"
93
+ }
94
+ ]
95
+ },
96
+ "ignoreHTTPSErrors": {
97
+ "type": "boolean"
98
+ },
99
+ "slowMo": {
100
+ "type": "number"
101
+ },
102
+ "stealth": {
103
+ "type": "boolean"
104
+ },
105
+ "timeout": {
106
+ "type": "number"
107
+ },
108
+ "userDataDir": {
109
+ "type": "string"
110
+ },
111
+ "waitForInitialPage": {
112
+ "type": "boolean"
113
+ }
114
+ },
115
+ "additionalProperties": false
116
+ },
34
117
  "BrowserServerOptions": {
35
118
  "type": "object",
36
119
  "properties": {
@@ -394,14 +394,14 @@
394
394
  "length": {
395
395
  "type": "number"
396
396
  },
397
- "__@toStringTag@151033": {
397
+ "__@toStringTag@162563": {
398
398
  "type": "string",
399
399
  "const": "Uint8Array"
400
400
  }
401
401
  },
402
402
  "required": [
403
403
  "BYTES_PER_ELEMENT",
404
- "__@toStringTag@151033",
404
+ "__@toStringTag@162563",
405
405
  "buffer",
406
406
  "byteLength",
407
407
  "byteOffset",
@@ -436,13 +436,13 @@
436
436
  "byteLength": {
437
437
  "type": "number"
438
438
  },
439
- "__@toStringTag@151033": {
439
+ "__@toStringTag@162563": {
440
440
  "type": "string"
441
441
  }
442
442
  },
443
443
  "additionalProperties": false,
444
444
  "required": [
445
- "__@toStringTag@151033",
445
+ "__@toStringTag@162563",
446
446
  "byteLength"
447
447
  ]
448
448
  },
@@ -452,18 +452,18 @@
452
452
  "byteLength": {
453
453
  "type": "number"
454
454
  },
455
- "__@species@151134": {
455
+ "__@species@166716": {
456
456
  "$ref": "#/definitions/SharedArrayBuffer"
457
457
  },
458
- "__@toStringTag@151033": {
458
+ "__@toStringTag@162563": {
459
459
  "type": "string",
460
460
  "const": "SharedArrayBuffer"
461
461
  }
462
462
  },
463
463
  "additionalProperties": false,
464
464
  "required": [
465
- "__@species@151134",
466
- "__@toStringTag@151033",
465
+ "__@species@166716",
466
+ "__@toStringTag@162563",
467
467
  "byteLength"
468
468
  ]
469
469
  },