From 63ea23f334d1d128fc0fd3c15e91c266612f2524 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 18 Apr 2025 07:57:21 -0400 Subject: [PATCH] [mv3] Minor change to build script --- platform/mv3/make-rulesets.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/mv3/make-rulesets.js b/platform/mv3/make-rulesets.js index 3c2005269..6c48ed5f7 100644 --- a/platform/mv3/make-rulesets.js +++ b/platform/mv3/make-rulesets.js @@ -107,7 +107,7 @@ console.log = log; const logProgress = text => { process?.stdout?.clearLine?.(); process?.stdout?.cursorTo?.(0); - process?.stdout?.write?.(text); + process?.stdout?.write?.(text.length > 120 ? `${text.slice(0, 119)}…` : text); }; /******************************************************************************/ @@ -120,12 +120,13 @@ const urlToFileName = url => { const fetchText = (url, cacheDir) => { return new Promise((resolve, reject) => { - logProgress(`Fetching ${url}`); + logProgress(`Reading locally cached ${url}`); const fname = urlToFileName(url); fs.readFile(`${cacheDir}/${fname}`, { encoding: 'utf8' }).then(content => { log(`\tFetched local ${url}`); resolve({ url, content }); }).catch(( ) => { + logProgress(`Fetching remote ${url}`); log(`\tFetching remote ${url}`); https.get(url, response => { const data = [];