From b7544355891d7172decfb064cf96cd709a391b8d Mon Sep 17 00:00:00 2001 From: Aaron Klinker Date: Thu, 29 Feb 2024 12:13:28 -0600 Subject: [PATCH] docs: Fix CLI generation --- docs/.vitepress/plugins/generate-cli-docs.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/.vitepress/plugins/generate-cli-docs.ts b/docs/.vitepress/plugins/generate-cli-docs.ts index 192e20bb..6b669927 100644 --- a/docs/.vitepress/plugins/generate-cli-docs.ts +++ b/docs/.vitepress/plugins/generate-cli-docs.ts @@ -32,14 +32,20 @@ export function generateCliDocs() { '```', ]; - const commands = await Promise.all( + const commands = await Promise.allSettled( extractCommands(dev.info).map(async (command) => { const res = await execaCommand(`pnpm -s wxt ${command} --help`); const { rest: docs } = splitInfo(res.stdout); return [`## \`wxt ${command}\``, '```sh', docs, '```']; }), ); - lines.push(...commands); + lines.push( + ...commands + .filter((res) => res.status === 'fulfilled') + .map( + (res) => (res as unknown as PromiseFulfilledResult).value, + ), + ); const text = await format( PREFACE +