installer updates part 1

This commit is contained in:
Brian Madison
2025-06-27 23:38:34 -05:00
parent 6cdecec61f
commit 1ea367619a
38 changed files with 569 additions and 2332 deletions

View File

@@ -6,6 +6,7 @@ class DependencyResolver {
constructor(rootDir) {
this.rootDir = rootDir;
this.bmadCore = path.join(rootDir, 'bmad-core');
this.common = path.join(rootDir, 'common');
this.cache = new Map();
}
@@ -123,6 +124,7 @@ class DependencyResolver {
let content = null;
let filePath = null;
// First try bmad-core
for (const ext of extensions) {
try {
filePath = path.join(this.bmadCore, type, `${id}${ext}`);
@@ -132,6 +134,19 @@ class DependencyResolver {
// Try next extension
}
}
// If not found in bmad-core, try common folder
if (!content) {
for (const ext of extensions) {
try {
filePath = path.join(this.common, type, `${id}${ext}`);
content = await fs.readFile(filePath, 'utf8');
break;
} catch (e) {
// Try next extension
}
}
}
if (!content) {
console.warn(`Resource not found: ${type}/${id}`);