bmad-fh 6.0.0-alpha.23.96db56c9 → 6.0.0-alpha.23.b9802f7d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/{publish-multi-artifact.yaml → publish.yaml} +19 -5
- package/.husky/post-checkout +12 -0
- package/.husky/pre-commit +17 -2
- package/.husky/pre-push +10 -0
- package/README.md +117 -14
- package/package.json +3 -3
- package/src/core/lib/scope/scope-manager.js +37 -4
- package/test/test-cli-arguments.js +686 -0
- package/test/test-scope-cli.js +1475 -0
- package/test/test-scope-e2e.js +618 -17
- package/test/test-scope-system.js +907 -97
- package/tools/bmad-npx-wrapper.js +12 -2
- package/tools/cli/bmad-cli.js +5 -0
- package/tools/cli/commands/scope.js +1178 -43
- package/tools/cli/installers/lib/modules/manager.js +4 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This file ensures proper execution when run via npx from GitHub or npm registry
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
const {
|
|
8
|
+
const { spawnSync } = require('node:child_process');
|
|
9
9
|
const path = require('node:path');
|
|
10
10
|
const fs = require('node:fs');
|
|
11
11
|
|
|
@@ -25,10 +25,20 @@ if (isNpxExecution) {
|
|
|
25
25
|
|
|
26
26
|
try {
|
|
27
27
|
// Execute CLI from user's working directory (process.cwd()), not npm cache
|
|
28
|
-
|
|
28
|
+
// Use spawnSync with array args to preserve argument boundaries
|
|
29
|
+
// (args.join(' ') would break arguments containing spaces)
|
|
30
|
+
const result = spawnSync('node', [bmadCliPath, ...args], {
|
|
29
31
|
stdio: 'inherit',
|
|
30
32
|
cwd: process.cwd(), // This preserves the user's working directory
|
|
31
33
|
});
|
|
34
|
+
|
|
35
|
+
if (result.error) {
|
|
36
|
+
throw result.error;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (result.status !== 0) {
|
|
40
|
+
process.exit(result.status || 1);
|
|
41
|
+
}
|
|
32
42
|
} catch (error) {
|
|
33
43
|
process.exit(error.status || 1);
|
|
34
44
|
}
|
package/tools/cli/bmad-cli.js
CHANGED
|
@@ -45,6 +45,11 @@ for (const [name, cmd] of Object.entries(commands)) {
|
|
|
45
45
|
command.option(...option);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
// Allow commands to configure themselves (e.g., custom help)
|
|
49
|
+
if (cmd.configureCommand) {
|
|
50
|
+
cmd.configureCommand(command);
|
|
51
|
+
}
|
|
52
|
+
|
|
48
53
|
// Set action
|
|
49
54
|
command.action(cmd.action);
|
|
50
55
|
}
|