console.info(colors.yellow('\n!!! IMPORTANT !!!'))
console.info(colors.yellow('Running the configuration wizard is optional but recommended after an upgrade to ensure your config file is using the latest available settings.'))
console.info(colors.yellow('Note that the contents of your config file will be displayed during the configuration wizard. It is therefor highly recommended to run the wizard on a non-publicly accessible port or skip this step completely.\n'))
}
inquirer.prompt([{
type:'list',
name:'action',
message:'Continue with configuration wizard?',
default:'default',
choices:[
{name:'Yes, run configuration wizard on port 3000 (recommended)',value:'default',short:'Yes'},
{name:'Yes, run configuration wizard on a custom port...',value:'custom',short:'Yes'},
{name:'No, I\'ll configure the config file manually',value:'exit',short:'No'}
console.info(colors.bold.cyan('> Browse to http://your-server:3000/ to configure your wiki! (Replaced your-server with the hostname or IP of your server!)'))
ora=require('ora')({text:'I\'ll wait until you\'re done ;)',color:'yellow',spinner:'pong'}).start()
returnexec.stdout('node',['wiki','configure'],{
cwd:installDir
})
case'custom':
console.info(colors.bold.cyan('> Browse to http://your-server:'+ans.customport+'/ to configure your wiki! (Replaced your-server with the hostname or IP of your server!)'))
ora=require('ora')({text:'I\'ll wait until you\'re done ;)',color:'yellow',spinner:'pong'}).start()
console.info(colors.bold.cyan('\n> You can run the configuration wizard using command:')+colors.bold.white(' node wiki configure')+colors.bold.cyan('.\n> Then start Wiki.js using command: ')+colors.bold.white('node wiki start'))
returnPromise.delay(7000).then(()=>{
process.exit(0)
})
}
}).then(()=>{
ora.succeed(colors.bold.green('Wiki.js has been configured successfully. It is now starting up and should be accessible very soon!'))
returnPromise.delay(3000).then(()=>{
console.info('npm is finishing... please wait...')
})
})
}else{
console.info(colors.cyan('[WARNING] Non-interactive terminal detected. You must manually start the configuration wizard using the command: node wiki configure'))