@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,44 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"type": "
|
|
3
|
-
"properties": {
|
|
4
|
-
"description": {
|
|
5
|
-
"description": "The description of the target. Generally the page's title.",
|
|
6
|
-
"type": "string"
|
|
7
|
-
},
|
|
8
|
-
"devtoolsFrontendUrl": {
|
|
9
|
-
"description": "The fully-qualified URL of the Devtools inspector app.",
|
|
10
|
-
"type": "string"
|
|
11
|
-
},
|
|
12
|
-
"id": {
|
|
13
|
-
"description": "A Unique Id for the underlying target.",
|
|
14
|
-
"type": "string"
|
|
15
|
-
},
|
|
16
|
-
"title": {
|
|
17
|
-
"description": "The title of the target. For pages this is the page's title.",
|
|
18
|
-
"type": "string"
|
|
19
|
-
},
|
|
20
|
-
"type": {
|
|
21
|
-
"description": "The type of target, generally \"page\" or \"background_page\".",
|
|
22
|
-
"type": "string"
|
|
23
|
-
},
|
|
24
|
-
"url": {
|
|
25
|
-
"description": "The current URL the target is consuming or visiting.",
|
|
26
|
-
"type": "string"
|
|
27
|
-
},
|
|
28
|
-
"webSocketDebuggerUrl": {
|
|
29
|
-
"description": "The target or page's WebSocket Debugger URL. Primarily used for legacy\nlibraries to connect and inspect or remote automate this target.",
|
|
30
|
-
"type": "string"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"additionalProperties": false,
|
|
34
|
-
"required": [
|
|
35
|
-
"description",
|
|
36
|
-
"devtoolsFrontendUrl",
|
|
37
|
-
"id",
|
|
38
|
-
"title",
|
|
39
|
-
"type",
|
|
40
|
-
"url",
|
|
41
|
-
"webSocketDebuggerUrl"
|
|
42
|
-
],
|
|
2
|
+
"type": "string",
|
|
43
3
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
44
4
|
}
|
|
@@ -1,44 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"type": "
|
|
3
|
-
"properties": {
|
|
4
|
-
"description": {
|
|
5
|
-
"description": "The description of the target. Generally the page's title.",
|
|
6
|
-
"type": "string"
|
|
7
|
-
},
|
|
8
|
-
"devtoolsFrontendUrl": {
|
|
9
|
-
"description": "The fully-qualified URL of the Devtools inspector app.",
|
|
10
|
-
"type": "string"
|
|
11
|
-
},
|
|
12
|
-
"id": {
|
|
13
|
-
"description": "A Unique Id for the underlying target.",
|
|
14
|
-
"type": "string"
|
|
15
|
-
},
|
|
16
|
-
"title": {
|
|
17
|
-
"description": "The title of the target. For pages this is the page's title.",
|
|
18
|
-
"type": "string"
|
|
19
|
-
},
|
|
20
|
-
"type": {
|
|
21
|
-
"description": "The type of target, generally \"page\" or \"background_page\".",
|
|
22
|
-
"type": "string"
|
|
23
|
-
},
|
|
24
|
-
"url": {
|
|
25
|
-
"description": "The current URL the target is consuming or visiting.",
|
|
26
|
-
"type": "string"
|
|
27
|
-
},
|
|
28
|
-
"webSocketDebuggerUrl": {
|
|
29
|
-
"description": "The target or page's WebSocket Debugger URL. Primarily used for legacy\nlibraries to connect and inspect or remote automate this target.",
|
|
30
|
-
"type": "string"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"additionalProperties": false,
|
|
34
|
-
"required": [
|
|
35
|
-
"description",
|
|
36
|
-
"devtoolsFrontendUrl",
|
|
37
|
-
"id",
|
|
38
|
-
"title",
|
|
39
|
-
"type",
|
|
40
|
-
"url",
|
|
41
|
-
"webSocketDebuggerUrl"
|
|
42
|
-
],
|
|
2
|
+
"type": "string",
|
|
43
3
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
44
4
|
}
|
|
@@ -20,9 +20,6 @@
|
|
|
20
20
|
"description": "When bestAttempt is set to true, browserless attempt to proceed\nwhen \"awaited\" events fail or timeout. This includes things like\ngoto, waitForSelector, and more.",
|
|
21
21
|
"type": "boolean"
|
|
22
22
|
},
|
|
23
|
-
"blockModals": {
|
|
24
|
-
"type": "boolean"
|
|
25
|
-
},
|
|
26
23
|
"cookies": {
|
|
27
24
|
"type": "array",
|
|
28
25
|
"items": {
|
|
@@ -38,9 +35,6 @@
|
|
|
38
35
|
"html": {
|
|
39
36
|
"type": "string"
|
|
40
37
|
},
|
|
41
|
-
"options": {
|
|
42
|
-
"$ref": "#/definitions/PDFOptions"
|
|
43
|
-
},
|
|
44
38
|
"rejectRequestPattern": {
|
|
45
39
|
"type": "array",
|
|
46
40
|
"items": {
|
|
@@ -98,6 +92,7 @@
|
|
|
98
92
|
"$ref": "#/definitions/Record<string,string>"
|
|
99
93
|
},
|
|
100
94
|
"setJavaScriptEnabled": {
|
|
95
|
+
"description": "Whether or not to allow JavaScript to run on the page.",
|
|
101
96
|
"type": "boolean"
|
|
102
97
|
},
|
|
103
98
|
"url": {
|
|
@@ -360,145 +355,6 @@
|
|
|
360
355
|
],
|
|
361
356
|
"type": "string"
|
|
362
357
|
},
|
|
363
|
-
"PDFOptions": {
|
|
364
|
-
"description": "Valid options to configure PDF generation via {@link Page.pdf}.",
|
|
365
|
-
"type": "object",
|
|
366
|
-
"properties": {
|
|
367
|
-
"scale": {
|
|
368
|
-
"description": "Scales the rendering of the web page. Amount must be between `0.1` and `2`.",
|
|
369
|
-
"type": "number"
|
|
370
|
-
},
|
|
371
|
-
"displayHeaderFooter": {
|
|
372
|
-
"description": "Whether to show the header and footer.",
|
|
373
|
-
"type": "boolean"
|
|
374
|
-
},
|
|
375
|
-
"headerTemplate": {
|
|
376
|
-
"description": "HTML template for the print header. Should be valid HTML with the following\nclasses used to inject values into them:\n\n- `date` formatted print date\n\n- `title` document title\n\n- `url` document location\n\n- `pageNumber` current page number\n\n- `totalPages` total pages in the document",
|
|
377
|
-
"type": "string"
|
|
378
|
-
},
|
|
379
|
-
"footerTemplate": {
|
|
380
|
-
"description": "HTML template for the print footer. Has the same constraints and support\nfor special classes as {@link PDFOptionsPDFOptions.headerTemplate}.",
|
|
381
|
-
"type": "string"
|
|
382
|
-
},
|
|
383
|
-
"printBackground": {
|
|
384
|
-
"description": "Set to `true` to print background graphics.",
|
|
385
|
-
"type": "boolean"
|
|
386
|
-
},
|
|
387
|
-
"landscape": {
|
|
388
|
-
"description": "Whether to print in landscape orientation.",
|
|
389
|
-
"type": "boolean"
|
|
390
|
-
},
|
|
391
|
-
"pageRanges": {
|
|
392
|
-
"description": "Paper ranges to print, e.g. `1-5, 8, 11-13`.",
|
|
393
|
-
"type": "string"
|
|
394
|
-
},
|
|
395
|
-
"format": {
|
|
396
|
-
"description": "All the valid paper format types when printing a PDF.",
|
|
397
|
-
"enum": [
|
|
398
|
-
"A0",
|
|
399
|
-
"A1",
|
|
400
|
-
"A2",
|
|
401
|
-
"A3",
|
|
402
|
-
"A4",
|
|
403
|
-
"A5",
|
|
404
|
-
"A6",
|
|
405
|
-
"LEDGER",
|
|
406
|
-
"LEGAL",
|
|
407
|
-
"LETTER",
|
|
408
|
-
"Ledger",
|
|
409
|
-
"Legal",
|
|
410
|
-
"Letter",
|
|
411
|
-
"TABLOID",
|
|
412
|
-
"Tabloid",
|
|
413
|
-
"a0",
|
|
414
|
-
"a1",
|
|
415
|
-
"a2",
|
|
416
|
-
"a3",
|
|
417
|
-
"a4",
|
|
418
|
-
"a5",
|
|
419
|
-
"a6",
|
|
420
|
-
"ledger",
|
|
421
|
-
"legal",
|
|
422
|
-
"letter",
|
|
423
|
-
"tabloid"
|
|
424
|
-
],
|
|
425
|
-
"type": "string"
|
|
426
|
-
},
|
|
427
|
-
"width": {
|
|
428
|
-
"description": "Sets the width of paper. You can pass in a number or a string with a unit.",
|
|
429
|
-
"type": [
|
|
430
|
-
"string",
|
|
431
|
-
"number"
|
|
432
|
-
]
|
|
433
|
-
},
|
|
434
|
-
"height": {
|
|
435
|
-
"description": "Sets the height of paper. You can pass in a number or a string with a unit.",
|
|
436
|
-
"type": [
|
|
437
|
-
"string",
|
|
438
|
-
"number"
|
|
439
|
-
]
|
|
440
|
-
},
|
|
441
|
-
"preferCSSPageSize": {
|
|
442
|
-
"description": "Give any CSS `@page` size declared in the page priority over what is\ndeclared in the `width` or `height` or `format` option.",
|
|
443
|
-
"type": "boolean"
|
|
444
|
-
},
|
|
445
|
-
"margin": {
|
|
446
|
-
"description": "Set the PDF margins.",
|
|
447
|
-
"$ref": "#/definitions/PDFMargin"
|
|
448
|
-
},
|
|
449
|
-
"path": {
|
|
450
|
-
"description": "The path to save the file to.",
|
|
451
|
-
"type": "string"
|
|
452
|
-
},
|
|
453
|
-
"omitBackground": {
|
|
454
|
-
"description": "Hides default white background and allows generating pdfs with transparency.",
|
|
455
|
-
"type": "boolean"
|
|
456
|
-
},
|
|
457
|
-
"tagged": {
|
|
458
|
-
"description": "Generate tagged (accessible) PDF.",
|
|
459
|
-
"type": "boolean"
|
|
460
|
-
},
|
|
461
|
-
"outline": {
|
|
462
|
-
"description": "Generate document outline.",
|
|
463
|
-
"type": "boolean"
|
|
464
|
-
},
|
|
465
|
-
"timeout": {
|
|
466
|
-
"description": "Timeout in milliseconds. Pass `0` to disable timeout.",
|
|
467
|
-
"type": "number"
|
|
468
|
-
}
|
|
469
|
-
},
|
|
470
|
-
"additionalProperties": false
|
|
471
|
-
},
|
|
472
|
-
"PDFMargin": {
|
|
473
|
-
"type": "object",
|
|
474
|
-
"properties": {
|
|
475
|
-
"top": {
|
|
476
|
-
"type": [
|
|
477
|
-
"string",
|
|
478
|
-
"number"
|
|
479
|
-
]
|
|
480
|
-
},
|
|
481
|
-
"bottom": {
|
|
482
|
-
"type": [
|
|
483
|
-
"string",
|
|
484
|
-
"number"
|
|
485
|
-
]
|
|
486
|
-
},
|
|
487
|
-
"left": {
|
|
488
|
-
"type": [
|
|
489
|
-
"string",
|
|
490
|
-
"number"
|
|
491
|
-
]
|
|
492
|
-
},
|
|
493
|
-
"right": {
|
|
494
|
-
"type": [
|
|
495
|
-
"string",
|
|
496
|
-
"number"
|
|
497
|
-
]
|
|
498
|
-
}
|
|
499
|
-
},
|
|
500
|
-
"additionalProperties": false
|
|
501
|
-
},
|
|
502
358
|
"Partial<ResponseForRequest>": {
|
|
503
359
|
"type": "object",
|
|
504
360
|
"properties": {
|
|
@@ -538,14 +394,14 @@
|
|
|
538
394
|
"length": {
|
|
539
395
|
"type": "number"
|
|
540
396
|
},
|
|
541
|
-
"__@toStringTag@
|
|
397
|
+
"__@toStringTag@358965": {
|
|
542
398
|
"type": "string",
|
|
543
399
|
"const": "Uint8Array"
|
|
544
400
|
}
|
|
545
401
|
},
|
|
546
402
|
"required": [
|
|
547
403
|
"BYTES_PER_ELEMENT",
|
|
548
|
-
"__@toStringTag@
|
|
404
|
+
"__@toStringTag@358965",
|
|
549
405
|
"buffer",
|
|
550
406
|
"byteLength",
|
|
551
407
|
"byteOffset",
|
|
@@ -580,13 +436,13 @@
|
|
|
580
436
|
"byteLength": {
|
|
581
437
|
"type": "number"
|
|
582
438
|
},
|
|
583
|
-
"__@toStringTag@
|
|
439
|
+
"__@toStringTag@358965": {
|
|
584
440
|
"type": "string"
|
|
585
441
|
}
|
|
586
442
|
},
|
|
587
443
|
"additionalProperties": false,
|
|
588
444
|
"required": [
|
|
589
|
-
"__@toStringTag@
|
|
445
|
+
"__@toStringTag@358965",
|
|
590
446
|
"byteLength"
|
|
591
447
|
]
|
|
592
448
|
},
|
|
@@ -596,18 +452,18 @@
|
|
|
596
452
|
"byteLength": {
|
|
597
453
|
"type": "number"
|
|
598
454
|
},
|
|
599
|
-
"__@species@
|
|
455
|
+
"__@species@363117": {
|
|
600
456
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
601
457
|
},
|
|
602
|
-
"__@toStringTag@
|
|
458
|
+
"__@toStringTag@358965": {
|
|
603
459
|
"type": "string",
|
|
604
460
|
"const": "SharedArrayBuffer"
|
|
605
461
|
}
|
|
606
462
|
},
|
|
607
463
|
"additionalProperties": false,
|
|
608
464
|
"required": [
|
|
609
|
-
"__@species@
|
|
610
|
-
"__@toStringTag@
|
|
465
|
+
"__@species@363117",
|
|
466
|
+
"__@toStringTag@358965",
|
|
611
467
|
"byteLength"
|
|
612
468
|
]
|
|
613
469
|
},
|
|
@@ -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#"
|