@browserless.io/browserless 2.8.0 → 2.10.0
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/CHANGELOG.md +13 -1
- package/README.md +41 -3
- package/assets/debugger.png +0 -0
- package/bin/scaffold/src/hello-world.http.ts +3 -2
- package/build/browserless.d.ts +5 -4
- package/build/browserless.js +19 -13
- package/build/browsers/chrome.cdp.d.ts +2 -2
- package/build/browsers/chrome.cdp.js +2 -2
- package/build/browsers/chrome.playwright.d.ts +2 -2
- package/build/browsers/chrome.playwright.js +2 -2
- package/build/browsers/chromium.cdp.d.ts +4 -4
- package/build/browsers/chromium.cdp.js +49 -32
- package/build/browsers/chromium.playwright.d.ts +4 -4
- package/build/browsers/chromium.playwright.js +14 -13
- package/build/browsers/firefox.playwright.d.ts +4 -4
- package/build/browsers/firefox.playwright.js +14 -13
- package/build/browsers/index.d.ts +24 -8
- package/build/browsers/index.js +20 -15
- package/build/browsers/webkit.playwright.d.ts +4 -4
- package/build/browsers/webkit.playwright.js +14 -13
- package/build/config.d.ts +3 -0
- package/build/config.js +3 -0
- package/build/file-system.d.ts +2 -3
- package/build/file-system.js +2 -2
- package/build/http.d.ts +1 -0
- package/build/http.js +1 -0
- package/build/index.js +7 -7
- package/build/limiter.d.ts +2 -3
- package/build/limiter.js +11 -11
- package/build/logger.d.ts +16 -9
- package/build/logger.js +32 -16
- package/build/monitoring.d.ts +2 -3
- package/build/monitoring.js +4 -4
- package/build/router.d.ts +1 -3
- package/build/router.js +21 -22
- package/build/routes/chrome/http/content.post.body.json +8 -8
- package/build/routes/chrome/http/pdf.post.body.json +8 -8
- package/build/routes/chrome/http/scrape.post.body.json +8 -8
- package/build/routes/chrome/http/screenshot.post.body.json +8 -8
- package/build/routes/chromium/http/content.post.body.json +8 -8
- package/build/routes/chromium/http/pdf.post.body.json +8 -8
- package/build/routes/chromium/http/scrape.post.body.json +8 -8
- package/build/routes/chromium/http/screenshot.post.body.json +8 -8
- package/build/routes/management/http/pressure.get.d.ts +63 -0
- package/build/routes/management/http/pressure.get.js +56 -0
- package/build/routes/management/http/pressure.get.response.json +76 -0
- package/build/routes/management/http/static.get.js +3 -3
- package/build/routes/management/tests/management.spec.js +16 -0
- package/build/server.d.ts +1 -3
- package/build/server.js +33 -30
- package/build/shared/content.http.d.ts +1 -1
- package/build/shared/content.http.js +4 -1
- package/build/shared/download.http.js +9 -9
- package/build/shared/function.http.js +2 -2
- package/build/shared/json-protocol.http.d.ts +3 -3
- package/build/shared/json-protocol.http.js +2 -2
- package/build/shared/json-version.http.d.ts +3 -3
- package/build/shared/json-version.http.js +2 -2
- package/build/shared/pdf.http.d.ts +1 -1
- package/build/shared/pdf.http.js +6 -4
- package/build/shared/performance.http.js +1 -0
- package/build/shared/scrape.http.d.ts +1 -1
- package/build/shared/scrape.http.js +4 -1
- package/build/shared/screenshot.http.d.ts +1 -1
- package/build/shared/screenshot.http.js +4 -1
- package/build/shared/utils/function/handler.js +7 -7
- package/build/shared/utils/performance/child.js +4 -4
- package/build/shared/utils/performance/main.d.ts +1 -1
- package/build/shared/utils/performance/main.js +5 -7
- package/build/shared/utils/performance/types.d.ts +2 -1
- package/build/types.d.ts +10 -1
- package/build/types.js +10 -1
- package/build/utils.d.ts +1 -1
- package/build/utils.js +6 -2
- package/package.json +18 -15
- package/scripts/install-debugger.js +55 -15
- package/src/browserless.ts +25 -12
- package/src/browsers/chrome.cdp.ts +2 -5
- package/src/browsers/chrome.playwright.ts +2 -5
- package/src/browsers/chromium.cdp.ts +84 -35
- package/src/browsers/chromium.playwright.ts +26 -13
- package/src/browsers/firefox.playwright.ts +28 -13
- package/src/browsers/index.ts +24 -16
- package/src/browsers/webkit.playwright.ts +28 -13
- package/src/config.ts +4 -0
- package/src/file-system.ts +2 -7
- package/src/http.ts +1 -0
- package/src/index.ts +7 -7
- package/src/limiter.ts +13 -11
- package/src/logger.ts +39 -18
- package/src/monitoring.ts +6 -8
- package/src/router.ts +20 -20
- package/src/routes/management/http/pressure.get.ts +135 -0
- package/src/routes/management/http/static.get.ts +3 -5
- package/src/routes/management/tests/management.spec.ts +26 -0
- package/src/server.ts +43 -30
- package/src/shared/content.http.ts +5 -1
- package/src/shared/download.http.ts +9 -9
- package/src/shared/function.http.ts +2 -2
- package/src/shared/json-protocol.http.ts +8 -3
- package/src/shared/json-version.http.ts +8 -4
- package/src/shared/pdf.http.ts +6 -4
- package/src/shared/performance.http.ts +1 -0
- package/src/shared/scrape.http.ts +5 -1
- package/src/shared/screenshot.http.ts +4 -1
- package/src/shared/utils/function/handler.ts +7 -7
- package/src/shared/utils/performance/child.ts +4 -4
- package/src/shared/utils/performance/main.ts +5 -6
- package/src/shared/utils/performance/types.ts +2 -1
- package/src/types.ts +9 -0
- package/src/utils.ts +7 -2
- package/static/docs/swagger.json +138 -10
- package/static/docs/swagger.min.json +137 -9
- package/static/function/client.js +4290 -5542
- package/static/function/index.html +4290 -5542
|
@@ -225,14 +225,14 @@
|
|
|
225
225
|
"length": {
|
|
226
226
|
"type": "number"
|
|
227
227
|
},
|
|
228
|
-
"__@toStringTag@
|
|
228
|
+
"__@toStringTag@10986": {
|
|
229
229
|
"type": "string",
|
|
230
230
|
"const": "Uint8Array"
|
|
231
231
|
}
|
|
232
232
|
},
|
|
233
233
|
"required": [
|
|
234
234
|
"BYTES_PER_ELEMENT",
|
|
235
|
-
"__@toStringTag@
|
|
235
|
+
"__@toStringTag@10986",
|
|
236
236
|
"buffer",
|
|
237
237
|
"byteLength",
|
|
238
238
|
"byteOffset",
|
|
@@ -267,13 +267,13 @@
|
|
|
267
267
|
"byteLength": {
|
|
268
268
|
"type": "number"
|
|
269
269
|
},
|
|
270
|
-
"__@toStringTag@
|
|
270
|
+
"__@toStringTag@10986": {
|
|
271
271
|
"type": "string"
|
|
272
272
|
}
|
|
273
273
|
},
|
|
274
274
|
"additionalProperties": false,
|
|
275
275
|
"required": [
|
|
276
|
-
"__@toStringTag@
|
|
276
|
+
"__@toStringTag@10986",
|
|
277
277
|
"byteLength"
|
|
278
278
|
]
|
|
279
279
|
},
|
|
@@ -283,18 +283,18 @@
|
|
|
283
283
|
"byteLength": {
|
|
284
284
|
"type": "number"
|
|
285
285
|
},
|
|
286
|
-
"__@species@
|
|
286
|
+
"__@species@11087": {
|
|
287
287
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
288
288
|
},
|
|
289
|
-
"__@toStringTag@
|
|
289
|
+
"__@toStringTag@10986": {
|
|
290
290
|
"type": "string",
|
|
291
291
|
"const": "SharedArrayBuffer"
|
|
292
292
|
}
|
|
293
293
|
},
|
|
294
294
|
"additionalProperties": false,
|
|
295
295
|
"required": [
|
|
296
|
-
"__@species@
|
|
297
|
-
"__@toStringTag@
|
|
296
|
+
"__@species@11087",
|
|
297
|
+
"__@toStringTag@10986",
|
|
298
298
|
"byteLength"
|
|
299
299
|
]
|
|
300
300
|
},
|
|
@@ -1098,7 +1098,7 @@
|
|
|
1098
1098
|
},
|
|
1099
1099
|
"info": {
|
|
1100
1100
|
"title": "Browserless",
|
|
1101
|
-
"version": "2.
|
|
1101
|
+
"version": "2.10.0",
|
|
1102
1102
|
"x-logo": {
|
|
1103
1103
|
"altText": "browserless logo",
|
|
1104
1104
|
"url": "./docs/browserless-logo-inline.svg"
|
|
@@ -6134,6 +6134,134 @@
|
|
|
6134
6134
|
]
|
|
6135
6135
|
}
|
|
6136
6136
|
},
|
|
6137
|
+
"/pressure": {
|
|
6138
|
+
"get": {
|
|
6139
|
+
"definitions": {},
|
|
6140
|
+
"description": "Returns a JSON body of stats related to the pressure being created on the instance.",
|
|
6141
|
+
"parameters": [],
|
|
6142
|
+
"requestBody": {
|
|
6143
|
+
"content": {}
|
|
6144
|
+
},
|
|
6145
|
+
"responses": {
|
|
6146
|
+
"200": {
|
|
6147
|
+
"content": {
|
|
6148
|
+
"application/json": {
|
|
6149
|
+
"schema": {
|
|
6150
|
+
"type": "object",
|
|
6151
|
+
"properties": {
|
|
6152
|
+
"cpu": {
|
|
6153
|
+
"description": "An integer representing the percentage of CPU being used. For instance 92 means 92%",
|
|
6154
|
+
"type": [
|
|
6155
|
+
"null",
|
|
6156
|
+
"number"
|
|
6157
|
+
]
|
|
6158
|
+
},
|
|
6159
|
+
"date": {
|
|
6160
|
+
"description": "A number of milliseconds since epoch, or \"Date.now()\" equivalent.",
|
|
6161
|
+
"type": "number"
|
|
6162
|
+
},
|
|
6163
|
+
"isAvailable": {
|
|
6164
|
+
"description": "Whether or not a session can be connected and immediately ran on a health instance.",
|
|
6165
|
+
"type": "boolean"
|
|
6166
|
+
},
|
|
6167
|
+
"maxConcurrent": {
|
|
6168
|
+
"description": "The maximum amount of browsers that can be ran at a single time.",
|
|
6169
|
+
"type": "number"
|
|
6170
|
+
},
|
|
6171
|
+
"maxQueued": {
|
|
6172
|
+
"description": "The maximum amount of queued connections allowed at a single time.",
|
|
6173
|
+
"type": "number"
|
|
6174
|
+
},
|
|
6175
|
+
"memory": {
|
|
6176
|
+
"description": "An integer representing the percentage of Memory being used. For instance 95 means 95%",
|
|
6177
|
+
"type": [
|
|
6178
|
+
"null",
|
|
6179
|
+
"number"
|
|
6180
|
+
]
|
|
6181
|
+
},
|
|
6182
|
+
"message": {
|
|
6183
|
+
"description": "A human-readable message as the overall status of the instance.",
|
|
6184
|
+
"type": "string"
|
|
6185
|
+
},
|
|
6186
|
+
"queued": {
|
|
6187
|
+
"description": "The current number of connect or API calls pending to run.",
|
|
6188
|
+
"type": "number"
|
|
6189
|
+
},
|
|
6190
|
+
"reason": {
|
|
6191
|
+
"description": "A simple single-word reason as to why an instance may or may not be available.",
|
|
6192
|
+
"enum": [
|
|
6193
|
+
"",
|
|
6194
|
+
"cpu",
|
|
6195
|
+
"full",
|
|
6196
|
+
"memory"
|
|
6197
|
+
],
|
|
6198
|
+
"type": "string"
|
|
6199
|
+
},
|
|
6200
|
+
"recentlyRejected": {
|
|
6201
|
+
"description": "The number of recent connections that were rejected due to the queue and concurrency\nlimits having been filled.",
|
|
6202
|
+
"type": "number"
|
|
6203
|
+
},
|
|
6204
|
+
"running": {
|
|
6205
|
+
"description": "The current number of running connections or API calls.",
|
|
6206
|
+
"type": "number"
|
|
6207
|
+
}
|
|
6208
|
+
},
|
|
6209
|
+
"additionalProperties": false,
|
|
6210
|
+
"required": [
|
|
6211
|
+
"cpu",
|
|
6212
|
+
"date",
|
|
6213
|
+
"isAvailable",
|
|
6214
|
+
"maxConcurrent",
|
|
6215
|
+
"maxQueued",
|
|
6216
|
+
"memory",
|
|
6217
|
+
"message",
|
|
6218
|
+
"queued",
|
|
6219
|
+
"reason",
|
|
6220
|
+
"recentlyRejected",
|
|
6221
|
+
"running"
|
|
6222
|
+
],
|
|
6223
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
6224
|
+
}
|
|
6225
|
+
}
|
|
6226
|
+
}
|
|
6227
|
+
},
|
|
6228
|
+
"400": {
|
|
6229
|
+
"code": 400,
|
|
6230
|
+
"description": "The request contains errors or didn't properly encode content.",
|
|
6231
|
+
"message": "HTTP/1.1 400 Bad Request"
|
|
6232
|
+
},
|
|
6233
|
+
"401": {
|
|
6234
|
+
"code": 401,
|
|
6235
|
+
"description": "The request is missing, or contains bad, authorization credentials.",
|
|
6236
|
+
"message": "HTTP/1.1 401 Unauthorized"
|
|
6237
|
+
},
|
|
6238
|
+
"404": {
|
|
6239
|
+
"code": 404,
|
|
6240
|
+
"description": "Resource couldn't be found.",
|
|
6241
|
+
"message": "HTTP/1.1 404 Not Found"
|
|
6242
|
+
},
|
|
6243
|
+
"408": {
|
|
6244
|
+
"code": 408,
|
|
6245
|
+
"description": "The request took has taken too long to process.",
|
|
6246
|
+
"message": "HTTP/1.1 408 Request Timeout"
|
|
6247
|
+
},
|
|
6248
|
+
"429": {
|
|
6249
|
+
"code": 429,
|
|
6250
|
+
"description": "Too many requests are currently being processed.",
|
|
6251
|
+
"message": "HTTP/1.1 429 Too Many Requests"
|
|
6252
|
+
},
|
|
6253
|
+
"500": {
|
|
6254
|
+
"code": 500,
|
|
6255
|
+
"description": "An internal error occurred when handling the request.",
|
|
6256
|
+
"message": "HTTP/1.1 500 Internal Server Error"
|
|
6257
|
+
}
|
|
6258
|
+
},
|
|
6259
|
+
"summary": "/pressure",
|
|
6260
|
+
"tags": [
|
|
6261
|
+
"Management REST APIs"
|
|
6262
|
+
]
|
|
6263
|
+
}
|
|
6264
|
+
},
|
|
6137
6265
|
"/sessions": {
|
|
6138
6266
|
"get": {
|
|
6139
6267
|
"definitions": {},
|