refactor: update file paths to remove leading dot from bmad-core references

This commit is contained in:
manjaroblack
2025-08-18 09:46:16 -05:00
parent aa9777a06e
commit ed7291f2ce
41 changed files with 901 additions and 909 deletions

View File

@@ -29,7 +29,7 @@ class V3ToV4Upgrader {
console.log('This tool will help you upgrade your BMad-Method V3 project to V4.\n');
console.log(chalk.cyan('What this tool does:'));
console.log('- Creates a backup of your V3 files (.bmad-v3-backup/)');
console.log('- Installs the new V4 .bmad-core structure');
console.log('- Installs the new V4 bmad-core structure');
console.log('- Preserves your PRD, Architecture, and Stories in the new format\n');
console.log(chalk.yellow('What this tool does NOT do:'));
console.log('- Modify your document content (use doc-migration-task after upgrade)');
@@ -336,12 +336,12 @@ class V3ToV4Upgrader {
try {
// Get the source bmad-core directory (without dot prefix)
const sourcePath = path.join(__dirname, '..', '..', 'bmad-core');
const destinationPath = path.join(projectPath, '.bmad-core');
const destinationPath = path.join(projectPath, 'bmad-core');
// Copy .bmad-core
// Copy bmad-core
await this.copyDirectory(sourcePath, destinationPath);
spinner.text = '✓ Copied fresh .bmad-core/ directory from V4';
console.log(chalk.green('\n✓ Copied fresh .bmad-core/ directory from V4'));
spinner.text = '✓ Copied fresh bmad-core/ directory from V4';
console.log(chalk.green('\n✓ Copied fresh bmad-core/ directory from V4'));
// Create docs directory
const docsPath = path.join(projectPath, 'docs');
@@ -516,7 +516,7 @@ class V3ToV4Upgrader {
console.log(chalk.bold.green('\n✓ Upgrade Complete!\n'));
console.log(chalk.bold('Summary:'));
console.log(`- V3 files backed up to: .bmad-v3-backup/`);
console.log(`- V4 structure installed: .bmad-core/ (fresh from V4)`);
console.log(`- V4 structure installed: bmad-core/ (fresh from V4)`);
const totalDocs =
(analysis.prdFile ? 1 : 0) +
@@ -648,16 +648,16 @@ class V3ToV4Upgrader {
const fileManager = require('../installer/lib/file-manager');
const { glob } = require('glob');
// Get all files in .bmad-core for the manifest
const bmadCorePath = path.join(projectPath, '.bmad-core');
// Get all files in bmad-core for the manifest
const bmadCorePath = path.join(projectPath, 'bmad-core');
const files = await glob('**/*', {
cwd: bmadCorePath,
nodir: true,
ignore: ['**/.git/**', '**/node_modules/**'],
});
// Prepend .bmad-core/ to file paths for manifest
const manifestFiles = files.map((file) => path.join('.bmad-core', file));
// Prepend bmad-core/ to file paths for manifest
const manifestFiles = files.map((file) => path.join('bmad-core', file));
const config = {
installType: 'full',