import { config } from "./config.mjs"; const default_token = process.env.TOKEN; const default_base_url = "https://app.terraform.io"; const default_download_dir = process.cwd(); const run_id_arg = process.argv[2]; const normalize_configs = async (default_token, default_base_url, default_download_dir, run_id_arg) => { if(config.base_url === "") {config.base_url = default_base_url}; if(config.token === "") {config.token = default_token}; if(config.downloadDir === "") {config.downloadDir = default_download_dir} if(!config.run_id) {config.run_id = run_id_arg} return config } export const normalized_config = await normalize_configs(default_token, default_base_url, default_download_dir);