From 5ae32dedd77f920280163fa7df8f75e60b077446 Mon Sep 17 00:00:00 2001 From: Jonathan Cammisuli Date: Mon, 25 Oct 2021 12:02:33 -0400 Subject: [PATCH] fix: make sure that executors/builders and generator/schematics are combined respectively --- libs/server/src/lib/utils/read-collections.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/libs/server/src/lib/utils/read-collections.ts b/libs/server/src/lib/utils/read-collections.ts index 6c8ad580b9..9705ce2b1a 100644 --- a/libs/server/src/lib/utils/read-collections.ts +++ b/libs/server/src/lib/utils/read-collections.ts @@ -119,9 +119,11 @@ export async function getCollectionInfo( }; }; - for (const [key, schema] of Object.entries( - executorCollectionJson.executors || executorCollectionJson.executors || {} - )) { + const executors = { + ...executorCollectionJson.executors, + ...executorCollectionJson.builders, + }; + for (const [key, schema] of Object.entries(executors)) { if (!canUse(key, schema)) { continue; } @@ -132,11 +134,11 @@ export async function getCollectionInfo( collectionMap.set(collectionInfo.name, collectionInfo); } - for (const [key, schema] of Object.entries( - generatorCollectionJson.generators || - generatorCollectionJson.schematics || - {} - )) { + const generators = { + ...generatorCollectionJson.generators, + ...generatorCollectionJson.schematics, + }; + for (const [key, schema] of Object.entries(generators)) { if (!canUse(key, schema)) { continue; }