import axios from 'axios' ; import { last } from 'lodash' ; export async function getLatestVersion ( ) { const response = await axios ( 'https://artifacts-api.elastic.co/v1/versions' ) ; return last ( response . data . versions as string [ ] ) || '8.1.0-SNAPSHOT' ; }