synthesisui 0.16.53 → 0.16.54
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/dist/commands/import.js +13 -6
- package/package.json +1 -1
package/dist/commands/import.js
CHANGED
|
@@ -388,9 +388,13 @@ function summarize(c) {
|
|
|
388
388
|
// The inventory, phase one: what this project composes. Printed, never
|
|
389
389
|
// mapped - deciding that their `Pill` is our `ds-badge` is a judgement a
|
|
390
390
|
// person approves, and it does not happen in a census.
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
391
|
+
// COMPOSED means composed. The payload also carries components that are only
|
|
392
|
+
// DECLARED (a library exports what it never uses), and counting those here
|
|
393
|
+
// made the line say 108 where 80 things are actually composed (dono, 31/07).
|
|
394
|
+
const composedOnly = (c.components ?? []).filter((x) => x.count > 0);
|
|
395
|
+
if (composedOnly.length > 0) {
|
|
396
|
+
const withProps = composedOnly.filter((x) => Object.keys(x.props).length > 0).length;
|
|
397
|
+
console.log(body(`${composedOnly.length} components composed here, ${withProps} of them with props written literally`));
|
|
394
398
|
}
|
|
395
399
|
if (c.totals.named > 0) {
|
|
396
400
|
console.log(body(`${paint.strong(String(c.totals.named))} of those values ALREADY have a name in your system - ${c.totals.coverage}% of your design values come from it today`));
|
|
@@ -422,7 +426,7 @@ function printComponents(c) {
|
|
|
422
426
|
if (list.length === 0)
|
|
423
427
|
return;
|
|
424
428
|
console.log("");
|
|
425
|
-
const mine = list.filter((x) => !x.from);
|
|
429
|
+
const mine = list.filter((x) => !x.from && x.count > 0);
|
|
426
430
|
const theirs = list.filter((x) => x.from);
|
|
427
431
|
console.log(section("What this project composes"));
|
|
428
432
|
if (theirs.length > 0) {
|
|
@@ -439,7 +443,7 @@ function printComponents(c) {
|
|
|
439
443
|
if (mine.length > 12) {
|
|
440
444
|
console.log(body(paint.faint(`(${mine.length - 12} more of yours)`)));
|
|
441
445
|
}
|
|
442
|
-
printCrosswalk(
|
|
446
|
+
printCrosswalk(list.filter((x) => !x.from));
|
|
443
447
|
printObserved(mine);
|
|
444
448
|
printDefined(c, mine);
|
|
445
449
|
}
|
|
@@ -468,7 +472,10 @@ function printDefined(census, used) {
|
|
|
468
472
|
if (withAxes.length > 8) {
|
|
469
473
|
console.log(body(paint.faint(` (${withAxes.length - 8} more)`)));
|
|
470
474
|
}
|
|
471
|
-
|
|
475
|
+
// Orphans are found by asking what has no USAGE, so this has to see the
|
|
476
|
+
// composed list alone: handing it the union made every declared component
|
|
477
|
+
// look used by itself, and 29 orphans became 1.
|
|
478
|
+
const crossed = reconcile(defined, used.filter((u) => u.count > 0));
|
|
472
479
|
const dead = crossed.filter((r) => r.deadOptions.length > 0);
|
|
473
480
|
const stray = crossed.filter((r) => r.undeclared.length > 0);
|
|
474
481
|
const orphans = crossed.filter((r) => r.orphan);
|
package/package.json
CHANGED