executant 1.13.0 → 1.14.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 +60 -29
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1162,6 +1162,12 @@ var STATUS_COLOR = {
|
|
|
1162
1162
|
function statusIcon(status, tick) {
|
|
1163
1163
|
return status === "running" ? SPINNER[tick % SPINNER.length] : STATUS_ICON[status] ?? "\xB7";
|
|
1164
1164
|
}
|
|
1165
|
+
function countIterationRows(iterationHistory, maxVisible) {
|
|
1166
|
+
if (!iterationHistory?.length) return 0;
|
|
1167
|
+
if (iterationHistory.every((r) => r.item === String(r.iteration))) return 0;
|
|
1168
|
+
const visible = Math.min(iterationHistory.length, maxVisible);
|
|
1169
|
+
return visible + (iterationHistory.length > maxVisible ? 1 : 0);
|
|
1170
|
+
}
|
|
1165
1171
|
var EXIT_DELAY_MS = 300;
|
|
1166
1172
|
function formatHeaderElapsed(start, end) {
|
|
1167
1173
|
const ms = (end ?? Date.now()) - start;
|
|
@@ -1405,20 +1411,34 @@ function App({ workflow: workflow2, events: events2, options: options2, updateCh
|
|
|
1405
1411
|
}, [events2, exit]);
|
|
1406
1412
|
const { isRawModeSupported } = useStdin();
|
|
1407
1413
|
const { stdout } = useStdout();
|
|
1408
|
-
const terminalRows = stdout?.rows ?? 24;
|
|
1409
|
-
const FIXED_OVERHEAD = 12;
|
|
1410
|
-
const logPaneMaxLines = Math.max(
|
|
1411
|
-
5,
|
|
1412
|
-
terminalRows - FIXED_OVERHEAD - state.tasks.length
|
|
1413
|
-
);
|
|
1414
|
-
const [tick, setTick] = useState(0);
|
|
1415
|
-
useInterval(() => {
|
|
1416
|
-
if (!state.endTime) setTick((t) => t + 1);
|
|
1417
|
-
}, 100);
|
|
1418
1414
|
const [updateVersion, setUpdateVersion] = useState(null);
|
|
1419
1415
|
useEffect2(() => {
|
|
1420
1416
|
updateCheck2.then(setUpdateVersion);
|
|
1421
1417
|
}, [updateCheck2]);
|
|
1418
|
+
const [tick, setTick] = useState(0);
|
|
1419
|
+
useInterval(() => {
|
|
1420
|
+
if (!state.endTime) setTick((t) => t + 1);
|
|
1421
|
+
}, 100);
|
|
1422
|
+
const terminalRows = stdout?.rows ?? 24;
|
|
1423
|
+
const LOG_PANE_MIN = 5;
|
|
1424
|
+
const runningTask = state.tasks.find((t) => t.status === "running");
|
|
1425
|
+
const iterationRowCount = countIterationRows(
|
|
1426
|
+
runningTask?.iterationHistory,
|
|
1427
|
+
MAX_VISIBLE_ITERATIONS
|
|
1428
|
+
);
|
|
1429
|
+
const FIXED_OVERHEAD = 12 + (updateVersion ? 1 : 0);
|
|
1430
|
+
const availableForTaskSection = Math.max(
|
|
1431
|
+
1,
|
|
1432
|
+
terminalRows - FIXED_OVERHEAD - LOG_PANE_MIN - iterationRowCount
|
|
1433
|
+
);
|
|
1434
|
+
const visibleTaskCount = state.tasks.length > availableForTaskSection ? availableForTaskSection - 1 : state.tasks.length;
|
|
1435
|
+
const taskSlice = state.tasks.slice(-visibleTaskCount);
|
|
1436
|
+
const hiddenTaskCount = state.tasks.length - taskSlice.length;
|
|
1437
|
+
const taskRowsUsed = visibleTaskCount + (hiddenTaskCount > 0 ? 1 : 0);
|
|
1438
|
+
const logPaneMaxLines = Math.max(
|
|
1439
|
+
LOG_PANE_MIN,
|
|
1440
|
+
terminalRows - FIXED_OVERHEAD - taskRowsUsed - iterationRowCount
|
|
1441
|
+
);
|
|
1422
1442
|
const elapsed = formatHeaderElapsed(state.startTime, state.endTime);
|
|
1423
1443
|
const activeTask = state.tasks[state.currentIndex];
|
|
1424
1444
|
const completedCount = state.tasks.filter(
|
|
@@ -1440,25 +1460,36 @@ function App({ workflow: workflow2, events: events2, options: options2, updateCh
|
|
|
1440
1460
|
filterInfo
|
|
1441
1461
|
] })
|
|
1442
1462
|
] }),
|
|
1443
|
-
/* @__PURE__ */
|
|
1444
|
-
/* @__PURE__ */
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1463
|
+
/* @__PURE__ */ jsxs4(Box5, { flexDirection: "column", marginBottom: 1, children: [
|
|
1464
|
+
hiddenTaskCount > 0 && /* @__PURE__ */ jsxs4(Text5, { dimColor: true, children: [
|
|
1465
|
+
" ",
|
|
1466
|
+
"\xB7\xB7\xB7 ",
|
|
1467
|
+
hiddenTaskCount,
|
|
1468
|
+
" earlier"
|
|
1469
|
+
] }),
|
|
1470
|
+
taskSlice.map((taskState, i) => {
|
|
1471
|
+
const globalIndex = hiddenTaskCount + i;
|
|
1472
|
+
return /* @__PURE__ */ jsxs4(Box5, { flexDirection: "column", children: [
|
|
1473
|
+
/* @__PURE__ */ jsx5(
|
|
1474
|
+
TaskRow,
|
|
1475
|
+
{
|
|
1476
|
+
index: globalIndex,
|
|
1477
|
+
tick,
|
|
1478
|
+
taskState,
|
|
1479
|
+
isActive: globalIndex === state.currentIndex
|
|
1480
|
+
}
|
|
1481
|
+
),
|
|
1482
|
+
taskState.status === "running" && taskState.iterationHistory?.length ? /* @__PURE__ */ jsx5(
|
|
1483
|
+
IterationList,
|
|
1484
|
+
{
|
|
1485
|
+
iterationHistory: taskState.iterationHistory,
|
|
1486
|
+
tick,
|
|
1487
|
+
maxVisible: MAX_VISIBLE_ITERATIONS
|
|
1488
|
+
}
|
|
1489
|
+
) : null
|
|
1490
|
+
] }, globalIndex);
|
|
1491
|
+
})
|
|
1492
|
+
] }),
|
|
1462
1493
|
activeTask && /* @__PURE__ */ jsx5(
|
|
1463
1494
|
LogPane,
|
|
1464
1495
|
{
|