@ghfs/cli 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +36 -15
- package/dist/{factory-DypZ8oi9.mjs → factory-DmX3S7tf.mjs} +324 -5
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{provider-BFJGpjCs.d.mts → provider-DCIsHVeA.d.mts} +47 -1
- package/dist/server/index.d.mts +45 -2
- package/dist/server/index.mjs +1 -1
- package/dist/{server-n1FLF8Xo.mjs → server-BwSU4kqr.mjs} +252 -65
- package/dist/ui/200.html +1 -1
- package/dist/ui/404.html +1 -1
- package/dist/ui/_nuxt/2UxHyX5q.js +1 -0
- package/dist/ui/_nuxt/32ctXXKs.js +1 -0
- package/dist/ui/_nuxt/3e1v2bzS.js +1 -0
- package/dist/ui/_nuxt/4A_iFExJ.js +1 -0
- package/dist/ui/_nuxt/5VeTt0Ye.js +1 -0
- package/dist/ui/_nuxt/5i3qLPDT.js +1 -0
- package/dist/ui/_nuxt/85-TOEBH.js +1 -0
- package/dist/ui/_nuxt/8syuri0t.js +1 -0
- package/dist/ui/_nuxt/B0m2ddpp.js +1 -0
- package/dist/ui/_nuxt/B1dDrJ26.js +1 -0
- package/dist/ui/_nuxt/B1yitclQ.js +1 -0
- package/dist/ui/_nuxt/B5q1GTce.js +1 -0
- package/dist/ui/_nuxt/B6aJPvgy.js +1 -0
- package/dist/ui/_nuxt/B6eN_cS4.js +1 -0
- package/dist/ui/_nuxt/B7c-h3xW.js +1 -0
- package/dist/ui/_nuxt/B7mTdjB0.js +1 -0
- package/dist/ui/_nuxt/BA47KaF1.js +1 -0
- package/dist/ui/_nuxt/BBf5iR-q.js +1 -0
- package/dist/ui/_nuxt/BEDo0Tqx.js +1 -0
- package/dist/ui/_nuxt/BERRCDM3.js +1 -0
- package/dist/ui/_nuxt/BETggiCN.js +1 -0
- package/dist/ui/_nuxt/BEwlwnbL.js +1 -0
- package/dist/ui/_nuxt/BFfxhgS-.js +1 -0
- package/dist/ui/_nuxt/BGJmEYvX.js +1 -0
- package/dist/ui/_nuxt/BH7IYjvW.js +1 -0
- package/dist/ui/_nuxt/BIGW1oBm.js +1 -0
- package/dist/ui/_nuxt/BIv1doCn.js +1 -0
- package/dist/ui/_nuxt/BJDFO7_C.js +1 -0
- package/dist/ui/_nuxt/BLtJtn59.js +1 -0
- package/dist/ui/_nuxt/BM1_JUlF.js +1 -0
- package/dist/ui/_nuxt/BMWR74SV.js +1 -0
- package/dist/ui/_nuxt/BPQ3VLAy.js +1 -0
- package/dist/ui/_nuxt/BQ8w6xss.js +1 -0
- package/dist/ui/_nuxt/BRHolxvo.js +1 -0
- package/dist/ui/_nuxt/BRZ36xJF.js +1 -0
- package/dist/ui/_nuxt/BTJTHyun.js +1 -0
- package/dist/ui/_nuxt/BTifaqeh.js +1 -0
- package/dist/ui/_nuxt/BUtzH8cE.js +1 -0
- package/dist/ui/_nuxt/BUw7H-hv.js +1 -0
- package/dist/ui/_nuxt/BV7otONQ.js +1 -0
- package/dist/ui/_nuxt/BVQ-GDCI.js +1 -0
- package/dist/ui/_nuxt/BVkGXMyj.js +1 -0
- package/dist/ui/_nuxt/BWvSN4gD.js +1 -0
- package/dist/ui/_nuxt/BXkSAIEj.js +1 -0
- package/dist/ui/_nuxt/BYunw83y.js +1 -0
- package/dist/ui/_nuxt/BZvkOJ9d.js +1 -0
- package/dist/ui/_nuxt/B_m7g4N7.js +1 -0
- package/dist/ui/_nuxt/BcOcwvcX.js +1 -0
- package/dist/ui/_nuxt/BcVCzyr7.js +1 -0
- package/dist/ui/_nuxt/BcllPdc-.js +1 -0
- package/dist/ui/_nuxt/BdImnpbu.js +1 -0
- package/dist/ui/_nuxt/BdnUsdx6.js +1 -0
- package/dist/ui/_nuxt/BeJSdlF9.js +1 -0
- package/dist/ui/_nuxt/BfHTSMKl.js +1 -0
- package/dist/ui/_nuxt/BfSCyJF4.js +1 -0
- package/dist/ui/_nuxt/BfjtVDDH.js +1 -0
- package/dist/ui/_nuxt/BgDCqdQA.js +1 -0
- package/dist/ui/_nuxt/BhOHFoWU.js +1 -0
- package/dist/ui/_nuxt/BhrAK1vL.js +1 -0
- package/dist/ui/_nuxt/BkioyH1T.js +1 -0
- package/dist/ui/_nuxt/Bkuqu6BP.js +1 -0
- package/dist/ui/_nuxt/BmXAJ9_W.js +1 -0
- package/dist/ui/_nuxt/Bmn6On1c.js +1 -0
- package/dist/ui/_nuxt/Bp3cYrEr.js +1 -0
- package/dist/ui/_nuxt/Bp6g37R7.js +1 -0
- package/dist/ui/_nuxt/BqNa2AkI.js +1 -0
- package/dist/ui/_nuxt/BqTXFGrv.js +1 -0
- package/dist/ui/_nuxt/BqYA7rlc.js +1 -0
- package/dist/ui/_nuxt/Br6cN0cg.js +1 -0
- package/dist/ui/_nuxt/BsS91CYL.js +1 -0
- package/dist/ui/_nuxt/BshV_Xbc.js +1 -0
- package/dist/ui/_nuxt/BspZqrRM.js +1 -0
- package/dist/ui/_nuxt/BtCnVYZw.js +1 -0
- package/dist/ui/_nuxt/BtOb2qkB.js +1 -0
- package/dist/ui/_nuxt/BthQWCQV.js +1 -0
- package/dist/ui/_nuxt/BtqSS_iP.js +1 -0
- package/dist/ui/_nuxt/Buea-lGh.js +1 -0
- package/dist/ui/_nuxt/Bv_4Rxtq.js +1 -0
- package/dist/ui/_nuxt/BvzEVeQv.js +1 -0
- package/dist/ui/_nuxt/Bw305WKR.js +1 -0
- package/dist/ui/_nuxt/BxgE0vQu.js +1 -0
- package/dist/ui/_nuxt/BzJJZx-M.js +1 -0
- package/dist/ui/_nuxt/C-HG3fhB.js +1 -0
- package/dist/ui/_nuxt/C-SQnVFl.js +1 -0
- package/dist/ui/_nuxt/C0HS_06l.js +1 -0
- package/dist/ui/_nuxt/C0hk2d4L.js +1 -0
- package/dist/ui/_nuxt/C151Ov-r.js +1 -0
- package/dist/ui/_nuxt/C27-OAKa.js +1 -0
- package/dist/ui/_nuxt/C2t-YnRu.js +1 -0
- package/dist/ui/_nuxt/C39BiMTA.js +1 -0
- package/dist/ui/_nuxt/C3B-1QV4.js +1 -0
- package/dist/ui/_nuxt/C3Wv6jpd.js +1 -0
- package/dist/ui/_nuxt/C3mMm8J8.js +1 -0
- package/dist/ui/_nuxt/C4EeE6gA.js +1 -0
- package/dist/ui/_nuxt/C4IJs8-o.js +1 -0
- package/dist/ui/_nuxt/C4gqWexZ.js +1 -0
- package/dist/ui/_nuxt/{BMIwt_GL.js → C4zNGwhW.js} +1 -1
- package/dist/ui/_nuxt/C5BYcBs_.js +1 -0
- package/dist/ui/_nuxt/C5YyOfLZ.js +1 -0
- package/dist/ui/_nuxt/C7UmGho8.js +1 -0
- package/dist/ui/_nuxt/C7zT0LnQ.js +1 -0
- package/dist/ui/_nuxt/C8M2exoo.js +1 -0
- package/dist/ui/_nuxt/C8lEn-DE.js +1 -0
- package/dist/ui/_nuxt/C98Dy4si.js +1 -0
- package/dist/ui/_nuxt/C9dUb6Cb.js +1 -0
- package/dist/ui/_nuxt/C9oPPf7i.js +1 -0
- package/dist/ui/_nuxt/C9tS-k6U.js +1 -0
- package/dist/ui/_nuxt/CAFt9gP4.js +1 -0
- package/dist/ui/_nuxt/CANp3yme.js +1 -0
- package/dist/ui/_nuxt/CBaQQc7g.js +1 -0
- package/dist/ui/_nuxt/CDBrVQLm.js +1 -0
- package/dist/ui/_nuxt/CDVJQ6XC.js +1 -0
- package/dist/ui/_nuxt/CDx5xZoG.js +1 -0
- package/dist/ui/_nuxt/CEL-wOlO.js +1 -0
- package/dist/ui/_nuxt/CEu0bR-o.js +1 -0
- package/dist/ui/_nuxt/CFHQjOhq.js +1 -0
- package/dist/ui/_nuxt/CFbOZP3I.js +75 -0
- package/dist/ui/_nuxt/CG6Dc4jp.js +1 -0
- package/dist/ui/_nuxt/CG8Ifv2g.js +1 -0
- package/dist/ui/_nuxt/CH1njM8p.js +1 -0
- package/dist/ui/_nuxt/CHLpvVh8.js +1 -0
- package/dist/ui/_nuxt/CHM0blh-.js +1 -0
- package/dist/ui/_nuxt/CJc9bBzg.js +1 -0
- package/dist/ui/_nuxt/CKIfxQSi.js +1 -0
- package/dist/ui/_nuxt/CLj8gQPS.js +1 -0
- package/dist/ui/_nuxt/CLxacb5B.js +1 -0
- package/dist/ui/_nuxt/CMTm3GFP.js +1 -0
- package/dist/ui/_nuxt/CO1LY3CK.js +1 -0
- package/dist/ui/_nuxt/COcwbKMJ.js +1 -0
- package/dist/ui/_nuxt/COkxafJQ.js +1 -0
- package/dist/ui/_nuxt/COt5Ahok.js +1 -0
- package/dist/ui/_nuxt/CRBrlGZW.js +1 -0
- package/dist/ui/_nuxt/CS3Unz2-.js +1 -0
- package/dist/ui/_nuxt/CSXwinHm.js +1 -0
- package/dist/ui/_nuxt/CTRr51gU.js +1 -0
- package/dist/ui/_nuxt/CUuTKBJd.js +1 -0
- package/dist/ui/_nuxt/CVO1_9PV.js +1 -0
- package/dist/ui/_nuxt/CVdnzihN.js +1 -0
- package/dist/ui/_nuxt/CXtECtnM.js +1 -0
- package/dist/ui/_nuxt/CXvaQtF9.js +1 -0
- package/dist/ui/_nuxt/CYsAdtH9.js +1 -0
- package/dist/ui/_nuxt/CafNBF8u.js +1 -0
- package/dist/ui/_nuxt/CbFg5uaA.js +1 -0
- package/dist/ui/_nuxt/CbfX1IO0.js +1 -0
- package/dist/ui/_nuxt/CcsQSqEB.js +1 -0
- package/dist/ui/_nuxt/CeAyd5Ju.js +1 -0
- package/dist/ui/_nuxt/CeZK1NFH.js +1 -0
- package/dist/ui/_nuxt/CenWIFCC.js +1 -0
- package/dist/ui/_nuxt/CfQXZHmo.js +1 -0
- package/dist/ui/_nuxt/Cg-RD9OK.js +1 -0
- package/dist/ui/_nuxt/ChMvpjG-.js +1 -0
- package/dist/ui/_nuxt/Cj5Yp3dK.js +1 -0
- package/dist/ui/_nuxt/CkByrt1z.js +1 -0
- package/dist/ui/_nuxt/CkXjmgJE.js +1 -0
- package/dist/ui/_nuxt/CklMAg4u.js +1 -0
- package/dist/ui/_nuxt/Cmh6b_Ma.js +1 -0
- package/dist/ui/_nuxt/CnnmHF94.js +1 -0
- package/dist/ui/_nuxt/CnsnAmq5.js +1 -0
- package/dist/ui/_nuxt/Co6uUVPk.js +1 -0
- package/dist/ui/_nuxt/CoDkCxhg.js +1 -0
- package/dist/ui/_nuxt/Cp-IABpG.js +1 -0
- package/dist/ui/_nuxt/Cp8Y5tLI.js +1 -0
- package/dist/ui/_nuxt/Cq5zzVJU.js +1 -0
- package/dist/ui/_nuxt/CquLrc37.js +1 -0
- package/dist/ui/_nuxt/Cs0ovY-E.js +1 -0
- package/dist/ui/_nuxt/CsfeWuGM.js +1 -0
- package/dist/ui/_nuxt/Csfq5Kiy.js +1 -0
- package/dist/ui/_nuxt/CuPHTKiy.js +1 -0
- package/dist/ui/_nuxt/CufHLc7y.js +1 -0
- package/dist/ui/_nuxt/Cuk6v7N8.js +1 -0
- package/dist/ui/_nuxt/Cvjx9yec.js +1 -0
- package/dist/ui/_nuxt/CwoSXNpI.js +1 -0
- package/dist/ui/_nuxt/CxGSJlkm.js +1 -0
- package/dist/ui/_nuxt/CxbxFI8M.js +1 -0
- package/dist/ui/_nuxt/CyktbL80.js +1 -0
- package/dist/ui/_nuxt/CylS5w8V.js +1 -0
- package/dist/ui/_nuxt/Cz2AlsmD.js +1 -0
- package/dist/ui/_nuxt/CzTSHFRz.js +1 -0
- package/dist/ui/_nuxt/D-2ljcwZ.js +1 -0
- package/dist/ui/_nuxt/D0YGMca9.js +1 -0
- package/dist/ui/_nuxt/D0r3Knsf.js +1 -0
- package/dist/ui/_nuxt/D17OF-Vu.js +1 -0
- package/dist/ui/_nuxt/D1j8_8rp.js +1 -0
- package/dist/ui/_nuxt/D2j5LXpq.js +1 -0
- package/dist/ui/_nuxt/D3apom_0.js +1 -0
- package/dist/ui/_nuxt/D3lLCCz7.js +1 -0
- package/dist/ui/_nuxt/{BXG6gk4R.js → D4Qn4bBI.js} +1 -1
- package/dist/ui/_nuxt/D4_iv3hh.js +1 -0
- package/dist/ui/_nuxt/D4h5O-jR.js +1 -0
- package/dist/ui/_nuxt/D5-asLiD.js +1 -0
- package/dist/ui/_nuxt/D53aC0YG.js +1 -0
- package/dist/ui/_nuxt/D5KoaKCx.js +1 -0
- package/dist/ui/_nuxt/D7o27uSR.js +1 -0
- package/dist/ui/_nuxt/D7oLnXFd.js +1 -0
- package/dist/ui/_nuxt/D82EKSYY.js +1 -0
- package/dist/ui/_nuxt/D82vCrfD.js +1 -0
- package/dist/ui/_nuxt/D87Tk5Gz.js +1 -0
- package/dist/ui/_nuxt/D8_7TLub.js +1 -0
- package/dist/ui/_nuxt/D8l8udqQ.js +1 -0
- package/dist/ui/_nuxt/D8rZpOte.js +1 -0
- package/dist/ui/_nuxt/D93ZcfNL.js +1 -0
- package/dist/ui/_nuxt/D97Zzqfu.js +1 -0
- package/dist/ui/_nuxt/DAi9KRSo.js +1 -0
- package/dist/ui/_nuxt/DElX3lK9.js +153 -0
- package/dist/ui/_nuxt/DFQXde-d.js +1 -0
- package/dist/ui/_nuxt/DFWUc33u.js +1 -0
- package/dist/ui/_nuxt/DFXneXwc.js +1 -0
- package/dist/ui/_nuxt/DGztddWO.js +1 -0
- package/dist/ui/_nuxt/DH5Ifo-i.js +1 -0
- package/dist/ui/_nuxt/DHCkPAjA.js +1 -0
- package/dist/ui/_nuxt/DHJKELXO.js +1 -0
- package/dist/ui/_nuxt/DHQR4-dF.js +1 -0
- package/dist/ui/_nuxt/DM8c43g1.js +1 -0
- package/dist/ui/_nuxt/DMk3OuwW.js +1 -0
- package/dist/ui/_nuxt/DMzUqQB5.js +1 -0
- package/dist/ui/_nuxt/DN-Z_aST.js +1 -0
- package/dist/ui/_nuxt/DQyhUUbL.js +1 -0
- package/dist/ui/_nuxt/DRg8JJMk.js +1 -0
- package/dist/ui/_nuxt/DRw_LuNl.js +1 -0
- package/dist/ui/_nuxt/DSSpBswy.js +1 -0
- package/dist/ui/_nuxt/DT3CNIhV.js +1 -0
- package/dist/ui/_nuxt/DU1UobuO.js +1 -0
- package/dist/ui/_nuxt/DUszq2jm.js +1 -0
- package/dist/ui/_nuxt/DV7GczEv.js +1 -0
- package/dist/ui/_nuxt/DVFEvuxE.js +1 -0
- package/dist/ui/_nuxt/DVMEJ2y_.js +1 -0
- package/dist/ui/_nuxt/DVxCFoDh.js +1 -0
- package/dist/ui/_nuxt/DWX1VroF.js +1 -0
- package/dist/ui/_nuxt/DWedfzmr.js +1 -0
- package/dist/ui/_nuxt/DWrx1Km3.js +1 -0
- package/dist/ui/_nuxt/DXbdFlpD.js +1 -0
- package/dist/ui/_nuxt/DXmwc3jG.js +1 -0
- package/dist/ui/_nuxt/DXvB9xmW.js +1 -0
- package/dist/ui/_nuxt/DYE7WIF3.js +1 -0
- package/dist/ui/_nuxt/DZ9PSxVF.js +1 -0
- package/dist/ui/_nuxt/DZxFcAj9.js +1 -0
- package/dist/ui/_nuxt/D_Q5rh1f.js +1 -0
- package/dist/ui/_nuxt/Da5cRb03.js +1 -0
- package/dist/ui/_nuxt/DbWOdLaN.js +1 -0
- package/dist/ui/_nuxt/Dc-5oQ3p.js +1 -0
- package/dist/ui/_nuxt/DcWK9jms.js +1 -0
- package/dist/ui/_nuxt/DcaNXYhu.js +1 -0
- package/dist/ui/_nuxt/Dd19v3D-.js +1 -0
- package/dist/ui/_nuxt/DdkO51Og.js +1 -0
- package/dist/ui/_nuxt/Ddv68eIx.js +1 -0
- package/dist/ui/_nuxt/Des-eS-w.js +1 -0
- package/dist/ui/_nuxt/Df6bDoY_.js +1 -0
- package/dist/ui/_nuxt/DfNjGIrv.js +1 -0
- package/dist/ui/_nuxt/DhaVEd23.js +1 -0
- package/dist/ui/_nuxt/DjAJT7YJ.js +1 -0
- package/dist/ui/_nuxt/DkFqJrB1.js +1 -0
- package/dist/ui/_nuxt/DkwncUOv.js +1 -0
- package/dist/ui/_nuxt/DnF83RMp.js +1 -0
- package/dist/ui/_nuxt/DnULxvSX.js +1 -0
- package/dist/ui/_nuxt/Dpen1YoG.js +1 -0
- package/dist/ui/_nuxt/Dph4kLrZ.js +1 -0
- package/dist/ui/_nuxt/DqQDbK_p.js +1 -0
- package/dist/ui/_nuxt/DqwNpetd.js +1 -0
- package/dist/ui/_nuxt/DsOJ9woJ.js +1 -0
- package/dist/ui/_nuxt/Dspwwk_N.js +1 -0
- package/dist/ui/_nuxt/Dx-B1_4e.js +1 -0
- package/dist/ui/_nuxt/DyxjwDmM.js +1 -0
- package/dist/ui/_nuxt/E3gJ1_iC.js +1 -0
- package/dist/ui/_nuxt/GsRaNv29.js +1 -0
- package/dist/ui/_nuxt/IF9eRakj.js +1 -0
- package/dist/ui/_nuxt/IeuSbFQv.js +1 -0
- package/dist/ui/_nuxt/JZbLTBME.js +1 -0
- package/dist/ui/_nuxt/L9t79GZl.js +1 -0
- package/dist/ui/_nuxt/MzD3tlZU.js +1 -0
- package/dist/ui/_nuxt/P80f7IUj.js +1 -0
- package/dist/ui/_nuxt/Pmp26Uib.js +1 -0
- package/dist/ui/_nuxt/QIJgUcNo.js +1 -0
- package/dist/ui/_nuxt/VOosw3JB.js +1 -0
- package/dist/ui/_nuxt/Ve4PFQV2.js +1 -0
- package/dist/ui/_nuxt/W9tJ9s81.js +1 -0
- package/dist/ui/_nuxt/Yzrsuije.js +1 -0
- package/dist/ui/_nuxt/_H4v1dQx.js +1 -0
- package/dist/ui/_nuxt/_ykCGR6B.js +1 -0
- package/dist/ui/_nuxt/bCR0ucgS.js +1 -0
- package/dist/ui/_nuxt/bE4Kk8sk.js +1 -0
- package/dist/ui/_nuxt/bN70gL4F.js +1 -0
- package/dist/ui/_nuxt/builds/latest.json +1 -1
- package/dist/ui/_nuxt/builds/meta/12d68071-f4db-447f-b929-9033d66eadc3.json +1 -0
- package/dist/ui/_nuxt/dwOrl1Do.js +1 -0
- package/dist/ui/_nuxt/entry.DfrFFNxd.css +1 -0
- package/dist/ui/_nuxt/eo99z4R2.js +1 -0
- package/dist/ui/_nuxt/error-404.C93cll2q.css +1 -0
- package/dist/ui/_nuxt/error-500.CPQqaJsC.css +1 -0
- package/dist/ui/_nuxt/fuZLfV_i.js +1 -0
- package/dist/ui/_nuxt/g9-lgVsj.js +1 -0
- package/dist/ui/_nuxt/gcz8RCvz.js +1 -0
- package/dist/ui/_nuxt/hJgmCMqR.js +1 -0
- package/dist/ui/_nuxt/hegEt444.js +1 -0
- package/dist/ui/_nuxt/k_qm7-4y.js +1 -0
- package/dist/ui/_nuxt/lBpI9LM0.js +1 -0
- package/dist/ui/_nuxt/lXgVvXCa.js +1 -0
- package/dist/ui/_nuxt/mWjccvbQ.js +1 -0
- package/dist/ui/_nuxt/n2N0HUVH.js +1 -0
- package/dist/ui/_nuxt/oH_c3LbQ.js +1 -0
- package/dist/ui/_nuxt/qdsjHGoJ.js +1 -0
- package/dist/ui/_nuxt/rGO070M0.js +1 -0
- package/dist/ui/_nuxt/rZm6bMo-.js +1 -0
- package/dist/ui/_nuxt/rgL8RFrC.js +1 -0
- package/dist/ui/_nuxt/u5AG7uiY.js +1 -0
- package/dist/ui/_nuxt/uYugtg8r.js +1 -0
- package/dist/ui/_nuxt/vE_lwT2v.js +1 -0
- package/dist/ui/_nuxt/vGWfd6FD.js +1 -0
- package/dist/ui/_nuxt/wDzz0qaB.js +1 -0
- package/dist/ui/_nuxt/wEQ09or8.js +1 -0
- package/dist/ui/_nuxt/yv6CvBhz.js +1 -0
- package/dist/ui/index.html +1 -1
- package/package.json +6 -2
- package/dist/ui/_nuxt/DA9k4Rdg.js +0 -69
- package/dist/ui/_nuxt/builds/meta/64045338-3c37-4c7d-a0df-5b21000f8b0a.json +0 -1
- package/dist/ui/_nuxt/entry.B5oa46-c.css +0 -1
- package/dist/ui/_nuxt/error-404.CktHaldI.css +0 -1
- package/dist/ui/_nuxt/error-500.DVdbZfrj.css +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as formatDuration, o as formatTerminalLink$1, r as countNoun, s as formatValue } from "./factory-
|
|
3
|
-
import { a as
|
|
2
|
+
import { c as CodedError, i as formatDuration, o as formatTerminalLink$1, r as countNoun, s as formatValue, u as log } from "./factory-DmX3S7tf.mjs";
|
|
3
|
+
import { a as executePendingChanges, c as GHFS_NAME, d as ACTIONS_COLOR_HEX, f as pathExists, h as resolveConfig, i as appendExecutionResult, l as GHFS_VERSION, m as getStorageDirAbsolute, n as slugifyRepoName, o as isExecuteCancelledError, p as getExecuteFile, r as syncRepository, s as loadSyncState, t as createUiServer, u as ensureExecuteArtifacts } from "./server-BwSU4kqr.mjs";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import { cac } from "cac";
|
|
6
6
|
import { resolve } from "pathe";
|
|
@@ -19,11 +19,11 @@ async function resolveAuthToken(options) {
|
|
|
19
19
|
if (token) return token;
|
|
20
20
|
const envToken = await readTokenFromEnv();
|
|
21
21
|
if (envToken) return envToken;
|
|
22
|
-
if (!options.interactive || !process.stdin.isTTY) throw new
|
|
23
|
-
if (!options.promptForToken) throw new
|
|
22
|
+
if (!options.interactive || !process.stdin.isTTY) throw new CodedError(log.GHFS0001());
|
|
23
|
+
if (!options.promptForToken) throw new CodedError(log.GHFS0001());
|
|
24
24
|
const promptedToken = await options.promptForToken();
|
|
25
25
|
if (promptedToken?.trim()) return promptedToken.trim();
|
|
26
|
-
throw new
|
|
26
|
+
throw new CodedError(log.GHFS0002());
|
|
27
27
|
}
|
|
28
28
|
async function readTokenFromGhCli() {
|
|
29
29
|
try {
|
|
@@ -45,7 +45,7 @@ const execFileAsync = promisify(execFile);
|
|
|
45
45
|
async function resolveRepo(options) {
|
|
46
46
|
if (options.cliRepo) {
|
|
47
47
|
const repo = normalizeRepo(options.cliRepo);
|
|
48
|
-
if (!repo) throw new
|
|
48
|
+
if (!repo) throw new CodedError(log.GHFS0010({ value: options.cliRepo }));
|
|
49
49
|
return {
|
|
50
50
|
repo,
|
|
51
51
|
source: "cli",
|
|
@@ -54,7 +54,7 @@ async function resolveRepo(options) {
|
|
|
54
54
|
}
|
|
55
55
|
if (options.configRepo) {
|
|
56
56
|
const repo = normalizeRepo(options.configRepo);
|
|
57
|
-
if (!repo) throw new
|
|
57
|
+
if (!repo) throw new CodedError(log.GHFS0011({ value: options.configRepo }));
|
|
58
58
|
return {
|
|
59
59
|
repo,
|
|
60
60
|
source: "config",
|
|
@@ -69,16 +69,19 @@ async function resolveRepo(options) {
|
|
|
69
69
|
if (gitCandidate && pkgCandidate && gitCandidate.repo !== pkgCandidate.repo) {
|
|
70
70
|
if (options.interactive && process.stdin.isTTY && options.selectRepoChoice) {
|
|
71
71
|
const repo = await options.selectRepoChoice(gitCandidate, pkgCandidate);
|
|
72
|
-
if (!repo) throw new
|
|
72
|
+
if (!repo) throw new CodedError(log.GHFS0012());
|
|
73
73
|
const normalizedRepo = normalizeRepo(repo);
|
|
74
|
-
if (!normalizedRepo || normalizedRepo !== gitCandidate.repo && normalizedRepo !== pkgCandidate.repo) throw new
|
|
74
|
+
if (!normalizedRepo || normalizedRepo !== gitCandidate.repo && normalizedRepo !== pkgCandidate.repo) throw new CodedError(log.GHFS0013({ value: repo }));
|
|
75
75
|
return {
|
|
76
76
|
repo: normalizedRepo,
|
|
77
77
|
source: normalizedRepo === gitCandidate.repo ? "git" : "package-json",
|
|
78
78
|
candidates
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
throw new
|
|
81
|
+
throw new CodedError(log.GHFS0014({
|
|
82
|
+
gitRepo: gitCandidate.repo,
|
|
83
|
+
pkgRepo: pkgCandidate.repo
|
|
84
|
+
}));
|
|
82
85
|
}
|
|
83
86
|
if (gitCandidate) return {
|
|
84
87
|
repo: gitCandidate.repo,
|
|
@@ -90,7 +93,7 @@ async function resolveRepo(options) {
|
|
|
90
93
|
source: "package-json",
|
|
91
94
|
candidates
|
|
92
95
|
};
|
|
93
|
-
throw new
|
|
96
|
+
throw new CodedError(log.GHFS0015());
|
|
94
97
|
}
|
|
95
98
|
function normalizeRepo(input) {
|
|
96
99
|
const trimmed = input.trim();
|
|
@@ -235,7 +238,12 @@ function wrapTextValue(value) {
|
|
|
235
238
|
function withErrorHandling(fn) {
|
|
236
239
|
return (...args) => {
|
|
237
240
|
fn(...args).catch((error) => {
|
|
238
|
-
|
|
241
|
+
if (error instanceof CodedError) {
|
|
242
|
+
const d = error.diagnostic;
|
|
243
|
+
console.error(c.red(`[${d.code}] ${d.message}`));
|
|
244
|
+
if (d.fix) console.error(c.dim(` fix: ${d.fix}`));
|
|
245
|
+
if (d.docs) console.error(c.dim(` see: ${d.docs}`));
|
|
246
|
+
} else console.error(error);
|
|
239
247
|
process.exit(1);
|
|
240
248
|
});
|
|
241
249
|
};
|
|
@@ -901,9 +909,9 @@ function setupSyncCommand(command) {
|
|
|
901
909
|
//#endregion
|
|
902
910
|
//#region src/cli/commands/ui.ts
|
|
903
911
|
function registerUiCommand(cli) {
|
|
904
|
-
cli.command("ui", "Launch a local web UI for the mirror").option("--repo <repo>", "GitHub repository in owner/name format").option("--port <port>", "Port to listen on", { default: 7710 }).option("--host <host>", "Host to bind", { default: "127.0.0.1" }).option("--no-open", "Do not open the browser automatically").action(withErrorHandling(async (options) => {
|
|
912
|
+
cli.command("ui", "Launch a local web UI for the mirror").option("--repo <repo>", "GitHub repository in owner/name format").option("--port <port>", "Port to listen on", { default: 7710 }).option("--host <host>", "Host to bind", { default: "127.0.0.1" }).option("--no-open", "Do not open the browser automatically").option("--no-portless", "Do not expose the UI through the portless reverse proxy").option("--subdomain <slug>", "Override the portless subdomain (defaults to the repository name)").option("--cwd <cwd>", "Project root directory (defaults to current directory)").action(withErrorHandling(async (options) => {
|
|
905
913
|
const printer = createCliPrinter("ui");
|
|
906
|
-
const config = await resolveConfig();
|
|
914
|
+
const config = await resolveConfig({ cwd: options.cwd ? resolve(options.cwd) : void 0 });
|
|
907
915
|
await ensureExecuteArtifacts(resolve(config.cwd, getExecuteFile(config)));
|
|
908
916
|
const repo = await resolveRepo({
|
|
909
917
|
cwd: config.cwd,
|
|
@@ -920,6 +928,8 @@ function registerUiCommand(cli) {
|
|
|
920
928
|
}).catch(() => "");
|
|
921
929
|
const port = typeof options.port === "number" ? options.port : Number(options.port ?? 7710);
|
|
922
930
|
const host = options.host ?? "127.0.0.1";
|
|
931
|
+
const portlessEnabled = options.portless !== false;
|
|
932
|
+
const subdomain = options.subdomain?.trim() || slugifyRepoName(repo.repo);
|
|
923
933
|
const server = await createUiServer({
|
|
924
934
|
config,
|
|
925
935
|
repo: repo.repo,
|
|
@@ -927,13 +937,24 @@ function registerUiCommand(cli) {
|
|
|
927
937
|
port,
|
|
928
938
|
host,
|
|
929
939
|
devMode: process.env.GHFS_UI_DEV === "1",
|
|
940
|
+
portless: portlessEnabled ? {
|
|
941
|
+
enabled: true,
|
|
942
|
+
subdomain
|
|
943
|
+
} : void 0,
|
|
944
|
+
logger: {
|
|
945
|
+
info: (message) => printer.info(message),
|
|
946
|
+
warn: (message) => printer.warn(message)
|
|
947
|
+
},
|
|
930
948
|
onRequestToken: async () => resolveAuthToken({
|
|
931
949
|
token: config.auth.token,
|
|
932
950
|
interactive: Boolean(process.stdin.isTTY),
|
|
933
951
|
promptForToken
|
|
934
952
|
})
|
|
935
953
|
});
|
|
936
|
-
|
|
954
|
+
if (server.portlessUrl) {
|
|
955
|
+
printer.info(`ghfs UI running at ${server.portlessUrl}`);
|
|
956
|
+
printer.info(` direct: ${server.directUrl}`);
|
|
957
|
+
} else printer.info(`ghfs UI running at ${server.directUrl}`);
|
|
937
958
|
if (!initialToken) printer.info("No GitHub token yet; sync/execute will prompt or fail until one is available.");
|
|
938
959
|
if (options.open !== false) {
|
|
939
960
|
const { default: open } = await import("open");
|
|
@@ -1,10 +1,153 @@
|
|
|
1
|
+
import { CodedError, consoleReporter, createLogger, defineDiagnostics } from "logs-sdk";
|
|
1
2
|
import { retry } from "@octokit/plugin-retry";
|
|
2
3
|
import { throttling } from "@octokit/plugin-throttling";
|
|
3
4
|
import { Octokit } from "octokit";
|
|
5
|
+
//#region src/diagnostics/index.ts
|
|
6
|
+
const diagnostics = defineDiagnostics({
|
|
7
|
+
docsBase: (code) => `https://github.com/antfu/ghfs/blob/main/docs/errors/${code.toLowerCase()}.md`,
|
|
8
|
+
codes: {
|
|
9
|
+
GHFS0001: {
|
|
10
|
+
message: "Missing GitHub token.",
|
|
11
|
+
fix: "Set GH_TOKEN or GITHUB_TOKEN, or run `gh auth login`."
|
|
12
|
+
},
|
|
13
|
+
GHFS0002: {
|
|
14
|
+
message: "Token prompt cancelled.",
|
|
15
|
+
fix: "Re-run the command and provide a token when prompted, or set GH_TOKEN/GITHUB_TOKEN."
|
|
16
|
+
},
|
|
17
|
+
GHFS0010: {
|
|
18
|
+
message: (p) => `Invalid --repo value: ${p.value}`,
|
|
19
|
+
fix: "Use `owner/name`, a full GitHub URL, or a git remote URL."
|
|
20
|
+
},
|
|
21
|
+
GHFS0011: {
|
|
22
|
+
message: (p) => `Invalid repo in ghfs.config.ts: ${p.value}`,
|
|
23
|
+
fix: "Use `owner/name`, a full GitHub URL, or a git remote URL."
|
|
24
|
+
},
|
|
25
|
+
GHFS0012: {
|
|
26
|
+
message: "Repository selection cancelled.",
|
|
27
|
+
fix: "Pass `--repo owner/name` or set `repo` in ghfs.config.ts to select non-interactively."
|
|
28
|
+
},
|
|
29
|
+
GHFS0013: {
|
|
30
|
+
message: (p) => `Invalid repository selection: ${p.value}`,
|
|
31
|
+
fix: "Pick one of the detected candidates or pass `--repo` explicitly."
|
|
32
|
+
},
|
|
33
|
+
GHFS0014: {
|
|
34
|
+
message: (p) => `Repo mismatch detected. git=${p.gitRepo} package.json=${p.pkgRepo}.`,
|
|
35
|
+
fix: "Use `--repo` to disambiguate."
|
|
36
|
+
},
|
|
37
|
+
GHFS0015: {
|
|
38
|
+
message: "Could not resolve repository.",
|
|
39
|
+
fix: "Provide `--repo` or set `repo` in ghfs.config.ts."
|
|
40
|
+
},
|
|
41
|
+
GHFS0016: {
|
|
42
|
+
message: (p) => `Invalid repo slug: ${p.repo}`,
|
|
43
|
+
fix: "Use the `owner/name` form."
|
|
44
|
+
},
|
|
45
|
+
GHFS0100: {
|
|
46
|
+
message: "Interactive execute prompts are unavailable.",
|
|
47
|
+
fix: "Use `--non-interactive` or provide prompts."
|
|
48
|
+
},
|
|
49
|
+
GHFS0101: {
|
|
50
|
+
message: (p) => `Operation conflict: remote updated_at=${p.remoteUpdatedAt}`,
|
|
51
|
+
fix: "Re-run `ghfs sync` to refresh tracked state, then retry the operation."
|
|
52
|
+
},
|
|
53
|
+
GHFS0102: { message: "Execution cancelled." },
|
|
54
|
+
GHFS0103: {
|
|
55
|
+
message: (p) => `Unsupported action: ${p.action}`,
|
|
56
|
+
fix: "Use one of the supported action names. See README for the list."
|
|
57
|
+
},
|
|
58
|
+
GHFS0104: { message: (p) => `Action ${p.action} requires ${p.issue} to be a pull request.` },
|
|
59
|
+
GHFS0105: {
|
|
60
|
+
message: (p) => `Failed to parse execute YAML: ${p.detail}`,
|
|
61
|
+
fix: "Check the YAML syntax in execute.yml."
|
|
62
|
+
},
|
|
63
|
+
GHFS0106: {
|
|
64
|
+
message: (p) => `Invalid execute file: ${p.detail}`,
|
|
65
|
+
fix: "Verify that every operation has the required fields and allowed types."
|
|
66
|
+
},
|
|
67
|
+
GHFS0107: {
|
|
68
|
+
message: (p) => `Invalid execute file: ${p.detail}`,
|
|
69
|
+
fix: "Use one of the supported action names."
|
|
70
|
+
},
|
|
71
|
+
GHFS0108: {
|
|
72
|
+
message: (p) => `Invalid execute file: ${p.detail}`,
|
|
73
|
+
fix: "Fix the listed rule violations and retry."
|
|
74
|
+
},
|
|
75
|
+
GHFS0150: {
|
|
76
|
+
message: "invalid quoted string syntax",
|
|
77
|
+
level: "warn"
|
|
78
|
+
},
|
|
79
|
+
GHFS0151: {
|
|
80
|
+
message: (p) => `unrecognized action pattern: ${p.command}`,
|
|
81
|
+
level: "warn"
|
|
82
|
+
},
|
|
83
|
+
GHFS0152: {
|
|
84
|
+
message: (p) => `${p.command} expects: ${p.syntax}`,
|
|
85
|
+
level: "warn"
|
|
86
|
+
},
|
|
87
|
+
GHFS0153: {
|
|
88
|
+
message: (p) => `${p.command} expects a single issue reference (#123)`,
|
|
89
|
+
level: "warn"
|
|
90
|
+
},
|
|
91
|
+
GHFS0154: {
|
|
92
|
+
message: (p) => `${p.command} requires at least one label`,
|
|
93
|
+
level: "warn"
|
|
94
|
+
},
|
|
95
|
+
GHFS0155: {
|
|
96
|
+
message: (p) => `${p.command} requires at least one assignee`,
|
|
97
|
+
level: "warn"
|
|
98
|
+
},
|
|
99
|
+
GHFS0156: {
|
|
100
|
+
message: (p) => `${p.command} requires a non-empty comment`,
|
|
101
|
+
level: "warn"
|
|
102
|
+
},
|
|
103
|
+
GHFS0157: {
|
|
104
|
+
message: (p) => `${p.command} expects one or more issue references (#123 #456)`,
|
|
105
|
+
level: "warn"
|
|
106
|
+
},
|
|
107
|
+
GHFS0160: {
|
|
108
|
+
message: (p) => `per-item: missing markdown for ${p.issue} (${p.path})`,
|
|
109
|
+
level: "warn"
|
|
110
|
+
},
|
|
111
|
+
GHFS0161: {
|
|
112
|
+
message: (p) => `per-item: invalid or missing frontmatter for ${p.issue}`,
|
|
113
|
+
level: "warn"
|
|
114
|
+
},
|
|
115
|
+
GHFS0200: {
|
|
116
|
+
message: "A sync is already in progress.",
|
|
117
|
+
fix: "Wait for the current sync to finish, then retry."
|
|
118
|
+
},
|
|
119
|
+
GHFS0201: {
|
|
120
|
+
message: "An execute is already in progress.",
|
|
121
|
+
fix: "Wait for the current execute run to finish, then retry."
|
|
122
|
+
},
|
|
123
|
+
GHFS0202: { message: (p) => `Queue entry not found: ${p.id}` },
|
|
124
|
+
GHFS0203: { message: (p) => `Cannot remove a per-item edit from the queue. Edit ${p.target} directly to adjust it.` },
|
|
125
|
+
GHFS0204: { message: "execute.md not found; cannot remove op." },
|
|
126
|
+
GHFS0205: { message: (p) => `Cannot edit ${p.source} ops from the queue panel.` },
|
|
127
|
+
GHFS0206: { message: (p) => p.detail },
|
|
128
|
+
GHFS0300: { message: (p) => `Unexpected patch response for pull ${p.issue}.` },
|
|
129
|
+
GHFS0301: {
|
|
130
|
+
message: (p) => `Milestone not found: ${p.value}`,
|
|
131
|
+
fix: "Create the milestone on GitHub, or pass its numeric id."
|
|
132
|
+
},
|
|
133
|
+
GHFS0400: { message: "Sync context was not initialized." },
|
|
134
|
+
GHFS0401: { message: (p) => `Missing tracked canonical data for ${p.issue}.` }
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/logger.ts
|
|
139
|
+
const log = createLogger({
|
|
140
|
+
diagnostics: [diagnostics],
|
|
141
|
+
reporters: [consoleReporter]
|
|
142
|
+
});
|
|
143
|
+
function formatInline(d) {
|
|
144
|
+
return `[${d.code}] ${d.message}`;
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
4
147
|
//#region src/utils/repo.ts
|
|
5
148
|
function splitRepo(repo) {
|
|
6
149
|
const [owner, name] = repo.split("/");
|
|
7
|
-
if (!owner || !name) throw new
|
|
150
|
+
if (!owner || !name) throw new CodedError(log.GHFS0016({ repo }));
|
|
8
151
|
return {
|
|
9
152
|
owner,
|
|
10
153
|
repo: name
|
|
@@ -130,6 +273,11 @@ function createGitHubProvider(options) {
|
|
|
130
273
|
const bumpRequestCount = () => {
|
|
131
274
|
requestCount += 1;
|
|
132
275
|
};
|
|
276
|
+
let authenticatedUserPromise = null;
|
|
277
|
+
const fetchAuthenticatedUserCached = () => {
|
|
278
|
+
if (!authenticatedUserPromise) authenticatedUserPromise = fetchAuthenticatedUser(octokit, bumpRequestCount);
|
|
279
|
+
return authenticatedUserPromise;
|
|
280
|
+
};
|
|
133
281
|
return {
|
|
134
282
|
paginateItems: (paginateOptions) => paginateItems(octokit, owner, repo, paginateOptions, bumpRequestCount),
|
|
135
283
|
fetchItems: (paginateOptions) => fetchItems(octokit, owner, repo, paginateOptions, bumpRequestCount),
|
|
@@ -138,10 +286,13 @@ function createGitHubProvider(options) {
|
|
|
138
286
|
fetchComments: (number) => fetchComments(octokit, owner, repo, number, bumpRequestCount),
|
|
139
287
|
fetchPullMetadata: (number) => fetchPullMetadata(octokit, owner, repo, number, bumpRequestCount),
|
|
140
288
|
fetchPullPatch: (number) => fetchPullPatch(octokit, owner, repo, number, bumpRequestCount),
|
|
289
|
+
fetchPullCommits: (number) => fetchPullCommits(octokit, owner, repo, number, bumpRequestCount),
|
|
290
|
+
fetchTimeline: (number) => fetchTimeline(octokit, owner, repo, number, bumpRequestCount),
|
|
141
291
|
fetchItemSnapshot: (number) => fetchItemSnapshot(octokit, owner, repo, number, bumpRequestCount),
|
|
142
292
|
fetchRepository: () => fetchRepository(octokit, owner, repo, bumpRequestCount),
|
|
143
293
|
fetchRepositoryLabels: () => fetchRepositoryLabels(octokit, owner, repo, bumpRequestCount),
|
|
144
294
|
fetchRepositoryMilestones: () => fetchRepositoryMilestones(octokit, owner, repo, bumpRequestCount),
|
|
295
|
+
fetchAuthenticatedUser: fetchAuthenticatedUserCached,
|
|
145
296
|
countUpdatedSince: (since) => countUpdatedSince(octokit, owner, repo, since, bumpRequestCount),
|
|
146
297
|
getRequestCount: () => requestCount,
|
|
147
298
|
actionClose: (number) => actionClose(octokit, owner, repo, number, bumpRequestCount),
|
|
@@ -230,10 +381,34 @@ async function fetchPullPatch(octokit, owner, repo, number, bumpRequestCount) {
|
|
|
230
381
|
mediaType: { format: "patch" }
|
|
231
382
|
});
|
|
232
383
|
if (typeof result.data === "string") return result.data;
|
|
233
|
-
throw new
|
|
384
|
+
throw new CodedError(log.GHFS0300({ issue: formatIssueNumber(number, {
|
|
234
385
|
repo: `${owner}/${repo}`,
|
|
235
386
|
kind: "pull"
|
|
236
|
-
})}
|
|
387
|
+
}) }));
|
|
388
|
+
}
|
|
389
|
+
async function fetchPullCommits(octokit, owner, repo, number, bumpRequestCount) {
|
|
390
|
+
bumpRequestCount();
|
|
391
|
+
return (await octokit.paginate(octokit.rest.pulls.listCommits, {
|
|
392
|
+
owner,
|
|
393
|
+
repo,
|
|
394
|
+
pull_number: number,
|
|
395
|
+
per_page: 100
|
|
396
|
+
})).map(mapPullCommit);
|
|
397
|
+
}
|
|
398
|
+
async function fetchTimeline(octokit, owner, repo, number, bumpRequestCount) {
|
|
399
|
+
bumpRequestCount();
|
|
400
|
+
const events = await octokit.paginate(octokit.rest.issues.listEventsForTimeline, {
|
|
401
|
+
owner,
|
|
402
|
+
repo,
|
|
403
|
+
issue_number: number,
|
|
404
|
+
per_page: 100
|
|
405
|
+
});
|
|
406
|
+
const out = [];
|
|
407
|
+
for (const event of events) {
|
|
408
|
+
const mapped = mapTimelineEvent(event);
|
|
409
|
+
if (mapped) out.push(mapped);
|
|
410
|
+
}
|
|
411
|
+
return out;
|
|
237
412
|
}
|
|
238
413
|
async function fetchItemSnapshot(octokit, owner, repo, number, bumpRequestCount) {
|
|
239
414
|
bumpRequestCount();
|
|
@@ -272,6 +447,19 @@ async function fetchRepositoryMilestones(octokit, owner, repo, bumpRequestCount)
|
|
|
272
447
|
per_page: 100
|
|
273
448
|
});
|
|
274
449
|
}
|
|
450
|
+
async function fetchAuthenticatedUser(octokit, bumpRequestCount) {
|
|
451
|
+
bumpRequestCount();
|
|
452
|
+
try {
|
|
453
|
+
const result = await octokit.rest.users.getAuthenticated();
|
|
454
|
+
return {
|
|
455
|
+
login: result.data.login,
|
|
456
|
+
name: result.data.name ?? null,
|
|
457
|
+
avatarUrl: result.data.avatar_url
|
|
458
|
+
};
|
|
459
|
+
} catch {
|
|
460
|
+
return null;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
275
463
|
async function countUpdatedSince(octokit, owner, repo, since, bumpRequestCount) {
|
|
276
464
|
bumpRequestCount();
|
|
277
465
|
const sinceQuery = normalizeSinceForSearch(since);
|
|
@@ -499,7 +687,7 @@ async function resolveMilestone(octokit, owner, repo, value, bumpRequestCount) {
|
|
|
499
687
|
state: "all",
|
|
500
688
|
per_page: 100
|
|
501
689
|
})).find((item) => item.title === value);
|
|
502
|
-
if (!matched) throw new
|
|
690
|
+
if (!matched) throw new CodedError(log.GHFS0301({ value }));
|
|
503
691
|
return matched.number;
|
|
504
692
|
}
|
|
505
693
|
function normalizeLockReason(reason) {
|
|
@@ -543,6 +731,137 @@ function mapComment(comment) {
|
|
|
543
731
|
reactions: mapReactions(comment.reactions)
|
|
544
732
|
};
|
|
545
733
|
}
|
|
734
|
+
function mapPullCommit(commit) {
|
|
735
|
+
return {
|
|
736
|
+
sha: commit.sha,
|
|
737
|
+
message: commit.commit.message,
|
|
738
|
+
authorLogin: commit.author?.login ?? null,
|
|
739
|
+
authorName: commit.commit.author?.name ?? null,
|
|
740
|
+
authorDate: commit.commit.author?.date ?? commit.commit.committer?.date ?? "",
|
|
741
|
+
committerLogin: commit.committer?.login ?? null,
|
|
742
|
+
committerDate: commit.commit.committer?.date ?? commit.commit.author?.date ?? "",
|
|
743
|
+
...commit.html_url ? { url: commit.html_url } : {}
|
|
744
|
+
};
|
|
745
|
+
}
|
|
746
|
+
function mapTimelineEvent(event) {
|
|
747
|
+
const eventName = event.event;
|
|
748
|
+
if (!eventName) return null;
|
|
749
|
+
if (eventName === "committed" && event.sha) {
|
|
750
|
+
const createdAt = event.committer?.date ?? event.author?.date;
|
|
751
|
+
if (!createdAt) return null;
|
|
752
|
+
const fullMessage = event.message ?? "";
|
|
753
|
+
const firstLine = fullMessage.split("\n", 1)[0] ?? "";
|
|
754
|
+
return {
|
|
755
|
+
id: `commit:${event.sha}`,
|
|
756
|
+
kind: "committed",
|
|
757
|
+
createdAt,
|
|
758
|
+
actor: event.author?.name ?? event.committer?.name ?? null,
|
|
759
|
+
sha: event.sha,
|
|
760
|
+
commitMessage: firstLine,
|
|
761
|
+
body: fullMessage
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
const createdAt = event.created_at ?? event.submitted_at;
|
|
765
|
+
if (!createdAt) return null;
|
|
766
|
+
const id = event.id != null ? String(event.id) : `${eventName}:${createdAt}`;
|
|
767
|
+
const actor = event.actor?.login ?? event.user?.login ?? null;
|
|
768
|
+
const base = {
|
|
769
|
+
id,
|
|
770
|
+
kind: "unknown",
|
|
771
|
+
createdAt,
|
|
772
|
+
actor
|
|
773
|
+
};
|
|
774
|
+
switch (eventName) {
|
|
775
|
+
case "closed":
|
|
776
|
+
case "reopened":
|
|
777
|
+
case "merged":
|
|
778
|
+
case "locked":
|
|
779
|
+
case "unlocked":
|
|
780
|
+
case "ready_for_review":
|
|
781
|
+
case "convert_to_draft":
|
|
782
|
+
case "head_ref_deleted":
|
|
783
|
+
case "head_ref_restored":
|
|
784
|
+
case "head_ref_force_pushed": return {
|
|
785
|
+
...base,
|
|
786
|
+
kind: eventName,
|
|
787
|
+
...event.state_reason ? { stateReason: event.state_reason } : {}
|
|
788
|
+
};
|
|
789
|
+
case "labeled":
|
|
790
|
+
case "unlabeled":
|
|
791
|
+
if (!event.label) return null;
|
|
792
|
+
return {
|
|
793
|
+
...base,
|
|
794
|
+
kind: eventName,
|
|
795
|
+
label: {
|
|
796
|
+
name: event.label.name,
|
|
797
|
+
color: event.label.color ?? ""
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
case "assigned":
|
|
801
|
+
case "unassigned":
|
|
802
|
+
if (!event.assignee?.login) return null;
|
|
803
|
+
return {
|
|
804
|
+
...base,
|
|
805
|
+
kind: eventName,
|
|
806
|
+
assignee: event.assignee.login
|
|
807
|
+
};
|
|
808
|
+
case "review_requested":
|
|
809
|
+
case "review_request_removed": {
|
|
810
|
+
const reviewer = event.requested_reviewer?.login ?? event.requested_team?.name;
|
|
811
|
+
if (!reviewer) return null;
|
|
812
|
+
return {
|
|
813
|
+
...base,
|
|
814
|
+
kind: eventName,
|
|
815
|
+
requestedReviewer: reviewer
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
case "reviewed": {
|
|
819
|
+
const rawState = event.state ?? "commented";
|
|
820
|
+
return {
|
|
821
|
+
...base,
|
|
822
|
+
kind: "reviewed",
|
|
823
|
+
review: {
|
|
824
|
+
state: normalizeReviewState(rawState),
|
|
825
|
+
body: event.body ?? null,
|
|
826
|
+
submittedAt: event.submitted_at ?? createdAt
|
|
827
|
+
},
|
|
828
|
+
body: event.body ?? null
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
case "commented": return {
|
|
832
|
+
...base,
|
|
833
|
+
kind: "commented",
|
|
834
|
+
commentId: typeof event.id === "number" ? event.id : void 0,
|
|
835
|
+
body: event.body ?? null
|
|
836
|
+
};
|
|
837
|
+
case "renamed":
|
|
838
|
+
if (!event.rename) return null;
|
|
839
|
+
return {
|
|
840
|
+
...base,
|
|
841
|
+
kind: "renamed",
|
|
842
|
+
rename: {
|
|
843
|
+
from: event.rename.from,
|
|
844
|
+
to: event.rename.to
|
|
845
|
+
}
|
|
846
|
+
};
|
|
847
|
+
case "referenced":
|
|
848
|
+
case "cross-referenced": return {
|
|
849
|
+
...base,
|
|
850
|
+
kind: eventName
|
|
851
|
+
};
|
|
852
|
+
default:
|
|
853
|
+
if (!actor) return null;
|
|
854
|
+
return {
|
|
855
|
+
...base,
|
|
856
|
+
kind: "unknown"
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
function normalizeReviewState(state) {
|
|
861
|
+
const lower = state.toLowerCase();
|
|
862
|
+
if (lower === "approved" || lower === "changes_requested" || lower === "commented" || lower === "dismissed" || lower === "pending") return lower;
|
|
863
|
+
return "commented";
|
|
864
|
+
}
|
|
546
865
|
function mapReactions(reactions) {
|
|
547
866
|
return normalizeReactions({
|
|
548
867
|
totalCount: reactions?.total_count,
|
|
@@ -567,4 +886,4 @@ function createRepositoryProvider(options) {
|
|
|
567
886
|
});
|
|
568
887
|
}
|
|
569
888
|
//#endregion
|
|
570
|
-
export { formatIssueNumber as a, formatDuration as i, normalizeReactions as n, formatTerminalLink as o, countNoun as r, formatValue as s, createRepositoryProvider as t };
|
|
889
|
+
export { formatIssueNumber as a, CodedError as c, diagnostics as d, formatDuration as i, formatInline as l, normalizeReactions as n, formatTerminalLink as o, countNoun as r, formatValue as s, createRepositoryProvider as t, log as u };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as ProviderItemSnapshot, d as IssueState, f as GhfsResolvedConfig, i as ProviderItem, l as RepositoryProvider, n as ProviderComment, o as ProviderLockReason, p as GhfsUserConfig, s as ProviderPullMetadata, t as PaginateItemsOptions, u as IssueKind } from "./provider-DCIsHVeA.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/providers/factory.d.ts
|
|
4
4
|
interface CreateRepositoryProviderOptions {
|
package/dist/index.mjs
CHANGED
|
@@ -113,6 +113,44 @@ interface ProviderPullMetadata {
|
|
|
113
113
|
headRef: string;
|
|
114
114
|
requestedReviewers: string[];
|
|
115
115
|
}
|
|
116
|
+
interface ProviderCommit {
|
|
117
|
+
sha: string;
|
|
118
|
+
message: string;
|
|
119
|
+
authorLogin: string | null;
|
|
120
|
+
authorName: string | null;
|
|
121
|
+
authorDate: string;
|
|
122
|
+
committerLogin: string | null;
|
|
123
|
+
committerDate: string;
|
|
124
|
+
url?: string;
|
|
125
|
+
}
|
|
126
|
+
type ProviderTimelineEventKind = 'committed' | 'closed' | 'reopened' | 'merged' | 'labeled' | 'unlabeled' | 'assigned' | 'unassigned' | 'review_requested' | 'review_request_removed' | 'reviewed' | 'commented' | 'renamed' | 'head_ref_force_pushed' | 'head_ref_deleted' | 'head_ref_restored' | 'locked' | 'unlocked' | 'ready_for_review' | 'convert_to_draft' | 'referenced' | 'cross-referenced' | 'unknown';
|
|
127
|
+
type ProviderReviewState = 'approved' | 'changes_requested' | 'commented' | 'dismissed' | 'pending';
|
|
128
|
+
interface ProviderTimelineEvent {
|
|
129
|
+
id: string;
|
|
130
|
+
kind: ProviderTimelineEventKind;
|
|
131
|
+
createdAt: string;
|
|
132
|
+
actor: string | null;
|
|
133
|
+
sha?: string;
|
|
134
|
+
commitMessage?: string;
|
|
135
|
+
label?: {
|
|
136
|
+
name: string;
|
|
137
|
+
color: string;
|
|
138
|
+
};
|
|
139
|
+
assignee?: string;
|
|
140
|
+
requestedReviewer?: string;
|
|
141
|
+
review?: {
|
|
142
|
+
state: ProviderReviewState;
|
|
143
|
+
body: string | null;
|
|
144
|
+
submittedAt: string;
|
|
145
|
+
};
|
|
146
|
+
commentId?: number;
|
|
147
|
+
body?: string | null;
|
|
148
|
+
rename?: {
|
|
149
|
+
from: string;
|
|
150
|
+
to: string;
|
|
151
|
+
};
|
|
152
|
+
stateReason?: string | null;
|
|
153
|
+
}
|
|
116
154
|
interface ProviderRepository {
|
|
117
155
|
name: string;
|
|
118
156
|
full_name: string;
|
|
@@ -139,6 +177,11 @@ interface ProviderLabel {
|
|
|
139
177
|
description: string | null;
|
|
140
178
|
default: boolean;
|
|
141
179
|
}
|
|
180
|
+
interface ProviderAuthenticatedUser {
|
|
181
|
+
login: string;
|
|
182
|
+
name: string | null;
|
|
183
|
+
avatarUrl: string;
|
|
184
|
+
}
|
|
142
185
|
interface ProviderMilestone {
|
|
143
186
|
number: number;
|
|
144
187
|
title: string;
|
|
@@ -173,10 +216,13 @@ interface RepositoryProvider {
|
|
|
173
216
|
fetchComments: (number: number) => Promise<ProviderComment[]>;
|
|
174
217
|
fetchPullMetadata: (number: number) => Promise<ProviderPullMetadata>;
|
|
175
218
|
fetchPullPatch: (number: number) => Promise<string>;
|
|
219
|
+
fetchPullCommits: (number: number) => Promise<ProviderCommit[]>;
|
|
220
|
+
fetchTimeline: (number: number) => Promise<ProviderTimelineEvent[]>;
|
|
176
221
|
fetchItemSnapshot: (number: number) => Promise<ProviderItemSnapshot>;
|
|
177
222
|
fetchRepository: () => Promise<ProviderRepository>;
|
|
178
223
|
fetchRepositoryLabels: () => Promise<ProviderLabel[]>;
|
|
179
224
|
fetchRepositoryMilestones: () => Promise<ProviderMilestone[]>;
|
|
225
|
+
fetchAuthenticatedUser: () => Promise<ProviderAuthenticatedUser | null>;
|
|
180
226
|
countUpdatedSince: (since: string) => Promise<ProviderUpdateCounts>;
|
|
181
227
|
getRequestCount: () => number;
|
|
182
228
|
actionClose: (number: number) => Promise<void>;
|
|
@@ -200,4 +246,4 @@ interface RepositoryProvider {
|
|
|
200
246
|
actionConvertToDraft: (number: number) => Promise<void>;
|
|
201
247
|
}
|
|
202
248
|
//#endregion
|
|
203
|
-
export {
|
|
249
|
+
export { ProviderItemSnapshot as a, ProviderTimelineEvent as c, IssueState as d, GhfsResolvedConfig as f, ProviderItem as i, RepositoryProvider as l, ProviderComment as n, ProviderLockReason as o, GhfsUserConfig as p, ProviderCommit as r, ProviderPullMetadata as s, PaginateItemsOptions as t, IssueKind as u };
|