From 57e915ec46b552a051644869118b8a979c3fa70a Mon Sep 17 00:00:00 2001 From: kagawagao Date: Wed, 7 Aug 2024 21:41:31 +0800 Subject: [PATCH] fix(cli): fix inquirer import error --- packages/cli/src/init.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/init.ts b/packages/cli/src/init.ts index 13c3a6a..348649e 100644 --- a/packages/cli/src/init.ts +++ b/packages/cli/src/init.ts @@ -1,4 +1,4 @@ -import inquirer from '@inquirer/prompts'; +import { confirm } from '@inquirer/prompts'; import fs from 'fs/promises'; import path from 'node:path'; import { configExplore, logger } from './utils'; @@ -18,7 +18,7 @@ const templates = { async function generateConfigFile() { try { - const useTypeScript = await inquirer.confirm({ + const useTypeScript = await confirm({ message: 'Would you like to use TypeScript?', default: true, }); @@ -37,7 +37,7 @@ const initConfig = async () => { // check if the file already exists const searchResult = await configExplore.search(process.cwd()); if (searchResult?.filepath) { - const overwrite = await inquirer.confirm({ + const overwrite = await confirm({ message: 'Config file already exists. Do you want to overwrite it?', default: false, });