2022-12-31 01:16:59 +00:00
|
|
|
import { normalized_config } from "./normalize-config.js";
|
|
|
|
import { get_run_details } from "./tfc-api-functions.mjs";
|
|
|
|
|
|
|
|
const my_config = normalized_config;
|
|
|
|
|
2023-01-02 21:32:33 +00:00
|
|
|
const runid_provided = run_id => {
|
|
|
|
return (run_id ? true : false);
|
|
|
|
}
|
2023-01-02 21:15:40 +00:00
|
|
|
|
2023-01-02 21:32:33 +00:00
|
|
|
const runidNotProvided = run_id => {
|
|
|
|
return !runid_provided(run_id);
|
|
|
|
}
|
2023-01-02 21:15:40 +00:00
|
|
|
|
2023-01-02 21:32:33 +00:00
|
|
|
if(runidNotProvided(process.argv[2])){
|
|
|
|
throw new Error("RunID must be provided");
|
|
|
|
}
|
2023-01-02 21:15:40 +00:00
|
|
|
|
2023-01-02 21:32:33 +00:00
|
|
|
const response = await get_run_details(my_config.base_url, process.argv.slice(2), my_config.token);
|