@dotobokuri/fleet-console 1.35.0 → 1.36.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/cli.mjs +26 -11
- package/dist/client/assets/{_baseUniq--isZn0gt.js → _baseUniq-CwLDZdOI.js} +1 -1
- package/dist/client/assets/{arc-CbzUc80R.js → arc-tKcYmjnj.js} +1 -1
- package/dist/client/assets/{architectureDiagram-Q4EWVU46-KMk7A7ht.js → architectureDiagram-Q4EWVU46-BEW3LfMm.js} +1 -1
- package/dist/client/assets/{blockDiagram-DXYQGD6D-BDIXylVL.js → blockDiagram-DXYQGD6D-D75Os26_.js} +1 -1
- package/dist/client/assets/{c4Diagram-AHTNJAMY-4BtEjWxc.js → c4Diagram-AHTNJAMY-Bcdtruo6.js} +1 -1
- package/dist/client/assets/channel-C5bM_0IF.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-B6P7vZc2.js → chunk-4BX2VUAB-BGaUgQ5x.js} +1 -1
- package/dist/client/assets/{chunk-4TB4RGXK-w5tBo1dz.js → chunk-4TB4RGXK-D6oxvtUg.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-C_Bcd4uB.js → chunk-55IACEB6-Dm1dAneB.js} +1 -1
- package/dist/client/assets/{chunk-EDXVE4YY-BikIv-lO.js → chunk-EDXVE4YY--qIAYBGN.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-C785J70Z.js → chunk-FMBD7UC4-CSSTTMQl.js} +1 -1
- package/dist/client/assets/{chunk-OYMX7WX6-qhvy0Mwx.js → chunk-OYMX7WX6-BbLtxvbT.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-28VsIAWd.js → chunk-QZHKN3VN-CIP17cTw.js} +1 -1
- package/dist/client/assets/{chunk-YZCP3GAM-Dj_CFH0t.js → chunk-YZCP3GAM-CDu5_M5k.js} +1 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-CTdAH4oj.js +1 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-CTdAH4oj.js +1 -0
- package/dist/client/assets/clone-ChP1caEV.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-CbwRTcWp.js → cose-bilkent-S5V4N54A-BAaZGNsd.js} +1 -1
- package/dist/client/assets/{dagre-KV5264BT-DmTFlNmc.js → dagre-KV5264BT-Dw1lZHPg.js} +1 -1
- package/dist/client/assets/{diagram-5BDNPKRD-D5filFx0.js → diagram-5BDNPKRD-CpRJDtQy.js} +1 -1
- package/dist/client/assets/{diagram-G4DWMVQ6-BstKtz5F.js → diagram-G4DWMVQ6-BJsJWsoU.js} +1 -1
- package/dist/client/assets/{diagram-MMDJMWI5-BubZFKBf.js → diagram-MMDJMWI5-DLf-9R0r.js} +1 -1
- package/dist/client/assets/{diagram-TYMM5635-Dkt0qt66.js → diagram-TYMM5635-B7CE6PmK.js} +1 -1
- package/dist/client/assets/{erDiagram-SMLLAGMA-D32vcceA.js → erDiagram-SMLLAGMA-BGJFXhA1.js} +1 -1
- package/dist/client/assets/{flowDiagram-DWJPFMVM-8iX8d0Mm.js → flowDiagram-DWJPFMVM-Ce1szoxZ.js} +1 -1
- package/dist/client/assets/{ganttDiagram-T4ZO3ILL-DVdts0bT.js → ganttDiagram-T4ZO3ILL-BbmLYIQ6.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-C36cV6di.js → gitGraphDiagram-UUTBAWPF-mhRozZkF.js} +1 -1
- package/dist/client/assets/{graph-BfCG4izN.js → graph-z2aUtlR6.js} +1 -1
- package/dist/client/assets/index-C8IMy1n8.js +452 -0
- package/dist/client/assets/index-CQ_r0A4o.css +1 -0
- package/dist/client/assets/{infoDiagram-42DDH7IO-7hCUS4JK.js → infoDiagram-42DDH7IO-CI8Uo54H.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-DYOGN_tm.js → ishikawaDiagram-UXIWVN3A-oezL2Oft.js} +1 -1
- package/dist/client/assets/{journeyDiagram-VCZTEJTY-C-RaUFGz.js → journeyDiagram-VCZTEJTY-Dh5PCOQJ.js} +1 -1
- package/dist/client/assets/{kanban-definition-6JOO6SKY-7GR2tX78.js → kanban-definition-6JOO6SKY-T55OBLPL.js} +1 -1
- package/dist/client/assets/{layout-C9u6a9pL.js → layout-DwhW2g8g.js} +1 -1
- package/dist/client/assets/{linear-CoxISMQN.js → linear-DHL9M4R3.js} +1 -1
- package/dist/client/assets/{mermaid.core-Clx-Pww4.js → mermaid.core-BCC_6SjX.js} +4 -4
- package/dist/client/assets/{min-B7iH_omx.js → min-BZHXF7gx.js} +1 -1
- package/dist/client/assets/{mindmap-definition-QFDTVHPH-BEg4jpMk.js → mindmap-definition-QFDTVHPH-BL2wuzx1.js} +1 -1
- package/dist/client/assets/{pieDiagram-DEJITSTG-Cu-NdmIs.js → pieDiagram-DEJITSTG-LSVcby3m.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-34T5L4WZ-BW_7SRcp.js → quadrantDiagram-34T5L4WZ-DFm4bsUC.js} +1 -1
- package/dist/client/assets/{requirementDiagram-MS252O5E-C_F2SkO4.js → requirementDiagram-MS252O5E-BDTfCRkf.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-XADWPNL6-B7f43JV1.js → sankeyDiagram-XADWPNL6-CLu8OWRr.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-FGHM5R23-oARdfmhl.js → sequenceDiagram-FGHM5R23-dkd-VtDs.js} +1 -1
- package/dist/client/assets/{stateDiagram-FHFEXIEX-VKGucJY7.js → stateDiagram-FHFEXIEX-BOehSPHU.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CaW4mQYt.js +1 -0
- package/dist/client/assets/{timeline-definition-GMOUNBTQ-DsImBBQe.js → timeline-definition-GMOUNBTQ-CKudP4j5.js} +1 -1
- package/dist/client/assets/{vennDiagram-DHZGUBPP-DdJLtnOA.js → vennDiagram-DHZGUBPP-BO8Dge_x.js} +1 -1
- package/dist/client/assets/{wardley-RL74JXVD-Cn3hq_Uh.js → wardley-RL74JXVD-CAwCIxqq.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-NUSXRM2D-VZCV5eGr.js → wardleyDiagram-NUSXRM2D-tO9Kn5jm.js} +1 -1
- package/dist/client/assets/{xychartDiagram-5P7HB3ND-BglQI2vQ.js → xychartDiagram-5P7HB3ND-yipNB3Gn.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/fleet-plugins/ledger/routes.mjs +17209 -0
- package/dist/fleet-plugins/repository/routes.mjs +18 -9
- package/dist/fleet-plugins/scuttlebutt/routes.mjs +23055 -0
- package/dist/fleet-plugins/terminal/routes.mjs +81 -13
- package/package.json +1 -1
- package/dist/client/assets/channel-DNy689Yu.js +0 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-BN9_O5GO.js +0 -1
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-BN9_O5GO.js +0 -1
- package/dist/client/assets/clone-CYXyhbsy.js +0 -1
- package/dist/client/assets/index-0s24Vlsc.css +0 -1
- package/dist/client/assets/index-o0x3lJ2C.js +0 -452
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-DfRePizj.js +0 -1
|
@@ -898,9 +898,9 @@ async function normalizeWorktreePath(worktreePath) {
|
|
|
898
898
|
return worktreePath;
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
|
-
async function readHeadRevList(gitCwd) {
|
|
901
|
+
async function readHeadRevList(gitCwd, skip, limit) {
|
|
902
902
|
try {
|
|
903
|
-
return (await runGit(["rev-list", "-n",
|
|
903
|
+
return (await runGit(["rev-list", "-n", String(Math.max(1e3, skip + limit + 800)), "HEAD"], { cwd: gitCwd })).stdout;
|
|
904
904
|
} catch (error) {
|
|
905
905
|
if (error instanceof GitExecutorError) return "";
|
|
906
906
|
throw error;
|
|
@@ -933,6 +933,12 @@ async function handleRepositoryLog(req, res, ctx) {
|
|
|
933
933
|
ctx.host.http.writeJson(res, 400, { error: "invalid_request" });
|
|
934
934
|
return;
|
|
935
935
|
}
|
|
936
|
+
const limit = body.limit === void 0 ? 200 : body.limit;
|
|
937
|
+
const skip = body.skip === void 0 ? 0 : body.skip;
|
|
938
|
+
if (!Number.isInteger(limit) || typeof limit !== "number" || limit < 1 || limit > 500 || !Number.isInteger(skip) || typeof skip !== "number" || skip < 0) {
|
|
939
|
+
ctx.host.http.writeJson(res, 400, { error: "invalid_request" });
|
|
940
|
+
return;
|
|
941
|
+
}
|
|
936
942
|
const theaterPath = ctx.host.paths.resolveTheaterPath(theaterId);
|
|
937
943
|
if (!theaterPath) {
|
|
938
944
|
ctx.host.http.writeJson(res, 404, { error: "theater_not_found" });
|
|
@@ -959,20 +965,23 @@ async function handleRepositoryLog(req, res, ctx) {
|
|
|
959
965
|
const [worktrees, currentWorktreePath, headRevList] = await Promise.all([
|
|
960
966
|
runGit(["worktree", "list", "--porcelain"], { cwd: gitCwd }),
|
|
961
967
|
readCurrentWorktreePath(gitCwd),
|
|
962
|
-
readHeadRevList(gitCwd)
|
|
968
|
+
readHeadRevList(gitCwd, skip, limit)
|
|
963
969
|
]);
|
|
964
970
|
const checkouts = await parseWorktreePorcelain(worktrees.stdout, currentWorktreePath);
|
|
965
971
|
const worktreeRevs = [...new Set(checkouts.map((checkout) => checkout.sha))].filter((sha) => WORKTREE_SHA_RE.test(sha) && !/^0+$/.test(sha));
|
|
966
972
|
const headRevs = headRevList ? ["HEAD"] : [];
|
|
967
973
|
const [realGitCwd, realToplevel] = await Promise.all([normalizeWorktreePath(gitCwd), normalizeWorktreePath(currentWorktreePath)]);
|
|
968
974
|
const scopePathspec = realToplevel !== "" && realGitCwd === realToplevel ? [] : ["."];
|
|
969
|
-
const
|
|
975
|
+
const skipArg = skip > 0 ? [`--skip=${skip}`] : [];
|
|
976
|
+
const result = resolvedRef ? await runGit(["log", resolvedRef, "--date-order", "-n", String(limit + 1), ...skipArg, "--decorate=full", "--pretty=format:%x1e%H%x00%h%x00%s%x00%an%x00%ar%x00%at%x00%D%x00%P", "--", ...scopePathspec], { cwd: gitCwd }) : await runGit(
|
|
970
977
|
// --all은 refs/stash·refs/notes까지 그래프에 유입시키므로 브랜치/태그/원격 + 현재 HEAD + 워크트리 HEAD로 한정한다
|
|
971
|
-
["log", "--branches", "--tags", "--remotes", "--date-order", "-n",
|
|
978
|
+
["log", "--branches", "--tags", "--remotes", "--date-order", "-n", String(limit + 1), ...skipArg, "--decorate=full", "--pretty=format:%x1e%H%x00%h%x00%s%x00%an%x00%ar%x00%at%x00%D%x00%P", ...headRevs, ...worktreeRevs, "--", ...scopePathspec],
|
|
972
979
|
{ cwd: gitCwd }
|
|
973
980
|
);
|
|
974
|
-
const
|
|
975
|
-
|
|
981
|
+
const parsedCommits = parseLogOutput(result.stdout);
|
|
982
|
+
const hasMore = parsedCommits.length > limit;
|
|
983
|
+
const commits = annotateHeadReachability(parsedCommits.slice(0, limit), headRevList);
|
|
984
|
+
ctx.host.http.writeJson(res, 200, { commits, checkouts, hasMore, ...result.truncated ? { truncated: true } : {} });
|
|
976
985
|
} catch (error) {
|
|
977
986
|
if (error instanceof GitExecutorError) {
|
|
978
987
|
if (requestedRef !== void 0 && error.code === "non_zero_exit") {
|
|
@@ -980,7 +989,7 @@ async function handleRepositoryLog(req, res, ctx) {
|
|
|
980
989
|
return;
|
|
981
990
|
}
|
|
982
991
|
if (error.code === "no_git_repo") {
|
|
983
|
-
ctx.host.http.writeJson(res, 200, { commits: [], checkouts: [] });
|
|
992
|
+
ctx.host.http.writeJson(res, 200, { commits: [], checkouts: [], hasMore: false });
|
|
984
993
|
return;
|
|
985
994
|
}
|
|
986
995
|
if (error.code === "git_unavailable") {
|
|
@@ -988,7 +997,7 @@ async function handleRepositoryLog(req, res, ctx) {
|
|
|
988
997
|
return;
|
|
989
998
|
}
|
|
990
999
|
if (isNoHeadError2(error)) {
|
|
991
|
-
ctx.host.http.writeJson(res, 200, { commits: [], checkouts: [] });
|
|
1000
|
+
ctx.host.http.writeJson(res, 200, { commits: [], checkouts: [], hasMore: false });
|
|
992
1001
|
return;
|
|
993
1002
|
}
|
|
994
1003
|
ctx.host.http.writeJson(res, 500, { error: "git_failed" });
|