@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.
@@ -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.2.1";
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 binaryString = Array.from(typedArray, (byte) => {
4413
- return String.fromCodePoint(byte);
4414
- }).join("");
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.bottom },
12792
- { x: rect.left, y: rect.top + rect.bottom }
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
- if (this.#client === this._frameManager.client && this !== this._frameManager.mainFrame()) {
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
- if (session && frame.client !== this.#client) {
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.2.1";
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 binaryString = Array.from(typedArray, (byte) => {
4421
- return String.fromCodePoint(byte);
4422
- }).join("");
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.bottom },
12800
- { x: rect.left, y: rect.top + rect.bottom }
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
- if (this.#client === this._frameManager.client && this !== this._frameManager.mainFrame()) {
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
- if (session && frame.client !== this.#client) {
16676
+ const parentFrame = this.frame(parentFrameId);
16677
+ if (session && parentFrame && frame.client !== parentFrame?.client) {
16672
16678
  frame.updateClient(session);
16673
16679
  }
16674
16680
  return;