siesa-agents 2.1.4 → 2.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/README.md CHANGED
@@ -26,6 +26,7 @@ El paquete instala las siguientes carpetas en tu directorio actual:
26
26
  - **`.bmad-core/`** - Archivos principales del sistema BMAD
27
27
  - **`.vscode/`** - Configuración de Visual Studio Code
28
28
  - **`.github/`** - Configuración de GitHub Actions y workflows
29
+ - **`.claude/`** - Configuración de Claude Code Commands y workflows
29
30
 
30
31
  ## Características
31
32
 
@@ -81,4 +82,7 @@ MIT
81
82
 
82
83
  ## Autor
83
84
 
84
- SIESA - Sistemas de Información Empresarial
85
+ SIESA - Sistemas de Información Empresarial
86
+
87
+ ---
88
+ *Versión actualizada automáticamente por CI/CD*
package/bin/install.js CHANGED
@@ -13,6 +13,12 @@ class SiesaBmadInstaller {
13
13
  { source: 'github', target: '.github' },
14
14
  { source: 'claude', target: '.claude' }
15
15
  ];
16
+
17
+ // Lista de archivos que se preservan automáticamente (no se crean backups)
18
+ this.ignoredFiles = [
19
+ 'data/technical-preferences.md'
20
+ ];
21
+
16
22
  this.targetDir = process.cwd();
17
23
  // Intentar múltiples ubicaciones posibles para el paquete
18
24
  this.packageDir = this.findPackageDir();
@@ -123,7 +129,8 @@ class SiesaBmadInstaller {
123
129
  modifiedFiles.push({
124
130
  folder: mapping.target,
125
131
  file: relativePath,
126
- fullPath: targetFile
132
+ fullPath: targetFile,
133
+ is_ignored: this.ignoredFiles.includes(relativePath)
127
134
  });
128
135
  }
129
136
  } catch (error) {
@@ -135,7 +142,8 @@ class SiesaBmadInstaller {
135
142
  modifiedFiles.push({
136
143
  folder: mapping.target,
137
144
  file: relativePath,
138
- fullPath: targetFile
145
+ fullPath: targetFile,
146
+ is_ignored: this.ignoredFiles.includes(relativePath)
139
147
  });
140
148
  }
141
149
  }
@@ -206,6 +214,12 @@ class SiesaBmadInstaller {
206
214
  console.log('\n🔄 Creando backup de archivos modificados...');
207
215
 
208
216
  for (const item of modifiedFiles) {
217
+ // No crear backup de archivos ignorados
218
+ if (item.is_ignored) {
219
+ console.log(`✓ Preservando: ${item.file} (sin backup)`);
220
+ continue;
221
+ }
222
+
209
223
  const originalPath = item.fullPath;
210
224
  const backupPath = this.getBackupPath(originalPath);
211
225
 
@@ -270,10 +284,19 @@ class SiesaBmadInstaller {
270
284
  // Obtener todos los archivos backup existentes
271
285
  const backupFiles = await this.findBackupFiles(targetPath);
272
286
 
273
- // Copiar la carpeta completa sobrescribiendo
287
+ // Copiar la carpeta preservando technical-preferences.md
274
288
  await fs.copy(sourcePath, targetPath, {
275
289
  overwrite: true,
276
- recursive: true
290
+ recursive: true,
291
+ filter: (src) => {
292
+ const relativePath = path.relative(sourcePath, src);
293
+ // No sobrescribir archivos ignorados si ya existen
294
+ if (this.ignoredFiles.includes(relativePath)) {
295
+ const targetFile = path.join(targetPath, relativePath);
296
+ return !fs.existsSync(targetFile);
297
+ }
298
+ return true;
299
+ }
277
300
  });
278
301
 
279
302
  // Restaurar los archivos backup
@@ -328,7 +351,16 @@ class SiesaBmadInstaller {
328
351
  if (fs.existsSync(sourcePath)) {
329
352
  await fs.copy(sourcePath, targetPath, {
330
353
  overwrite: true,
331
- recursive: true
354
+ recursive: true,
355
+ filter: (src) => {
356
+ const relativePath = path.relative(sourcePath, src);
357
+ // No sobrescribir archivos ignorados si ya existen
358
+ if (this.ignoredFiles.includes(relativePath)) {
359
+ const targetFile = path.join(targetPath, relativePath);
360
+ return !fs.existsSync(targetFile);
361
+ }
362
+ return true;
363
+ }
332
364
  });
333
365
  } else {
334
366
  console.warn(`⚠️ Carpeta ${mapping.source} no encontrada en el paquete`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siesa-agents",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "description": "Paquete para instalar y configurar agentes SIESA en tu proyecto",
5
5
  "main": "index.js",
6
6
  "bin": {