feat: enhance Vercel deployment process with framework detection and source file handling

- Implemented a function to detect project frameworks based on package.json and configuration files.
- Added support for including source files in the deployment request for frameworks that require building.
- Updated the action function to handle framework detection and adjust deployment configuration accordingly.
- Removed unnecessary console logs and improved error handling for file reading operations.
This commit is contained in:
xKevIsDev
2025-07-08 01:20:58 +01:00
parent ac9fba59f6
commit b5d17f2d7e
3 changed files with 299 additions and 27 deletions

View File

@@ -435,18 +435,15 @@ export class ActionRunner {
try {
await webcontainer.fs.readdir(dirPath);
buildDir = dirPath;
logger.debug(`Found build directory: ${buildDir}`);
break;
} catch (error) {
// Directory doesn't exist, try the next one
logger.debug(`Build directory ${dir} not found, trying next option. ${error}`);
} catch {
continue;
}
}
// If no build directory was found, use the default (dist)
if (!buildDir) {
buildDir = nodePath.join(webcontainer.workdir, 'dist');
logger.debug(`No build directory found, defaulting to: ${buildDir}`);
}
return {