diff --git a/config.mjs b/config.mjs index c05e817..8860e3a 100644 --- a/config.mjs +++ b/config.mjs @@ -1,5 +1,6 @@ // These parameters are all optional. -// token will use the environment $TOKEN (must be exported) if unspecified +// token will use the environment $TOKEN (must be exported) if unspecified. +// using the environment variable is the recommended way to declare your token // downloadDir will use the current directory if unspecified // base_url will use app.terraform.io if unspecified diff --git a/main.js b/main.js index 0a1a5e9..9d65ee7 100644 --- a/main.js +++ b/main.js @@ -3,4 +3,10 @@ import { get_run_details } from "./tfc-api-functions.mjs"; const my_config = normalized_config; -console.log(my_config) \ No newline at end of file +// console.log(my_config); + +console.log(process.argv.slice(2)); + +const response = await get_run_details(my_config.base_url, process.argv.slice(2), my_config.token); + +//console.log(response); \ No newline at end of file diff --git a/tfc-api-functions.mjs b/tfc-api-functions.mjs index 0716229..73320ef 100644 --- a/tfc-api-functions.mjs +++ b/tfc-api-functions.mjs @@ -9,4 +9,5 @@ export const get_run_details = async (base_url, run_id, token) => { headers: {Authorization :`Bearer ${token}`}, } ); + return response; }; \ No newline at end of file