@kud/jira-cli 0.6.0 → 0.6.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/README.md +2 -2
- package/dist/index.js +2 -2
- package/dist/{tui-V2HHFJ2H.js → tui-SBHMIFC4.js} +55 -21
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -51,11 +51,11 @@ jira
|
|
|
51
51
|
|
|
52
52
|
Your issues as a board. By default the tabs are Jira's three status *categories* — **To do**, **In progress**, **Done** — so it works on any instance without knowing what your board calls its columns. Pass `--board <id>` (or set `defaultBoard` in the config file) and the tabs become that board's own columns, matched by status id; statuses no column claims land on an **Off board** tab. Hand-written `tabs` in the config file win over both. Rows hang under their epic, carry a type pill, a priority glyph (`▲` high, `▼` low) and how long since they last moved. Closed work from the last fortnight is on the Done tab; `a` loads everything.
|
|
53
53
|
|
|
54
|
-
`↑↓` to move, `←→` (or `⇥`) to switch tab, `enter` to open, `?` for the legend, `r` to refresh
|
|
54
|
+
`↑↓` to move, `←→` (or `⇥`) to switch tab, `enter` to open, `?` for the legend, `r` to refresh. `q` quits from anywhere; `esc` or `⌫` goes back one level — a prompt, then the issue, then nothing.
|
|
55
55
|
|
|
56
56
|
`/` searches. Plain words narrow the list as you type and, on `enter`, run as `text ~ "…"` within your issues — so a match in a comment counts too. Anything shaped like JQL (`status = Done`, `labels in (a, b)`, `ORDER BY …`) is sent as-is and replaces the scope; the tag at the end of the line says which reading it took, and `⇥` flips it. A query Jira rejects shows Jira's own message under the box and keeps your text for editing. `esc` clears the search.
|
|
57
57
|
|
|
58
|
-
Inside an issue,
|
|
58
|
+
Inside an issue, `⇥` switches between description, comments and attachments — descriptions and comments render as real Markdown, and attachments are listed with the comment or description each was embedded in. `t` moves it, `c` comments, `a` assigns to you, `o` opens the browser, `esc` or `⌫` goes back. Writes ask before they act.
|
|
59
59
|
|
|
60
60
|
Ink is loaded only for this view, via a dynamic import, so `jira issue list | grep` never pays for it. Piped or redirected, bare `jira` prints help instead of opening a UI.
|
|
61
61
|
|
package/dist/index.js
CHANGED
|
@@ -900,7 +900,7 @@ var interactiveArgs = (argv) => {
|
|
|
900
900
|
var main = async () => {
|
|
901
901
|
const { screen, mock, board, isBare } = interactiveArgs(process.argv);
|
|
902
902
|
if (screen === "list" && isBare) {
|
|
903
|
-
const { SCREENS } = await import("./tui-
|
|
903
|
+
const { SCREENS } = await import("./tui-SBHMIFC4.js");
|
|
904
904
|
process.stdout.write(`${SCREENS.join("\n")}
|
|
905
905
|
`);
|
|
906
906
|
return;
|
|
@@ -910,7 +910,7 @@ var main = async () => {
|
|
|
910
910
|
program.outputHelp();
|
|
911
911
|
return;
|
|
912
912
|
}
|
|
913
|
-
const { runTui } = await import("./tui-
|
|
913
|
+
const { runTui } = await import("./tui-SBHMIFC4.js");
|
|
914
914
|
const [, key] = (screen ?? "").split(":");
|
|
915
915
|
await runTui({
|
|
916
916
|
screen: screen?.startsWith("detail") ? "detail" : "issues",
|
|
@@ -12,7 +12,8 @@ import {
|
|
|
12
12
|
ConfirmInput,
|
|
13
13
|
Select,
|
|
14
14
|
Spinner,
|
|
15
|
-
TextInput
|
|
15
|
+
TextInput,
|
|
16
|
+
useAppKeys
|
|
16
17
|
} from "@kud/ink-ui";
|
|
17
18
|
import { Box as Box2, Text as Text2, useApp, useInput, useStdout } from "ink";
|
|
18
19
|
import { useCallback, useEffect, useState } from "react";
|
|
@@ -26,7 +27,14 @@ import {
|
|
|
26
27
|
import { FooterHints, Panel } from "@kud/ink-ui";
|
|
27
28
|
import { Box, Text } from "ink";
|
|
28
29
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
|
-
var Frame = ({
|
|
30
|
+
var Frame = ({
|
|
31
|
+
width,
|
|
32
|
+
height,
|
|
33
|
+
facts,
|
|
34
|
+
hints,
|
|
35
|
+
page = "root",
|
|
36
|
+
children
|
|
37
|
+
}) => /* @__PURE__ */ jsxs(Panel, { width, height, children: [
|
|
30
38
|
/* @__PURE__ */ jsxs(Box, { paddingLeft: 1, children: [
|
|
31
39
|
/* @__PURE__ */ jsx(Text, { bold: true, children: "\u{1F3AB} Jira" }),
|
|
32
40
|
/* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
@@ -35,7 +43,7 @@ var Frame = ({ width, height, facts, hints, children }) => /* @__PURE__ */ jsxs(
|
|
|
35
43
|
] })
|
|
36
44
|
] }),
|
|
37
45
|
/* @__PURE__ */ jsx(Box, { flexDirection: "column", flexGrow: 1, children }),
|
|
38
|
-
hints ? /* @__PURE__ */ jsx(Box, { paddingLeft: 2, children: /* @__PURE__ */ jsx(FooterHints, { hints }) }) : null
|
|
46
|
+
hints ? /* @__PURE__ */ jsx(Box, { paddingLeft: 2, children: /* @__PURE__ */ jsx(FooterHints, { hints, page }) }) : null
|
|
39
47
|
] });
|
|
40
48
|
var FRAME_CHROME = 3;
|
|
41
49
|
|
|
@@ -55,6 +63,7 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
55
63
|
const [loadedAt, setLoadedAt] = useState(Date.now);
|
|
56
64
|
const [scope, setScope] = useState({ kind: "mine" });
|
|
57
65
|
const [searchError, setSearchError] = useState(null);
|
|
66
|
+
const [inputFocused, setInputFocused] = useState(false);
|
|
58
67
|
const [issue, setIssue] = useState(null);
|
|
59
68
|
const [overlay, setOverlay] = useState({ kind: "none" });
|
|
60
69
|
const [showingAll, setShowingAll] = useState(false);
|
|
@@ -110,9 +119,23 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
110
119
|
if (initialScreen === "detail" && initialKey) void loadIssue(initialKey);
|
|
111
120
|
else void loadList(false);
|
|
112
121
|
}, [initialScreen, initialKey, loadIssue, loadList]);
|
|
113
|
-
|
|
122
|
+
useAppKeys({
|
|
123
|
+
isActive: overlay.kind !== "comment" && !inputFocused,
|
|
124
|
+
onQuit: exit,
|
|
125
|
+
onBack: () => {
|
|
126
|
+
if (overlay.kind !== "none") {
|
|
127
|
+
setOverlay({ kind: "none" });
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
if (screen === "detail") {
|
|
131
|
+
setScreen("issues");
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
useInput((input) => {
|
|
114
138
|
if (overlay.kind !== "none") return;
|
|
115
|
-
if (input === "q" || key.ctrl && input === "c") exit();
|
|
116
139
|
if (error && input === "r") {
|
|
117
140
|
if (screen === "issues") void loadList(showingAll);
|
|
118
141
|
else if (issue) void loadIssue(issue.key);
|
|
@@ -132,11 +155,10 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
132
155
|
"."
|
|
133
156
|
] });
|
|
134
157
|
}
|
|
135
|
-
const framed = (facts, body, hints) => /* @__PURE__ */ jsx2(Frame, { width, height, facts, hints, children: /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", marginTop: 1, paddingLeft: 2, flexGrow: 1, children: body }) });
|
|
158
|
+
const framed = (facts, body, hints, page = screen === "detail" ? "nested" : "root") => /* @__PURE__ */ jsx2(Frame, { width, height, facts, hints, page, children: /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", marginTop: 1, paddingLeft: 2, flexGrow: 1, children: body }) });
|
|
136
159
|
if (error)
|
|
137
160
|
return framed("error", /* @__PURE__ */ jsx2(Alert, { variant: "error", children: error }), [
|
|
138
|
-
["r", "retry"]
|
|
139
|
-
["q", "quit"]
|
|
161
|
+
["r", "retry"]
|
|
140
162
|
]);
|
|
141
163
|
if (busy) return framed("working\u2026", /* @__PURE__ */ jsx2(Spinner, { label: busy }));
|
|
142
164
|
if (overlay.kind === "transition") {
|
|
@@ -187,6 +209,7 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
187
209
|
TextInput,
|
|
188
210
|
{
|
|
189
211
|
placeholder: "Markdown is supported\u2026",
|
|
212
|
+
onCancel: () => setOverlay({ kind: "none" }),
|
|
190
213
|
onSubmit: (body) => {
|
|
191
214
|
setOverlay({ kind: "none" });
|
|
192
215
|
if (!body.trim()) return;
|
|
@@ -247,19 +270,29 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
247
270
|
issue,
|
|
248
271
|
width,
|
|
249
272
|
height: height - FRAME_CHROME - DETAIL_CHROME,
|
|
250
|
-
frame: ({ title, subtitle, hints, body }) => /* @__PURE__ */ jsxs2(
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
children:
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
273
|
+
frame: ({ title, subtitle, hints, body }) => /* @__PURE__ */ jsxs2(
|
|
274
|
+
Frame,
|
|
275
|
+
{
|
|
276
|
+
width,
|
|
277
|
+
height,
|
|
278
|
+
facts: title,
|
|
279
|
+
hints: hints.filter(([k]) => k !== "\u232B"),
|
|
280
|
+
page: "nested",
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ jsx2(Box2, { paddingLeft: 2, marginTop: 1, children: /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: subtitle }) }),
|
|
283
|
+
/* @__PURE__ */ jsx2(
|
|
284
|
+
Box2,
|
|
285
|
+
{
|
|
286
|
+
flexDirection: "column",
|
|
287
|
+
marginTop: 1,
|
|
288
|
+
paddingLeft: 2,
|
|
289
|
+
flexGrow: 1,
|
|
290
|
+
children: body
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
),
|
|
263
296
|
onBack: () => setScreen("issues"),
|
|
264
297
|
onOpenBrowser: () => execFile(opener(), [issue.url]),
|
|
265
298
|
onAssign: () => setOverlay({ kind: "assign" }),
|
|
@@ -286,6 +319,7 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
286
319
|
{
|
|
287
320
|
model,
|
|
288
321
|
frame: ({ facts, hints, body }) => /* @__PURE__ */ jsx2(Frame, { width, height, facts, hints, children: body }),
|
|
322
|
+
onInputFocus: setInputFocused,
|
|
289
323
|
viewer,
|
|
290
324
|
loadedAt,
|
|
291
325
|
scope,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/jira-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Jira on the command line — read issues, comments and attachments as plain text",
|
|
6
6
|
"keywords": [
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"prepublishOnly": "npm run build"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@kud/ink-ui": "0.
|
|
40
|
+
"@kud/ink-ui": "0.27.0",
|
|
41
41
|
"@kud/jira": "0.4.0",
|
|
42
|
-
"@kud/jira-ink": "0.3
|
|
42
|
+
"@kud/jira-ink": "0.4.3",
|
|
43
43
|
"commander": "14.0.1",
|
|
44
44
|
"ink": "7.1.1",
|
|
45
45
|
"react": "19.2.5"
|