@kud/jira-cli 0.6.1 → 0.6.2
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
|
@@ -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-NYMHOUTL.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-NYMHOUTL.js");
|
|
914
914
|
const [, key] = (screen ?? "").split(":");
|
|
915
915
|
await runTui({
|
|
916
916
|
screen: screen?.startsWith("detail") ? "detail" : "issues",
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
TextInput,
|
|
16
16
|
useAppKeys
|
|
17
17
|
} from "@kud/ink-ui";
|
|
18
|
-
import { Box
|
|
18
|
+
import { Box, Text, useApp, useInput, useStdout } from "ink";
|
|
19
19
|
import { useCallback, useEffect, useState } from "react";
|
|
20
20
|
import { errorMessagesOf, isJiraApiError } from "@kud/jira";
|
|
21
21
|
import {
|
|
@@ -24,32 +24,43 @@ import {
|
|
|
24
24
|
} from "@kud/jira-ink";
|
|
25
25
|
|
|
26
26
|
// src/tui/frame.tsx
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
+
import { Page } from "@kud/ink-ui";
|
|
28
|
+
import { jsx } from "react/jsx-runtime";
|
|
30
29
|
var Frame = ({
|
|
31
30
|
width,
|
|
32
31
|
height,
|
|
33
32
|
facts,
|
|
33
|
+
count,
|
|
34
|
+
user,
|
|
35
|
+
scope,
|
|
36
|
+
status,
|
|
34
37
|
hints,
|
|
35
38
|
page = "root",
|
|
39
|
+
gap = true,
|
|
36
40
|
children
|
|
37
|
-
}) => /* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
}) => /* @__PURE__ */ jsx(
|
|
42
|
+
Page,
|
|
43
|
+
{
|
|
44
|
+
icon: "\u{1F3AB}",
|
|
45
|
+
title: "Jira",
|
|
46
|
+
facts,
|
|
47
|
+
count,
|
|
48
|
+
user,
|
|
49
|
+
scope,
|
|
50
|
+
status,
|
|
51
|
+
hints,
|
|
52
|
+
page,
|
|
53
|
+
gap,
|
|
54
|
+
width,
|
|
55
|
+
height,
|
|
56
|
+
children
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
var FRAME_CHROME = 4;
|
|
49
60
|
|
|
50
61
|
// src/tui/app.tsx
|
|
51
|
-
import { jsx as jsx2, jsxs
|
|
52
|
-
var DETAIL_CHROME =
|
|
62
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
63
|
+
var DETAIL_CHROME = 3;
|
|
53
64
|
var MIN_WIDTH = 60;
|
|
54
65
|
var MIN_HEIGHT = 12;
|
|
55
66
|
var App = ({ data, initialScreen, initialKey }) => {
|
|
@@ -142,7 +153,7 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
142
153
|
}
|
|
143
154
|
});
|
|
144
155
|
if (width < MIN_WIDTH || height < MIN_HEIGHT) {
|
|
145
|
-
return /* @__PURE__ */
|
|
156
|
+
return /* @__PURE__ */ jsxs(Text, { children: [
|
|
146
157
|
"Terminal too small \u2014 needs at least ",
|
|
147
158
|
MIN_WIDTH,
|
|
148
159
|
"\xD7",
|
|
@@ -155,7 +166,7 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
155
166
|
"."
|
|
156
167
|
] });
|
|
157
168
|
}
|
|
158
|
-
const framed = (facts, body, hints, page = screen === "detail" ? "nested" : "root") => /* @__PURE__ */ jsx2(Frame, { width, height, facts, hints, page, children: /* @__PURE__ */ jsx2(
|
|
169
|
+
const framed = (facts, body, hints, page = screen === "detail" ? "nested" : "root") => /* @__PURE__ */ jsx2(Frame, { width, height, facts, hints, page, children: /* @__PURE__ */ jsx2(Box, { flexDirection: "column", marginTop: 1, paddingLeft: 2, flexGrow: 1, children: body }) });
|
|
159
170
|
if (error)
|
|
160
171
|
return framed("error", /* @__PURE__ */ jsx2(Alert, { variant: "error", children: error }), [
|
|
161
172
|
["r", "retry"]
|
|
@@ -164,8 +175,8 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
164
175
|
if (overlay.kind === "transition") {
|
|
165
176
|
return framed(
|
|
166
177
|
issue?.key ?? "",
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 1, children: [
|
|
179
|
+
/* @__PURE__ */ jsxs(Text, { bold: true, children: [
|
|
169
180
|
"Move ",
|
|
170
181
|
issue?.key,
|
|
171
182
|
" to\u2026"
|
|
@@ -193,15 +204,15 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
193
204
|
}
|
|
194
205
|
}
|
|
195
206
|
),
|
|
196
|
-
/* @__PURE__ */ jsx2(
|
|
207
|
+
/* @__PURE__ */ jsx2(Text, { dimColor: true, children: "esc cancel" })
|
|
197
208
|
] })
|
|
198
209
|
);
|
|
199
210
|
}
|
|
200
211
|
if (overlay.kind === "comment") {
|
|
201
212
|
return framed(
|
|
202
213
|
issue?.key ?? "",
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 1, children: [
|
|
215
|
+
/* @__PURE__ */ jsxs(Text, { bold: true, children: [
|
|
205
216
|
"Comment on ",
|
|
206
217
|
issue?.key
|
|
207
218
|
] }),
|
|
@@ -233,8 +244,8 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
233
244
|
if (overlay.kind === "assign") {
|
|
234
245
|
return framed(
|
|
235
246
|
issue?.key ?? "",
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 1, children: [
|
|
248
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
238
249
|
"Assign ",
|
|
239
250
|
issue?.key,
|
|
240
251
|
" to yourself?"
|
|
@@ -270,18 +281,18 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
270
281
|
issue,
|
|
271
282
|
width,
|
|
272
283
|
height: height - FRAME_CHROME - DETAIL_CHROME,
|
|
273
|
-
frame: ({ title, subtitle, hints, body }) => /* @__PURE__ */
|
|
284
|
+
frame: ({ title, subtitle, hints, body }) => /* @__PURE__ */ jsxs(
|
|
274
285
|
Frame,
|
|
275
286
|
{
|
|
276
287
|
width,
|
|
277
288
|
height,
|
|
278
|
-
|
|
289
|
+
scope: title,
|
|
279
290
|
hints: hints.filter(([k]) => k !== "\u232B"),
|
|
280
291
|
page: "nested",
|
|
281
292
|
children: [
|
|
282
|
-
/* @__PURE__ */ jsx2(
|
|
293
|
+
/* @__PURE__ */ jsx2(Box, { paddingLeft: 2, children: /* @__PURE__ */ jsx2(Text, { dimColor: true, children: subtitle }) }),
|
|
283
294
|
/* @__PURE__ */ jsx2(
|
|
284
|
-
|
|
295
|
+
Box,
|
|
285
296
|
{
|
|
286
297
|
flexDirection: "column",
|
|
287
298
|
marginTop: 1,
|
|
@@ -318,14 +329,27 @@ var App = ({ data, initialScreen, initialKey }) => {
|
|
|
318
329
|
IssueBoard,
|
|
319
330
|
{
|
|
320
331
|
model,
|
|
321
|
-
frame: ({
|
|
332
|
+
frame: ({ title, hints, body }) => /* @__PURE__ */ jsx2(
|
|
333
|
+
Frame,
|
|
334
|
+
{
|
|
335
|
+
width,
|
|
336
|
+
height,
|
|
337
|
+
count: title.count,
|
|
338
|
+
user: title.user,
|
|
339
|
+
scope: title.scope,
|
|
340
|
+
status: title.status,
|
|
341
|
+
hints,
|
|
342
|
+
gap: false,
|
|
343
|
+
children: body
|
|
344
|
+
}
|
|
345
|
+
),
|
|
322
346
|
onInputFocus: setInputFocused,
|
|
323
347
|
viewer,
|
|
324
348
|
loadedAt,
|
|
325
349
|
scope,
|
|
326
350
|
searchError,
|
|
327
351
|
width,
|
|
328
|
-
height: height - FRAME_CHROME - 1,
|
|
352
|
+
height: height - (FRAME_CHROME - 1) - 1,
|
|
329
353
|
showingAll,
|
|
330
354
|
onOpen: (key) => void loadIssue(key),
|
|
331
355
|
onRefresh: () => void (scope.kind === "search" ? runSearch(scope.query, scope.mode) : loadList(showingAll)),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/jira-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
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.28.2",
|
|
41
41
|
"@kud/jira": "0.4.0",
|
|
42
|
-
"@kud/jira-ink": "0.
|
|
42
|
+
"@kud/jira-ink": "0.5.0",
|
|
43
43
|
"commander": "14.0.1",
|
|
44
44
|
"ink": "7.1.1",
|
|
45
45
|
"react": "19.2.5"
|