fix(create-story): update converted workflow path refs
This commit is contained in:
parent
63842b47e6
commit
234ae70ae0
|
|
@ -47,7 +47,7 @@ const INSTALL_REGEX = /\{project-root\}\/(?:_bmad)\/([^/]+)\/workflows\/(.+)/;
|
|||
// ---------------------------------------------------------------------------
|
||||
// Test data
|
||||
// ---------------------------------------------------------------------------
|
||||
const sourcePath = '{project-root}/_bmad/bmm/workflows/4-implementation/create-story/workflow.md';
|
||||
const sourcePath = '{project-root}/_bmad/bmm/workflows/4-implementation/bmad-create-story/workflow.md';
|
||||
const installPath = '{project-root}/_bmad/bmgd/workflows/4-production/create-story/workflow.md';
|
||||
|
||||
console.log(`\n${colors.cyan}Workflow Path Regex Tests${colors.reset}\n`);
|
||||
|
|
@ -63,9 +63,9 @@ assert(
|
|||
`Expected "bmm", got "${sourceMatch && sourceMatch[1]}"`,
|
||||
);
|
||||
assert(
|
||||
sourceMatch && sourceMatch[2] === '4-implementation/create-story/workflow.md',
|
||||
sourceMatch && sourceMatch[2] === '4-implementation/bmad-create-story/workflow.md',
|
||||
'Source regex group [2] is the workflow sub-path',
|
||||
`Expected "4-implementation/create-story/workflow.md", got "${sourceMatch && sourceMatch[2]}"`,
|
||||
`Expected "4-implementation/bmad-create-story/workflow.md", got "${sourceMatch && sourceMatch[2]}"`,
|
||||
);
|
||||
|
||||
// --- Install regex tests (group [2] returns module name, not sub-path) ---
|
||||
|
|
|
|||
|
|
@ -1077,7 +1077,7 @@ class ModuleManager {
|
|||
const installWorkflowPath = item['workflow-install']; // Where to copy TO
|
||||
|
||||
// Parse SOURCE workflow path
|
||||
// Example: {project-root}/_bmad/bmm/workflows/4-implementation/create-story/workflow.md
|
||||
// Example: {project-root}/_bmad/bmm/workflows/4-implementation/bmad-create-story/workflow.md
|
||||
const sourceMatch = sourceWorkflowPath.match(/\{project-root\}\/(?:_bmad)\/([^/]+)\/workflows\/(.+)/);
|
||||
if (!sourceMatch) {
|
||||
await prompts.log.warn(` Could not parse workflow path: ${sourceWorkflowPath}`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue