diffing 0.12.0 → 0.13.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/README.md +56 -791
- package/dist/{cli-agent-CWsOHN-j.mjs → cli-agent-Cx2k0Ki7.mjs} +77 -12
- package/dist/cli.mjs +25 -13
- package/dist/client/assets/{angular-html-PLPuQo0k.js → angular-html-gcUdctE_.js} +1 -1
- package/dist/client/assets/{angular-ts-CE02Ij4b.js → angular-ts-BkjLgJJH.js} +1 -1
- package/dist/client/assets/{apl-CsuUKZoi.js → apl-BtuEza96.js} +1 -1
- package/dist/client/assets/{arc-CgL5kFe-.js → arc-yk_3cjs2.js} +1 -1
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-DxZQWGnx.js → architectureDiagram-3BPJPVTR-DDVXPdzY.js} +1 -1
- package/dist/client/assets/{astro-DkFc7sbz.js → astro-DfUNgEjV.js} +1 -1
- package/dist/client/assets/{blade-BkY07kcC.js → blade-uv3PNTww.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-D5a2KZV2.js → blockDiagram-GPEHLZMM-DlMLqbfD.js} +1 -1
- package/dist/client/assets/{c-T1BrPfJ6.js → c-DcsMh0kd.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-mpMH4kFC.js → c4Diagram-AAUBKEIU-C4ZZJAMJ.js} +1 -1
- package/dist/client/assets/channel-CPOnEOhs.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-vMtgRLFH.js → chunk-2J33WTMH-CwkSvLT8.js} +1 -1
- package/dist/client/assets/{chunk-3OPIFGDE-Dx-FqyO2.js → chunk-3OPIFGDE-s6UH12Df.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-CUrPd8Kv.js → chunk-4BX2VUAB-wGjYymx_.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-DHg3Nr8A.js → chunk-55IACEB6-DObbP11Q.js} +1 -1
- package/dist/client/assets/{chunk-5ZQYHXKU-CpDPvbGs.js → chunk-5ZQYHXKU-DwbkzQEJ.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-3VOGMxwk.js → chunk-727SXJPM-DzoJfly4.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-4dbfbIS6.js → chunk-AQP2D5EJ-f1kNxYS3.js} +1 -1
- package/dist/client/assets/{chunk-BSJP7CBP-Dfyn0Uwp.js → chunk-BSJP7CBP-CTBkVJEp.js} +1 -1
- package/dist/client/assets/{chunk-CSCIHK7Q-VTpSKo0F.js → chunk-CSCIHK7Q-C6dvEyPX.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-kXD1MyOL.js → chunk-FMBD7UC4-C166WZ7L.js} +1 -1
- package/dist/client/assets/{chunk-KSCS5N6A-BrVoWOAb.js → chunk-KSCS5N6A-CaVyQHxA.js} +1 -1
- package/dist/client/assets/{chunk-L5ZTLDWV-wZEQDPsa.js → chunk-L5ZTLDWV-CdW7usF5.js} +1 -1
- package/dist/client/assets/{chunk-LZXEDZCA-D3i0B0eg.js → chunk-LZXEDZCA-imRCFVGq.js} +2 -2
- package/dist/client/assets/{chunk-ND2GUHAM-hDVHT0bN.js → chunk-ND2GUHAM-BJCVPOgO.js} +1 -1
- package/dist/client/assets/{chunk-NZK2D7GU-jQUfhp9h.js → chunk-NZK2D7GU-DodLkks9.js} +1 -1
- package/dist/client/assets/{chunk-O5CBEL6O-CX_vPWhk.js → chunk-O5CBEL6O-DYxYE_dt.js} +1 -1
- package/dist/client/assets/chunk-QZHKN3VN-7sNTyEOs.js +1 -0
- package/dist/client/assets/chunk-WU5MYG2G-DluN2oZF.js +1 -0
- package/dist/client/assets/{chunk-XPW4576I-Co_-vDB4.js → chunk-XPW4576I-DkPXlA-y.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-CHofrzZI.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-B8fKe5FS.js +1 -0
- package/dist/client/assets/{cobol-8-qBLs-a.js → cobol-B5tSUxVN.js} +1 -1
- package/dist/client/assets/{coffee-Bjz5lkyW.js → coffee-B2Q8w4Zu.js} +1 -1
- package/dist/client/assets/{cose-bilkent-S5V4N54A-BljJ0FSA.js → cose-bilkent-S5V4N54A-Bg2tspSU.js} +1 -1
- package/dist/client/assets/{cpp-5BVQCBXT.js → cpp-CfzAEc1z.js} +1 -1
- package/dist/client/assets/{crystal-CCkY93GS.js → crystal-BDxAjW7-.js} +1 -1
- package/dist/client/assets/{css-BTM7Tp2a.js → css-nC3_RAjk.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-BSynd_2D.js → dagre-BM42HDAG-BZiNHe27.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-K3E2CVdy.js → diagram-2AECGRRQ-D3Vd2itQ.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-BQHIrfKc.js → diagram-5GNKFQAL-D44Rm6ep.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-Bqs8sNN4.js → diagram-KO2AKTUF-DwoQejb5.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-C9K4bpQe.js → diagram-LMA3HP47-C1eaDL4X.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-DK6wIXY2.js → diagram-OG6HWLK6-BtBJHHnj.js} +1 -1
- package/dist/client/assets/{dist-1nkZYMRy.js → dist-DUBmiUQf.js} +1 -1
- package/dist/client/assets/{edge-DqN2FJce.js → edge-WCfPDabs.js} +1 -1
- package/dist/client/assets/{elixir-BiAgRUFF.js → elixir-CazmTZo9.js} +1 -1
- package/dist/client/assets/{elm-N1IbY8sz.js → elm-CTqaOirp.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-jsHCiP02.js → erDiagram-TEJ5UH35-CqjpbNDt.js} +1 -1
- package/dist/client/assets/{erb-B-yYlWAZ.js → erb-CK9x36t2.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-DOB1dAWG.js → flowDiagram-I6XJVG4X-CSHJZmlA.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-BYIewcY5.js → ganttDiagram-6RSMTGT7-D6KxkDpI.js} +1 -1
- package/dist/client/assets/{git-rebase-CVkPxOAF.js → git-rebase-Bn8xQDxV.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-VNQzbpv2.js → gitGraphDiagram-PVQCEYII-ZGSlrHF5.js} +1 -1
- package/dist/client/assets/{glimmer-js-BmG1xm72.js → glimmer-js-h7wFfOLo.js} +1 -1
- package/dist/client/assets/{glimmer-ts-CvTgwZsg.js → glimmer-ts-vlZuiamP.js} +1 -1
- package/dist/client/assets/{glsl-DwjNNCbW.js → glsl-CNutENPV.js} +1 -1
- package/dist/client/assets/{graphql-BvgkyF8E.js → graphql-BfddKr9j.js} +1 -1
- package/dist/client/assets/{hack-DH3188x2.js → hack-BkYH75Gx.js} +1 -1
- package/dist/client/assets/{haml-B0GTfMhX.js → haml-CM-xW5RI.js} +1 -1
- package/dist/client/assets/{handlebars-he7hLDd9.js → handlebars-CklcCbzf.js} +1 -1
- package/dist/client/assets/{html-DIYgdTBq.js → html-bltTcC3c.js} +1 -1
- package/dist/client/assets/{html-derivative-2s6MXlci.js → html-derivative-C4R1a7Nf.js} +1 -1
- package/dist/client/assets/{http-COS23XJP.js → http-B6uXoDkp.js} +1 -1
- package/dist/client/assets/{hurl-BlZPjeJt.js → hurl-gquKVFPU.js} +1 -1
- package/dist/client/assets/{index-BrEVVQOB.js → index-yhKiqbkK.js} +150 -150
- package/dist/client/assets/{infoDiagram-5YYISTIA-DQRqk24I.js → infoDiagram-5YYISTIA-DCQv5BKv.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-DU1rqrLx.js → ishikawaDiagram-YF4QCWOH-BqXC35qz.js} +1 -1
- package/dist/client/assets/{java-BAa5w-Qd.js → java-DZLUJ7qo.js} +1 -1
- package/dist/client/assets/{javascript-C9e02ssI.js → javascript-CayXc7uP.js} +1 -1
- package/dist/client/assets/{jinja-Bx37xXwq.js → jinja-CQQUTC0y.js} +1 -1
- package/dist/client/assets/{jison-m_DEf8Jo.js → jison-CvzuCn2x.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-CoHlfevf.js → journeyDiagram-JHISSGLW-bRlSO5Sv.js} +1 -1
- package/dist/client/assets/{json-DtN5AWRW.js → json-BsMA0GaP.js} +1 -1
- package/dist/client/assets/{jsx-BlPpu8bR.js → jsx-Dbxr4aPH.js} +1 -1
- package/dist/client/assets/{julia-BAOmCbHl.js → julia-CZ38GzHV.js} +1 -1
- package/dist/client/assets/{just-C_bvVjwE.js → just-BQwFLV1D.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-BiqYI7_m.js → kanban-definition-UN3LZRKU-BVjoqA0y.js} +1 -1
- package/dist/client/assets/{latex-81pMfNMt.js → latex-BGyrMdgQ.js} +1 -1
- package/dist/client/assets/{line-DCovs9My.js → line-DacHFvZH.js} +1 -1
- package/dist/client/assets/{linear-cJF5XHE7.js → linear-BPGHNTSb.js} +1 -1
- package/dist/client/assets/{liquid-sKRTk6dT.js → liquid-CiA2vjOH.js} +1 -1
- package/dist/client/assets/{lua-C1uZL4IF.js → lua-D9k3fxwM.js} +1 -1
- package/dist/client/assets/{marko-BKEzP1CL.js → marko-CwBH4-2T.js} +1 -1
- package/dist/client/assets/{mdc-CLkfm94H.js → mdc-D4WuuVvw.js} +1 -1
- package/dist/client/assets/{mermaid-parser.core-CTsTbvb2.js → mermaid-parser.core-DuXqm2Gp.js} +1 -1
- package/dist/client/assets/{mermaid.core-D86HJEwL.js → mermaid.core-DRh_KVT1.js} +3 -3
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-CL3heUmL.js → mindmap-definition-RKZ34NQL-C5wytjbD.js} +1 -1
- package/dist/client/assets/{nginx-eDGm66pc.js → nginx-DHMa03ia.js} +1 -1
- package/dist/client/assets/{nim-CoWZPv8-.js → nim-8gK3mQXD.js} +1 -1
- package/dist/client/assets/{perl-MoMqtMVr.js → perl-DqXBmOB_.js} +1 -1
- package/dist/client/assets/{php-DXXVMAtN.js → php-CruAnpl2.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-CWV3TMu4.js → pieDiagram-4H26LBE5-Cv2Csp1M.js} +1 -1
- package/dist/client/assets/{pug-CPWaB94J.js → pug-C7a5y4Mi.js} +1 -1
- package/dist/client/assets/{qml-lhvpx8vk.js → qml-mgWY__NW.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-QV25BYos.js → quadrantDiagram-W4KKPZXB-DHQIHzFU.js} +1 -1
- package/dist/client/assets/{r-DYbUnmmK.js → r-Do5QoKdS.js} +1 -1
- package/dist/client/assets/{razor-DcyOLv96.js → razor-BqdDbm9d.js} +1 -1
- package/dist/client/assets/{regexp-BdY10jm0.js → regexp-CNMlPqVr.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-BPMsmU6J.js → requirementDiagram-4Y6WPE33-rUeJykKo.js} +1 -1
- package/dist/client/assets/{review-export-CMwjJURs.js → review-export-BgwyN8Ky.js} +1 -1
- package/dist/client/assets/{rst-6ShFOzgH.js → rst-PYCtADQ2.js} +1 -1
- package/dist/client/assets/{ruby-B04DeVbi.js → ruby-B8JdoeHE.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-DQJeroPp.js → sankeyDiagram-5OEKKPKP-Bsga6dQU.js} +1 -1
- package/dist/client/assets/{sas-Dj26ftNa.js → sas-kIev4j3d.js} +1 -1
- package/dist/client/assets/{scss-BOHpBkgl.js → scss-cf-rl7q3.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-DdV0Y6Sz.js → sequenceDiagram-3UESZ5HK-BVcwcOB2.js} +1 -1
- package/dist/client/assets/{shellscript-CpHwjRcU.js → shellscript-BHMFbkaV.js} +1 -1
- package/dist/client/assets/{shellsession-BJAvf4GN.js → shellsession-y_3kBnoK.js} +1 -1
- package/dist/client/assets/{soy-B67bZJnL.js → soy-Coc7dfRW.js} +1 -1
- package/dist/client/assets/{sql-8MzOqSsK.js → sql-CsZYO19m.js} +1 -1
- package/dist/client/assets/{src-AaoRSmFl.js → src-ujohT29p.js} +1 -1
- package/dist/client/assets/{stata-aCME945h.js → stata-BFa4m_Eh.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-CMD_Xj2M.js → stateDiagram-AJRCARHV-DBElJIPe.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-BocZ498b.js +1 -0
- package/dist/client/assets/{surrealql-B_V_HxAi.js → surrealql-DlwfRFnC.js} +1 -1
- package/dist/client/assets/{svelte-BcQvTlqz.js → svelte-RrLklQOZ.js} +1 -1
- package/dist/client/assets/{templ-DZCQ2blz.js → templ-BDbBg7z2.js} +1 -1
- package/dist/client/assets/{tex-BfeQ5Wuu.js → tex-BeAp-Hqv.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-CyIS7Zoe.js → timeline-definition-PNZ67QCA-Det2OiYV.js} +1 -1
- package/dist/client/assets/{ts-tags-DVWE0E87.js → ts-tags-Dz-1CFmn.js} +1 -1
- package/dist/client/assets/{tsx-DdJ7Sfqf.js → tsx-Dfi08w8H.js} +1 -1
- package/dist/client/assets/{twig-_gVgaha5.js → twig-BfzYY6Hd.js} +1 -1
- package/dist/client/assets/{typescript-Bj0_LzZV.js → typescript-6FNAPG3Z.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-C-J2kWyk.js → vennDiagram-CIIHVFJN-DhH4H0vl.js} +1 -1
- package/dist/client/assets/{vue-Dnt_GBRb.js → vue-DTPedjqE.js} +1 -1
- package/dist/client/assets/{vue-html-ClVA5__5.js → vue-html-B4sC29Oj.js} +1 -1
- package/dist/client/assets/{vue-vine-BCcz4SVP.js → vue-vine-BWzpqJ4r.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-Dzt4EPh8.js → wardleyDiagram-YWT4CUSO-BC8K10yP.js} +1 -1
- package/dist/client/assets/{xml-BYeUHEti.js → xml-BK8ACjht.js} +1 -1
- package/dist/client/assets/{xsl-Vsx0SZEV.js → xsl-rjlrbfou.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-BAWZKvwP.js → xychartDiagram-2RQKCTM6-DwcVZiB5.js} +1 -1
- package/dist/client/assets/{yaml-C6L1khMK.js → yaml-DM6lgMhS.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/completions-5rtfoxB9.mjs +2 -0
- package/dist/{completions-DvyV49HY.mjs → completions-7YSX1neu.mjs} +6 -1
- package/dist/{doctor-Bz9VHuBI.mjs → doctor-BMfx7_GY.mjs} +13 -11
- package/dist/doctor-BRr5IWHe.mjs +2 -0
- package/dist/{github-DXiEeHzk.mjs → github-BLrnsozP.mjs} +1 -1
- package/dist/{github-DpzqNrUh.mjs → github-DbAFoB92.mjs} +3 -3
- package/dist/{github-attachments-DgOf7BhP.mjs → github-attachments-fNCKYL-Z.mjs} +1 -1
- package/dist/{mcp-zDVzU1vl.mjs → mcp-Bi551clR.mjs} +3 -3
- package/dist/native/tui-darwin-arm64/diffing-tui +0 -0
- package/dist/native/tui-darwin-x64/diffing-tui +0 -0
- package/dist/native/tui-linux-arm64-gnu/diffing-tui +0 -0
- package/dist/native/tui-linux-arm64-musl/diffing-tui +0 -0
- package/dist/native/tui-linux-x64-gnu/diffing-tui +0 -0
- package/dist/native/tui-linux-x64-musl/diffing-tui +0 -0
- package/dist/native/tui-win32-x64-msvc/diffing-tui.exe +0 -0
- package/dist/{server-Dw3lkQ5q.mjs → server-B9NVZu7l.mjs} +23 -10
- package/dist/{session-conflict-Bqt1M4Mp.mjs → session-conflict-CB0IErdn.mjs} +2 -1
- package/dist/{session-manager-BKSZQqDJ.mjs → session-manager-656aJXFE.mjs} +1 -1
- package/dist/session-url-B8TrGGeE.mjs +33 -0
- package/dist/{session-url-sr7lXXVc.mjs → settings-DkPDB_hS.mjs} +18 -30
- package/dist/setup-BiwX7vdd.mjs +446 -0
- package/dist/setup-first-run-DyT0PlOZ.mjs +2 -0
- package/dist/setup-first-run-i1o7DBki.mjs +74 -0
- package/dist/terminal-BroplOnw.mjs +116 -0
- package/package.json +8 -3
- package/scripts/postinstall.mjs +52 -0
- package/dist/client/assets/channel-D3niKhl0.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-CZLFuGpt.js +0 -1
- package/dist/client/assets/chunk-WU5MYG2G-BhcpjkaB.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-DK5KJNIt.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-y5K9t6Se.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-vLl7D4ue.js +0 -1
- /package/dist/{apply-suggestion-CHYnw68I.mjs → apply-suggestion-BsR_8FXW.mjs} +0 -0
- /package/dist/{cli-gh-DI69gJGo.mjs → cli-gh-BQuQpV-s.mjs} +0 -0
- /package/dist/{diff-fingerprint-BgR0tu1o.mjs → diff-fingerprint-BL5jNHnP.mjs} +0 -0
- /package/dist/{find-tui-binary-DVQADOSF.mjs → find-tui-binary-DGspwyvd.mjs} +0 -0
- /package/dist/{handoff-LAFtmnHf.mjs → handoff-DcShCxWJ.mjs} +0 -0
- /package/dist/{review-export-B63eRAVa.mjs → review-export-GW4KNsGN.mjs} +0 -0
- /package/dist/{tui-search-bridge-BGgLCwMF.mjs → tui-search-bridge-fFKqX4Fi.mjs} +0 -0
- /package/dist/{update-check-BUfh4Y6c.mjs → update-check-ISaw61qS.mjs} +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { stdout } from "node:process";
|
|
2
|
+
//#region src/lib/terminal.ts
|
|
3
|
+
const reset = "\x1B[0m";
|
|
4
|
+
const GOLD = 220;
|
|
5
|
+
const OK = 82;
|
|
6
|
+
const OK_BRIGHT = 118;
|
|
7
|
+
const WARN = 214;
|
|
8
|
+
const WARN_BRIGHT = 220;
|
|
9
|
+
const ERROR = 196;
|
|
10
|
+
const INFO = 75;
|
|
11
|
+
/** Whether ANSI styling is allowed (TTY, no NO_COLOR, TERM≠dumb). */
|
|
12
|
+
function isColorEnabled(stream = stdout) {
|
|
13
|
+
if (!stream.isTTY) return false;
|
|
14
|
+
if (process.env.NO_COLOR !== void 0) return false;
|
|
15
|
+
if (process.env.TERM === "dumb") return false;
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
function fg256(code, enabled = isColorEnabled()) {
|
|
19
|
+
return enabled ? `\x1b[38;5;${code}m` : "";
|
|
20
|
+
}
|
|
21
|
+
function bold(text, enabled = isColorEnabled()) {
|
|
22
|
+
return enabled ? `\x1b[1m${text}${reset}` : text;
|
|
23
|
+
}
|
|
24
|
+
function dim(text, enabled = isColorEnabled()) {
|
|
25
|
+
return enabled ? `\x1b[2m${text}${reset}` : text;
|
|
26
|
+
}
|
|
27
|
+
function stripAnsi(str) {
|
|
28
|
+
return str.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "");
|
|
29
|
+
}
|
|
30
|
+
function borderColor(enabled) {
|
|
31
|
+
return fg256(GOLD, enabled);
|
|
32
|
+
}
|
|
33
|
+
function visibleLength(text) {
|
|
34
|
+
return stripAnsi(text).length;
|
|
35
|
+
}
|
|
36
|
+
function padRow(content, innerWidth) {
|
|
37
|
+
const pad = Math.max(0, innerWidth - visibleLength(content));
|
|
38
|
+
return content + " ".repeat(pad);
|
|
39
|
+
}
|
|
40
|
+
/** Gold Unicode box (╭─╮╰─╯│) with optional title row. */
|
|
41
|
+
function box(title, lines, options = {}) {
|
|
42
|
+
const color = options.color ?? isColorEnabled();
|
|
43
|
+
const innerWidth = options.width ?? 62;
|
|
44
|
+
const border = borderColor(color);
|
|
45
|
+
const r = color ? reset : "";
|
|
46
|
+
const top = `${border}╭${"─".repeat(innerWidth)}╮${r}`;
|
|
47
|
+
const bottom = `${border}╰${"─".repeat(innerWidth)}╯${r}`;
|
|
48
|
+
const side = `${border}│${r}`;
|
|
49
|
+
const body = [];
|
|
50
|
+
if (title) {
|
|
51
|
+
body.push(padRow(bold(title, color), innerWidth - 4));
|
|
52
|
+
if (lines.length > 0) body.push("");
|
|
53
|
+
}
|
|
54
|
+
body.push(...lines);
|
|
55
|
+
return [
|
|
56
|
+
"",
|
|
57
|
+
top,
|
|
58
|
+
...body.map((line) => {
|
|
59
|
+
if (!line) return `${side} ${" ".repeat(innerWidth - 4)} ${side}`;
|
|
60
|
+
return `${side} ${padRow(line, innerWidth - 4)} ${side}`;
|
|
61
|
+
}),
|
|
62
|
+
bottom,
|
|
63
|
+
""
|
|
64
|
+
].join("\n");
|
|
65
|
+
}
|
|
66
|
+
/** Horizontal gold rule. */
|
|
67
|
+
function rule(options = {}) {
|
|
68
|
+
const color = options.color ?? isColorEnabled();
|
|
69
|
+
const border = borderColor(color);
|
|
70
|
+
const r = color ? reset : "";
|
|
71
|
+
return `${border}${"─".repeat(40)}${r}`;
|
|
72
|
+
}
|
|
73
|
+
const TONE_ICON = {
|
|
74
|
+
ok: "✓",
|
|
75
|
+
warn: "!",
|
|
76
|
+
error: "✗",
|
|
77
|
+
info: "▌"
|
|
78
|
+
};
|
|
79
|
+
const TONE_COLOR = {
|
|
80
|
+
ok: OK,
|
|
81
|
+
warn: WARN,
|
|
82
|
+
error: ERROR,
|
|
83
|
+
info: INFO
|
|
84
|
+
};
|
|
85
|
+
/** Semantic status line with icon and 256-color foreground. */
|
|
86
|
+
function tone(level, text, options = {}) {
|
|
87
|
+
const color = options.color ?? isColorEnabled();
|
|
88
|
+
const icon = TONE_ICON[level];
|
|
89
|
+
if (!color) return `${icon} ${text}`;
|
|
90
|
+
const accent = fg256(level === "ok" && text.includes("Overall: OK") ? OK_BRIGHT : TONE_COLOR[level], true);
|
|
91
|
+
return `${level === "warn" ? fg256(WARN_BRIGHT, true) : accent}${icon}${reset} ${accent}${text}${reset}`;
|
|
92
|
+
}
|
|
93
|
+
/** Faint hint row: bold keys with dim labels (e.g. Y yes · n no). */
|
|
94
|
+
function hintLine(parts, options = {}) {
|
|
95
|
+
const color = options.color ?? isColorEnabled();
|
|
96
|
+
const sep = color ? dim(" · ", true) : " · ";
|
|
97
|
+
return parts.map(({ key, label }) => {
|
|
98
|
+
return `${bold(key, color)} ${color ? dim(label, true) : label}`;
|
|
99
|
+
}).join(sep);
|
|
100
|
+
}
|
|
101
|
+
/** Step focus rail: ▌ Step 2/5 · Title */
|
|
102
|
+
function stepHeader(step, total, title, options = {}) {
|
|
103
|
+
if (!(options.color ?? isColorEnabled())) return `Step ${step}/${total} · ${title}`;
|
|
104
|
+
const rail = fg256(INFO, true);
|
|
105
|
+
const label = fg256(INFO, true);
|
|
106
|
+
const r = reset;
|
|
107
|
+
return `${rail}▌${r} ${label}Step ${step}/${total}${r} ${dim("·", true)} ${title}`;
|
|
108
|
+
}
|
|
109
|
+
/** Bordered “copy me” block with dim label above content lines. */
|
|
110
|
+
function copyBlock(label, content, options = {}) {
|
|
111
|
+
const color = options.color ?? isColorEnabled();
|
|
112
|
+
const lines = content.trimEnd().split("\n");
|
|
113
|
+
return box(void 0, [color ? dim(label, true) : label, ...lines], options);
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
export { hintLine as a, stepHeader as c, dim as i, tone as l, box as n, isColorEnabled as o, copyBlock as r, rule as s, bold as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "diffing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "local-first CLI for reviewing, navigating, and discussing git diffs with AI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"diffing": "./dist/cli.mjs"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
|
-
"dist"
|
|
29
|
+
"dist",
|
|
30
|
+
"scripts/postinstall.mjs"
|
|
30
31
|
],
|
|
31
32
|
"scripts": {
|
|
32
33
|
"build": "pnpm run build:ts && pnpm run build:tui && pnpm run bundle:tui",
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
"build:tui": "cargo build --release --manifest-path crates/diffing-tui/Cargo.toml",
|
|
35
36
|
"build:tui:debug": "cargo build --manifest-path crates/diffing-tui/Cargo.toml",
|
|
36
37
|
"bundle:tui": "node scripts/stage-tui-binary.mjs",
|
|
38
|
+
"postinstall": "node scripts/postinstall.mjs",
|
|
37
39
|
"changeset": "changeset",
|
|
38
40
|
"dev:client": "vite",
|
|
39
41
|
"dev:server": "tsx src/cli.ts --no-open --port 3433",
|
|
@@ -45,7 +47,10 @@
|
|
|
45
47
|
"verify:tui-bundle": "vitest run src/__tests__/native-bundle.test.ts src/__tests__/find-tui-binary.test.ts",
|
|
46
48
|
"verify:release-bundle": "node scripts/verify-tui-bundle.mjs",
|
|
47
49
|
"prepublishOnly": "pnpm run verify:release-bundle",
|
|
48
|
-
"version-packages": "changeset version"
|
|
50
|
+
"version-packages": "changeset version",
|
|
51
|
+
"docs:dev": "pnpm --dir site dev",
|
|
52
|
+
"docs:build": "pnpm --dir site build",
|
|
53
|
+
"docs:preview": "pnpm --dir site preview"
|
|
49
54
|
},
|
|
50
55
|
"dependencies": {
|
|
51
56
|
"@base-ui-components/react": "1.0.0-rc.0",
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs'
|
|
2
|
+
import { dirname, resolve } from 'node:path'
|
|
3
|
+
import { fileURLToPath } from 'node:url'
|
|
4
|
+
|
|
5
|
+
function shouldPrintPostinstallBanner(env = process.env, isTTY = Boolean(process.stdout.isTTY)) {
|
|
6
|
+
if (!isTTY) return false
|
|
7
|
+
if (
|
|
8
|
+
env.CI ||
|
|
9
|
+
env.CONTINUOUS_INTEGRATION ||
|
|
10
|
+
env.BUILD_NUMBER ||
|
|
11
|
+
env.GITHUB_ACTIONS ||
|
|
12
|
+
env.GITLAB_CI ||
|
|
13
|
+
env.CIRCLECI ||
|
|
14
|
+
env.JENKINS_URL
|
|
15
|
+
) {
|
|
16
|
+
return false
|
|
17
|
+
}
|
|
18
|
+
return true
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function readPackageVersion() {
|
|
22
|
+
try {
|
|
23
|
+
const here = dirname(fileURLToPath(import.meta.url))
|
|
24
|
+
const pkg = JSON.parse(readFileSync(resolve(here, '..', 'package.json'), 'utf-8'))
|
|
25
|
+
return pkg.version ?? 'unknown'
|
|
26
|
+
} catch {
|
|
27
|
+
return 'unknown'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function main() {
|
|
32
|
+
if (!shouldPrintPostinstallBanner()) return
|
|
33
|
+
const version = readPackageVersion()
|
|
34
|
+
try {
|
|
35
|
+
const { formatPostinstallBanner } = await import('../dist/lib/postinstall-banner.mjs')
|
|
36
|
+
process.stdout.write(formatPostinstallBanner(version, { color: true }))
|
|
37
|
+
} catch {
|
|
38
|
+
process.stdout.write(
|
|
39
|
+
[
|
|
40
|
+
'',
|
|
41
|
+
`diffing v${version} installed.`,
|
|
42
|
+
'',
|
|
43
|
+
' Quick start: cd your-repo && diffing',
|
|
44
|
+
' First-time: diffing setup (skills, MCP, doctor)',
|
|
45
|
+
' Docs: docs/getting-started.md',
|
|
46
|
+
'',
|
|
47
|
+
].join('\n'),
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
main()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{at as e,ot as t}from"./chunk-CSCIHK7Q-VTpSKo0F.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-AaoRSmFl.js";var t=class{constructor(e){this.init=e,this.records=this.init()}static{e(this,`ImperativeState`)}reset(){this.records=this.init()}};export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,p as t}from"./src-AaoRSmFl.js";import{x as n}from"./chunk-CSCIHK7Q-VTpSKo0F.js";var r=e(e=>{let{securityLevel:r}=n(),i=t(`body`);return r===`sandbox`&&(i=t((t(`#i${e}`).node()?.contentDocument??document).body)),i.select(`#${e}`)},`selectSvgElement`);export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-AaoRSmFl.js";import"./chunk-CSCIHK7Q-VTpSKo0F.js";import"./chunk-5ZQYHXKU-CpDPvbGs.js";import"./chunk-O5CBEL6O-CX_vPWhk.js";import"./chunk-FMBD7UC4-kXD1MyOL.js";import"./chunk-BSJP7CBP-Dfyn0Uwp.js";import"./chunk-L5ZTLDWV-wZEQDPsa.js";import"./chunk-ND2GUHAM-hDVHT0bN.js";import"./chunk-55IACEB6-DHg3Nr8A.js";import"./chunk-2J33WTMH-vMtgRLFH.js";import"./chunk-NZK2D7GU-jQUfhp9h.js";import"./chunk-3OPIFGDE-Dx-FqyO2.js";import"./chunk-KSCS5N6A-BrVoWOAb.js";import"./chunk-LZXEDZCA-D3i0B0eg.js";import{i as t,n,r,t as i}from"./chunk-727SXJPM-3VOGMxwk.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-AaoRSmFl.js";import"./chunk-CSCIHK7Q-VTpSKo0F.js";import"./chunk-5ZQYHXKU-CpDPvbGs.js";import"./chunk-O5CBEL6O-CX_vPWhk.js";import"./chunk-FMBD7UC4-kXD1MyOL.js";import"./chunk-BSJP7CBP-Dfyn0Uwp.js";import"./chunk-L5ZTLDWV-wZEQDPsa.js";import"./chunk-ND2GUHAM-hDVHT0bN.js";import"./chunk-55IACEB6-DHg3Nr8A.js";import"./chunk-2J33WTMH-vMtgRLFH.js";import"./chunk-NZK2D7GU-jQUfhp9h.js";import"./chunk-3OPIFGDE-Dx-FqyO2.js";import"./chunk-KSCS5N6A-BrVoWOAb.js";import"./chunk-LZXEDZCA-D3i0B0eg.js";import{i as t,n,r,t as i}from"./chunk-727SXJPM-3VOGMxwk.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-AaoRSmFl.js";import"./chunk-CSCIHK7Q-VTpSKo0F.js";import"./chunk-5ZQYHXKU-CpDPvbGs.js";import"./chunk-O5CBEL6O-CX_vPWhk.js";import"./chunk-BSJP7CBP-Dfyn0Uwp.js";import"./chunk-L5ZTLDWV-wZEQDPsa.js";import"./chunk-55IACEB6-DHg3Nr8A.js";import"./chunk-2J33WTMH-vMtgRLFH.js";import"./chunk-NZK2D7GU-jQUfhp9h.js";import"./chunk-3OPIFGDE-Dx-FqyO2.js";import"./chunk-KSCS5N6A-BrVoWOAb.js";import"./chunk-LZXEDZCA-D3i0B0eg.js";import{i as t,n,r,t as i}from"./chunk-AQP2D5EJ-4dbfbIS6.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|