diffing 0.10.5 → 0.12.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 +76 -41
- package/dist/{cli-agent-BJiATn11.mjs → cli-agent-CWsOHN-j.mjs} +198 -57
- package/dist/{cli-gh-_bkDCxhh.mjs → cli-gh-DI69gJGo.mjs} +27 -17
- package/dist/cli.mjs +189 -229
- package/dist/client/assets/{angular-html-CBcwKYDC.js → angular-html-PLPuQo0k.js} +1 -1
- package/dist/client/assets/{angular-ts-DRBYUaJA.js → angular-ts-CE02Ij4b.js} +1 -1
- package/dist/client/assets/{apl-BM0X8jeL.js → apl-CsuUKZoi.js} +1 -1
- package/dist/client/assets/{arc-DTkmmKl3.js → arc-CgL5kFe-.js} +1 -1
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-Cw75ay7q.js → architectureDiagram-3BPJPVTR-DxZQWGnx.js} +1 -1
- package/dist/client/assets/{astro-DKTNkoRZ.js → astro-DkFc7sbz.js} +1 -1
- package/dist/client/assets/{blade-DaM7a9Zp.js → blade-BkY07kcC.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-DAzINMr_.js → blockDiagram-GPEHLZMM-D5a2KZV2.js} +1 -1
- package/dist/client/assets/{c-B3C0Or4o.js → c-T1BrPfJ6.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-C7SsS28g.js → c4Diagram-AAUBKEIU-mpMH4kFC.js} +1 -1
- package/dist/client/assets/channel-D3niKhl0.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-DHOUGWx8.js → chunk-2J33WTMH-vMtgRLFH.js} +1 -1
- package/dist/client/assets/{chunk-3OPIFGDE-D8d2scLX.js → chunk-3OPIFGDE-Dx-FqyO2.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-BSC-E5yg.js → chunk-4BX2VUAB-CUrPd8Kv.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-27pC5pKn.js → chunk-55IACEB6-DHg3Nr8A.js} +1 -1
- package/dist/client/assets/{chunk-5ZQYHXKU-BM60x82y.js → chunk-5ZQYHXKU-CpDPvbGs.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-CHCF96vE.js → chunk-727SXJPM-3VOGMxwk.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-BoVsvmTa.js → chunk-AQP2D5EJ-4dbfbIS6.js} +1 -1
- package/dist/client/assets/{chunk-BSJP7CBP-Iip4uSio.js → chunk-BSJP7CBP-Dfyn0Uwp.js} +1 -1
- package/dist/client/assets/{chunk-CSCIHK7Q-DuIWPyay.js → chunk-CSCIHK7Q-VTpSKo0F.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-Du6rtd2k.js → chunk-FMBD7UC4-kXD1MyOL.js} +1 -1
- package/dist/client/assets/{chunk-KSCS5N6A-BBq105vI.js → chunk-KSCS5N6A-BrVoWOAb.js} +1 -1
- package/dist/client/assets/{chunk-L5ZTLDWV-0DmB5Qp8.js → chunk-L5ZTLDWV-wZEQDPsa.js} +1 -1
- package/dist/client/assets/{chunk-LZXEDZCA-CoRsjUfr.js → chunk-LZXEDZCA-D3i0B0eg.js} +2 -2
- package/dist/client/assets/{chunk-ND2GUHAM-tX8cKEls.js → chunk-ND2GUHAM-hDVHT0bN.js} +1 -1
- package/dist/client/assets/{chunk-NZK2D7GU-BoJGgPic.js → chunk-NZK2D7GU-jQUfhp9h.js} +1 -1
- package/dist/client/assets/{chunk-O5CBEL6O-mlwCWs97.js → chunk-O5CBEL6O-CX_vPWhk.js} +1 -1
- package/dist/client/assets/chunk-QZHKN3VN-CZLFuGpt.js +1 -0
- package/dist/client/assets/chunk-WU5MYG2G-BhcpjkaB.js +1 -0
- package/dist/client/assets/{chunk-XPW4576I-B5efww8M.js → chunk-XPW4576I-Co_-vDB4.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-DK5KJNIt.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-y5K9t6Se.js +1 -0
- package/dist/client/assets/{cobol-De9QR_Td.js → cobol-8-qBLs-a.js} +1 -1
- package/dist/client/assets/{coffee-Ct_GvuHP.js → coffee-Bjz5lkyW.js} +1 -1
- package/dist/client/assets/{cose-bilkent-S5V4N54A-ATaJZGF7.js → cose-bilkent-S5V4N54A-BljJ0FSA.js} +1 -1
- package/dist/client/assets/{cpp-Dw52w9cj.js → cpp-5BVQCBXT.js} +1 -1
- package/dist/client/assets/{crystal-Dx8ADdsd.js → crystal-CCkY93GS.js} +1 -1
- package/dist/client/assets/{css-CZ13XvDU.js → css-BTM7Tp2a.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-aDltuYut.js → dagre-BM42HDAG-BSynd_2D.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-DGWnHVMJ.js → diagram-2AECGRRQ-K3E2CVdy.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-Dd7eZBKe.js → diagram-5GNKFQAL-BQHIrfKc.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-DWThXREf.js → diagram-KO2AKTUF-Bqs8sNN4.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-CXR4Bjtc.js → diagram-LMA3HP47-C9K4bpQe.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-D4Cbf0nW.js → diagram-OG6HWLK6-DK6wIXY2.js} +1 -1
- package/dist/client/assets/{dist-CUDhrHNw.js → dist-1nkZYMRy.js} +1 -1
- package/dist/client/assets/{edge-CQCjdJKj.js → edge-DqN2FJce.js} +1 -1
- package/dist/client/assets/{elixir-bkjwPazA.js → elixir-BiAgRUFF.js} +1 -1
- package/dist/client/assets/{elm-CCweX5Cq.js → elm-N1IbY8sz.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-BmAyt7SU.js → erDiagram-TEJ5UH35-jsHCiP02.js} +1 -1
- package/dist/client/assets/{erb-D-Z-KBLp.js → erb-B-yYlWAZ.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-C6nIFUVc.js → flowDiagram-I6XJVG4X-DOB1dAWG.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-DMlxThBf.js → ganttDiagram-6RSMTGT7-BYIewcY5.js} +1 -1
- package/dist/client/assets/{git-rebase-BdoFdenB.js → git-rebase-CVkPxOAF.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-JaIFkAIT.js → gitGraphDiagram-PVQCEYII-VNQzbpv2.js} +1 -1
- package/dist/client/assets/{glimmer-js-CZQrBJKq.js → glimmer-js-BmG1xm72.js} +1 -1
- package/dist/client/assets/{glimmer-ts-CBYW46D4.js → glimmer-ts-CvTgwZsg.js} +1 -1
- package/dist/client/assets/{glsl-wxixKkY_.js → glsl-DwjNNCbW.js} +1 -1
- package/dist/client/assets/{graphql-CqZ0Lo5a.js → graphql-BvgkyF8E.js} +1 -1
- package/dist/client/assets/{hack-rqWymQRV.js → hack-DH3188x2.js} +1 -1
- package/dist/client/assets/{haml-DFw_IoGM.js → haml-B0GTfMhX.js} +1 -1
- package/dist/client/assets/{handlebars-3VmTVMYt.js → handlebars-he7hLDd9.js} +1 -1
- package/dist/client/assets/{html-C0Li76jB.js → html-DIYgdTBq.js} +1 -1
- package/dist/client/assets/{html-derivative-CO-RQW8y.js → html-derivative-2s6MXlci.js} +1 -1
- package/dist/client/assets/{http-sPrZOeBY.js → http-COS23XJP.js} +1 -1
- package/dist/client/assets/{hurl-DUoPe4Lc.js → hurl-BlZPjeJt.js} +1 -1
- package/dist/client/assets/index-BrEVVQOB.js +4021 -0
- package/dist/client/assets/index-BsuX6HVI.css +1 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA-B6AZ5SCV.js → infoDiagram-5YYISTIA-DQRqk24I.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-CytMrpo8.js → ishikawaDiagram-YF4QCWOH-DU1rqrLx.js} +1 -1
- package/dist/client/assets/{java-Cj0G6QRg.js → java-BAa5w-Qd.js} +1 -1
- package/dist/client/assets/{javascript-d5SUuyWD.js → javascript-C9e02ssI.js} +1 -1
- package/dist/client/assets/{jinja-BTw9k0vO.js → jinja-Bx37xXwq.js} +1 -1
- package/dist/client/assets/{jison-9xSVvR1q.js → jison-m_DEf8Jo.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-Bd4jZUYI.js → journeyDiagram-JHISSGLW-CoHlfevf.js} +1 -1
- package/dist/client/assets/{json-DjAt53ka.js → json-DtN5AWRW.js} +1 -1
- package/dist/client/assets/{jsx-BX5KmQ7d.js → jsx-BlPpu8bR.js} +1 -1
- package/dist/client/assets/{julia-CLLx1dHC.js → julia-BAOmCbHl.js} +1 -1
- package/dist/client/assets/{just-C0v80bKe.js → just-C_bvVjwE.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-Ds4pXHJa.js → kanban-definition-UN3LZRKU-BiqYI7_m.js} +1 -1
- package/dist/client/assets/{latex-DY-oQfwO.js → latex-81pMfNMt.js} +1 -1
- package/dist/client/assets/{line-BbSLfOl6.js → line-DCovs9My.js} +1 -1
- package/dist/client/assets/{linear-BMIZJAAR.js → linear-cJF5XHE7.js} +1 -1
- package/dist/client/assets/{liquid-DDHDgbZx.js → liquid-sKRTk6dT.js} +1 -1
- package/dist/client/assets/{lua-CXymerKS.js → lua-C1uZL4IF.js} +1 -1
- package/dist/client/assets/{marko-DoPFsptl.js → marko-BKEzP1CL.js} +1 -1
- package/dist/client/assets/{mdc-BxSmTphd.js → mdc-CLkfm94H.js} +1 -1
- package/dist/client/assets/{mermaid-parser.core-CcYSvN4q.js → mermaid-parser.core-CTsTbvb2.js} +1 -1
- package/dist/client/assets/{mermaid.core-COTNtqgQ.js → mermaid.core-D86HJEwL.js} +3 -3
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-BTxraRzn.js → mindmap-definition-RKZ34NQL-CL3heUmL.js} +1 -1
- package/dist/client/assets/{nginx-Bma0jNOT.js → nginx-eDGm66pc.js} +1 -1
- package/dist/client/assets/{nim-DMBpjygU.js → nim-CoWZPv8-.js} +1 -1
- package/dist/client/assets/{perl-CrnrV-AJ.js → perl-MoMqtMVr.js} +1 -1
- package/dist/client/assets/{php-CDYxzX6t.js → php-DXXVMAtN.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-DglRmzer.js → pieDiagram-4H26LBE5-CWV3TMu4.js} +1 -1
- package/dist/client/assets/{pug-DNewy3GU.js → pug-CPWaB94J.js} +1 -1
- package/dist/client/assets/{qml-COjcnZ-W.js → qml-lhvpx8vk.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-BjSmyES7.js → quadrantDiagram-W4KKPZXB-QV25BYos.js} +1 -1
- package/dist/client/assets/{r-CrCaMxLS.js → r-DYbUnmmK.js} +1 -1
- package/dist/client/assets/{razor-jeuOZIar.js → razor-DcyOLv96.js} +1 -1
- package/dist/client/assets/{regexp-DSHVUX08.js → regexp-BdY10jm0.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-B4f430jS.js → requirementDiagram-4Y6WPE33-BPMsmU6J.js} +1 -1
- package/dist/client/assets/{review-export-Cen1WEcX.js → review-export-CMwjJURs.js} +1 -1
- package/dist/client/assets/{rst-CIDgytzc.js → rst-6ShFOzgH.js} +1 -1
- package/dist/client/assets/{ruby-DtuseoNq.js → ruby-B04DeVbi.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-TQPPlxc6.js → sankeyDiagram-5OEKKPKP-DQJeroPp.js} +1 -1
- package/dist/client/assets/{sas-C72Theia.js → sas-Dj26ftNa.js} +1 -1
- package/dist/client/assets/{scss-ClECtwRk.js → scss-BOHpBkgl.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-D1tx07Wg.js → sequenceDiagram-3UESZ5HK-DdV0Y6Sz.js} +1 -1
- package/dist/client/assets/{shellscript-BCwBsi2k.js → shellscript-CpHwjRcU.js} +1 -1
- package/dist/client/assets/{shellsession-BrOddEl5.js → shellsession-BJAvf4GN.js} +1 -1
- package/dist/client/assets/{soy-Dcs0GWFW.js → soy-B67bZJnL.js} +1 -1
- package/dist/client/assets/{sql-BAjA7Gv7.js → sql-8MzOqSsK.js} +1 -1
- package/dist/client/assets/{src-CYYhkqTK.js → src-AaoRSmFl.js} +1 -1
- package/dist/client/assets/{stata-19ngQtzR.js → stata-aCME945h.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-BZRCEzb5.js → stateDiagram-AJRCARHV-CMD_Xj2M.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-vLl7D4ue.js +1 -0
- package/dist/client/assets/{surrealql-Ce2TBRjE.js → surrealql-B_V_HxAi.js} +1 -1
- package/dist/client/assets/{svelte-DQ_1eGZz.js → svelte-BcQvTlqz.js} +1 -1
- package/dist/client/assets/{templ-Cw2DDxWF.js → templ-DZCQ2blz.js} +1 -1
- package/dist/client/assets/{tex-myDSO2eP.js → tex-BfeQ5Wuu.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-CP0OZhBT.js → timeline-definition-PNZ67QCA-CyIS7Zoe.js} +1 -1
- package/dist/client/assets/{ts-tags-rh39ZwVs.js → ts-tags-DVWE0E87.js} +1 -1
- package/dist/client/assets/{tsx-B0-26jrU.js → tsx-DdJ7Sfqf.js} +1 -1
- package/dist/client/assets/{twig-CgasHzPb.js → twig-_gVgaha5.js} +1 -1
- package/dist/client/assets/{typescript-Dq3T0c-m.js → typescript-Bj0_LzZV.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-DHaKHj0j.js → vennDiagram-CIIHVFJN-C-J2kWyk.js} +1 -1
- package/dist/client/assets/{vue-CzFVh92-.js → vue-Dnt_GBRb.js} +1 -1
- package/dist/client/assets/{vue-html-Bv2uFkTH.js → vue-html-ClVA5__5.js} +1 -1
- package/dist/client/assets/{vue-vine-DzieBk9Y.js → vue-vine-BCcz4SVP.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-Dky7jxlZ.js → wardleyDiagram-YWT4CUSO-Dzt4EPh8.js} +1 -1
- package/dist/client/assets/{xml-wcdHRHN8.js → xml-BYeUHEti.js} +1 -1
- package/dist/client/assets/{xsl-CXrwsLG9.js → xsl-Vsx0SZEV.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-BQ2hG60h.js → xychartDiagram-2RQKCTM6-BAWZKvwP.js} +1 -1
- package/dist/client/assets/{yaml-lO6lK6Xe.js → yaml-C6L1khMK.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/{completions-3UF8uzhx.mjs → completions-DvyV49HY.mjs} +22 -1
- package/dist/{doctor-BGYZNIYP.mjs → doctor-Bz9VHuBI.mjs} +7 -6
- package/dist/find-tui-binary-DVQADOSF.mjs +101 -0
- package/dist/{git-Czo96ymM.mjs → git-BGj31GX-.mjs} +71 -7
- package/dist/git-CfDSkUcE.mjs +2 -0
- package/dist/{github-DKT0lJXv.mjs → github-DXiEeHzk.mjs} +1 -1
- package/dist/{github-CEjtGd41.mjs → github-DpzqNrUh.mjs} +3 -3
- package/dist/{github-attachments-Cf17YWp4.mjs → github-attachments-DgOf7BhP.mjs} +2 -2
- package/dist/{mcp-Dq7J5QOP.mjs → mcp-zDVzU1vl.mjs} +42 -33
- 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/{review-export-BBDWvftT.mjs → review-export-B63eRAVa.mjs} +1 -1
- package/dist/{settings-bwe7yQ8U.mjs → search-3R2E5xxr.mjs} +133 -98
- package/dist/search-CQ4nsjBX.mjs +2 -0
- package/dist/{server-C9i4V36o.mjs → server-Dw3lkQ5q.mjs} +296 -110
- package/dist/server-lock-BNI8FKV1.mjs +427 -0
- package/dist/session-conflict-Bqt1M4Mp.mjs +96 -0
- package/dist/session-manager-BKSZQqDJ.mjs +159 -0
- package/dist/session-url-sr7lXXVc.mjs +100 -0
- package/dist/tui-search-bridge-BGgLCwMF.mjs +133 -0
- package/dist/{update-check-DUuHmPeZ.mjs → update-check-BUfh4Y6c.mjs} +16 -15
- package/package.json +9 -4
- package/dist/client/assets/channel-lsVHTuYR.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-AHUiTM0z.js +0 -1
- package/dist/client/assets/chunk-WU5MYG2G-D41j4yxb.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-D1Eo3kly.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-bAMsbsfB.js +0 -1
- package/dist/client/assets/index-B42c0TyV.css +0 -1
- package/dist/client/assets/index-BN_-di_r.js +0 -3959
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Da-mGMA2.js +0 -1
- package/dist/find-tui-binary-CRpbYXLC.mjs +0 -52
- package/dist/git-DaP_1rVy.mjs +0 -2
- package/dist/server-lock-Dd_ss_Il.mjs +0 -153
- /package/dist/{apply-suggestion-DNNsC5gx.mjs → apply-suggestion-CHYnw68I.mjs} +0 -0
- /package/dist/{comment-format-B5AcGcR-.mjs → comment-format-B85NHZnG.mjs} +0 -0
- /package/dist/{diff-fingerprint-C8YO3TTE.mjs → diff-fingerprint-BgR0tu1o.mjs} +0 -0
- /package/dist/{handoff-DPoIyeWn.mjs → handoff-LAFtmnHf.mjs} +0 -0
- /package/dist/{plan-format-BQyx--mp.mjs → plan-format-BwJh5JSE.mjs} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-CYYhkqTK.js";import"./chunk-CSCIHK7Q-DuIWPyay.js";import"./chunk-5ZQYHXKU-BM60x82y.js";import"./chunk-O5CBEL6O-mlwCWs97.js";import"./chunk-BSJP7CBP-Iip4uSio.js";import"./chunk-L5ZTLDWV-0DmB5Qp8.js";import"./chunk-55IACEB6-27pC5pKn.js";import"./chunk-2J33WTMH-DHOUGWx8.js";import"./chunk-NZK2D7GU-BoJGgPic.js";import"./chunk-3OPIFGDE-D8d2scLX.js";import"./chunk-KSCS5N6A-BBq105vI.js";import"./chunk-LZXEDZCA-CoRsjUfr.js";import{i as t,n,r,t as i}from"./chunk-AQP2D5EJ-BoVsvmTa.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};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { execFileSync } from "node:child_process";
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { dirname, isAbsolute, resolve } from "node:path";
|
|
4
|
-
import { existsSync } from "node:fs";
|
|
5
|
-
//#region src/lib/find-tui-binary.ts
|
|
6
|
-
/**
|
|
7
|
-
* Locate the `diffing-tui` native binary. Looks, in order:
|
|
8
|
-
* 1. Sibling of the calling module (`dist/diffing-tui[.exe]` after build).
|
|
9
|
-
* 2. `bin/diffing-tui[.exe]` next to the package root.
|
|
10
|
-
* 3. `target/release/diffing-tui[.exe]` next to the package root
|
|
11
|
-
* (cargo release build).
|
|
12
|
-
* 4. `target/debug/diffing-tui[.exe]` next to the package root
|
|
13
|
-
* (cargo debug build — the common case during development, especially
|
|
14
|
-
* on Windows where release builds are slow).
|
|
15
|
-
* 5. `$PATH` lookup via `which` / `where`.
|
|
16
|
-
*
|
|
17
|
-
* Returns the absolute path of the first match, or `null` if none are found.
|
|
18
|
-
*
|
|
19
|
-
* `callerUrl` is the `import.meta.url` of the caller — pass `import.meta.url`
|
|
20
|
-
* from `cli.ts`. Exposed as a parameter so unit tests can pin the search
|
|
21
|
-
* root to a known location instead of depending on the test runner's CWD.
|
|
22
|
-
*/
|
|
23
|
-
function findTuiBinary(callerUrl) {
|
|
24
|
-
const ext = process.platform === "win32" ? ".exe" : "";
|
|
25
|
-
const here = dirname(fileURLToPath(callerUrl));
|
|
26
|
-
const candidates = [
|
|
27
|
-
resolve(here, `diffing-tui${ext}`),
|
|
28
|
-
resolve(here, "..", "bin", `diffing-tui${ext}`),
|
|
29
|
-
resolve(here, "..", "target", "release", `diffing-tui${ext}`),
|
|
30
|
-
resolve(here, "..", "..", "target", "release", `diffing-tui${ext}`),
|
|
31
|
-
resolve(here, "..", "target", "debug", `diffing-tui${ext}`),
|
|
32
|
-
resolve(here, "..", "..", "target", "debug", `diffing-tui${ext}`)
|
|
33
|
-
];
|
|
34
|
-
for (const c of candidates) if (existsSync(c)) return c;
|
|
35
|
-
try {
|
|
36
|
-
const out = execFileSync(process.platform === "win32" ? "where" : "which", ["diffing-tui"], {
|
|
37
|
-
encoding: "utf-8",
|
|
38
|
-
stdio: [
|
|
39
|
-
"ignore",
|
|
40
|
-
"pipe",
|
|
41
|
-
"ignore"
|
|
42
|
-
]
|
|
43
|
-
}).trim();
|
|
44
|
-
if (out) {
|
|
45
|
-
const first = out.split(/\r?\n/)[0]?.trim();
|
|
46
|
-
if (first && isAbsolute(first)) return first;
|
|
47
|
-
}
|
|
48
|
-
} catch {}
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
//#endregion
|
|
52
|
-
export { findTuiBinary as t };
|
package/dist/git-DaP_1rVy.mjs
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { d as getProjectStorageDir, p as getRepoRoot } from "./git-Czo96ymM.mjs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { mkdirSync, readFileSync, renameSync, rmSync, rmdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
4
|
-
//#region src/lib/server-lock.ts
|
|
5
|
-
const STARTUP_LEASE_STALE_MS = 3e4;
|
|
6
|
-
/**
|
|
7
|
-
* Produce a stable comparison key for the diff a server displays. Runtime-only
|
|
8
|
-
* web options are excluded so `--port`/`--no-open` do not create false scope
|
|
9
|
-
* mismatches between a user-started session and an MCP request.
|
|
10
|
-
*/
|
|
11
|
-
function diffScopeKey(options) {
|
|
12
|
-
const { port: _port, host: _host, noOpen: _noOpen, reuseSession: _reuseSession, replaceSession: _replaceSession, help: _help, version: _version, outputMode: _outputMode, tui: _tui, gpu: _gpu, noExtDiff: _noExtDiff, ...scope } = options;
|
|
13
|
-
return JSON.stringify(scope);
|
|
14
|
-
}
|
|
15
|
-
function lockPath(repoRoot) {
|
|
16
|
-
return join(getProjectStorageDir(repoRoot), "server.json");
|
|
17
|
-
}
|
|
18
|
-
function writeServerLock(lock) {
|
|
19
|
-
const path = lockPath(lock.repoRoot);
|
|
20
|
-
mkdirSync(join(path, ".."), { recursive: true });
|
|
21
|
-
writeFileSync(path, JSON.stringify(lock, null, 2), "utf-8");
|
|
22
|
-
}
|
|
23
|
-
function readServerLock(repoRoot) {
|
|
24
|
-
try {
|
|
25
|
-
const raw = readFileSync(lockPath(repoRoot), "utf-8");
|
|
26
|
-
const lock = JSON.parse(raw);
|
|
27
|
-
if (typeof lock.port !== "number" || typeof lock.pid !== "number") return null;
|
|
28
|
-
return lock;
|
|
29
|
-
} catch {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* True if the process named by the lock is still alive and the lock belongs to
|
|
35
|
-
* this repo. `process.kill(pid, 0)` sends no signal — it just probes existence.
|
|
36
|
-
*/
|
|
37
|
-
function isLockAlive(lock, expectedRepoRoot) {
|
|
38
|
-
try {
|
|
39
|
-
process.kill(lock.pid, 0);
|
|
40
|
-
} catch {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
try {
|
|
44
|
-
return lock.repoRoot === (expectedRepoRoot ?? getRepoRoot());
|
|
45
|
-
} catch {
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function removeServerLock(repoRoot) {
|
|
50
|
-
try {
|
|
51
|
-
rmSync(lockPath(repoRoot), { force: true });
|
|
52
|
-
} catch {}
|
|
53
|
-
}
|
|
54
|
-
/** Remove server.json only while holding the startup lease and only if exact ownership still matches. */
|
|
55
|
-
function removeServerLockIfOwned(repoRoot, pid, ownerId) {
|
|
56
|
-
const cleanupLease = acquireServerStartupLease(repoRoot, `cleanup-${ownerId}`);
|
|
57
|
-
if (!cleanupLease) return false;
|
|
58
|
-
try {
|
|
59
|
-
const lock = readServerLock(repoRoot);
|
|
60
|
-
if (!lock || lock.pid !== pid || lock.ownerId !== ownerId) return false;
|
|
61
|
-
removeServerLock(repoRoot);
|
|
62
|
-
return true;
|
|
63
|
-
} finally {
|
|
64
|
-
cleanupLease.release();
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Atomically reserve server startup for one repository. The exclusive-create
|
|
69
|
-
* directory is the cross-process serialization point; callers must re-read
|
|
70
|
-
* server.json after acquiring it because another process may have completed
|
|
71
|
-
* startup between their first lock check and this lease acquisition.
|
|
72
|
-
*/
|
|
73
|
-
function acquireServerStartupLease(repoRoot, ownerId, now = Date.now()) {
|
|
74
|
-
const path = join(getProjectStorageDir(repoRoot), "server-startup.lock");
|
|
75
|
-
const recordPath = join(path, "lease.json");
|
|
76
|
-
const ownerMarkerPath = join(path, `owner-${encodeURIComponent(ownerId)}`);
|
|
77
|
-
mkdirSync(join(path, ".."), { recursive: true });
|
|
78
|
-
const tryCreate = () => {
|
|
79
|
-
try {
|
|
80
|
-
mkdirSync(path, {
|
|
81
|
-
recursive: false,
|
|
82
|
-
mode: 448
|
|
83
|
-
});
|
|
84
|
-
} catch (error) {
|
|
85
|
-
if (error?.code === "EEXIST") return false;
|
|
86
|
-
throw error;
|
|
87
|
-
}
|
|
88
|
-
try {
|
|
89
|
-
writeFileSync(recordPath, JSON.stringify({
|
|
90
|
-
ownerId,
|
|
91
|
-
createdAt: now,
|
|
92
|
-
pid: process.pid
|
|
93
|
-
}), "utf-8");
|
|
94
|
-
writeFileSync(ownerMarkerPath, "", "utf-8");
|
|
95
|
-
} catch (error) {
|
|
96
|
-
rmSync(path, {
|
|
97
|
-
recursive: true,
|
|
98
|
-
force: true
|
|
99
|
-
});
|
|
100
|
-
throw error;
|
|
101
|
-
}
|
|
102
|
-
return true;
|
|
103
|
-
};
|
|
104
|
-
if (!tryCreate()) {
|
|
105
|
-
let reclaim = false;
|
|
106
|
-
let acquiredAfterRace = false;
|
|
107
|
-
try {
|
|
108
|
-
const record = JSON.parse(readFileSync(recordPath, "utf-8"));
|
|
109
|
-
if (typeof record.createdAt !== "number" || typeof record.pid !== "number") throw new Error("Malformed startup lease");
|
|
110
|
-
let ownerIsAlive = true;
|
|
111
|
-
try {
|
|
112
|
-
process.kill(record.pid, 0);
|
|
113
|
-
} catch (error) {
|
|
114
|
-
ownerIsAlive = error?.code !== "ESRCH";
|
|
115
|
-
}
|
|
116
|
-
reclaim = now - record.createdAt > STARTUP_LEASE_STALE_MS && !ownerIsAlive;
|
|
117
|
-
if (!reclaim) return null;
|
|
118
|
-
} catch {
|
|
119
|
-
try {
|
|
120
|
-
reclaim = now - statSync(path).mtimeMs > STARTUP_LEASE_STALE_MS;
|
|
121
|
-
} catch (statError) {
|
|
122
|
-
if (statError?.code !== "ENOENT") return null;
|
|
123
|
-
if (!tryCreate()) return null;
|
|
124
|
-
acquiredAfterRace = true;
|
|
125
|
-
}
|
|
126
|
-
if (!reclaim && !acquiredAfterRace) return null;
|
|
127
|
-
}
|
|
128
|
-
if (reclaim && !acquiredAfterRace) {
|
|
129
|
-
const stalePath = `${path}.stale-${process.pid}-${now}`;
|
|
130
|
-
renameSync(path, stalePath);
|
|
131
|
-
rmSync(stalePath, {
|
|
132
|
-
recursive: true,
|
|
133
|
-
force: true
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
if (!acquiredAfterRace && !tryCreate()) return null;
|
|
137
|
-
}
|
|
138
|
-
let released = false;
|
|
139
|
-
return {
|
|
140
|
-
ownerId,
|
|
141
|
-
release() {
|
|
142
|
-
if (released) return;
|
|
143
|
-
released = true;
|
|
144
|
-
try {
|
|
145
|
-
unlinkSync(ownerMarkerPath);
|
|
146
|
-
unlinkSync(recordPath);
|
|
147
|
-
rmdirSync(path);
|
|
148
|
-
} catch {}
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
//#endregion
|
|
153
|
-
export { removeServerLock as a, readServerLock as i, diffScopeKey as n, removeServerLockIfOwned as o, isLockAlive as r, writeServerLock as s, acquireServerStartupLease as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|