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,498 @@
|
|
|
1
|
+
import { h as isCardSize, k as keyPrefixFor, i as isBoardKind, g as BOARD_KINDS } from './board.js-BxL3CjB1.js';
|
|
2
|
+
import { e as projectRepos, h as boardFor, a5 as nextStage } from './estimate.js-BHTYVTaQ.js';
|
|
3
|
+
import { g as getSetting, r as resolveDataDir, G as peekLocalKey, a5 as createLocalTicket, a6 as createCard, a7 as setCardRepos, n as setExtraContext, a8 as linkCards } from './node.js-Bz2jT5wt.js';
|
|
4
|
+
import { w as parseTicketRef, x as ticketLink } from './src.js-Cm8RAH_q.js';
|
|
5
|
+
import './src2.js-CV8tsClO.js';
|
|
6
|
+
import { g as git, a as gitEnv, r as repoFolder, aj as parseRemote, Q as createKeychain, R as runKeychain, ak as ghRunner, al as issueKey, am as getPull, an as writeCardFile, ao as FROM_EPIC_FILE, ap as githubIssues } from './src3.js-h9tTEbVb.js';
|
|
7
|
+
import { c as cardFolder } from './files.js-V46lE0-6.js';
|
|
8
|
+
import { C as CONTEXT_LIMIT } from './overview.js-C32iHkXD.js';
|
|
9
|
+
import { j as jiraReader } from './ticket-system.js-Dj9R3XJw.js';
|
|
10
|
+
|
|
11
|
+
//#region src/lib/create-card.ts
|
|
12
|
+
var READ_TIMEOUT_MS = 3e4;
|
|
13
|
+
async function createCardFrom(db, sources, request) {
|
|
14
|
+
const asked = request.board ?? "delivery";
|
|
15
|
+
if (!isBoardKind(asked)) throw new Error(`There is no ${asked} board here. A card goes on one of these: ${BOARD_KINDS.join(", ")}.`);
|
|
16
|
+
const board = asked;
|
|
17
|
+
const prefix = getSetting(db, "localKeyPrefix");
|
|
18
|
+
const first = boardFor(board, getSetting(db, "deliveryFlow")).stages[0]?.id ?? "inbox";
|
|
19
|
+
let ref = parseTicketRef(request.input, prefix);
|
|
20
|
+
const link = ticketLink(request.input);
|
|
21
|
+
let kept = null;
|
|
22
|
+
if (link !== null && link.system !== "github") {
|
|
23
|
+
if (link.system === "jira" && getSetting(db, "ticketSystem") === "jira") ref = {
|
|
24
|
+
kind: "external",
|
|
25
|
+
key: jiraLinkKey(db, link, prefix)
|
|
26
|
+
};
|
|
27
|
+
else {
|
|
28
|
+
const text = request.description?.trim() ?? "";
|
|
29
|
+
kept = {
|
|
30
|
+
title: request.title?.trim() || link.key,
|
|
31
|
+
description: text === "" ? request.input.trim() : `${text}\n\n${request.input.trim()}`
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
let external = null;
|
|
36
|
+
if (ref.kind === "github") {
|
|
37
|
+
const source = sources.github;
|
|
38
|
+
if (source === void 0 || source === null) throw new Error(board === "prreview" ? "Nolzu cannot read GitHub on this machine, so it cannot open a pull request. Install the GitHub CLI from https://cli.github.com, then start Nolzu again." : "Nolzu cannot read GitHub issues on this machine. Type the issue title to make a local card.");
|
|
39
|
+
const { options, owner } = await ownerOf(source, ref);
|
|
40
|
+
const full = issueKey(owner, ref.repo, ref.number);
|
|
41
|
+
if (board === "prreview") {
|
|
42
|
+
const found = await getPull(options.run, {
|
|
43
|
+
owner,
|
|
44
|
+
repo: ref.repo,
|
|
45
|
+
number: ref.number
|
|
46
|
+
}, AbortSignal.timeout(READ_TIMEOUT_MS));
|
|
47
|
+
if (found.pull === null) throw new Error(found.notFound ? `GitHub has no pull request ${full}. The number may belong to an issue, the pull request may be gone, or this login may not open that repository.` : `${full} could not be read from GitHub. The call failed, so the pull request may still be there. Try again.`);
|
|
48
|
+
if (found.pull.state !== "open") throw new Error(`${full} is ${found.pull.state}, so there is nothing to review. Type the number of a pull request that is still open.`);
|
|
49
|
+
const other = heldBy(db, found.pull.key, full);
|
|
50
|
+
if (other !== null) throw new Error(`${found.pull.key} on the board is ${other}. A card key carries no owner, so ${full} cannot go on the board as well. Review it on GitHub instead.`);
|
|
51
|
+
const { author, body, decision, headCommittedAt, draft, title, headSha, commits } = found.pull;
|
|
52
|
+
external = {
|
|
53
|
+
key: found.pull.key,
|
|
54
|
+
title,
|
|
55
|
+
summary: body === "" ? null : body,
|
|
56
|
+
source: "github-pr",
|
|
57
|
+
note: null,
|
|
58
|
+
ref: full,
|
|
59
|
+
pull: {
|
|
60
|
+
author,
|
|
61
|
+
decision,
|
|
62
|
+
headCommittedAt,
|
|
63
|
+
draft,
|
|
64
|
+
...headSha === void 0 ? {} : { headSha },
|
|
65
|
+
...commits === void 0 ? {} : { commits }
|
|
66
|
+
},
|
|
67
|
+
repo: await originRepo(db, owner, ref.repo)
|
|
68
|
+
};
|
|
69
|
+
} else external = {
|
|
70
|
+
...await readIssue(db, options, ref, owner, "Type its title to make a local card instead."),
|
|
71
|
+
note: null
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (ref.kind === "local") {
|
|
75
|
+
const exists = db.prepare("SELECT key FROM cards WHERE key = ?").get(ref.key) !== void 0;
|
|
76
|
+
throw new Error(exists ? `${ref.key} is already on the board. Open that card instead.` : `There is no card ${ref.key}. Type a title to make a new ${prefix} card.`);
|
|
77
|
+
}
|
|
78
|
+
if (ref.kind === "external") {
|
|
79
|
+
const adapter = typeof sources.external === "function" ? await sources.external() : sources.external ?? null;
|
|
80
|
+
if (adapter === null) external = {
|
|
81
|
+
key: ref.key,
|
|
82
|
+
title: ref.key,
|
|
83
|
+
summary: null,
|
|
84
|
+
source: "external",
|
|
85
|
+
note: `${ref.key} is on the board, but the ticket is not loaded, because Nolzu cannot read that ticket system yet.`
|
|
86
|
+
};
|
|
87
|
+
else {
|
|
88
|
+
const found = await readExternal(adapter, ref.key);
|
|
89
|
+
external = {
|
|
90
|
+
key: ref.key,
|
|
91
|
+
title: found.title,
|
|
92
|
+
summary: found.body,
|
|
93
|
+
source: adapter.name,
|
|
94
|
+
note: null
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const title = kept?.title ?? (request.title?.trim() || (ref.kind === "text" ? ref.text : ""));
|
|
99
|
+
if (external === null && title === "") throw new Error("A card needs a title or a ticket key.");
|
|
100
|
+
db.exec("BEGIN IMMEDIATE");
|
|
101
|
+
try {
|
|
102
|
+
let key;
|
|
103
|
+
if (external === null) key = createLocalTicket(db, {
|
|
104
|
+
projectId: 1,
|
|
105
|
+
prefix,
|
|
106
|
+
title,
|
|
107
|
+
description: kept?.description ?? request.description?.trim() ?? "",
|
|
108
|
+
board,
|
|
109
|
+
stage: first,
|
|
110
|
+
size: request.size
|
|
111
|
+
}).key;
|
|
112
|
+
else {
|
|
113
|
+
key = external.key;
|
|
114
|
+
createCard(db, {
|
|
115
|
+
key,
|
|
116
|
+
board,
|
|
117
|
+
stage: first,
|
|
118
|
+
title: external.title,
|
|
119
|
+
summary: external.summary,
|
|
120
|
+
source: external.source,
|
|
121
|
+
sourceRef: external.ref ?? external.key,
|
|
122
|
+
pull: external.pull ?? null,
|
|
123
|
+
size: request.size
|
|
124
|
+
});
|
|
125
|
+
if (external.repo != null) setCardRepos(db, key, [external.repo], "person");
|
|
126
|
+
}
|
|
127
|
+
if (request.extra !== void 0 && request.extra.trim() !== "") setExtraContext(db, key, request.extra);
|
|
128
|
+
for (const other of request.links ?? []) linkCards(db, key, other);
|
|
129
|
+
db.exec("COMMIT");
|
|
130
|
+
return {
|
|
131
|
+
key,
|
|
132
|
+
note: external?.note ?? null
|
|
133
|
+
};
|
|
134
|
+
} catch (error) {
|
|
135
|
+
if (db.isTransaction) db.exec("ROLLBACK");
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
async function readIssue(db, options, ref, owner, instead) {
|
|
140
|
+
const full = issueKey(owner, ref.repo, ref.number);
|
|
141
|
+
const adapter = githubIssues(options);
|
|
142
|
+
const [found] = await adapter.get([{
|
|
143
|
+
...ref,
|
|
144
|
+
owner
|
|
145
|
+
}], AbortSignal.timeout(READ_TIMEOUT_MS));
|
|
146
|
+
if (found === void 0 || found.ticket === null) throw new Error(found?.notFound === true ? `GitHub has no issue ${full}. The number may belong to a pull request, the issue may be gone, or this login may not open that repository.` : `${full} could not be read from GitHub. The call failed, so the issue may still be there. Try again.`);
|
|
147
|
+
const other = heldBy(db, found.ticket.key, full);
|
|
148
|
+
if (other !== null) throw new Error(`${found.ticket.key} on the board is ${other}. A card key carries no owner, so ${full} cannot go on the board as well. ${instead}`);
|
|
149
|
+
return {
|
|
150
|
+
key: found.ticket.key,
|
|
151
|
+
title: found.ticket.title,
|
|
152
|
+
summary: found.ticket.body,
|
|
153
|
+
source: adapter.name,
|
|
154
|
+
ref: full
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
async function ownerOf(source, ref) {
|
|
158
|
+
const options = await source(ref.repo);
|
|
159
|
+
const owner = ref.owner ?? options.defaultOwner;
|
|
160
|
+
const several = options.several ?? [];
|
|
161
|
+
if (owner === null && several.length > 1) throw new Error(`Type the owner as well, as in ${several[0]}/${ref.repo}#${ref.number}. ${several.length === 2 ? "Two" : several.length} repositories of this project are called ${ref.repo}, from ${several.slice(0, -1).join(", ")} and ${several.at(-1)}, so Nolzu does not know which one you mean.`);
|
|
162
|
+
if (owner === null) throw new Error(`Type the owner as well, as in owner/${ref.repo}#${ref.number}. No repository of this project has a GitHub origin called ${ref.repo}, so Nolzu does not know whose ${ref.repo} you mean.`);
|
|
163
|
+
return {
|
|
164
|
+
options,
|
|
165
|
+
owner
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function jiraLinkKey(db, link, prefix) {
|
|
169
|
+
const site = getSetting(db, "jiraSite");
|
|
170
|
+
const host = site === null ? null : new URL(site).host;
|
|
171
|
+
if (host !== null && host !== link.host) throw new Error(`That link is on ${link.host}, and this project reads Jira at ${host}. Paste a link from ${host}, or type the key.`);
|
|
172
|
+
if (parseTicketRef(link.key, prefix).kind === "local") throw new Error(`${link.key} has this project's local key prefix, so it reads as a local card. Change the key prefix in Settings, Project at /settings/project to one no Jira project uses.`);
|
|
173
|
+
return link.key;
|
|
174
|
+
}
|
|
175
|
+
async function readExternal(adapter, key) {
|
|
176
|
+
const [found] = await adapter.get([{
|
|
177
|
+
kind: "external",
|
|
178
|
+
key
|
|
179
|
+
}], AbortSignal.timeout(READ_TIMEOUT_MS));
|
|
180
|
+
if (found === void 0 || found.ticket === null) {
|
|
181
|
+
const system = adapter.title ?? adapter.name;
|
|
182
|
+
throw new Error(found?.notFound === true ? `${key} is not in ${system}. The key may be wrong, the ticket may be gone, or this account may not see that project.` : `${key} could not be read from ${system}. The call failed, so the ticket may still be there. Try again.`);
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
title: found.ticket.title,
|
|
186
|
+
body: found.ticket.body
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Reads one ticket of the project's ticket system by its key or a pasted link, through the reader Add
|
|
191
|
+
* card uses, and writes nothing. An epic's task row links to it, and Add makes the card from it. A ref
|
|
192
|
+
* that names no ticket of that system, or a ticket that is a card already, is refused with the reason.
|
|
193
|
+
*/
|
|
194
|
+
async function readTicket(db, sources, input) {
|
|
195
|
+
const prefix = getSetting(db, "localKeyPrefix");
|
|
196
|
+
if (getSetting(db, "ticketSystem") !== "jira") return readIssueRef(db, sources.github ?? null, input.trim(), prefix);
|
|
197
|
+
const external = sources.external;
|
|
198
|
+
const adapter = typeof external === "function" ? await external() : external ?? null;
|
|
199
|
+
if (adapter === null) throw new Error("This project keeps local tickets, so a task has no ticket system to link to.");
|
|
200
|
+
const system = adapter.title ?? adapter.name;
|
|
201
|
+
const asked = input.trim();
|
|
202
|
+
const link = ticketLink(asked);
|
|
203
|
+
let key;
|
|
204
|
+
if (link !== null) {
|
|
205
|
+
if (link.system !== "jira") throw new Error(`That link is not a ${system} ticket. Paste a ${system} key, such as PROJ-123, or a link to one.`);
|
|
206
|
+
key = jiraLinkKey(db, link, prefix);
|
|
207
|
+
} else {
|
|
208
|
+
const ref = parseTicketRef(asked, prefix);
|
|
209
|
+
if (ref.kind !== "external") throw new Error(`${asked === "" ? "Nothing" : `"${asked}"`} is not a ${system} key. Paste a key, such as PROJ-123, or a link to the ticket.`);
|
|
210
|
+
key = ref.key;
|
|
211
|
+
}
|
|
212
|
+
const card = db.prepare("SELECT board FROM cards WHERE key = ?").get(key);
|
|
213
|
+
if (card !== void 0) throw new Error(`${key} is a card on the ${card.board} board already. Open that card, or link another ticket.`);
|
|
214
|
+
const found = await readExternal(adapter, key);
|
|
215
|
+
return {
|
|
216
|
+
key,
|
|
217
|
+
title: found.title,
|
|
218
|
+
summary: found.body,
|
|
219
|
+
source: adapter.name
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
async function readIssueRef(db, source, asked, prefix) {
|
|
223
|
+
const ref = parseTicketRef(asked, prefix);
|
|
224
|
+
if (ref.kind !== "github") throw new Error(`${asked === "" ? "Nothing" : `"${asked}"`} is not a GitHub issue. Paste a link to the issue, or type it as repo#12 or owner/repo#12.`);
|
|
225
|
+
if (source === void 0 || source === null) throw new Error("Nolzu cannot read GitHub issues on this machine. Install the GitHub CLI from https://cli.github.com, then start Nolzu again.");
|
|
226
|
+
const { options, owner } = await ownerOf(source, ref);
|
|
227
|
+
const found = await readIssue(db, options, ref, owner, "Link another issue.");
|
|
228
|
+
const card = db.prepare("SELECT board FROM cards WHERE key = ?").get(found.key);
|
|
229
|
+
if (card !== void 0) throw new Error(`${found.key} is a card on the ${card.board} board already. Open that card, or link another issue.`);
|
|
230
|
+
return found;
|
|
231
|
+
}
|
|
232
|
+
function heldBy(db, key, full) {
|
|
233
|
+
const taken = db.prepare("SELECT source_ref FROM cards WHERE key = ?").get(key);
|
|
234
|
+
return taken !== void 0 && taken.source_ref !== null && taken.source_ref !== full ? taken.source_ref : null;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* The tasks of an epic: one Delivery card per title, each linked back to the epic.
|
|
238
|
+
*
|
|
239
|
+
* The epic's page sends the steps of its plan with the key each row showed, which the person may have
|
|
240
|
+
* typed over, or a list the person wrote with no keys. A task with no key takes the next local key.
|
|
241
|
+
* A plan step also sends its shareable description, which the card keeps as its ticket under one line
|
|
242
|
+
* naming the epic, its internal notes, which go to `FROM_EPIC_FILE` in the card folder for every run of
|
|
243
|
+
* the card to read, and the step it was made from, which the link keeps so a retitled task still
|
|
244
|
+
* answers its step. A row linked to a ticket of the project's ticket system becomes that ticket's card,
|
|
245
|
+
* with its own title and text, the way Add card makes one; `postTasks` read the ticket before this.
|
|
246
|
+
*
|
|
247
|
+
* One transaction for the whole list. Three cards with no link back, or an epic counting tasks that
|
|
248
|
+
* were never written, are both worse than adding nothing. `createCardFrom` cannot be looped here,
|
|
249
|
+
* because it opens a transaction of its own. The notes are written after it, so a list that failed
|
|
250
|
+
* leaves no notes for the key the next card takes.
|
|
251
|
+
*/
|
|
252
|
+
function addTasks(db, epicKey, titles, keys = [], descriptions = [], steps = [], linked = [], notes = [], folderOf = (key) => cardFolder(db, key)) {
|
|
253
|
+
const wanted = titles.map((title, at) => ({
|
|
254
|
+
title: title.trim(),
|
|
255
|
+
key: keys[at]?.trim() ?? "",
|
|
256
|
+
description: descriptions[at]?.trim() ?? "",
|
|
257
|
+
step: steps[at]?.trim() ?? "",
|
|
258
|
+
ticket: linked[at] ?? null,
|
|
259
|
+
notes: notes[at]?.trim() ?? ""
|
|
260
|
+
})).filter((task) => task.title !== "");
|
|
261
|
+
if (wanted.length === 0) throw new Error("A task needs a title. Write one task per line, then add them again.");
|
|
262
|
+
const epic = db.prepare("SELECT board, title FROM cards WHERE key = ?").get(epicKey);
|
|
263
|
+
if (epic === void 0) throw new Error(`There is no card ${epicKey} here, so it has nothing to deliver.`);
|
|
264
|
+
if (epic.board !== "epics") throw new Error(`${epicKey} is not on the Epics board. An epic delivers tasks, a card on another board does not.`);
|
|
265
|
+
const prefix = getSetting(db, "localKeyPrefix");
|
|
266
|
+
const first = boardFor("delivery", getSetting(db, "deliveryFlow")).stages[0]?.id ?? "inbox";
|
|
267
|
+
let made;
|
|
268
|
+
db.exec("BEGIN IMMEDIATE");
|
|
269
|
+
try {
|
|
270
|
+
made = wanted.map(({ title, key: asked, description: body, step, ticket, notes: told }) => {
|
|
271
|
+
const description = body === "" ? "" : `Part of ${epicKey}: ${epic.title.replace(/\.+$/, "")}.\n\n${body}`;
|
|
272
|
+
let key;
|
|
273
|
+
if (ticket !== null) {
|
|
274
|
+
key = ticket.key;
|
|
275
|
+
createCard(db, {
|
|
276
|
+
key,
|
|
277
|
+
board: "delivery",
|
|
278
|
+
stage: first,
|
|
279
|
+
title: ticket.title,
|
|
280
|
+
summary: ticket.summary,
|
|
281
|
+
source: ticket.source,
|
|
282
|
+
sourceRef: ticket.ref ?? ticket.key
|
|
283
|
+
});
|
|
284
|
+
} else if (asked === "") key = createLocalTicket(db, {
|
|
285
|
+
projectId: 1,
|
|
286
|
+
prefix,
|
|
287
|
+
title,
|
|
288
|
+
description,
|
|
289
|
+
board: "delivery",
|
|
290
|
+
stage: first
|
|
291
|
+
}).key;
|
|
292
|
+
else {
|
|
293
|
+
key = asked;
|
|
294
|
+
createCard(db, {
|
|
295
|
+
key,
|
|
296
|
+
board: "delivery",
|
|
297
|
+
stage: first,
|
|
298
|
+
title,
|
|
299
|
+
summary: description === "" ? null : description
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
linkCards(db, epicKey, key);
|
|
303
|
+
if (step !== "") db.prepare("UPDATE card_links SET step = ? WHERE a = min(?, ?) AND b = max(?, ?)").run(step, epicKey, key, epicKey, key);
|
|
304
|
+
return {
|
|
305
|
+
key,
|
|
306
|
+
notes: told
|
|
307
|
+
};
|
|
308
|
+
});
|
|
309
|
+
db.exec("COMMIT");
|
|
310
|
+
} catch (error) {
|
|
311
|
+
if (db.isTransaction) db.exec("ROLLBACK");
|
|
312
|
+
throw error;
|
|
313
|
+
}
|
|
314
|
+
const unwritten = made.filter(({ key, notes: told }) => {
|
|
315
|
+
if (told === "") return false;
|
|
316
|
+
const folder = folderOf(key);
|
|
317
|
+
if (folder === null) return true;
|
|
318
|
+
try {
|
|
319
|
+
writeCardFile(folder, FROM_EPIC_FILE, `${told}\n`);
|
|
320
|
+
return false;
|
|
321
|
+
} catch {
|
|
322
|
+
return true;
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
const result = { keys: made.map((one) => one.key) };
|
|
326
|
+
return unwritten.length === 0 ? result : {
|
|
327
|
+
...result,
|
|
328
|
+
note: `The epic's notes could not be written for ${unwritten.map((one) => one.key).join(", ")}. Add them to the extra context of ${unwritten.length === 1 ? "that card" : "those cards"}.`
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* The owner a ref such as `recipes#12` belongs to: the one the project's own remote points at.
|
|
333
|
+
*
|
|
334
|
+
* Null for anything else, and nothing is guessed. `parseTicketRef` reads no owner out of a bare
|
|
335
|
+
* `#12`, so a ref always names its repository and only the owner comes from here.
|
|
336
|
+
*/
|
|
337
|
+
async function remoteOwner(db) {
|
|
338
|
+
return (await remoteRepo(db))?.owner ?? null;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* The owner a ref such as `recipes#12` takes in this project: the one whose repository of that name
|
|
342
|
+
* a project repository's GitHub origin points at. With no such repository, the one owner every origin
|
|
343
|
+
* shares, as in a project of one repository. Null with the owners in `several` when two repositories
|
|
344
|
+
* have the name, and null alone when nothing settles it, because a guessed owner reads somebody
|
|
345
|
+
* else's repository.
|
|
346
|
+
*/
|
|
347
|
+
async function refOwner(db, name) {
|
|
348
|
+
const repos = projectRepos({
|
|
349
|
+
repos: getSetting(db, "repos"),
|
|
350
|
+
baseBranch: getSetting(db, "baseBranch")
|
|
351
|
+
});
|
|
352
|
+
const origins = (await Promise.all(repos.map((one) => remoteRepo(db, one.path)))).filter((one) => one !== null);
|
|
353
|
+
const named = [...new Set(origins.filter((one) => one.repo.toLowerCase() === name.toLowerCase()).map((one) => one.owner))];
|
|
354
|
+
if (named.length > 1) return {
|
|
355
|
+
owner: null,
|
|
356
|
+
several: named
|
|
357
|
+
};
|
|
358
|
+
const owners = [...new Set(origins.map((one) => one.owner))];
|
|
359
|
+
return {
|
|
360
|
+
owner: named[0] ?? (owners.length === 1 ? owners[0] ?? null : null),
|
|
361
|
+
several: []
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
var githubSource = (db, run) => async (repo) => {
|
|
365
|
+
const found = await refOwner(db, repo ?? "");
|
|
366
|
+
return {
|
|
367
|
+
run,
|
|
368
|
+
defaultOwner: found.owner,
|
|
369
|
+
several: found.several
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
async function originRepo(db, owner, name) {
|
|
373
|
+
const same = (one) => one !== null && one.owner.toLowerCase() === owner.toLowerCase() && one.repo.toLowerCase() === name.toLowerCase();
|
|
374
|
+
for (const one of projectRepos({
|
|
375
|
+
repos: getSetting(db, "repos"),
|
|
376
|
+
baseBranch: getSetting(db, "baseBranch")
|
|
377
|
+
})) if (same(await remoteRepo(db, one.path))) return one.path;
|
|
378
|
+
return null;
|
|
379
|
+
}
|
|
380
|
+
async function remoteRepo(db, repo = ".") {
|
|
381
|
+
const path = getSetting(db, "projectPath");
|
|
382
|
+
if (path === null) return null;
|
|
383
|
+
try {
|
|
384
|
+
const found = await git([
|
|
385
|
+
"remote",
|
|
386
|
+
"get-url",
|
|
387
|
+
"origin"
|
|
388
|
+
], {
|
|
389
|
+
cwd: repoFolder(path, repo),
|
|
390
|
+
env: gitEnv(process.env)
|
|
391
|
+
});
|
|
392
|
+
if (found.code !== 0) return null;
|
|
393
|
+
const place = parseRemote("origin", found.stdout.trim());
|
|
394
|
+
return place.supported && place.host === "github" ? {
|
|
395
|
+
owner: place.owner,
|
|
396
|
+
repo: place.repo
|
|
397
|
+
} : null;
|
|
398
|
+
} catch {
|
|
399
|
+
return null;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
var answer = (status, body) => new Response(JSON.stringify(body), {
|
|
403
|
+
status,
|
|
404
|
+
headers: { "content-type": "application/json" }
|
|
405
|
+
});
|
|
406
|
+
var text = (value) => value === void 0 || typeof value === "string";
|
|
407
|
+
async function postCard(db, told, request, run = ghRunner(), startCard = null, jira = {}) {
|
|
408
|
+
let asked;
|
|
409
|
+
try {
|
|
410
|
+
const parsed = await request.json();
|
|
411
|
+
asked = typeof parsed === "object" && parsed !== null ? parsed : {};
|
|
412
|
+
} catch {
|
|
413
|
+
asked = {};
|
|
414
|
+
}
|
|
415
|
+
const { input, title, description, extra, links, board, size, start } = asked;
|
|
416
|
+
const linksOk = links === void 0 || Array.isArray(links) && links.every((link) => typeof link === "string");
|
|
417
|
+
if (typeof input !== "string" || !text(title) || !text(description) || !text(extra) || !text(board) || !linksOk) return answer(400, { message: "A new card needs its input as text, and links as a list of card keys." });
|
|
418
|
+
if (!(size === void 0 || isCardSize(size)) || !(start === void 0 || typeof start === "boolean")) return answer(400, { message: "A card size is small, medium or large, and start is true or false." });
|
|
419
|
+
if (extra !== void 0 && Buffer.byteLength(extra, "utf8") > 64e3) return answer(413, { message: `The extra context is over ${CONTEXT_LIMIT / 1e3} kB, which is the limit. Shorten it and add the card again.` });
|
|
420
|
+
try {
|
|
421
|
+
const made = await createCardFrom(db, {
|
|
422
|
+
github: githubSource(db, run),
|
|
423
|
+
external: () => jiraReader(db, jira.keychain ?? createKeychain(process.platform, runKeychain, resolveDataDir(process.env)), jira.fetcher)
|
|
424
|
+
}, {
|
|
425
|
+
input,
|
|
426
|
+
title,
|
|
427
|
+
description,
|
|
428
|
+
extra,
|
|
429
|
+
links,
|
|
430
|
+
board,
|
|
431
|
+
size
|
|
432
|
+
});
|
|
433
|
+
told();
|
|
434
|
+
if (start !== true) return answer(201, made);
|
|
435
|
+
const refused = await startFirst(db, made.key, board ?? "delivery", startCard);
|
|
436
|
+
return answer(201, refused === null ? made : {
|
|
437
|
+
...made,
|
|
438
|
+
refused
|
|
439
|
+
});
|
|
440
|
+
} catch (error) {
|
|
441
|
+
return answer(409, { message: error.message });
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
async function startFirst(db, key, board, startCard) {
|
|
445
|
+
const steps = boardFor(board, getSetting(db, "deliveryFlow"));
|
|
446
|
+
const to = nextStage(steps, steps.stages[0]?.id ?? "")?.id;
|
|
447
|
+
if (to === void 0 || startCard === null) return `${key} was added, and Nolzu started no run from here. Move the card to start one.`;
|
|
448
|
+
return (await startCard(key, to))?.message ?? null;
|
|
449
|
+
}
|
|
450
|
+
function nextCardKey(db, board = "delivery") {
|
|
451
|
+
return peekLocalKey(db, 1, keyPrefixFor(board, getSetting(db, "localKeyPrefix"))).key;
|
|
452
|
+
}
|
|
453
|
+
async function postTasks(db, told, key, request, sources = null) {
|
|
454
|
+
const body = await request.json().catch(() => null);
|
|
455
|
+
const titles = body?.titles;
|
|
456
|
+
if (!Array.isArray(titles) || !titles.every((title) => typeof title === "string")) return answer(400, { message: "The tasks need a list of titles, one title per task." });
|
|
457
|
+
const keys = body.keys;
|
|
458
|
+
if (keys !== void 0 && !(Array.isArray(keys) && keys.length === titles.length && keys.every((one) => typeof one === "string"))) return answer(400, { message: "The keys need one key per title, or none." });
|
|
459
|
+
const texts = (name) => body[name];
|
|
460
|
+
const textsOk = (list) => list === void 0 || Array.isArray(list) && list.length === titles.length && list.every((one) => typeof one === "string");
|
|
461
|
+
if (!textsOk(texts("descriptions")) || !textsOk(texts("steps")) || !textsOk(texts("refs")) || !textsOk(texts("notes"))) return answer(400, { message: "The descriptions, steps, refs and notes need one text per title, or none." });
|
|
462
|
+
try {
|
|
463
|
+
const refs = (texts("refs") ?? []).map((ref) => ref.trim());
|
|
464
|
+
const linked = [];
|
|
465
|
+
for (const ref of refs) linked.push(ref === "" ? null : await readTicket(db, ticketSources(db, sources), ref));
|
|
466
|
+
const twice = linked.find((one, at) => one !== null && linked.findIndex((other) => other?.key === one.key) !== at);
|
|
467
|
+
if (twice != null) throw new Error(`${twice.key} is linked on two tasks. Unlink it from one of them, then add them again.`);
|
|
468
|
+
const made = addTasks(db, key, titles, keys, texts("descriptions"), texts("steps"), linked, texts("notes"));
|
|
469
|
+
told();
|
|
470
|
+
return answer(201, made);
|
|
471
|
+
} catch (error) {
|
|
472
|
+
return answer(409, { message: error.message });
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
async function getTicket(db, ref, sources = null) {
|
|
476
|
+
try {
|
|
477
|
+
const found = await readTicket(db, ticketSources(db, sources), ref);
|
|
478
|
+
return answer(200, {
|
|
479
|
+
key: found.key,
|
|
480
|
+
title: found.title,
|
|
481
|
+
...found.ref === void 0 ? {} : { ref: found.ref }
|
|
482
|
+
});
|
|
483
|
+
} catch (error) {
|
|
484
|
+
return answer(409, { message: error.message });
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
function ticketSources(db, given) {
|
|
488
|
+
return {
|
|
489
|
+
external: given?.external ?? (() => jiraReader(db, createKeychain(process.platform, runKeychain, resolveDataDir(process.env)))),
|
|
490
|
+
github: given?.github ?? githubSource(db, ghRunner())
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
function contextSources(db) {
|
|
494
|
+
return db.prepare("SELECT key, title, extra_context AS extra FROM cards WHERE trim(coalesce(extra_context, '')) != '' ORDER BY key").all();
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
export { READ_TIMEOUT_MS as R, remoteOwner as a, contextSources as b, createCardFrom as c, postTasks as d, getTicket as g, nextCardKey as n, originRepo as o, postCard as p, remoteRepo as r };
|
|
498
|
+
//# sourceMappingURL=create-card.js-DKtprMG6.js.map
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { a as activeProject } from './display.js-Bf-vGQ7Q.js';
|
|
2
|
+
import { r as resolveDataDir, a1 as openProject, a2 as openMachine, O as registeredProjects, a3 as FIRST_PROJECT, g as getSetting, a4 as openDatabase } from './node.js-Bz2jT5wt.js';
|
|
3
|
+
|
|
4
|
+
//#region src/lib/db.ts
|
|
5
|
+
var standIns = /* @__PURE__ */ new Map();
|
|
6
|
+
var damagedDatabase = (error) => {
|
|
7
|
+
const code = error?.errcode;
|
|
8
|
+
return typeof code === "number" && [11, 26].includes(code & 255);
|
|
9
|
+
};
|
|
10
|
+
var standInOf = (dataDir) => standIns.get(dataDir);
|
|
11
|
+
/**
|
|
12
|
+
* Opens the first project, the one that reads the machine and boots the data folder. When its database
|
|
13
|
+
* file is damaged (`damagedDatabase`), the next registered project that opens takes its place,
|
|
14
|
+
* so one bad project never stops Nolzu. The stand-in is kept, so a request does not try the damaged
|
|
15
|
+
* file again. `open` gets undefined for the first project and an id for any other. Throws one sentence
|
|
16
|
+
* naming the data folder when no project opens.
|
|
17
|
+
*/
|
|
18
|
+
function openFirstThatOpens(dataDir, open) {
|
|
19
|
+
const kept = standIns.get(dataDir);
|
|
20
|
+
if (kept !== void 0) return open(kept);
|
|
21
|
+
let firstError;
|
|
22
|
+
try {
|
|
23
|
+
return open(void 0);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
if (!damagedDatabase(error)) throw error;
|
|
26
|
+
firstError = error;
|
|
27
|
+
}
|
|
28
|
+
const machine = openMachine(dataDir);
|
|
29
|
+
let others;
|
|
30
|
+
try {
|
|
31
|
+
others = registeredProjects(machine).filter((one) => one.file !== FIRST_PROJECT);
|
|
32
|
+
} finally {
|
|
33
|
+
machine.close();
|
|
34
|
+
}
|
|
35
|
+
for (const other of others) {
|
|
36
|
+
let opened;
|
|
37
|
+
try {
|
|
38
|
+
opened = open(other.id);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
if (!damagedDatabase(error)) throw error;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
standIns.set(dataDir, other.id);
|
|
44
|
+
console.error(`The first project could not open (${firstError.message}), so Nolzu opened project ${other.id} in its place. Restart Nolzu and pick it again once it is fixed.`);
|
|
45
|
+
return opened;
|
|
46
|
+
}
|
|
47
|
+
throw new Error(`No project in ${dataDir} could open. The first one says: ${firstError.message}`);
|
|
48
|
+
}
|
|
49
|
+
var first = null;
|
|
50
|
+
var others = /* @__PURE__ */ new Map();
|
|
51
|
+
function chosenProject(db, asked) {
|
|
52
|
+
const registered = registeredProjects(db);
|
|
53
|
+
const id = activeProject(registered.map((one) => one.id), getSetting(db, "currentProject"), asked);
|
|
54
|
+
return registered.find((one) => one.id === id);
|
|
55
|
+
}
|
|
56
|
+
function database(project) {
|
|
57
|
+
const dataDir = resolveDataDir(process.env);
|
|
58
|
+
first ??= openFirstThatOpens(dataDir, (id) => {
|
|
59
|
+
const db = id === void 0 ? openDatabase(dataDir) : openProject(dataDir, id);
|
|
60
|
+
return {
|
|
61
|
+
db,
|
|
62
|
+
id: id ?? registeredProjects(db).find((one) => one.file === "nolzu.db").id
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
const chosen = chosenProject(first.db, project);
|
|
66
|
+
if (chosen.id === first.id) return first.db;
|
|
67
|
+
let db = others.get(chosen.id);
|
|
68
|
+
if (db === void 0) {
|
|
69
|
+
db = openProject(dataDir, chosen.id);
|
|
70
|
+
others.set(chosen.id, db);
|
|
71
|
+
}
|
|
72
|
+
return db;
|
|
73
|
+
}
|
|
74
|
+
function forgetProject(id) {
|
|
75
|
+
others.get(id)?.close();
|
|
76
|
+
others.delete(id);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { database as a, chosenProject as c, damagedDatabase as d, forgetProject as f, openFirstThatOpens as o, standInOf as s };
|
|
80
|
+
//# sourceMappingURL=db.js-pqoVpAzG.js.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { c as cardRuns } from './node.js-Bz2jT5wt.js';
|
|
2
|
+
import { r as repoAsk, c as commentTarget } from './changes.js-D8ITRMgU.js';
|
|
3
|
+
|
|
4
|
+
//#region src/lib/diff-comments.ts
|
|
5
|
+
var COMMENT_LIMIT = 4e3;
|
|
6
|
+
var COLUMNS = "id, repo, file, line, line_text, body, commit_sha, created_at, sent_at";
|
|
7
|
+
var shaped = (row) => ({
|
|
8
|
+
id: row.id,
|
|
9
|
+
repo: row.repo,
|
|
10
|
+
file: row.file,
|
|
11
|
+
line: row.line,
|
|
12
|
+
lineText: row.line_text,
|
|
13
|
+
text: row.body,
|
|
14
|
+
commit: row.commit_sha,
|
|
15
|
+
createdAt: row.created_at,
|
|
16
|
+
sentAt: row.sent_at
|
|
17
|
+
});
|
|
18
|
+
var refused = (status, reason) => ({
|
|
19
|
+
status,
|
|
20
|
+
body: {
|
|
21
|
+
ok: false,
|
|
22
|
+
reason
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
function commentsOf(db, key) {
|
|
26
|
+
return db.prepare(`SELECT ${COLUMNS} FROM diff_comments WHERE card_key = ? ORDER BY id`).all(key).map(shaped);
|
|
27
|
+
}
|
|
28
|
+
function openCommentCount(db, key) {
|
|
29
|
+
return commentsOf(db, key).filter((one) => one.sentAt === null).length;
|
|
30
|
+
}
|
|
31
|
+
function implementSession(db, key) {
|
|
32
|
+
return cardRuns(db, key).findLast((run) => run.phase === "implement" && run.sessionId !== null)?.sessionId?.slice(0, 8) ?? null;
|
|
33
|
+
}
|
|
34
|
+
function textOf(body) {
|
|
35
|
+
const text = typeof body === "object" && body !== null ? body.text : void 0;
|
|
36
|
+
if (typeof text !== "string" || text.trim() === "") return {
|
|
37
|
+
ok: false,
|
|
38
|
+
reason: "A comment needs a text. Write what should change on this line."
|
|
39
|
+
};
|
|
40
|
+
if (text.length > 4e3) return {
|
|
41
|
+
ok: false,
|
|
42
|
+
reason: `A comment is at most ${COMMENT_LIMIT} characters. Shorten it and save again.`
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
ok: true,
|
|
46
|
+
text: text.trim()
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A new comment on one line of the card's diff: { repo, file, line, lineText, text }. `line` is the
|
|
51
|
+
* line's number in the folder, and `lineText` the line as the page showed it, which is how the line
|
|
52
|
+
* is found again after an edit moves it. A repository the card does not work in and a file its change
|
|
53
|
+
* does not touch are refused.
|
|
54
|
+
*/
|
|
55
|
+
async function addComment(db, key, body, env = process.env, signal) {
|
|
56
|
+
const ask = typeof body === "object" && body !== null ? body : {};
|
|
57
|
+
if (typeof ask.file !== "string" || ask.file === "" || !Number.isInteger(ask.line) || ask.line < 1 || typeof ask.lineText !== "string") return refused(400, "A comment needs a file, a line number and the text of that line.");
|
|
58
|
+
const text = textOf(body);
|
|
59
|
+
if (!text.ok) return refused(400, text.reason);
|
|
60
|
+
const repo = repoAsk(ask.repo);
|
|
61
|
+
const target = await commentTarget(db, key, repo, ask.file, env, signal);
|
|
62
|
+
if (!target.ok) return refused(422, target.reason);
|
|
63
|
+
return {
|
|
64
|
+
status: 201,
|
|
65
|
+
body: {
|
|
66
|
+
ok: true,
|
|
67
|
+
comment: shaped(db.prepare(`INSERT INTO diff_comments (card_key, repo, file, line, line_text, body, commit_sha, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?) RETURNING ${COLUMNS}`).get(key, repo, ask.file, ask.line, ask.lineText, text.text, target.commit, (/* @__PURE__ */ new Date()).toISOString()))
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
var idOf = (id) => /^\d+$/.test(id) ? Number(id) : 0;
|
|
72
|
+
function editComment(db, key, id, body) {
|
|
73
|
+
const text = textOf(body);
|
|
74
|
+
if (!text.ok) return refused(400, text.reason);
|
|
75
|
+
const row = db.prepare(`UPDATE diff_comments SET body = ? WHERE id = ? AND card_key = ? AND sent_at IS NULL RETURNING ${COLUMNS}`).get(text.text, idOf(id), key);
|
|
76
|
+
if (row !== void 0) return {
|
|
77
|
+
status: 200,
|
|
78
|
+
body: {
|
|
79
|
+
ok: true,
|
|
80
|
+
comment: shaped(row)
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
if (db.prepare("SELECT 1 FROM diff_comments WHERE id = ? AND card_key = ?").get(idOf(id), key) !== void 0) return refused(409, "That comment was sent back already, so it keeps the text Implement got. Write a new comment instead.");
|
|
84
|
+
return refused(404, `${key} has no comment ${id}. Read the page again.`);
|
|
85
|
+
}
|
|
86
|
+
function deleteComment(db, key, id) {
|
|
87
|
+
if (db.prepare("DELETE FROM diff_comments WHERE id = ? AND card_key = ?").run(idOf(id), key).changes === 0) return refused(404, `${key} has no comment ${id}. Read the page again.`);
|
|
88
|
+
return {
|
|
89
|
+
status: 200,
|
|
90
|
+
body: { ok: true }
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { addComment as a, commentsOf as c, deleteComment as d, editComment as e, implementSession as i, openCommentCount as o };
|
|
95
|
+
//# sourceMappingURL=diff-comments.js-BSCuay_U.js.map
|