Skip to content

Commit 8b2cd53

Browse files
authored
fix: make sure that executors/builders and generator/schematics are combined respectively (#1167)
1 parent 1ddaf20 commit 8b2cd53

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Diff for: libs/server/src/lib/utils/read-collections.ts

+10-8
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ export async function getCollectionInfo(
119119
};
120120
};
121121

122-
for (const [key, schema] of Object.entries<any>(
123-
executorCollectionJson.executors || executorCollectionJson.executors || {}
124-
)) {
122+
const executors = {
123+
...executorCollectionJson.executors,
124+
...executorCollectionJson.builders,
125+
};
126+
for (const [key, schema] of Object.entries<any>(executors)) {
125127
if (!canUse(key, schema)) {
126128
continue;
127129
}
@@ -132,11 +134,11 @@ export async function getCollectionInfo(
132134
collectionMap.set(collectionInfo.name, collectionInfo);
133135
}
134136

135-
for (const [key, schema] of Object.entries<any>(
136-
generatorCollectionJson.generators ||
137-
generatorCollectionJson.schematics ||
138-
{}
139-
)) {
137+
const generators = {
138+
...generatorCollectionJson.generators,
139+
...generatorCollectionJson.schematics,
140+
};
141+
for (const [key, schema] of Object.entries<any>(generators)) {
140142
if (!canUse(key, schema)) {
141143
continue;
142144
}

0 commit comments

Comments
 (0)