@sulhadin/orchestrator 3.1.4 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +11 -1
- package/package.json +1 -1
- package/template/.claude-plugin/plugin.json +1 -1
package/bin/index.js
CHANGED
|
@@ -81,7 +81,7 @@ function copyDirRecursive(src, dest) {
|
|
|
81
81
|
copyDirRecursive(srcPath, destPath);
|
|
82
82
|
} else if (entry.isSymbolicLink()) {
|
|
83
83
|
const linkTarget = fs.readlinkSync(srcPath);
|
|
84
|
-
|
|
84
|
+
try { fs.unlinkSync(destPath); } catch {}
|
|
85
85
|
fs.symlinkSync(linkTarget, destPath);
|
|
86
86
|
} else {
|
|
87
87
|
fs.copyFileSync(srcPath, destPath);
|
|
@@ -314,6 +314,16 @@ function run() {
|
|
|
314
314
|
const isUpgrade = fs.existsSync(orchestraDest);
|
|
315
315
|
|
|
316
316
|
if (isUpgrade) {
|
|
317
|
+
// ── Clean stale backups from previous failed runs ──
|
|
318
|
+
for (const dir of ORCHESTRA_USER_DIRS) {
|
|
319
|
+
const stale = path.join(targetDir, ".orchestra-backup-" + dir);
|
|
320
|
+
if (fs.existsSync(stale)) rmDirRecursive(stale);
|
|
321
|
+
}
|
|
322
|
+
for (const dir of CLAUDE_USER_DIRS) {
|
|
323
|
+
const stale = path.join(targetDir, ".claude-backup-" + dir);
|
|
324
|
+
if (fs.existsSync(stale)) rmDirRecursive(stale);
|
|
325
|
+
}
|
|
326
|
+
|
|
317
327
|
// ── Backup user data ──
|
|
318
328
|
const backups = {};
|
|
319
329
|
|
package/package.json
CHANGED