@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.
Files changed (207) hide show
  1. package/README.md +2 -2
  2. package/bin/browserless.js +47 -18
  3. package/bin/scaffold/README.md +50 -0
  4. package/bin/scaffold/src/hello-world.http.ts +2 -1
  5. package/build/browserless.d.ts +3 -5
  6. package/build/browserless.js +17 -11
  7. package/build/browsers/chrome.cdp.js +1 -1
  8. package/build/browsers/chrome.playwright.js +1 -1
  9. package/build/browsers/index.d.ts +1 -0
  10. package/build/browsers/index.js +4 -1
  11. package/build/data/classes.json +1 -1
  12. package/build/data/selectors.json +1 -1
  13. package/build/exports.d.ts +24 -38
  14. package/build/exports.js +25 -44
  15. package/build/limiter.d.ts +2 -1
  16. package/build/limiter.js +6 -3
  17. package/build/routes/chrome/http/content.post.body.json +8 -8
  18. package/build/routes/chrome/http/content.post.d.ts +2 -1
  19. package/build/routes/chrome/http/content.post.js +3 -2
  20. package/build/routes/chrome/http/download.post.body.json +11 -489
  21. package/build/routes/chrome/http/download.post.d.ts +2 -1
  22. package/build/routes/chrome/http/download.post.js +3 -2
  23. package/build/routes/chrome/http/download.post.query.json +6 -69
  24. package/build/routes/chrome/http/download.post.response.json +0 -1
  25. package/build/routes/chrome/http/function.post.body.json +11 -489
  26. package/build/routes/chrome/http/function.post.d.ts +2 -1
  27. package/build/routes/chrome/http/function.post.js +3 -2
  28. package/build/routes/chrome/http/function.post.query.json +6 -69
  29. package/build/routes/chrome/http/function.post.response.json +0 -1
  30. package/build/routes/chrome/http/json-list.get.d.ts +5 -1
  31. package/build/routes/chrome/http/json-list.get.js +5 -1
  32. package/build/routes/chrome/http/json-list.get.response.json +49 -1
  33. package/build/routes/chrome/http/json-new.put.d.ts +5 -1
  34. package/build/routes/chrome/http/json-new.put.js +5 -1
  35. package/build/routes/chrome/http/json-new.put.response.json +41 -1
  36. package/build/routes/chrome/http/json-protocol.get.d.ts +5 -1
  37. package/build/routes/chrome/http/json-protocol.get.js +5 -1
  38. package/build/routes/chrome/http/json-protocol.get.response.json +3 -1
  39. package/build/routes/chrome/http/json-version.get.d.ts +5 -1
  40. package/build/routes/chrome/http/json-version.get.js +5 -1
  41. package/build/routes/chrome/http/json-version.get.response.json +41 -1
  42. package/build/routes/chrome/http/pdf.post.body.json +153 -9
  43. package/build/routes/chrome/http/pdf.post.d.ts +2 -1
  44. package/build/routes/chrome/http/pdf.post.js +3 -2
  45. package/build/routes/chrome/http/pdf.post.query.json +6 -69
  46. package/build/routes/chrome/http/performance.post.body.json +10 -494
  47. package/build/routes/chrome/http/performance.post.d.ts +2 -1
  48. package/build/routes/chrome/http/performance.post.js +3 -2
  49. package/build/routes/chrome/http/performance.post.query.json +6 -69
  50. package/build/routes/chrome/http/performance.post.response.json +3 -1
  51. package/build/routes/chrome/http/scrape.post.body.json +56 -9
  52. package/build/routes/chrome/http/scrape.post.d.ts +2 -1
  53. package/build/routes/chrome/http/scrape.post.js +3 -2
  54. package/build/routes/chrome/http/scrape.post.response.json +305 -1
  55. package/build/routes/chrome/http/screenshot.post.body.json +99 -9
  56. package/build/routes/chrome/http/screenshot.post.d.ts +2 -1
  57. package/build/routes/chrome/http/screenshot.post.js +3 -2
  58. package/build/routes/chrome/http/screenshot.post.query.json +6 -69
  59. package/build/routes/chrome/ws/browser.d.ts +2 -1
  60. package/build/routes/chrome/ws/browser.js +3 -2
  61. package/build/routes/chrome/ws/browser.query.json +6 -69
  62. package/build/routes/chrome/ws/cdp.d.ts +2 -1
  63. package/build/routes/chrome/ws/cdp.js +3 -2
  64. package/build/routes/chrome/ws/cdp.query.json +6 -69
  65. package/build/routes/chrome/ws/page.d.ts +3 -2
  66. package/build/routes/chrome/ws/page.js +3 -2
  67. package/build/routes/chrome/ws/page.query.json +6 -69
  68. package/build/routes/chrome/ws/playwright.d.ts +1 -0
  69. package/build/routes/chrome/ws/playwright.js +2 -1
  70. package/build/routes/chrome/ws/playwright.query.json +7 -90
  71. package/build/routes/chromium/http/content.post.body.json +8 -8
  72. package/build/routes/chromium/http/download.post.body.json +11 -489
  73. package/build/routes/chromium/http/download.post.query.json +6 -69
  74. package/build/routes/chromium/http/download.post.response.json +0 -1
  75. package/build/routes/chromium/http/function.post.body.json +11 -489
  76. package/build/routes/chromium/http/function.post.query.json +6 -69
  77. package/build/routes/chromium/http/function.post.response.json +0 -1
  78. package/build/routes/chromium/http/json-list.get.response.json +49 -1
  79. package/build/routes/chromium/http/json-new.put.response.json +41 -1
  80. package/build/routes/chromium/http/json-protocol.get.response.json +3 -1
  81. package/build/routes/chromium/http/json-version.get.response.json +41 -1
  82. package/build/routes/chromium/http/pdf.post.body.json +153 -9
  83. package/build/routes/chromium/http/pdf.post.query.json +6 -69
  84. package/build/routes/chromium/http/performance.post.body.json +10 -494
  85. package/build/routes/chromium/http/performance.post.query.json +6 -69
  86. package/build/routes/chromium/http/performance.post.response.json +3 -1
  87. package/build/routes/chromium/http/scrape.post.body.json +56 -9
  88. package/build/routes/chromium/http/scrape.post.response.json +305 -1
  89. package/build/routes/chromium/http/screenshot.post.body.json +99 -9
  90. package/build/routes/chromium/http/screenshot.post.query.json +6 -69
  91. package/build/routes/chromium/ws/browser.query.json +6 -69
  92. package/build/routes/chromium/ws/cdp.query.json +6 -69
  93. package/build/routes/chromium/ws/page.query.json +6 -69
  94. package/build/routes/chromium/ws/playwright.query.json +7 -90
  95. package/build/routes/firefox/ws/playwright.d.ts +2 -1
  96. package/build/routes/firefox/ws/playwright.js +3 -2
  97. package/build/routes/firefox/ws/playwright.query.json +30 -115
  98. package/build/routes/management/http/config.get.d.ts +1 -0
  99. package/build/routes/management/http/config.get.js +2 -1
  100. package/build/routes/management/http/config.get.response.json +104 -1
  101. package/build/routes/management/http/metrics-total.get.d.ts +1 -0
  102. package/build/routes/management/http/metrics-total.get.js +2 -1
  103. package/build/routes/management/http/metrics-total.get.response.json +69 -1
  104. package/build/routes/management/http/metrics.get.d.ts +1 -0
  105. package/build/routes/management/http/metrics.get.js +2 -1
  106. package/build/routes/management/http/metrics.get.response.json +91 -1
  107. package/build/routes/management/http/sessions.get.d.ts +1 -0
  108. package/build/routes/management/http/sessions.get.js +2 -1
  109. package/build/routes/management/http/sessions.get.response.json +232 -1
  110. package/build/routes/management/http/static.get.d.ts +1 -0
  111. package/build/routes/management/http/static.get.js +2 -1
  112. package/build/routes/webkit/ws/playwright.d.ts +2 -1
  113. package/build/routes/webkit/ws/playwright.js +3 -2
  114. package/build/routes/webkit/ws/playwright.query.json +7 -90
  115. package/build/shared/browser.ws.d.ts +2 -1
  116. package/build/shared/browser.ws.js +3 -2
  117. package/build/shared/chromium.playwright.ws.d.ts +2 -1
  118. package/build/shared/chromium.playwright.ws.js +3 -2
  119. package/build/shared/chromium.ws.d.ts +2 -1
  120. package/build/shared/chromium.ws.js +3 -2
  121. package/build/shared/content.http.d.ts +2 -1
  122. package/build/shared/content.http.js +3 -2
  123. package/build/shared/download.http.d.ts +2 -1
  124. package/build/shared/download.http.js +3 -2
  125. package/build/shared/function.http.d.ts +2 -1
  126. package/build/shared/function.http.js +3 -2
  127. package/build/shared/json-list.http.d.ts +2 -1
  128. package/build/shared/json-list.http.js +3 -2
  129. package/build/shared/json-new.http.d.ts +2 -1
  130. package/build/shared/json-new.http.js +3 -2
  131. package/build/shared/json-protocol.http.d.ts +2 -1
  132. package/build/shared/json-protocol.http.js +3 -2
  133. package/build/shared/json-version.http.d.ts +2 -1
  134. package/build/shared/json-version.http.js +3 -2
  135. package/build/shared/page.ws.d.ts +2 -1
  136. package/build/shared/page.ws.js +3 -2
  137. package/build/shared/pdf.http.d.ts +2 -1
  138. package/build/shared/pdf.http.js +3 -2
  139. package/build/shared/performance.http.d.ts +1 -0
  140. package/build/shared/performance.http.js +2 -1
  141. package/build/shared/scrape.http.d.ts +2 -1
  142. package/build/shared/scrape.http.js +3 -2
  143. package/build/shared/screenshot.http.d.ts +1 -0
  144. package/build/shared/screenshot.http.js +2 -1
  145. package/build/types.d.ts +91 -0
  146. package/build/types.js +54 -0
  147. package/build/utils.d.ts +1 -1
  148. package/build/utils.js +11 -6
  149. package/docker/chrome/Dockerfile +0 -2
  150. package/docker/chromium/Dockerfile +1 -4
  151. package/docker/firefox/Dockerfile +1 -4
  152. package/docker/multi/Dockerfile +2 -6
  153. package/docker/webkit/Dockerfile +1 -4
  154. package/package.json +11 -10
  155. package/scripts/build-open-api.js +150 -141
  156. package/scripts/build-schemas.js +3 -2
  157. package/src/browserless.ts +43 -30
  158. package/src/browsers/chrome.cdp.ts +1 -1
  159. package/src/browsers/chrome.playwright.ts +1 -1
  160. package/src/browsers/index.ts +5 -1
  161. package/src/exports.ts +25 -49
  162. package/src/limiter.ts +7 -3
  163. package/src/routes/chrome/http/content.post.ts +7 -2
  164. package/src/routes/chrome/http/download.post.ts +7 -2
  165. package/src/routes/chrome/http/function.post.ts +7 -2
  166. package/src/routes/chrome/http/json-list.get.ts +7 -1
  167. package/src/routes/chrome/http/json-new.put.ts +7 -1
  168. package/src/routes/chrome/http/json-protocol.get.ts +7 -1
  169. package/src/routes/chrome/http/json-version.get.ts +7 -1
  170. package/src/routes/chrome/http/pdf.post.ts +7 -2
  171. package/src/routes/chrome/http/performance.post.ts +7 -2
  172. package/src/routes/chrome/http/scrape.post.ts +7 -2
  173. package/src/routes/chrome/http/screenshot.post.ts +7 -2
  174. package/src/routes/chrome/ws/browser.ts +3 -2
  175. package/src/routes/chrome/ws/cdp.ts +7 -2
  176. package/src/routes/chrome/ws/page.ts +3 -2
  177. package/src/routes/chrome/ws/playwright.ts +6 -1
  178. package/src/routes/firefox/ws/playwright.ts +3 -1
  179. package/src/routes/management/http/config.get.ts +2 -0
  180. package/src/routes/management/http/metrics-total.get.ts +2 -0
  181. package/src/routes/management/http/metrics.get.ts +2 -0
  182. package/src/routes/management/http/sessions.get.ts +2 -0
  183. package/src/routes/management/http/static.get.ts +2 -0
  184. package/src/routes/webkit/ws/playwright.ts +3 -1
  185. package/src/shared/browser.ws.ts +3 -1
  186. package/src/shared/chromium.playwright.ws.ts +3 -1
  187. package/src/shared/chromium.ws.ts +3 -1
  188. package/src/shared/content.http.ts +3 -1
  189. package/src/shared/download.http.ts +3 -1
  190. package/src/shared/function.http.ts +3 -1
  191. package/src/shared/json-list.http.ts +3 -1
  192. package/src/shared/json-new.http.ts +3 -1
  193. package/src/shared/json-protocol.http.ts +3 -1
  194. package/src/shared/json-version.http.ts +3 -1
  195. package/src/shared/page.ws.ts +3 -1
  196. package/src/shared/pdf.http.ts +3 -1
  197. package/src/shared/performance.http.ts +2 -0
  198. package/src/shared/scrape.http.ts +3 -1
  199. package/src/shared/screenshot.http.ts +2 -0
  200. package/src/types.ts +66 -0
  201. package/src/utils.ts +13 -7
  202. package/static/docs/swagger.json +2511 -1520
  203. package/static/docs/swagger.min.json +6697 -0
  204. package/static/function/client.js +323 -323
  205. package/build/exports.core.d.ts +0 -24
  206. package/build/exports.core.js +0 -26
  207. 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,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,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,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,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/CDPLaunchOptions"
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": {
@@ -9,7 +9,8 @@ export interface QuerySchema extends SystemQueryParameters {
9
9
  };
10
10
  };
11
11
  }
12
- export default class FirefoxPlayWrightRoute extends BrowserWebsocketRoute {
12
+ export default class FirefoxPlaywrightWebSocketRoute extends BrowserWebsocketRoute {
13
+ name: string;
13
14
  auth: boolean;
14
15
  browser: typeof FirefoxPlaywright;
15
16
  concurrency: boolean;
@@ -1,5 +1,6 @@
1
- import { APITags, BadRequest, BrowserWebsocketRoute, FirefoxPlaywright, WebsocketRoutes, } from '@browserless.io/browserless';
2
- export default class FirefoxPlayWrightRoute extends BrowserWebsocketRoute {
1
+ import { APITags, BadRequest, BrowserWebsocketRoute, BrowserlessRoutes, FirefoxPlaywright, WebsocketRoutes, } from '@browserless.io/browserless';
2
+ export default class FirefoxPlaywrightWebSocketRoute extends BrowserWebsocketRoute {
3
+ name = BrowserlessRoutes.FirefoxPlaywrightWebSocketRoute;
3
4
  auth = true;
4
5
  browser = FirefoxPlaywright;
5
6
  concurrency = true;