super-pancake-automation
Version:
A lightweight DOM-based UI automation framework using Chrome DevTools Protocol
45 lines (37 loc) ⢠1.44 kB
JavaScript
import path from 'path';
import fs from 'fs';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const packageRoot = path.join(__dirname, '..');
console.log('š Super Pancake Installation Check');
console.log('=====================================');
console.log(`š¦ Package root: ${packageRoot}`);
console.log(`š Current working directory: ${process.cwd()}`);
console.log(`š„ļø Platform: ${process.platform}`);
console.log(`š Script location: ${__dirname}`);
const requiredFiles = [
'public/index.html',
'public/styles.css',
'public/app.js',
'scripts/test-ui.js'
];
console.log('\nš Checking required files:');
let allFilesExist = true;
for (const file of requiredFiles) {
const filePath = path.join(packageRoot, file);
const exists = fs.existsSync(filePath);
const status = exists ? 'ā
' : 'ā';
console.log(`${status} ${file} ā ${filePath}`);
if (!exists) {allFilesExist = false;}
}
console.log('\nšÆ Status:', allFilesExist ? 'ā
Installation OK' : 'ā Missing files');
if (allFilesExist) {
console.log('\nš You can now run:');
console.log(' npx super-pancake-ui - Full test runner');
console.log(' npx super-pancake-server - Simple UI server');
} else {
console.log('\nš§ Please reinstall the package or check installation');
}