import inquirer , { QuestionCollection } from "inquirer" ; import { EnvInfo , EnvInfoObject , FormatterInfo , FormatterInfoObject , FrontFrameworkInfo , FrontFrameworkInfoObject , ProjectInfoObject , TestFrameworkInfo , TestFrameworkInfoObject , TypescriptInfo , TypescriptInfoObject , } from "types" ; const FrontFrameworkQuestion = { name : "frontFramework" , default : FrontFrameworkInfo . None , message : "Front Framework" , type : "list" , choices : Object . values ( FrontFrameworkInfo ) , } ; const FormatterQuestion = { name : "formatter" , default : FormatterInfo . Prettier , message : "Are you using a formatter?" , type : "list" , choices : Object . values ( FormatterInfo ) , } ; const TypescriptQuestion = { name : "typescript" , default : TypescriptInfo . WithTypeChecking , message : "Are you using typescript? What kind of eslint configuration would you like?" , type : "list" , choices : Object . values ( TypescriptInfo ) , } ; const EnvQuestion = { name : "env" , default : [ EnvInfo . Browser , EnvInfo . Node ] , message : "For which environment are you developing?" , type : "checkbox" , choices : Object . values ( EnvInfo ) , } ; const TestFrameworkQuestion = { name : "test" , default : TestFrameworkInfo . None , message : "Will you be writing tests?" , type : "list" , choices : Object . values ( TestFrameworkInfo ) , } ; const questions = [ TypescriptQuestion , FrontFrameworkQuestion , FormatterQuestion , EnvQuestion , TestFrameworkQuestion , ] ; export async function promptGeneratorUserQuestions ( ) { return inquirer . prompt ( questions ) ; }