@browserless.io/browserless 2.24.0-beta-5 → 2.24.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 +17 -1
- package/bin/browserless.js +1 -1
- package/build/browsers/browsers.playwright.d.ts +1 -0
- package/build/browsers/browsers.playwright.js +3 -0
- package/build/browsers/index.d.ts +2 -1
- package/build/browsers/index.js +28 -7
- package/build/http.d.ts +5 -0
- package/build/http.js +1 -0
- package/build/routes/chrome/http/content.post.body.json +8 -8
- package/build/routes/chrome/http/content.post.query.json +4 -0
- package/build/routes/chrome/http/download.post.query.json +4 -0
- package/build/routes/chrome/http/function.post.query.json +4 -0
- package/build/routes/chrome/http/pdf.post.body.json +8 -8
- package/build/routes/chrome/http/pdf.post.query.json +4 -0
- package/build/routes/chrome/http/performance.post.query.json +4 -0
- package/build/routes/chrome/http/scrape.post.body.json +8 -8
- package/build/routes/chrome/http/scrape.post.query.json +4 -0
- package/build/routes/chrome/http/screenshot.post.body.json +8 -8
- package/build/routes/chrome/http/screenshot.post.query.json +4 -0
- package/build/routes/chrome/tests/kill-sessions.spec.d.ts +1 -0
- package/build/routes/chrome/tests/kill-sessions.spec.js +80 -0
- package/build/routes/chrome/ws/browser.query.json +4 -0
- package/build/routes/chrome/ws/cdp.query.json +4 -0
- package/build/routes/chrome/ws/page.query.json +4 -0
- package/build/routes/chrome/ws/playwright.query.json +4 -0
- package/build/routes/chromium/http/content.post.body.json +8 -8
- package/build/routes/chromium/http/content.post.query.json +4 -0
- package/build/routes/chromium/http/download.post.query.json +4 -0
- package/build/routes/chromium/http/function.post.query.json +4 -0
- package/build/routes/chromium/http/pdf.post.body.json +8 -8
- package/build/routes/chromium/http/pdf.post.query.json +4 -0
- package/build/routes/chromium/http/performance.post.query.json +4 -0
- package/build/routes/chromium/http/scrape.post.body.json +8 -8
- package/build/routes/chromium/http/scrape.post.query.json +4 -0
- package/build/routes/chromium/http/screenshot.post.body.json +8 -8
- package/build/routes/chromium/http/screenshot.post.query.json +4 -0
- package/build/routes/chromium/tests/kill-sessions.spec.d.ts +1 -0
- package/build/routes/chromium/tests/kill-sessions.spec.js +80 -0
- package/build/routes/chromium/tests/websocket.spec.js +23 -0
- package/build/routes/chromium/ws/browser.query.json +4 -0
- package/build/routes/chromium/ws/cdp.query.json +4 -0
- package/build/routes/chromium/ws/page.query.json +4 -0
- package/build/routes/chromium/ws/playwright.query.json +4 -0
- package/build/routes/firefox/tests/kill-sessions.spec.d.ts +1 -0
- package/build/routes/firefox/tests/kill-sessions.spec.js +72 -0
- package/build/routes/firefox/ws/playwright.query.json +4 -0
- package/build/routes/management/http/kill.get.d.ts +21 -0
- package/build/routes/management/http/kill.get.js +19 -0
- package/build/routes/management/http/kill.get.query.json +193 -0
- package/build/routes/management/http/meta.get.js +3 -2
- package/build/routes/management/http/sessions.get.query.json +1 -0
- package/build/routes/management/tests/management.spec.js +12 -0
- package/build/routes/webkit/tests/kill-sessions.spec.d.ts +1 -0
- package/build/routes/webkit/tests/kill-sessions.spec.js +72 -0
- package/build/routes/webkit/ws/playwright.query.json +4 -0
- package/build/types.d.ts +2 -0
- package/build/types.js +1 -0
- package/build/utils.d.ts +1 -1
- package/build/utils.js +1 -10
- package/package.json +5 -5
- package/src/browsers/browsers.playwright.ts +3 -0
- package/src/browsers/index.ts +33 -12
- package/src/http.ts +6 -0
- package/src/routes/chrome/tests/kill-sessions.spec.ts +99 -0
- package/src/routes/chromium/tests/kill-sessions.spec.ts +99 -0
- package/src/routes/chromium/tests/websocket.spec.ts +29 -0
- package/src/routes/firefox/tests/kill-sessions.spec.ts +99 -0
- package/src/routes/management/http/kill.get.ts +40 -0
- package/src/routes/management/http/meta.get.ts +12 -10
- package/src/routes/management/tests/management.spec.ts +19 -0
- package/src/routes/webkit/tests/kill-sessions.spec.ts +99 -0
- package/src/types.ts +1 -0
- package/src/utils.ts +2 -11
- package/static/docs/swagger.json +297 -10
- package/static/docs/swagger.min.json +296 -9
- package/static/function/client.js +39 -25
- package/static/function/index.html +39 -25
|
@@ -2006,50 +2006,64 @@
|
|
|
2006
2006
|
createDebug.namespaces = namespaces;
|
|
2007
2007
|
createDebug.names = [];
|
|
2008
2008
|
createDebug.skips = [];
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2009
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
|
|
2010
|
+
for (const ns of split) {
|
|
2011
|
+
if (ns[0] === "-") {
|
|
2012
|
+
createDebug.skips.push(ns.slice(1));
|
|
2013
|
+
} else {
|
|
2014
|
+
createDebug.names.push(ns);
|
|
2015
2015
|
}
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
function matchesTemplate(search, template) {
|
|
2019
|
+
let searchIndex = 0;
|
|
2020
|
+
let templateIndex = 0;
|
|
2021
|
+
let starIndex = -1;
|
|
2022
|
+
let matchIndex = 0;
|
|
2023
|
+
while (searchIndex < search.length) {
|
|
2024
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
2025
|
+
if (template[templateIndex] === "*") {
|
|
2026
|
+
starIndex = templateIndex;
|
|
2027
|
+
matchIndex = searchIndex;
|
|
2028
|
+
templateIndex++;
|
|
2029
|
+
} else {
|
|
2030
|
+
searchIndex++;
|
|
2031
|
+
templateIndex++;
|
|
2032
|
+
}
|
|
2033
|
+
} else if (starIndex !== -1) {
|
|
2034
|
+
templateIndex = starIndex + 1;
|
|
2035
|
+
matchIndex++;
|
|
2036
|
+
searchIndex = matchIndex;
|
|
2019
2037
|
} else {
|
|
2020
|
-
|
|
2038
|
+
return false;
|
|
2021
2039
|
}
|
|
2022
2040
|
}
|
|
2041
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
2042
|
+
templateIndex++;
|
|
2043
|
+
}
|
|
2044
|
+
return templateIndex === template.length;
|
|
2023
2045
|
}
|
|
2024
2046
|
function disable() {
|
|
2025
2047
|
const namespaces = [
|
|
2026
|
-
...createDebug.names
|
|
2027
|
-
...createDebug.skips.map(
|
|
2048
|
+
...createDebug.names,
|
|
2049
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
2028
2050
|
].join(",");
|
|
2029
2051
|
createDebug.enable("");
|
|
2030
2052
|
return namespaces;
|
|
2031
2053
|
}
|
|
2032
2054
|
function enabled(name) {
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
}
|
|
2036
|
-
let i;
|
|
2037
|
-
let len;
|
|
2038
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
2039
|
-
if (createDebug.skips[i].test(name)) {
|
|
2055
|
+
for (const skip of createDebug.skips) {
|
|
2056
|
+
if (matchesTemplate(name, skip)) {
|
|
2040
2057
|
return false;
|
|
2041
2058
|
}
|
|
2042
2059
|
}
|
|
2043
|
-
for (
|
|
2044
|
-
if (
|
|
2060
|
+
for (const ns of createDebug.names) {
|
|
2061
|
+
if (matchesTemplate(name, ns)) {
|
|
2045
2062
|
return true;
|
|
2046
2063
|
}
|
|
2047
2064
|
}
|
|
2048
2065
|
return false;
|
|
2049
2066
|
}
|
|
2050
|
-
function toNamespace(regexp) {
|
|
2051
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
2052
|
-
}
|
|
2053
2067
|
function coerce(val) {
|
|
2054
2068
|
if (val instanceof Error) {
|
|
2055
2069
|
return val.stack || val.message;
|
|
@@ -4387,7 +4401,7 @@
|
|
|
4387
4401
|
// node_modules/puppeteer-core/lib/esm/puppeteer/generated/version.js
|
|
4388
4402
|
init_dirname();
|
|
4389
4403
|
init_buffer2();
|
|
4390
|
-
var packageVersion = "23.10.
|
|
4404
|
+
var packageVersion = "23.10.1";
|
|
4391
4405
|
|
|
4392
4406
|
// node_modules/puppeteer-core/lib/esm/puppeteer/util/assert.js
|
|
4393
4407
|
init_dirname();
|