@browserless.io/browserless 2.3.0-beta-1 → 2.3.0-beta-2
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/README.md +2 -2
- package/bin/browserless.js +47 -18
- package/bin/scaffold/README.md +50 -0
- package/bin/scaffold/src/hello-world.http.ts +2 -1
- package/build/browserless.d.ts +3 -5
- package/build/browserless.js +17 -11
- package/build/browsers/chrome.cdp.js +1 -1
- package/build/browsers/chrome.playwright.js +1 -1
- package/build/browsers/index.d.ts +1 -0
- package/build/browsers/index.js +4 -1
- package/build/data/classes.json +1 -1
- package/build/data/selectors.json +1 -1
- package/build/exports.d.ts +24 -38
- package/build/exports.js +25 -44
- package/build/limiter.d.ts +2 -1
- package/build/limiter.js +6 -3
- package/build/routes/chrome/http/content.post.body.json +8 -8
- package/build/routes/chrome/http/content.post.d.ts +2 -1
- package/build/routes/chrome/http/content.post.js +3 -2
- package/build/routes/chrome/http/download.post.body.json +11 -489
- package/build/routes/chrome/http/download.post.d.ts +2 -1
- package/build/routes/chrome/http/download.post.js +3 -2
- package/build/routes/chrome/http/download.post.query.json +6 -69
- package/build/routes/chrome/http/download.post.response.json +0 -1
- package/build/routes/chrome/http/function.post.body.json +11 -489
- package/build/routes/chrome/http/function.post.d.ts +2 -1
- package/build/routes/chrome/http/function.post.js +3 -2
- package/build/routes/chrome/http/function.post.query.json +6 -69
- package/build/routes/chrome/http/function.post.response.json +0 -1
- package/build/routes/chrome/http/json-list.get.d.ts +5 -1
- package/build/routes/chrome/http/json-list.get.js +5 -1
- package/build/routes/chrome/http/json-list.get.response.json +49 -1
- package/build/routes/chrome/http/json-new.put.d.ts +5 -1
- package/build/routes/chrome/http/json-new.put.js +5 -1
- package/build/routes/chrome/http/json-new.put.response.json +41 -1
- package/build/routes/chrome/http/json-protocol.get.d.ts +5 -1
- package/build/routes/chrome/http/json-protocol.get.js +5 -1
- package/build/routes/chrome/http/json-protocol.get.response.json +3 -1
- package/build/routes/chrome/http/json-version.get.d.ts +5 -1
- package/build/routes/chrome/http/json-version.get.js +5 -1
- package/build/routes/chrome/http/json-version.get.response.json +41 -1
- package/build/routes/chrome/http/pdf.post.body.json +153 -9
- package/build/routes/chrome/http/pdf.post.d.ts +2 -1
- package/build/routes/chrome/http/pdf.post.js +3 -2
- package/build/routes/chrome/http/pdf.post.query.json +6 -69
- package/build/routes/chrome/http/performance.post.body.json +10 -494
- package/build/routes/chrome/http/performance.post.d.ts +2 -1
- package/build/routes/chrome/http/performance.post.js +3 -2
- package/build/routes/chrome/http/performance.post.query.json +6 -69
- package/build/routes/chrome/http/performance.post.response.json +3 -1
- package/build/routes/chrome/http/scrape.post.body.json +56 -9
- package/build/routes/chrome/http/scrape.post.d.ts +2 -1
- package/build/routes/chrome/http/scrape.post.js +3 -2
- package/build/routes/chrome/http/scrape.post.response.json +305 -1
- package/build/routes/chrome/http/screenshot.post.body.json +99 -9
- package/build/routes/chrome/http/screenshot.post.d.ts +2 -1
- package/build/routes/chrome/http/screenshot.post.js +3 -2
- package/build/routes/chrome/http/screenshot.post.query.json +6 -69
- package/build/routes/chrome/ws/browser.d.ts +2 -1
- package/build/routes/chrome/ws/browser.js +3 -2
- package/build/routes/chrome/ws/browser.query.json +6 -69
- package/build/routes/chrome/ws/cdp.d.ts +2 -1
- package/build/routes/chrome/ws/cdp.js +3 -2
- package/build/routes/chrome/ws/cdp.query.json +6 -69
- package/build/routes/chrome/ws/page.d.ts +3 -2
- package/build/routes/chrome/ws/page.js +3 -2
- package/build/routes/chrome/ws/page.query.json +6 -69
- package/build/routes/chrome/ws/playwright.d.ts +1 -0
- package/build/routes/chrome/ws/playwright.js +2 -1
- package/build/routes/chrome/ws/playwright.query.json +7 -90
- package/build/routes/chromium/http/content.post.body.json +8 -8
- package/build/routes/chromium/http/download.post.body.json +11 -489
- package/build/routes/chromium/http/download.post.query.json +6 -69
- package/build/routes/chromium/http/download.post.response.json +0 -1
- package/build/routes/chromium/http/function.post.body.json +11 -489
- package/build/routes/chromium/http/function.post.query.json +6 -69
- package/build/routes/chromium/http/function.post.response.json +0 -1
- package/build/routes/chromium/http/json-list.get.response.json +49 -1
- package/build/routes/chromium/http/json-new.put.response.json +41 -1
- package/build/routes/chromium/http/json-protocol.get.response.json +3 -1
- package/build/routes/chromium/http/json-version.get.response.json +41 -1
- package/build/routes/chromium/http/pdf.post.body.json +153 -9
- package/build/routes/chromium/http/pdf.post.query.json +6 -69
- package/build/routes/chromium/http/performance.post.body.json +10 -494
- package/build/routes/chromium/http/performance.post.query.json +6 -69
- package/build/routes/chromium/http/performance.post.response.json +3 -1
- package/build/routes/chromium/http/scrape.post.body.json +56 -9
- package/build/routes/chromium/http/scrape.post.response.json +305 -1
- package/build/routes/chromium/http/screenshot.post.body.json +99 -9
- package/build/routes/chromium/http/screenshot.post.query.json +6 -69
- package/build/routes/chromium/ws/browser.query.json +6 -69
- package/build/routes/chromium/ws/cdp.query.json +6 -69
- package/build/routes/chromium/ws/page.query.json +6 -69
- package/build/routes/chromium/ws/playwright.query.json +7 -90
- package/build/routes/firefox/ws/playwright.d.ts +2 -1
- package/build/routes/firefox/ws/playwright.js +3 -2
- package/build/routes/firefox/ws/playwright.query.json +30 -115
- package/build/routes/management/http/config.get.d.ts +1 -0
- package/build/routes/management/http/config.get.js +2 -1
- package/build/routes/management/http/config.get.response.json +104 -1
- package/build/routes/management/http/metrics-total.get.d.ts +1 -0
- package/build/routes/management/http/metrics-total.get.js +2 -1
- package/build/routes/management/http/metrics-total.get.response.json +69 -1
- package/build/routes/management/http/metrics.get.d.ts +1 -0
- package/build/routes/management/http/metrics.get.js +2 -1
- package/build/routes/management/http/metrics.get.response.json +91 -1
- package/build/routes/management/http/sessions.get.d.ts +1 -0
- package/build/routes/management/http/sessions.get.js +2 -1
- package/build/routes/management/http/sessions.get.response.json +232 -1
- package/build/routes/management/http/static.get.d.ts +1 -0
- package/build/routes/management/http/static.get.js +2 -1
- package/build/routes/webkit/ws/playwright.d.ts +2 -1
- package/build/routes/webkit/ws/playwright.js +3 -2
- package/build/routes/webkit/ws/playwright.query.json +7 -90
- package/build/shared/browser.ws.d.ts +2 -1
- package/build/shared/browser.ws.js +3 -2
- package/build/shared/chromium.playwright.ws.d.ts +2 -1
- package/build/shared/chromium.playwright.ws.js +3 -2
- package/build/shared/chromium.ws.d.ts +2 -1
- package/build/shared/chromium.ws.js +3 -2
- package/build/shared/content.http.d.ts +2 -1
- package/build/shared/content.http.js +3 -2
- package/build/shared/download.http.d.ts +2 -1
- package/build/shared/download.http.js +3 -2
- package/build/shared/function.http.d.ts +2 -1
- package/build/shared/function.http.js +3 -2
- package/build/shared/json-list.http.d.ts +2 -1
- package/build/shared/json-list.http.js +3 -2
- package/build/shared/json-new.http.d.ts +2 -1
- package/build/shared/json-new.http.js +3 -2
- package/build/shared/json-protocol.http.d.ts +2 -1
- package/build/shared/json-protocol.http.js +3 -2
- package/build/shared/json-version.http.d.ts +2 -1
- package/build/shared/json-version.http.js +3 -2
- package/build/shared/page.ws.d.ts +2 -1
- package/build/shared/page.ws.js +3 -2
- package/build/shared/pdf.http.d.ts +2 -1
- package/build/shared/pdf.http.js +3 -2
- package/build/shared/performance.http.d.ts +1 -0
- package/build/shared/performance.http.js +2 -1
- package/build/shared/scrape.http.d.ts +2 -1
- package/build/shared/scrape.http.js +3 -2
- package/build/shared/screenshot.http.d.ts +1 -0
- package/build/shared/screenshot.http.js +2 -1
- package/build/types.d.ts +91 -0
- package/build/types.js +54 -0
- package/build/utils.d.ts +1 -1
- package/build/utils.js +11 -6
- package/docker/chrome/Dockerfile +0 -2
- package/docker/chromium/Dockerfile +1 -4
- package/docker/firefox/Dockerfile +1 -4
- package/docker/multi/Dockerfile +2 -6
- package/docker/webkit/Dockerfile +1 -4
- package/package.json +11 -10
- package/scripts/build-open-api.js +150 -141
- package/scripts/build-schemas.js +3 -2
- package/src/browserless.ts +43 -30
- package/src/browsers/chrome.cdp.ts +1 -1
- package/src/browsers/chrome.playwright.ts +1 -1
- package/src/browsers/index.ts +5 -1
- package/src/exports.ts +25 -49
- package/src/limiter.ts +7 -3
- package/src/routes/chrome/http/content.post.ts +7 -2
- package/src/routes/chrome/http/download.post.ts +7 -2
- package/src/routes/chrome/http/function.post.ts +7 -2
- package/src/routes/chrome/http/json-list.get.ts +7 -1
- package/src/routes/chrome/http/json-new.put.ts +7 -1
- package/src/routes/chrome/http/json-protocol.get.ts +7 -1
- package/src/routes/chrome/http/json-version.get.ts +7 -1
- package/src/routes/chrome/http/pdf.post.ts +7 -2
- package/src/routes/chrome/http/performance.post.ts +7 -2
- package/src/routes/chrome/http/scrape.post.ts +7 -2
- package/src/routes/chrome/http/screenshot.post.ts +7 -2
- package/src/routes/chrome/ws/browser.ts +3 -2
- package/src/routes/chrome/ws/cdp.ts +7 -2
- package/src/routes/chrome/ws/page.ts +3 -2
- package/src/routes/chrome/ws/playwright.ts +6 -1
- package/src/routes/firefox/ws/playwright.ts +3 -1
- package/src/routes/management/http/config.get.ts +2 -0
- package/src/routes/management/http/metrics-total.get.ts +2 -0
- package/src/routes/management/http/metrics.get.ts +2 -0
- package/src/routes/management/http/sessions.get.ts +2 -0
- package/src/routes/management/http/static.get.ts +2 -0
- package/src/routes/webkit/ws/playwright.ts +3 -1
- package/src/shared/browser.ws.ts +3 -1
- package/src/shared/chromium.playwright.ws.ts +3 -1
- package/src/shared/chromium.ws.ts +3 -1
- package/src/shared/content.http.ts +3 -1
- package/src/shared/download.http.ts +3 -1
- package/src/shared/function.http.ts +3 -1
- package/src/shared/json-list.http.ts +3 -1
- package/src/shared/json-new.http.ts +3 -1
- package/src/shared/json-protocol.http.ts +3 -1
- package/src/shared/json-version.http.ts +3 -1
- package/src/shared/page.ws.ts +3 -1
- package/src/shared/pdf.http.ts +3 -1
- package/src/shared/performance.http.ts +2 -0
- package/src/shared/scrape.http.ts +3 -1
- package/src/shared/screenshot.http.ts +2 -0
- package/src/types.ts +66 -0
- package/src/utils.ts +13 -7
- package/static/docs/swagger.json +2511 -1520
- package/static/docs/swagger.min.json +6697 -0
- package/static/function/client.js +323 -323
- package/build/exports.core.d.ts +0 -24
- package/build/exports.core.js +0 -26
- package/src/exports.core.ts +0 -26
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"additionalProperties": false,
|
|
3
2
|
"type": "object",
|
|
4
3
|
"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
|
-
},
|
|
9
4
|
"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.",
|
|
10
6
|
"anyOf": [
|
|
11
7
|
{
|
|
12
8
|
"$ref": "#/definitions/CDPLaunchOptions"
|
|
@@ -16,6 +12,10 @@
|
|
|
16
12
|
}
|
|
17
13
|
]
|
|
18
14
|
},
|
|
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,6 +29,7 @@
|
|
|
29
29
|
"type": "string"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
+
"additionalProperties": false,
|
|
32
33
|
"definitions": {
|
|
33
34
|
"CDPLaunchOptions": {
|
|
34
35
|
"type": "object",
|
|
@@ -113,70 +114,6 @@
|
|
|
113
114
|
}
|
|
114
115
|
},
|
|
115
116
|
"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
|
|
180
117
|
}
|
|
181
118
|
},
|
|
182
119
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as Browser, QuerySchema } from '../../../shared/browser.ws.js';
|
|
2
2
|
import { ChromeCDP } from '@browserless.io/browserless';
|
|
3
|
-
export default class
|
|
3
|
+
export default class ChromeBrowserWebSocketRoute extends Browser {
|
|
4
|
+
name: string;
|
|
4
5
|
browser: typeof ChromeCDP;
|
|
5
6
|
}
|
|
6
7
|
export { QuerySchema };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as Browser } from '../../../shared/browser.ws.js';
|
|
2
|
-
import { ChromeCDP } from '@browserless.io/browserless';
|
|
3
|
-
export default class
|
|
2
|
+
import { BrowserlessRoutes, ChromeCDP } from '@browserless.io/browserless';
|
|
3
|
+
export default class ChromeBrowserWebSocketRoute extends Browser {
|
|
4
|
+
name = BrowserlessRoutes.ChromeBrowserWebSocketRoute;
|
|
4
5
|
browser = ChromeCDP;
|
|
5
6
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"additionalProperties": false,
|
|
3
2
|
"type": "object",
|
|
4
3
|
"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
|
-
},
|
|
9
4
|
"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.",
|
|
10
6
|
"anyOf": [
|
|
11
7
|
{
|
|
12
8
|
"$ref": "#/definitions/CDPLaunchOptions"
|
|
@@ -16,6 +12,10 @@
|
|
|
16
12
|
}
|
|
17
13
|
]
|
|
18
14
|
},
|
|
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,6 +29,7 @@
|
|
|
29
29
|
"type": "string"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
+
"additionalProperties": false,
|
|
32
33
|
"definitions": {
|
|
33
34
|
"CDPLaunchOptions": {
|
|
34
35
|
"type": "object",
|
|
@@ -113,70 +114,6 @@
|
|
|
113
114
|
}
|
|
114
115
|
},
|
|
115
116
|
"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
|
|
180
117
|
}
|
|
181
118
|
},
|
|
182
119
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChromeCDP, WebsocketRoutes } from '@browserless.io/browserless';
|
|
2
2
|
import { default as ChromiumWebSocketRoute, QuerySchema } from '../../../shared/chromium.ws.js';
|
|
3
|
-
export default class
|
|
3
|
+
export default class ChromeCDPWebSocketRoute extends ChromiumWebSocketRoute {
|
|
4
|
+
name: string;
|
|
4
5
|
browser: typeof ChromeCDP;
|
|
5
6
|
path: WebsocketRoutes[];
|
|
6
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ChromeCDP, WebsocketRoutes } from '@browserless.io/browserless';
|
|
1
|
+
import { BrowserlessRoutes, ChromeCDP, WebsocketRoutes, } from '@browserless.io/browserless';
|
|
2
2
|
import { default as ChromiumWebSocketRoute, } from '../../../shared/chromium.ws.js';
|
|
3
|
-
export default class
|
|
3
|
+
export default class ChromeCDPWebSocketRoute extends ChromiumWebSocketRoute {
|
|
4
|
+
name = BrowserlessRoutes.ChromeCDPWebSocketRoute;
|
|
4
5
|
browser = ChromeCDP;
|
|
5
6
|
path = [WebsocketRoutes.chrome];
|
|
6
7
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"additionalProperties": false,
|
|
3
2
|
"type": "object",
|
|
4
3
|
"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
|
-
},
|
|
9
4
|
"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.",
|
|
10
6
|
"anyOf": [
|
|
11
7
|
{
|
|
12
8
|
"$ref": "#/definitions/CDPLaunchOptions"
|
|
@@ -16,6 +12,10 @@
|
|
|
16
12
|
}
|
|
17
13
|
]
|
|
18
14
|
},
|
|
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,6 +29,7 @@
|
|
|
29
29
|
"type": "string"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
+
"additionalProperties": false,
|
|
32
33
|
"definitions": {
|
|
33
34
|
"CDPLaunchOptions": {
|
|
34
35
|
"type": "object",
|
|
@@ -113,70 +114,6 @@
|
|
|
113
114
|
}
|
|
114
115
|
},
|
|
115
116
|
"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
|
|
180
117
|
}
|
|
181
118
|
},
|
|
182
119
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { default as Page, QuerySchema } from '../../../shared/page.ws.js';
|
|
2
1
|
import { ChromeCDP } from '@browserless.io/browserless';
|
|
3
|
-
|
|
2
|
+
import { default as Page, QuerySchema } from '../../../shared/page.ws.js';
|
|
3
|
+
export default class ChromePageWebSocketRoute extends Page {
|
|
4
|
+
name: string;
|
|
4
5
|
browser: typeof ChromeCDP;
|
|
5
6
|
}
|
|
6
7
|
export { QuerySchema };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { BrowserlessRoutes, ChromeCDP } from '@browserless.io/browserless';
|
|
1
2
|
import { default as Page } from '../../../shared/page.ws.js';
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
export default class ChromePageWebSocketRoute extends Page {
|
|
4
|
+
name = BrowserlessRoutes.ChromePageWebSocketRoute;
|
|
4
5
|
browser = ChromeCDP;
|
|
5
6
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"additionalProperties": false,
|
|
3
2
|
"type": "object",
|
|
4
3
|
"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
|
-
},
|
|
9
4
|
"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.",
|
|
10
6
|
"anyOf": [
|
|
11
7
|
{
|
|
12
8
|
"$ref": "#/definitions/CDPLaunchOptions"
|
|
@@ -16,6 +12,10 @@
|
|
|
16
12
|
}
|
|
17
13
|
]
|
|
18
14
|
},
|
|
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,6 +29,7 @@
|
|
|
29
29
|
"type": "string"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
+
"additionalProperties": false,
|
|
32
33
|
"definitions": {
|
|
33
34
|
"CDPLaunchOptions": {
|
|
34
35
|
"type": "object",
|
|
@@ -113,70 +114,6 @@
|
|
|
113
114
|
}
|
|
114
115
|
},
|
|
115
116
|
"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
|
|
180
117
|
}
|
|
181
118
|
},
|
|
182
119
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChromePlaywright, WebsocketRoutes } from '@browserless.io/browserless';
|
|
2
2
|
import { default as ChromiumPlaywrightWebSocketRoute, QuerySchema } from '../../../shared/chromium.playwright.ws.js';
|
|
3
3
|
export default class ChromePlaywrightWebSocketRoute extends ChromiumPlaywrightWebSocketRoute {
|
|
4
|
+
name: string;
|
|
4
5
|
browser: typeof ChromePlaywright;
|
|
5
6
|
path: WebsocketRoutes[];
|
|
6
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ChromePlaywright, WebsocketRoutes } from '@browserless.io/browserless';
|
|
1
|
+
import { BrowserlessRoutes, ChromePlaywright, WebsocketRoutes, } from '@browserless.io/browserless';
|
|
2
2
|
import { default as ChromiumPlaywrightWebSocketRoute, } from '../../../shared/chromium.playwright.ws.js';
|
|
3
3
|
export default class ChromePlaywrightWebSocketRoute extends ChromiumPlaywrightWebSocketRoute {
|
|
4
|
+
name = BrowserlessRoutes.ChromePlaywrightWebSocketRoute;
|
|
4
5
|
browser = ChromePlaywright;
|
|
5
6
|
path = [WebsocketRoutes.chromePlaywright];
|
|
6
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"additionalProperties": false,
|
|
3
2
|
"type": "object",
|
|
4
3
|
"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
|
-
},
|
|
9
4
|
"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.",
|
|
10
6
|
"anyOf": [
|
|
11
7
|
{
|
|
12
|
-
"$ref": "#/definitions/
|
|
8
|
+
"$ref": "#/definitions/BrowserServerOptions"
|
|
13
9
|
},
|
|
14
10
|
{
|
|
15
11
|
"type": "string"
|
|
16
12
|
}
|
|
17
13
|
]
|
|
18
14
|
},
|
|
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,91 +29,8 @@
|
|
|
29
29
|
"type": "string"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
+
"additionalProperties": false,
|
|
32
33
|
"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
|
-
},
|
|
117
34
|
"BrowserServerOptions": {
|
|
118
35
|
"type": "object",
|
|
119
36
|
"properties": {
|
|
@@ -394,14 +394,14 @@
|
|
|
394
394
|
"length": {
|
|
395
395
|
"type": "number"
|
|
396
396
|
},
|
|
397
|
-
"__@toStringTag@
|
|
397
|
+
"__@toStringTag@129966": {
|
|
398
398
|
"type": "string",
|
|
399
399
|
"const": "Uint8Array"
|
|
400
400
|
}
|
|
401
401
|
},
|
|
402
402
|
"required": [
|
|
403
403
|
"BYTES_PER_ELEMENT",
|
|
404
|
-
"__@toStringTag@
|
|
404
|
+
"__@toStringTag@129966",
|
|
405
405
|
"buffer",
|
|
406
406
|
"byteLength",
|
|
407
407
|
"byteOffset",
|
|
@@ -436,13 +436,13 @@
|
|
|
436
436
|
"byteLength": {
|
|
437
437
|
"type": "number"
|
|
438
438
|
},
|
|
439
|
-
"__@toStringTag@
|
|
439
|
+
"__@toStringTag@129966": {
|
|
440
440
|
"type": "string"
|
|
441
441
|
}
|
|
442
442
|
},
|
|
443
443
|
"additionalProperties": false,
|
|
444
444
|
"required": [
|
|
445
|
-
"__@toStringTag@
|
|
445
|
+
"__@toStringTag@129966",
|
|
446
446
|
"byteLength"
|
|
447
447
|
]
|
|
448
448
|
},
|
|
@@ -452,18 +452,18 @@
|
|
|
452
452
|
"byteLength": {
|
|
453
453
|
"type": "number"
|
|
454
454
|
},
|
|
455
|
-
"__@species@
|
|
455
|
+
"__@species@130067": {
|
|
456
456
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
457
457
|
},
|
|
458
|
-
"__@toStringTag@
|
|
458
|
+
"__@toStringTag@129966": {
|
|
459
459
|
"type": "string",
|
|
460
460
|
"const": "SharedArrayBuffer"
|
|
461
461
|
}
|
|
462
462
|
},
|
|
463
463
|
"additionalProperties": false,
|
|
464
464
|
"required": [
|
|
465
|
-
"__@species@
|
|
466
|
-
"__@toStringTag@
|
|
465
|
+
"__@species@130067",
|
|
466
|
+
"__@toStringTag@129966",
|
|
467
467
|
"byteLength"
|
|
468
468
|
]
|
|
469
469
|
},
|