@purepageio/fetch-engines 0.2.6 → 0.2.8

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/dist/index.cjs CHANGED
@@ -795,21 +795,6 @@ var import_playwright = require("playwright");
795
795
  var import_user_agents = __toESM(require("user-agents"), 1);
796
796
  var import_uuid = require("uuid");
797
797
  var import_p_queue = __toESM(require("p-queue"), 1);
798
- var import_playwright_extra = require("playwright-extra");
799
- var chromiumWithExtras;
800
- var StealthPluginInstance;
801
- async function loadDependencies() {
802
- if (!chromiumWithExtras) {
803
- chromiumWithExtras = (0, import_playwright_extra.addExtra)(import_playwright.chromium);
804
- const StealthPluginModule = await import("puppeteer-extra-plugin-stealth");
805
- const stealthPluginFactory = typeof StealthPluginModule.default === "function" ? StealthPluginModule.default : StealthPluginModule;
806
- if (typeof stealthPluginFactory !== "function") {
807
- throw new Error("puppeteer-extra-plugin-stealth export is not a function or module structure is unexpected.");
808
- }
809
- StealthPluginInstance = stealthPluginFactory();
810
- chromiumWithExtras.use(StealthPluginInstance);
811
- }
812
- }
813
798
  var PlaywrightBrowserPool = class _PlaywrightBrowserPool {
814
799
  pool = /* @__PURE__ */ new Set();
815
800
  maxBrowsers;
@@ -861,7 +846,6 @@ var PlaywrightBrowserPool = class _PlaywrightBrowserPool {
861
846
  this.proxyConfig = config.proxy;
862
847
  }
863
848
  async initialize() {
864
- await loadDependencies();
865
849
  if (this.isCleaningUp) return;
866
850
  await this.ensureMinimumInstances();
867
851
  this.scheduleHealthCheck();
@@ -889,7 +873,6 @@ var PlaywrightBrowserPool = class _PlaywrightBrowserPool {
889
873
  }
890
874
  }
891
875
  async createBrowserInstance() {
892
- await loadDependencies();
893
876
  const id = (0, import_uuid.v4)();
894
877
  const launchOptions = {
895
878
  headless: !this.useHeadedMode,
@@ -906,7 +889,7 @@ var PlaywrightBrowserPool = class _PlaywrightBrowserPool {
906
889
  ],
907
890
  proxy: this.proxyConfig
908
891
  };
909
- const browser = await chromiumWithExtras.launch(launchOptions);
892
+ const browser = await import_playwright.chromium.launch(launchOptions);
910
893
  const context = await browser.newContext({
911
894
  userAgent: new import_user_agents.default().toString(),
912
895
  viewport: {