@browserless.io/browserless 2.30.0 → 2.30.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.
@@ -1001,7 +1001,7 @@
1001
1001
  },
1002
1002
  "info": {
1003
1003
  "title": "Browserless",
1004
- "version": "2.30.0",
1004
+ "version": "2.30.1",
1005
1005
  "x-logo": {
1006
1006
  "altText": "browserless logo",
1007
1007
  "url": "./docs/browserless-logo-inline.svg"
@@ -3256,10 +3256,10 @@
3256
3256
  ]
3257
3257
  }
3258
3258
  },
3259
- "/content /chromium/content": {
3259
+ "/chromium/content": {
3260
3260
  "post": {
3261
3261
  "definitions": {},
3262
- "description": "A JSON-based API. Given a \"url\" or \"html\" field, runs and returns HTML content after the page has loaded and JavaScript has parsed.",
3262
+ "description": "A JSON-based API. Given a \"url\" or \"html\" field, runs and returns HTML content after the page has loaded and JavaScript has parsed.\n\n**Note:** This endpoint is also available at: `/content` for backwards compatibility.",
3263
3263
  "parameters": [
3264
3264
  {
3265
3265
  "in": "query",
@@ -3543,16 +3543,16 @@
3543
3543
  "message": "HTTP/1.1 500 Internal Server Error"
3544
3544
  }
3545
3545
  },
3546
- "summary": "/content /chromium/content",
3546
+ "summary": "/chromium/content",
3547
3547
  "tags": [
3548
3548
  "Browser REST APIs"
3549
3549
  ]
3550
3550
  }
3551
3551
  },
3552
- "/download /chromium/download": {
3552
+ "/chromium/download": {
3553
3553
  "post": {
3554
3554
  "definitions": {},
3555
- "description": "A JSON or JavaScript content-type API for returning files Chrome has downloaded during\nthe execution of puppeteer code, which is ran inside context of the browser.\nBrowserless sets up a blank page, a fresh download directory, injects your puppeteer code, and then executes it.\nYou can load external libraries via the \"import\" syntax, and import ESM-style modules\nthat are written for execution inside of the browser. Once your script is finished, any\ndownloaded files from Chromium are returned back with the appropriate content-type header.",
3555
+ "description": "A JSON or JavaScript content-type API for returning files Chrome has downloaded during\nthe execution of puppeteer code, which is ran inside context of the browser.\nBrowserless sets up a blank page, a fresh download directory, injects your puppeteer code, and then executes it.\nYou can load external libraries via the \"import\" syntax, and import ESM-style modules\nthat are written for execution inside of the browser. Once your script is finished, any\ndownloaded files from Chromium are returned back with the appropriate content-type header.\n\n**Note:** This endpoint is also available at: `/download` for backwards compatibility.",
3556
3556
  "parameters": [
3557
3557
  {
3558
3558
  "in": "query",
@@ -3659,16 +3659,16 @@
3659
3659
  "message": "HTTP/1.1 500 Internal Server Error"
3660
3660
  }
3661
3661
  },
3662
- "summary": "/download /chromium/download",
3662
+ "summary": "/chromium/download",
3663
3663
  "tags": [
3664
3664
  "Browser REST APIs"
3665
3665
  ]
3666
3666
  }
3667
3667
  },
3668
- "/function /chromium/function": {
3668
+ "/chromium/function": {
3669
3669
  "post": {
3670
3670
  "definitions": {},
3671
- "description": "A JSON or JavaScript content-type API for running puppeteer code in the browser's context.\nBrowserless sets up a blank page, injects your puppeteer code, and runs it.\nYou can optionally load external libraries via the \"import\" module that are meant for browser usage.\nValues returned from the function are checked and an appropriate content-type and response is sent back\nto your HTTP call.",
3671
+ "description": "A JSON or JavaScript content-type API for running puppeteer code in the browser's context.\nBrowserless sets up a blank page, injects your puppeteer code, and runs it.\nYou can optionally load external libraries via the \"import\" module that are meant for browser usage.\nValues returned from the function are checked and an appropriate content-type and response is sent back\nto your HTTP call.\n\n**Note:** This endpoint is also available at: `/function` for backwards compatibility.",
3672
3672
  "parameters": [
3673
3673
  {
3674
3674
  "in": "query",
@@ -3775,16 +3775,16 @@
3775
3775
  "message": "HTTP/1.1 500 Internal Server Error"
3776
3776
  }
3777
3777
  },
3778
- "summary": "/function /chromium/function",
3778
+ "summary": "/chromium/function",
3779
3779
  "tags": [
3780
3780
  "Browser REST APIs"
3781
3781
  ]
3782
3782
  }
3783
3783
  },
3784
- "/pdf /chromium/pdf": {
3784
+ "/chromium/pdf": {
3785
3785
  "post": {
3786
3786
  "definitions": {},
3787
- "description": "A JSON-based API for getting a PDF binary from either a supplied\n\"url\" or \"html\" payload in your request. Many options exist for\ninjecting cookies, request interceptors, user-agents and waiting for\nselectors, timers and more.",
3787
+ "description": "A JSON-based API for getting a PDF binary from either a supplied\n\"url\" or \"html\" payload in your request. Many options exist for\ninjecting cookies, request interceptors, user-agents and waiting for\nselectors, timers and more.\n\n**Note:** This endpoint is also available at: `/pdf` for backwards compatibility.",
3788
3788
  "parameters": [
3789
3789
  {
3790
3790
  "in": "query",
@@ -4071,16 +4071,16 @@
4071
4071
  "message": "HTTP/1.1 500 Internal Server Error"
4072
4072
  }
4073
4073
  },
4074
- "summary": "/pdf /chromium/pdf",
4074
+ "summary": "/chromium/pdf",
4075
4075
  "tags": [
4076
4076
  "Browser REST APIs"
4077
4077
  ]
4078
4078
  }
4079
4079
  },
4080
- "/performance /chromium/performance": {
4080
+ "/chromium/performance": {
4081
4081
  "post": {
4082
4082
  "definitions": {},
4083
- "description": "Run lighthouse performance audits with a supplied \"url\" in your JSON payload.",
4083
+ "description": "Run lighthouse performance audits with a supplied \"url\" in your JSON payload.\n\n**Note:** This endpoint is also available at: `/performance` for backwards compatibility.",
4084
4084
  "parameters": [
4085
4085
  {
4086
4086
  "in": "query",
@@ -4203,16 +4203,16 @@
4203
4203
  "message": "HTTP/1.1 500 Internal Server Error"
4204
4204
  }
4205
4205
  },
4206
- "summary": "/performance /chromium/performance",
4206
+ "summary": "/chromium/performance",
4207
4207
  "tags": [
4208
4208
  "Browser REST APIs"
4209
4209
  ]
4210
4210
  }
4211
4211
  },
4212
- "/scrape /chromium/scrape": {
4212
+ "/chromium/scrape": {
4213
4213
  "post": {
4214
4214
  "definitions": {},
4215
- "description": "A JSON-based API that returns text, html, and meta-data from a given list of selectors.\nDebugging information is available by sending in the appropriate flags in the \"debugOpts\"\nproperty. Responds with an array of JSON objects.",
4215
+ "description": "A JSON-based API that returns text, html, and meta-data from a given list of selectors.\nDebugging information is available by sending in the appropriate flags in the \"debugOpts\"\nproperty. Responds with an array of JSON objects.\n\n**Note:** This endpoint is also available at: `/scrape` for backwards compatibility.",
4216
4216
  "parameters": [
4217
4217
  {
4218
4218
  "in": "query",
@@ -4833,16 +4833,16 @@
4833
4833
  "message": "HTTP/1.1 500 Internal Server Error"
4834
4834
  }
4835
4835
  },
4836
- "summary": "/scrape /chromium/scrape",
4836
+ "summary": "/chromium/scrape",
4837
4837
  "tags": [
4838
4838
  "Browser REST APIs"
4839
4839
  ]
4840
4840
  }
4841
4841
  },
4842
- "/screenshot /chromium/screenshot": {
4842
+ "/chromium/screenshot": {
4843
4843
  "post": {
4844
4844
  "definitions": {},
4845
- "description": "A JSON-based API for getting a screenshot binary from either a supplied\n\"url\" or \"html\" payload in your request. Many options exist including\ncookies, user-agents, setting timers and network mocks.",
4845
+ "description": "A JSON-based API for getting a screenshot binary from either a supplied\n\"url\" or \"html\" payload in your request. Many options exist including\ncookies, user-agents, setting timers and network mocks.\n\n**Note:** This endpoint is also available at: `/screenshot` for backwards compatibility.",
4846
4846
  "parameters": [
4847
4847
  {
4848
4848
  "in": "query",
@@ -5143,7 +5143,7 @@
5143
5143
  "message": "HTTP/1.1 500 Internal Server Error"
5144
5144
  }
5145
5145
  },
5146
- "summary": "/screenshot /chromium/screenshot",
5146
+ "summary": "/chromium/screenshot",
5147
5147
  "tags": [
5148
5148
  "Browser REST APIs"
5149
5149
  ]
@@ -8137,10 +8137,10 @@
8137
8137
  ]
8138
8138
  }
8139
8139
  },
8140
- " /chromium": {
8140
+ "/chromium": {
8141
8141
  "get": {
8142
8142
  "definitions": {},
8143
- "description": "Launch and connect to Chromium with a library like puppeteer or others that work over chrome-devtools-protocol.",
8143
+ "description": "Launch and connect to Chromium with a library like puppeteer or others that work over chrome-devtools-protocol.\n\n**Note:** This endpoint is also available at: `` for backwards compatibility.",
8144
8144
  "parameters": [
8145
8145
  {
8146
8146
  "in": "query",
@@ -8228,16 +8228,16 @@
8228
8228
  "message": "HTTP/1.1 500 Internal Server Error"
8229
8229
  }
8230
8230
  },
8231
- "summary": " /chromium",
8231
+ "summary": "/chromium",
8232
8232
  "tags": [
8233
8233
  "Browser WebSocket APIs"
8234
8234
  ]
8235
8235
  }
8236
8236
  },
8237
- "/playwright/chromium /chromium/playwright": {
8237
+ "/playwright/chromium": {
8238
8238
  "get": {
8239
8239
  "definitions": {},
8240
- "description": "Connect to Chromium with any playwright style library.",
8240
+ "description": "Connect to Chromium with any playwright style library.\n\n**Note:** This endpoint is also available at: `/chromium/playwright` for backwards compatibility.",
8241
8241
  "parameters": [
8242
8242
  {
8243
8243
  "in": "query",
@@ -8325,7 +8325,7 @@
8325
8325
  "message": "HTTP/1.1 500 Internal Server Error"
8326
8326
  }
8327
8327
  },
8328
- "summary": "/playwright/chromium /chromium/playwright",
8328
+ "summary": "/playwright/chromium",
8329
8329
  "tags": [
8330
8330
  "Browser WebSocket APIs"
8331
8331
  ]
@@ -8525,10 +8525,10 @@
8525
8525
  ]
8526
8526
  }
8527
8527
  },
8528
- "/playwright/firefox /firefox/playwright": {
8528
+ "/playwright/firefox": {
8529
8529
  "get": {
8530
8530
  "definitions": {},
8531
- "description": "Connect to Firefox with any playwright-compliant library.",
8531
+ "description": "Connect to Firefox with any playwright-compliant library.\n\n**Note:** This endpoint is also available at: `/firefox/playwright` for backwards compatibility.",
8532
8532
  "parameters": [
8533
8533
  {
8534
8534
  "in": "query",
@@ -8680,16 +8680,16 @@
8680
8680
  "message": "HTTP/1.1 500 Internal Server Error"
8681
8681
  }
8682
8682
  },
8683
- "summary": "/playwright/firefox /firefox/playwright",
8683
+ "summary": "/playwright/firefox",
8684
8684
  "tags": [
8685
8685
  "Browser WebSocket APIs"
8686
8686
  ]
8687
8687
  }
8688
8688
  },
8689
- "/playwright/webkit /webkit/playwright": {
8689
+ "/playwright/webkit": {
8690
8690
  "get": {
8691
8691
  "definitions": {},
8692
- "description": "Connect to Webkit with any playwright-compliant library.",
8692
+ "description": "Connect to Webkit with any playwright-compliant library.\n\n**Note:** This endpoint is also available at: `/webkit/playwright` for backwards compatibility.",
8693
8693
  "parameters": [
8694
8694
  {
8695
8695
  "in": "query",
@@ -8777,7 +8777,7 @@
8777
8777
  "message": "HTTP/1.1 500 Internal Server Error"
8778
8778
  }
8779
8779
  },
8780
- "summary": "/playwright/webkit /webkit/playwright",
8780
+ "summary": "/playwright/webkit",
8781
8781
  "tags": [
8782
8782
  "Browser WebSocket APIs"
8783
8783
  ]
@@ -1998,7 +1998,7 @@
1998
1998
  createDebug.namespaces = namespaces;
1999
1999
  createDebug.names = [];
2000
2000
  createDebug.skips = [];
2001
- const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
2001
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
2002
2002
  for (const ns of split) {
2003
2003
  if (ns[0] === "-") {
2004
2004
  createDebug.skips.push(ns.slice(1));
@@ -2218,7 +2218,7 @@
2218
2218
  function load() {
2219
2219
  let r;
2220
2220
  try {
2221
- r = exports2.storage.getItem("debug");
2221
+ r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
2222
2222
  } catch (error) {
2223
2223
  }
2224
2224
  if (!r && typeof process !== "undefined" && "env" in process) {
@@ -2006,7 +2006,7 @@
2006
2006
  createDebug.namespaces = namespaces;
2007
2007
  createDebug.names = [];
2008
2008
  createDebug.skips = [];
2009
- const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
2009
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
2010
2010
  for (const ns of split) {
2011
2011
  if (ns[0] === "-") {
2012
2012
  createDebug.skips.push(ns.slice(1));
@@ -2226,7 +2226,7 @@
2226
2226
  function load() {
2227
2227
  let r;
2228
2228
  try {
2229
- r = exports2.storage.getItem("debug");
2229
+ r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
2230
2230
  } catch (error) {
2231
2231
  }
2232
2232
  if (!r && typeof process !== "undefined" && "env" in process) {