exponential-cli 1.11.2 → 1.12.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/index.js +34 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -899,6 +899,17 @@ ${chalk3[getFeatureStatusColor(feature.status)](`[${feature.status}]`)} ${chalk3
|
|
|
899
899
|
if (feature.priority != null) {
|
|
900
900
|
console.log(` ${chalk3.magenta("Priority:")} ${feature.priority}`);
|
|
901
901
|
}
|
|
902
|
+
if (feature.goal) {
|
|
903
|
+
console.log(` ${chalk3.blue("Objective:")} ${feature.goal.title} ${chalk3.gray(`(${feature.goal.id})`)}`);
|
|
904
|
+
}
|
|
905
|
+
if (feature.keyResultLinks?.length) {
|
|
906
|
+
console.log(` ${chalk3.blue("Key results:")}`);
|
|
907
|
+
for (const link of feature.keyResultLinks) {
|
|
908
|
+
const kr = link.keyResult;
|
|
909
|
+
const progress = kr.currentValue != null && kr.targetValue != null ? `${kr.currentValue}/${kr.targetValue}${kr.unit && kr.unit !== "custom" ? ` ${kr.unit}` : ""}, ` : "";
|
|
910
|
+
console.log(` \xB7 ${kr.title} ${chalk3.gray(`(${progress}${kr.period}, ${kr.id})`)}`);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
902
913
|
if (feature._count?.tickets != null) {
|
|
903
914
|
console.log(` ${chalk3.cyan("Tickets:")} ${feature._count.tickets}`);
|
|
904
915
|
}
|
|
@@ -923,9 +934,26 @@ Features (${features.length} total)`));
|
|
|
923
934
|
const ticketCount = f._count?.tickets != null ? chalk3.gray(` \u2014 ${f._count.tickets} tickets`) : "";
|
|
924
935
|
console.log(` ${statusBadge} ${chalk3.bold(f.name)}${ticketCount}`);
|
|
925
936
|
console.log(chalk3.gray(` ID: ${f.id}`));
|
|
937
|
+
if (f.keyResultLinks?.length) {
|
|
938
|
+
const titles = f.keyResultLinks.map((l) => l.keyResult.title).join("; ");
|
|
939
|
+
console.log(chalk3.gray(` KRs: ${titles}`));
|
|
940
|
+
}
|
|
926
941
|
}
|
|
927
942
|
console.log();
|
|
928
943
|
}
|
|
944
|
+
function summarizeFeatureKeyResult(link) {
|
|
945
|
+
const kr = link.keyResult;
|
|
946
|
+
return {
|
|
947
|
+
keyResultId: kr.id,
|
|
948
|
+
title: kr.title,
|
|
949
|
+
period: kr.period,
|
|
950
|
+
goalId: kr.goalId,
|
|
951
|
+
status: kr.status ?? null,
|
|
952
|
+
currentValue: kr.currentValue ?? null,
|
|
953
|
+
targetValue: kr.targetValue ?? null,
|
|
954
|
+
unit: kr.unit ?? null
|
|
955
|
+
};
|
|
956
|
+
}
|
|
929
957
|
function transformFeature(feature) {
|
|
930
958
|
return {
|
|
931
959
|
id: feature.id,
|
|
@@ -938,6 +966,12 @@ function transformFeature(feature) {
|
|
|
938
966
|
priority: feature.priority,
|
|
939
967
|
goalId: feature.goalId,
|
|
940
968
|
goal: feature.goal ?? null,
|
|
969
|
+
// Flattened out of the join row (ADR-0050): callers building a per-feature
|
|
970
|
+
// "which key results does this move" column want the key results, not the
|
|
971
|
+
// edge rows. `goal` above is the coarser Objective alignment and is a
|
|
972
|
+
// different question - the two are allowed to disagree, so both ride along.
|
|
973
|
+
// Progress values are present on `features get` and absent on `list`.
|
|
974
|
+
keyResults: feature.keyResultLinks?.map(summarizeFeatureKeyResult) ?? null,
|
|
941
975
|
counts: feature._count ?? null,
|
|
942
976
|
createdAt: new Date(feature.createdAt).toISOString(),
|
|
943
977
|
updatedAt: new Date(feature.updatedAt).toISOString()
|