@kud/jira-cli 0.3.1 → 0.4.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
CHANGED
|
@@ -454,6 +454,9 @@ var registerIssueCommands = (program2) => {
|
|
|
454
454
|
const lines = [
|
|
455
455
|
`${bold(found.key)} ${f.summary ?? ""}`,
|
|
456
456
|
"",
|
|
457
|
+
...f.parent ? [
|
|
458
|
+
`${dim("parent")} ${f.parent.key} ${truncate(f.parent.fields?.summary ?? "", 60)}`
|
|
459
|
+
] : [],
|
|
457
460
|
`${dim("status")} ${f.status?.name ?? "\u2014"}`,
|
|
458
461
|
`${dim("type")} ${f.issuetype?.name ?? "\u2014"}`,
|
|
459
462
|
`${dim("assignee")} ${f.assignee?.displayName ?? "unassigned"}`,
|
|
@@ -887,11 +890,15 @@ var fail = (error) => {
|
|
|
887
890
|
};
|
|
888
891
|
var interactiveArgs = (argv) => {
|
|
889
892
|
const rest = argv.slice(2);
|
|
890
|
-
const
|
|
891
|
-
const
|
|
892
|
-
const
|
|
893
|
-
|
|
894
|
-
);
|
|
893
|
+
const inlineAt = rest.findIndex((a) => a.startsWith("--screen="));
|
|
894
|
+
const spacedAt = rest.indexOf("--screen");
|
|
895
|
+
const screen = inlineAt !== -1 ? rest[inlineAt]?.slice("--screen=".length) : spacedAt === -1 ? void 0 : rest[spacedAt + 1];
|
|
896
|
+
const consumed = /* @__PURE__ */ new Set(["--mock"]);
|
|
897
|
+
if (inlineAt !== -1) consumed.add(rest[inlineAt]);
|
|
898
|
+
if (spacedAt !== -1) {
|
|
899
|
+
consumed.add("--screen");
|
|
900
|
+
consumed.add(rest[spacedAt + 1] ?? "");
|
|
901
|
+
}
|
|
895
902
|
return {
|
|
896
903
|
screen,
|
|
897
904
|
mock: rest.includes("--mock"),
|
|
@@ -901,7 +908,7 @@ var interactiveArgs = (argv) => {
|
|
|
901
908
|
var main = async () => {
|
|
902
909
|
const { screen, mock, isBare } = interactiveArgs(process.argv);
|
|
903
910
|
if (screen === "list" && isBare) {
|
|
904
|
-
const { SCREENS } = await import("./tui-
|
|
911
|
+
const { SCREENS } = await import("./tui-UKK2JQS3.js");
|
|
905
912
|
process.stdout.write(`${SCREENS.join("\n")}
|
|
906
913
|
`);
|
|
907
914
|
return;
|
|
@@ -911,7 +918,7 @@ var main = async () => {
|
|
|
911
918
|
program.outputHelp();
|
|
912
919
|
return;
|
|
913
920
|
}
|
|
914
|
-
const { runTui } = await import("./tui-
|
|
921
|
+
const { runTui } = await import("./tui-UKK2JQS3.js");
|
|
915
922
|
const [, key] = (screen ?? "").split(":");
|
|
916
923
|
await runTui({
|
|
917
924
|
screen: screen?.startsWith("detail") ? "detail" : "issues",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
context
|
|
2
|
+
context,
|
|
3
|
+
truncate
|
|
3
4
|
} from "./chunk-5MFNIQDW.js";
|
|
4
5
|
|
|
5
6
|
// src/tui/index.tsx
|
|
@@ -82,6 +83,13 @@ var IssueDetailView = ({
|
|
|
82
83
|
issue.summary
|
|
83
84
|
] }),
|
|
84
85
|
/* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
|
|
86
|
+
issue.parent && /* @__PURE__ */ jsx(
|
|
87
|
+
KeyValue,
|
|
88
|
+
{
|
|
89
|
+
label: "parent",
|
|
90
|
+
value: `${issue.parent.key} ${truncate(issue.parent.summary, 60)}`
|
|
91
|
+
}
|
|
92
|
+
),
|
|
85
93
|
/* @__PURE__ */ jsx(KeyValue, { label: "status", value: /* @__PURE__ */ jsx(Badge, { children: issue.status }) }),
|
|
86
94
|
/* @__PURE__ */ jsx(KeyValue, { label: "type", value: issue.type }),
|
|
87
95
|
/* @__PURE__ */ jsx(KeyValue, { label: "assignee", value: issue.assignee }),
|
|
@@ -158,7 +166,7 @@ var IssueList = ({
|
|
|
158
166
|
const { start, end } = windowFor(cursor, rows.length, size);
|
|
159
167
|
const visible = rows.slice(start, end);
|
|
160
168
|
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
|
|
161
|
-
/* @__PURE__ */ jsx2(Box2, { paddingLeft:
|
|
169
|
+
/* @__PURE__ */ jsx2(Box2, { paddingLeft: 4, children: /* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
|
|
162
170
|
pad("KEY", 11),
|
|
163
171
|
pad("STATUS", 17),
|
|
164
172
|
pad("SUMMARY", 60),
|
|
@@ -423,6 +431,7 @@ var liveData = (ctx = context()) => ({
|
|
|
423
431
|
assignee: f.assignee?.displayName ?? "unassigned",
|
|
424
432
|
reporter: f.reporter?.displayName ?? "\u2014",
|
|
425
433
|
labels: f.labels ?? [],
|
|
434
|
+
parent: f.parent ? { key: f.parent.key, summary: f.parent.fields?.summary ?? "" } : void 0,
|
|
426
435
|
url: `${ctx.config.baseUrl}/browse/${issue.key}`,
|
|
427
436
|
description: adfToMarkdown(f.description, filenameOf),
|
|
428
437
|
comments: (f.comment?.comments ?? []).map((c) => ({
|
|
@@ -490,6 +499,7 @@ var DETAIL = {
|
|
|
490
499
|
assignee: "Ada Okafor",
|
|
491
500
|
reporter: "Bram Nilsen",
|
|
492
501
|
labels: ["checkout", "regression"],
|
|
502
|
+
parent: { key: "SHOP-300", summary: "Basket and checkout correctness" },
|
|
493
503
|
url: "https://example.atlassian.net/browse/SHOP-412",
|
|
494
504
|
description: [
|
|
495
505
|
"## What happens",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/jira-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Jira on the command line — read issues, comments and attachments as plain text",
|
|
6
6
|
"keywords": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@kud/ink-markdown": "0.1.1",
|
|
41
41
|
"@kud/ink-ui": "0.14.1",
|
|
42
|
-
"@kud/jira": "0.2.
|
|
42
|
+
"@kud/jira": "0.2.1",
|
|
43
43
|
"commander": "14.0.1",
|
|
44
44
|
"ink": "7.0.1",
|
|
45
45
|
"react": "19.2.5"
|