Enhancement Web add sync Skills & fix START_APP.bat

This commit is contained in:
Zied
2026-03-02 09:17:15 +01:00
parent c9a76a2d94
commit 107d03b0f8
3319 changed files with 327124 additions and 4979 deletions

View File

@@ -28,21 +28,16 @@ const destSkills = path.join(WEB_APP_PUBLIC, 'skills');
console.log(`Copying skills directory...`);
// Recursive copy function (follows symlinks to copy resolved content)
// Recursive copy function
function copyFolderSync(from, to) {
if (!fs.existsSync(to)) fs.mkdirSync(to, { recursive: true });
if (!fs.existsSync(to)) fs.mkdirSync(to);
fs.readdirSync(from).forEach(element => {
const srcPath = path.join(from, element);
const destPath = path.join(to, element);
const stat = fs.statSync(srcPath); // statSync follows symlinks
if (stat.isFile()) {
fs.copyFileSync(srcPath, destPath);
} else if (stat.isDirectory()) {
copyFolderSync(srcPath, destPath);
if (fs.lstatSync(path.join(from, element)).isFile()) {
fs.copyFileSync(path.join(from, element), path.join(to, element));
} else {
copyFolderSync(path.join(from, element), path.join(to, element));
}
// Skip other types (e.g. sockets, FIFOs)
});
}