@bspk/ui 1.1.30 → 1.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/meta-types.ts +1 -0
- package/meta.ts +15 -2
- package/package.json +1 -1
package/meta-types.ts
CHANGED
package/meta.ts
CHANGED
|
@@ -401,6 +401,7 @@ function generateTypes() {
|
|
|
401
401
|
properties,
|
|
402
402
|
id: kebabCase(definitionName),
|
|
403
403
|
description: definition.description,
|
|
404
|
+
components: componentFile?.name ? [componentFile.name] : [],
|
|
404
405
|
});
|
|
405
406
|
});
|
|
406
407
|
|
|
@@ -414,7 +415,18 @@ function generateTypes() {
|
|
|
414
415
|
)
|
|
415
416
|
?.filter((name, index, arr) => arr.indexOf(name) === index);
|
|
416
417
|
|
|
417
|
-
if (references
|
|
418
|
+
if (!references || references.length === 0) return;
|
|
419
|
+
|
|
420
|
+
nextType.references = references;
|
|
421
|
+
|
|
422
|
+
if (!nextType.components || nextType.components.length === 0) return;
|
|
423
|
+
|
|
424
|
+
nextTypes
|
|
425
|
+
.filter((t) => references.includes(t.name))
|
|
426
|
+
.forEach((t) => {
|
|
427
|
+
t.components = t.components || [];
|
|
428
|
+
t.components.push(...nextType.components!);
|
|
429
|
+
});
|
|
418
430
|
});
|
|
419
431
|
|
|
420
432
|
const duplicateIds = nextTypes.flatMap((t) => t.id).filter((id, index, arr) => arr.indexOf(id) !== index);
|
|
@@ -428,8 +440,9 @@ function generateTypes() {
|
|
|
428
440
|
return nextTypes;
|
|
429
441
|
}
|
|
430
442
|
|
|
443
|
+
let componentsMeta: ComponentMeta[] = [];
|
|
431
444
|
async function createMeta() {
|
|
432
|
-
|
|
445
|
+
componentsMeta = componentFiles
|
|
433
446
|
.flatMap((component) => generateComponentMeta(component) || [])
|
|
434
447
|
// filter out dependencies that aren't components
|
|
435
448
|
.map((m, _, arr): ComponentMeta => {
|