@contentful/experience-design-system-cli 2.37.1-dev-build-81dbe125.0 → 2.37.1-dev-build-c8306cfd.0
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/app.js +22 -28
- package/dist/index.js +22 -28
- package/dist/package.json +1 -1
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -18409,6 +18409,9 @@ var GLYPH_TREE_MID = "\u251C\u2500";
|
|
|
18409
18409
|
var GLYPH_TREE_LAST = "\u2514\u2500";
|
|
18410
18410
|
var GLYPH_WARN = "\u26A0";
|
|
18411
18411
|
var GLYPH_ERROR = "\u2717";
|
|
18412
|
+
function hasDirectChild(node) {
|
|
18413
|
+
return node.slots.some((slot) => (slot.allowedComponents ?? []).some((target) => target !== node.name));
|
|
18414
|
+
}
|
|
18412
18415
|
function isEmpty(entry) {
|
|
18413
18416
|
return Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
|
|
18414
18417
|
}
|
|
@@ -18451,10 +18454,12 @@ function buildVisibleRows(props) {
|
|
|
18451
18454
|
otherKeys2.sort();
|
|
18452
18455
|
const otherKeySet2 = new Set(otherKeys2);
|
|
18453
18456
|
const flatGraph = graph.filter((n) => otherKeySet2.has(n.name));
|
|
18454
|
-
const closures2 = computeAllClosures(flatGraph);
|
|
18455
18457
|
const depCountByKey = /* @__PURE__ */ new Map();
|
|
18456
|
-
for (const
|
|
18457
|
-
|
|
18458
|
+
for (const node of flatGraph) {
|
|
18459
|
+
const direct = new Set(
|
|
18460
|
+
node.slots.flatMap((slot) => slot.allowedComponents ?? []).filter((t) => t !== node.name && otherKeySet2.has(t))
|
|
18461
|
+
);
|
|
18462
|
+
if (direct.size > 0) depCountByKey.set(node.name, direct.size);
|
|
18458
18463
|
}
|
|
18459
18464
|
for (const key of cycleKeys2) {
|
|
18460
18465
|
const rec = itemByKey2.get(key);
|
|
@@ -18499,28 +18504,11 @@ function buildVisibleRows(props) {
|
|
|
18499
18504
|
const seenCycleTierChildOccurrence = /* @__PURE__ */ new Set();
|
|
18500
18505
|
const computeCycleMemberSubtree = (root) => {
|
|
18501
18506
|
const out = [];
|
|
18502
|
-
const
|
|
18503
|
-
|
|
18504
|
-
|
|
18505
|
-
|
|
18506
|
-
|
|
18507
|
-
if (!parentItem) continue;
|
|
18508
|
-
const slotTargets2 = [];
|
|
18509
|
-
const seenTarget = /* @__PURE__ */ new Set();
|
|
18510
|
-
for (const target of allowedComponentNames(parentItem.entry)) {
|
|
18511
|
-
if (!itemByKey.has(target)) continue;
|
|
18512
|
-
if (seenTarget.has(target)) continue;
|
|
18513
|
-
seenTarget.add(target);
|
|
18514
|
-
slotTargets2.push(target);
|
|
18515
|
-
}
|
|
18516
|
-
slotTargets2.sort();
|
|
18517
|
-
for (const target of slotTargets2) {
|
|
18518
|
-
if (visited.has(target)) continue;
|
|
18519
|
-
visited.add(target);
|
|
18520
|
-
const isCycleMember = cycleParticipants.has(target);
|
|
18521
|
-
out.push({ name: target, depth: cur.depth + 1, isCycleMember });
|
|
18522
|
-
queue.push({ name: target, depth: cur.depth + 1 });
|
|
18523
|
-
}
|
|
18507
|
+
const parentItem = itemByKey.get(root)?.it;
|
|
18508
|
+
if (!parentItem) return out;
|
|
18509
|
+
const slotTargets2 = [...new Set(allowedComponentNames(parentItem.entry))].filter((target) => target !== root && itemByKey.has(target)).sort();
|
|
18510
|
+
for (const target of slotTargets2) {
|
|
18511
|
+
out.push({ name: target, depth: 1, isCycleMember: cycleParticipants.has(target) });
|
|
18524
18512
|
}
|
|
18525
18513
|
return out;
|
|
18526
18514
|
};
|
|
@@ -18582,7 +18570,15 @@ function buildVisibleRows(props) {
|
|
|
18582
18570
|
}
|
|
18583
18571
|
const otherKeySet = new Set(otherKeys);
|
|
18584
18572
|
const subgraph = graph.filter((n) => otherKeySet.has(n.name));
|
|
18585
|
-
const closures =
|
|
18573
|
+
const closures = /* @__PURE__ */ new Map();
|
|
18574
|
+
const parentNames = /* @__PURE__ */ new Set([
|
|
18575
|
+
...findRoots(subgraph),
|
|
18576
|
+
...subgraph.filter((n) => hasDirectChild(n)).map((n) => n.name)
|
|
18577
|
+
]);
|
|
18578
|
+
for (const name of [...parentNames].sort()) {
|
|
18579
|
+
const full = computeClosure(name, subgraph);
|
|
18580
|
+
closures.set(name, { ...full, nodes: full.nodes.filter((n) => n.depth <= 1) });
|
|
18581
|
+
}
|
|
18586
18582
|
const sharedDeps = findSharedDeps(closures);
|
|
18587
18583
|
const hasCycleDepDirect = (name) => {
|
|
18588
18584
|
const it = itemByKey.get(name)?.it;
|
|
@@ -18619,7 +18615,6 @@ function buildVisibleRows(props) {
|
|
|
18619
18615
|
}
|
|
18620
18616
|
};
|
|
18621
18617
|
countInjections(root);
|
|
18622
|
-
for (const n of closure.nodes) if (n.name !== root) countInjections(n.name);
|
|
18623
18618
|
const depCount = closure.nodes.length - 1 + injectedCycleCount;
|
|
18624
18619
|
const expanded = alwaysExpanded ? true : props.expandedGroups.has(root);
|
|
18625
18620
|
const glyphExpand = expanded ? GLYPH_EXPAND_EXPANDED : GLYPH_EXPAND_COLLAPSED;
|
|
@@ -18655,7 +18650,6 @@ function buildVisibleRows(props) {
|
|
|
18655
18650
|
emitCycleChildrenOf(root, 0);
|
|
18656
18651
|
for (const c2 of closureChildren) {
|
|
18657
18652
|
injectedChildren.push({ name: c2.name, depth: c2.depth, isCycleChild: false });
|
|
18658
|
-
emitCycleChildrenOf(c2.name, c2.depth);
|
|
18659
18653
|
}
|
|
18660
18654
|
const isLastAtDepth = (idx) => {
|
|
18661
18655
|
const own = injectedChildren[idx].depth;
|
package/dist/index.js
CHANGED
|
@@ -20852,6 +20852,9 @@ var init_badge = __esm({
|
|
|
20852
20852
|
import figures4 from "figures";
|
|
20853
20853
|
import { Box as Box17, Text as Text19 } from "ink";
|
|
20854
20854
|
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
20855
|
+
function hasDirectChild(node) {
|
|
20856
|
+
return node.slots.some((slot) => (slot.allowedComponents ?? []).some((target) => target !== node.name));
|
|
20857
|
+
}
|
|
20855
20858
|
function isEmpty(entry) {
|
|
20856
20859
|
return Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
|
|
20857
20860
|
}
|
|
@@ -20894,10 +20897,12 @@ function buildVisibleRows(props) {
|
|
|
20894
20897
|
otherKeys2.sort();
|
|
20895
20898
|
const otherKeySet2 = new Set(otherKeys2);
|
|
20896
20899
|
const flatGraph = graph.filter((n) => otherKeySet2.has(n.name));
|
|
20897
|
-
const closures2 = computeAllClosures(flatGraph);
|
|
20898
20900
|
const depCountByKey = /* @__PURE__ */ new Map();
|
|
20899
|
-
for (const
|
|
20900
|
-
|
|
20901
|
+
for (const node of flatGraph) {
|
|
20902
|
+
const direct = new Set(
|
|
20903
|
+
node.slots.flatMap((slot) => slot.allowedComponents ?? []).filter((t) => t !== node.name && otherKeySet2.has(t))
|
|
20904
|
+
);
|
|
20905
|
+
if (direct.size > 0) depCountByKey.set(node.name, direct.size);
|
|
20901
20906
|
}
|
|
20902
20907
|
for (const key of cycleKeys2) {
|
|
20903
20908
|
const rec = itemByKey2.get(key);
|
|
@@ -20942,28 +20947,11 @@ function buildVisibleRows(props) {
|
|
|
20942
20947
|
const seenCycleTierChildOccurrence = /* @__PURE__ */ new Set();
|
|
20943
20948
|
const computeCycleMemberSubtree = (root) => {
|
|
20944
20949
|
const out = [];
|
|
20945
|
-
const
|
|
20946
|
-
|
|
20947
|
-
|
|
20948
|
-
|
|
20949
|
-
|
|
20950
|
-
if (!parentItem) continue;
|
|
20951
|
-
const slotTargets2 = [];
|
|
20952
|
-
const seenTarget = /* @__PURE__ */ new Set();
|
|
20953
|
-
for (const target of allowedComponentNames(parentItem.entry)) {
|
|
20954
|
-
if (!itemByKey.has(target)) continue;
|
|
20955
|
-
if (seenTarget.has(target)) continue;
|
|
20956
|
-
seenTarget.add(target);
|
|
20957
|
-
slotTargets2.push(target);
|
|
20958
|
-
}
|
|
20959
|
-
slotTargets2.sort();
|
|
20960
|
-
for (const target of slotTargets2) {
|
|
20961
|
-
if (visited.has(target)) continue;
|
|
20962
|
-
visited.add(target);
|
|
20963
|
-
const isCycleMember = cycleParticipants.has(target);
|
|
20964
|
-
out.push({ name: target, depth: cur.depth + 1, isCycleMember });
|
|
20965
|
-
queue.push({ name: target, depth: cur.depth + 1 });
|
|
20966
|
-
}
|
|
20950
|
+
const parentItem = itemByKey.get(root)?.it;
|
|
20951
|
+
if (!parentItem) return out;
|
|
20952
|
+
const slotTargets2 = [...new Set(allowedComponentNames(parentItem.entry))].filter((target) => target !== root && itemByKey.has(target)).sort();
|
|
20953
|
+
for (const target of slotTargets2) {
|
|
20954
|
+
out.push({ name: target, depth: 1, isCycleMember: cycleParticipants.has(target) });
|
|
20967
20955
|
}
|
|
20968
20956
|
return out;
|
|
20969
20957
|
};
|
|
@@ -21025,7 +21013,15 @@ function buildVisibleRows(props) {
|
|
|
21025
21013
|
}
|
|
21026
21014
|
const otherKeySet = new Set(otherKeys);
|
|
21027
21015
|
const subgraph = graph.filter((n) => otherKeySet.has(n.name));
|
|
21028
|
-
const closures =
|
|
21016
|
+
const closures = /* @__PURE__ */ new Map();
|
|
21017
|
+
const parentNames = /* @__PURE__ */ new Set([
|
|
21018
|
+
...findRoots(subgraph),
|
|
21019
|
+
...subgraph.filter((n) => hasDirectChild(n)).map((n) => n.name)
|
|
21020
|
+
]);
|
|
21021
|
+
for (const name of [...parentNames].sort()) {
|
|
21022
|
+
const full = computeClosure(name, subgraph);
|
|
21023
|
+
closures.set(name, { ...full, nodes: full.nodes.filter((n) => n.depth <= 1) });
|
|
21024
|
+
}
|
|
21029
21025
|
const sharedDeps = findSharedDeps(closures);
|
|
21030
21026
|
const hasCycleDepDirect = (name) => {
|
|
21031
21027
|
const it = itemByKey.get(name)?.it;
|
|
@@ -21062,7 +21058,6 @@ function buildVisibleRows(props) {
|
|
|
21062
21058
|
}
|
|
21063
21059
|
};
|
|
21064
21060
|
countInjections(root);
|
|
21065
|
-
for (const n of closure.nodes) if (n.name !== root) countInjections(n.name);
|
|
21066
21061
|
const depCount = closure.nodes.length - 1 + injectedCycleCount;
|
|
21067
21062
|
const expanded = alwaysExpanded ? true : props.expandedGroups.has(root);
|
|
21068
21063
|
const glyphExpand = expanded ? GLYPH_EXPAND_EXPANDED : GLYPH_EXPAND_COLLAPSED;
|
|
@@ -21098,7 +21093,6 @@ function buildVisibleRows(props) {
|
|
|
21098
21093
|
emitCycleChildrenOf(root, 0);
|
|
21099
21094
|
for (const c2 of closureChildren) {
|
|
21100
21095
|
injectedChildren.push({ name: c2.name, depth: c2.depth, isCycleChild: false });
|
|
21101
|
-
emitCycleChildrenOf(c2.name, c2.depth);
|
|
21102
21096
|
}
|
|
21103
21097
|
const isLastAtDepth = (idx) => {
|
|
21104
21098
|
const own = injectedChildren[idx].depth;
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.37.1-dev-build-
|
|
3
|
+
"version": "2.37.1-dev-build-c8306cfd.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"ts-morph": "^27.0.2",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"zod": "^4.6.5",
|
|
48
|
-
"@contentful/experience-design-system-
|
|
49
|
-
"@contentful/experience-design-system-
|
|
48
|
+
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-c8306cfd.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-c8306cfd.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|