exponential-cli 1.33.0 → 1.35.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 +31 -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,24 @@ ${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
|
+
const printDecision = (d, prefix) => {
|
|
1081
|
+
const title = d.title?.trim();
|
|
1082
|
+
console.log(` - ${prefix}${d.label} ${title || d.statement}`);
|
|
1083
|
+
if (title) console.log(chalk2.gray(` ${d.statement}`));
|
|
1084
|
+
};
|
|
1085
|
+
if (open.length > 0) {
|
|
1086
|
+
console.log(` ${chalk2.cyan("Open questions:")}`);
|
|
1087
|
+
for (const d of open) printDecision(d, "");
|
|
1088
|
+
}
|
|
1089
|
+
if (decided.length > 0) {
|
|
1090
|
+
console.log(` ${chalk2.cyan("Decisions:")}`);
|
|
1091
|
+
for (const d of decided) printDecision(d, `${chalk2.gray(`[${d.status}]`)} `);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1073
1094
|
if (detail.actions && detail.actions.length > 0) {
|
|
1074
1095
|
console.log(` ${chalk2.cyan("Actions:")} ${detail.actions.length}`);
|
|
1075
1096
|
for (const a of detail.actions) {
|
|
@@ -1168,6 +1189,15 @@ function transformTicket(ticket) {
|
|
|
1168
1189
|
counts: ticket._count ?? null,
|
|
1169
1190
|
dependsOn: detail.dependsOn ?? void 0,
|
|
1170
1191
|
requiredFor: detail.requiredFor ?? void 0,
|
|
1192
|
+
decisions: ticketDecisions(ticket)?.map((d) => ({
|
|
1193
|
+
id: d.id,
|
|
1194
|
+
label: d.label,
|
|
1195
|
+
title: d.title ?? null,
|
|
1196
|
+
statement: d.statement,
|
|
1197
|
+
status: d.status,
|
|
1198
|
+
decidedAt: d.decidedAt ? new Date(d.decidedAt).toISOString() : null,
|
|
1199
|
+
linkId: d.linkId
|
|
1200
|
+
})),
|
|
1171
1201
|
actions: detail.actions?.map((a) => ({
|
|
1172
1202
|
id: a.id,
|
|
1173
1203
|
name: a.name,
|
|
@@ -9691,7 +9721,7 @@ function createTicketsCommand() {
|
|
|
9691
9721
|
}
|
|
9692
9722
|
}
|
|
9693
9723
|
);
|
|
9694
|
-
tickets.command("get <id>").description("Show a ticket with dependencies, actions, and comments").action(async (id, _options, cmd) => {
|
|
9724
|
+
tickets.command("get <id>").description("Show a ticket with dependencies, decisions, actions, and comments").action(async (id, _options, cmd) => {
|
|
9695
9725
|
const globalOpts = cmd.optsWithGlobals();
|
|
9696
9726
|
const useJson = shouldUseJson(globalOpts.json, globalOpts.pretty);
|
|
9697
9727
|
try {
|