- Built superior-screenshot-service.ts with proven parallel technique - Created superior-screenshot API with 100% tested scalp preset - Added test scripts demonstrating parallel efficiency (114s for 14 screenshots) - Includes backwards compatibility and legacy support - Ready to replace current screenshot system once API is restored Features: - Scalp preset: 7 timeframes (1m-4h) in parallel - Extended preset: All timeframes available - Single timeframe quick capture - 100% success rate demonstrated - API-managed browser sessions (no cleanup needed) - Drop-in replacement for existing enhancedScreenshotService
46 lines
1.4 KiB
JavaScript
46 lines
1.4 KiB
JavaScript
const fs = require('fs');
|
|
|
|
// Simple test to see if components load properly
|
|
try {
|
|
// Check if StatusOverview component exists and can be imported
|
|
const statusOverviewPath = './components/StatusOverview.js';
|
|
if (fs.existsSync(statusOverviewPath)) {
|
|
console.log('✅ StatusOverview.js exists');
|
|
const content = fs.readFileSync(statusOverviewPath, 'utf8');
|
|
|
|
// Check for potential runtime issues
|
|
if (content.includes('useEffect')) {
|
|
console.log('✅ Component uses useEffect');
|
|
}
|
|
if (content.includes('useState')) {
|
|
console.log('✅ Component uses useState');
|
|
}
|
|
if (content.includes('fetch(')) {
|
|
console.log('✅ Component makes fetch calls');
|
|
|
|
// Extract API endpoints being called
|
|
const fetchCalls = content.match(/fetch\(['"`]([^'"`]+)['"`]\)/g);
|
|
if (fetchCalls) {
|
|
console.log('📡 API endpoints called:');
|
|
fetchCalls.forEach(call => {
|
|
const endpoint = call.match(/['"`]([^'"`]+)['"`]/)[1];
|
|
console.log(` - ${endpoint}`);
|
|
});
|
|
}
|
|
}
|
|
} else {
|
|
console.log('❌ StatusOverview.js not found');
|
|
}
|
|
|
|
// Check page.js
|
|
const pagePath = './app/page.js';
|
|
if (fs.existsSync(pagePath)) {
|
|
console.log('✅ page.js exists');
|
|
} else {
|
|
console.log('❌ page.js not found');
|
|
}
|
|
|
|
} catch (error) {
|
|
console.error('Debug error:', error.message);
|
|
}
|