installer updates part 1
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user