update inquirer to v9.x for better windows support

This commit is contained in:
Brian Madison
2025-12-22 18:18:16 +08:00
parent da21790531
commit 021936eaa9
783 changed files with 13034 additions and 413 deletions

View File

@@ -2,7 +2,7 @@ const path = require('node:path');
const fs = require('fs-extra');
const yaml = require('yaml');
const chalk = require('chalk');
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
const { getProjectRoot, getModulePath } = require('../../../lib/project-root');
const { CLIUtils } = require('../../../lib/cli-utils');

View File

@@ -2,7 +2,7 @@ const path = require('node:path');
const fs = require('fs-extra');
const chalk = require('chalk');
const ora = require('ora');
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
const { Detector } = require('./detector');
const { Manifest } = require('./manifest');
const { ModuleManager } = require('../modules/manager');
@@ -880,6 +880,7 @@ class Installer {
// Check if this is a custom module
let isCustomModule = false;
let customInfo = null;
let useCache = false;
// First check if we have a cached version
if (finalCustomContent && finalCustomContent.cachedModules) {
@@ -2129,7 +2130,7 @@ class Installer {
* Private: Prompt for update action
*/
async promptUpdateAction() {
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
return await inquirer.prompt([
{
type: 'list',
@@ -2159,7 +2160,7 @@ class Installer {
return !name.startsWith('_bmad'); // Everything else is manual cleanup
});
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
// Show warning for other offending paths FIRST
if (otherOffenders.length > 0) {
@@ -2458,7 +2459,7 @@ class Installer {
console.log(chalk.yellow(`\n⚠️ Found ${customModulesWithMissingSources.length} custom module(s) with missing sources:`));
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
let keptCount = 0;
let updatedCount = 0;
let removedCount = 0;

View File

@@ -59,7 +59,7 @@ class AntigravitySetup extends BaseIdeSetup {
if (config.subagentChoices.install !== 'none') {
// Ask for installation location
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
const locationAnswer = await inquirer.prompt([
{
type: 'list',
@@ -298,7 +298,7 @@ class AntigravitySetup extends BaseIdeSetup {
choices = await this.promptSubagentInstallation(config.subagents);
if (choices.install !== 'none') {
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
const locationAnswer = await inquirer.prompt([
{
type: 'list',
@@ -335,7 +335,7 @@ class AntigravitySetup extends BaseIdeSetup {
* Prompt user for subagent installation preferences
*/
async promptSubagentInstallation(subagentConfig) {
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
// First ask if they want to install subagents
const { install } = await inquirer.prompt([

View File

@@ -58,7 +58,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
if (config.subagentChoices.install !== 'none') {
// Ask for installation location
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
const locationAnswer = await inquirer.prompt([
{
type: 'list',
@@ -306,7 +306,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
choices = await this.promptSubagentInstallation(config.subagents);
if (choices.install !== 'none') {
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
const locationAnswer = await inquirer.prompt([
{
type: 'list',
@@ -343,7 +343,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
* Prompt user for subagent installation preferences
*/
async promptSubagentInstallation(subagentConfig) {
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
// First ask if they want to install subagents
const { install } = await inquirer.prompt([

View File

@@ -22,7 +22,7 @@ class CodexSetup extends BaseIdeSetup {
* @returns {Object} Collected configuration
*/
async collectConfiguration(options = {}) {
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
let confirmed = false;
let installLocation = 'global';

View File

@@ -2,7 +2,7 @@ const path = require('node:path');
const { BaseIdeSetup } = require('./_base-ide');
const chalk = require('chalk');
const { FileOps, PathUtils } = require('../../../lib/file-ops');
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
/**

View File

@@ -1,5 +1,5 @@
const chalk = require('chalk');
const inquirer = require('inquirer');
const inquirer = require('inquirer').default || require('inquirer');
const path = require('node:path');
const os = require('node:os');
const fs = require('fs-extra');
@@ -18,7 +18,7 @@ class UI {
CLIUtils.displayLogo();
// Display changelog link
console.log(chalk.cyan('\n📋 Read the latest updates: https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CHANGELOG.md\n'));
console.log(chalk.cyan('\nRead the latest updates: https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CHANGELOG.md\n'));
const confirmedDirectory = await this.getConfirmedDirectory();