From d83a93da7ee9fd7f7f3f2b6c3b24abb8cf27ddb0 Mon Sep 17 00:00:00 2001 From: DeNNiiInc Date: Sun, 28 Dec 2025 00:00:32 +1100 Subject: [PATCH] Cleanup debug scripts --- debug-all-imports.mjs | 26 -------------------------- debug-chrome.js | 26 -------------------------- debug-chrome.mjs | 25 ------------------------- debug-import-lighthouse.mjs | 17 ----------------- debug-import.mjs | 26 -------------------------- 5 files changed, 120 deletions(-) delete mode 100644 debug-all-imports.mjs delete mode 100644 debug-chrome.js delete mode 100644 debug-chrome.mjs delete mode 100644 debug-import-lighthouse.mjs delete mode 100644 debug-import.mjs diff --git a/debug-all-imports.mjs b/debug-all-imports.mjs deleted file mode 100644 index 82dad7b..0000000 --- a/debug-all-imports.mjs +++ /dev/null @@ -1,26 +0,0 @@ -(async () => { - console.log('--- DEBUG IMPORTS ---'); - - try { - console.log('Importing check: lighthouse'); - const lighthouse = await import('lighthouse'); - console.log('Lighthouse keys:', Object.keys(lighthouse)); - console.log('Lighthouse Default type:', typeof lighthouse.default); - - console.log('Importing check: chrome-launcher'); - const chromeLauncher = await import('chrome-launcher'); - console.log('ChromeLauncher keys:', Object.keys(chromeLauncher)); - console.log('ChromeLauncher Default type:', typeof chromeLauncher.default); - console.log('ChromeLauncher Launch type:', typeof chromeLauncher.launch); - - console.log('Importing check: uuid'); - const uuid = await import('uuid'); - console.log('UUID keys:', Object.keys(uuid)); - console.log('UUID v4 type:', typeof uuid.v4); - console.log('UUID default type:', typeof uuid.default); - - } catch (e) { - console.error('CRITICAL IMPORT FAILURE:', e); - } - console.log('--- END DEBUG ---'); -})(); diff --git a/debug-chrome.js b/debug-chrome.js deleted file mode 100644 index be809f7..0000000 --- a/debug-chrome.js +++ /dev/null @@ -1,26 +0,0 @@ -const chromeLauncher = require('chrome-launcher'); - -(async () => { - console.log('Attempting to launch Chrome directly...'); - const chromePath = '/usr/bin/chromium'; - console.log(`Using path: ${chromePath}`); - - try { - const chrome = await chromeLauncher.launch({ - chromeFlags: ['--headless', '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'], - chromePath: chromePath - }); - console.log('SUCCESS: Chrome launched!'); - console.log('Port:', chrome.port); - console.log('PID:', chrome.pid); - - setTimeout(async () => { - await chrome.kill(); - console.log('Chrome killed. Exiting.'); - }, 2000); - } catch (e) { - console.error('FAILURE: Chrome failed to launch.'); - console.error(e); - console.error(JSON.stringify(e, null, 2)); - } -})(); diff --git a/debug-chrome.mjs b/debug-chrome.mjs deleted file mode 100644 index 23c6809..0000000 --- a/debug-chrome.mjs +++ /dev/null @@ -1,25 +0,0 @@ -import * as chromeLauncher from 'chrome-launcher'; - -(async () => { - console.log('Attempting to launch Chrome directly (ESM)...'); - const chromePath = '/usr/bin/chromium'; - console.log(`Using path: ${chromePath}`); - - try { - const chrome = await chromeLauncher.launch({ - chromeFlags: ['--headless', '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'], - chromePath: chromePath - }); - console.log('SUCCESS: Chrome launched!'); - console.log('Port:', chrome.port); - console.log('PID:', chrome.pid); - - setTimeout(async () => { - await chrome.kill(); - console.log('Chrome killed. Exiting.'); - }, 2000); - } catch (e) { - console.error('FAILURE: Chrome failed to launch.'); - console.error(e); - } -})(); diff --git a/debug-import-lighthouse.mjs b/debug-import-lighthouse.mjs deleted file mode 100644 index b298f66..0000000 --- a/debug-import-lighthouse.mjs +++ /dev/null @@ -1,17 +0,0 @@ -(async () => { - console.log('Checking lighthouse exports...'); - try { - const imported = await import('lighthouse'); - console.log('Import Keys:', Object.keys(imported)); - - if (imported.default) { - console.log('Default export exists.'); - console.log('Verifying default is function:', typeof imported.default); - } else { - console.log('Default export is undefined.'); - } - - } catch (e) { - console.error('Import failed:', e); - } -})(); diff --git a/debug-import.mjs b/debug-import.mjs deleted file mode 100644 index 0bbe7d0..0000000 --- a/debug-import.mjs +++ /dev/null @@ -1,26 +0,0 @@ -(async () => { - console.log('Checking chrome-launcher exports...'); - try { - const imported = await import('chrome-launcher'); - console.log('Import Keys:', Object.keys(imported)); - - if (imported.default) { - console.log('Default export exists.'); - console.log('Default keys:', Object.keys(imported.default)); - if (typeof imported.default.launch === 'function') { - console.log('VERDICT: imported.default.launch is a function. (OK for Default Import)'); - } else { - console.log('VERDICT: imported.default.launch is NOT a function.'); - } - } else { - console.log('Default export is undefined.'); - } - - if (typeof imported.launch === 'function') { - console.log('VERDICT: imported.launch is a function. (Use Named Import)'); - } - - } catch (e) { - console.error('Import failed:', e); - } -})();