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:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user