exponential-cli 1.33.0 → 1.34.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 +25 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1021,6 +1021,9 @@ Added ${succeeded}/${results.length} user stories`));
|
|
|
1021
1021
|
}
|
|
1022
1022
|
console.log();
|
|
1023
1023
|
}
|
|
1024
|
+
function ticketDecisions(ticket) {
|
|
1025
|
+
return ticket.decisions;
|
|
1026
|
+
}
|
|
1024
1027
|
function outputTicketJson(ticket) {
|
|
1025
1028
|
console.log(JSON.stringify(transformTicket(ticket), null, 2));
|
|
1026
1029
|
}
|
|
@@ -1070,6 +1073,19 @@ ${chalk2[getTicketStatusColor(ticket.status)](`[${ticket.status}]`)} ${chalk2.gr
|
|
|
1070
1073
|
console.log(` - ${chalk2.gray(`[${dep.status}]`)} ${depId} ${dep.title}`);
|
|
1071
1074
|
}
|
|
1072
1075
|
}
|
|
1076
|
+
const decisions = ticketDecisions(ticket);
|
|
1077
|
+
if (decisions && decisions.length > 0) {
|
|
1078
|
+
const open = decisions.filter((d) => d.status === "OPEN");
|
|
1079
|
+
const decided = decisions.filter((d) => d.status !== "OPEN");
|
|
1080
|
+
if (open.length > 0) {
|
|
1081
|
+
console.log(` ${chalk2.cyan("Open questions:")}`);
|
|
1082
|
+
for (const d of open) console.log(` - ${d.label} ${d.statement}`);
|
|
1083
|
+
}
|
|
1084
|
+
if (decided.length > 0) {
|
|
1085
|
+
console.log(` ${chalk2.cyan("Decisions:")}`);
|
|
1086
|
+
for (const d of decided) console.log(` - ${chalk2.gray(`[${d.status}]`)} ${d.label} ${d.statement}`);
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1073
1089
|
if (detail.actions && detail.actions.length > 0) {
|
|
1074
1090
|
console.log(` ${chalk2.cyan("Actions:")} ${detail.actions.length}`);
|
|
1075
1091
|
for (const a of detail.actions) {
|
|
@@ -1168,6 +1184,14 @@ function transformTicket(ticket) {
|
|
|
1168
1184
|
counts: ticket._count ?? null,
|
|
1169
1185
|
dependsOn: detail.dependsOn ?? void 0,
|
|
1170
1186
|
requiredFor: detail.requiredFor ?? void 0,
|
|
1187
|
+
decisions: ticketDecisions(ticket)?.map((d) => ({
|
|
1188
|
+
id: d.id,
|
|
1189
|
+
label: d.label,
|
|
1190
|
+
statement: d.statement,
|
|
1191
|
+
status: d.status,
|
|
1192
|
+
decidedAt: d.decidedAt ? new Date(d.decidedAt).toISOString() : null,
|
|
1193
|
+
linkId: d.linkId
|
|
1194
|
+
})),
|
|
1171
1195
|
actions: detail.actions?.map((a) => ({
|
|
1172
1196
|
id: a.id,
|
|
1173
1197
|
name: a.name,
|
|
@@ -9691,7 +9715,7 @@ function createTicketsCommand() {
|
|
|
9691
9715
|
}
|
|
9692
9716
|
}
|
|
9693
9717
|
);
|
|
9694
|
-
tickets.command("get <id>").description("Show a ticket with dependencies, actions, and comments").action(async (id, _options, cmd) => {
|
|
9718
|
+
tickets.command("get <id>").description("Show a ticket with dependencies, decisions, actions, and comments").action(async (id, _options, cmd) => {
|
|
9695
9719
|
const globalOpts = cmd.optsWithGlobals();
|
|
9696
9720
|
const useJson = shouldUseJson(globalOpts.json, globalOpts.pretty);
|
|
9697
9721
|
try {
|