From f3bd4adb6eed3a419ce4ebc27dae9940176c66f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Rame=CC=81?= Date: Sun, 17 Mar 2024 18:07:16 +0100 Subject: [PATCH] fix(wappalyzer): make a difference between the "maxWait" for puppeteer and the one to observe wappalyzer promises that can be slowed down due to concurrency (we increase the first one) --- patches/wappalyzer+6.10.66.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/patches/wappalyzer+6.10.66.patch b/patches/wappalyzer+6.10.66.patch index b5cb37f..67a9d72 100644 --- a/patches/wappalyzer+6.10.66.patch +++ b/patches/wappalyzer+6.10.66.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/wappalyzer/driver.js b/node_modules/wappalyzer/driver.js -index abfbcad..0329564 100644 +index abfbcad..2823d30 100644 --- a/node_modules/wappalyzer/driver.js +++ b/node_modules/wappalyzer/driver.js @@ -16,7 +16,7 @@ const chromiumArgs = CHROMIUM_ARGS @@ -56,15 +56,15 @@ index abfbcad..0329564 100644 ignoreHTTPSErrors: true, acceptInsecureCerts: true, args: chromiumArgs, -@@ -776,7 +807,7 @@ class Site { - } - - // HTML -- let html = await this.promiseTimeout(page.content(), '', 'Timeout (html)') -+ let html = await this.promiseTimeout(page.content(), '', 'Timeout (html)', 4 * this.options.maxWait) +@@ -543,7 +574,7 @@ class Site { + errorMessage = 'Operation took too long to complete', + maxWait = this.options.fast + ? Math.min(this.options.maxWait, 2000) +- : this.options.maxWait ++ : (4 * this.options.maxWait) // Increasing the default timeout since async processes in JavaScript will take longer than usual since we use concurrency (the real `maxWait` is only meaningful when talking to Puppeteer) + ) { + let timeout = null - if (this.options.htmlMaxCols && this.options.htmlMaxRows) { - const batches = [] @@ -1088,21 +1119,26 @@ class Site { let page