fix: standardize on file extension .yaml instead of a mix of yml and yaml
This commit is contained in:
@@ -19,13 +19,13 @@ class Installer {
|
||||
async getCoreVersion() {
|
||||
const yaml = require("js-yaml");
|
||||
const fs = require("fs-extra");
|
||||
const coreConfigPath = path.join(__dirname, "../../../bmad-core/core-config.yml");
|
||||
const coreConfigPath = path.join(__dirname, "../../../bmad-core/core-config.yaml");
|
||||
try {
|
||||
const coreConfigContent = await fs.readFile(coreConfigPath, "utf8");
|
||||
const coreConfig = yaml.load(coreConfigContent);
|
||||
return coreConfig.version || "unknown";
|
||||
} catch (error) {
|
||||
console.warn("Could not read version from core-config.yml, using 'unknown'");
|
||||
console.warn("Could not read version from core-config.yaml, using 'unknown'");
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
@@ -185,7 +185,7 @@ class Installer {
|
||||
|
||||
// Check for V4 installation (has .bmad-core with manifest)
|
||||
const bmadCorePath = path.join(installDir, ".bmad-core");
|
||||
const manifestPath = path.join(bmadCorePath, "install-manifest.yml");
|
||||
const manifestPath = path.join(bmadCorePath, "install-manifest.yaml");
|
||||
|
||||
if (await fileManager.pathExists(manifestPath)) {
|
||||
state.type = "v4_existing";
|
||||
@@ -713,7 +713,7 @@ class Installer {
|
||||
|
||||
for (const file of filesToRestore) {
|
||||
// Skip the manifest file itself
|
||||
if (file.endsWith('install-manifest.yml')) continue;
|
||||
if (file.endsWith('install-manifest.yaml')) continue;
|
||||
|
||||
const relativePath = file.replace('.bmad-core/', '');
|
||||
const destPath = path.join(installDir, file);
|
||||
@@ -1009,7 +1009,7 @@ class Installer {
|
||||
|
||||
// Check if expansion pack already exists
|
||||
let expansionDotFolder = path.join(installDir, `.${packId}`);
|
||||
const existingManifestPath = path.join(expansionDotFolder, 'install-manifest.yml');
|
||||
const existingManifestPath = path.join(expansionDotFolder, 'install-manifest.yaml');
|
||||
|
||||
if (await fileManager.pathExists(existingManifestPath)) {
|
||||
spinner.stop();
|
||||
@@ -1151,12 +1151,12 @@ class Installer {
|
||||
}
|
||||
}
|
||||
|
||||
// Copy config.yml
|
||||
const configPath = path.join(expansionPackDir, 'config.yml');
|
||||
// Copy config.yaml
|
||||
const configPath = path.join(expansionPackDir, 'config.yaml');
|
||||
if (await fileManager.pathExists(configPath)) {
|
||||
const configDestPath = path.join(expansionDotFolder, 'config.yml');
|
||||
const configDestPath = path.join(expansionDotFolder, 'config.yaml');
|
||||
if (await fileManager.copyFile(configPath, configDestPath)) {
|
||||
installedFiles.push(path.join(`.${packId}`, 'config.yml'));
|
||||
installedFiles.push(path.join(`.${packId}`, 'config.yaml'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1268,7 +1268,7 @@ class Installer {
|
||||
const fs = require('fs').promises;
|
||||
|
||||
// Find all team files in the expansion pack
|
||||
const teamFiles = glob.sync('agent-teams/*.yml', {
|
||||
const teamFiles = glob.sync('agent-teams/*.yaml', {
|
||||
cwd: expansionDotFolder
|
||||
});
|
||||
|
||||
@@ -1330,7 +1330,7 @@ class Installer {
|
||||
const deps = dependencies[depType] || [];
|
||||
|
||||
for (const dep of deps) {
|
||||
const depFileName = dep.endsWith('.md') || dep.endsWith('.yml') ? dep : `${dep}.md`;
|
||||
const depFileName = dep.endsWith('.md') || dep.endsWith('.yaml') ? dep : `${dep}.md`;
|
||||
const expansionDepPath = path.join(expansionDotFolder, depType, depFileName);
|
||||
|
||||
// Check if dependency exists in expansion pack
|
||||
@@ -1360,7 +1360,7 @@ class Installer {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.warn(chalk.yellow(` Warning: Core agent ${agentId} not found for team ${path.basename(teamFile, '.yml')}`));
|
||||
console.warn(chalk.yellow(` Warning: Core agent ${agentId} not found for team ${path.basename(teamFile, '.yaml')}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1528,7 +1528,7 @@ class Installer {
|
||||
|
||||
if (stats) {
|
||||
// Check if it has a manifest
|
||||
const manifestPath = path.join(folderPath, "install-manifest.yml");
|
||||
const manifestPath = path.join(folderPath, "install-manifest.yaml");
|
||||
if (await fileManager.pathExists(manifestPath)) {
|
||||
const manifest = await fileManager.readExpansionPackManifest(installDir, folder.substring(1));
|
||||
if (manifest) {
|
||||
@@ -1539,8 +1539,8 @@ class Installer {
|
||||
};
|
||||
}
|
||||
} else {
|
||||
// Check if it has a config.yml (expansion pack without manifest)
|
||||
const configPath = path.join(folderPath, "config.yml");
|
||||
// Check if it has a config.yaml (expansion pack without manifest)
|
||||
const configPath = path.join(folderPath, "config.yaml");
|
||||
if (await fileManager.pathExists(configPath)) {
|
||||
expansionPacks[folder.substring(1)] = {
|
||||
path: folderPath,
|
||||
@@ -1579,7 +1579,7 @@ class Installer {
|
||||
|
||||
for (const file of filesToRestore) {
|
||||
// Skip the manifest file itself
|
||||
if (file.endsWith('install-manifest.yml')) continue;
|
||||
if (file.endsWith('install-manifest.yaml')) continue;
|
||||
|
||||
const relativePath = file.replace(`.${packId}/`, '');
|
||||
const sourcePath = path.join(pack.packPath, relativePath);
|
||||
@@ -1645,7 +1645,7 @@ class Installer {
|
||||
|
||||
while (currentDir !== path.dirname(currentDir)) {
|
||||
const bmadDir = path.join(currentDir, ".bmad-core");
|
||||
const manifestPath = path.join(bmadDir, "install-manifest.yml");
|
||||
const manifestPath = path.join(bmadDir, "install-manifest.yaml");
|
||||
|
||||
if (await fileManager.pathExists(manifestPath)) {
|
||||
return bmadDir;
|
||||
@@ -1656,7 +1656,7 @@ class Installer {
|
||||
|
||||
// Also check if we're inside a .bmad-core directory
|
||||
if (path.basename(process.cwd()) === ".bmad-core") {
|
||||
const manifestPath = path.join(process.cwd(), "install-manifest.yml");
|
||||
const manifestPath = path.join(process.cwd(), "install-manifest.yaml");
|
||||
if (await fileManager.pathExists(manifestPath)) {
|
||||
return process.cwd();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user