create-sdd-project 0.9.3 → 0.9.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/lib/upgrade-generator.js +7 -2
- package/package.json +1 -1
package/lib/upgrade-generator.js
CHANGED
|
@@ -239,10 +239,15 @@ function generateUpgrade(config) {
|
|
|
239
239
|
const srcSub = path.join(templateToolDir, sub);
|
|
240
240
|
const destSub = path.join(base, sub);
|
|
241
241
|
if (fs.existsSync(srcSub)) {
|
|
242
|
-
// For .claude/commands, merge
|
|
242
|
+
// For .claude/commands, merge: copy new template files without overwriting user's custom commands
|
|
243
243
|
if (dir === '.claude' && sub === 'commands') {
|
|
244
|
-
// Just ensure directory exists — template only has .gitkeep
|
|
245
244
|
fs.mkdirSync(destSub, { recursive: true });
|
|
245
|
+
for (const file of fs.readdirSync(srcSub)) {
|
|
246
|
+
const destFile = path.join(destSub, file);
|
|
247
|
+
if (!fs.existsSync(destFile)) {
|
|
248
|
+
fs.cpSync(path.join(srcSub, file), destFile);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
246
251
|
} else {
|
|
247
252
|
fs.cpSync(srcSub, destSub, { recursive: true });
|
|
248
253
|
}
|