Skip to content

Commit

Permalink
fix: make sure that executors/builders and generator/schematics are c…
Browse files Browse the repository at this point in the history
…ombined respectively (#1167)
  • Loading branch information
Cammisuli authored Oct 25, 2021
1 parent 1ddaf20 commit 8b2cd53
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions libs/server/src/lib/utils/read-collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,11 @@ export async function getCollectionInfo(
};
};

for (const [key, schema] of Object.entries<any>(
executorCollectionJson.executors || executorCollectionJson.executors || {}
)) {
const executors = {
...executorCollectionJson.executors,
...executorCollectionJson.builders,
};
for (const [key, schema] of Object.entries<any>(executors)) {
if (!canUse(key, schema)) {
continue;
}
Expand All @@ -132,11 +134,11 @@ export async function getCollectionInfo(
collectionMap.set(collectionInfo.name, collectionInfo);
}

for (const [key, schema] of Object.entries<any>(
generatorCollectionJson.generators ||
generatorCollectionJson.schematics ||
{}
)) {
const generators = {
...generatorCollectionJson.generators,
...generatorCollectionJson.schematics,
};
for (const [key, schema] of Object.entries<any>(generators)) {
if (!canUse(key, schema)) {
continue;
}
Expand Down

0 comments on commit 8b2cd53

Please sign in to comment.