@band-app/server 0.13.1 → 0.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/client/assets/{DockviewTerminalContainer-DY9YDc8o.js → DockviewTerminalContainer-CjLCp0Ep.js} +2 -2
- package/dist/client/assets/{TerminalPanel-TQGgFc5g.js → TerminalPanel-Cu7fEaGN.js} +1 -1
- package/dist/client/assets/{_basePickBy-CvS-VtsR.js → _basePickBy-CQtQtDdV.js} +1 -1
- package/dist/client/assets/{_baseUniq-DFCKF5vj.js → _baseUniq-D4iUo06T.js} +1 -1
- package/dist/client/assets/{arc-BatjPjaN.js → arc-Bk8y2eXC.js} +1 -1
- package/dist/client/assets/{architectureDiagram-VXUJARFQ-Cnb8SKvZ.js → architectureDiagram-VXUJARFQ-nOygF9m2.js} +1 -1
- package/dist/client/assets/{blockDiagram-VD42YOAC-B6-qvfYN.js → blockDiagram-VD42YOAC-CZ4Nt28v.js} +1 -1
- package/dist/client/assets/{c4Diagram-YG6GDRKO-DAjB1VyY.js → c4Diagram-YG6GDRKO-C31ZTlu2.js} +1 -1
- package/dist/client/assets/channel-BgmjEVPj.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-vjmc3quM.js → chunk-4BX2VUAB-GjIrL7gq.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-DDZjRfYY.js → chunk-55IACEB6-Dd6rfkjS.js} +1 -1
- package/dist/client/assets/{chunk-B4BG7PRW-CKceWukV.js → chunk-B4BG7PRW-Dzfqlv3x.js} +1 -1
- package/dist/client/assets/{chunk-DI55MBZ5-CRnRm2L0.js → chunk-DI55MBZ5-CP20GTKI.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-Cogf-yAQ.js → chunk-FMBD7UC4-BjMT67vC.js} +1 -1
- package/dist/client/assets/{chunk-QN33PNHL-D72Zq7QV.js → chunk-QN33PNHL-DjTHrDYb.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-HUKu5hjd.js → chunk-QZHKN3VN-DaZKkfet.js} +1 -1
- package/dist/client/assets/{chunk-TZMSLE5B-I8YlhesW.js → chunk-TZMSLE5B-C-s0f3Nv.js} +1 -1
- package/dist/client/assets/classDiagram-2ON5EDUG-BKsagNLe.js +1 -0
- package/dist/client/assets/classDiagram-v2-WZHVMYZB-BKsagNLe.js +1 -0
- package/dist/client/assets/clone-CBcd3GIz.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-CEay61-1.js → cose-bilkent-S5V4N54A-DWG1ghIg.js} +1 -1
- package/dist/client/assets/{dagre-6UL2VRFP-BcAohjbk.js → dagre-6UL2VRFP-D5Xahd1k.js} +1 -1
- package/dist/client/assets/{diagram-PSM6KHXK-DdrIOdqS.js → diagram-PSM6KHXK-DB5Yj4_A.js} +1 -1
- package/dist/client/assets/{diagram-QEK2KX5R-Bn79GyS6.js → diagram-QEK2KX5R-CaI4Qm9S.js} +1 -1
- package/dist/client/assets/{diagram-S2PKOQOG-g66OM_Vs.js → diagram-S2PKOQOG-Bc8uBUs8.js} +1 -1
- package/dist/client/assets/{erDiagram-Q2GNP2WA-BD0geyEq.js → erDiagram-Q2GNP2WA-BEdcnVfH.js} +1 -1
- package/dist/client/assets/{flowDiagram-NV44I4VS-B2LLnQ89.js → flowDiagram-NV44I4VS-CP1RMYLo.js} +1 -1
- package/dist/client/assets/{ganttDiagram-JELNMOA3-DsMjiqCd.js → ganttDiagram-JELNMOA3-DybSY1zy.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-BXAPNFr2.js → gitGraphDiagram-V2S2FVAM-B1zM9cMa.js} +1 -1
- package/dist/client/assets/{graph-CWoXix-C.js → graph-CPZWfRvB.js} +1 -1
- package/dist/client/assets/{highlighted-body-B3W2YXNL-DAdM8cs5.js → highlighted-body-B3W2YXNL-Bugc5R-I.js} +1 -1
- package/dist/client/assets/{index-DeUgVu9X.js → index-BGq7dGXw.js} +1 -1
- package/dist/client/assets/{index-HueLRLHI.js → index-BKUORVg0.js} +1 -1
- package/dist/client/assets/{index-B9fPtAFu.js → index-BQkn45ME.js} +1 -1
- package/dist/client/assets/{index-D-NVfOaX.js → index-BSZ6dtOY.js} +1 -1
- package/dist/client/assets/{index-BcC597Ty.js → index-BSvAdzfH.js} +1 -1
- package/dist/client/assets/{index-iloqZ__Z.js → index-Bu-ZuLPi.js} +1 -1
- package/dist/client/assets/{index-W_gE5gc5.js → index-BydRuBb_.js} +1 -1
- package/dist/client/assets/{index-Bu7btU1P.js → index-CYD8Chzm.js} +1 -1
- package/dist/client/assets/{index-GgiGfqqJ.js → index-CijlrIEA.js} +1 -1
- package/dist/client/assets/{index-6eC517Nz.js → index-Cm01-0la.js} +1 -1
- package/dist/client/assets/{index-DgRC8NQ1.js → index-CrF4PAiW.js} +1 -1
- package/dist/client/assets/{index-U42qt8_H.js → index-D4U4UdW8.js} +1 -1
- package/dist/client/assets/{index-BSQYe-ie.js → index-D5BWxHiy.js} +1 -1
- package/dist/client/assets/{index-D4Gbu0g1.js → index-DEVawlAU.js} +1 -1
- package/dist/client/assets/{index-C8jQlbkH.js → index-SP7EGmTJ.js} +1 -1
- package/dist/client/assets/{index-Dkltc6JL.js → index-X_vPvtM3.js} +1 -1
- package/dist/client/assets/{index-B-RxFKXA.js → index-mOXvCPx7.js} +1 -1
- package/dist/client/assets/{index-B_aLrZ9l.js → index-vP2I9_aT.js} +1 -1
- package/dist/client/assets/{infoDiagram-HS3SLOUP-DwKN27-C.js → infoDiagram-HS3SLOUP-BCk158Sc.js} +1 -1
- package/dist/client/assets/{journeyDiagram-XKPGCS4Q-BAhwB5gg.js → journeyDiagram-XKPGCS4Q-Dmw405Jr.js} +1 -1
- package/dist/client/assets/{kanban-definition-3W4ZIXB7-OI1AHf6B.js → kanban-definition-3W4ZIXB7-DqNJB_Z3.js} +1 -1
- package/dist/client/assets/{layout-CC7J3tBc.js → layout-ODCofYfe.js} +1 -1
- package/dist/client/assets/{linear-CVYb-eZl.js → linear-CHYpf9oZ.js} +1 -1
- package/dist/client/assets/{main-CYVBBY3m.js → main-81Q8XW4n.js} +297 -297
- package/dist/client/assets/main-DYrDxnSM.css +1 -0
- package/dist/client/assets/{mindmap-definition-VGOIOE7T-BPKIWA4L.js → mindmap-definition-VGOIOE7T-DD4Ndh7U.js} +1 -1
- package/dist/client/assets/{pieDiagram-ADFJNKIX-DeHQukcp.js → pieDiagram-ADFJNKIX-C9vB0eMW.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-AYHSOK5B-DIA0izdW.js → quadrantDiagram-AYHSOK5B-DKJimp3K.js} +1 -1
- package/dist/client/assets/{requirementDiagram-UZGBJVZJ-DsiZI-w_.js → requirementDiagram-UZGBJVZJ-_AjYejyE.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-TZEHDZUN-B3Rxgvvo.js → sankeyDiagram-TZEHDZUN-BN_ggjKc.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-WL72ISMW-CdnagSZH.js → sequenceDiagram-WL72ISMW-Ck-zlUdD.js} +1 -1
- package/dist/client/assets/{square-terminal-BA_DN1Fj.js → square-terminal-DVejknjY.js} +1 -1
- package/dist/client/assets/{stateDiagram-FKZM4ZOC-C9HYyYWO.js → stateDiagram-FKZM4ZOC-Ccmp8_yK.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-4FDKWEC3-Cgq8vGxD.js +1 -0
- package/dist/client/assets/{timeline-definition-IT6M3QCI-BQXhdJ4l.js → timeline-definition-IT6M3QCI-Bm5sYZxz.js} +1 -1
- package/dist/client/assets/{treemap-GDKQZRPO-DbtL6I-E.js → treemap-GDKQZRPO-C6oEKt2u.js} +1 -1
- package/dist/client/assets/{useSessionListContext-BDhxj2sp.js → useSessionListContext-l-QdtVht.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId-DrdBQ3ad.js → workspace._workspaceId-BPktlGJd.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId.changes-CV01j_RF.js → workspace._workspaceId.changes-DNu9WOV2.js} +1 -1
- package/dist/client/assets/workspace._workspaceId.code-DP6cBpn1.js +1 -0
- package/dist/client/assets/{workspace._workspaceId.code._-4eyD4Vu7.js → workspace._workspaceId.code._-BHhCSQ0w.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId.code.index-BazGXzJC.js → workspace._workspaceId.code.index-0y_GQ6sP.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId.index-CpmZsM_r.js → workspace._workspaceId.index-CtrlsI9z.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId.terminal-Sx7Ov6J4.js → workspace._workspaceId.terminal-DsvwvNc_.js} +2 -2
- package/dist/client/assets/{xychartDiagram-PRI3JC2R-B9LSl0HQ.js → xychartDiagram-PRI3JC2R-ru_cdw1P.js} +1 -1
- package/dist/server/assets/{DockviewTerminalContainer-DVzWSMti.js → DockviewTerminalContainer-DVUKt_HJ.js} +3 -3
- package/dist/server/assets/{TerminalPanel-BlWVFHNT.js → TerminalPanel-hEaDQqdo.js} +1 -1
- package/dist/server/assets/{_basePickBy-CTVBF0Kh.js → _basePickBy-Nag5vQgo.js} +2 -2
- package/dist/server/assets/{_baseUniq-BF3qFyKL.js → _baseUniq-BcTT1Srn.js} +1 -1
- package/dist/server/assets/{_tanstack-start-manifest_v-sqmMCsD8.js → _tanstack-start-manifest_v-D0rpEWOW.js} +1 -1
- package/dist/server/assets/{arc-CKzdlSDJ.js → arc-CDj2zIqg.js} +1 -1
- package/dist/server/assets/{architecture-7HQA4BMR-C4KC3q3z.js → architecture-7HQA4BMR-7A5zOnYc.js} +6 -6
- package/dist/server/assets/{architectureDiagram-VXUJARFQ-ARkeTUdc.js → architectureDiagram-VXUJARFQ--uDzxMk3.js} +6 -6
- package/dist/server/assets/{blockDiagram-VD42YOAC-lsOOO08K.js → blockDiagram-VD42YOAC-DAc1UHQ6.js} +6 -6
- package/dist/server/assets/{c4Diagram-YG6GDRKO-CrZA0PWP.js → c4Diagram-YG6GDRKO-ByeFZAO1.js} +2 -2
- package/dist/server/assets/{channel-Dd6dv_cn.js → channel-B6u30R-7.js} +1 -1
- package/dist/server/assets/{chunk-4BX2VUAB-CfcFinva.js → chunk-4BX2VUAB-X_mApFBH.js} +1 -1
- package/dist/server/assets/{chunk-55IACEB6-C_zn3X68.js → chunk-55IACEB6-DMO5XJKd.js} +1 -1
- package/dist/server/assets/{chunk-B4BG7PRW-WqOdzIwb.js → chunk-B4BG7PRW-Da7HlBM1.js} +4 -4
- package/dist/server/assets/{chunk-DI55MBZ5-BazpEGnL.js → chunk-DI55MBZ5-DuioLWo-.js} +3 -3
- package/dist/server/assets/{chunk-FMBD7UC4-abFXQK9X.js → chunk-FMBD7UC4-BhKTk6rW.js} +1 -1
- package/dist/server/assets/{chunk-QN33PNHL-mQORkMwR.js → chunk-QN33PNHL-BgZXw9n5.js} +1 -1
- package/dist/server/assets/{chunk-QZHKN3VN-W_mObo75.js → chunk-QZHKN3VN-DHuwppPm.js} +1 -1
- package/dist/server/assets/{chunk-TZMSLE5B-f9JxfLrS.js → chunk-TZMSLE5B-w8fhHHwn.js} +1 -1
- package/dist/server/assets/{classDiagram-v2-WZHVMYZB-D9B26ZaP.js → classDiagram-2ON5EDUG-BZf5qvSp.js} +5 -5
- package/dist/server/assets/{classDiagram-2ON5EDUG-D9B26ZaP.js → classDiagram-v2-WZHVMYZB-BZf5qvSp.js} +5 -5
- package/dist/server/assets/{clone-dm3Dgnj4.js → clone-CjoEs-v-.js} +1 -1
- package/dist/server/assets/{cose-bilkent-S5V4N54A-FP17KwdC.js → cose-bilkent-S5V4N54A-BNk0NAbB.js} +1 -1
- package/dist/server/assets/{dagre-6UL2VRFP-D3G7rpV5.js → dagre-6UL2VRFP-C0_F8CHc.js} +6 -6
- package/dist/server/assets/{diagram-PSM6KHXK-CblBgzmP.js → diagram-PSM6KHXK-LARMaMiS.js} +7 -7
- package/dist/server/assets/{diagram-QEK2KX5R-GC4Djt9A.js → diagram-QEK2KX5R-jKvozWzw.js} +6 -6
- package/dist/server/assets/{diagram-S2PKOQOG-5B6KDW-y.js → diagram-S2PKOQOG-5a2K9q2r.js} +6 -6
- package/dist/server/assets/{erDiagram-Q2GNP2WA-Be8xw8rI.js → erDiagram-Q2GNP2WA-DPxBpQns.js} +4 -4
- package/dist/server/assets/{flowDiagram-NV44I4VS-jzmSul5A.js → flowDiagram-NV44I4VS-CX3XZT5Y.js} +5 -5
- package/dist/server/assets/{ganttDiagram-JELNMOA3-DWzYYJJD.js → ganttDiagram-JELNMOA3-BmjiDolw.js} +2 -2
- package/dist/server/assets/{gitGraph-G5XIXVHT-DBh_B9aL.js → gitGraph-G5XIXVHT-BxG8jjGU.js} +6 -6
- package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-DtVbt-rt.js → gitGraphDiagram-V2S2FVAM-ChLdCg6Z.js} +7 -7
- package/dist/server/assets/{graph-DX5yyy2e.js → graph-Bx5JUzop.js} +2 -2
- package/dist/server/assets/{highlighted-body-B3W2YXNL-jVL8aR3Z.js → highlighted-body-B3W2YXNL-DDkviWDm.js} +1 -1
- package/dist/server/assets/{index-icISvAHb.js → index-BBCpeEJl.js} +2 -2
- package/dist/server/assets/{index-CVpPQcdL.js → index-BKnmhk3u.js} +1 -1
- package/dist/server/assets/{index-x1PcD09R.js → index-BP-Fy_Ud.js} +2 -2
- package/dist/server/assets/{index-BoxcvdZf.js → index-Bb41VJM3.js} +4 -4
- package/dist/server/assets/{index-CBiZXyl4.js → index-BnAK5zRH.js} +1 -1
- package/dist/server/assets/{index-B5nFl_AI.js → index-BoT6zVKn.js} +2 -2
- package/dist/server/assets/{index-BAdVYDyw.js → index-C4USpn2y.js} +2 -2
- package/dist/server/assets/{index-BirnOPeb.js → index-CDCloCld.js} +2 -2
- package/dist/server/assets/{index-DYzy4J8Y.js → index-CLsI0TMm.js} +2 -2
- package/dist/server/assets/{index-CD24s2ge.js → index-Cuuby6oP.js} +3 -3
- package/dist/server/assets/{index-DHKWIWry.js → index-DO3wKBul.js} +5 -5
- package/dist/server/assets/{index-BsKQIZIq.js → index-DSGH2NU6.js} +2 -2
- package/dist/server/assets/{index-CeFUhbU-.js → index-DTkAyV2J.js} +2 -2
- package/dist/server/assets/{index-DiZw5Slc.js → index-DjhMY50H.js} +3 -3
- package/dist/server/assets/{index-BhOjaygO.js → index-Dp74K7A4.js} +2 -2
- package/dist/server/assets/{index-BjR3sOAq.js → index-DrrqcbHg.js} +2 -2
- package/dist/server/assets/{index-fJ18TF5w.js → index-Duvita0E.js} +5 -5
- package/dist/server/assets/{index-CJFioIPI.js → index-OEnZTnkb.js} +2 -2
- package/dist/server/assets/{info-VBDWY6EO-CgGw-KWo.js → info-VBDWY6EO-6bfVBBeD.js} +6 -6
- package/dist/server/assets/{infoDiagram-HS3SLOUP-Bm300kuC.js → infoDiagram-HS3SLOUP-B1v9HmWX.js} +5 -5
- package/dist/server/assets/{journeyDiagram-XKPGCS4Q-i8WJyl2v.js → journeyDiagram-XKPGCS4Q-Cb26EUwI.js} +4 -4
- package/dist/server/assets/{kanban-definition-3W4ZIXB7-BxqtaaIr.js → kanban-definition-3W4ZIXB7-Cv4GaETC.js} +2 -2
- package/dist/server/assets/{layout-C81zgoUj.js → layout-CQJCngSZ.js} +4 -4
- package/dist/server/assets/{linear-dyZZUN6P.js → linear-Civ7P345.js} +1 -1
- package/dist/server/assets/{mermaid-3ZIDBTTL-bTD72h2_.js → mermaid-3ZIDBTTL-EBg4-fWO.js} +1 -1
- package/dist/server/assets/{mermaid-parser.core-BpodyVoJ.js → mermaid-parser.core-2e_OlBPy.js} +11 -11
- package/dist/server/assets/{mindmap-definition-VGOIOE7T-CGVjAsWC.js → mindmap-definition-VGOIOE7T-uP_bqLZ-.js} +3 -3
- package/dist/server/assets/{packet-DYOGHKS2-BeHd7ss_.js → packet-DYOGHKS2-C9RhEbus.js} +6 -6
- package/dist/server/assets/{pie-VRWISCQL-CtMn8fFZ.js → pie-VRWISCQL-DXIjmNyN.js} +6 -6
- package/dist/server/assets/{pieDiagram-ADFJNKIX-CS0mGgZR.js → pieDiagram-ADFJNKIX-C2Qp43pf.js} +7 -7
- package/dist/server/assets/{quadrantDiagram-AYHSOK5B-C0QMIITK.js → quadrantDiagram-AYHSOK5B-C9I9kDB1.js} +2 -2
- package/dist/server/assets/{radar-ZZBFDIW7-DIYuMHay.js → radar-ZZBFDIW7-CEz6u4b9.js} +6 -6
- package/dist/server/assets/{requirementDiagram-UZGBJVZJ-Cu_xdr4s.js → requirementDiagram-UZGBJVZJ-DmCcKz-Y.js} +3 -3
- package/dist/server/assets/{router-emaiBwQ1.js → router-BlHVACji.js} +76098 -75562
- package/dist/server/assets/{sankeyDiagram-TZEHDZUN-sK1eHAYK.js → sankeyDiagram-TZEHDZUN-DM2H1xi3.js} +1 -1
- package/dist/server/assets/{sequenceDiagram-WL72ISMW-BxdrIxsT.js → sequenceDiagram-WL72ISMW-DWDQKCiq.js} +3 -3
- package/dist/server/assets/{square-terminal-DaamWbdC.js → square-terminal-CCwkUkGX.js} +1 -1
- package/dist/server/assets/{stateDiagram-FKZM4ZOC-YKAev_OI.js → stateDiagram-FKZM4ZOC-_4Khdh4I.js} +8 -8
- package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-WXMNfM85.js → stateDiagram-v2-4FDKWEC3-Cos-pE9j.js} +4 -4
- package/dist/server/assets/{timeline-definition-IT6M3QCI-DrdVpYke.js → timeline-definition-IT6M3QCI-DeLSZGNq.js} +2 -2
- package/dist/server/assets/{treemap-GDKQZRPO-DZHSpt06.js → treemap-GDKQZRPO-LKeqy604.js} +6 -6
- package/dist/server/assets/{workspace._workspaceId-KpmCwO8V.js → workspace._workspaceId-C0PMWq41.js} +2 -2
- package/dist/server/assets/{workspace._workspaceId.changes-DF6oupkK.js → workspace._workspaceId.changes-CzyqOgM_.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.code._-fbsbn7Pa.js → workspace._workspaceId.code._-QG2CLJod.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.code.index-D2dHFGQr.js → workspace._workspaceId.code.index-CVy3VzQK.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.index-DpLhp52B.js → workspace._workspaceId.index-LBt-0JYY.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.terminal-Dk3GXgkq.js → workspace._workspaceId.terminal-jMK4pgOD.js} +2 -2
- package/dist/server/assets/{xychartDiagram-PRI3JC2R-BXCdvcf7.js → xychartDiagram-PRI3JC2R-DHrKht9t.js} +2 -2
- package/dist/server/server.js +2 -2
- package/dist/start-server.mjs +396 -161
- package/package.json +6 -5
- package/dist/client/assets/channel-DSgmIANq.js +0 -1
- package/dist/client/assets/classDiagram-2ON5EDUG-D57JPCVZ.js +0 -1
- package/dist/client/assets/classDiagram-v2-WZHVMYZB-D57JPCVZ.js +0 -1
- package/dist/client/assets/clone-DAQJfloD.js +0 -1
- package/dist/client/assets/main-4FaYQ5DQ.css +0 -1
- package/dist/client/assets/stateDiagram-v2-4FDKWEC3-Jpp4ZnR3.js +0 -1
- package/dist/client/assets/workspace._workspaceId.code-Di11hnHW.js +0 -1
package/dist/start-server.mjs
CHANGED
|
@@ -3181,7 +3181,7 @@ var require_stream = __commonJS({
|
|
|
3181
3181
|
};
|
|
3182
3182
|
duplex._final = function(callback) {
|
|
3183
3183
|
if (ws.readyState === ws.CONNECTING) {
|
|
3184
|
-
ws.once("open", function
|
|
3184
|
+
ws.once("open", function open3() {
|
|
3185
3185
|
duplex._final(callback);
|
|
3186
3186
|
});
|
|
3187
3187
|
return;
|
|
@@ -3202,7 +3202,7 @@ var require_stream = __commonJS({
|
|
|
3202
3202
|
};
|
|
3203
3203
|
duplex._write = function(chunk, encoding, callback) {
|
|
3204
3204
|
if (ws.readyState === ws.CONNECTING) {
|
|
3205
|
-
ws.once("open", function
|
|
3205
|
+
ws.once("open", function open3() {
|
|
3206
3206
|
duplex._write(chunk, encoding, callback);
|
|
3207
3207
|
});
|
|
3208
3208
|
return;
|
|
@@ -5648,7 +5648,7 @@ var require_thread_stream = __commonJS({
|
|
|
5648
5648
|
var { version: version2 } = require_package();
|
|
5649
5649
|
var { EventEmitter } = __require("events");
|
|
5650
5650
|
var { Worker } = __require("worker_threads");
|
|
5651
|
-
var { join:
|
|
5651
|
+
var { join: join25 } = __require("path");
|
|
5652
5652
|
var { pathToFileURL } = __require("url");
|
|
5653
5653
|
var { wait } = require_wait();
|
|
5654
5654
|
var {
|
|
@@ -5684,7 +5684,7 @@ var require_thread_stream = __commonJS({
|
|
|
5684
5684
|
function createWorker(stream, opts) {
|
|
5685
5685
|
const { filename, workerData } = opts;
|
|
5686
5686
|
const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
|
|
5687
|
-
const toExecute = bundlerOverrides["thread-stream-worker"] ||
|
|
5687
|
+
const toExecute = bundlerOverrides["thread-stream-worker"] || join25(__dirname, "lib", "worker.js");
|
|
5688
5688
|
const worker = new Worker(toExecute, {
|
|
5689
5689
|
...opts.workerOpts,
|
|
5690
5690
|
trackUnmanagedFds: false,
|
|
@@ -6070,7 +6070,7 @@ var require_transport = __commonJS({
|
|
|
6070
6070
|
"use strict";
|
|
6071
6071
|
var { createRequire: createRequire2 } = __require("module");
|
|
6072
6072
|
var getCallers = require_caller();
|
|
6073
|
-
var { join:
|
|
6073
|
+
var { join: join25, isAbsolute: isAbsolute3, sep: sep3 } = __require("node:path");
|
|
6074
6074
|
var sleep2 = require_atomic_sleep();
|
|
6075
6075
|
var onExit = require_on_exit_leak_free();
|
|
6076
6076
|
var ThreadStream = require_thread_stream();
|
|
@@ -6133,7 +6133,7 @@ var require_transport = __commonJS({
|
|
|
6133
6133
|
throw new Error("only one of target or targets can be specified");
|
|
6134
6134
|
}
|
|
6135
6135
|
if (targets) {
|
|
6136
|
-
target = bundlerOverrides["pino-worker"] ||
|
|
6136
|
+
target = bundlerOverrides["pino-worker"] || join25(__dirname, "worker.js");
|
|
6137
6137
|
options2.targets = targets.filter((dest) => dest.target).map((dest) => {
|
|
6138
6138
|
return {
|
|
6139
6139
|
...dest,
|
|
@@ -6151,7 +6151,7 @@ var require_transport = __commonJS({
|
|
|
6151
6151
|
});
|
|
6152
6152
|
});
|
|
6153
6153
|
} else if (pipeline) {
|
|
6154
|
-
target = bundlerOverrides["pino-worker"] ||
|
|
6154
|
+
target = bundlerOverrides["pino-worker"] || join25(__dirname, "worker.js");
|
|
6155
6155
|
options2.pipelines = [pipeline.map((dest) => {
|
|
6156
6156
|
return {
|
|
6157
6157
|
...dest,
|
|
@@ -6169,11 +6169,11 @@ var require_transport = __commonJS({
|
|
|
6169
6169
|
return buildStream(fixTarget(target), options2, worker, sync);
|
|
6170
6170
|
function fixTarget(origin) {
|
|
6171
6171
|
origin = bundlerOverrides[origin] || origin;
|
|
6172
|
-
if (
|
|
6172
|
+
if (isAbsolute3(origin) || origin.indexOf("file://") === 0) {
|
|
6173
6173
|
return origin;
|
|
6174
6174
|
}
|
|
6175
6175
|
if (origin === "pino/file") {
|
|
6176
|
-
return
|
|
6176
|
+
return join25(__dirname, "..", "file.js");
|
|
6177
6177
|
}
|
|
6178
6178
|
let fixTarget2;
|
|
6179
6179
|
for (const filePath of callers) {
|
|
@@ -6501,11 +6501,11 @@ var require_tools = __commonJS({
|
|
|
6501
6501
|
}
|
|
6502
6502
|
}
|
|
6503
6503
|
}
|
|
6504
|
-
function buildFormatters(level, bindings,
|
|
6504
|
+
function buildFormatters(level, bindings, log27) {
|
|
6505
6505
|
return {
|
|
6506
6506
|
level,
|
|
6507
6507
|
bindings,
|
|
6508
|
-
log:
|
|
6508
|
+
log: log27
|
|
6509
6509
|
};
|
|
6510
6510
|
}
|
|
6511
6511
|
function normalizeDestFileDescriptor(destination) {
|
|
@@ -6888,11 +6888,11 @@ var require_proto = __commonJS({
|
|
|
6888
6888
|
}
|
|
6889
6889
|
} else instance[serializersSym] = serializers;
|
|
6890
6890
|
if (options2.hasOwnProperty("formatters")) {
|
|
6891
|
-
const { level, bindings: chindings, log:
|
|
6891
|
+
const { level, bindings: chindings, log: log27 } = options2.formatters;
|
|
6892
6892
|
instance[formattersSym] = buildFormatters(
|
|
6893
6893
|
level || formatters.level,
|
|
6894
6894
|
chindings || resetChildingsFormatter,
|
|
6895
|
-
|
|
6895
|
+
log27 || formatters.log
|
|
6896
6896
|
);
|
|
6897
6897
|
} else {
|
|
6898
6898
|
instance[formattersSym] = buildFormatters(
|
|
@@ -7162,7 +7162,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
7162
7162
|
return circularValue;
|
|
7163
7163
|
}
|
|
7164
7164
|
let res = "";
|
|
7165
|
-
let
|
|
7165
|
+
let join25 = ",";
|
|
7166
7166
|
const originalIndentation = indentation;
|
|
7167
7167
|
if (Array.isArray(value)) {
|
|
7168
7168
|
if (value.length === 0) {
|
|
@@ -7176,7 +7176,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
7176
7176
|
indentation += spacer;
|
|
7177
7177
|
res += `
|
|
7178
7178
|
${indentation}`;
|
|
7179
|
-
|
|
7179
|
+
join25 = `,
|
|
7180
7180
|
${indentation}`;
|
|
7181
7181
|
}
|
|
7182
7182
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -7184,13 +7184,13 @@ ${indentation}`;
|
|
|
7184
7184
|
for (; i2 < maximumValuesToStringify - 1; i2++) {
|
|
7185
7185
|
const tmp2 = stringifyFnReplacer(String(i2), value, stack, replacer, spacer, indentation);
|
|
7186
7186
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
7187
|
-
res +=
|
|
7187
|
+
res += join25;
|
|
7188
7188
|
}
|
|
7189
7189
|
const tmp = stringifyFnReplacer(String(i2), value, stack, replacer, spacer, indentation);
|
|
7190
7190
|
res += tmp !== void 0 ? tmp : "null";
|
|
7191
7191
|
if (value.length - 1 > maximumBreadth) {
|
|
7192
7192
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
7193
|
-
res += `${
|
|
7193
|
+
res += `${join25}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
7194
7194
|
}
|
|
7195
7195
|
if (spacer !== "") {
|
|
7196
7196
|
res += `
|
|
@@ -7211,7 +7211,7 @@ ${originalIndentation}`;
|
|
|
7211
7211
|
let separator = "";
|
|
7212
7212
|
if (spacer !== "") {
|
|
7213
7213
|
indentation += spacer;
|
|
7214
|
-
|
|
7214
|
+
join25 = `,
|
|
7215
7215
|
${indentation}`;
|
|
7216
7216
|
whitespace = " ";
|
|
7217
7217
|
}
|
|
@@ -7225,13 +7225,13 @@ ${indentation}`;
|
|
|
7225
7225
|
const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
|
|
7226
7226
|
if (tmp !== void 0) {
|
|
7227
7227
|
res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
|
|
7228
|
-
separator =
|
|
7228
|
+
separator = join25;
|
|
7229
7229
|
}
|
|
7230
7230
|
}
|
|
7231
7231
|
if (keyLength > maximumBreadth) {
|
|
7232
7232
|
const removedKeys = keyLength - maximumBreadth;
|
|
7233
7233
|
res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
|
|
7234
|
-
separator =
|
|
7234
|
+
separator = join25;
|
|
7235
7235
|
}
|
|
7236
7236
|
if (spacer !== "" && separator.length > 1) {
|
|
7237
7237
|
res = `
|
|
@@ -7272,7 +7272,7 @@ ${originalIndentation}`;
|
|
|
7272
7272
|
}
|
|
7273
7273
|
const originalIndentation = indentation;
|
|
7274
7274
|
let res = "";
|
|
7275
|
-
let
|
|
7275
|
+
let join25 = ",";
|
|
7276
7276
|
if (Array.isArray(value)) {
|
|
7277
7277
|
if (value.length === 0) {
|
|
7278
7278
|
return "[]";
|
|
@@ -7285,7 +7285,7 @@ ${originalIndentation}`;
|
|
|
7285
7285
|
indentation += spacer;
|
|
7286
7286
|
res += `
|
|
7287
7287
|
${indentation}`;
|
|
7288
|
-
|
|
7288
|
+
join25 = `,
|
|
7289
7289
|
${indentation}`;
|
|
7290
7290
|
}
|
|
7291
7291
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -7293,13 +7293,13 @@ ${indentation}`;
|
|
|
7293
7293
|
for (; i2 < maximumValuesToStringify - 1; i2++) {
|
|
7294
7294
|
const tmp2 = stringifyArrayReplacer(String(i2), value[i2], stack, replacer, spacer, indentation);
|
|
7295
7295
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
7296
|
-
res +=
|
|
7296
|
+
res += join25;
|
|
7297
7297
|
}
|
|
7298
7298
|
const tmp = stringifyArrayReplacer(String(i2), value[i2], stack, replacer, spacer, indentation);
|
|
7299
7299
|
res += tmp !== void 0 ? tmp : "null";
|
|
7300
7300
|
if (value.length - 1 > maximumBreadth) {
|
|
7301
7301
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
7302
|
-
res += `${
|
|
7302
|
+
res += `${join25}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
7303
7303
|
}
|
|
7304
7304
|
if (spacer !== "") {
|
|
7305
7305
|
res += `
|
|
@@ -7312,7 +7312,7 @@ ${originalIndentation}`;
|
|
|
7312
7312
|
let whitespace = "";
|
|
7313
7313
|
if (spacer !== "") {
|
|
7314
7314
|
indentation += spacer;
|
|
7315
|
-
|
|
7315
|
+
join25 = `,
|
|
7316
7316
|
${indentation}`;
|
|
7317
7317
|
whitespace = " ";
|
|
7318
7318
|
}
|
|
@@ -7321,7 +7321,7 @@ ${indentation}`;
|
|
|
7321
7321
|
const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
|
|
7322
7322
|
if (tmp !== void 0) {
|
|
7323
7323
|
res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
|
|
7324
|
-
separator =
|
|
7324
|
+
separator = join25;
|
|
7325
7325
|
}
|
|
7326
7326
|
}
|
|
7327
7327
|
if (spacer !== "" && separator.length > 1) {
|
|
@@ -7379,20 +7379,20 @@ ${originalIndentation}`;
|
|
|
7379
7379
|
indentation += spacer;
|
|
7380
7380
|
let res2 = `
|
|
7381
7381
|
${indentation}`;
|
|
7382
|
-
const
|
|
7382
|
+
const join26 = `,
|
|
7383
7383
|
${indentation}`;
|
|
7384
7384
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
7385
7385
|
let i2 = 0;
|
|
7386
7386
|
for (; i2 < maximumValuesToStringify - 1; i2++) {
|
|
7387
7387
|
const tmp2 = stringifyIndent(String(i2), value[i2], stack, spacer, indentation);
|
|
7388
7388
|
res2 += tmp2 !== void 0 ? tmp2 : "null";
|
|
7389
|
-
res2 +=
|
|
7389
|
+
res2 += join26;
|
|
7390
7390
|
}
|
|
7391
7391
|
const tmp = stringifyIndent(String(i2), value[i2], stack, spacer, indentation);
|
|
7392
7392
|
res2 += tmp !== void 0 ? tmp : "null";
|
|
7393
7393
|
if (value.length - 1 > maximumBreadth) {
|
|
7394
7394
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
7395
|
-
res2 += `${
|
|
7395
|
+
res2 += `${join26}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
7396
7396
|
}
|
|
7397
7397
|
res2 += `
|
|
7398
7398
|
${originalIndentation}`;
|
|
@@ -7408,16 +7408,16 @@ ${originalIndentation}`;
|
|
|
7408
7408
|
return '"[Object]"';
|
|
7409
7409
|
}
|
|
7410
7410
|
indentation += spacer;
|
|
7411
|
-
const
|
|
7411
|
+
const join25 = `,
|
|
7412
7412
|
${indentation}`;
|
|
7413
7413
|
let res = "";
|
|
7414
7414
|
let separator = "";
|
|
7415
7415
|
let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
|
|
7416
7416
|
if (isTypedArrayWithEntries(value)) {
|
|
7417
|
-
res += stringifyTypedArray(value,
|
|
7417
|
+
res += stringifyTypedArray(value, join25, maximumBreadth);
|
|
7418
7418
|
keys = keys.slice(value.length);
|
|
7419
7419
|
maximumPropertiesToStringify -= value.length;
|
|
7420
|
-
separator =
|
|
7420
|
+
separator = join25;
|
|
7421
7421
|
}
|
|
7422
7422
|
if (deterministic) {
|
|
7423
7423
|
keys = sort(keys, comparator);
|
|
@@ -7428,13 +7428,13 @@ ${indentation}`;
|
|
|
7428
7428
|
const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
|
|
7429
7429
|
if (tmp !== void 0) {
|
|
7430
7430
|
res += `${separator}${strEscape(key2)}: ${tmp}`;
|
|
7431
|
-
separator =
|
|
7431
|
+
separator = join25;
|
|
7432
7432
|
}
|
|
7433
7433
|
}
|
|
7434
7434
|
if (keyLength > maximumBreadth) {
|
|
7435
7435
|
const removedKeys = keyLength - maximumBreadth;
|
|
7436
7436
|
res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
|
|
7437
|
-
separator =
|
|
7437
|
+
separator = join25;
|
|
7438
7438
|
}
|
|
7439
7439
|
if (separator !== "") {
|
|
7440
7440
|
res = `
|
|
@@ -61593,14 +61593,14 @@ function composeSets(setA, setB, mkSet = false) {
|
|
|
61593
61593
|
let sections = [];
|
|
61594
61594
|
let insert2 = mkSet ? [] : null;
|
|
61595
61595
|
let a6 = new SectionIter(setA), b10 = new SectionIter(setB);
|
|
61596
|
-
for (let
|
|
61596
|
+
for (let open3 = false; ; ) {
|
|
61597
61597
|
if (a6.done && b10.done) {
|
|
61598
61598
|
return insert2 ? ChangeSet.createSet(sections, insert2) : ChangeDesc.create(sections);
|
|
61599
61599
|
} else if (a6.ins == 0) {
|
|
61600
|
-
addSection(sections, a6.len, 0,
|
|
61600
|
+
addSection(sections, a6.len, 0, open3);
|
|
61601
61601
|
a6.next();
|
|
61602
61602
|
} else if (b10.len == 0 && !b10.done) {
|
|
61603
|
-
addSection(sections, 0, b10.ins,
|
|
61603
|
+
addSection(sections, 0, b10.ins, open3);
|
|
61604
61604
|
if (insert2)
|
|
61605
61605
|
addInsert(insert2, sections, b10.text);
|
|
61606
61606
|
b10.next();
|
|
@@ -61610,19 +61610,19 @@ function composeSets(setA, setB, mkSet = false) {
|
|
|
61610
61610
|
let len = Math.min(a6.len2, b10.len), sectionLen = sections.length;
|
|
61611
61611
|
if (a6.ins == -1) {
|
|
61612
61612
|
let insB = b10.ins == -1 ? -1 : b10.off ? 0 : b10.ins;
|
|
61613
|
-
addSection(sections, len, insB,
|
|
61613
|
+
addSection(sections, len, insB, open3);
|
|
61614
61614
|
if (insert2 && insB)
|
|
61615
61615
|
addInsert(insert2, sections, b10.text);
|
|
61616
61616
|
} else if (b10.ins == -1) {
|
|
61617
|
-
addSection(sections, a6.off ? 0 : a6.len, len,
|
|
61617
|
+
addSection(sections, a6.off ? 0 : a6.len, len, open3);
|
|
61618
61618
|
if (insert2)
|
|
61619
61619
|
addInsert(insert2, sections, a6.textBit(len));
|
|
61620
61620
|
} else {
|
|
61621
|
-
addSection(sections, a6.off ? 0 : a6.len, b10.off ? 0 : b10.ins,
|
|
61621
|
+
addSection(sections, a6.off ? 0 : a6.len, b10.off ? 0 : b10.ins, open3);
|
|
61622
61622
|
if (insert2 && !b10.off)
|
|
61623
61623
|
addInsert(insert2, sections, b10.text);
|
|
61624
61624
|
}
|
|
61625
|
-
|
|
61625
|
+
open3 = (a6.ins > len || b10.ins >= 0 && b10.len > len) && (open3 || sections.length > sectionLen);
|
|
61626
61626
|
a6.forward2(len);
|
|
61627
61627
|
b10.forward(len);
|
|
61628
61628
|
}
|
|
@@ -62188,9 +62188,9 @@ var init_dist3 = __esm({
|
|
|
62188
62188
|
line2++;
|
|
62189
62189
|
}
|
|
62190
62190
|
}
|
|
62191
|
-
decompose(from, to, target,
|
|
62191
|
+
decompose(from, to, target, open3) {
|
|
62192
62192
|
let text4 = from <= 0 && to >= this.length ? this : new _TextLeaf(sliceText(this.text, from, to), Math.min(to, this.length) - Math.max(0, from));
|
|
62193
|
-
if (
|
|
62193
|
+
if (open3 & 1) {
|
|
62194
62194
|
let prev = target.pop();
|
|
62195
62195
|
let joined = appendText(text4.text, prev.text.slice(), 0, text4.length);
|
|
62196
62196
|
if (joined.length <= 32) {
|
|
@@ -62267,11 +62267,11 @@ var init_dist3 = __esm({
|
|
|
62267
62267
|
line2 = endLine + 1;
|
|
62268
62268
|
}
|
|
62269
62269
|
}
|
|
62270
|
-
decompose(from, to, target,
|
|
62270
|
+
decompose(from, to, target, open3) {
|
|
62271
62271
|
for (let i2 = 0, pos = 0; pos <= to && i2 < this.children.length; i2++) {
|
|
62272
62272
|
let child = this.children[i2], end = pos + child.length;
|
|
62273
62273
|
if (from <= end && to >= pos) {
|
|
62274
|
-
let childOpen =
|
|
62274
|
+
let childOpen = open3 & ((pos <= from ? 1 : 0) | (end >= to ? 2 : 0));
|
|
62275
62275
|
if (pos >= from && end <= to && !childOpen)
|
|
62276
62276
|
target.push(child);
|
|
62277
62277
|
else
|
|
@@ -64744,10 +64744,10 @@ var init_dist3 = __esm({
|
|
|
64744
64744
|
return active.reverse();
|
|
64745
64745
|
}
|
|
64746
64746
|
openEnd(to) {
|
|
64747
|
-
let
|
|
64747
|
+
let open3 = 0;
|
|
64748
64748
|
for (let i2 = this.activeTo.length - 1; i2 >= 0 && this.activeTo[i2] > to; i2--)
|
|
64749
|
-
|
|
64750
|
-
return
|
|
64749
|
+
open3++;
|
|
64750
|
+
return open3;
|
|
64751
64751
|
}
|
|
64752
64752
|
};
|
|
64753
64753
|
}
|
|
@@ -65731,14 +65731,14 @@ function getIsolatedRanges(view, line2) {
|
|
|
65731
65731
|
RangeSet.spans(sets, line2.from, line2.to, {
|
|
65732
65732
|
point() {
|
|
65733
65733
|
},
|
|
65734
|
-
span(fromDoc, toDoc, active,
|
|
65734
|
+
span(fromDoc, toDoc, active, open3) {
|
|
65735
65735
|
let from = fromDoc - line2.from, to = toDoc - line2.from;
|
|
65736
65736
|
let level = result;
|
|
65737
|
-
for (let i2 = active.length - 1; i2 >= 0; i2--,
|
|
65737
|
+
for (let i2 = active.length - 1; i2 >= 0; i2--, open3--) {
|
|
65738
65738
|
let direction = active[i2].spec.bidiIsolate, update;
|
|
65739
65739
|
if (direction == null)
|
|
65740
65740
|
direction = autoDirection(line2.text, from, to);
|
|
65741
|
-
if (
|
|
65741
|
+
if (open3 > 0 && level.length && (update = level[level.length - 1]).to == from && update.direction == direction) {
|
|
65742
65742
|
update.to = to;
|
|
65743
65743
|
level = update.inner;
|
|
65744
65744
|
} else {
|
|
@@ -86574,11 +86574,11 @@ var require_core = __commonJS({
|
|
|
86574
86574
|
Ajv2.ValidationError = validation_error_1.default;
|
|
86575
86575
|
Ajv2.MissingRefError = ref_error_1.default;
|
|
86576
86576
|
exports.default = Ajv2;
|
|
86577
|
-
function checkOptions(checkOpts, options2, msg,
|
|
86577
|
+
function checkOptions(checkOpts, options2, msg, log27 = "error") {
|
|
86578
86578
|
for (const key in checkOpts) {
|
|
86579
86579
|
const opt = key;
|
|
86580
86580
|
if (opt in options2)
|
|
86581
|
-
this.logger[
|
|
86581
|
+
this.logger[log27](`${msg}: option ${key}. ${checkOpts[opt]}`);
|
|
86582
86582
|
}
|
|
86583
86583
|
}
|
|
86584
86584
|
function getSchEnv(keyRef) {
|
|
@@ -89062,7 +89062,7 @@ var require_dist5 = __commonJS({
|
|
|
89062
89062
|
// start-server.ts
|
|
89063
89063
|
import { appendFileSync as appendFileSync2, createReadStream as createReadStream3, mkdirSync as mkdirSync8, readFileSync as readFileSync9, statSync as statSync7 } from "node:fs";
|
|
89064
89064
|
import { createServer } from "node:http";
|
|
89065
|
-
import { basename as
|
|
89065
|
+
import { basename as basename3, join as join24, resolve as resolve7 } from "node:path";
|
|
89066
89066
|
|
|
89067
89067
|
// ../../node_modules/.pnpm/@trpc+server@11.12.0_typescript@5.9.3/node_modules/@trpc/server/dist/codes-DagpWZLc.mjs
|
|
89068
89068
|
function mergeWithoutOverrides(obj1, ...objs) {
|
|
@@ -109498,7 +109498,7 @@ var Dialog = (props) => {
|
|
|
109498
109498
|
} = props;
|
|
109499
109499
|
const triggerRef = React18.useRef(null);
|
|
109500
109500
|
const contentRef = React18.useRef(null);
|
|
109501
|
-
const [
|
|
109501
|
+
const [open3, setOpen] = useControllableState({
|
|
109502
109502
|
prop: openProp,
|
|
109503
109503
|
defaultProp: defaultOpen ?? false,
|
|
109504
109504
|
onChange: onOpenChange,
|
|
@@ -109513,7 +109513,7 @@ var Dialog = (props) => {
|
|
|
109513
109513
|
contentId: useId(),
|
|
109514
109514
|
titleId: useId(),
|
|
109515
109515
|
descriptionId: useId(),
|
|
109516
|
-
open:
|
|
109516
|
+
open: open3,
|
|
109517
109517
|
onOpenChange: setOpen,
|
|
109518
109518
|
onOpenToggle: React18.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
109519
109519
|
modal,
|
|
@@ -109741,8 +109741,8 @@ var DialogClose = React18.forwardRef(
|
|
|
109741
109741
|
}
|
|
109742
109742
|
);
|
|
109743
109743
|
DialogClose.displayName = CLOSE_NAME;
|
|
109744
|
-
function getState(
|
|
109745
|
-
return
|
|
109744
|
+
function getState(open3) {
|
|
109745
|
+
return open3 ? "open" : "closed";
|
|
109746
109746
|
}
|
|
109747
109747
|
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
109748
109748
|
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
@@ -111574,7 +111574,7 @@ function useFloating(options2) {
|
|
|
111574
111574
|
} = {},
|
|
111575
111575
|
transform: transform2 = true,
|
|
111576
111576
|
whileElementsMounted,
|
|
111577
|
-
open:
|
|
111577
|
+
open: open3
|
|
111578
111578
|
} = options2;
|
|
111579
111579
|
const [data, setData] = React20.useState({
|
|
111580
111580
|
x: 0,
|
|
@@ -111610,7 +111610,7 @@ function useFloating(options2) {
|
|
|
111610
111610
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
111611
111611
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
111612
111612
|
const platformRef = useLatestRef(platform3);
|
|
111613
|
-
const openRef = useLatestRef(
|
|
111613
|
+
const openRef = useLatestRef(open3);
|
|
111614
111614
|
const update = React20.useCallback(() => {
|
|
111615
111615
|
if (!referenceRef.current || !floatingRef.current) {
|
|
111616
111616
|
return;
|
|
@@ -111641,14 +111641,14 @@ function useFloating(options2) {
|
|
|
111641
111641
|
});
|
|
111642
111642
|
}, [latestMiddleware, placement, strategy, platformRef, openRef]);
|
|
111643
111643
|
index(() => {
|
|
111644
|
-
if (
|
|
111644
|
+
if (open3 === false && dataRef.current.isPositioned) {
|
|
111645
111645
|
dataRef.current.isPositioned = false;
|
|
111646
111646
|
setData((data2) => ({
|
|
111647
111647
|
...data2,
|
|
111648
111648
|
isPositioned: false
|
|
111649
111649
|
}));
|
|
111650
111650
|
}
|
|
111651
|
-
}, [
|
|
111651
|
+
}, [open3]);
|
|
111652
111652
|
const isMountedRef = React20.useRef(false);
|
|
111653
111653
|
index(() => {
|
|
111654
111654
|
isMountedRef.current = true;
|
|
@@ -112332,7 +112332,7 @@ var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
|
112332
112332
|
var [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);
|
|
112333
112333
|
var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
|
|
112334
112334
|
var Menu = (props) => {
|
|
112335
|
-
const { __scopeMenu, open:
|
|
112335
|
+
const { __scopeMenu, open: open3 = false, children, dir, onOpenChange, modal = true } = props;
|
|
112336
112336
|
const popperScope = usePopperScope(__scopeMenu);
|
|
112337
112337
|
const [content2, setContent] = React27.useState(null);
|
|
112338
112338
|
const isUsingKeyboardRef = React27.useRef(false);
|
|
@@ -112356,7 +112356,7 @@ var Menu = (props) => {
|
|
|
112356
112356
|
MenuProvider,
|
|
112357
112357
|
{
|
|
112358
112358
|
scope: __scopeMenu,
|
|
112359
|
-
open:
|
|
112359
|
+
open: open3,
|
|
112360
112360
|
onOpenChange: handleOpenChange,
|
|
112361
112361
|
content: content2,
|
|
112362
112362
|
onContentChange: setContent,
|
|
@@ -112866,7 +112866,7 @@ MenuArrow.displayName = ARROW_NAME2;
|
|
|
112866
112866
|
var SUB_NAME = "MenuSub";
|
|
112867
112867
|
var [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);
|
|
112868
112868
|
var MenuSub = (props) => {
|
|
112869
|
-
const { __scopeMenu, children, open:
|
|
112869
|
+
const { __scopeMenu, children, open: open3 = false, onOpenChange } = props;
|
|
112870
112870
|
const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);
|
|
112871
112871
|
const popperScope = usePopperScope(__scopeMenu);
|
|
112872
112872
|
const [trigger, setTrigger] = React27.useState(null);
|
|
@@ -112880,7 +112880,7 @@ var MenuSub = (props) => {
|
|
|
112880
112880
|
MenuProvider,
|
|
112881
112881
|
{
|
|
112882
112882
|
scope: __scopeMenu,
|
|
112883
|
-
open:
|
|
112883
|
+
open: open3,
|
|
112884
112884
|
onOpenChange: handleOpenChange,
|
|
112885
112885
|
content: content2,
|
|
112886
112886
|
onContentChange: setContent,
|
|
@@ -113048,8 +113048,8 @@ var MenuSubContent = React27.forwardRef(
|
|
|
113048
113048
|
}
|
|
113049
113049
|
);
|
|
113050
113050
|
MenuSubContent.displayName = SUB_CONTENT_NAME;
|
|
113051
|
-
function getOpenState(
|
|
113052
|
-
return
|
|
113051
|
+
function getOpenState(open3) {
|
|
113052
|
+
return open3 ? "open" : "closed";
|
|
113053
113053
|
}
|
|
113054
113054
|
function isIndeterminate(checked) {
|
|
113055
113055
|
return checked === "indeterminate";
|
|
@@ -113130,7 +113130,7 @@ var useMenuScope = createMenuScope();
|
|
|
113130
113130
|
var [ContextMenuProvider, useContextMenuContext] = createContextMenuContext(CONTEXT_MENU_NAME);
|
|
113131
113131
|
var ContextMenu = (props) => {
|
|
113132
113132
|
const { __scopeContextMenu, children, onOpenChange, dir, modal = true } = props;
|
|
113133
|
-
const [
|
|
113133
|
+
const [open3, setOpen] = React28.useState(false);
|
|
113134
113134
|
const menuScope = useMenuScope(__scopeContextMenu);
|
|
113135
113135
|
const handleOpenChangeProp = useCallbackRef(onOpenChange);
|
|
113136
113136
|
const handleOpenChange = React28.useCallback(
|
|
@@ -113144,7 +113144,7 @@ var ContextMenu = (props) => {
|
|
|
113144
113144
|
ContextMenuProvider,
|
|
113145
113145
|
{
|
|
113146
113146
|
scope: __scopeContextMenu,
|
|
113147
|
-
open:
|
|
113147
|
+
open: open3,
|
|
113148
113148
|
onOpenChange: handleOpenChange,
|
|
113149
113149
|
modal,
|
|
113150
113150
|
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
@@ -113152,7 +113152,7 @@ var ContextMenu = (props) => {
|
|
|
113152
113152
|
{
|
|
113153
113153
|
...menuScope,
|
|
113154
113154
|
dir,
|
|
113155
|
-
open:
|
|
113155
|
+
open: open3,
|
|
113156
113156
|
onOpenChange: handleOpenChange,
|
|
113157
113157
|
modal,
|
|
113158
113158
|
children
|
|
@@ -113339,13 +113339,13 @@ var SUB_NAME2 = "ContextMenuSub";
|
|
|
113339
113339
|
var ContextMenuSub = (props) => {
|
|
113340
113340
|
const { __scopeContextMenu, children, onOpenChange, open: openProp, defaultOpen } = props;
|
|
113341
113341
|
const menuScope = useMenuScope(__scopeContextMenu);
|
|
113342
|
-
const [
|
|
113342
|
+
const [open3, setOpen] = useControllableState({
|
|
113343
113343
|
prop: openProp,
|
|
113344
113344
|
defaultProp: defaultOpen ?? false,
|
|
113345
113345
|
onChange: onOpenChange,
|
|
113346
113346
|
caller: SUB_NAME2
|
|
113347
113347
|
});
|
|
113348
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Sub, { ...menuScope, open:
|
|
113348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Sub, { ...menuScope, open: open3, onOpenChange: setOpen, children });
|
|
113349
113349
|
};
|
|
113350
113350
|
ContextMenuSub.displayName = SUB_NAME2;
|
|
113351
113351
|
var SUB_TRIGGER_NAME2 = "ContextMenuSubTrigger";
|
|
@@ -113489,7 +113489,7 @@ var Tooltip = (props) => {
|
|
|
113489
113489
|
const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;
|
|
113490
113490
|
const delayDuration = delayDurationProp ?? providerContext.delayDuration;
|
|
113491
113491
|
const wasOpenDelayedRef = React29.useRef(false);
|
|
113492
|
-
const [
|
|
113492
|
+
const [open3, setOpen] = useControllableState({
|
|
113493
113493
|
prop: openProp,
|
|
113494
113494
|
defaultProp: defaultOpen ?? false,
|
|
113495
113495
|
onChange: (open22) => {
|
|
@@ -113504,8 +113504,8 @@ var Tooltip = (props) => {
|
|
|
113504
113504
|
caller: TOOLTIP_NAME
|
|
113505
113505
|
});
|
|
113506
113506
|
const stateAttribute = React29.useMemo(() => {
|
|
113507
|
-
return
|
|
113508
|
-
}, [
|
|
113507
|
+
return open3 ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed";
|
|
113508
|
+
}, [open3]);
|
|
113509
113509
|
const handleOpen = React29.useCallback(() => {
|
|
113510
113510
|
window.clearTimeout(openTimerRef.current);
|
|
113511
113511
|
openTimerRef.current = 0;
|
|
@@ -113538,7 +113538,7 @@ var Tooltip = (props) => {
|
|
|
113538
113538
|
{
|
|
113539
113539
|
scope: __scopeTooltip,
|
|
113540
113540
|
contentId,
|
|
113541
|
-
open:
|
|
113541
|
+
open: open3,
|
|
113542
113542
|
stateAttribute,
|
|
113543
113543
|
trigger,
|
|
113544
113544
|
onTriggerChange: setTrigger,
|
|
@@ -120555,13 +120555,13 @@ var filenameIconMap = {
|
|
|
120555
120555
|
};
|
|
120556
120556
|
function getFileIcon(filename) {
|
|
120557
120557
|
const lower = filename.toLowerCase();
|
|
120558
|
-
const
|
|
120559
|
-
if (filenameIconMap[
|
|
120560
|
-
return filenameIconMap[
|
|
120558
|
+
const basename4 = lower.split("/").pop() ?? lower;
|
|
120559
|
+
if (filenameIconMap[basename4]) {
|
|
120560
|
+
return filenameIconMap[basename4];
|
|
120561
120561
|
}
|
|
120562
|
-
const dotIndex =
|
|
120562
|
+
const dotIndex = basename4.lastIndexOf(".");
|
|
120563
120563
|
if (dotIndex !== -1) {
|
|
120564
|
-
const ext =
|
|
120564
|
+
const ext = basename4.slice(dotIndex + 1);
|
|
120565
120565
|
if (extensionIconMap[ext]) {
|
|
120566
120566
|
return extensionIconMap[ext];
|
|
120567
120567
|
}
|
|
@@ -121007,8 +121007,8 @@ function TreeNode2({
|
|
|
121007
121007
|
) : /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
121008
121008
|
ContextMenu2,
|
|
121009
121009
|
{
|
|
121010
|
-
onOpenChange: (
|
|
121011
|
-
if (
|
|
121010
|
+
onOpenChange: (open3) => {
|
|
121011
|
+
if (open3) onSelectRow(entryPath, isDir ? "directory" : "file");
|
|
121012
121012
|
},
|
|
121013
121013
|
children: [
|
|
121014
121014
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ContextMenuTrigger2, { asChild: true, children: button }),
|
|
@@ -121635,8 +121635,8 @@ var FileBrowser = (0, import_react31.forwardRef)(function FileBrowser2({
|
|
|
121635
121635
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
121636
121636
|
ContextMenu2,
|
|
121637
121637
|
{
|
|
121638
|
-
onOpenChange: (
|
|
121639
|
-
if (
|
|
121638
|
+
onOpenChange: (open3) => {
|
|
121639
|
+
if (open3) clearTreeSelection();
|
|
121640
121640
|
},
|
|
121641
121641
|
children: [
|
|
121642
121642
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ContextMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "min-h-0 flex-1 overflow-y-auto py-1 pl-px", children: [
|
|
@@ -121728,8 +121728,8 @@ var FileBrowser = (0, import_react31.forwardRef)(function FileBrowser2({
|
|
|
121728
121728
|
Dialog2,
|
|
121729
121729
|
{
|
|
121730
121730
|
open: pendingDelete !== null,
|
|
121731
|
-
onOpenChange: (
|
|
121732
|
-
if (!
|
|
121731
|
+
onOpenChange: (open3) => {
|
|
121732
|
+
if (!open3) cancelDelete();
|
|
121733
121733
|
},
|
|
121734
121734
|
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(DialogContent2, { className: "sm:max-w-[425px]", onClick: (e2) => e2.stopPropagation(), children: [
|
|
121735
121735
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(DialogHeader, { children: [
|
|
@@ -124604,7 +124604,7 @@ function sql(strings, ...params) {
|
|
|
124604
124604
|
return new SQL([new StringChunk(str)]);
|
|
124605
124605
|
}
|
|
124606
124606
|
_sql.raw = raw;
|
|
124607
|
-
function
|
|
124607
|
+
function join25(chunks, separator) {
|
|
124608
124608
|
const result = [];
|
|
124609
124609
|
for (const [i2, chunk] of chunks.entries()) {
|
|
124610
124610
|
if (i2 > 0 && separator !== void 0) result.push(separator);
|
|
@@ -124612,7 +124612,7 @@ function sql(strings, ...params) {
|
|
|
124612
124612
|
}
|
|
124613
124613
|
return new SQL(result);
|
|
124614
124614
|
}
|
|
124615
|
-
_sql.join =
|
|
124615
|
+
_sql.join = join25;
|
|
124616
124616
|
function identifier(value) {
|
|
124617
124617
|
return new Name(value);
|
|
124618
124618
|
}
|
|
@@ -129114,7 +129114,7 @@ var SQLiteSelectQueryBuilderBase = class extends TypedQueryBuilder {
|
|
|
129114
129114
|
const baseTableName = this.tableName;
|
|
129115
129115
|
const tableName = getTableLikeName(table);
|
|
129116
129116
|
for (const item of extractUsedTable(table)) this.usedTables.add(item);
|
|
129117
|
-
if (typeof tableName === "string" && this.config.joins?.some((
|
|
129117
|
+
if (typeof tableName === "string" && this.config.joins?.some((join25) => join25.alias === tableName)) throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
129118
129118
|
if (!this.isPartialSelect) {
|
|
129119
129119
|
if (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === "string") this.config.fields = { [baseTableName]: this.config.fields };
|
|
129120
129120
|
if (typeof tableName === "string" && !is(table, SQL)) {
|
|
@@ -130322,7 +130322,7 @@ var SQLiteDialect = class {
|
|
|
130322
130322
|
if (!joins2) return;
|
|
130323
130323
|
const withEntries = Object.entries(joins2).filter(([_4, v4]) => v4);
|
|
130324
130324
|
if (!withEntries.length) return;
|
|
130325
|
-
return sql.join(withEntries.map(([k4,
|
|
130325
|
+
return sql.join(withEntries.map(([k4, join25]) => {
|
|
130326
130326
|
const relation = tableConfig.relations[k4];
|
|
130327
130327
|
const isSingle2 = is(relation, One);
|
|
130328
130328
|
const targetTable = aliasedTable(relation.targetTable, `d${currentDepth + 1}`);
|
|
@@ -130333,7 +130333,7 @@ var SQLiteDialect = class {
|
|
|
130333
130333
|
table: targetTable,
|
|
130334
130334
|
mode: isSingle2 ? "first" : "many",
|
|
130335
130335
|
schema,
|
|
130336
|
-
queryConfig:
|
|
130336
|
+
queryConfig: join25,
|
|
130337
130337
|
tableConfig: schema[relation.targetTableName],
|
|
130338
130338
|
relationWhere: filter2,
|
|
130339
130339
|
isNested: true,
|
|
@@ -130347,7 +130347,7 @@ var SQLiteDialect = class {
|
|
|
130347
130347
|
key: k4,
|
|
130348
130348
|
selection: innerQuery.selection,
|
|
130349
130349
|
isArray: !isSingle2,
|
|
130350
|
-
isOptional: (relation.optional ?? false) ||
|
|
130350
|
+
isOptional: (relation.optional ?? false) || join25 !== true && !!join25.where
|
|
130351
130351
|
});
|
|
130352
130352
|
const jsonColumns = sql.join(innerQuery.selection.map((s6) => {
|
|
130353
130353
|
return sql`${sql.raw(this.escapeString(s6.key))}, ${s6.selection ? sql`${jsonb2}(${sql.identifier(s6.key)})` : sql.identifier(s6.key)}`;
|
|
@@ -130816,7 +130816,7 @@ var SQLiteUpdateBase = class extends QueryPromise {
|
|
|
130816
130816
|
createJoin(joinType) {
|
|
130817
130817
|
return ((table, on) => {
|
|
130818
130818
|
const tableName = getTableLikeName(table);
|
|
130819
|
-
if (typeof tableName === "string" && this.config.joins.some((
|
|
130819
|
+
if (typeof tableName === "string" && this.config.joins.some((join25) => join25.alias === tableName)) throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
130820
130820
|
if (typeof on === "function") {
|
|
130821
130821
|
const from = this.config.from ? is(table, SQLiteTable) ? table[Table.Symbol.Columns] : is(table, Subquery) ? table._.selectedFields : is(table, SQLiteViewBase) ? table[ViewBaseConfig].selectedFields : void 0 : void 0;
|
|
130822
130822
|
on = on(new Proxy(this.config.table[Table.Symbol.Columns], new SelectionProxyHandler({
|
|
@@ -135961,14 +135961,14 @@ import { platform as platform2 } from "node:os";
|
|
|
135961
135961
|
import { dirname as dirname3, join as join18, resolve as resolve5 } from "node:path";
|
|
135962
135962
|
var SYMLINK_PATH = "/usr/local/bin/band";
|
|
135963
135963
|
function findCliBinaryAt(opts) {
|
|
135964
|
-
const { cwd, dirname:
|
|
135964
|
+
const { cwd, dirname: dirname8 } = opts;
|
|
135965
135965
|
const appsStrategies = [
|
|
135966
135966
|
// cwd = apps/web/ (Vite dev and production server)
|
|
135967
135967
|
resolve5(cwd, ".."),
|
|
135968
135968
|
// cwd = project root (fallback)
|
|
135969
135969
|
resolve5(cwd, "apps"),
|
|
135970
135970
|
// From this source file (apps/web/src/lib/ → apps/)
|
|
135971
|
-
resolve5(
|
|
135971
|
+
resolve5(dirname8, "..", "..", "..")
|
|
135972
135972
|
];
|
|
135973
135973
|
for (const appsDir of appsStrategies) {
|
|
135974
135974
|
for (const profile of ["release", "debug"]) {
|
|
@@ -135986,7 +135986,7 @@ function findCliBinaryAt(opts) {
|
|
|
135986
135986
|
resolve5(cwd, "..", "binaries", exe),
|
|
135987
135987
|
// From the bundled dist file (<Resources>/web/dist/start-server.mjs)
|
|
135988
135988
|
// → <Resources>/binaries/band
|
|
135989
|
-
resolve5(
|
|
135989
|
+
resolve5(dirname8, "..", "..", "binaries", exe)
|
|
135990
135990
|
];
|
|
135991
135991
|
for (const p6 of electronCandidates) {
|
|
135992
135992
|
try {
|
|
@@ -143947,9 +143947,9 @@ function createContext8() {
|
|
|
143947
143947
|
// src/trpc/router.ts
|
|
143948
143948
|
import { execFile as execFile5, execFileSync as execFileSync2, spawn as spawn8 } from "node:child_process";
|
|
143949
143949
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
143950
|
-
import { existsSync as
|
|
143951
|
-
import { cp, mkdir as mkdir2, readdir as readdir2, readFile as readFile2, rename, rm, stat as stat4, writeFile as writeFile2 } from "node:fs/promises";
|
|
143952
|
-
import { basename, dirname as
|
|
143950
|
+
import { existsSync as existsSync8, constants as fsConstants, mkdirSync as mkdirSync7, unlinkSync as unlinkSync3 } from "node:fs";
|
|
143951
|
+
import { cp, mkdir as mkdir2, open as open2, readdir as readdir2, readFile as readFile2, rename, rm, stat as stat4, writeFile as writeFile2 } from "node:fs/promises";
|
|
143952
|
+
import { basename as basename2, dirname as dirname7, extname as extname2, isAbsolute as isAbsolute2, join as join23, resolve as resolve6, sep as sep2 } from "node:path";
|
|
143953
143953
|
import { promisify } from "node:util";
|
|
143954
143954
|
init_src();
|
|
143955
143955
|
import { rgPath } from "@vscode/ripgrep";
|
|
@@ -144427,6 +144427,103 @@ function subscribeToFileChanges(workspaceId, listener) {
|
|
|
144427
144427
|
};
|
|
144428
144428
|
}
|
|
144429
144429
|
|
|
144430
|
+
// src/lib/formatter.ts
|
|
144431
|
+
init_src();
|
|
144432
|
+
import { existsSync as existsSync7, realpathSync as realpathSync4 } from "node:fs";
|
|
144433
|
+
import { basename, dirname as dirname6, isAbsolute, join as join22, resolve as resolvePath } from "node:path";
|
|
144434
|
+
import prettier from "prettier";
|
|
144435
|
+
var log24 = createLogger("formatter");
|
|
144436
|
+
var FormatterError = class extends Error {
|
|
144437
|
+
code;
|
|
144438
|
+
detail;
|
|
144439
|
+
constructor(code, message, detail) {
|
|
144440
|
+
super(message);
|
|
144441
|
+
this.name = "FormatterError";
|
|
144442
|
+
this.code = code;
|
|
144443
|
+
this.detail = detail;
|
|
144444
|
+
}
|
|
144445
|
+
};
|
|
144446
|
+
async function formatFile(worktreePath, filePath, content2, options2 = {}) {
|
|
144447
|
+
const absFile = isAbsolute(filePath) ? filePath : resolvePath(worktreePath, filePath);
|
|
144448
|
+
if (!isInsideWorktree(absFile, worktreePath)) {
|
|
144449
|
+
throw new FormatterError(
|
|
144450
|
+
"FILE_NOT_IN_WORKTREE",
|
|
144451
|
+
`File ${absFile} is outside the worktree ${worktreePath}`
|
|
144452
|
+
);
|
|
144453
|
+
}
|
|
144454
|
+
const start = Date.now();
|
|
144455
|
+
prettier.clearConfigCache();
|
|
144456
|
+
const ignorePath = resolvePath(worktreePath, ".prettierignore");
|
|
144457
|
+
const info = await prettier.getFileInfo(absFile, {
|
|
144458
|
+
resolveConfig: true,
|
|
144459
|
+
ignorePath: existsSync7(ignorePath) ? ignorePath : void 0
|
|
144460
|
+
});
|
|
144461
|
+
if (info.ignored) {
|
|
144462
|
+
return {
|
|
144463
|
+
skipped: true,
|
|
144464
|
+
file: absFile,
|
|
144465
|
+
reason: `Ignored by .prettierignore`,
|
|
144466
|
+
durationMs: Date.now() - start
|
|
144467
|
+
};
|
|
144468
|
+
}
|
|
144469
|
+
if (info.inferredParser === null) {
|
|
144470
|
+
return {
|
|
144471
|
+
skipped: true,
|
|
144472
|
+
file: absFile,
|
|
144473
|
+
reason: `Prettier has no parser for ${absFile}`,
|
|
144474
|
+
durationMs: Date.now() - start
|
|
144475
|
+
};
|
|
144476
|
+
}
|
|
144477
|
+
const config2 = options2.configOverride !== void 0 ? options2.configOverride : await prettier.resolveConfig(absFile);
|
|
144478
|
+
let formatted;
|
|
144479
|
+
try {
|
|
144480
|
+
formatted = await prettier.format(content2, {
|
|
144481
|
+
...config2 ?? {},
|
|
144482
|
+
filepath: absFile
|
|
144483
|
+
});
|
|
144484
|
+
} catch (err) {
|
|
144485
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
144486
|
+
throw new FormatterError("PRETTIER_FAILED", message);
|
|
144487
|
+
}
|
|
144488
|
+
const changed = formatted !== content2;
|
|
144489
|
+
if (changed) {
|
|
144490
|
+
log24.info(
|
|
144491
|
+
"Formatted %s with parser=%s (%d bytes in)",
|
|
144492
|
+
absFile,
|
|
144493
|
+
info.inferredParser,
|
|
144494
|
+
content2.length
|
|
144495
|
+
);
|
|
144496
|
+
}
|
|
144497
|
+
return {
|
|
144498
|
+
skipped: false,
|
|
144499
|
+
file: absFile,
|
|
144500
|
+
parser: info.inferredParser,
|
|
144501
|
+
formatted,
|
|
144502
|
+
changed,
|
|
144503
|
+
durationMs: Date.now() - start
|
|
144504
|
+
};
|
|
144505
|
+
}
|
|
144506
|
+
function isInsideWorktree(absFile, worktreePath) {
|
|
144507
|
+
let realFile;
|
|
144508
|
+
try {
|
|
144509
|
+
realFile = realpathSync4(absFile);
|
|
144510
|
+
} catch {
|
|
144511
|
+
try {
|
|
144512
|
+
realFile = join22(realpathSync4(dirname6(absFile)), basename(absFile));
|
|
144513
|
+
} catch {
|
|
144514
|
+
realFile = absFile;
|
|
144515
|
+
}
|
|
144516
|
+
}
|
|
144517
|
+
let realWorktree;
|
|
144518
|
+
try {
|
|
144519
|
+
realWorktree = realpathSync4(worktreePath);
|
|
144520
|
+
} catch {
|
|
144521
|
+
realWorktree = worktreePath;
|
|
144522
|
+
}
|
|
144523
|
+
const normalized = realWorktree.endsWith("/") ? realWorktree : `${realWorktree}/`;
|
|
144524
|
+
return realFile === realWorktree || realFile.startsWith(normalized);
|
|
144525
|
+
}
|
|
144526
|
+
|
|
144430
144527
|
// src/lib/fuzzy-score.ts
|
|
144431
144528
|
var SCORE_MATCH = 1;
|
|
144432
144529
|
var BONUS_CONSECUTIVE = 8;
|
|
@@ -144529,7 +144626,7 @@ function fuzzyScore(query, filePath) {
|
|
|
144529
144626
|
// src/lib/terminal-config.ts
|
|
144530
144627
|
init_src();
|
|
144531
144628
|
init_zod();
|
|
144532
|
-
var
|
|
144629
|
+
var log25 = createLogger("terminal-config");
|
|
144533
144630
|
var TerminalPaneConfigSchema = external_exports2.object({
|
|
144534
144631
|
name: external_exports2.string().optional(),
|
|
144535
144632
|
command: external_exports2.string().optional(),
|
|
@@ -144560,7 +144657,7 @@ function loadWorkspaceTerminalConfig(worktreePath, projectPath) {
|
|
|
144560
144657
|
if (!terminalBlock) return null;
|
|
144561
144658
|
const result = WorkspaceTerminalConfigSchema.safeParse(terminalBlock);
|
|
144562
144659
|
if (!result.success) {
|
|
144563
|
-
|
|
144660
|
+
log25.warn(
|
|
144564
144661
|
"Invalid workspace.terminal config: %s",
|
|
144565
144662
|
result.error.issues.map((i2) => `${i2.path.join(".")}: ${i2.message}`).join("; ")
|
|
144566
144663
|
);
|
|
@@ -144571,7 +144668,7 @@ function loadWorkspaceTerminalConfig(worktreePath, projectPath) {
|
|
|
144571
144668
|
|
|
144572
144669
|
// src/trpc/router.ts
|
|
144573
144670
|
var execFileAsync = promisify(execFile5);
|
|
144574
|
-
var
|
|
144671
|
+
var log26 = createLogger("trpc");
|
|
144575
144672
|
var t2 = initTRPC.context().create();
|
|
144576
144673
|
var publicProcedure = t2.procedure;
|
|
144577
144674
|
var projectsRouter = t2.router({
|
|
@@ -144616,7 +144713,7 @@ var projectsRouter = t2.router({
|
|
|
144616
144713
|
}),
|
|
144617
144714
|
checkPath: publicProcedure.input(external_exports2.object({ path: external_exports2.string() })).query(({ input }) => {
|
|
144618
144715
|
const resolvedPath = resolve6(input.path);
|
|
144619
|
-
const isGitRepo =
|
|
144716
|
+
const isGitRepo = existsSync8(join23(resolvedPath, ".git"));
|
|
144620
144717
|
return { isGitRepo };
|
|
144621
144718
|
}),
|
|
144622
144719
|
gitInit: publicProcedure.input(external_exports2.object({ path: external_exports2.string() })).mutation(async ({ input }) => {
|
|
@@ -144625,7 +144722,7 @@ var projectsRouter = t2.router({
|
|
|
144625
144722
|
}),
|
|
144626
144723
|
add: publicProcedure.input(external_exports2.object({ path: external_exports2.string(), label: external_exports2.string().optional() })).mutation(async ({ input }) => {
|
|
144627
144724
|
const state2 = loadState();
|
|
144628
|
-
const name24 =
|
|
144725
|
+
const name24 = basename2(input.path);
|
|
144629
144726
|
if (state2.projects.some((p6) => p6.name === name24)) {
|
|
144630
144727
|
throw new Error(`Project "${name24}" already registered`);
|
|
144631
144728
|
}
|
|
@@ -144725,8 +144822,8 @@ var workspacesRouter = t2.router({
|
|
|
144725
144822
|
return { ok: true, path: existing.path };
|
|
144726
144823
|
}
|
|
144727
144824
|
const wtDir = worktreesDir();
|
|
144728
|
-
const worktreePath =
|
|
144729
|
-
mkdirSync7(
|
|
144825
|
+
const worktreePath = join23(wtDir, input.project, input.branch);
|
|
144826
|
+
mkdirSync7(join23(wtDir, input.project), { recursive: true });
|
|
144730
144827
|
const { command, env } = gitCmd();
|
|
144731
144828
|
const args = ["worktree", "add"];
|
|
144732
144829
|
if (input.base) {
|
|
@@ -144790,7 +144887,7 @@ var workspacesRouter = t2.router({
|
|
|
144790
144887
|
saveState(state2);
|
|
144791
144888
|
const workspaceId = toWorkspaceId(input.project, input.branch);
|
|
144792
144889
|
try {
|
|
144793
|
-
unlinkSync3(
|
|
144890
|
+
unlinkSync3(join23(bandHome(), "workspace-prompts", `${workspaceId}.json`));
|
|
144794
144891
|
} catch {
|
|
144795
144892
|
}
|
|
144796
144893
|
deleteWorkspaceStatus(workspaceId);
|
|
@@ -144807,13 +144904,13 @@ var workspacesRouter = t2.router({
|
|
|
144807
144904
|
try {
|
|
144808
144905
|
const deletedTasks = deleteWorkspaceTasks(workspaceId);
|
|
144809
144906
|
if (deletedTasks > 0) {
|
|
144810
|
-
|
|
144907
|
+
log26.info(
|
|
144811
144908
|
{ workspaceId, count: deletedTasks },
|
|
144812
144909
|
"deleted workspace tasks on removal"
|
|
144813
144910
|
);
|
|
144814
144911
|
}
|
|
144815
144912
|
} catch (err) {
|
|
144816
|
-
|
|
144913
|
+
log26.error({ workspaceId, err }, "failed to delete workspace tasks on removal");
|
|
144817
144914
|
}
|
|
144818
144915
|
emit({ kind: "remove", workspaceId });
|
|
144819
144916
|
const projPath = proj.path;
|
|
@@ -144831,7 +144928,7 @@ var workspacesRouter = t2.router({
|
|
|
144831
144928
|
timeout: 6e4
|
|
144832
144929
|
});
|
|
144833
144930
|
} catch (err) {
|
|
144834
|
-
|
|
144931
|
+
log26.warn({ err, workspaceId }, "teardown script failed");
|
|
144835
144932
|
}
|
|
144836
144933
|
}
|
|
144837
144934
|
try {
|
|
@@ -144849,7 +144946,7 @@ var workspacesRouter = t2.router({
|
|
|
144849
144946
|
encoding: "utf-8"
|
|
144850
144947
|
});
|
|
144851
144948
|
} catch (err) {
|
|
144852
|
-
|
|
144949
|
+
log26.warn({ err, workspaceId }, "git worktree prune failed");
|
|
144853
144950
|
}
|
|
144854
144951
|
}
|
|
144855
144952
|
try {
|
|
@@ -144861,7 +144958,7 @@ var workspacesRouter = t2.router({
|
|
|
144861
144958
|
} catch {
|
|
144862
144959
|
}
|
|
144863
144960
|
})().catch((err) => {
|
|
144864
|
-
|
|
144961
|
+
log26.error({ err, workspaceId }, "background workspace cleanup failed");
|
|
144865
144962
|
});
|
|
144866
144963
|
});
|
|
144867
144964
|
return { ok: true };
|
|
@@ -144919,8 +145016,8 @@ var workspacesRouter = t2.router({
|
|
|
144919
145016
|
return { ok: true };
|
|
144920
145017
|
}),
|
|
144921
145018
|
runScript: publicProcedure.input(external_exports2.object({ path: external_exports2.string(), scriptType: external_exports2.string() })).mutation(({ input }) => {
|
|
144922
|
-
const scriptPath =
|
|
144923
|
-
if (!
|
|
145019
|
+
const scriptPath = join23(input.path, ".band", input.scriptType);
|
|
145020
|
+
if (!existsSync8(scriptPath)) {
|
|
144924
145021
|
throw new Error(`Script "${input.scriptType}" not found`);
|
|
144925
145022
|
}
|
|
144926
145023
|
return new Promise((resolve8, reject) => {
|
|
@@ -145057,7 +145154,7 @@ function parseFileStatuses(nameStatusOutput) {
|
|
|
145057
145154
|
}
|
|
145058
145155
|
async function readUntrackedFileLines(cwd, file2) {
|
|
145059
145156
|
try {
|
|
145060
|
-
const content2 = await readFile2(
|
|
145157
|
+
const content2 = await readFile2(join23(cwd, file2), "utf-8");
|
|
145061
145158
|
const lines = content2.split("\n");
|
|
145062
145159
|
if (lines.length > 0 && lines[lines.length - 1] === "") {
|
|
145063
145160
|
lines.pop();
|
|
@@ -145074,6 +145171,54 @@ var workspaceRouter = t2.router({
|
|
|
145074
145171
|
const config2 = loadWorkspaceTerminalConfig(workspace.worktree.path, workspace.project.path);
|
|
145075
145172
|
return { config: config2 };
|
|
145076
145173
|
}),
|
|
145174
|
+
/**
|
|
145175
|
+
* Format the supplied `content` using Prettier as if it were the file at
|
|
145176
|
+
* `filePath` inside `workspaceId`. The procedure is pure — it does not
|
|
145177
|
+
* read or write the file on disk. The client passes in the live editor
|
|
145178
|
+
* buffer and applies the returned `formatted` string back to the editor.
|
|
145179
|
+
* Persistence is the caller's responsibility via `workspace.saveFile`.
|
|
145180
|
+
*
|
|
145181
|
+
* Returns `{ skipped: true, reason }` when Prettier has no parser for
|
|
145182
|
+
* the file's extension (or it's covered by `.prettierignore`). Editors
|
|
145183
|
+
* fire this off Cmd+Shift+F without checking the file type first, so a
|
|
145184
|
+
* soft skip is the right outcome for unsupported files rather than a
|
|
145185
|
+
* surfaced error.
|
|
145186
|
+
*
|
|
145187
|
+
* Auth: enforced at the transport layer (the `band_token` cookie gates
|
|
145188
|
+
* the WebSocket upgrade and HTTP requests in start-server.ts) — same
|
|
145189
|
+
* pattern as the rest of `workspaceRouter`.
|
|
145190
|
+
*/
|
|
145191
|
+
formatFile: publicProcedure.input(
|
|
145192
|
+
external_exports2.object({
|
|
145193
|
+
workspaceId: external_exports2.string(),
|
|
145194
|
+
filePath: external_exports2.string().min(1),
|
|
145195
|
+
// 1 MB ceiling — covers every realistic source file (the largest
|
|
145196
|
+
// human-authored .ts in the world is well under 500 KB) and stops a
|
|
145197
|
+
// pathological caller from blocking the event loop with a multi-MB
|
|
145198
|
+
// string while Prettier churns on it.
|
|
145199
|
+
content: external_exports2.string().max(1e6)
|
|
145200
|
+
})
|
|
145201
|
+
).mutation(async ({ input }) => {
|
|
145202
|
+
const workspace = resolveWorkspace(input.workspaceId);
|
|
145203
|
+
if (!workspace) {
|
|
145204
|
+
throw new TRPCError({
|
|
145205
|
+
code: "NOT_FOUND",
|
|
145206
|
+
message: `Workspace ${input.workspaceId} not found`
|
|
145207
|
+
});
|
|
145208
|
+
}
|
|
145209
|
+
try {
|
|
145210
|
+
return await formatFile(workspace.worktree.path, input.filePath, input.content);
|
|
145211
|
+
} catch (err) {
|
|
145212
|
+
if (err instanceof FormatterError) {
|
|
145213
|
+
throw new TRPCError({
|
|
145214
|
+
code: "BAD_REQUEST",
|
|
145215
|
+
message: err.message,
|
|
145216
|
+
cause: err
|
|
145217
|
+
});
|
|
145218
|
+
}
|
|
145219
|
+
throw err;
|
|
145220
|
+
}
|
|
145221
|
+
}),
|
|
145077
145222
|
/**
|
|
145078
145223
|
* Subscribe to external file-system changes inside a single workspace.
|
|
145079
145224
|
* The watcher is started on demand for that workspace and torn down when
|
|
@@ -145146,7 +145291,7 @@ var workspaceRouter = t2.router({
|
|
|
145146
145291
|
);
|
|
145147
145292
|
branches = output.trim().split("\n").map((b10) => b10.trim()).filter(Boolean);
|
|
145148
145293
|
} catch (err) {
|
|
145149
|
-
|
|
145294
|
+
log26.error(
|
|
145150
145295
|
`listBranches: for-each-ref failed for ${cwd}: ${err instanceof Error ? err.message : err}`
|
|
145151
145296
|
);
|
|
145152
145297
|
}
|
|
@@ -145283,7 +145428,7 @@ var workspaceRouter = t2.router({
|
|
|
145283
145428
|
const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
|
|
145284
145429
|
if (untrackedFiles.includes(input.filePath)) {
|
|
145285
145430
|
try {
|
|
145286
|
-
const content2 = await readFile2(
|
|
145431
|
+
const content2 = await readFile2(join23(cwd, input.filePath), "utf-8");
|
|
145287
145432
|
const lines = content2.split("\n");
|
|
145288
145433
|
if (lines.length > 0 && lines[lines.length - 1] === "") {
|
|
145289
145434
|
lines.pop();
|
|
@@ -145328,7 +145473,7 @@ var workspaceRouter = t2.router({
|
|
|
145328
145473
|
const untrackedOutput = await execGit(["ls-files", "--others", "--exclude-standard"], cwd);
|
|
145329
145474
|
const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
|
|
145330
145475
|
if (untrackedFiles.includes(filePath)) {
|
|
145331
|
-
await rm(
|
|
145476
|
+
await rm(join23(cwd, filePath), { force: true });
|
|
145332
145477
|
return { ok: true };
|
|
145333
145478
|
}
|
|
145334
145479
|
const { mergeBase: ref } = await resolveDiffContext(
|
|
@@ -145491,7 +145636,7 @@ var workspaceRouter = t2.router({
|
|
|
145491
145636
|
throw new Error("Workspace not found");
|
|
145492
145637
|
}
|
|
145493
145638
|
const root = workspace.worktree.path;
|
|
145494
|
-
const target = resolve6(
|
|
145639
|
+
const target = resolve6(join23(root, input.path));
|
|
145495
145640
|
if (!target.startsWith(root)) {
|
|
145496
145641
|
throw new Error("Invalid path");
|
|
145497
145642
|
}
|
|
@@ -145514,7 +145659,7 @@ var workspaceRouter = t2.router({
|
|
|
145514
145659
|
throw new Error("Path is required");
|
|
145515
145660
|
}
|
|
145516
145661
|
const root = workspace.worktree.path;
|
|
145517
|
-
const target = resolve6(
|
|
145662
|
+
const target = resolve6(join23(root, input.path));
|
|
145518
145663
|
if (!target.startsWith(root)) {
|
|
145519
145664
|
throw new Error("Invalid path");
|
|
145520
145665
|
}
|
|
@@ -145548,7 +145693,7 @@ var workspaceRouter = t2.router({
|
|
|
145548
145693
|
throw new Error("Workspace not found");
|
|
145549
145694
|
}
|
|
145550
145695
|
const root = workspace.worktree.path;
|
|
145551
|
-
const target = resolve6(
|
|
145696
|
+
const target = resolve6(join23(root, input.path));
|
|
145552
145697
|
if (!target.startsWith(root)) {
|
|
145553
145698
|
throw new Error("Invalid path");
|
|
145554
145699
|
}
|
|
@@ -145571,15 +145716,15 @@ var workspaceRouter = t2.router({
|
|
|
145571
145716
|
throw new Error("Workspace not found");
|
|
145572
145717
|
}
|
|
145573
145718
|
const root = workspace.worktree.path;
|
|
145574
|
-
const target = resolve6(
|
|
145719
|
+
const target = resolve6(join23(root, input.path));
|
|
145575
145720
|
if (!target.startsWith(root) || target === root) {
|
|
145576
145721
|
throw new Error("Invalid path");
|
|
145577
145722
|
}
|
|
145578
|
-
if (
|
|
145723
|
+
if (existsSync8(target)) {
|
|
145579
145724
|
throw new Error("A file or directory already exists at this path");
|
|
145580
145725
|
}
|
|
145581
|
-
const parent =
|
|
145582
|
-
if (!
|
|
145726
|
+
const parent = dirname7(target);
|
|
145727
|
+
if (!existsSync8(parent)) {
|
|
145583
145728
|
throw new Error("Parent directory does not exist");
|
|
145584
145729
|
}
|
|
145585
145730
|
const parentStat = await stat4(parent);
|
|
@@ -145600,15 +145745,15 @@ var workspaceRouter = t2.router({
|
|
|
145600
145745
|
throw new Error("Workspace not found");
|
|
145601
145746
|
}
|
|
145602
145747
|
const root = workspace.worktree.path;
|
|
145603
|
-
const target = resolve6(
|
|
145748
|
+
const target = resolve6(join23(root, input.path));
|
|
145604
145749
|
if (!target.startsWith(root) || target === root) {
|
|
145605
145750
|
throw new Error("Invalid path");
|
|
145606
145751
|
}
|
|
145607
|
-
if (
|
|
145752
|
+
if (existsSync8(target)) {
|
|
145608
145753
|
throw new Error("A file or directory already exists at this path");
|
|
145609
145754
|
}
|
|
145610
|
-
const parent =
|
|
145611
|
-
if (!
|
|
145755
|
+
const parent = dirname7(target);
|
|
145756
|
+
if (!existsSync8(parent)) {
|
|
145612
145757
|
throw new Error("Parent directory does not exist");
|
|
145613
145758
|
}
|
|
145614
145759
|
const parentStat = await stat4(parent);
|
|
@@ -145629,7 +145774,7 @@ var workspaceRouter = t2.router({
|
|
|
145629
145774
|
throw new Error("Workspace not found");
|
|
145630
145775
|
}
|
|
145631
145776
|
const root = workspace.worktree.path;
|
|
145632
|
-
const target = resolve6(
|
|
145777
|
+
const target = resolve6(join23(root, input.path));
|
|
145633
145778
|
if (!target.startsWith(root) || target === root) {
|
|
145634
145779
|
throw new Error("Invalid path");
|
|
145635
145780
|
}
|
|
@@ -145661,8 +145806,8 @@ var workspaceRouter = t2.router({
|
|
|
145661
145806
|
throw new Error("Workspace not found");
|
|
145662
145807
|
}
|
|
145663
145808
|
const root = workspace.worktree.path;
|
|
145664
|
-
const fromTarget = resolve6(
|
|
145665
|
-
const toTarget = resolve6(
|
|
145809
|
+
const fromTarget = resolve6(join23(root, input.fromPath));
|
|
145810
|
+
const toTarget = resolve6(join23(root, input.toPath));
|
|
145666
145811
|
if (!fromTarget.startsWith(root) || fromTarget === root) {
|
|
145667
145812
|
throw new Error("Invalid source path");
|
|
145668
145813
|
}
|
|
@@ -145683,11 +145828,11 @@ var workspaceRouter = t2.router({
|
|
|
145683
145828
|
} catch {
|
|
145684
145829
|
throw new Error("Source path does not exist");
|
|
145685
145830
|
}
|
|
145686
|
-
if (
|
|
145831
|
+
if (existsSync8(toTarget)) {
|
|
145687
145832
|
throw new Error("A file or directory already exists at the destination");
|
|
145688
145833
|
}
|
|
145689
|
-
const toParent =
|
|
145690
|
-
if (!
|
|
145834
|
+
const toParent = dirname7(toTarget);
|
|
145835
|
+
if (!existsSync8(toParent)) {
|
|
145691
145836
|
throw new Error("Destination parent directory does not exist");
|
|
145692
145837
|
}
|
|
145693
145838
|
const toParentStat = await stat4(toParent);
|
|
@@ -145712,8 +145857,8 @@ var workspaceRouter = t2.router({
|
|
|
145712
145857
|
throw new Error("Workspace not found");
|
|
145713
145858
|
}
|
|
145714
145859
|
const root = workspace.worktree.path;
|
|
145715
|
-
const fromTarget = resolve6(
|
|
145716
|
-
const toTarget = resolve6(
|
|
145860
|
+
const fromTarget = resolve6(join23(root, input.fromPath));
|
|
145861
|
+
const toTarget = resolve6(join23(root, input.toPath));
|
|
145717
145862
|
if (!fromTarget.startsWith(root) || fromTarget === root) {
|
|
145718
145863
|
throw new Error("Invalid source path");
|
|
145719
145864
|
}
|
|
@@ -145737,11 +145882,11 @@ var workspaceRouter = t2.router({
|
|
|
145737
145882
|
if (entryStat.isDirectory() && toTarget.startsWith(fromTarget + sep2)) {
|
|
145738
145883
|
throw new Error("Cannot copy a directory into itself");
|
|
145739
145884
|
}
|
|
145740
|
-
if (
|
|
145885
|
+
if (existsSync8(toTarget)) {
|
|
145741
145886
|
throw new Error("A file or directory already exists at the destination");
|
|
145742
145887
|
}
|
|
145743
|
-
const toParent =
|
|
145744
|
-
if (!
|
|
145888
|
+
const toParent = dirname7(toTarget);
|
|
145889
|
+
if (!existsSync8(toParent)) {
|
|
145745
145890
|
throw new Error("Destination parent directory does not exist");
|
|
145746
145891
|
}
|
|
145747
145892
|
const toParentStat = await stat4(toParent);
|
|
@@ -145900,26 +146045,115 @@ var workspaceRouter = t2.router({
|
|
|
145900
146045
|
return { ok: true };
|
|
145901
146046
|
})
|
|
145902
146047
|
});
|
|
146048
|
+
function mapFsError(err) {
|
|
146049
|
+
const code = err.code;
|
|
146050
|
+
if (code === "ENOENT") return new Error("File not found");
|
|
146051
|
+
if (code === "ELOOP") return new Error("Symbolic links are not allowed");
|
|
146052
|
+
if (code === "EACCES" || code === "EPERM") return new Error("Permission denied");
|
|
146053
|
+
if (code === "EISDIR") return new Error("Cannot operate on a directory");
|
|
146054
|
+
return err;
|
|
146055
|
+
}
|
|
146056
|
+
var hostRouter = t2.router({
|
|
146057
|
+
readFile: publicProcedure.input(external_exports2.object({ absolutePath: external_exports2.string().min(1) })).query(async ({ input }) => {
|
|
146058
|
+
const target = input.absolutePath;
|
|
146059
|
+
if (!isAbsolute2(target)) {
|
|
146060
|
+
throw new Error("Absolute path required");
|
|
146061
|
+
}
|
|
146062
|
+
let fh;
|
|
146063
|
+
try {
|
|
146064
|
+
fh = await open2(target, fsConstants.O_RDONLY | fsConstants.O_NOFOLLOW);
|
|
146065
|
+
} catch (err) {
|
|
146066
|
+
throw mapFsError(err);
|
|
146067
|
+
}
|
|
146068
|
+
try {
|
|
146069
|
+
const stats = await fh.stat();
|
|
146070
|
+
if (stats.isDirectory()) {
|
|
146071
|
+
throw new Error("Cannot operate on a directory");
|
|
146072
|
+
}
|
|
146073
|
+
if (!stats.isFile()) {
|
|
146074
|
+
throw new Error("Not a regular file");
|
|
146075
|
+
}
|
|
146076
|
+
const size4 = stats.size;
|
|
146077
|
+
if (size4 > MAX_FILE_SIZE) {
|
|
146078
|
+
return { tooLarge: true, size: size4 };
|
|
146079
|
+
}
|
|
146080
|
+
const sampleLen = Math.min(8192, size4);
|
|
146081
|
+
const sample = Buffer.alloc(sampleLen);
|
|
146082
|
+
if (sampleLen > 0) {
|
|
146083
|
+
await fh.read(sample, 0, sampleLen, 0);
|
|
146084
|
+
if (sample.includes(0)) {
|
|
146085
|
+
return { binary: true, size: size4 };
|
|
146086
|
+
}
|
|
146087
|
+
}
|
|
146088
|
+
const buffer = await fh.readFile();
|
|
146089
|
+
const ext = extname2(target).toLowerCase();
|
|
146090
|
+
const language2 = LANG_MAP[ext];
|
|
146091
|
+
return {
|
|
146092
|
+
content: buffer.toString("utf-8"),
|
|
146093
|
+
size: size4,
|
|
146094
|
+
language: language2
|
|
146095
|
+
};
|
|
146096
|
+
} finally {
|
|
146097
|
+
await fh.close();
|
|
146098
|
+
}
|
|
146099
|
+
}),
|
|
146100
|
+
saveFile: publicProcedure.input(
|
|
146101
|
+
external_exports2.object({
|
|
146102
|
+
absolutePath: external_exports2.string().min(1),
|
|
146103
|
+
// Match the read-side cap so a misbehaving client can't fill
|
|
146104
|
+
// disk via the save endpoint while the read endpoint refuses
|
|
146105
|
+
// anything that wide.
|
|
146106
|
+
content: external_exports2.string().max(MAX_FILE_SIZE)
|
|
146107
|
+
})
|
|
146108
|
+
).mutation(async ({ input }) => {
|
|
146109
|
+
const target = input.absolutePath;
|
|
146110
|
+
if (!isAbsolute2(target)) {
|
|
146111
|
+
throw new Error("Absolute path required");
|
|
146112
|
+
}
|
|
146113
|
+
let fh;
|
|
146114
|
+
try {
|
|
146115
|
+
fh = await open2(
|
|
146116
|
+
target,
|
|
146117
|
+
fsConstants.O_WRONLY | fsConstants.O_TRUNC | fsConstants.O_NOFOLLOW
|
|
146118
|
+
);
|
|
146119
|
+
} catch (err) {
|
|
146120
|
+
throw mapFsError(err);
|
|
146121
|
+
}
|
|
146122
|
+
try {
|
|
146123
|
+
const stats = await fh.stat();
|
|
146124
|
+
if (stats.isDirectory()) {
|
|
146125
|
+
throw new Error("Cannot operate on a directory");
|
|
146126
|
+
}
|
|
146127
|
+
if (!stats.isFile()) {
|
|
146128
|
+
throw new Error("Not a regular file");
|
|
146129
|
+
}
|
|
146130
|
+
await fh.writeFile(input.content, "utf-8");
|
|
146131
|
+
} finally {
|
|
146132
|
+
await fh.close();
|
|
146133
|
+
}
|
|
146134
|
+
return { ok: true };
|
|
146135
|
+
})
|
|
146136
|
+
});
|
|
145903
146137
|
var tunnelRouter = t2.router({
|
|
145904
146138
|
status: publicProcedure.query(() => {
|
|
145905
146139
|
return getTunnelStatus();
|
|
145906
146140
|
}),
|
|
145907
146141
|
start: publicProcedure.input(external_exports2.object({}).optional()).mutation(async () => {
|
|
145908
|
-
|
|
146142
|
+
log26.debug("tunnel.start called");
|
|
145909
146143
|
const port2 = parseInt(process.env.BAND_PORT || "3456", 10);
|
|
145910
|
-
|
|
146144
|
+
log26.debug("tunnel.start: port=%d", port2);
|
|
145911
146145
|
try {
|
|
145912
146146
|
await startTunnel({ port: port2 });
|
|
145913
146147
|
} catch (err) {
|
|
145914
|
-
|
|
146148
|
+
log26.debug({ err }, "tunnel.start: startTunnel failed");
|
|
145915
146149
|
return { ok: true, url: null };
|
|
145916
146150
|
}
|
|
145917
146151
|
const status = getTunnelStatus();
|
|
145918
|
-
|
|
146152
|
+
log26.debug({ status }, "tunnel.start: after startTunnel");
|
|
145919
146153
|
if (status.url) {
|
|
145920
146154
|
return { ok: true, url: status.url };
|
|
145921
146155
|
}
|
|
145922
|
-
|
|
146156
|
+
log26.debug("tunnel.start: no URL available");
|
|
145923
146157
|
return { ok: true, url: null };
|
|
145924
146158
|
}),
|
|
145925
146159
|
stop: publicProcedure.mutation(async () => {
|
|
@@ -146245,15 +146479,15 @@ async function loadJsonlPage(opts) {
|
|
|
146245
146479
|
}
|
|
146246
146480
|
var servicesRouter = t2.router({
|
|
146247
146481
|
health: publicProcedure.query(() => {
|
|
146248
|
-
|
|
146482
|
+
log26.debug("services.health called");
|
|
146249
146483
|
const tunnel = getTunnelStatus();
|
|
146250
|
-
|
|
146484
|
+
log26.debug({ tunnel }, "services.health: tunnel status");
|
|
146251
146485
|
const result = {
|
|
146252
146486
|
webserver: true,
|
|
146253
146487
|
tunnel: tunnel.running,
|
|
146254
146488
|
tunnel_url: tunnel.url
|
|
146255
146489
|
};
|
|
146256
|
-
|
|
146490
|
+
log26.debug({ result }, "services.health result");
|
|
146257
146491
|
return result;
|
|
146258
146492
|
}),
|
|
146259
146493
|
// Activity level controls how often the branch-status poller fires.
|
|
@@ -146647,7 +146881,7 @@ var chatsRouter = t2.router({
|
|
|
146647
146881
|
summary = info?.summary;
|
|
146648
146882
|
lastModified = info?.lastModified;
|
|
146649
146883
|
} catch (err) {
|
|
146650
|
-
|
|
146884
|
+
log26.warn(
|
|
146651
146885
|
{ chatId: input.chatId, sessionId: input.sessionId, err },
|
|
146652
146886
|
"setActiveSession: getSessionInfo failed"
|
|
146653
146887
|
);
|
|
@@ -146767,7 +147001,7 @@ var browserHostRouter = t2.router({
|
|
|
146767
147001
|
// can confirm in the server log that the bridge component actually
|
|
146768
147002
|
// executed. Drop once the experiment is stable.
|
|
146769
147003
|
ping: publicProcedure.input(external_exports2.object({ where: external_exports2.string() })).mutation(({ input }) => {
|
|
146770
|
-
|
|
147004
|
+
log26.info("browserHost.ping from %s", input.where);
|
|
146771
147005
|
return { ok: true };
|
|
146772
147006
|
}),
|
|
146773
147007
|
ensureView: publicProcedure.subscription(async function* (opts) {
|
|
@@ -147099,6 +147333,7 @@ var appRouter = t2.router({
|
|
|
147099
147333
|
hooks: hooksRouter,
|
|
147100
147334
|
cli: cliRouter,
|
|
147101
147335
|
workspace: workspaceRouter,
|
|
147336
|
+
host: hostRouter,
|
|
147102
147337
|
tunnel: tunnelRouter,
|
|
147103
147338
|
prereqs: prereqsRouter,
|
|
147104
147339
|
tasks: tasksRouter,
|
|
@@ -147232,7 +147467,7 @@ function getScalarHtml(specUrl) {
|
|
|
147232
147467
|
function logCrash(message) {
|
|
147233
147468
|
try {
|
|
147234
147469
|
mkdirSync8(bandHome(), { recursive: true });
|
|
147235
|
-
appendFileSync2(
|
|
147470
|
+
appendFileSync2(join24(bandHome(), "server.log"), message, "utf-8");
|
|
147236
147471
|
} catch {
|
|
147237
147472
|
}
|
|
147238
147473
|
}
|
|
@@ -147257,7 +147492,7 @@ ${error40.stack || error40.message}
|
|
|
147257
147492
|
`);
|
|
147258
147493
|
process.exit(1);
|
|
147259
147494
|
});
|
|
147260
|
-
var clientDir =
|
|
147495
|
+
var clientDir = join24(import.meta.dirname, "client");
|
|
147261
147496
|
var port = parseInt(process.env.PORT || "3456", 10);
|
|
147262
147497
|
delete process.env.PORT;
|
|
147263
147498
|
process.env.BAND_PORT = String(port);
|
|
@@ -147269,18 +147504,18 @@ var assets = build_default(clientDir, {
|
|
|
147269
147504
|
gzip: true,
|
|
147270
147505
|
etag: true
|
|
147271
147506
|
});
|
|
147272
|
-
var openApiDoc = JSON.parse(readFileSync9(
|
|
147507
|
+
var openApiDoc = JSON.parse(readFileSync9(join24(import.meta.dirname, "openapi.json"), "utf-8"));
|
|
147273
147508
|
openApiDoc.servers = [{ url: "/trpc" }];
|
|
147274
147509
|
var openApiSpec = JSON.stringify(openApiDoc, null, 2);
|
|
147275
147510
|
var scalarHtml = getScalarHtml("/api/openapi.json");
|
|
147276
147511
|
function serveStaticFile(res, root, subdir, rawFilename) {
|
|
147277
|
-
const filename =
|
|
147512
|
+
const filename = basename3(decodeURIComponent(rawFilename));
|
|
147278
147513
|
if (!filename || filename.includes("..")) {
|
|
147279
147514
|
res.writeHead(400);
|
|
147280
147515
|
res.end("Bad request");
|
|
147281
147516
|
return;
|
|
147282
147517
|
}
|
|
147283
|
-
const filePath =
|
|
147518
|
+
const filePath = join24(root, subdir, filename);
|
|
147284
147519
|
try {
|
|
147285
147520
|
const fileStat = statSync7(filePath);
|
|
147286
147521
|
const contentType = mimeTypeFromFilename(filename);
|
|
@@ -147303,7 +147538,7 @@ function serveWorkspaceFile(res, workspaceId, rawPath) {
|
|
|
147303
147538
|
return;
|
|
147304
147539
|
}
|
|
147305
147540
|
const root = workspace.worktree.path;
|
|
147306
|
-
const target = resolve7(
|
|
147541
|
+
const target = resolve7(join24(root, rawPath));
|
|
147307
147542
|
if (!target.startsWith(`${root}/`) && target !== root) {
|
|
147308
147543
|
res.writeHead(400);
|
|
147309
147544
|
res.end("Bad request");
|
|
@@ -147311,7 +147546,7 @@ function serveWorkspaceFile(res, workspaceId, rawPath) {
|
|
|
147311
147546
|
}
|
|
147312
147547
|
try {
|
|
147313
147548
|
const fileStat = statSync7(target);
|
|
147314
|
-
const contentType = mimeTypeFromFilename(
|
|
147549
|
+
const contentType = mimeTypeFromFilename(basename3(target));
|
|
147315
147550
|
res.writeHead(200, {
|
|
147316
147551
|
"Content-Type": contentType,
|
|
147317
147552
|
"Content-Length": fileStat.size.toString(),
|
|
@@ -147350,13 +147585,13 @@ async function main() {
|
|
|
147350
147585
|
res.end("Bad request");
|
|
147351
147586
|
return;
|
|
147352
147587
|
}
|
|
147353
|
-
const partition =
|
|
147588
|
+
const partition = basename3(decodeURIComponent(rest.slice(0, slashIdx)));
|
|
147354
147589
|
if (!partition || partition === ".." || partition === ".") {
|
|
147355
147590
|
res.writeHead(400);
|
|
147356
147591
|
res.end("Bad request");
|
|
147357
147592
|
return;
|
|
147358
147593
|
}
|
|
147359
|
-
serveStaticFile(res, bandHome(),
|
|
147594
|
+
serveStaticFile(res, bandHome(), join24("shared", partition), rest.slice(slashIdx + 1));
|
|
147360
147595
|
return;
|
|
147361
147596
|
}
|
|
147362
147597
|
if (req.url?.startsWith("/api/workspace-file/")) {
|