nolzu 0.0.1 → 0.1.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/LICENSE +105 -0
- package/README.md +24 -7
- package/build/client/_app/immutable/assets/0.SPD4wYkc.css +1 -0
- package/build/client/_app/immutable/assets/1.BRilEoOO.css +1 -0
- package/build/client/_app/immutable/assets/10.DwLiBGDj.css +1 -0
- package/build/client/_app/immutable/assets/11.D_TtWT3D.css +1 -0
- package/build/client/_app/immutable/assets/12.CSVGmtUY.css +1 -0
- package/build/client/_app/immutable/assets/13.qTa7IHbg.css +1 -0
- package/build/client/_app/immutable/assets/19.CbCFXKb8.css +1 -0
- package/build/client/_app/immutable/assets/2.CfHhgI77.css +1 -0
- package/build/client/_app/immutable/assets/20.C5CSZhyT.css +1 -0
- package/build/client/_app/immutable/assets/21.BBpYkZcc.css +1 -0
- package/build/client/_app/immutable/assets/22.C9RgY9kl.css +1 -0
- package/build/client/_app/immutable/assets/23.B6Dp9RJO.css +1 -0
- package/build/client/_app/immutable/assets/24.C7g2abUW.css +1 -0
- package/build/client/_app/immutable/assets/26.DTMI6ROV.css +1 -0
- package/build/client/_app/immutable/assets/27.AxXMpDkB.css +1 -0
- package/build/client/_app/immutable/assets/28.939ac-98.css +1 -0
- package/build/client/_app/immutable/assets/3.3lqex1t-.css +1 -0
- package/build/client/_app/immutable/assets/4.C52MzO_d.css +1 -0
- package/build/client/_app/immutable/assets/5.CsfJAwvS.css +1 -0
- package/build/client/_app/immutable/assets/8.ByspUp-s.css +1 -0
- package/build/client/_app/immutable/assets/9.BCSFZmce.css +1 -0
- package/build/client/_app/immutable/assets/Banner.DDqfpWLD.css +1 -0
- package/build/client/_app/immutable/assets/BoardOff.mpX08-Be.css +1 -0
- package/build/client/_app/immutable/assets/Button.BlwsEgUc.css +1 -0
- package/build/client/_app/immutable/assets/Chip.qAAa6_e5.css +1 -0
- package/build/client/_app/immutable/assets/Dialog.D5Ln60a8.css +1 -0
- package/build/client/_app/immutable/assets/FeaturePanels.DZ_Mth5M.css +1 -0
- package/build/client/_app/immutable/assets/FolderBrowser.DBmRWDCH.css +1 -0
- package/build/client/_app/immutable/assets/Geist-Variable.Bj2R_7yk.woff2 +0 -0
- package/build/client/_app/immutable/assets/GeistMono-Variable.Dispecij.woff2 +0 -0
- package/build/client/_app/immutable/assets/HelpTip.DF6T9nns.css +1 -0
- package/build/client/_app/immutable/assets/InfoBox.CpavOykF.css +1 -0
- package/build/client/_app/immutable/assets/KeyCaps.D2t-lY-8.css +1 -0
- package/build/client/_app/immutable/assets/LogLine.Bu4feLn5.css +1 -0
- package/build/client/_app/immutable/assets/Markdown.DI6AtWAc.css +1 -0
- package/build/client/_app/immutable/assets/ModelPicker.DQzj7Nj8.css +1 -0
- package/build/client/_app/immutable/assets/OptionButtons.BYiyOXOE.css +1 -0
- package/build/client/_app/immutable/assets/PeekPanel.DzMdHoqg.css +1 -0
- package/build/client/_app/immutable/assets/ScoutPage.CVIiLy5c.css +1 -0
- package/build/client/_app/immutable/assets/SetupSteps.B6pZP1Bk.css +1 -0
- package/build/client/_app/immutable/assets/Skeleton.BC-1_U5d.css +1 -0
- package/build/client/_app/immutable/assets/SlotsMeter.Dq7GGYlD.css +1 -0
- package/build/client/_app/immutable/assets/StartConfirm.DxNN2AOb.css +1 -0
- package/build/client/_app/immutable/assets/StatePill.CGWFVUUg.css +1 -0
- package/build/client/_app/immutable/assets/Streamed.DpZ6wgO2.css +1 -0
- package/build/client/_app/immutable/assets/card-pulls.C5uGMuAh.css +1 -0
- package/build/client/_app/immutable/assets/next-step.CKg1w06J.css +1 -0
- package/build/client/_app/immutable/chunks/-B5EclhK.js +1 -0
- package/build/client/_app/immutable/chunks/-Q3zApAy.js +1 -0
- package/build/client/_app/immutable/chunks/6-hwN_Ik.js +3 -0
- package/build/client/_app/immutable/chunks/B16UF4PA.js +11 -0
- package/build/client/_app/immutable/chunks/B1V3h1VF.js +1 -0
- package/build/client/_app/immutable/chunks/B2d2Mkuz.js +68 -0
- package/build/client/_app/immutable/chunks/B2yzhiEa.js +1 -0
- package/build/client/_app/immutable/chunks/B5zDDQUU.js +2 -0
- package/build/client/_app/immutable/chunks/B8DHSiWf.js +1 -0
- package/build/client/_app/immutable/chunks/B8z33EzI.js +1 -0
- package/build/client/_app/immutable/chunks/BCRkrH6c.js +1 -0
- package/build/client/_app/immutable/chunks/BCScjOxu.js +1 -0
- package/build/client/_app/immutable/chunks/BMUQtCEC.js +1 -0
- package/build/client/_app/immutable/chunks/BNnfkvZM.js +1 -0
- package/build/client/_app/immutable/chunks/BelWyZaW.js +1 -0
- package/build/client/_app/immutable/chunks/BhZpqODT.js +1 -0
- package/build/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
- package/build/client/_app/immutable/chunks/BmafI-Bs.js +1 -0
- package/build/client/_app/immutable/chunks/BvRk9kiK.js +0 -0
- package/build/client/_app/immutable/chunks/C4i6bdQg.js +1 -0
- package/build/client/_app/immutable/chunks/C8u5TyIB.js +1 -0
- package/build/client/_app/immutable/chunks/CFs2xhoy.js +1 -0
- package/build/client/_app/immutable/chunks/CIm2DioU.js +1 -0
- package/build/client/_app/immutable/chunks/CONqGBXC.js +1 -0
- package/build/client/_app/immutable/chunks/CSOz40qO.js +1 -0
- package/build/client/_app/immutable/chunks/CXxuD1ef.js +3 -0
- package/build/client/_app/immutable/chunks/CarrGsZA.js +2 -0
- package/build/client/_app/immutable/chunks/CdrmTD44.js +1 -0
- package/build/client/_app/immutable/chunks/CfJRH9gh.js +2 -0
- package/build/client/_app/immutable/chunks/Ci7C9Cki.js +1 -0
- package/build/client/_app/immutable/chunks/CkOTL1vK.js +1 -0
- package/build/client/_app/immutable/chunks/CngTtGc_.js +1 -0
- package/build/client/_app/immutable/chunks/Cp3A1zR8.js +1 -0
- package/build/client/_app/immutable/chunks/CwtMnwNL.js +3 -0
- package/build/client/_app/immutable/chunks/Cy7f_oXg.js +1 -0
- package/build/client/_app/immutable/chunks/D-wwLm5t.js +1 -0
- package/build/client/_app/immutable/chunks/D2imbgaf.js +1 -0
- package/build/client/_app/immutable/chunks/D32mip60.js +1 -0
- package/build/client/_app/immutable/chunks/D46Vk19W.js +1 -0
- package/build/client/_app/immutable/chunks/DCUUgo-6.js +1 -0
- package/build/client/_app/immutable/chunks/DFjnjJjy.js +1 -0
- package/build/client/_app/immutable/chunks/DHMbSbMg.js +1 -0
- package/build/client/_app/immutable/chunks/DJOFx2wx.js +1 -0
- package/build/client/_app/immutable/chunks/DV4tvxHp.js +3 -0
- package/build/client/_app/immutable/chunks/DXk_5YEw.js +1 -0
- package/build/client/_app/immutable/chunks/DjgnRLJt.js +1 -0
- package/build/client/_app/immutable/chunks/DlWlQ_vP.js +1 -0
- package/build/client/_app/immutable/chunks/DpIAei2y.js +2 -0
- package/build/client/_app/immutable/chunks/Dt-HX3Vu.js +1 -0
- package/build/client/_app/immutable/chunks/DuSthUWX.js +1 -0
- package/build/client/_app/immutable/chunks/Ecfl8TOn.js +2 -0
- package/build/client/_app/immutable/chunks/ITHE99Aa.js +1 -0
- package/build/client/_app/immutable/chunks/Khdge0KS.js +1 -0
- package/build/client/_app/immutable/chunks/LMEKNlm0.js +1 -0
- package/build/client/_app/immutable/chunks/OnIeaiuO.js +1 -0
- package/build/client/_app/immutable/chunks/VFQLu55q.js +1 -0
- package/build/client/_app/immutable/chunks/ZsUxKnQw.js +1 -0
- package/build/client/_app/immutable/chunks/aWP8DVhV.js +1 -0
- package/build/client/_app/immutable/chunks/bB04Xp1f.js +1 -0
- package/build/client/_app/immutable/chunks/eylBqhv8.js +3 -0
- package/build/client/_app/immutable/chunks/hx0ssLL_.js +2 -0
- package/build/client/_app/immutable/chunks/mumDj17t.js +1 -0
- package/build/client/_app/immutable/chunks/pZYp3_TE.js +1 -0
- package/build/client/_app/immutable/chunks/tImwjqWn.js +1 -0
- package/build/client/_app/immutable/chunks/uBIymjUX.js +1 -0
- package/build/client/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/build/client/_app/immutable/entry/app.DVZ1wE36.js +2 -0
- package/build/client/_app/immutable/entry/start.DluCc61B.js +1 -0
- package/build/client/_app/immutable/nodes/0.CwNFevXf.js +1 -0
- package/build/client/_app/immutable/nodes/1.BR6FYiC-.js +1 -0
- package/build/client/_app/immutable/nodes/10.wNwBFtom.js +2 -0
- package/build/client/_app/immutable/nodes/11.DpoIbMNF.js +2 -0
- package/build/client/_app/immutable/nodes/12.CWdUJ8l3.js +2 -0
- package/build/client/_app/immutable/nodes/13.CZ2uTvNS.js +1 -0
- package/build/client/_app/immutable/nodes/14.CzgyXuvL.js +1 -0
- package/build/client/_app/immutable/nodes/15.CzgyXuvL.js +1 -0
- package/build/client/_app/immutable/nodes/16.odL9eB2N.js +1 -0
- package/build/client/_app/immutable/nodes/17.B-RnUeVU.js +1 -0
- package/build/client/_app/immutable/nodes/18.BLYKxyq2.js +1 -0
- package/build/client/_app/immutable/nodes/19.CgyFfPqF.js +3 -0
- package/build/client/_app/immutable/nodes/2.CCWT41Qr.js +1 -0
- package/build/client/_app/immutable/nodes/20.BBk5-krg.js +1 -0
- package/build/client/_app/immutable/nodes/21.CJoU3s1A.js +2 -0
- package/build/client/_app/immutable/nodes/22.CoRvPh8m.js +1 -0
- package/build/client/_app/immutable/nodes/23.zXO3NjnM.js +3 -0
- package/build/client/_app/immutable/nodes/24.CmO27TED.js +1 -0
- package/build/client/_app/immutable/nodes/26.TVKNr_xX.js +18 -0
- package/build/client/_app/immutable/nodes/27.RojtGU_o.js +1 -0
- package/build/client/_app/immutable/nodes/28.CVTdeeSI.js +2 -0
- package/build/client/_app/immutable/nodes/3.Cgib7Vi6.js +1 -0
- package/build/client/_app/immutable/nodes/4.CnMwOCec.js +1 -0
- package/build/client/_app/immutable/nodes/5.-NqYtQj_.js +1 -0
- package/build/client/_app/immutable/nodes/6.D5xk-UBM.js +1 -0
- package/build/client/_app/immutable/nodes/7.IL4b-DII.js +1 -0
- package/build/client/_app/immutable/nodes/8.DJrguHjO.js +11 -0
- package/build/client/_app/immutable/nodes/9.DTUSzWiK.js +1 -0
- package/build/client/_app/version.json +1 -0
- package/build/client/favicon.svg +7 -0
- package/build/env.js +70 -0
- package/build/handler.js +26 -0
- package/build/index.js +149 -0
- package/build/server/chunks/chunks/Banner.js-D4mtxUfF.js +17 -0
- package/build/server/chunks/chunks/BoardOff.js-Dg5-LoR3.js +1627 -0
- package/build/server/chunks/chunks/Button.js-Buh9rnpu.js +43 -0
- package/build/server/chunks/chunks/Chip.js-xZ7vFkHx.js +12 -0
- package/build/server/chunks/chunks/Dialog.js-CGpwdpM-.js +60 -0
- package/build/server/chunks/chunks/FeaturePanels.js-B2sKozgF.js +84 -0
- package/build/server/chunks/chunks/FolderBrowser.js-DUHFhDaX.js +28 -0
- package/build/server/chunks/chunks/HelpTip.js-CzemvmjC.js +19 -0
- package/build/server/chunks/chunks/InfoBox.js-BJiVzZgw.js +10 -0
- package/build/server/chunks/chunks/KeyCaps.js-BMI2Hrh2.js +37 -0
- package/build/server/chunks/chunks/LogLine.js-2b7uX__H.js +35 -0
- package/build/server/chunks/chunks/Markdown.js-Clud88KU.js +4233 -0
- package/build/server/chunks/chunks/ModelPicker.js-FuBgyKIA.js +141 -0
- package/build/server/chunks/chunks/OptionButtons.js-LQKrAwUX.js +28 -0
- package/build/server/chunks/chunks/PeekPanel.js-aZ-r_v3N.js +375 -0
- package/build/server/chunks/chunks/ScoutPage.js-2DcNia96.js +733 -0
- package/build/server/chunks/chunks/SetupSteps.js-D7TAF7xa.js +66 -0
- package/build/server/chunks/chunks/Skeleton.js-diCP2sd5.js +30 -0
- package/build/server/chunks/chunks/SlotsMeter.js-BV_sAGf5.js +18 -0
- package/build/server/chunks/chunks/StartConfirm.js-CzEdFtbO.js +124 -0
- package/build/server/chunks/chunks/StatePill.js-CM7-HXNM.js +27 -0
- package/build/server/chunks/chunks/Streamed.js-_NgwNMMs.js +43 -0
- package/build/server/chunks/chunks/_page.server.js-BaGoctEY.js +1419 -0
- package/build/server/chunks/chunks/activity.js-CSoPUQLq.js +84 -0
- package/build/server/chunks/chunks/add-repo.js-DtHEobfm.js +305 -0
- package/build/server/chunks/chunks/app-header.js-CCflgeEQ.js +13 -0
- package/build/server/chunks/chunks/app.js-CuPn8jtk.js +12 -0
- package/build/server/chunks/chunks/bin.js-Cyb2cYLc.js +58 -0
- package/build/server/chunks/chunks/board-keys.js-CW3qw-MC.js +32 -0
- package/build/server/chunks/chunks/board-page.js-D0tdsE9J.js +860 -0
- package/build/server/chunks/chunks/board.js-BxL3CjB1.js +203 -0
- package/build/server/chunks/chunks/browser-test.js-DJEpOoVz.js +170 -0
- package/build/server/chunks/chunks/card-pulls.js-d_uGmBB3.js +229 -0
- package/build/server/chunks/chunks/card-repos.js-QaMCxiyV.js +59 -0
- package/build/server/chunks/chunks/chain-store.js-D42m8DUo.js +91 -0
- package/build/server/chunks/chunks/chain.js-CJFRywIC.js +52 -0
- package/build/server/chunks/chunks/changes.js-D8ITRMgU.js +513 -0
- package/build/server/chunks/chunks/checkout.js-Ys5L_gA4.js +319 -0
- package/build/server/chunks/chunks/client.js-B7jIMDuS.js +68 -0
- package/build/server/chunks/chunks/clipboard.js-qXskOBim.js +12 -0
- package/build/server/chunks/chunks/cloud-status.js-hy-9zUVX.js +95 -0
- package/build/server/chunks/chunks/coach.js-BhNB14rV.js +296 -0
- package/build/server/chunks/chunks/comments.js-1nWJQptB.js +311 -0
- package/build/server/chunks/chunks/commit-message.js-CMcNZUZw.js +8 -0
- package/build/server/chunks/chunks/create-card.js-DKtprMG6.js +498 -0
- package/build/server/chunks/chunks/db.js-pqoVpAzG.js +80 -0
- package/build/server/chunks/chunks/diff-comments.js-BSCuay_U.js +95 -0
- package/build/server/chunks/chunks/discussion.js-rJ5OMfvX.js +355 -0
- package/build/server/chunks/chunks/display.js-Bf-vGQ7Q.js +61 -0
- package/build/server/chunks/chunks/elapsed.js-DikkNhaD.js +27 -0
- package/build/server/chunks/chunks/engine.js-DS5zUwsE.js +115 -0
- package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
- package/build/server/chunks/chunks/estimate.js-BHTYVTaQ.js +2484 -0
- package/build/server/chunks/chunks/evidence-timeline.js-Dk0dTZIy.js +253 -0
- package/build/server/chunks/chunks/evidence.js-CT3tWdbB.js +257 -0
- package/build/server/chunks/chunks/exports.js-Hn-WQRMB.js +150 -0
- package/build/server/chunks/chunks/features.svelte.js-DNsFmFZb.js +10 -0
- package/build/server/chunks/chunks/files.js-V46lE0-6.js +46 -0
- package/build/server/chunks/chunks/filter.js-CsmCtJMd.js +11 -0
- package/build/server/chunks/chunks/forms.js-03E8qnFz.js +35 -0
- package/build/server/chunks/chunks/gate.js-Cbqo8Yy0.js +82 -0
- package/build/server/chunks/chunks/getting-started.js-DKbHofN5.js +55 -0
- package/build/server/chunks/chunks/git.js-l43vBHqs.js +16 -0
- package/build/server/chunks/chunks/home-path.js-BXgrl3TP.js +11 -0
- package/build/server/chunks/chunks/hub-link.js-B5kjLyyd.js +1532 -0
- package/build/server/chunks/chunks/internal.js-DaSBO6jY.js +1239 -0
- package/build/server/chunks/chunks/internal2.js-D6AKyUgY.js +27 -0
- package/build/server/chunks/chunks/knowledge-page.js-D2ALB3v9.js +292 -0
- package/build/server/chunks/chunks/knowledge-revert.js-2eyN9Lcb.js +109 -0
- package/build/server/chunks/chunks/knowledge.js--eAgdzNx.js +394 -0
- package/build/server/chunks/chunks/last-board.js-BemeiK3t.js +23 -0
- package/build/server/chunks/chunks/log.js-R2zUph6T.js +228 -0
- package/build/server/chunks/chunks/loop.js-D3guWKLp.js +4038 -0
- package/build/server/chunks/chunks/loop2.js-B_Qd2m4y.js +67 -0
- package/build/server/chunks/chunks/navigation.js-DQJMz-SM.js +2 -0
- package/build/server/chunks/chunks/new-project.js-DNcr9JpB.js +305 -0
- package/build/server/chunks/chunks/next-step.js-B8Kl0Iv9.js +522 -0
- package/build/server/chunks/chunks/node.js-Bz2jT5wt.js +3381 -0
- package/build/server/chunks/chunks/now-live.svelte.js-hIaDgjJ3.js +13 -0
- package/build/server/chunks/chunks/now-snapshot.js-zGKLIzox.js +207 -0
- package/build/server/chunks/chunks/now.js-Dfm-o0Ha.js +765 -0
- package/build/server/chunks/chunks/onboard.js-LBqPOxyU.js +1525 -0
- package/build/server/chunks/chunks/ordinal.js-Bm_9QEBD.js +12 -0
- package/build/server/chunks/chunks/overview.js-C32iHkXD.js +1108 -0
- package/build/server/chunks/chunks/page-keys.svelte.js-D8vXA_8Z.js +14 -0
- package/build/server/chunks/chunks/patch.js-Bl7vwsUj.js +62 -0
- package/build/server/chunks/chunks/paths.js-DVRjNYFW.js +19 -0
- package/build/server/chunks/chunks/peek.js-D9sSjT9t.js +95 -0
- package/build/server/chunks/chunks/plan.js-DFq5ntMM.js +143 -0
- package/build/server/chunks/chunks/project-files-notice.js-CcqcBgUP.js +19 -0
- package/build/server/chunks/chunks/project-files.js-DTC4jUxy.js +52 -0
- package/build/server/chunks/chunks/project-folder.js-CoKgPiM0.js +22 -0
- package/build/server/chunks/chunks/projects.js-bw2V11od.js +989 -0
- package/build/server/chunks/chunks/prs.js-CLfImauu.js +118 -0
- package/build/server/chunks/chunks/publish.js-D2vWpIJU.js +195 -0
- package/build/server/chunks/chunks/pull-list.js-BCIBJdyz.js +691 -0
- package/build/server/chunks/chunks/qa-ask.svelte.js-8Hf1JWW2.js +47 -0
- package/build/server/chunks/chunks/qa-setup.js-DFOEcNxH.js +1241 -0
- package/build/server/chunks/chunks/quiet.js-1GKY40Ay.js +104 -0
- package/build/server/chunks/chunks/rail.js-BePBwOqZ.js +135 -0
- package/build/server/chunks/chunks/review.js-MPqnq9Gy.js +98 -0
- package/build/server/chunks/chunks/routing.js-B8s1QwSP.js +265 -0
- package/build/server/chunks/chunks/run-log.js-CnN2jOcg.js +94 -0
- package/build/server/chunks/chunks/run.js-COSejjLl.js +34 -0
- package/build/server/chunks/chunks/scout-findings.js-CqJti10a.js +940 -0
- package/build/server/chunks/chunks/scout.js-Bm7wQLX2.js +62 -0
- package/build/server/chunks/chunks/sentinels.js-BXvpnzr3.js +13 -0
- package/build/server/chunks/chunks/server.js-BR0D07DR.js +3803 -0
- package/build/server/chunks/chunks/settings-sections.js-V70W7BkZ.js +103 -0
- package/build/server/chunks/chunks/shared.js-BgfCUZUJ.js +776 -0
- package/build/server/chunks/chunks/sign-in.js-O-pBhi19.js +14 -0
- package/build/server/chunks/chunks/snapshot.js-BekzL_He.js +38 -0
- package/build/server/chunks/chunks/spend.js-BabnR69T.js +63 -0
- package/build/server/chunks/chunks/src.js-Cm8RAH_q.js +609 -0
- package/build/server/chunks/chunks/src2.js-CV8tsClO.js +1186 -0
- package/build/server/chunks/chunks/src3.js-h9tTEbVb.js +11222 -0
- package/build/server/chunks/chunks/stack.js-CMWXhMZS.js +13 -0
- package/build/server/chunks/chunks/standup.js-D-qBnMx4.js +103 -0
- package/build/server/chunks/chunks/state.js-BTDrgu7s.js +71 -0
- package/build/server/chunks/chunks/stream.js-D6r6iqjD.js +66 -0
- package/build/server/chunks/chunks/terms.js-DPZztSEn.js +88 -0
- package/build/server/chunks/chunks/ticket-system.js-Dj9R3XJw.js +147 -0
- package/build/server/chunks/chunks/ticket.js-6sj-2ZEM.js +110 -0
- package/build/server/chunks/chunks/timesheet.js-DfhIokoE.js +212 -0
- package/build/server/chunks/chunks/timesheet2.js-Cu95ddl3.js +84 -0
- package/build/server/chunks/chunks/to-workspace.js-DiOJP59J.js +308 -0
- package/build/server/chunks/chunks/toast-stack.svelte.js-CXIg3_KT.js +10 -0
- package/build/server/chunks/chunks/uneval.js-VnZcgzZr.js +488 -0
- package/build/server/chunks/chunks/utils.js-DQTBh7_6.js +1006 -0
- package/build/server/chunks/chunks/when-said.js-0F9asAma.js +35 -0
- package/build/server/chunks/chunks/workspace.js-BBdJRon9.js +212 -0
- package/build/server/chunks/entries/endpoints/api/board/_server.ts.js-BlYC_lpV.js +69 -0
- package/build/server/chunks/entries/endpoints/api/board/minimize/_server.ts.js-Wddt9YPR.js +68 -0
- package/build/server/chunks/entries/endpoints/api/board/move/_server.ts.js-BwZpCKx0.js +68 -0
- package/build/server/chunks/entries/endpoints/api/board/promote/_server.ts.js-Cw6kvkMq.js +68 -0
- package/build/server/chunks/entries/endpoints/api/board/pulls/_server.ts.js-DFhpbiMo.js +71 -0
- package/build/server/chunks/entries/endpoints/api/board/stop/_server.ts.js-D5eylDMw.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/answer/_server.ts.js-CG8xh52y.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/branch/_server.ts.js-a5_P9voA.js +40 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/chain/_server.ts.js-tJvQy6RK.js +70 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/checkouts/_server.ts.js-B2_gx6vF.js +41 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/choice/_server.ts.js-pmAdIQkK.js +34 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/comments/_id_/_server.ts.js-C5NxGWw3.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/comments/_server.ts.js-0rw7UNv8.js +64 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/commit/_server.ts.js-_yXWCOlQ.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/commit-diff/_server.ts.js-CRPV3z-g.js +61 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/commit-message/_server.ts.js-CO9mD3u6.js +82 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/context/_server.ts.js-7kzrigFz.js +42 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/delete/_server.ts.js-DH0nO9wG.js +516 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/file/_server.ts.js-D80SvJDi.js +35 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/files/_...path_/_server.ts.js-GxFjb2H0.js +34 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/fix/_server.ts.js-B-HAB050.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/knowledge/_server.ts.js-D4fN-j7X.js +81 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/link/_other_/_server.ts.js-C00pQDCu.js +42 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/log/_server.ts.js-BXW_tG-I.js +32 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/log/raw/_server.ts.js-pT8StZGR.js +32 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/message/_server.ts.js-ZMno2Hu6.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/models/_server.ts.js-DEZVpqO3.js +73 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/patch/_server.ts.js-BxfLi-Zs.js +61 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/peek/_server.ts.js-CsTKWIP_.js +169 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/_server.ts.js-CsOeAXkf.js +53 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/comments/_server.ts.js-DZ2XHOhF.js +71 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/discuss/_server.ts.js-CO8eM0e8.js +72 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/discussions/_server.ts.js-Lp7l0Yqv.js +71 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/fix/_server.ts.js-CeIhjpQ4.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/fix-all/_server.ts.js-D-DKoCpQ.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/links/_server.ts.js-B_q3jUP3.js +72 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/qa/_server.ts.js-BulVcJY9.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/seen/_server.ts.js-Z06A6MS1.js +71 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/triage/_server.ts.js-qADU4URF.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pull/_server.ts.js-CHnTH9WK.js +58 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/push/_server.ts.js-BPdPwPo2.js +83 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/repos/_server.ts.js-Bjqa3Uoo.js +73 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/research/_server.ts.js-DzQjoHOZ.js +138 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/retry/_server.ts.js-CAodrXqd.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/send-back/_server.ts.js-CmJSnvTx.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/stack/_server.ts.js-DjI8S94J.js +82 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/tasks/_server.ts.js-BzX_nNJk.js +71 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/thread/_server.ts.js-Dn36Guxk.js +33 -0
- package/build/server/chunks/entries/endpoints/api/cards/_server.ts.js-DPMOBsvp.js +77 -0
- package/build/server/chunks/entries/endpoints/api/cards/context/_server.ts.js-D6y-g2O-.js +52 -0
- package/build/server/chunks/entries/endpoints/api/cards/next/_server.ts.js-C2se67rf.js +55 -0
- package/build/server/chunks/entries/endpoints/api/chain/_server.ts.js-DKO5Q8GV.js +70 -0
- package/build/server/chunks/entries/endpoints/api/clones/_server.ts.js-Bgcc_Beg.js +56 -0
- package/build/server/chunks/entries/endpoints/api/current-project/_server.ts.js-DZCtSlXs.js +81 -0
- package/build/server/chunks/entries/endpoints/api/evidence/timesheet/_server.ts.js-xJwzSrcl.js +32 -0
- package/build/server/chunks/entries/endpoints/api/folders/_server.ts.js-BdcE7k8S.js +83 -0
- package/build/server/chunks/entries/endpoints/api/gh/_server.ts.js-CGvM8fn7.js +66 -0
- package/build/server/chunks/entries/endpoints/api/gh/name/_server.ts.js-CHh3tAu7.js +36 -0
- package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-DLUfrHo6.js +22 -0
- package/build/server/chunks/entries/endpoints/api/login-item/_server.ts.js-Cya7S7W6.js +77 -0
- package/build/server/chunks/entries/endpoints/api/notes/_server.ts.js-DaUFVqSM.js +26 -0
- package/build/server/chunks/entries/endpoints/api/notifications/_server.ts.js-DK6NFnII.js +76 -0
- package/build/server/chunks/entries/endpoints/api/now/_server.ts.js-xW0jeJdy.js +83 -0
- package/build/server/chunks/entries/endpoints/api/package/entry/_server.ts.js-DQyZanpo.js +35 -0
- package/build/server/chunks/entries/endpoints/api/projects/_server.ts.js-CzXJTj_l.js +58 -0
- package/build/server/chunks/entries/endpoints/api/qa-setup/_server.ts.js-DujrYbEP.js +76 -0
- package/build/server/chunks/entries/endpoints/api/remove-check/_server.ts.js-1KAi9LDi.js +58 -0
- package/build/server/chunks/entries/endpoints/api/setup/_server.ts.js-D0MKtjR7.js +69 -0
- package/build/server/chunks/entries/endpoints/api/tickets/jira/_server.ts.js-Z2LdOr5l.js +39 -0
- package/build/server/chunks/entries/endpoints/api/tickets/read/_server.ts.js-BziHtc8Y.js +68 -0
- package/build/server/chunks/entries/endpoints/api/tools/_server.ts.js-oyvq8i1y.js +30 -0
- package/build/server/chunks/entries/endpoints/api/workspace/_server.ts.js-CMGBL5cX.js +58 -0
- package/build/server/chunks/entries/endpoints/api/workspace/commit/_server.ts.js-BZQQJ1YG.js +66 -0
- package/build/server/chunks/entries/endpoints/api/workspace/patch/_server.ts.js-xrjgHECx.js +64 -0
- package/build/server/chunks/entries/endpoints/api/workspace/push/_server.ts.js-CTdia7Uz.js +66 -0
- package/build/server/chunks/entries/hooks.server.js-B0jE-ELC.js +211 -0
- package/build/server/chunks/entries/pages/_error.svelte.js-DPcKI5sX.js +25 -0
- package/build/server/chunks/entries/pages/_layout.server.ts.js-Jj3i2Th9.js +134 -0
- package/build/server/chunks/entries/pages/_layout.svelte.js-Cu3ghN80.js +1251 -0
- package/build/server/chunks/entries/pages/_page.svelte.js-DEYydBCm.js +662 -0
- package/build/server/chunks/entries/pages/accept/_page.server.ts.js-BF7MrA5s.js +29 -0
- package/build/server/chunks/entries/pages/accept/_page.svelte.js-8yPsedd-.js +54 -0
- package/build/server/chunks/entries/pages/b/_board_/_page.svelte.js-S9acLF3f.js +68 -0
- package/build/server/chunks/entries/pages/b/_board_/_page.ts.js-BcKdG_Tp.js +21 -0
- package/build/server/chunks/entries/pages/b/research/_page.svelte.js-FW6Hw9g5.js +68 -0
- package/build/server/chunks/entries/pages/b/research/_page.ts.js-Ds2AjFFK.js +13 -0
- package/build/server/chunks/entries/pages/evidence/_page.server.ts.js-uwu2X7bA.js +1382 -0
- package/build/server/chunks/entries/pages/evidence/_page.svelte.js-DBCjiT59.js +594 -0
- package/build/server/chunks/entries/pages/f/_...path_/_page.svelte.js-DxwJaJzh.js +58 -0
- package/build/server/chunks/entries/pages/knowledge/_page.server.ts.js-BAUvFEcM.js +80 -0
- package/build/server/chunks/entries/pages/knowledge/_page.svelte.js-D9117gHM.js +732 -0
- package/build/server/chunks/entries/pages/new/_page.server.ts.js-BNCQQpyw.js +110 -0
- package/build/server/chunks/entries/pages/new/_page.svelte.js-Ben8-N_h.js +503 -0
- package/build/server/chunks/entries/pages/new/idea/_page.server.ts.js-jssA29y3.js +46 -0
- package/build/server/chunks/entries/pages/new/idea/_page.svelte.js-XoKspqAc.js +210 -0
- package/build/server/chunks/entries/pages/new/task/_page.server.ts.js-CmZgfvyt.js +66 -0
- package/build/server/chunks/entries/pages/new/task/_page.svelte.js-BKpERKvm.js +169 -0
- package/build/server/chunks/entries/pages/onboard/_page.server.ts.js-pmc_pXvs.js +12 -0
- package/build/server/chunks/entries/pages/onboard/_page.svelte.js-C7LNK-ba.js +5 -0
- package/build/server/chunks/entries/pages/projects/_page.server.ts.js-BEhLRfJ_.js +12 -0
- package/build/server/chunks/entries/pages/projects/_page.svelte.js-OraOjsyb.js +5 -0
- package/build/server/chunks/entries/pages/scout/_page.server.ts.js-hQYnMHwY.js +10 -0
- package/build/server/chunks/entries/pages/scout/_page.svelte.js-7q4d044Z.js +40 -0
- package/build/server/chunks/entries/pages/scout/f/_id_/_page.server.ts.js-BN4TnSpB.js +22 -0
- package/build/server/chunks/entries/pages/scout/f/_id_/_page.svelte.js-GzpLhARi.js +40 -0
- package/build/server/chunks/entries/pages/settings/_layout.server.ts.js-B5LgqMMT.js +12 -0
- package/build/server/chunks/entries/pages/settings/_layout.svelte.js-CSCpV6qA.js +81 -0
- package/build/server/chunks/entries/pages/settings/_page.svelte.js-DNpsNFo0.js +25 -0
- package/build/server/chunks/entries/pages/settings/_section_/_page.server.ts.js-nRDEV3i_.js +348 -0
- package/build/server/chunks/entries/pages/settings/_section_/_page.svelte.js-BihUf-nY.js +1052 -0
- package/build/server/chunks/entries/pages/settings/integrations/_page.server.ts.js-BTuRpg8m.js +58 -0
- package/build/server/chunks/entries/pages/settings/integrations/_page.svelte.js-C8i8ZmZR.js +161 -0
- package/build/server/chunks/entries/pages/settings/mcp/_page.server.ts.js-TFISfO1a.js +925 -0
- package/build/server/chunks/entries/pages/settings/mcp/_page.svelte.js-D1X0TNOm.js +433 -0
- package/build/server/chunks/entries/pages/settings/phases/_page.server.ts.js-CgK7MTZf.js +48 -0
- package/build/server/chunks/entries/pages/settings/phases/_page.svelte.js-u-sTQ-ue.js +80 -0
- package/build/server/chunks/entries/pages/settings/project/_page.server.ts.js-CCnk9WbO.js +363 -0
- package/build/server/chunks/entries/pages/settings/project/_page.svelte.js-MxvNqYlQ.js +1269 -0
- package/build/server/chunks/entries/pages/settings/wall/_page.server.ts.js-Bt5siY_N.js +12 -0
- package/build/server/chunks/entries/pages/settings/wall/_page.svelte.js-CMR4zSAt.js +43 -0
- package/build/server/chunks/entries/pages/t/_key_/_layout.server.ts.js-W6YPvOCA.js +124 -0
- package/build/server/chunks/entries/pages/t/_key_/_layout.svelte.js-CK0PiWsz.js +543 -0
- package/build/server/chunks/entries/pages/t/_key_/_page.server.ts.js-CdB7v0WX.js +15 -0
- package/build/server/chunks/entries/pages/t/_key_/_tab_/_page.server.ts.js-Bksaje8R.js +75 -0
- package/build/server/chunks/entries/pages/t/_key_/_tab_/_page.svelte.js-9OQ2eQxu.js +4607 -0
- package/build/server/chunks/entries/pages/team/_page.svelte.js-BdUSXC04.js +18 -0
- package/build/server/chunks/entries/pages/team/_page.ts.js-DfhJmoZI.js +20 -0
- package/build/server/chunks/entries/pages/workspace/_page.svelte.js-DLaWe23r.js +579 -0
- package/build/server/chunks/handler-Dlwmumt5.js +1735 -0
- package/build/server/chunks/index.js-BX0fZD5G.js +3701 -0
- package/build/server/chunks/manifest.js-B2Of6Dj7.js +761 -0
- package/build/server/chunks/nodes/0.js-DSzhdY0D.js +87 -0
- package/build/server/chunks/nodes/1.js-j4osL1br.js +9 -0
- package/build/server/chunks/nodes/10.js-jkvevEFY.js +75 -0
- package/build/server/chunks/nodes/11.js-plyiDP2n.js +72 -0
- package/build/server/chunks/nodes/12.js-DwtvDAyM.js +78 -0
- package/build/server/chunks/nodes/13.js-BpxwqFh4.js +72 -0
- package/build/server/chunks/nodes/14.js-B5iNIKGy.js +15 -0
- package/build/server/chunks/nodes/15.js-CXCAqUsG.js +15 -0
- package/build/server/chunks/nodes/16.js-oxkLEH0n.js +76 -0
- package/build/server/chunks/nodes/17.js-B-ZJEo9K.js +76 -0
- package/build/server/chunks/nodes/18.js-C0OUCEux.js +9 -0
- package/build/server/chunks/nodes/19.js-M8EAQJdW.js +76 -0
- package/build/server/chunks/nodes/2.js-ZedduK-3.js +33 -0
- package/build/server/chunks/nodes/20.js-BHvsLNjD.js +72 -0
- package/build/server/chunks/nodes/21.js-eOaW4si1.js +76 -0
- package/build/server/chunks/nodes/22.js-CbJ6tQSs.js +38 -0
- package/build/server/chunks/nodes/23.js-DXk8ejlx.js +81 -0
- package/build/server/chunks/nodes/24.js-C4qGJc4X.js +33 -0
- package/build/server/chunks/nodes/25.js-Cal8uT5V.js +21 -0
- package/build/server/chunks/nodes/26.js-Cp5jBcrN.js +80 -0
- package/build/server/chunks/nodes/27.js-Do55o_cb.js +17 -0
- package/build/server/chunks/nodes/28.js-SNz3QVix.js +9 -0
- package/build/server/chunks/nodes/3.js-DyivQ5dN.js +75 -0
- package/build/server/chunks/nodes/4.js-BGgTTQFR.js +9 -0
- package/build/server/chunks/nodes/5.js-DQYA2BBI.js +31 -0
- package/build/server/chunks/nodes/6.js-BVTi2KFL.js +24 -0
- package/build/server/chunks/nodes/7.js-CnprIn3p.js +12 -0
- package/build/server/chunks/nodes/8.js-Bdicn369.js +50 -0
- package/build/server/chunks/nodes/9.js-DVclPGXf.js +9 -0
- package/build/shims.js +33 -0
- package/dist/THIRD-PARTY-NOTICES.md +659 -0
- package/dist/detect-BmI_gskA.js +585 -0
- package/dist/fonts/OFL.txt +92 -0
- package/dist/nolzu.js +48 -0
- package/dist/package-vezZOzhD.js +181 -0
- package/dist/shared/finish.md +110 -0
- package/dist/shared/knowledge.md +72 -0
- package/dist/shared/verdict.md +42 -0
- package/dist/skills/.gitkeep +0 -0
- package/dist/skills/nolzu-architecture/SKILL.md +140 -0
- package/dist/skills/nolzu-architecture/finish.md +110 -0
- package/dist/skills/nolzu-assess/SKILL.md +99 -0
- package/dist/skills/nolzu-assess/finish.md +110 -0
- package/dist/skills/nolzu-design/SKILL.md +115 -0
- package/dist/skills/nolzu-design/finish.md +110 -0
- package/dist/skills/nolzu-feedback/SKILL.md +107 -0
- package/dist/skills/nolzu-feedback/finish.md +110 -0
- package/dist/skills/nolzu-implement/SKILL.md +138 -0
- package/dist/skills/nolzu-implement/finish.md +110 -0
- package/dist/skills/nolzu-investigate/SKILL.md +139 -0
- package/dist/skills/nolzu-investigate/finish.md +110 -0
- package/dist/skills/nolzu-learn-repo/SKILL.md +115 -0
- package/dist/skills/nolzu-learn-repo/finish.md +110 -0
- package/dist/skills/nolzu-learn-repo/knowledge.md +72 -0
- package/dist/skills/nolzu-optimize/SKILL.md +82 -0
- package/dist/skills/nolzu-optimize/finish.md +110 -0
- package/dist/skills/nolzu-optimize/knowledge.md +72 -0
- package/dist/skills/nolzu-orient/SKILL.md +115 -0
- package/dist/skills/nolzu-orient/finish.md +110 -0
- package/dist/skills/nolzu-orient/knowledge.md +72 -0
- package/dist/skills/nolzu-plan/SKILL.md +165 -0
- package/dist/skills/nolzu-plan/finish.md +110 -0
- package/dist/skills/nolzu-pr-review/SKILL.md +150 -0
- package/dist/skills/nolzu-pr-review/finish.md +110 -0
- package/dist/skills/nolzu-qa/SKILL.md +177 -0
- package/dist/skills/nolzu-qa/finish.md +110 -0
- package/dist/skills/nolzu-qa/verdict.md +42 -0
- package/dist/skills/nolzu-refine/SKILL.md +145 -0
- package/dist/skills/nolzu-refine/finish.md +110 -0
- package/dist/skills/nolzu-research/SKILL.md +140 -0
- package/dist/skills/nolzu-research/finish.md +110 -0
- package/dist/skills/nolzu-wrapup/SKILL.md +126 -0
- package/dist/skills/nolzu-wrapup/finish.md +110 -0
- package/dist/skills/nolzu-wrapup/knowledge.md +72 -0
- package/dist/src-BG8LaXLS.js +723 -0
- package/dist/src-DPfcvRqs.js +4 -0
- package/dist/start-ItZOcBtM.js +362 -0
- package/package.json +49 -9
- package/bin/nolzu.js +0 -8
|
@@ -0,0 +1,989 @@
|
|
|
1
|
+
import { j as choicesOf, g as BOARD_KINDS, l as choiceLabel, R as RESEARCH_KINDS, a as isResearchKind } from './board.js-BxL3CjB1.js';
|
|
2
|
+
import { e as projectRepos, ac as parseAllowedCommands, B as allowedCommandProblem, v as validateSetting, t as isFolderName } from './estimate.js-BHTYVTaQ.js';
|
|
3
|
+
import { g as getSetting, G as peekLocalKey, M as allCardMoves, L as allRuns, r as resolveDataDir, J as cardRepos } from './node.js-Bz2jT5wt.js';
|
|
4
|
+
import './src.js-Cm8RAH_q.js';
|
|
5
|
+
import { k as resolveKnowledgeDir, r as repoKnowledgePath } from './src2.js-CV8tsClO.js';
|
|
6
|
+
import { v as branchName, f as checkKnowledgeDir, g as git, a as gitEnv, N as parseRemoteUrl, bg as wallEntryProblem, D as checkoutRoot, b9 as resolvedPath, U as worktreesFolder, bh as gitCommonDir, t as checkoutPath, i as cloneTarget, bi as ignoredPaths, bj as somePaths } from './src3.js-h9tTEbVb.js';
|
|
7
|
+
import { s as storeTickets, t as trackBaseBranch, i as inTurn, r as readManifest, b as recordInRoot, c as forgetInRoot, d as checkProject, e as scannedBase, M as MANIFEST, w as writeRepoKnowledge } from './onboard.js-LBqPOxyU.js';
|
|
8
|
+
import { r as remoteEnv } from './publish.js-D2vWpIJU.js';
|
|
9
|
+
import { x as chromeFound, q as qaHasBrowser, y as qaServers, z as appRows, w as qaCopyRoot } from './qa-setup.js-DFOEcNxH.js';
|
|
10
|
+
import { i as isClosed } from './checkout.js-Ys5L_gA4.js';
|
|
11
|
+
import { s as storeSetting } from './coach.js-BhNB14rV.js';
|
|
12
|
+
import { h as homePath } from './home-path.js-BXgrl3TP.js';
|
|
13
|
+
import { p as projectName } from './app-header.js-CCflgeEQ.js';
|
|
14
|
+
import { b as browserCommand } from './bin.js-Cyb2cYLc.js';
|
|
15
|
+
import { realpathSync, existsSync, rmSync, lstatSync, readdirSync } from 'node:fs';
|
|
16
|
+
import { basename, join, sep } from 'node:path';
|
|
17
|
+
import { homedir, tmpdir } from 'node:os';
|
|
18
|
+
import { spawn } from 'node:child_process';
|
|
19
|
+
|
|
20
|
+
//#region src/lib/remove-repo.ts
|
|
21
|
+
var plural = (count, one, many) => count === 1 ? `1 ${one}` : `${count} ${many}`;
|
|
22
|
+
var stays = (why) => ({ problem: `${why} Nothing was removed.` });
|
|
23
|
+
var TAGS_MS = 2e4;
|
|
24
|
+
/**
|
|
25
|
+
* What git shows of the work in the clone that exists nowhere else.
|
|
26
|
+
*
|
|
27
|
+
* Remote-tracking branches are what this clone last saw of its remotes. No fetch runs, so a branch
|
|
28
|
+
* deleted on the host still counts as pushed. Commits reachable only from the reflog are not looked
|
|
29
|
+
* at, the way a fresh clone of the remote would not have them either.
|
|
30
|
+
*/
|
|
31
|
+
async function workLeft(at, path, env) {
|
|
32
|
+
const run = (args) => git(args, {
|
|
33
|
+
cwd: at,
|
|
34
|
+
env: gitEnv(env)
|
|
35
|
+
});
|
|
36
|
+
const top = await run(["rev-parse", "--show-toplevel"]);
|
|
37
|
+
if (top.code !== 0 || realpathSync(top.stdout.trim()) !== realpathSync(at)) return { other: `The folder ${path} is not a git repository of its own, so Nolzu cannot check it for work.` };
|
|
38
|
+
const trees = await run([
|
|
39
|
+
"worktree",
|
|
40
|
+
"list",
|
|
41
|
+
"--porcelain"
|
|
42
|
+
]);
|
|
43
|
+
const other = trees.stdout.split("\n").filter((line) => line.startsWith("worktree ")).slice(1)[0];
|
|
44
|
+
const checkouts = trees.code !== 0 ? `git could not list the checkouts of ${path}, so it stays. ${trees.stderr.trim()}` : other === void 0 ? null : `${path} has another checkout at ${other.slice(9)}, so it stays. Remove that checkout first, or run git worktree prune in ${path} when its folder is gone.`;
|
|
45
|
+
const status = await run([
|
|
46
|
+
"status",
|
|
47
|
+
"--porcelain",
|
|
48
|
+
"--untracked-files=all"
|
|
49
|
+
]);
|
|
50
|
+
const files = status.stdout.split("\n").filter((line) => line !== "").length;
|
|
51
|
+
const listed = status.code === 0 && files === 0 ? await run([
|
|
52
|
+
"status",
|
|
53
|
+
"--porcelain",
|
|
54
|
+
"-z",
|
|
55
|
+
"--ignored=matching",
|
|
56
|
+
"--untracked-files=normal"
|
|
57
|
+
]) : null;
|
|
58
|
+
const ignored = listed === null || listed.code !== 0 ? [] : ignoredPaths(listed.stdout).named;
|
|
59
|
+
return {
|
|
60
|
+
checkouts,
|
|
61
|
+
work: status.code !== 0 ? `git could not read the state of ${path}, so it stays. ${status.stderr.trim()}` : files > 0 ? `${path} has ${plural(files, "file", "files")} that ${files === 1 ? "is" : "are"} not committed, so it stays. Commit and push the changes, or move them away.` : listed !== null && listed.code !== 0 ? `git could not list the files ${path} ignores, so it stays. ${listed.stderr.trim()}` : ignored.length > 0 ? `${path} has ${plural(ignored.length, "file or folder", "files or folders")} git ignores (${somePaths(ignored)}), so it stays: removing it would delete ${ignored.length === 1 ? "it" : "them"}. Move ${ignored.length === 1 ? "it" : "them"} away first.` : (await run([
|
|
62
|
+
"rev-parse",
|
|
63
|
+
"--verify",
|
|
64
|
+
"--quiet",
|
|
65
|
+
"refs/stash"
|
|
66
|
+
])).code === 0 ? `${path} has a stash, so it stays. Apply it and push the work, or drop it with git stash drop.` : null,
|
|
67
|
+
commits: await commitsLeft(run, at, path, env),
|
|
68
|
+
inner: await innerModules(run, path)
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
async function commitsLeft(run, at, path, env) {
|
|
72
|
+
const branches = (await run([
|
|
73
|
+
"for-each-ref",
|
|
74
|
+
"--format=%(refname)",
|
|
75
|
+
"refs/heads"
|
|
76
|
+
])).stdout.split("\n").filter((ref) => ref !== "");
|
|
77
|
+
const local = [];
|
|
78
|
+
for (const ref of branches) {
|
|
79
|
+
const ahead = await run([
|
|
80
|
+
"rev-list",
|
|
81
|
+
"--count",
|
|
82
|
+
ref,
|
|
83
|
+
"--not",
|
|
84
|
+
"--remotes"
|
|
85
|
+
]);
|
|
86
|
+
if (ahead.code !== 0 || ahead.stdout.trim() !== "0") local.push(ref.slice(11));
|
|
87
|
+
}
|
|
88
|
+
if (local.length > 0) return `The ${local.length === 1 ? "branch" : "branches"} ${local.join(", ")} of ${path} ${local.length === 1 ? "has" : "have"} commits on no remote, so ${path} stays. Push them first.`;
|
|
89
|
+
const other = `${path} has commits on no branch and on no remote, from a detached HEAD or another ref, so it stays. Push them or drop them first.`;
|
|
90
|
+
const left = await notOnRemotes(run, []);
|
|
91
|
+
if (left === null) return other;
|
|
92
|
+
if (left.size === 0) return null;
|
|
93
|
+
const mine = await tagCommits(run([
|
|
94
|
+
"show-ref",
|
|
95
|
+
"--tags",
|
|
96
|
+
"-d"
|
|
97
|
+
]));
|
|
98
|
+
const holding = "problem" in mine ? [] : [...mine].filter(([, commit]) => left.has(commit));
|
|
99
|
+
if (holding.length === 0) return other;
|
|
100
|
+
const remote = await tagCommits(git([
|
|
101
|
+
"ls-remote",
|
|
102
|
+
"--tags",
|
|
103
|
+
"origin"
|
|
104
|
+
], {
|
|
105
|
+
cwd: at,
|
|
106
|
+
env: await remoteEnv(env, run),
|
|
107
|
+
signal: AbortSignal.timeout(TAGS_MS)
|
|
108
|
+
}).catch((error) => ({
|
|
109
|
+
code: 1,
|
|
110
|
+
stdout: "",
|
|
111
|
+
stderr: error.message
|
|
112
|
+
})));
|
|
113
|
+
if ("problem" in remote) {
|
|
114
|
+
const tags = holding.map(([name]) => name);
|
|
115
|
+
return `Nolzu could not reach origin to check the ${tags.length === 1 ? "tag" : "tags"} ${names(tags)} of ${path}, so ${path} stays. Check the connection, then try again. ${remote.problem.replace(/[^.]$/, "$&.")}`.trim();
|
|
116
|
+
}
|
|
117
|
+
const there = new Set(remote.values());
|
|
118
|
+
const still = await notOnRemotes(run, holding.flatMap(([, commit]) => there.has(commit) ? [commit] : []));
|
|
119
|
+
if (still === null) return other;
|
|
120
|
+
if (still.size === 0) return null;
|
|
121
|
+
const own = holding.filter(([, commit]) => still.has(commit)).map(([name]) => name);
|
|
122
|
+
if (own.length === 0) return other;
|
|
123
|
+
return own.length === 1 ? `The tag ${own[0]} of ${path} is on no remote, so ${path} stays. Push it with git push origin ${own[0]}, or delete it.` : `The tags ${names(own)} of ${path} are on no remote, so ${path} stays. Push them with git push origin --tags, or delete them.`;
|
|
124
|
+
}
|
|
125
|
+
async function notOnRemotes(run, also) {
|
|
126
|
+
const listed = await run([
|
|
127
|
+
"rev-list",
|
|
128
|
+
"--exclude=refs/stash",
|
|
129
|
+
"--all",
|
|
130
|
+
"--not",
|
|
131
|
+
"--remotes",
|
|
132
|
+
...also
|
|
133
|
+
]);
|
|
134
|
+
return listed.code === 0 ? new Set(listed.stdout.split("\n").filter((line) => line !== "")) : null;
|
|
135
|
+
}
|
|
136
|
+
async function tagCommits(listed) {
|
|
137
|
+
const { code, stdout, stderr } = await listed;
|
|
138
|
+
if (code === 1 && stdout === "" && stderr === "") return /* @__PURE__ */ new Map();
|
|
139
|
+
if (code !== 0) return { problem: stderr.trim().split("\n")[0] ?? "" };
|
|
140
|
+
const tags = /* @__PURE__ */ new Map();
|
|
141
|
+
for (const line of stdout.split("\n")) {
|
|
142
|
+
const [commit, ref] = line.split(/\s+/);
|
|
143
|
+
if (commit === void 0 || ref === void 0 || !ref.startsWith("refs/tags/")) continue;
|
|
144
|
+
const name = ref.slice(10);
|
|
145
|
+
if (name.endsWith("^{}")) tags.set(name.slice(0, -3), commit);
|
|
146
|
+
else if (!tags.has(name)) tags.set(name, commit);
|
|
147
|
+
}
|
|
148
|
+
return tags;
|
|
149
|
+
}
|
|
150
|
+
async function innerModules(run, path) {
|
|
151
|
+
const gitDir = (await run(["rev-parse", "--absolute-git-dir"])).stdout.trim();
|
|
152
|
+
return gitDir === "" || existsSync(join(gitDir, "modules")) ? `${path} holds submodules of its own, and Nolzu cannot check their work. Remove ${path} by hand.` : null;
|
|
153
|
+
}
|
|
154
|
+
async function submoduleGitDir(project, at, path, env) {
|
|
155
|
+
const run = (cwd, args) => git(args, {
|
|
156
|
+
cwd,
|
|
157
|
+
env: gitEnv(env)
|
|
158
|
+
});
|
|
159
|
+
const common = (await run(project, [
|
|
160
|
+
"rev-parse",
|
|
161
|
+
"--path-format=absolute",
|
|
162
|
+
"--git-common-dir"
|
|
163
|
+
])).stdout.trim();
|
|
164
|
+
const dir = (await run(at, ["rev-parse", "--absolute-git-dir"])).stdout.trim();
|
|
165
|
+
const modules = common === "" ? null : join(realpathSync(common), "modules") + sep;
|
|
166
|
+
if (modules === null || dir === "" || lstatSync(dir).isSymbolicLink() || !realpathSync(dir).startsWith(modules)) return { why: `The history of the submodule ${path} is not in the root's .git/modules folder, so Nolzu leaves it alone.` };
|
|
167
|
+
return { dir: realpathSync(dir) };
|
|
168
|
+
}
|
|
169
|
+
async function dropSubmodule(project, path, dir, env) {
|
|
170
|
+
const run = (args) => git(args, {
|
|
171
|
+
cwd: project,
|
|
172
|
+
env: gitEnv(env)
|
|
173
|
+
});
|
|
174
|
+
const spec = `:(literal)${path}`;
|
|
175
|
+
const deinit = await run([
|
|
176
|
+
"submodule",
|
|
177
|
+
"deinit",
|
|
178
|
+
"-f",
|
|
179
|
+
"-q",
|
|
180
|
+
"--",
|
|
181
|
+
spec
|
|
182
|
+
]);
|
|
183
|
+
if (deinit.code !== 0) return `git could not deinit the submodule ${path}. ${deinit.stderr.trim()}`;
|
|
184
|
+
const keep = dir === null ? `Run git submodule update --init ${path} to bring it back.` : `Its history is still in ${dir}, so git submodule update --init ${path} brings it back.`;
|
|
185
|
+
const rm = await run([
|
|
186
|
+
"rm",
|
|
187
|
+
"-q",
|
|
188
|
+
"--",
|
|
189
|
+
spec
|
|
190
|
+
]);
|
|
191
|
+
if (rm.code !== 0) return `git emptied the submodule folder ${path}, but could not remove it. ${rm.stderr.trim()} ${keep}`;
|
|
192
|
+
const commit = await run([
|
|
193
|
+
"commit",
|
|
194
|
+
"-q",
|
|
195
|
+
"--cleanup=verbatim",
|
|
196
|
+
"-m",
|
|
197
|
+
`chore: remove ${path}`,
|
|
198
|
+
"--",
|
|
199
|
+
`:(top,literal)${path}`,
|
|
200
|
+
":(top,literal).gitmodules"
|
|
201
|
+
]);
|
|
202
|
+
if (commit.code !== 0) return `git removed the submodule ${path}, but could not commit it. ${commit.stderr.trim()} ${keep}`;
|
|
203
|
+
if (dir !== null) rmSync(dir, { recursive: true });
|
|
204
|
+
return null;
|
|
205
|
+
}
|
|
206
|
+
var REMOVE_CHECKS = {
|
|
207
|
+
checkouts: "No card has a checkout of it",
|
|
208
|
+
work: "Nothing uncommitted, no stash",
|
|
209
|
+
commits: "Every commit is on a remote"
|
|
210
|
+
};
|
|
211
|
+
var NO_PROJECT = "There is no project set, so there is no repository to remove.";
|
|
212
|
+
var names = (keys) => keys.length === 1 ? keys[0] ?? "" : `${keys.slice(0, -1).join(", ")} and ${keys.at(-1) ?? ""}`;
|
|
213
|
+
function heldBy(db, project, path) {
|
|
214
|
+
const keys = cardsWithCheckout(db, project, path);
|
|
215
|
+
if (keys.length === 0) return null;
|
|
216
|
+
return keys.length === 1 ? `${names(keys)} has a checkout of ${path}, so ${path} stays. The card's work there would be left out of its changes.` : `${names(keys)} have a checkout of ${path}, so ${path} stays. Their work there would be left out of their changes.`;
|
|
217
|
+
}
|
|
218
|
+
function runningOn(db, path) {
|
|
219
|
+
const keys = db.prepare("SELECT key FROM cards WHERE state IN ('queued', 'running') ORDER BY key").all().map((row) => row.key).filter((key) => cardRepos(db, key)?.repos.includes(path) ?? true);
|
|
220
|
+
if (keys.length === 0) return null;
|
|
221
|
+
return `${names(keys)} ${keys.length === 1 ? "is" : "are"} running on ${path} now, so ${path} stays until ${keys.length === 1 ? "that run ends" : "those runs end"}.`;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* The check pass of Remove: every check the delete pass makes, with nothing deleted, so the confirm
|
|
225
|
+
* shows what it found before it asks for the name. It reads git and the database and changes nothing.
|
|
226
|
+
*/
|
|
227
|
+
async function removeChecks(db, path, env = process.env) {
|
|
228
|
+
const project = getSetting(db, "projectPath");
|
|
229
|
+
if (project === null) return {
|
|
230
|
+
passed: [],
|
|
231
|
+
failed: [NO_PROJECT]
|
|
232
|
+
};
|
|
233
|
+
const { passed, failed } = await check(db, project, path, env);
|
|
234
|
+
return {
|
|
235
|
+
passed,
|
|
236
|
+
failed
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* The delete pass: removes one repository once the checks hold and the typed name matches it, or
|
|
241
|
+
* answers why it stays.
|
|
242
|
+
*
|
|
243
|
+
* The checks run again here and the typed name is checked here, not only on the page, because the
|
|
244
|
+
* page may be old and a post can come from anywhere.
|
|
245
|
+
*/
|
|
246
|
+
async function removeRepository(db, path, typed, env = process.env) {
|
|
247
|
+
const project = getSetting(db, "projectPath");
|
|
248
|
+
if (project === null) return stays(NO_PROJECT);
|
|
249
|
+
return inTurn(project, () => remove(db, project, path, typed, env));
|
|
250
|
+
}
|
|
251
|
+
async function check(db, project, path, env) {
|
|
252
|
+
const stop = (why) => ({
|
|
253
|
+
passed: [],
|
|
254
|
+
failed: [why],
|
|
255
|
+
plan: null
|
|
256
|
+
});
|
|
257
|
+
const refused = listRefusal(db, path);
|
|
258
|
+
if (refused !== null) return stop(refused);
|
|
259
|
+
if (!isFolderName(path)) return stop(`${JSON.stringify(path)} is not one folder name.`);
|
|
260
|
+
const at = join(project, path);
|
|
261
|
+
let stat = null;
|
|
262
|
+
try {
|
|
263
|
+
stat = lstatSync(at);
|
|
264
|
+
} catch {}
|
|
265
|
+
const root = (args) => git(args, {
|
|
266
|
+
cwd: project,
|
|
267
|
+
env: gitEnv(env)
|
|
268
|
+
});
|
|
269
|
+
const prefix = stat === null ? null : await root(["rev-parse", "--show-prefix"]);
|
|
270
|
+
const submodule = prefix !== null && prefix.code === 0 && prefix.stdout.trim() === "" && (await root([
|
|
271
|
+
"ls-files",
|
|
272
|
+
"--stage",
|
|
273
|
+
"--",
|
|
274
|
+
`:(literal)${path}`
|
|
275
|
+
])).stdout.startsWith("160000 ");
|
|
276
|
+
let work = {
|
|
277
|
+
checkouts: null,
|
|
278
|
+
work: null,
|
|
279
|
+
commits: null,
|
|
280
|
+
inner: null
|
|
281
|
+
};
|
|
282
|
+
const filled = stat !== null && stat.isDirectory() && !stat.isSymbolicLink() && (!submodule || readdirSync(at).length > 0);
|
|
283
|
+
if (stat !== null) {
|
|
284
|
+
if (stat.isSymbolicLink()) return stop(`The folder ${path} is a link, so Nolzu leaves it and what it points at alone.`);
|
|
285
|
+
if (!stat.isDirectory()) return stop(`${path} in the project folder is not a folder.`);
|
|
286
|
+
if (!realpathSync(at).startsWith(realpathSync(project) + sep)) return stop(`The folder ${path} is outside the project folder.`);
|
|
287
|
+
if (submodule) {
|
|
288
|
+
const edits = await root([
|
|
289
|
+
"status",
|
|
290
|
+
"--porcelain",
|
|
291
|
+
"--",
|
|
292
|
+
".gitmodules"
|
|
293
|
+
]);
|
|
294
|
+
if (edits.code !== 0 || edits.stdout.trim() !== "") return stop(`.gitmodules has changes of yours that are not committed, so ${path} stays. Commit them first.`);
|
|
295
|
+
}
|
|
296
|
+
if (filled) {
|
|
297
|
+
work = await workLeft(at, path, env);
|
|
298
|
+
if ("other" in work) return stop(work.other);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
const lines = [
|
|
302
|
+
{
|
|
303
|
+
ok: REMOVE_CHECKS.checkouts,
|
|
304
|
+
found: heldBy(db, project, path) ?? work.checkouts
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
ok: null,
|
|
308
|
+
found: runningOn(db, path)
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
ok: REMOVE_CHECKS.work,
|
|
312
|
+
found: work.work
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
ok: REMOVE_CHECKS.commits,
|
|
316
|
+
found: work.commits
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
ok: null,
|
|
320
|
+
found: work.inner
|
|
321
|
+
}
|
|
322
|
+
];
|
|
323
|
+
const passed = lines.flatMap((line) => line.found === null && line.ok !== null ? [line.ok] : []);
|
|
324
|
+
const failed = lines.flatMap((line) => line.found === null ? [] : [line.found]);
|
|
325
|
+
let gitDir = null;
|
|
326
|
+
if (failed.length === 0 && submodule && filled) {
|
|
327
|
+
const found = await submoduleGitDir(project, at, path, env);
|
|
328
|
+
if ("why" in found) failed.push(found.why);
|
|
329
|
+
else gitDir = found.dir;
|
|
330
|
+
}
|
|
331
|
+
return {
|
|
332
|
+
passed,
|
|
333
|
+
failed,
|
|
334
|
+
plan: failed.length === 0 ? {
|
|
335
|
+
at,
|
|
336
|
+
stat,
|
|
337
|
+
submodule,
|
|
338
|
+
gitDir
|
|
339
|
+
} : null
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
async function remove(db, project, path, typed, env) {
|
|
343
|
+
const checked = await check(db, project, path, env);
|
|
344
|
+
if (checked.plan === null) return stays(checked.failed.join(" "));
|
|
345
|
+
if (typed !== path) return stays(`To remove ${path}, type its folder name ${path} exactly.`);
|
|
346
|
+
const { at, stat, submodule, gitDir } = checked.plan;
|
|
347
|
+
const forget = await forgetInRoot(project, path, env);
|
|
348
|
+
if ("problem" in forget) return stays(forget.problem);
|
|
349
|
+
if (submodule && stat !== null) {
|
|
350
|
+
const failed = await dropSubmodule(project, path, gitDir, env);
|
|
351
|
+
if (failed !== null) return { problem: failed };
|
|
352
|
+
} else if (stat !== null) try {
|
|
353
|
+
rmSync(at, { recursive: true });
|
|
354
|
+
} catch (error) {
|
|
355
|
+
return { problem: `Nolzu could not remove the folder ${path}, and part of it may be gone. ${error.message}` };
|
|
356
|
+
}
|
|
357
|
+
const notes = [];
|
|
358
|
+
const records = await forget.finish();
|
|
359
|
+
if (records !== null) notes.push(records);
|
|
360
|
+
const listed = removeProjectRepo(db, path);
|
|
361
|
+
if (listed !== null) return { problem: [`The folder ${path} is gone, but the list kept it. ${listed}`, ...notes].join(" ") };
|
|
362
|
+
return { said: [`Removed ${path}. Its knowledge file ${repoKnowledgePath(path)} stays.`, ...notes].join(" ") };
|
|
363
|
+
}
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region src/lib/projects.ts
|
|
366
|
+
var HOSTS = {
|
|
367
|
+
"github.com": "GitHub",
|
|
368
|
+
"gitlab.com": "GitLab"
|
|
369
|
+
};
|
|
370
|
+
/**
|
|
371
|
+
* What the typed confirm says before a repository goes: what is deleted, what the check pass found,
|
|
372
|
+
* and what stays.
|
|
373
|
+
*
|
|
374
|
+
* `gone` is what the check pass found that keeps the repository (a checkout, a running card, work or
|
|
375
|
+
* commits on no remote), for the red box. Remove stays off while it holds a line. `checked` is the
|
|
376
|
+
* lines that hold, which the confirm ticks.
|
|
377
|
+
*/
|
|
378
|
+
function removeConfirm(repo, facts, gone = [], checked = []) {
|
|
379
|
+
const remote = facts.remote === null ? "" : ` ${HOSTS[facts.remote.host] ?? facts.remote.host} keeps ${facts.remote.path}, so you can add it again later.`;
|
|
380
|
+
return {
|
|
381
|
+
title: `Remove repository ${repo}`,
|
|
382
|
+
sub: `${facts.project === null ? "" : `From the project ${facts.project}. `}This cannot be undone.`,
|
|
383
|
+
lost: [{
|
|
384
|
+
text: `Deletes the folder ${facts.folder}.`,
|
|
385
|
+
code: facts.folder
|
|
386
|
+
}, ...facts.records ? [{
|
|
387
|
+
text: `Takes ${repo} out of .gitignore and .nolzu/repositories.json, and commits that.`,
|
|
388
|
+
code: [".gitignore", ".nolzu/repositories.json"]
|
|
389
|
+
}] : []],
|
|
390
|
+
checked: [...checked],
|
|
391
|
+
gone: [...gone],
|
|
392
|
+
kept: {
|
|
393
|
+
text: `Its knowledge file ${repoKnowledgePath(repo)} stays.${remote}`,
|
|
394
|
+
code: repoKnowledgePath(repo)
|
|
395
|
+
},
|
|
396
|
+
action: `Remove ${repo}`
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
async function originOf(folder) {
|
|
400
|
+
try {
|
|
401
|
+
if (!existsSync(join(folder, ".git"))) return null;
|
|
402
|
+
const found = await git([
|
|
403
|
+
"remote",
|
|
404
|
+
"get-url",
|
|
405
|
+
"origin"
|
|
406
|
+
], {
|
|
407
|
+
cwd: folder,
|
|
408
|
+
env: gitEnv(process.env)
|
|
409
|
+
});
|
|
410
|
+
const place = found.code === 0 ? parseRemoteUrl(found.stdout.trim()) : null;
|
|
411
|
+
return place === null ? null : {
|
|
412
|
+
host: place.host,
|
|
413
|
+
path: `${place.owner}/${place.repo}`
|
|
414
|
+
};
|
|
415
|
+
} catch {
|
|
416
|
+
return null;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
async function remoteBranches(folder) {
|
|
420
|
+
try {
|
|
421
|
+
const run = (args) => git(args, {
|
|
422
|
+
cwd: folder,
|
|
423
|
+
env: gitEnv(process.env)
|
|
424
|
+
});
|
|
425
|
+
const top = await run(["rev-parse", "--show-toplevel"]);
|
|
426
|
+
if (top.code !== 0 || realpathSync(top.stdout.trim()) !== realpathSync(folder)) return [];
|
|
427
|
+
const found = await run([
|
|
428
|
+
"for-each-ref",
|
|
429
|
+
"--format=%(refname:lstrip=3)",
|
|
430
|
+
"refs/remotes/origin"
|
|
431
|
+
]);
|
|
432
|
+
return found.code === 0 ? found.stdout.split("\n").filter((name) => name !== "" && name !== "HEAD") : [];
|
|
433
|
+
} catch {
|
|
434
|
+
return [];
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
async function fewAtATime(items, work, size = 4) {
|
|
438
|
+
const done = [];
|
|
439
|
+
let next = 0;
|
|
440
|
+
const lane = async () => {
|
|
441
|
+
while (next < items.length) {
|
|
442
|
+
const at = next++;
|
|
443
|
+
done[at] = await work(items[at]);
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
await Promise.all(Array.from({ length: Math.min(size, items.length) }, lane));
|
|
447
|
+
return done;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* The branches origin has for each base branch select, by repository path, and by `.` for the one
|
|
451
|
+
* field of a project of one repository. Apart from `projectRow`, so the page streams it and draws
|
|
452
|
+
* before git answers. Empty with no origin or no folder.
|
|
453
|
+
*/
|
|
454
|
+
async function projectBranches(db) {
|
|
455
|
+
const path = getSetting(db, "projectPath");
|
|
456
|
+
if (path === null) return {};
|
|
457
|
+
if (getSetting(db, "repos") === null) return { ".": await remoteBranches(path) };
|
|
458
|
+
return Object.fromEntries(await fewAtATime(listedRepos(db), async (repo) => [repo.path, await remoteBranches(join(path, repo.path))]));
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* The repositories found on this machine that Settings, Project offers to add. Add clones from the
|
|
462
|
+
* remote, so a folder with none is left out, and so are the project itself and a repository the table
|
|
463
|
+
* lists already.
|
|
464
|
+
*/
|
|
465
|
+
function foundToAdd(row, found) {
|
|
466
|
+
const listed = new Set(row.table.map((repo) => repo.remote));
|
|
467
|
+
return found.flatMap((repo) => {
|
|
468
|
+
if (repo.url === null) return [];
|
|
469
|
+
if (row.path !== null && (repo.path === row.path || repo.path.startsWith(`${row.path}/`))) return [];
|
|
470
|
+
const place = parseRemoteUrl(repo.url);
|
|
471
|
+
if (place !== null && listed.has(`${place.host}/${place.owner}/${place.repo}`)) return [];
|
|
472
|
+
return [{
|
|
473
|
+
path: repo.path,
|
|
474
|
+
url: repo.url
|
|
475
|
+
}];
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
var shownRemote = (remote) => remote === null ? null : `${remote.host}/${remote.path}`;
|
|
479
|
+
/**
|
|
480
|
+
* The repositories table, and the confirm of the one Remove `only` names.
|
|
481
|
+
*
|
|
482
|
+
* A folder on disk is asked for its origin, and a missing one shows the URL the manifest names.
|
|
483
|
+
*/
|
|
484
|
+
async function repositories(db, path, records, only) {
|
|
485
|
+
if (path === null || getSetting(db, "repos") === null) return {
|
|
486
|
+
table: [],
|
|
487
|
+
removes: {}
|
|
488
|
+
};
|
|
489
|
+
const project = projectName(db);
|
|
490
|
+
const listed = listedRepos(db);
|
|
491
|
+
const { missing } = manifestState(db);
|
|
492
|
+
const manifest = readManifest(path).repos;
|
|
493
|
+
const removable = (repo) => repo !== "." && (getSetting(db, "workspace") === true || listed.length > 1);
|
|
494
|
+
const rows = await fewAtATime(listed, async (repo) => {
|
|
495
|
+
const folder = join(path, repo.path);
|
|
496
|
+
const remote = existsSync(folder) ? await originOf(folder) : null;
|
|
497
|
+
const named = manifest.find((one) => one.folder === repo.path);
|
|
498
|
+
const place = remote ?? (named === void 0 ? null : manifestPlace(named.url));
|
|
499
|
+
const row = {
|
|
500
|
+
path: repo.path,
|
|
501
|
+
remote: shownRemote(place),
|
|
502
|
+
base: repo.base,
|
|
503
|
+
onDisk: existsSync(folder),
|
|
504
|
+
clone: missing.includes(repo.path),
|
|
505
|
+
remove: removable(repo.path)
|
|
506
|
+
};
|
|
507
|
+
if (!row.remove || only === void 0 || repo.path !== only) return {
|
|
508
|
+
row,
|
|
509
|
+
confirm: null
|
|
510
|
+
};
|
|
511
|
+
const found = await removeChecks(db, repo.path);
|
|
512
|
+
return {
|
|
513
|
+
row,
|
|
514
|
+
confirm: removeConfirm(repo.path, {
|
|
515
|
+
project,
|
|
516
|
+
folder: homePath(folder, homedir()),
|
|
517
|
+
remote: place,
|
|
518
|
+
records
|
|
519
|
+
}, found.failed, found.passed)
|
|
520
|
+
};
|
|
521
|
+
});
|
|
522
|
+
const unlisted = manifest.filter((one) => missing.includes(one.folder) && !listed.some((repo) => repo.path === one.folder)).map((one) => ({
|
|
523
|
+
path: one.folder,
|
|
524
|
+
remote: shownRemote(manifestPlace(one.url)),
|
|
525
|
+
base: one.base,
|
|
526
|
+
onDisk: false,
|
|
527
|
+
clone: true,
|
|
528
|
+
remove: false
|
|
529
|
+
}));
|
|
530
|
+
return {
|
|
531
|
+
table: [...rows.map((one) => one.row), ...unlisted],
|
|
532
|
+
removes: Object.fromEntries(rows.flatMap((one) => one.confirm === null ? [] : [[one.row.path, one.confirm]]))
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
var commitsRecords = (db) => getSetting(db, "workspace") === true || (getSetting(db, "repos") ?? []).some((repo) => repo.path === ".");
|
|
536
|
+
/**
|
|
537
|
+
* The rows of the repositories table: the listed repositories, then each folder the manifest names
|
|
538
|
+
* that is on no list and not on disk. Empty for a project of one repository. One git call per
|
|
539
|
+
* repository, so Settings, Project streams it and draws the page first.
|
|
540
|
+
*/
|
|
541
|
+
async function repoTable(db) {
|
|
542
|
+
return (await repositories(db, getSetting(db, "projectPath"), commitsRecords(db))).table;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* The confirm of one Remove with its checks run, which the dialog asks for as it opens (T13): a
|
|
546
|
+
* commit made after the page loaded counts. Null for a repository the table has no Remove for.
|
|
547
|
+
*/
|
|
548
|
+
async function removeConfirmNow(db, repo) {
|
|
549
|
+
return (await repositories(db, getSetting(db, "projectPath"), commitsRecords(db), repo)).removes[repo] ?? null;
|
|
550
|
+
}
|
|
551
|
+
function manifestPlace(url) {
|
|
552
|
+
const place = parseRemoteUrl(url);
|
|
553
|
+
return place === null ? null : {
|
|
554
|
+
host: place.host,
|
|
555
|
+
path: `${place.owner}/${place.repo}`
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* When something last happened on this machine: a card move or a run.
|
|
560
|
+
*
|
|
561
|
+
* Both columns hold the same ISO shape in UTC, so the later text is the later moment and no date is
|
|
562
|
+
* parsed here. A queued run that never started counts for nothing, the way the cost report drops it,
|
|
563
|
+
* because it happened on no day yet.
|
|
564
|
+
*/
|
|
565
|
+
function lastActivity(db) {
|
|
566
|
+
const times = [...allCardMoves(db).map((move) => move.at), ...allRuns(db).flatMap((run) => {
|
|
567
|
+
const at = run.endedAt ?? run.startedAt;
|
|
568
|
+
return at === null ? [] : [at];
|
|
569
|
+
})];
|
|
570
|
+
return times.length === 0 ? null : times.reduce((newest, at) => at > newest ? at : newest);
|
|
571
|
+
}
|
|
572
|
+
function closedCheckouts(db, path) {
|
|
573
|
+
if (path === null) return 0;
|
|
574
|
+
getSetting(db, "deliveryFlow");
|
|
575
|
+
return db.prepare("SELECT key, board, stage FROM cards").all().filter((row) => isClosed(row.board, row.stage) && existsSync(checkoutRoot(path, row.key))).length;
|
|
576
|
+
}
|
|
577
|
+
function exampleBranch(template, key) {
|
|
578
|
+
try {
|
|
579
|
+
return branchName(template, key, "Add a search box to the recipe list", {
|
|
580
|
+
type: "feature",
|
|
581
|
+
desc: "search-box"
|
|
582
|
+
});
|
|
583
|
+
} catch {
|
|
584
|
+
return null;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
function openerWords(platform = process.platform, env = process.env) {
|
|
588
|
+
if (browserCommand(platform, env) === null) return null;
|
|
589
|
+
return platform === "darwin" ? "Open in Finder" : "Open the folder";
|
|
590
|
+
}
|
|
591
|
+
var launch = (command, args) => spawn(command, args, {
|
|
592
|
+
stdio: "ignore",
|
|
593
|
+
detached: true
|
|
594
|
+
}).on("error", () => {}).unref();
|
|
595
|
+
/**
|
|
596
|
+
* Shows the project folder in the file manager, or answers why not. Only the stored folder: the post
|
|
597
|
+
* names no path, so a page cannot have Nolzu open anything else.
|
|
598
|
+
*/
|
|
599
|
+
function revealProject(db, run = launch, platform = process.platform, env = process.env) {
|
|
600
|
+
const path = getSetting(db, "projectPath");
|
|
601
|
+
if (path === null) return "There is no project set, so there is no folder to show.";
|
|
602
|
+
const opener = browserCommand(platform, env);
|
|
603
|
+
if (opener === null) return "This machine has no file manager Nolzu can open. The path is in the Location box.";
|
|
604
|
+
if (!existsSync(path)) return `The folder ${path} is not there any more.`;
|
|
605
|
+
run(opener.command, [...opener.args, path]);
|
|
606
|
+
return null;
|
|
607
|
+
}
|
|
608
|
+
/** The single row the page draws. */
|
|
609
|
+
async function projectRow(db) {
|
|
610
|
+
const path = getSetting(db, "projectPath");
|
|
611
|
+
const records = commitsRecords(db);
|
|
612
|
+
const folder = resolveKnowledgeDir({
|
|
613
|
+
knowledgeDir: getSetting(db, "knowledgeDir"),
|
|
614
|
+
projectPath: path
|
|
615
|
+
});
|
|
616
|
+
const off = getSetting(db, "offBoards");
|
|
617
|
+
const prefix = getSetting(db, "localKeyPrefix");
|
|
618
|
+
const nextKey = peekLocalKey(db, 1, prefix).key;
|
|
619
|
+
const clash = getSetting(db, "jiraKeyClash");
|
|
620
|
+
return {
|
|
621
|
+
name: projectName(db),
|
|
622
|
+
path: path === null ? null : homePath(path, homedir()),
|
|
623
|
+
opener: openerWords(),
|
|
624
|
+
ticketSystem: getSetting(db, "ticketSystem"),
|
|
625
|
+
jira: {
|
|
626
|
+
site: getSetting(db, "jiraSite"),
|
|
627
|
+
email: getSetting(db, "jiraEmail")
|
|
628
|
+
},
|
|
629
|
+
keyClash: clash !== null && clash.prefix === prefix && clash.site === getSetting(db, "jiraSite") ? clash : null,
|
|
630
|
+
baseBranch: getSetting(db, "baseBranch"),
|
|
631
|
+
repos: getSetting(db, "repos") === null ? null : listedRepos(db),
|
|
632
|
+
...manifestState(db),
|
|
633
|
+
rootRecords: records,
|
|
634
|
+
workspace: getSetting(db, "workspace") === true,
|
|
635
|
+
branchTemplate: getSetting(db, "branchTemplate"),
|
|
636
|
+
branchExample: exampleBranch(getSetting(db, "branchTemplate"), nextKey),
|
|
637
|
+
boards: choicesOf(BOARD_KINDS.filter((kind) => kind !== "delivery")).map((kind) => ({
|
|
638
|
+
kind,
|
|
639
|
+
label: choiceLabel(kind),
|
|
640
|
+
on: choicesOf(BOARD_KINDS.filter((one) => !off.includes(one))).includes(kind)
|
|
641
|
+
})),
|
|
642
|
+
deliveryFlow: getSetting(db, "deliveryFlow"),
|
|
643
|
+
localKeyPrefix: prefix,
|
|
644
|
+
nextKey,
|
|
645
|
+
apps: appRows(db),
|
|
646
|
+
browser: {
|
|
647
|
+
servers: qaServers(getSetting(db, "projectPath")),
|
|
648
|
+
on: qaHasBrowser(db),
|
|
649
|
+
problem: null,
|
|
650
|
+
chrome: chromeFound(process.platform, existsSync)
|
|
651
|
+
},
|
|
652
|
+
knowledgeDir: getSetting(db, "knowledgeDir"),
|
|
653
|
+
knowledgeFolder: folder === null ? null : homePath(folder, homedir()),
|
|
654
|
+
allowedCommands: getSetting(db, "allowedCommands") ?? [],
|
|
655
|
+
commandsConfirmed: getSetting(db, "setupSteps")?.commands === "done",
|
|
656
|
+
walls: { lists: getSetting(db, "wallLists") },
|
|
657
|
+
closedCheckouts: closedCheckouts(db, path),
|
|
658
|
+
convert: path === null || getSetting(db, "repos") !== null ? null : {
|
|
659
|
+
folder: basename(path),
|
|
660
|
+
commands: Object.values(getSetting(db, "qaApp") ?? {}).flatMap((app) => app.mode === "own" ? [
|
|
661
|
+
app.start,
|
|
662
|
+
app.stop,
|
|
663
|
+
app.status
|
|
664
|
+
].filter((one) => one !== null) : [])
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* What the manifest asks for that the disk has not got, read on each page load, because a teammate's
|
|
670
|
+
* pull can bring new entries at any time.
|
|
671
|
+
*/
|
|
672
|
+
function manifestState(db) {
|
|
673
|
+
const path = getSetting(db, "projectPath");
|
|
674
|
+
if (path === null || getSetting(db, "repos") === null) return {
|
|
675
|
+
missing: [],
|
|
676
|
+
manifestProblems: []
|
|
677
|
+
};
|
|
678
|
+
const read = readManifest(path);
|
|
679
|
+
return {
|
|
680
|
+
missing: read.repos.filter((repo) => !existsSync(join(path, repo.folder))).map((repo) => repo.folder),
|
|
681
|
+
manifestProblems: read.problems
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* One field of the project form, or the sentence it was refused with.
|
|
686
|
+
*
|
|
687
|
+
* Empty means the default knowledge folder: a person clearing a box is taking the answer back. Every field is checked by the rule its setting has, in
|
|
688
|
+
* the same words.
|
|
689
|
+
*/
|
|
690
|
+
async function saveProjectField(db, field, value) {
|
|
691
|
+
const typed = value.trim();
|
|
692
|
+
if (field === "localKeyPrefix") return storeTickets(db, typed);
|
|
693
|
+
if (field === "branchTemplate") {
|
|
694
|
+
try {
|
|
695
|
+
branchName(typed, "APP-1", "Add a search box");
|
|
696
|
+
} catch (error) {
|
|
697
|
+
return error.message;
|
|
698
|
+
}
|
|
699
|
+
return storeSetting(db, "branchTemplate", typed);
|
|
700
|
+
}
|
|
701
|
+
if (field === "baseBranch") {
|
|
702
|
+
if (getSetting(db, "repos") !== null) return "This project has a base branch for each repository. Change them in the repository table.";
|
|
703
|
+
if (typed === "") return storeSetting(db, "baseBranch", typed);
|
|
704
|
+
const project = getSetting(db, "projectPath");
|
|
705
|
+
if (project === null) return "There is no project set, so there is no branch to check.";
|
|
706
|
+
return await trackBaseBranch(project, typed) ?? storeSetting(db, "baseBranch", typed);
|
|
707
|
+
}
|
|
708
|
+
if (field.startsWith("repoBase:")) return saveRepoBase(db, field.slice(REPO_BASE.length), typed);
|
|
709
|
+
if (field.startsWith(BOARD)) return switchBoard(db, field.slice(BOARD.length), typed);
|
|
710
|
+
if (field === "knowledgeDir") {
|
|
711
|
+
if (typed === "") return storeSetting(db, "knowledgeDir", null);
|
|
712
|
+
const run = (args) => git(args, {
|
|
713
|
+
cwd: typed,
|
|
714
|
+
env: gitEnv(process.env)
|
|
715
|
+
});
|
|
716
|
+
const repos = projectRepos({
|
|
717
|
+
repos: getSetting(db, "repos"),
|
|
718
|
+
baseBranch: getSetting(db, "baseBranch")
|
|
719
|
+
}).map((repo) => repo.path);
|
|
720
|
+
const check = await checkKnowledgeDir(typed, {
|
|
721
|
+
projectPath: getSetting(db, "projectPath"),
|
|
722
|
+
run,
|
|
723
|
+
repos
|
|
724
|
+
});
|
|
725
|
+
return check.ok ? storeSetting(db, "knowledgeDir", typed) : check.reason ?? `The knowledge folder ${typed} cannot be used.`;
|
|
726
|
+
}
|
|
727
|
+
if (field === "allowedCommands") {
|
|
728
|
+
const parsed = parseAllowedCommands(value);
|
|
729
|
+
return parsed.ok ? storeSetting(db, "allowedCommands", parsed.value) : parsed.message;
|
|
730
|
+
}
|
|
731
|
+
const commands = getSetting(db, "allowedCommands") ?? [];
|
|
732
|
+
if (field === "addCommand") {
|
|
733
|
+
if (typed === "") return "Type the command to add, such as npm test.";
|
|
734
|
+
if (commands.includes(typed)) return `${typed} is in the list already.`;
|
|
735
|
+
return allowedCommandProblem(typed) ?? storeSetting(db, "allowedCommands", [...commands, typed]);
|
|
736
|
+
}
|
|
737
|
+
if (field === "removeCommand") return storeSetting(db, "allowedCommands", commands.filter((command) => command !== value));
|
|
738
|
+
if (field.startsWith("addWall:") || field.startsWith("removeWall:")) return saveWallEntry(db, field, typed);
|
|
739
|
+
return `There is no setting ${field} on this screen.`;
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* The commands picked from Propose again, added after the person's own, or the sentence the first
|
|
743
|
+
* refused one gets. It only adds: a command already in the list stays where it is, and none is taken out.
|
|
744
|
+
*/
|
|
745
|
+
function addCommands(db, picked) {
|
|
746
|
+
const commands = getSetting(db, "allowedCommands") ?? [];
|
|
747
|
+
const typed = [...new Set(picked.map((command) => command.trim()))].filter((command) => command !== "" && !commands.includes(command));
|
|
748
|
+
if (picked.length === 0) return "Tick the commands to add first.";
|
|
749
|
+
for (const command of typed) {
|
|
750
|
+
const problem = allowedCommandProblem(command);
|
|
751
|
+
if (problem !== null) return problem;
|
|
752
|
+
}
|
|
753
|
+
return storeSetting(db, "allowedCommands", [...commands, ...typed]);
|
|
754
|
+
}
|
|
755
|
+
var ADD_WALL = "addWall:";
|
|
756
|
+
var REMOVE_WALL = "removeWall:";
|
|
757
|
+
var WALL_LISTS = [
|
|
758
|
+
"hidden",
|
|
759
|
+
"exceptions",
|
|
760
|
+
"writable"
|
|
761
|
+
];
|
|
762
|
+
/**
|
|
763
|
+
* The places a wall entry is checked against on save. The spawn checks again with the run's own
|
|
764
|
+
* card folder and checkout, so an entry saved here and refused there is left out of that run.
|
|
765
|
+
*/
|
|
766
|
+
function wallPlaces(db, project) {
|
|
767
|
+
const knowledge = resolveKnowledgeDir({
|
|
768
|
+
knowledgeDir: getSetting(db, "knowledgeDir"),
|
|
769
|
+
projectPath: project
|
|
770
|
+
});
|
|
771
|
+
const dataDir = resolveDataDir(process.env);
|
|
772
|
+
return {
|
|
773
|
+
home: homedir(),
|
|
774
|
+
project,
|
|
775
|
+
gitDir: gitCommonDir(project) ?? join(project, ".git"),
|
|
776
|
+
dataDir,
|
|
777
|
+
needed: [
|
|
778
|
+
join(project, ".tasks"),
|
|
779
|
+
worktreesFolder(project),
|
|
780
|
+
qaCopyRoot(dataDir, project),
|
|
781
|
+
tmpdir(),
|
|
782
|
+
...knowledge === null ? [] : [knowledge]
|
|
783
|
+
],
|
|
784
|
+
real: resolvedPath
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
function saveWallEntry(db, field, typed) {
|
|
788
|
+
const adding = field.startsWith(ADD_WALL);
|
|
789
|
+
const list = field.slice((adding ? ADD_WALL : REMOVE_WALL).length);
|
|
790
|
+
if (!WALL_LISTS.includes(list)) return `There is no wall list ${list}.`;
|
|
791
|
+
const lists = getSetting(db, "wallLists");
|
|
792
|
+
if (!adding) return storeSetting(db, "wallLists", {
|
|
793
|
+
...lists,
|
|
794
|
+
[list]: lists[list].filter((entry) => entry !== typed)
|
|
795
|
+
});
|
|
796
|
+
if (lists[list].includes(typed)) return `${typed} is in the list already.`;
|
|
797
|
+
const project = getSetting(db, "projectPath");
|
|
798
|
+
if (project === null) return "There is no project set, so there is no folder to check the path against.";
|
|
799
|
+
return wallEntryProblem(list, typed, wallPlaces(db, project)) ?? storeSetting(db, "wallLists", {
|
|
800
|
+
...lists,
|
|
801
|
+
[list]: [...lists[list], typed]
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
var REPO_BASE = "repoBase:";
|
|
805
|
+
var BOARD = "board:";
|
|
806
|
+
/**
|
|
807
|
+
* Turns one board on or off, or answers why not.
|
|
808
|
+
*
|
|
809
|
+
* The setting is the one write. The board's cards, runs and files stay as they are, so turning it on
|
|
810
|
+
* again shows the board as it was.
|
|
811
|
+
*/
|
|
812
|
+
function switchBoard(db, name, value) {
|
|
813
|
+
if (value !== "on" && value !== "off") return "A board is on or off.";
|
|
814
|
+
const names = name === "research" || isResearchKind(name) ? [...RESEARCH_KINDS] : [name];
|
|
815
|
+
const named = validateSetting("offBoards", names);
|
|
816
|
+
if (!named.ok) return named.message;
|
|
817
|
+
const off = getSetting(db, "offBoards").filter((kind) => !names.includes(kind));
|
|
818
|
+
return storeSetting(db, "offBoards", value === "on" ? off : [...off, ...named.value]);
|
|
819
|
+
}
|
|
820
|
+
var listedRepos = (db) => projectRepos({
|
|
821
|
+
repos: getSetting(db, "repos"),
|
|
822
|
+
baseBranch: getSetting(db, "baseBranch")
|
|
823
|
+
});
|
|
824
|
+
var repoName = (path) => path === "." ? "the project folder" : path;
|
|
825
|
+
function storeRepos(db, repos) {
|
|
826
|
+
return storeSetting(db, "repos", repos) ?? storeSetting(db, "baseBranch", repos[0]?.base ?? getSetting(db, "baseBranch"));
|
|
827
|
+
}
|
|
828
|
+
async function saveRepoBase(db, path, typed) {
|
|
829
|
+
const project = getSetting(db, "projectPath");
|
|
830
|
+
if (getSetting(db, "repos") === null || project === null) return "This project has one repository. Its base branch is the Base branch field.";
|
|
831
|
+
if (!listedRepos(db).some((repo) => repo.path === path)) return `There is no repository ${path} in this project.`;
|
|
832
|
+
if (typed === "") return "The base branch cannot be empty.";
|
|
833
|
+
const refused = await trackBaseBranch(join(project, path), typed, process.env, path) ?? storeRepos(db, listedRepos(db).map((repo) => repo.path === path ? {
|
|
834
|
+
path,
|
|
835
|
+
base: typed
|
|
836
|
+
} : repo));
|
|
837
|
+
if (refused !== null) return refused;
|
|
838
|
+
const entry = readManifest(project).repos.find((one) => one.folder === path);
|
|
839
|
+
if (entry === void 0 || entry.base === typed) return null;
|
|
840
|
+
return (await inTurn(project, () => recordInRoot(project, [{
|
|
841
|
+
...entry,
|
|
842
|
+
base: typed
|
|
843
|
+
}], getSetting(db, "workspace") === true, process.env, `chore: start ${path} from ${typed}`))).problem;
|
|
844
|
+
}
|
|
845
|
+
function cardsWithCheckout(db, project, path) {
|
|
846
|
+
return db.prepare("SELECT key FROM cards").all().map((row) => row.key).filter((key) => existsSync(path === "." ? checkoutPath(project, key) : join(checkoutPath(project, key, path), ".git")));
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Why one repository must stay on the project's list, or null when it may go.
|
|
850
|
+
*
|
|
851
|
+
* The project folder stays when it is a repository, because every card's checkout starts there. The
|
|
852
|
+
* last repository stays, because a project needs one, except in a workspace, which may be empty. A
|
|
853
|
+
* repository a card has a checkout of stays too, because a card drops a repository the project no
|
|
854
|
+
* longer lists, and its work there with it.
|
|
855
|
+
*/
|
|
856
|
+
function removeRefusal(db, path) {
|
|
857
|
+
const listed = listRefusal(db, path);
|
|
858
|
+
if (listed !== null) return listed;
|
|
859
|
+
const project = getSetting(db, "projectPath");
|
|
860
|
+
const held = project === null ? void 0 : cardsWithCheckout(db, project, path)[0];
|
|
861
|
+
if (held !== void 0) return `${held} has a checkout of ${path}, so ${path} stays. The card's work there would be left out of its changes.`;
|
|
862
|
+
return null;
|
|
863
|
+
}
|
|
864
|
+
function listRefusal(db, path) {
|
|
865
|
+
if (getSetting(db, "repos") === null) return "This project has one repository, so there is none to remove.";
|
|
866
|
+
const repos = listedRepos(db);
|
|
867
|
+
if (!repos.some((repo) => repo.path === path)) return `There is no repository ${path} in this project.`;
|
|
868
|
+
if (path === ".") return "The project folder is a repository, so it stays in the list. Every card starts in its checkout.";
|
|
869
|
+
if (repos.length === 1 && getSetting(db, "workspace") !== true) return `The repository ${path} is the last one of the project, so it stays.`;
|
|
870
|
+
return null;
|
|
871
|
+
}
|
|
872
|
+
/** Takes one repository off the project's list, or answers why it stays. The disk is not touched. */
|
|
873
|
+
function removeProjectRepo(db, path) {
|
|
874
|
+
return removeRefusal(db, path) ?? storeRepos(db, listedRepos(db).filter((repo) => repo.path !== path));
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Scans the project folder again and adds each repository the list does not have yet.
|
|
878
|
+
*
|
|
879
|
+
* A repository is only ever added here, never typed, so it is a folder the scan found with a branch
|
|
880
|
+
* to start from. A repository that is gone from the folder stays until it is removed by hand. Each
|
|
881
|
+
* one added gets its first knowledge file, the way onboarding writes them. A project of one
|
|
882
|
+
* repository has no list to add to: its cards have no list either, so a new one would stop them.
|
|
883
|
+
*/
|
|
884
|
+
async function rescanRepos(db, env = process.env) {
|
|
885
|
+
const project = getSetting(db, "projectPath");
|
|
886
|
+
if (project === null) return { problem: "There is no project set, so there is no folder to scan." };
|
|
887
|
+
if (getSetting(db, "repos") === null) return { problem: "This project has one repository, so there is no list to add to." };
|
|
888
|
+
return inTurn(project, () => rescan(db, project, env));
|
|
889
|
+
}
|
|
890
|
+
async function rescan(db, project, env) {
|
|
891
|
+
const { scan } = await checkProject({
|
|
892
|
+
path: project,
|
|
893
|
+
template: getSetting(db, "branchTemplate"),
|
|
894
|
+
env
|
|
895
|
+
});
|
|
896
|
+
if (!scan.ok) return { problem: scan.reason };
|
|
897
|
+
const listed = listedRepos(db);
|
|
898
|
+
const known = new Set(listed.map((repo) => repo.path.toLowerCase()));
|
|
899
|
+
const added = [];
|
|
900
|
+
const workspace = getSetting(db, "workspace") === true;
|
|
901
|
+
for (const repo of scan.repos.filter((one) => !known.has(one.path.toLowerCase()) && !(workspace && one.path === "."))) {
|
|
902
|
+
const found = await scannedBase(project, repo, env, "scan again");
|
|
903
|
+
if ("reason" in found) return { problem: found.reason };
|
|
904
|
+
const held = repo.path === "." ? cardsWithCheckout(db, project, ".")[0] : void 0;
|
|
905
|
+
if (held !== void 0) return { problem: `The project folder is a repository now, and its checkout would be each card's root. ${held} has a checkout already, so nothing was added.` };
|
|
906
|
+
added.push({
|
|
907
|
+
path: repo.path,
|
|
908
|
+
base: found.base
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
if (added.length === 0) return { said: "Every repository the scan found is in the list already." };
|
|
912
|
+
const refused = addToList(db, added);
|
|
913
|
+
if (refused !== null) return { problem: refused };
|
|
914
|
+
const notes = [];
|
|
915
|
+
if (workspace) {
|
|
916
|
+
const clones = await Promise.all(added.map(async (repo) => ({
|
|
917
|
+
folder: repo.path,
|
|
918
|
+
url: await cloneableOrigin(join(project, repo.path), repo.path, env),
|
|
919
|
+
base: repo.base
|
|
920
|
+
})));
|
|
921
|
+
const unlisted = clones.filter((clone) => clone.url === null).map((clone) => clone.folder);
|
|
922
|
+
if (unlisted.length > 0) notes.push(`${MANIFEST} does not list ${unlisted.join(", ")}, because there is no origin URL Nolzu can clone from.`);
|
|
923
|
+
const recorded = await recordInRoot(project, clones, true, env);
|
|
924
|
+
if (recorded.problem !== null) notes.push(recorded.problem);
|
|
925
|
+
if (!recorded.recorded && recorded.problem !== null) {
|
|
926
|
+
const ignored = await recordInRoot(project, clones.map((clone) => ({
|
|
927
|
+
...clone,
|
|
928
|
+
url: null
|
|
929
|
+
})), true, env);
|
|
930
|
+
if (ignored.problem !== null && ignored.problem !== recorded.problem) notes.push(ignored.problem);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
const knowledge = await writeRepoKnowledge(db, added, env);
|
|
934
|
+
const files = knowledge.written.length === 0 ? "" : ` Wrote ${knowledge.written.join(", ")} in the knowledge folder.`;
|
|
935
|
+
if (knowledge.problem !== null) notes.push(knowledge.problem);
|
|
936
|
+
return { said: [`Added ${added.map((repo) => repoName(repo.path)).join(", ")}.${files}`, ...notes].join(" ") };
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Puts repositories on the project's list, after the ones there, or answers why the list refused.
|
|
940
|
+
*
|
|
941
|
+
* Read again here, after git ran, so a change made meanwhile is kept. The project folder comes
|
|
942
|
+
* first, because the other checkouts are made inside its own.
|
|
943
|
+
*/
|
|
944
|
+
function addToList(db, added) {
|
|
945
|
+
const now = listedRepos(db);
|
|
946
|
+
const fresh = added.filter((repo) => !now.some((one) => one.path.toLowerCase() === repo.path.toLowerCase()));
|
|
947
|
+
return storeRepos(db, [...now, ...fresh].sort((a, b) => Number(b.path === ".") - Number(a.path === ".")));
|
|
948
|
+
}
|
|
949
|
+
async function cloneableOrigin(at, folder, env) {
|
|
950
|
+
const found = await git([
|
|
951
|
+
"remote",
|
|
952
|
+
"get-url",
|
|
953
|
+
"origin"
|
|
954
|
+
], {
|
|
955
|
+
cwd: at,
|
|
956
|
+
env: gitEnv(env)
|
|
957
|
+
});
|
|
958
|
+
const url = found.code === 0 ? found.stdout.trim() : "";
|
|
959
|
+
const target = cloneTarget(url);
|
|
960
|
+
return target.ok && target.name === folder ? url : null;
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* What `/api/projects` answers, the shape the paid projects panel reads.
|
|
964
|
+
*
|
|
965
|
+
* This machine's own project, marked current, and after it every other project of the account once
|
|
966
|
+
* the personal hub has listed them on a `project.list` job. A free machine has no hub socket, so it
|
|
967
|
+
* gets this machine's project alone. Its own row comes from its own database and is found in the list
|
|
968
|
+
* by the id it minted, because the name and the last activity here are newer than the hub's copy.
|
|
969
|
+
* Every other row is only "not current": the client cannot tell which machine holds it, or whether
|
|
970
|
+
* any machine still does.
|
|
971
|
+
*/
|
|
972
|
+
function projectList(db) {
|
|
973
|
+
const name = projectName(db);
|
|
974
|
+
if (name === null) return { projects: [] };
|
|
975
|
+
const here = getSetting(db, "projectId");
|
|
976
|
+
const others = (getSetting(db, "accountProjects") ?? []).filter((one) => one.id !== here);
|
|
977
|
+
return { projects: [{
|
|
978
|
+
name,
|
|
979
|
+
lastActivity: lastActivity(db),
|
|
980
|
+
current: true
|
|
981
|
+
}, ...others.map((one) => ({
|
|
982
|
+
name: one.name,
|
|
983
|
+
lastActivity: one.lastActivity,
|
|
984
|
+
current: false
|
|
985
|
+
}))] };
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
export { REPO_BASE as R, addToList as a, cloneableOrigin as b, cardsWithCheckout as c, remoteBranches as d, revealProject as e, rescanRepos as f, addCommands as g, repoTable as h, foundToAdd as i, projectBranches as j, projectList as k, listedRepos as l, manifestState as m, removeConfirmNow as n, projectRow as p, removeRepository as r, saveProjectField as s };
|
|
989
|
+
//# sourceMappingURL=projects.js-bw2V11od.js.map
|