in build.py [0:0]
def fetch_and_count_files(kibana_version):
"""Fetch the list of packages and count the total files to download based on the Kibana version."""
url = f"https://epr.elastic.co/search?kibana.version={kibana_version}"
session = setup_download_session()
response = session.get(url)
response.raise_for_status()
packages = response.json()
# Assuming each package has one main file and one signature file
total_files = 2 * len(packages)
return total_files