BMAD-METHOD/tools/cli/lib
Davor Racic 90ea3cbed7
Minor installer fixes (#1590)
* fix: remove redundant "None" skip option from module selection

The "None - Skip module installation" option was unnecessary since
core is always locked/selected, satisfying the required constraint.
Users can simply press Enter with only core selected to skip modules.
Also removes dead code: selectModules(), getExternalModuleChoices(),
and selectExternalModules() methods that were never called.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: support ESM and .cjs module installers in ModuleManager

Module installer loading now handles three cases:
- .cjs files loaded via require() (always CommonJS regardless of package type)
- .js files loaded via dynamic import() (works for both CJS and ESM)
- CJS default export unwrapped automatically for consistent API

This fixes errors when external modules set "type":"module" in their
package.json. Those modules must still rename installer.js to
installer.cjs if it uses require() internally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address code review findings from PR #1590

- Filter 'core' from CLI --modules in update path for consistency
- Update selectAllModules() JSDoc to reflect core exclusion
- Fix ESM default-export unwrap to handle function/class exports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: clarify module post-install script errors as non-fatal warnings

Change error display from log.error to log.warn and explain that the
module was installed successfully — only the optional post-install
script could not run. Prevents users from thinking the module
installation itself failed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: suppress non-fatal module post-install script errors

Post-install scripts fail due to CJS/ESM incompatibility but module
files are already copied successfully. Silently catch the error instead
of showing a warning that alarms users into thinking installation failed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: remove redundant modules and tools lines from install summary

The checkmark list already shows each installed module and IDE tool.
Keep only the install path and file-warning lines in the summary footer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2026-02-08 15:41:51 -06:00
..
agent refactor: Complete @clack/prompts Migration & Installer Output Consolidation (#1586) 2026-02-08 00:40:13 -06:00
activation-builder.js fix: HELP_STEP placeholder not replaced in compiled agents, fix hardcoded path, fix single quote in HELP_STEP (#1437) 2026-01-29 05:58:56 -08:00
agent-analyzer.js feat: add documentation website with Docusaurus build pipeline (#1177) 2025-12-23 23:01:36 +08:00
agent-party-generator.js feat: add documentation website with Docusaurus build pipeline (#1177) 2025-12-23 23:01:36 +08:00
cli-utils.js refactor: Complete @clack/prompts Migration & Installer Output Consolidation (#1586) 2026-02-08 00:40:13 -06:00
config.js we only need one yaml lib 2025-12-13 18:35:07 +08:00
file-ops.js feat: add documentation website with Docusaurus build pipeline (#1177) 2025-12-23 23:01:36 +08:00
platform-codes.js docs: radical reduction of documentation scope for v6 beta (#1406) 2026-01-25 14:00:26 -06:00
project-root.js Project Cleanup of Agents Menus, BMB module removal to other repo 2026-01-19 02:04:14 -06:00
prompts.js refactor: Complete @clack/prompts Migration & Installer Output Consolidation (#1586) 2026-02-08 00:40:13 -06:00
ui.js Minor installer fixes (#1590) 2026-02-08 15:41:51 -06:00
xml-handler.js feat: add documentation website with Docusaurus build pipeline (#1177) 2025-12-23 23:01:36 +08:00
xml-to-markdown.js feat: v6.0.0-alpha.0 - the future is now 2025-09-28 23:17:07 -05:00
yaml-format.js we only need one yaml lib 2025-12-13 18:35:07 +08:00
yaml-xml-builder.js Project Cleanup of Agents Menus, BMB module removal to other repo 2026-01-19 02:04:14 -06:00