@phpsandbox/sdk 0.3.3 → 0.3.4

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.
@@ -454,7 +454,9 @@ export class Beacon {
454
454
  * Let's wait for 2 seconds for page to finish rendering.
455
455
  * Errors, that might occur during this time will be captured.
456
456
  */
457
- waitSeconds && (await this.wait(waitSeconds));
457
+ if (waitSeconds) {
458
+ await this.wait(waitSeconds);
459
+ }
458
460
  // Now request debug capture from the beacon (without navigation)
459
461
  const timeoutMs = (request.options?.timeout || 30000) + 5000; // Add 5s buffer
460
462
  return this.sendAndWaitFor('debug', 'debugResult', request, timeoutMs);
@@ -488,7 +490,7 @@ export class Beacon {
488
490
  this.readyPromise = this.waitForBeaconReady();
489
491
  }
490
492
  }
491
- catch (error) {
493
+ catch {
492
494
  throw new BeaconConnectionError(`Invalid URL: ${url}`);
493
495
  }
494
496
  }
@@ -10,7 +10,6 @@ export class Navigator {
10
10
  this.currentIndex = 0;
11
11
  this._canGoBack = false;
12
12
  this._canGoForward = false;
13
- this.beacon = beacon;
14
13
  this.setupUrlChangeListener();
15
14
  this.urlHistory.push(beacon.iframe.src);
16
15
  this.updateNavigationState();
@@ -91,7 +91,7 @@ export interface ScreenshotRequest {
91
91
  maxWidth?: number;
92
92
  maxHeight?: number;
93
93
  };
94
- type?: 'image/png' | 'image/jpeg' | 'image/webp' | string;
94
+ type?: string;
95
95
  quality?: number;
96
96
  /**
97
97
  * Wait budget for page media/resources while rendering the DOM screenshot.