From 9a904591a5ca8f84d04c322b2f444ed989fc1a42 Mon Sep 17 00:00:00 2001 From: LuizFelipeOliver Date: Sat, 9 Nov 2024 18:25:52 -0300 Subject: [PATCH 1/3] fix: converte themeId to number garante que ao geral o arquivo config.yml o id do tema venha como um numero --- src/utils/SaveConfigurationFile.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/SaveConfigurationFile.ts b/src/utils/SaveConfigurationFile.ts index 5a85c58..87f8264 100644 --- a/src/utils/SaveConfigurationFile.ts +++ b/src/utils/SaveConfigurationFile.ts @@ -19,12 +19,13 @@ export function saveConfigurationFile({ const fileDataAsObject = { ':api_key': key, ':password': password, - ':theme_id': themeId, + ':theme_id': themeId ? Number(themeId) : undefined, ':preview_url': previewUrl, ':debug': debug, }; const configFileData = yaml.stringify(fileDataAsObject); + console.log('YAML Data:', configFileData); return fsp .writeFile('config.yml', configFileData) From 91bda0fdeb0f7e1e3563553a0389479447632325 Mon Sep 17 00:00:00 2001 From: LuizFelipeOliver Date: Wed, 20 Nov 2024 17:30:03 -0300 Subject: [PATCH 2/3] fix: remove console.log --- src/utils/SaveConfigurationFile.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils/SaveConfigurationFile.ts b/src/utils/SaveConfigurationFile.ts index 87f8264..5cfb2ec 100644 --- a/src/utils/SaveConfigurationFile.ts +++ b/src/utils/SaveConfigurationFile.ts @@ -25,7 +25,6 @@ export function saveConfigurationFile({ }; const configFileData = yaml.stringify(fileDataAsObject); - console.log('YAML Data:', configFileData); return fsp .writeFile('config.yml', configFileData) From 025d7d81ba5824d30e88f190f8a248326b674e0e Mon Sep 17 00:00:00 2001 From: LuizFelipeOliver Date: Sat, 14 Dec 2024 13:15:40 -0300 Subject: [PATCH 3/3] fix: done so that Ora sends the logs to stdout Alterado somente o configure para que a mensagem vara para o stdout --- src/cli/commands/Configure.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cli/commands/Configure.ts b/src/cli/commands/Configure.ts index 33a1454..386fb63 100644 --- a/src/cli/commands/Configure.ts +++ b/src/cli/commands/Configure.ts @@ -70,14 +70,18 @@ export default function configure() { debug: answers.debug, }); - const loader = ora('Setting up CLI...').start(); + const loader = ora({ + text: 'Setting up CLI...', + stream: process.stdout, + }).start(); tray.configure() .then((success) => { loader.succeed(success); }) .catch((error) => { - loader.fail(error.toString()); + loader.stop(); + console.error(error.toString()); }); }); }