@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.
- package/bin/browserless.js +25 -14
- package/build/browserless.d.ts +6 -1
- package/build/browserless.js +38 -20
- package/build/exports.core.d.ts +24 -0
- package/build/exports.core.js +26 -0
- package/build/exports.d.ts +38 -24
- package/build/exports.js +44 -26
- package/build/routes/chrome/http/content.post.body.json +8 -8
- package/build/routes/chrome/http/download.post.body.json +489 -11
- package/build/routes/chrome/http/download.post.query.json +69 -6
- package/build/routes/chrome/http/download.post.response.json +1 -0
- package/build/routes/chrome/http/function.post.body.json +489 -11
- package/build/routes/chrome/http/function.post.query.json +69 -6
- package/build/routes/chrome/http/function.post.response.json +1 -0
- package/build/routes/chrome/http/json-list.get.response.json +1 -49
- package/build/routes/chrome/http/json-new.put.response.json +1 -41
- package/build/routes/chrome/http/json-protocol.get.response.json +1 -3
- package/build/routes/chrome/http/json-version.get.response.json +1 -41
- package/build/routes/chrome/http/pdf.post.body.json +9 -153
- package/build/routes/chrome/http/pdf.post.query.json +69 -6
- package/build/routes/chrome/http/performance.post.body.json +494 -10
- package/build/routes/chrome/http/performance.post.query.json +69 -6
- package/build/routes/chrome/http/performance.post.response.json +1 -3
- package/build/routes/chrome/http/scrape.post.body.json +9 -56
- package/build/routes/chrome/http/scrape.post.response.json +1 -305
- package/build/routes/chrome/http/screenshot.post.body.json +9 -99
- package/build/routes/chrome/http/screenshot.post.query.json +69 -6
- package/build/routes/chrome/ws/browser.query.json +69 -6
- package/build/routes/chrome/ws/cdp.query.json +69 -6
- package/build/routes/chrome/ws/page.query.json +69 -6
- package/build/routes/chrome/ws/playwright.query.json +90 -7
- package/build/routes/chromium/http/content.post.body.json +8 -8
- package/build/routes/chromium/http/download.post.body.json +489 -11
- package/build/routes/chromium/http/download.post.query.json +69 -6
- package/build/routes/chromium/http/download.post.response.json +1 -0
- package/build/routes/chromium/http/function.post.body.json +489 -11
- package/build/routes/chromium/http/function.post.query.json +69 -6
- package/build/routes/chromium/http/function.post.response.json +1 -0
- package/build/routes/chromium/http/json-list.get.response.json +1 -49
- package/build/routes/chromium/http/json-new.put.response.json +1 -41
- package/build/routes/chromium/http/json-protocol.get.response.json +1 -3
- package/build/routes/chromium/http/json-version.get.response.json +1 -41
- package/build/routes/chromium/http/pdf.post.body.json +9 -153
- package/build/routes/chromium/http/pdf.post.query.json +69 -6
- package/build/routes/chromium/http/performance.post.body.json +494 -10
- package/build/routes/chromium/http/performance.post.query.json +69 -6
- package/build/routes/chromium/http/performance.post.response.json +1 -3
- package/build/routes/chromium/http/scrape.post.body.json +9 -56
- package/build/routes/chromium/http/scrape.post.response.json +1 -305
- package/build/routes/chromium/http/screenshot.post.body.json +9 -99
- package/build/routes/chromium/http/screenshot.post.query.json +69 -6
- package/build/routes/chromium/ws/browser.query.json +69 -6
- package/build/routes/chromium/ws/cdp.query.json +69 -6
- package/build/routes/chromium/ws/page.query.json +69 -6
- package/build/routes/chromium/ws/playwright.query.json +90 -7
- package/build/routes/firefox/ws/playwright.d.ts +5 -1
- package/build/routes/firefox/ws/playwright.query.json +90 -7
- package/build/routes/management/http/config.get.response.json +1 -104
- package/build/routes/management/http/metrics-total.get.response.json +1 -69
- package/build/routes/management/http/metrics.get.response.json +1 -91
- package/build/routes/management/http/sessions.get.response.json +1 -232
- package/build/routes/management/http/static.get.js +7 -7
- package/build/routes/webkit/ws/playwright.query.json +90 -7
- package/build/shared/utils/performance/main.js +1 -1
- package/docker/chrome/Dockerfile +2 -0
- package/docker/chromium/Dockerfile +2 -0
- package/docker/firefox/Dockerfile +2 -0
- package/docker/multi/Dockerfile +2 -0
- package/docker/webkit/Dockerfile +2 -0
- package/package.json +1 -2
- package/scripts/build-open-api.js +18 -9
- package/scripts/build-schemas.js +2 -3
- package/src/browserless.ts +61 -36
- package/src/exports.core.ts +26 -0
- package/src/exports.ts +48 -26
- package/src/router.ts +6 -2
- package/src/routes/firefox/ws/playwright.ts +3 -1
- package/src/routes/management/http/static.get.ts +14 -9
- package/src/shared/utils/performance/main.ts +1 -2
- 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/
|
|
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": {
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
import { APITags, BrowserServerOptions, BrowserWebsocketRoute, FirefoxPlaywright, Request, SystemQueryParameters, WebsocketRoutes } from '@browserless.io/browserless';
|
|
4
4
|
import { Duplex } from 'stream';
|
|
5
5
|
export interface QuerySchema extends SystemQueryParameters {
|
|
6
|
-
launch?: BrowserServerOptions
|
|
6
|
+
launch?: BrowserServerOptions & {
|
|
7
|
+
firefoxUserPrefs?: {
|
|
8
|
+
[key: string]: string | number | boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
7
11
|
}
|
|
8
12
|
export default class FirefoxPlayWrightRoute extends BrowserWebsocketRoute {
|
|
9
13
|
auth: boolean;
|
|
@@ -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/
|
|
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": {
|