@sulhadin/orchestrator 3.1.3 → 3.1.4
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 +13 -6
- package/package.json +1 -1
- package/template/.claude-plugin/plugin.json +1 -1
package/bin/index.js
CHANGED
|
@@ -231,7 +231,8 @@ function extractOrchestraSection(content) {
|
|
|
231
231
|
/**
|
|
232
232
|
* Smart merge for user directories (skills, rules, blueprints):
|
|
233
233
|
* - entries present in template = system files → always updated from template
|
|
234
|
-
* -
|
|
234
|
+
* - .orchestra.md files = legacy system files → skip (backward compat)
|
|
235
|
+
* - remaining entries = user files → preserved
|
|
235
236
|
*/
|
|
236
237
|
function smartMergeDir(backupPath, restorePath, templateDirPath) {
|
|
237
238
|
const templateFiles = fs.existsSync(templateDirPath)
|
|
@@ -241,16 +242,22 @@ function smartMergeDir(backupPath, restorePath, templateDirPath) {
|
|
|
241
242
|
let restored = 0;
|
|
242
243
|
|
|
243
244
|
for (const file of backupFiles) {
|
|
244
|
-
//
|
|
245
|
-
if (
|
|
246
|
-
|
|
245
|
+
// Skip system entries: in template OR legacy .orchestra.md files
|
|
246
|
+
if (templateFiles.includes(file) || file.endsWith(".orchestra.md")) continue;
|
|
247
|
+
|
|
248
|
+
const srcFile = path.join(backupPath, file);
|
|
249
|
+
try {
|
|
250
|
+
const stat = fs.lstatSync(srcFile);
|
|
247
251
|
const destFile = path.join(restorePath, file);
|
|
248
|
-
if (
|
|
252
|
+
if (stat.isDirectory()) {
|
|
249
253
|
copyDirRecursive(srcFile, destFile);
|
|
250
|
-
} else {
|
|
254
|
+
} else if (stat.isFile()) {
|
|
251
255
|
fs.copyFileSync(srcFile, destFile);
|
|
252
256
|
}
|
|
257
|
+
// Skip broken symlinks and other non-regular entries
|
|
253
258
|
restored++;
|
|
259
|
+
} catch {
|
|
260
|
+
// Entry inaccessible — skip silently
|
|
254
261
|
}
|
|
255
262
|
}
|
|
256
263
|
|
package/package.json
CHANGED