@ondrej-svec/hog 1.24.0 → 1.24.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/cli.js +29 -22
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7129,7 +7129,7 @@ var init_overlay_renderer = __esm({
|
|
|
7129
7129
|
|
|
7130
7130
|
// src/board/components/panel-layout.tsx
|
|
7131
7131
|
import { Box as Box22 } from "ink";
|
|
7132
|
-
import {
|
|
7132
|
+
import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
7133
7133
|
function getLayoutMode(cols) {
|
|
7134
7134
|
if (cols >= WIDE_THRESHOLD) return "wide";
|
|
7135
7135
|
if (cols >= MEDIUM_THRESHOLD) return "medium";
|
|
@@ -7141,6 +7141,7 @@ function getDetailWidth(cols) {
|
|
|
7141
7141
|
function PanelLayout({
|
|
7142
7142
|
cols,
|
|
7143
7143
|
issuesPanelHeight,
|
|
7144
|
+
totalHeight,
|
|
7144
7145
|
reposPanel,
|
|
7145
7146
|
statusesPanel,
|
|
7146
7147
|
issuesPanel,
|
|
@@ -7151,7 +7152,7 @@ function PanelLayout({
|
|
|
7151
7152
|
const mode = getLayoutMode(cols);
|
|
7152
7153
|
if (mode === "wide") {
|
|
7153
7154
|
const detailWidth = getDetailWidth(cols);
|
|
7154
|
-
return /* @__PURE__ */ jsxs23(Box22, { flexDirection: "column", children: [
|
|
7155
|
+
return /* @__PURE__ */ jsxs23(Box22, { flexDirection: "column", height: totalHeight, overflow: "hidden", children: [
|
|
7155
7156
|
/* @__PURE__ */ jsxs23(Box22, { height: issuesPanelHeight, children: [
|
|
7156
7157
|
!hideLeftPanel ? /* @__PURE__ */ jsxs23(Box22, { flexDirection: "column", width: LEFT_COL_WIDTH, children: [
|
|
7157
7158
|
reposPanel,
|
|
@@ -7164,7 +7165,7 @@ function PanelLayout({
|
|
|
7164
7165
|
] });
|
|
7165
7166
|
}
|
|
7166
7167
|
if (mode === "medium") {
|
|
7167
|
-
return /* @__PURE__ */ jsxs23(Box22, { flexDirection: "column", children: [
|
|
7168
|
+
return /* @__PURE__ */ jsxs23(Box22, { flexDirection: "column", height: totalHeight, overflow: "hidden", children: [
|
|
7168
7169
|
/* @__PURE__ */ jsxs23(Box22, { height: issuesPanelHeight, children: [
|
|
7169
7170
|
!hideLeftPanel ? /* @__PURE__ */ jsxs23(Box22, { flexDirection: "column", width: LEFT_COL_WIDTH, children: [
|
|
7170
7171
|
reposPanel,
|
|
@@ -7175,16 +7176,16 @@ function PanelLayout({
|
|
|
7175
7176
|
/* @__PURE__ */ jsx23(Box22, { height: ACTIVITY_HEIGHT, children: activityPanel })
|
|
7176
7177
|
] });
|
|
7177
7178
|
}
|
|
7178
|
-
return /* @__PURE__ */ jsxs23(Box22, { flexDirection: "column", children: [
|
|
7179
|
-
!hideLeftPanel ? /* @__PURE__ */ jsxs23(
|
|
7180
|
-
reposPanel,
|
|
7181
|
-
statusesPanel
|
|
7179
|
+
return /* @__PURE__ */ jsxs23(Box22, { flexDirection: "column", height: totalHeight, overflow: "hidden", children: [
|
|
7180
|
+
!hideLeftPanel ? /* @__PURE__ */ jsxs23(Box22, { height: STACKED_TOP_HEIGHT, flexShrink: 0, children: [
|
|
7181
|
+
/* @__PURE__ */ jsx23(Box22, { width: Math.floor(cols / 2), overflow: "hidden", children: reposPanel }),
|
|
7182
|
+
/* @__PURE__ */ jsx23(Box22, { flexGrow: 1, overflow: "hidden", children: statusesPanel })
|
|
7182
7183
|
] }) : null,
|
|
7183
7184
|
/* @__PURE__ */ jsx23(Box22, { flexGrow: 1, flexDirection: "column", children: issuesPanel }),
|
|
7184
7185
|
/* @__PURE__ */ jsx23(Box22, { height: ACTIVITY_HEIGHT, children: activityPanel })
|
|
7185
7186
|
] });
|
|
7186
7187
|
}
|
|
7187
|
-
var WIDE_THRESHOLD, MEDIUM_THRESHOLD, LEFT_COL_WIDTH, ACTIVITY_HEIGHT;
|
|
7188
|
+
var WIDE_THRESHOLD, MEDIUM_THRESHOLD, LEFT_COL_WIDTH, ACTIVITY_HEIGHT, STACKED_TOP_HEIGHT;
|
|
7188
7189
|
var init_panel_layout = __esm({
|
|
7189
7190
|
"src/board/components/panel-layout.tsx"() {
|
|
7190
7191
|
"use strict";
|
|
@@ -7192,12 +7193,13 @@ var init_panel_layout = __esm({
|
|
|
7192
7193
|
MEDIUM_THRESHOLD = 100;
|
|
7193
7194
|
LEFT_COL_WIDTH = 24;
|
|
7194
7195
|
ACTIVITY_HEIGHT = 5;
|
|
7196
|
+
STACKED_TOP_HEIGHT = 7;
|
|
7195
7197
|
}
|
|
7196
7198
|
});
|
|
7197
7199
|
|
|
7198
7200
|
// src/board/components/repos-panel.tsx
|
|
7199
7201
|
import { Box as Box23, Text as Text22 } from "ink";
|
|
7200
|
-
import { Fragment as
|
|
7202
|
+
import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
7201
7203
|
function shortName(fullName) {
|
|
7202
7204
|
return fullName.includes("/") ? fullName.split("/")[1] ?? fullName : fullName;
|
|
7203
7205
|
}
|
|
@@ -7230,7 +7232,7 @@ function ReposPanel({
|
|
|
7230
7232
|
aboveCount = scroll.aboveCount;
|
|
7231
7233
|
belowCount = scroll.belowCount;
|
|
7232
7234
|
}
|
|
7233
|
-
return /* @__PURE__ */ jsx24(Panel, { title: "[1] Repos", isActive, width, flexGrow, height, children: repos.length === 0 ? /* @__PURE__ */ jsx24(Text22, { color: "gray", children: "\u2014" }) : /* @__PURE__ */ jsxs24(
|
|
7235
|
+
return /* @__PURE__ */ jsx24(Panel, { title: "[1] Repos", isActive, width, flexGrow, height, children: repos.length === 0 ? /* @__PURE__ */ jsx24(Text22, { color: "gray", children: "\u2014" }) : /* @__PURE__ */ jsxs24(Fragment3, { children: [
|
|
7234
7236
|
hasMoreAbove ? /* @__PURE__ */ jsxs24(Text22, { color: "gray", dimColor: true, children: [
|
|
7235
7237
|
" ",
|
|
7236
7238
|
"\u25B2 ",
|
|
@@ -7534,7 +7536,7 @@ var init_row_renderer = __esm({
|
|
|
7534
7536
|
|
|
7535
7537
|
// src/board/components/statuses-panel.tsx
|
|
7536
7538
|
import { Box as Box26, Text as Text25 } from "ink";
|
|
7537
|
-
import { Fragment as
|
|
7539
|
+
import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7538
7540
|
function StatusesPanel({
|
|
7539
7541
|
groups,
|
|
7540
7542
|
selectedIdx,
|
|
@@ -7572,7 +7574,7 @@ function StatusesPanel({
|
|
|
7572
7574
|
width,
|
|
7573
7575
|
flexGrow,
|
|
7574
7576
|
height,
|
|
7575
|
-
children: groups.length === 0 ? /* @__PURE__ */ jsx27(Text25, { color: "gray", children: "\u2014" }) : /* @__PURE__ */ jsxs27(
|
|
7577
|
+
children: groups.length === 0 ? /* @__PURE__ */ jsx27(Text25, { color: "gray", children: "\u2014" }) : /* @__PURE__ */ jsxs27(Fragment4, { children: [
|
|
7576
7578
|
hasMoreAbove ? /* @__PURE__ */ jsxs27(Text25, { color: "gray", dimColor: true, children: [
|
|
7577
7579
|
" ",
|
|
7578
7580
|
"\u25B2 ",
|
|
@@ -7615,10 +7617,10 @@ var init_statuses_panel = __esm({
|
|
|
7615
7617
|
// src/board/components/toast-container.tsx
|
|
7616
7618
|
import { Spinner as Spinner3 } from "@inkjs/ui";
|
|
7617
7619
|
import { Box as Box27, Text as Text26 } from "ink";
|
|
7618
|
-
import { Fragment as
|
|
7620
|
+
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7619
7621
|
function ToastContainer({ toasts }) {
|
|
7620
7622
|
if (toasts.length === 0) return null;
|
|
7621
|
-
return /* @__PURE__ */ jsx28(Box27, { flexDirection: "column", children: toasts.map((t) => /* @__PURE__ */ jsx28(Box27, { children: t.type === "loading" ? /* @__PURE__ */ jsxs28(
|
|
7623
|
+
return /* @__PURE__ */ jsx28(Box27, { flexDirection: "column", children: toasts.map((t) => /* @__PURE__ */ jsx28(Box27, { children: t.type === "loading" ? /* @__PURE__ */ jsxs28(Fragment5, { children: [
|
|
7622
7624
|
/* @__PURE__ */ jsx28(Spinner3, { label: "" }),
|
|
7623
7625
|
/* @__PURE__ */ jsxs28(Text26, { color: "cyan", children: [
|
|
7624
7626
|
" ",
|
|
@@ -7654,7 +7656,7 @@ import { execFile as execFile2, spawn as spawn4 } from "child_process";
|
|
|
7654
7656
|
import { Spinner as Spinner4 } from "@inkjs/ui";
|
|
7655
7657
|
import { Box as Box28, Text as Text27, useApp, useStdout as useStdout2 } from "ink";
|
|
7656
7658
|
import { useCallback as useCallback16, useEffect as useEffect14, useMemo as useMemo5, useRef as useRef19, useState as useState21 } from "react";
|
|
7657
|
-
import { Fragment as
|
|
7659
|
+
import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7658
7660
|
function resolvePhaseConfig(rc, config2, issueTitle, phase) {
|
|
7659
7661
|
const phasePrompts = rc.workflow?.phasePrompts ?? config2.board.workflow?.phasePrompts ?? {};
|
|
7660
7662
|
const template = phasePrompts[phase] ?? DEFAULT_PHASE_PROMPTS[phase];
|
|
@@ -8462,13 +8464,16 @@ function Dashboard({ config: config2, options, activeProfile }) {
|
|
|
8462
8464
|
label,
|
|
8463
8465
|
count: issues.length
|
|
8464
8466
|
}));
|
|
8467
|
+
const leftPanelWidth = layoutMode === "stacked" ? Math.floor(usableWidth / 2) : LEFT_COL_WIDTH;
|
|
8468
|
+
const leftPanelHeight = layoutMode === "stacked" ? STACKED_TOP_HEIGHT : void 0;
|
|
8465
8469
|
const reposPanel = /* @__PURE__ */ jsx29(
|
|
8466
8470
|
ReposPanel,
|
|
8467
8471
|
{
|
|
8468
8472
|
repos: reposData,
|
|
8469
8473
|
selectedIdx: clampedRepoIdx,
|
|
8470
8474
|
isActive: panelFocus.activePanelId === 1,
|
|
8471
|
-
width:
|
|
8475
|
+
width: leftPanelWidth,
|
|
8476
|
+
height: leftPanelHeight
|
|
8472
8477
|
}
|
|
8473
8478
|
);
|
|
8474
8479
|
const statusesPanel = /* @__PURE__ */ jsx29(
|
|
@@ -8477,8 +8482,9 @@ function Dashboard({ config: config2, options, activeProfile }) {
|
|
|
8477
8482
|
groups: statusesData,
|
|
8478
8483
|
selectedIdx: clampedStatusIdx,
|
|
8479
8484
|
isActive: panelFocus.activePanelId === 2,
|
|
8480
|
-
width:
|
|
8481
|
-
flexGrow: 1
|
|
8485
|
+
width: leftPanelWidth,
|
|
8486
|
+
...layoutMode !== "stacked" ? { flexGrow: 1 } : {},
|
|
8487
|
+
height: leftPanelHeight
|
|
8482
8488
|
}
|
|
8483
8489
|
);
|
|
8484
8490
|
const issuesPanelTitle = `[3] Issues${selectedSection ? ` \u2014 ${selectedSection.repo.shortName}` : ""}${selectedStatusGroup ? ` / ${selectedStatusGroup.label}` : ""}`;
|
|
@@ -8543,7 +8549,7 @@ function Dashboard({ config: config2, options, activeProfile }) {
|
|
|
8543
8549
|
}
|
|
8544
8550
|
)
|
|
8545
8551
|
] });
|
|
8546
|
-
return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 1, children: [
|
|
8552
|
+
return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 1, height: termSize.rows, overflow: "hidden", children: [
|
|
8547
8553
|
/* @__PURE__ */ jsxs29(Box28, { children: [
|
|
8548
8554
|
/* @__PURE__ */ jsx29(Text27, { color: "cyan", bold: true, children: "HOG BOARD" }),
|
|
8549
8555
|
activeProfile ? /* @__PURE__ */ jsxs29(Text27, { color: "yellow", children: [
|
|
@@ -8558,10 +8564,10 @@ function Dashboard({ config: config2, options, activeProfile }) {
|
|
|
8558
8564
|
dateStr
|
|
8559
8565
|
] }),
|
|
8560
8566
|
/* @__PURE__ */ jsx29(Text27, { children: " " }),
|
|
8561
|
-
isRefreshing ? /* @__PURE__ */ jsxs29(
|
|
8567
|
+
isRefreshing ? /* @__PURE__ */ jsxs29(Fragment6, { children: [
|
|
8562
8568
|
/* @__PURE__ */ jsx29(Spinner4, { label: "" }),
|
|
8563
8569
|
/* @__PURE__ */ jsx29(Text27, { color: "cyan", children: " Refreshing..." })
|
|
8564
|
-
] }) : /* @__PURE__ */ jsxs29(
|
|
8570
|
+
] }) : /* @__PURE__ */ jsxs29(Fragment6, { children: [
|
|
8565
8571
|
/* @__PURE__ */ jsx29(RefreshAge, { lastRefresh }),
|
|
8566
8572
|
consecutiveFailures > 0 ? /* @__PURE__ */ jsx29(Text27, { color: "red", children: " (!)" }) : null
|
|
8567
8573
|
] }),
|
|
@@ -8684,6 +8690,7 @@ function Dashboard({ config: config2, options, activeProfile }) {
|
|
|
8684
8690
|
{
|
|
8685
8691
|
cols: termSize.cols,
|
|
8686
8692
|
issuesPanelHeight,
|
|
8693
|
+
totalHeight: totalPanelHeight,
|
|
8687
8694
|
reposPanel,
|
|
8688
8695
|
statusesPanel,
|
|
8689
8696
|
issuesPanel,
|
|
@@ -9788,7 +9795,7 @@ async function resolveRef(ref, config2) {
|
|
|
9788
9795
|
}
|
|
9789
9796
|
}
|
|
9790
9797
|
var program = new Command();
|
|
9791
|
-
program.name("hog").description("Personal command deck \u2014 GitHub Projects dashboard with workflow orchestration").version("1.24.
|
|
9798
|
+
program.name("hog").description("Personal command deck \u2014 GitHub Projects dashboard with workflow orchestration").version("1.24.2").option("--json", "Force JSON output").option("--human", "Force human-readable output").hook("preAction", (thisCommand) => {
|
|
9792
9799
|
const opts = thisCommand.opts();
|
|
9793
9800
|
if (opts.json) setFormat("json");
|
|
9794
9801
|
if (opts.human) setFormat("human");
|