import inquirer from 'inquirer' ; import { Plugin } from './load_opensearch_dashboards_platform_plugin' ; export async function resolveOpenSearchDashboardsVersion ( option , plugin ) { const preselectedVersion = option || plugin . manifest . opensearchDashboardsVersion || plugin . manifest . version ; if ( preselectedVersion && preselectedVersion !== 'opensearchDashboards' ) { return preselectedVersion ; } const answers = await inquirer . prompt ( [ { type : 'input' , name : 'opensearchDashboardsVersion' , message : 'What version of OpenSearch Dashboards are you building for?' , } , ] ) ; return answers . opensearchDashboardsVersion ; }