Generate CLI reports for cli-module packages

Include cli-module role in CLI report generation alongside the
existing cli role. Packages without a bin field are silently skipped.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-15 23:12:59 +01:00
parent 55f6eb8c64
commit 6395e35c6a
13 changed files with 906 additions and 3 deletions
@@ -54,9 +54,10 @@ export async function categorizePackageDirs(packageDirs: string[]) {
if (pkgJson?.backstage?.inline) {
return;
}
if (role === 'cli') {
if (role === 'cli' || role === 'cli-module') {
cliPackageDirs.push(dir);
} else if (role !== 'frontend' && role !== 'backend') {
}
if (role !== 'cli' && role !== 'frontend' && role !== 'backend') {
tsPackageDirs.push(dir);
}
}
@@ -132,7 +132,7 @@ export async function runCliExtraction({
const pkgJson = await fs.readJson(resolvePath(fullDir, 'package.json'));
if (!pkgJson.bin) {
throw new Error(`CLI Package in ${packageDir} has no bin field`);
continue;
}
const models = new Array<CliModel>();