embedia
Version:
Zero-configuration AI chatbot integration CLI - direct file copy with embedded API keys
31 lines (26 loc) • 751 B
JavaScript
/**
* Simplified Environment Detection
* Basic project detection without complex contracts
*/
function detectBasicProjectInfo(projectPath) {
// Simple detection - just check if it's a Next.js project
const fs = require('fs-extra');
const path = require('path');
const packageJsonPath = path.join(projectPath, 'package.json');
try {
const packageJson = fs.readJsonSync(packageJsonPath);
const isNextJS = packageJson.dependencies?.next || packageJson.devDependencies?.next;
return {
framework: isNextJS ? 'nextjs' : 'unknown',
hasPackageJson: true
};
} catch (error) {
return {
framework: 'unknown',
hasPackageJson: false
};
}
}
module.exports = {
detectBasicProjectInfo
};