Skip to content

Commit 5b05e81

Browse files
committed
fix: one more place
1 parent 71c4458 commit 5b05e81

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

templates/cli/lib/commands/types.js.twig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,17 @@ const typesCommand = actionRunner(async (rawOutputDirectory, {language, strict})
141141

142142
log(`Found ${dataItems.length} ${itemType}: ${dataItems.map(c => c.name).join(", ")}`);
143143

144+
// Use columns if available, otherwise use attributes
145+
const resourceType = tables.length > 0 ? 'columns' : 'attributes';
146+
144147
const totalAttributes = dataItems.reduce((count, item) => count + (item.attributes || []).length, 0);
145-
log(`Found ${totalAttributes} attributes across all ${itemType}`);
148+
log(`Found ${totalAttributes} ${resourceType} across all ${itemType}`);
146149

147150
const templater = ejs.compile(meta.getTemplate());
148151

149152
if (meta.isSingleFile()) {
150153
const content = templater({
151154
collections: dataItems,
152-
tables: dataItems,
153155
strict,
154156
...templateHelpers,
155157
getType: meta.getType,

0 commit comments

Comments
 (0)