@browserless.io/browserless 2.19.0 → 2.20.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.
- package/README.md +2 -2
- package/bin/browserless.js +2 -2
- package/build/browserless.js +4 -3
- package/build/config.d.ts +1 -1
- package/build/config.js +2 -2
- 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/sdk-utils.js +18 -46
- package/build/utils.d.ts +8 -0
- package/build/utils.js +15 -0
- package/docker/chrome/Dockerfile +3 -2
- package/docker/chromium/Dockerfile +3 -2
- package/docker/firefox/Dockerfile +3 -2
- package/docker/multi/Dockerfile +4 -2
- package/docker/webkit/Dockerfile +3 -2
- package/package.json +14 -14
- package/src/browserless.ts +5 -4
- package/src/config.ts +2 -2
- package/src/sdk-utils.ts +32 -60
- package/src/utils.ts +17 -0
- package/static/docs/swagger.json +10 -10
- package/static/docs/swagger.min.json +9 -9
- package/static/function/client.js +14 -8
- package/static/function/index.html +14 -8
|
@@ -4382,7 +4382,7 @@
|
|
|
4382
4382
|
// node_modules/puppeteer-core/lib/esm/puppeteer/generated/version.js
|
|
4383
4383
|
init_dirname();
|
|
4384
4384
|
init_buffer2();
|
|
4385
|
-
var packageVersion = "23.
|
|
4385
|
+
var packageVersion = "23.3.0";
|
|
4386
4386
|
|
|
4387
4387
|
// node_modules/puppeteer-core/lib/esm/puppeteer/util/assert.js
|
|
4388
4388
|
init_dirname();
|
|
@@ -4409,9 +4409,13 @@
|
|
|
4409
4409
|
return typedArrayToBase64(new TextEncoder().encode(str));
|
|
4410
4410
|
}
|
|
4411
4411
|
function typedArrayToBase64(typedArray) {
|
|
4412
|
-
const
|
|
4413
|
-
|
|
4414
|
-
|
|
4412
|
+
const chunkSize = 65534;
|
|
4413
|
+
const chunks = [];
|
|
4414
|
+
for (let i = 0; i < typedArray.length; i += chunkSize) {
|
|
4415
|
+
const chunk = typedArray.subarray(i, i + chunkSize);
|
|
4416
|
+
chunks.push(String.fromCodePoint.apply(null, chunk));
|
|
4417
|
+
}
|
|
4418
|
+
const binaryString = chunks.join("");
|
|
4415
4419
|
return btoa(binaryString);
|
|
4416
4420
|
}
|
|
4417
4421
|
function mergeUint8Arrays(items) {
|
|
@@ -12788,8 +12792,8 @@
|
|
|
12788
12792
|
const border = [
|
|
12789
12793
|
{ x: rect.left, y: rect.top },
|
|
12790
12794
|
{ x: rect.left + rect.width, y: rect.top },
|
|
12791
|
-
{ x: rect.left + rect.width, y: rect.top + rect.
|
|
12792
|
-
{ x: rect.left, y: rect.top + rect.
|
|
12795
|
+
{ x: rect.left + rect.width, y: rect.top + rect.height },
|
|
12796
|
+
{ x: rect.left, y: rect.top + rect.height }
|
|
12793
12797
|
];
|
|
12794
12798
|
const padding = transformQuadWithOffsets(border, offsets.border);
|
|
12795
12799
|
const content = transformQuadWithOffsets(padding, offsets.padding);
|
|
@@ -14930,7 +14934,8 @@ ${sourceUrlComment}
|
|
|
14930
14934
|
return this._frameManager._deviceRequestPromptManager(this.#client);
|
|
14931
14935
|
}
|
|
14932
14936
|
async addPreloadScript(preloadScript) {
|
|
14933
|
-
|
|
14937
|
+
const parentFrame = this.parentFrame();
|
|
14938
|
+
if (parentFrame && this.#client === parentFrame.client) {
|
|
14934
14939
|
return;
|
|
14935
14940
|
}
|
|
14936
14941
|
if (preloadScript.getIdForFrame(this)) {
|
|
@@ -16660,7 +16665,8 @@ ${sourceUrlComment}
|
|
|
16660
16665
|
#onFrameAttached(session, frameId, parentFrameId) {
|
|
16661
16666
|
let frame = this.frame(frameId);
|
|
16662
16667
|
if (frame) {
|
|
16663
|
-
|
|
16668
|
+
const parentFrame = this.frame(parentFrameId);
|
|
16669
|
+
if (session && parentFrame && frame.client !== parentFrame?.client) {
|
|
16664
16670
|
frame.updateClient(session);
|
|
16665
16671
|
}
|
|
16666
16672
|
return;
|
|
@@ -4390,7 +4390,7 @@
|
|
|
4390
4390
|
// node_modules/puppeteer-core/lib/esm/puppeteer/generated/version.js
|
|
4391
4391
|
init_dirname();
|
|
4392
4392
|
init_buffer2();
|
|
4393
|
-
var packageVersion = "23.
|
|
4393
|
+
var packageVersion = "23.3.0";
|
|
4394
4394
|
|
|
4395
4395
|
// node_modules/puppeteer-core/lib/esm/puppeteer/util/assert.js
|
|
4396
4396
|
init_dirname();
|
|
@@ -4417,9 +4417,13 @@
|
|
|
4417
4417
|
return typedArrayToBase64(new TextEncoder().encode(str));
|
|
4418
4418
|
}
|
|
4419
4419
|
function typedArrayToBase64(typedArray) {
|
|
4420
|
-
const
|
|
4421
|
-
|
|
4422
|
-
|
|
4420
|
+
const chunkSize = 65534;
|
|
4421
|
+
const chunks = [];
|
|
4422
|
+
for (let i = 0; i < typedArray.length; i += chunkSize) {
|
|
4423
|
+
const chunk = typedArray.subarray(i, i + chunkSize);
|
|
4424
|
+
chunks.push(String.fromCodePoint.apply(null, chunk));
|
|
4425
|
+
}
|
|
4426
|
+
const binaryString = chunks.join("");
|
|
4423
4427
|
return btoa(binaryString);
|
|
4424
4428
|
}
|
|
4425
4429
|
function mergeUint8Arrays(items) {
|
|
@@ -12796,8 +12800,8 @@
|
|
|
12796
12800
|
const border = [
|
|
12797
12801
|
{ x: rect.left, y: rect.top },
|
|
12798
12802
|
{ x: rect.left + rect.width, y: rect.top },
|
|
12799
|
-
{ x: rect.left + rect.width, y: rect.top + rect.
|
|
12800
|
-
{ x: rect.left, y: rect.top + rect.
|
|
12803
|
+
{ x: rect.left + rect.width, y: rect.top + rect.height },
|
|
12804
|
+
{ x: rect.left, y: rect.top + rect.height }
|
|
12801
12805
|
];
|
|
12802
12806
|
const padding = transformQuadWithOffsets(border, offsets.border);
|
|
12803
12807
|
const content = transformQuadWithOffsets(padding, offsets.padding);
|
|
@@ -14938,7 +14942,8 @@ ${sourceUrlComment}
|
|
|
14938
14942
|
return this._frameManager._deviceRequestPromptManager(this.#client);
|
|
14939
14943
|
}
|
|
14940
14944
|
async addPreloadScript(preloadScript) {
|
|
14941
|
-
|
|
14945
|
+
const parentFrame = this.parentFrame();
|
|
14946
|
+
if (parentFrame && this.#client === parentFrame.client) {
|
|
14942
14947
|
return;
|
|
14943
14948
|
}
|
|
14944
14949
|
if (preloadScript.getIdForFrame(this)) {
|
|
@@ -16668,7 +16673,8 @@ ${sourceUrlComment}
|
|
|
16668
16673
|
#onFrameAttached(session, frameId, parentFrameId) {
|
|
16669
16674
|
let frame = this.frame(frameId);
|
|
16670
16675
|
if (frame) {
|
|
16671
|
-
|
|
16676
|
+
const parentFrame = this.frame(parentFrameId);
|
|
16677
|
+
if (session && parentFrame && frame.client !== parentFrame?.client) {
|
|
16672
16678
|
frame.updateClient(session);
|
|
16673
16679
|
}
|
|
16674
16680
|
return;
|