From 58d060d7299f95682e30bbff78f815ae4b0b1fa1 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Mon, 28 Oct 2024 21:45:28 +0100 Subject: [PATCH] fix(cli): Ensure async completion for aidoc readme and description generation --- changelog.md | 5 +++++ ts/00_commitinfo_data.ts | 2 +- ts/cli.ts | 8 ++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index 88ecf37..a957dcb 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # Changelog +## 2024-10-28 - 1.4.2 - fix(cli) +Ensure async completion for aidoc readme and description generation + +- Added await statements for asynchronous methods buildReadme and buildDescription in the aidoc command. + ## 2024-10-28 - 1.4.1 - fix(readme) Correct async call to getModuleSubDirs in readme generation. diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index f8286a5..b4d9a7a 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@git.zone/tsdoc', - version: '1.4.1', + version: '1.4.2', description: 'An advanced TypeScript documentation tool using AI to generate and enhance documentation for TypeScript projects.' } diff --git a/ts/cli.ts b/ts/cli.ts index 91a3324..5ae4f59 100644 --- a/ts/cli.ts +++ b/ts/cli.ts @@ -28,14 +28,14 @@ export const run = async () => { }); tsdocCli.addCommand('aidoc').subscribe(async (argvArg) => { - logger.log('info', `Generating new readme...`); - logger.log('info', `This may take some time...`); const aidocInstance = new AiDoc(); await aidocInstance.start(); - aidocInstance.buildReadme(paths.cwd); + logger.log('info', `Generating new readme...`); + logger.log('info', `This may take some time...`); + await aidocInstance.buildReadme(paths.cwd); logger.log('info', `Generating new keywords...`); logger.log('info', `This may take some time...`); - aidocInstance.buildDescription(paths.cwd); + await aidocInstance.buildDescription(paths.cwd); }); tsdocCli.addCommand('test').subscribe((argvArg) => {