bmad-method 7.0.0 → 7.1.0
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/messages.yaml +13 -6
- package/package.json +1 -1
- package/src/commands/ending.js +13 -1
- package/src/commands/install.js +1 -1
- package/src/run.js +4 -0
package/messages.yaml
CHANGED
|
@@ -230,12 +230,19 @@ repeatInstall: |-
|
|
|
230
230
|
|
|
231
231
|
thanks: |-
|
|
232
232
|
Thanks for installing BMad.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
Join Discord
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
233
|
+
Blog & newsletter https://blog.bmadcode.com
|
|
234
|
+
YouTube tutorials https://www.youtube.com/@BMadCode
|
|
235
|
+
Join Discord https://discord.gg/gk8jAdXWmj
|
|
236
|
+
Training & consulting https://bmadcode.com/#contact
|
|
237
|
+
contact@bmadcode.com
|
|
238
|
+
Buy a coffee https://buymeacoffee.com/bmad
|
|
239
|
+
|
|
240
|
+
starPrompt: "BMad is 100% free & open source — help others find it with a GitHub star?"
|
|
241
|
+
|
|
242
|
+
starThanks: |-
|
|
243
|
+
Thank you! It only takes 5 seconds:
|
|
244
|
+
1. Open: https://github.com/bmad-code-org/BMAD-METHOD
|
|
245
|
+
2. Click the Star button in the top-right corner.
|
|
239
246
|
|
|
240
247
|
cancelled: "Cancelled. Anything already installed is still there."
|
|
241
248
|
|
package/package.json
CHANGED
package/src/commands/ending.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { UNIVERSAL_AGENT } from '../agents.js'
|
|
2
|
+
import { SETUP_NEXT } from '../bmad-scripts.js'
|
|
2
3
|
import { message } from '../messages.js'
|
|
3
4
|
import { nodeFailureHint } from '../preflight.js'
|
|
5
|
+
import { Cancelled } from '../prompts.js'
|
|
4
6
|
import { problemLines, renderMigrations, renderSummary } from '../report.js'
|
|
5
7
|
import { selectMigrations, versionsByCode } from './install-plan.js'
|
|
6
8
|
|
|
@@ -13,7 +15,7 @@ import { selectMigrations, versionsByCode } from './install-plan.js'
|
|
|
13
15
|
* wrong if anything, the summary, the commands people reuse, and the links. `before` holds the
|
|
14
16
|
* module versions from before the run.
|
|
15
17
|
* @param {CommandDeps} deps
|
|
16
|
-
* @param {{ report: StatusReport | null, bmadSkillDir: string, before: Record<string, string>, failures: AddResult[], directory: string, agents?: string[], repeat?: string, updated?: boolean, fallbackModules?: string[] }} run
|
|
18
|
+
* @param {{ report: StatusReport | null, bmadSkillDir: string, before: Record<string, string>, failures: AddResult[], directory: string, agents?: string[], repeat?: string, updated?: boolean, fallbackModules?: string[], interactive?: boolean }} run
|
|
17
19
|
*/
|
|
18
20
|
export async function endRun(deps, run) {
|
|
19
21
|
const { bmadScripts, messages, modules, prompts } = deps
|
|
@@ -50,5 +52,15 @@ export async function endRun(deps, run) {
|
|
|
50
52
|
prompts.plain(commands.join('\n'))
|
|
51
53
|
}
|
|
52
54
|
prompts.plain(message(messages, 'thanks'))
|
|
55
|
+
const installSucceeded = run.failures.length === 0 && (!run.report || run.report.current || run.report.next === SETUP_NEXT)
|
|
56
|
+
if (run.interactive && !run.updated && installSucceeded) {
|
|
57
|
+
try {
|
|
58
|
+
if (await prompts.confirm(message(messages, 'starPrompt'), false)) {
|
|
59
|
+
prompts.plain(message(messages, 'starThanks'))
|
|
60
|
+
}
|
|
61
|
+
} catch (error) {
|
|
62
|
+
if (!(error instanceof Cancelled)) throw error
|
|
63
|
+
}
|
|
64
|
+
}
|
|
53
65
|
prompts.finish('')
|
|
54
66
|
}
|
package/src/commands/install.js
CHANGED
|
@@ -81,6 +81,6 @@ export async function install(options, deps) {
|
|
|
81
81
|
...installedModuleCodes({ skills, bmadSkillDir, legacyManifest: false }, modules),
|
|
82
82
|
...chosen.filter((module) => module.custom).map((module) => module.code),
|
|
83
83
|
])]
|
|
84
|
-
await endRun(deps, { report, bmadSkillDir, before: existing.versions, failures, directory, agents, repeat: repeatCommand(chosen, agents), fallbackModules })
|
|
84
|
+
await endRun(deps, { report, bmadSkillDir, before: existing.versions, failures, directory, agents, repeat: repeatCommand(chosen, agents), fallbackModules, interactive })
|
|
85
85
|
return failures.length === 0 && (!report || report.current || report.next === SETUP_NEXT) ? 0 : 1
|
|
86
86
|
}
|
package/src/run.js
CHANGED
|
@@ -71,11 +71,15 @@ function spawnAndWait(request) {
|
|
|
71
71
|
}, timeoutMs)
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
let settled = false
|
|
75
|
+
|
|
74
76
|
/**
|
|
75
77
|
* @param {number | null} code
|
|
76
78
|
* @param {string} [error]
|
|
77
79
|
*/
|
|
78
80
|
const settle = async (code, error) => {
|
|
81
|
+
if (settled) return
|
|
82
|
+
settled = true
|
|
79
83
|
if (timer) clearTimeout(timer)
|
|
80
84
|
const stdout = await capture.read()
|
|
81
85
|
resolve(error === undefined
|