@kud/jira-cli 0.5.0 → 0.5.1
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
CHANGED
|
@@ -888,7 +888,7 @@ var interactiveArgs = (argv) => {
|
|
|
888
888
|
var main = async () => {
|
|
889
889
|
const { screen, mock, isBare } = interactiveArgs(process.argv);
|
|
890
890
|
if (screen === "list" && isBare) {
|
|
891
|
-
const { SCREENS } = await import("./tui-
|
|
891
|
+
const { SCREENS } = await import("./tui-K7CKDM5F.js");
|
|
892
892
|
process.stdout.write(`${SCREENS.join("\n")}
|
|
893
893
|
`);
|
|
894
894
|
return;
|
|
@@ -898,7 +898,7 @@ var main = async () => {
|
|
|
898
898
|
program.outputHelp();
|
|
899
899
|
return;
|
|
900
900
|
}
|
|
901
|
-
const { runTui } = await import("./tui-
|
|
901
|
+
const { runTui } = await import("./tui-K7CKDM5F.js");
|
|
902
902
|
const [, key] = (screen ?? "").split(":");
|
|
903
903
|
await runTui({
|
|
904
904
|
screen: screen?.startsWith("detail") ? "detail" : "issues",
|
|
@@ -45,26 +45,46 @@ var countsFor = (rows) => rows.reduce(
|
|
|
45
45
|
}),
|
|
46
46
|
{ todo: 0, doing: 0, done: 0 }
|
|
47
47
|
);
|
|
48
|
+
var isEpic = (row) => row.type.toLowerCase() === "epic";
|
|
48
49
|
var blocksFor = (rows) => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
const hasStructure = rows.some((r) => r.parent || isEpic(r));
|
|
51
|
+
if (!hasStructure)
|
|
52
|
+
return rows.map((row) => ({ kind: "issue", row, depth: 0 }));
|
|
53
|
+
const heads = new Map(rows.filter(isEpic).map((r) => [r.key, r]));
|
|
54
|
+
const children = /* @__PURE__ */ new Map();
|
|
55
|
+
const orphans = [];
|
|
52
56
|
for (const row of rows) {
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
if (isEpic(row)) continue;
|
|
58
|
+
const key = row.parent?.key;
|
|
59
|
+
if (!key) {
|
|
60
|
+
orphans.push(row);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
children.set(key, [...children.get(key) ?? [], row]);
|
|
60
64
|
}
|
|
61
|
-
const
|
|
62
|
-
|
|
65
|
+
const groups = [];
|
|
66
|
+
for (const [key, head] of heads)
|
|
67
|
+
groups.push([
|
|
68
|
+
{ kind: "issue", row: head, depth: 0 },
|
|
69
|
+
...(children.get(key) ?? []).map(
|
|
70
|
+
(row) => ({ kind: "issue", row, depth: 1 })
|
|
71
|
+
)
|
|
72
|
+
]);
|
|
73
|
+
for (const [key, kids] of children) {
|
|
74
|
+
if (heads.has(key)) continue;
|
|
75
|
+
groups.push([
|
|
76
|
+
{ kind: "fence", key, summary: kids[0].parent?.summary ?? "" },
|
|
77
|
+
...kids.map((row) => ({ kind: "issue", row, depth: 1 }))
|
|
78
|
+
]);
|
|
79
|
+
}
|
|
80
|
+
if (orphans.length)
|
|
81
|
+
groups.push([
|
|
82
|
+
...groups.length ? [{ kind: "fence", key: null, summary: "No epic" }] : [],
|
|
83
|
+
...orphans.map((row) => ({ kind: "issue", row, depth: 0 }))
|
|
84
|
+
]);
|
|
85
|
+
return groups.flatMap(
|
|
86
|
+
(group, i) => i === 0 ? group : [{ kind: "gap" }, ...group]
|
|
63
87
|
);
|
|
64
|
-
return ordered.flatMap(([key, group]) => [
|
|
65
|
-
{ kind: "header", key, summary: key ? group.summary : "No epic" },
|
|
66
|
-
...group.rows.map((row) => ({ kind: "issue", row }))
|
|
67
|
-
]);
|
|
68
88
|
};
|
|
69
89
|
var blockIndexOfIssue = (blocks, issueIndex) => {
|
|
70
90
|
let seen = -1;
|
|
@@ -107,7 +127,7 @@ var pillVariantFor = (type) => {
|
|
|
107
127
|
|
|
108
128
|
// src/tui/list.tsx
|
|
109
129
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
110
|
-
var CHROME =
|
|
130
|
+
var CHROME = 10;
|
|
111
131
|
var LEGEND = [
|
|
112
132
|
["\u25B2", "high priority"],
|
|
113
133
|
["\u25BC", "low priority"],
|
|
@@ -271,7 +291,7 @@ var IssueList = ({
|
|
|
271
291
|
" \u2717 ",
|
|
272
292
|
searchError
|
|
273
293
|
] }) : null,
|
|
274
|
-
/* @__PURE__ */ jsx(Box, { paddingLeft: 2, children: /* @__PURE__ */ jsx(Tabs, { active: tab, items: tabItems }) }),
|
|
294
|
+
/* @__PURE__ */ jsx(Box, { paddingLeft: 2, marginTop: 1, children: /* @__PURE__ */ jsx(Tabs, { active: tab, items: tabItems }) }),
|
|
275
295
|
/* @__PURE__ */ jsx(
|
|
276
296
|
Box,
|
|
277
297
|
{
|
|
@@ -283,10 +303,11 @@ var IssueList = ({
|
|
|
283
303
|
/* @__PURE__ */ jsx(Box, { width: 28, flexShrink: 0, children: /* @__PURE__ */ jsx(Text, { color: colors.accent, children: glyph }) }),
|
|
284
304
|
/* @__PURE__ */ jsx(Text, { dimColor: true, children: meaning })
|
|
285
305
|
] }, glyph)) : issues.length === 0 ? /* @__PURE__ */ jsx(Box, { paddingLeft: 4, children: /* @__PURE__ */ jsx(Text, { dimColor: true, children: emptyHint(tab, counts, showingAll, scope) }) }) : blocks.slice(start, end).map(
|
|
286
|
-
(block, i) => block.kind === "
|
|
306
|
+
(block, i) => block.kind === "gap" ? /* @__PURE__ */ jsx(Text, { children: " " }, `gap:${start + i}`) : block.kind === "fence" ? /* @__PURE__ */ jsx(Box, { paddingLeft: 4, children: /* @__PURE__ */ jsx(Text, { dimColor: true, children: rule(
|
|
287
307
|
block.key ? `${block.summary} \xB7 ${block.key}` : block.summary,
|
|
288
308
|
width - 7
|
|
289
|
-
) }) }, `
|
|
309
|
+
) }) }, `f:${block.key ?? "none"}`) : /* @__PURE__ */ jsxs(SelectableRow, { active: start + i === focus, children: [
|
|
310
|
+
block.depth === 1 ? /* @__PURE__ */ jsx(Box, { flexShrink: 0, width: 3, children: /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2514\u2500 " }) }) : null,
|
|
290
311
|
/* @__PURE__ */ jsx(Box, { flexShrink: 0, width: 2, children: /* @__PURE__ */ jsx(
|
|
291
312
|
Text,
|
|
292
313
|
{
|
|
@@ -637,6 +658,16 @@ var liveData = (ctx = context()) => ({
|
|
|
637
658
|
var CHECKOUT = { key: "SHOP-300", summary: "Basket and checkout correctness" };
|
|
638
659
|
var STOREFRONT = { key: "SHOP-350", summary: "Storefront refresh" };
|
|
639
660
|
var ROWS = [
|
|
661
|
+
{
|
|
662
|
+
key: "SHOP-300",
|
|
663
|
+
status: "To Do",
|
|
664
|
+
category: "new",
|
|
665
|
+
summary: "Basket and checkout correctness",
|
|
666
|
+
type: "Epic",
|
|
667
|
+
priority: "Medium",
|
|
668
|
+
assignee: "Ada Okafor",
|
|
669
|
+
updated: "2026-08-14T10:00:00.000Z"
|
|
670
|
+
},
|
|
640
671
|
{
|
|
641
672
|
key: "SHOP-412",
|
|
642
673
|
status: "In Progress",
|