aiteam-x 0.9.4 → 0.9.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/cli.mjs +8 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiteam-x",
3
- "version": "0.9.4",
3
+ "version": "0.9.6",
4
4
  "description": "Painel pixel art para orquestrar agentes BMAD em tempo real",
5
5
  "keywords": [
6
6
  "bmad",
package/scripts/cli.mjs CHANGED
@@ -63,7 +63,11 @@ function mergePackageJson(templatePath, targetPath) {
63
63
  console.log(C.dim(" package.json mesclado (deps + scripts adicionados)"));
64
64
  }
65
65
 
66
- function copyMerge(src, dest) {
66
+ // Directories that are AITeam's internal code and should always be updated.
67
+ // User customizations live in components/, public/, bmad/, .memory/ — those are preserved.
68
+ const ALWAYS_UPDATE_DIRS = new Set(["lib", "app", "scripts"]);
69
+
70
+ function copyMerge(src, dest, forceOverwrite = false) {
67
71
  const entries = fs.readdirSync(src, { withFileTypes: true });
68
72
  for (const entry of entries) {
69
73
  if (entry.name === ".git") continue;
@@ -72,14 +76,15 @@ function copyMerge(src, dest) {
72
76
  const destPath = path.join(dest, entry.name);
73
77
  if (entry.isDirectory()) {
74
78
  fs.mkdirSync(destPath, { recursive: true });
75
- copyMerge(srcPath, destPath);
79
+ // Force overwrite inside AITeam's internal directories
80
+ copyMerge(srcPath, destPath, forceOverwrite || ALWAYS_UPDATE_DIRS.has(entry.name));
76
81
  } else if (entry.name === "package.json" && fs.existsSync(destPath)) {
77
82
  mergePackageJson(srcPath, destPath);
78
83
  } else if (entry.name === "tsconfig.json" && fs.existsSync(destPath)) {
79
84
  // Next.js requires its own tsconfig (path aliases @/* → ./*); always overwrite
80
85
  fs.copyFileSync(srcPath, destPath);
81
86
  console.log(C.dim(" tsconfig.json atualizado (necessário para o Next.js)"));
82
- } else if (!fs.existsSync(destPath)) {
87
+ } else if (forceOverwrite || !fs.existsSync(destPath)) {
83
88
  fs.copyFileSync(srcPath, destPath);
84
89
  }
85
90
  }