collabmd 0.1.40 → 0.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -0
- package/dist/client/assets/{CodeMirrorEditor-UCMRAMCV-CjJV4GGp.js → CodeMirrorEditor-UCMRAMCV-DHEFSr_E.js} +1 -1
- package/dist/client/assets/{ar-SA-NXDWD63E-BfWwfLiP.js → ar-SA-NXDWD63E-S8m2UyIj.js} +1 -1
- package/dist/client/assets/{arc-B59iLcOr.js → arc-OeTCl9Oy.js} +1 -1
- package/dist/client/assets/architecture-7EHR7CIX-BQpCYB3J.js +1 -0
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-Cs4u0ty-.js → architectureDiagram-3BPJPVTR-CDqq0KA0.js} +2 -2
- package/dist/client/assets/{az-AZ-MXSORGZV-D3w9H6nC.js → az-AZ-MXSORGZV-DSzWvZBB.js} +1 -1
- package/dist/client/assets/bases-preview-controller-CBHDzzot.js +143 -0
- package/dist/client/assets/{bg-BG-O6MV2KSF-CqITeIE6.js → bg-BG-O6MV2KSF-C5nBekx3.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-C4RLg7wo.js → blockDiagram-GPEHLZMM-Z9jBLpGg.js} +1 -1
- package/dist/client/assets/{bn-IN-MMW2ORAC-BZcsVFhS.js → bn-BD-T2VJNT7N-D-8xXOzM.js} +1 -1
- package/dist/client/assets/{bn-BD-T2VJNT7N-DRxwOMG_.js → bn-IN-MMW2ORAC-D-8xXOzM.js} +1 -1
- package/dist/client/assets/button-2ZnWQkWV.js +1 -0
- package/dist/client/assets/{c4Diagram-AAUBKEIU-DMK9WIWS.js → c4Diagram-AAUBKEIU-UA_Eopag.js} +1 -1
- package/dist/client/assets/{ca-ES-MKBCGNOG-D2cujUJ7.js → ca-ES-MKBCGNOG-B3Ly68p3.js} +1 -1
- package/dist/client/assets/channel-CpvwJaGK.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-Beqll06X.js → chunk-2J33WTMH-DjYq2kZ3.js} +1 -1
- package/dist/client/assets/{chunk-3OPIFGDE-Kf30X6bZ.js → chunk-3OPIFGDE-DucrRywM.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-BVNkn9EH.js → chunk-4BX2VUAB-DcdHBPEH.js} +1 -1
- package/dist/client/assets/{chunk-4EGX6M5U-6L36_8q8.js → chunk-4EGX6M5U-BfCFom1o.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-CaPPZbdp.js → chunk-55IACEB6-B7ycySPI.js} +1 -1
- package/dist/client/assets/{chunk-5DO6E6H7-BpgUf0HE.js → chunk-5DO6E6H7-DP8QnaJj.js} +1 -1
- package/dist/client/assets/{chunk-5ZQYHXKU-BJyABJSy.js → chunk-5ZQYHXKU-C4q4UVKa.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-DNANnyAn.js → chunk-727SXJPM-DdWH2cfs.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-D-ou9vaq.js → chunk-AQP2D5EJ-D8o8QwFY.js} +1 -1
- package/dist/client/assets/{chunk-BR22UD5L-CHoFxkAQ.js → chunk-BR22UD5L-CT6fcRkN.js} +1 -1
- package/dist/client/assets/{chunk-BSJP7CBP-AmT6zI00.js → chunk-BSJP7CBP-COmh28sk.js} +1 -1
- package/dist/client/assets/{chunk-CSCIHK7Q-BIoF4mTy.js → chunk-CSCIHK7Q-D0bHjxCO.js} +2 -2
- package/dist/client/assets/{chunk-FHYWG6QK-qLbgayZT.js → chunk-FHYWG6QK-Ce318laP.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-DD6CIukb.js → chunk-FMBD7UC4-CM39cCCr.js} +1 -1
- package/dist/client/assets/{chunk-KSCS5N6A-DSHzBB4H.js → chunk-KSCS5N6A-Bk33m7yK.js} +1 -1
- package/dist/client/assets/{chunk-L5ZTLDWV-Ca0loQr2.js → chunk-L5ZTLDWV-J2sQu4Os.js} +1 -1
- package/dist/client/assets/{chunk-LZXEDZCA-D4QboL2E.js → chunk-LZXEDZCA-CTmBbzaL.js} +2 -2
- package/dist/client/assets/chunk-MMN3DZ5N-pTRxhVYl.js +35 -0
- package/dist/client/assets/{chunk-MPE355IW-BGGMthoR.js → chunk-MPE355IW-C_vkbqLj.js} +1 -1
- package/dist/client/assets/{chunk-MZUSXYTE-CXyCvcyW.js → chunk-MZUSXYTE-BnVcgphH.js} +1 -1
- package/dist/client/assets/{chunk-N66VUXT2-CZ58QOjk.js → chunk-N66VUXT2-B6CG-CnY.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-3Xs0Awks.js → chunk-ND2GUHAM-D-_vkA5V.js} +1 -1
- package/dist/client/assets/{chunk-NNHCCRGN--8l6bbR-.js → chunk-NNHCCRGN-DlpIbxXb.js} +6 -6
- package/dist/client/assets/{chunk-NZK2D7GU-w2jXiKa6.js → chunk-NZK2D7GU-Dc42C0Jt.js} +1 -1
- package/dist/client/assets/{chunk-O5CBEL6O-BFgstMja.js → chunk-O5CBEL6O-DdEDfb8z.js} +1 -1
- package/dist/client/assets/{chunk-PUPMXCY4-JvkUXyIj.js → chunk-PUPMXCY4-BZ88kQjK.js} +1 -1
- package/dist/client/assets/chunk-QZHKN3VN-D5YLQvjj.js +1 -0
- package/dist/client/assets/{chunk-SRAX5OIU-C_UPA-vt.js → chunk-SRAX5OIU-CiRgnkYo.js} +1 -1
- package/dist/client/assets/{chunk-UIBZB4QT-B4OybPy_.js → chunk-UIBZB4QT-r8p3pBHw.js} +1 -1
- package/dist/client/assets/{chunk-WCWK7LTN-BOL8a2ua.js → chunk-WCWK7LTN-DrKYkgXF.js} +1 -1
- package/dist/client/assets/chunk-WU5MYG2G-Cg2iUbET.js +1 -0
- package/dist/client/assets/{chunk-XPW4576I-D5FnFhOk.js → chunk-XPW4576I-BZyvtu42.js} +1 -1
- package/dist/client/assets/{chunk-Z5NKEFVG-GcpeeLo6.js → chunk-Z5NKEFVG-Dknufskm.js} +7 -7
- package/dist/client/assets/classDiagram-4FO5ZUOK-CGWY0cfg.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CGWY0cfg.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-Cx3Qt7pR.js → cose-bilkent-S5V4N54A-BuQb9WEM.js} +1 -1
- package/dist/client/assets/{cs-CZ-V77HGUP7-BXqhmWZb.js → cs-CZ-V77HGUP7-6BCNHMpz.js} +1 -1
- package/dist/client/assets/{cytoscape.esm-B_ygTtvl.js → cytoscape.esm-DelgaX4f.js} +2 -2
- package/dist/client/assets/{da-DK-I5RFNTM4-raD_lQnT.js → da-DK-I5RFNTM4-CVeCWpi2.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-BpURvxT4.js → dagre-BM42HDAG-ux5hA7G6.js} +1 -1
- package/dist/client/assets/{dagre-BcZLxzJJ.js → dagre-Bx709z4p.js} +1 -1
- package/dist/client/assets/{de-CH-WLRDEVBV-CyNG_YAO.js → de-CH-WLRDEVBV-CV-FNCkY.js} +1 -1
- package/dist/client/assets/{de-DE-DTI4WUSC-BAnqlByT.js → de-DE-DTI4WUSC-CV-FNCkY.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-DJH0JVlq.js → diagram-2AECGRRQ-Cx-EPj3F.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-DQG4Q1eS.js → diagram-5GNKFQAL-B6qUTxVg.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-hx21Lv-5.js → diagram-KO2AKTUF-BedClayW.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47--QODJMa9.js → diagram-LMA3HP47-DCwyG0i5.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-CB30hX1a.js → diagram-OG6HWLK6-BZD0jSxR.js} +1 -1
- package/dist/client/assets/diagram-action-icons-aa_KOv9h.js +36 -0
- package/dist/client/assets/{dist-DCqHC6ts.js → dist-B-m0-H59.js} +1 -1
- package/dist/client/assets/dist-B6Q0y0J8.js +1 -0
- package/dist/client/assets/dist-BCQCG0we.js +1 -0
- package/dist/client/assets/{dist-6oqNX0NJ.js → dist-BEyxdnUD.js} +1 -1
- package/dist/client/assets/{dist-Dv_PLWtE.js → dist-BYneHrvV.js} +1 -1
- package/dist/client/assets/dist-BsPHL5xw2.js +1 -0
- package/dist/client/assets/{dist-BBsYBvEp.js → dist-CX-kKEdL.js} +1 -1
- package/dist/client/assets/{dist-DSehUDUA.js → dist-CaLooK5r.js} +1 -1
- package/dist/client/assets/{dist-BOA6xeuH.js → dist-Cd4FT8TV.js} +1 -1
- package/dist/client/assets/{dist-q3smPWAL.js → dist-ClWZ99Dh.js} +1 -1
- package/dist/client/assets/{dist-D5hPoFa5.js → dist-D01mg-Uh.js} +1 -1
- package/dist/client/assets/{dist-CJMPm6rd.js → dist-D36UTodj.js} +1 -1
- package/dist/client/assets/{dist-CtHMYO6t.js → dist-D6YOhZ_d.js} +1 -1
- package/dist/client/assets/{dist-U35xPXYU.js → dist-D8jTFU06.js} +1 -1
- package/dist/client/assets/dist-DGI-0uwF.js +1 -0
- package/dist/client/assets/{dist-D5BVeoD4.js → dist-DGO-wCq8.js} +1 -1
- package/dist/client/assets/dist-DMKYvLqD.js +1 -0
- package/dist/client/assets/{dist-CDsAhnoa.js → dist-DRQhk99i.js} +1 -1
- package/dist/client/assets/{dist-wA96SVn6.js → dist-DScq22KK.js} +1 -1
- package/dist/client/assets/{dist-BQuic6-d.js → dist-DbpddOpB.js} +1 -1
- package/dist/client/assets/{dist-x4M0Qd0y.js → dist-Dl5uZm2T.js} +1 -1
- package/dist/client/assets/{dist-BsTc7qjG.js → dist-DvpEZjAN.js} +1 -1
- package/dist/client/assets/dist-Dw8hKOQm.js +1 -0
- package/dist/client/assets/{dist-Bhn_Fiol.js → dist-G7j-noyR.js} +1 -1
- package/dist/client/assets/dist-PItC1DRE.js +1 -0
- package/dist/client/assets/{dist-CAlqrzaF.js → dist-cMoydUa-.js} +1 -1
- package/dist/client/assets/dist-cTuGB1EW.js +9 -0
- package/dist/client/assets/{dist-DFzJ8okV.js → dist-efgaKpVU.js} +1 -1
- package/dist/client/assets/{dist-Dx8yU-RA.js → dist-nx-MGJIM.js} +1 -1
- package/dist/client/assets/{dist-UnjH15yg.js → dist-pww3cL4Q.js} +7 -7
- package/dist/client/assets/dist-uhQ-mkuh.js +2 -0
- package/dist/client/assets/{dockerfile-D8_6_FRV.js → dockerfile-BLkNEvjs.js} +1 -1
- package/dist/client/assets/drawio-editor-BM_W6Lkj.js +9 -0
- package/dist/client/assets/drawio-embed-controller-BKHnRnaj.js +1 -0
- package/dist/client/assets/drawioEditor-DBfHYCO5.js +2 -0
- package/dist/client/assets/{editor-session-BTPe8PEu.js → editor-session-VueuoR_r.js} +2 -2
- package/dist/client/assets/{el-GR-ZXDJ2OS4-De6xlnXD.js → el-GR-ZXDJ2OS4-DzgGVibO.js} +1 -1
- package/dist/client/assets/{en-CMP6EMR6-Bfz_MnNa.js → en-CMP6EMR6-l-4iz8RC.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-BvMeaml9.js → erDiagram-TEJ5UH35-7XmGIzui.js} +1 -1
- package/dist/client/assets/{es-ES-DYQHAD43-EVQAeFTZ.js → es-ES-DYQHAD43-DP98e8ox.js} +1 -1
- package/dist/client/assets/{eu-ES-QDSYU5Y3-O5XEQp0x.js → eu-ES-QDSYU5Y3-DrEfH-2N.js} +1 -1
- package/dist/client/assets/eventmodeling-FCH6USID-D-VxYsbw.js +1 -0
- package/dist/client/assets/excalidraw-editor-B3ffLqi6.css +1 -0
- package/dist/client/assets/{excalidraw-editor-DzL1T9D9.js → excalidraw-editor-C6fTkMBx.js} +4 -4
- package/dist/client/assets/excalidraw-embed-controller-BKx05cjZ.js +1 -0
- package/dist/client/assets/excalidraw-embed-reconciler-DGiagExg.js +1 -0
- package/dist/client/assets/{excalidraw-mermaid-stub-B5sWezsO.js → excalidraw-mermaid-stub-DE5FTiZB.js} +1 -1
- package/dist/client/assets/excalidraw-scene-DjODomMW.js +176 -0
- package/dist/client/assets/excalidrawEditor-DQD_lLF4.js +2 -0
- package/dist/client/assets/{export-page-BkCqT_2s.js → export-page-D0iHYSPi.js} +4 -4
- package/dist/client/assets/exportDocument-Ct-Zvf7_.js +2 -0
- package/dist/client/assets/{fa-IR-26LZG4PM-BlqI3v_N.js → fa-IR-26LZG4PM-CEwnMxEY.js} +1 -1
- package/dist/client/assets/{factor-Cz-hzBGH.js → factor-D7LVTn2l.js} +1 -1
- package/dist/client/assets/{fi-FI-6YS4KDE4-af5Lkv-j.js → fi-FI-6YS4KDE4-DPKGe_vC.js} +1 -1
- package/dist/client/assets/file-history-view-controller-CK3oHDCT.js +112 -0
- package/dist/client/assets/{flowDiagram-I6XJVG4X-DgXXcK8y.js → flowDiagram-I6XJVG4X-DgTAG2K2.js} +2 -2
- package/dist/client/assets/{fr-FR-BRLLPTZC-CwQyur9E.js → fr-FR-BRLLPTZC-CgMmN9yd.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-BMpbo3vT.js → ganttDiagram-6RSMTGT7-Curra433.js} +1 -1
- package/dist/client/assets/git-diff-view-controller-qorJ_Quo.js +150 -0
- package/dist/client/assets/git-panel-controller-DG8ws6B_.js +203 -0
- package/dist/client/assets/gitGraph-WXDBUCRP-CRS5XD98.js +1 -0
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-CCdpTNJZ.js → gitGraphDiagram-PVQCEYII-DVf7-iH0.js} +1 -1
- package/dist/client/assets/{gl-ES-OKUZTLYG-BNEoLCI4.js → gl-ES-OKUZTLYG-qCIGpEXP.js} +1 -1
- package/dist/client/assets/{haxe-CcPA1xnA.js → haxe-DjVOVvNP.js} +1 -1
- package/dist/client/assets/{he-IL-26MGYIU7-WnVF9HP3.js → he-IL-26MGYIU7-_Pd-m9Sj.js} +1 -1
- package/dist/client/assets/{hi-IN-Q4ZOGTP2-DcU7ec07.js → hi-IN-Q4ZOGTP2-B4kd5rva.js} +1 -1
- package/dist/client/assets/{hu-HU-P2OXPSN5-wmJyK1Wq.js → hu-HU-P2OXPSN5-DL2sEPhQ.js} +1 -1
- package/dist/client/assets/{id-ID-2EIKXYN6-BTvn0aFf.js → id-ID-2EIKXYN6-DqXHubyc.js} +1 -1
- package/dist/client/assets/image-MLCQRF34-BT938jMR.js +1 -0
- package/dist/client/assets/index-AdGl0Mjr.js +2 -0
- package/dist/client/assets/index-V7z92VYK.css +1 -0
- package/dist/client/assets/info-J43DQDTF-CdrjkAmK.js +1 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA-oYw2qnNY.js → infoDiagram-5YYISTIA-DT8NjvZp.js} +1 -1
- package/dist/client/assets/input-CXk9Zxz9.js +1 -0
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-BPqURwBR.js → ishikawaDiagram-YF4QCWOH-axeWdm72.js} +1 -1
- package/dist/client/assets/{it-IT-4CFKVXI2-CC_iQxXu.js → it-IT-4CFKVXI2-CyToZF8R.js} +1 -1
- package/dist/client/assets/{ja-JP-MAND2Z4V-ConJI8GA.js → ja-JP-MAND2Z4V-CdMMUzyq.js} +1 -1
- package/dist/client/assets/{javascript-gTK9fxz6.js → javascript-B9TABJff.js} +1 -1
- package/dist/client/assets/javascript-BRzqD9BA.js +1 -0
- package/dist/client/assets/{journeyDiagram-JHISSGLW-CvxY2Fte.js → journeyDiagram-JHISSGLW-_K7qmGID.js} +1 -1
- package/dist/client/assets/{jsx-runtime-IB1e1gmy.js → jsx-runtime-DqMcooe2.js} +1 -1
- package/dist/client/assets/{kaa-HQRTCXTJ-Caqwh_Qr.js → kaa-HQRTCXTJ-D6kVHP9w.js} +1 -1
- package/dist/client/assets/{kab-KAB-JKIKKTGH-DQBmYNc9.js → kab-KAB-JKIKKTGH-XYCYTUmV.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-Ex7702dO.js → kanban-definition-UN3LZRKU-DaPREf-3.js} +1 -1
- package/dist/client/assets/keyboard-shortcuts-Ctp9_GHy.js +1 -0
- package/dist/client/assets/{kk-KZ-HXQ63ZFC-O5qp74q-.js → kk-KZ-HXQ63ZFC-Du2sGLmI.js} +1 -1
- package/dist/client/assets/{km-KH-PKL3LSGX-2wUYTyyo.js → km-KH-PKL3LSGX-B2OnEat4.js} +1 -1
- package/dist/client/assets/{ko-KR-KXLREZX3-CYtUnW5t.js → ko-KR-KXLREZX3-CcxALsEE.js} +1 -1
- package/dist/client/assets/{ku-TR-MJ4IER3X-DtEKOAU3.js → ku-TR-MJ4IER3X-HDyr9f4z.js} +1 -1
- package/dist/client/assets/{line-DRJILpPI.js → line-CbpIuf9e.js} +1 -1
- package/dist/client/assets/{linear-rFRiXd2u.js → linear-BGe2G4b5.js} +1 -1
- package/dist/client/assets/{lt-LT-H6WFQ6FJ-Cs17Ppdf.js → lt-LT-H6WFQ6FJ-BzZe8pg9.js} +1 -1
- package/dist/client/assets/{lv-LV-GOCK6SJW-DYuTyosz.js → lv-LV-GOCK6SJW-CMspwH0q.js} +1 -1
- package/dist/client/assets/main-C8f6FlSO.js +789 -0
- package/dist/client/assets/{mermaid-parser.core-BD_OCbyj.js → mermaid-parser.core-C4gZtCl9.js} +2 -2
- package/dist/client/assets/{mermaid-runtime-CEgpdpwB.js → mermaid-runtime-CX_vmg3J.js} +3 -3
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-D4pwLdMH.js → mindmap-definition-RKZ34NQL-DB1uitpo.js} +1 -1
- package/dist/client/assets/{mr-IN-IXVLDMEQ-CIJFnklt.js → mr-IN-IXVLDMEQ-C6mqoMmX.js} +1 -1
- package/dist/client/assets/{my-MM-YG6MYTTD-em_7TGWX.js → my-MM-YG6MYTTD-Q33bVx2B.js} +1 -1
- package/dist/client/assets/navigation-D173qvIt.css +1 -0
- package/dist/client/assets/{nb-NO-XGWJISD2-BLNgPVDj.js → nb-NO-XGWJISD2-B1jdnBFb.js} +1 -1
- package/dist/client/assets/{nl-NL-XVDVCPNC-CComxzvg.js → nl-NL-XVDVCPNC-DoQkA2lu.js} +1 -1
- package/dist/client/assets/{nn-NO-EMX5MJX5-Cekj8s_-.js → nn-NO-EMX5MJX5-Db3tHf5b.js} +1 -1
- package/dist/client/assets/{nsis-QPGhLAeY.js → nsis-AQ_alPln.js} +1 -1
- package/dist/client/assets/{oc-FR-ROEINTVO-DW-kHJ81.js → oc-FR-ROEINTVO-DLu-4Ze0.js} +1 -1
- package/dist/client/assets/{ordinal-De-qfORd.js → ordinal-hYBb2elL.js} +1 -1
- package/dist/client/assets/{pa-IN-ZYN6SUDY-CnhULOGp.js → pa-IN-ZYN6SUDY-XvJuMxJR.js} +1 -1
- package/dist/client/assets/packet-YPE3B663-r4oAflYS.js +1 -0
- package/dist/client/assets/percentages-5DKR754L-D_KAYeu8.js +1 -0
- package/dist/client/assets/{pica-DcQ1xKp1.js → pica-DjQMjoX_.js} +1 -1
- package/dist/client/assets/pie-LRSECV5Y-DkaVktH1.js +1 -0
- package/dist/client/assets/{pieDiagram-4H26LBE5-C6MCExtR.js → pieDiagram-4H26LBE5-CdDwk3iQ.js} +1 -1
- package/dist/client/assets/{pl-PL-6VTG7PHC-C9rBsz9v.js → pl-PL-6VTG7PHC-DjJq8QfA.js} +1 -1
- package/dist/client/assets/preview-diagram-utils-DnqteI9Q.js +1 -0
- package/dist/client/assets/preview-render-compiler-Dts88fM3.js +35 -0
- package/dist/client/assets/preview-render-compiler-VKNqrOZN.js +1 -0
- package/dist/client/assets/preview-render-profile-CU6rvKx3.js +23 -0
- package/dist/client/assets/preview-render-worker-CFKBP7xz.js +59 -0
- package/dist/client/assets/{pt-BR-5YFKRR5G-BVyxOCjg.js → pt-BR-5YFKRR5G-Dg2lIz1V.js} +1 -1
- package/dist/client/assets/{pt-PT-GEIXXZ67-5CbVaVay.js → pt-PT-GEIXXZ67-COIg15TS.js} +1 -1
- package/dist/client/assets/{pug-lkTEco3G.js → pug-Ck0YjsGM.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-CD77Rny0.js → quadrantDiagram-W4KKPZXB-C6n3eYzo.js} +1 -1
- package/dist/client/assets/{quick-switcher-controller-CVJBt6V9.js → quick-switcher-controller-CVRUPEKp.js} +1 -1
- package/dist/client/assets/radar-GUYGQ44K-Bjhhjq-k.js +1 -0
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-DdKM6ZWI.js → requirementDiagram-4Y6WPE33-B-sVI-jx.js} +1 -1
- package/dist/client/assets/{ro-RO-E2P6TFZI-DANwkfep.js → ro-RO-E2P6TFZI-CdCIa8N3.js} +1 -1
- package/dist/client/assets/{room-Cha55fQg.js → room-CpCcgtG8.js} +1 -1
- package/dist/client/assets/{ru-RU-YBIIY43T-BWZSxhA5.js → ru-RU-YBIIY43T-C5TT1jTX.js} +1 -1
- package/dist/client/assets/runtime-config-CDgeuPWN.js +1 -0
- package/dist/client/assets/runtime-paths-DvpihCEq.js +1 -0
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-BH3_LNkI.js → sankeyDiagram-5OEKKPKP-EY2cdbUV.js} +1 -1
- package/dist/client/assets/segmented-control-DhUkW6ro.js +1 -0
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-CCGL7FMW.js → sequenceDiagram-3UESZ5HK-D6h6knAb.js} +2 -2
- package/dist/client/assets/{si-LK-673C2CI2-Bqr808AJ.js → si-LK-673C2CI2-f_5ZzunQ.js} +1 -1
- package/dist/client/assets/{sk-SK-CKZHQ4AP-B2PvXXeU.js → sk-SK-CKZHQ4AP-4jimlXp1.js} +1 -1
- package/dist/client/assets/{sl-SI-557H2GWM-IPVDhzgb.js → sl-SI-557H2GWM-BnZ04ZfX.js} +1 -1
- package/dist/client/assets/{src-BshjqEL2.js → src-DSz_pbBa.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-ljJcYRX4.js → stateDiagram-AJRCARHV-Ca8ZuIR2.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-DGRDwQhE.js +1 -0
- package/dist/client/assets/subset-shared.chunk-DcaFK0zo.js +1 -0
- package/dist/client/assets/{subset-worker.chunk-BW_EF59g.js → subset-worker.chunk-CVu8sQYq.js} +1 -1
- package/dist/client/assets/{sv-SE-XOPKKDWS-CQipq9Nf.js → sv-SE-XOPKKDWS-B2uKmd06.js} +1 -1
- package/dist/client/assets/{ta-IN-XBH7DQI3-Cj2o89vS.js → ta-IN-XBH7DQI3-Bld4KtCz.js} +1 -1
- package/dist/client/assets/{th-TH-TOCWH3R4-IOX-l13w.js → th-TH-TOCWH3R4-DUlvnJTX.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-CUVPem2o.js → timeline-definition-PNZ67QCA-BAhvj49M.js} +1 -1
- package/dist/client/assets/{tr-TR-GXW6CYY5-DBVLEsZg.js → tr-TR-GXW6CYY5-BXTTqJlZ.js} +1 -1
- package/dist/client/assets/treeView-BLDUP644-DbX5QpdZ.js +1 -0
- package/dist/client/assets/treemap-LRROVOQU-DT4YRX1p.js +1 -0
- package/dist/client/assets/turtle-Cx3rYX2g.js +1 -0
- package/dist/client/assets/{uk-UA-IJKTNUDG-C5kaymku.js → uk-UA-IJKTNUDG-DbQpa2ug.js} +1 -1
- package/dist/client/assets/{uz-UZ-TBZZEA4V-lMna4tx1.js → uz-UZ-TBZZEA4V-Dt35hEMk.js} +1 -1
- package/dist/client/assets/vault-api-client-BPVNCJZC.js +1 -0
- package/dist/client/assets/vault-api-client-VAfZ8okg.js +1 -0
- package/dist/client/assets/{vault-utils-BbJUHPCf.js → vault-utils-kIbqyWPm.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-Bb1KSPKA.js → vennDiagram-CIIHVFJN-GGrxyoPK.js} +2 -2
- package/dist/client/assets/{vi-VN-MULSGNVB-BAcoCjsz.js → vi-VN-MULSGNVB-BgxNIE1N.js} +1 -1
- package/dist/client/assets/wardley-L42UT6IY-Ba5lVG9E.js +1 -0
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-EdTzLQiR.js → wardleyDiagram-YWT4CUSO-BgYuJM9o.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-BoQFrGlt.js → xychartDiagram-2RQKCTM6-DKA6F9sv.js} +1 -1
- package/dist/client/assets/{yjs-provider-reset-guard-CNmMf4Qd.js → yjs-provider-reset-guard-BicD2Ate.js} +1 -1
- package/dist/client/assets/{zh-CN-MVX3E32U-sW-DCFHP.js → zh-CN-MVX3E32U-W0nclq-N.js} +1 -1
- package/dist/client/assets/{zh-HK-JNU5RLIE-Duqu8EG_.js → zh-HK-JNU5RLIE-C2VRLD9Z.js} +1 -1
- package/dist/client/assets/{zh-TW-LENVCA6T-BHC0OLnd.js → zh-TW-LENVCA6T-Ci7udZjZ.js} +1 -1
- package/dist/client/drawio-editor.html +3 -3
- package/dist/client/excalidraw-editor.html +3 -3
- package/dist/client/export-document.html +4 -4
- package/dist/client/index.html +5 -5
- package/package.json +17 -17
- package/src/client/application/app-shell/comments-feature.js +108 -0
- package/src/client/application/app-shell/git-feature.js +6 -1
- package/src/client/application/app-shell/ui-feature-shell.js +7 -4
- package/src/client/application/app-shell/ui-feature-sidebar.js +11 -2
- package/src/client/application/app-shell-elements.js +2 -0
- package/src/client/application/diagram-chrome.js +708 -0
- package/src/client/application/mermaid-preview-hydrator.js +18 -516
- package/src/client/application/plantuml-preview-hydrator.js +22 -518
- package/src/client/application/preview-renderer.js +15 -4
- package/src/client/application/workspace-route-controller.js +11 -1
- package/src/client/bootstrap/app-shell-feature-surface.js +67 -0
- package/src/client/bootstrap/collabmd-app-shell.js +111 -356
- package/src/client/bootstrap/lazy-controller-feature.js +434 -0
- package/src/client/infrastructure/vault-api-client.js +5 -0
- package/src/client/presentation/app-shell-template.js +25 -12
- package/src/client/presentation/bases-preview-controller.js +33 -16
- package/src/client/presentation/comment-overview-controller.js +238 -0
- package/src/client/presentation/comment-ui/comment-ui-state.js +23 -0
- package/src/client/presentation/file-explorer-controller.js +9 -0
- package/src/client/presentation/file-explorer-view.js +11 -1
- package/src/client/styles/components/navigation.css +43 -8
- package/src/client/styles/components/scrollbars.css +5 -0
- package/src/client/styles/features/comment-overview.css +196 -0
- package/src/client/styles/features/comments.css +1 -0
- package/src/client/styles/layout/responsive.css +3 -2
- package/src/server/application/workspace-reconciliation.js +446 -0
- package/src/server/config/env.js +73 -0
- package/src/server/create-app-server.js +39 -32
- package/src/server/domain/bases/base-expression-runtime.js +183 -147
- package/src/server/domain/bases/base-index-snapshot-store.js +53 -2
- package/src/server/domain/bases/base-query-service.js +55 -38
- package/src/server/domain/collaboration/collaboration-document-store.js +6 -2
- package/src/server/domain/collaboration/collaboration-room.js +66 -2
- package/src/server/domain/comment-overview.js +108 -0
- package/src/server/domain/hosted-workspace-contract.js +18 -0
- package/src/server/domain/hosted-workspace.js +744 -0
- package/src/server/domain/workspace-state.js +848 -2
- package/src/server/infrastructure/github/github-app-client.js +205 -0
- package/src/server/infrastructure/github/github-setup-flow.js +86 -0
- package/src/server/infrastructure/http/create-git-api-command-handler.js +1 -1
- package/src/server/infrastructure/http/create-hosted-api-handler.js +200 -0
- package/src/server/infrastructure/http/create-request-handler.js +20 -0
- package/src/server/infrastructure/http/create-static-handler.js +4 -0
- package/src/server/infrastructure/http/create-vault-api-command-handler.js +44 -119
- package/src/server/infrastructure/http/create-vault-api-query-handler.js +18 -33
- package/src/server/infrastructure/http/request-body.js +12 -2
- package/src/server/infrastructure/persistence/hosted-metadata-store.js +500 -0
- package/src/server/infrastructure/persistence/sidecar-store.js +53 -2
- package/src/server/infrastructure/persistence/vault-content-adapter.js +8 -8
- package/src/server/infrastructure/persistence/vault-file-store.js +64 -135
- package/src/server/infrastructure/websocket/attach-collaboration-gateway.js +49 -5
- package/src/server/infrastructure/workspace/file-system-sync-service.js +24 -411
- package/src/server/infrastructure/workspace/workspace-mutation-coordinator.js +13 -621
- package/src/server/infrastructure/workspace/workspace-state-file-system-adapter.js +37 -0
- package/dist/client/assets/architecture-7EHR7CIX-M1SFnuBJ.js +0 -1
- package/dist/client/assets/channel-E9SBQ9z6.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-9NMPSwDX.js +0 -1
- package/dist/client/assets/chunk-WMDFGAFD-EzVSth95.js +0 -35
- package/dist/client/assets/chunk-WU5MYG2G-Bl8VQmZH.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-D7YhYDLZ.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-COI4atGv.js +0 -1
- package/dist/client/assets/dist-B0U2pnHE.js +0 -1
- package/dist/client/assets/dist-B1BRR2vO.js +0 -1
- package/dist/client/assets/dist-B48_21rM.js +0 -1
- package/dist/client/assets/dist-BNDWUlMx.js +0 -9
- package/dist/client/assets/dist-BoCYrsTA.js +0 -1
- package/dist/client/assets/dist-C-W89K9S.js +0 -1
- package/dist/client/assets/dist-CBTadfRi2.js +0 -1
- package/dist/client/assets/dist-D4DGyOvV.js +0 -1
- package/dist/client/assets/dist-ihRjPW1T.js +0 -2
- package/dist/client/assets/drawio-editor-BHYoSlR7.js +0 -9
- package/dist/client/assets/drawioEditor-B-Ssnq_p.js +0 -2
- package/dist/client/assets/eventmodeling-FCH6USID-DKkN-EFL.js +0 -1
- package/dist/client/assets/excalidraw-editor-mKBCIvNR.css +0 -1
- package/dist/client/assets/excalidraw-scene-i7oBzgH8.js +0 -176
- package/dist/client/assets/excalidrawEditor-DRxzpbJ-.js +0 -2
- package/dist/client/assets/exportDocument-Dj7w1hDJ.js +0 -2
- package/dist/client/assets/gitGraph-WXDBUCRP-BIQYiPEj.js +0 -1
- package/dist/client/assets/image-KGGK4BDN-BtStV6c9.js +0 -1
- package/dist/client/assets/index-Cnyy977t.css +0 -1
- package/dist/client/assets/index-DxQmPZ_f.js +0 -2
- package/dist/client/assets/info-J43DQDTF-CO2Z2J7J.js +0 -1
- package/dist/client/assets/javascript-qUBHINSy.js +0 -1
- package/dist/client/assets/main-iuYcGt-A.js +0 -1414
- package/dist/client/assets/navigation-Du6CLhvs.css +0 -1
- package/dist/client/assets/packet-YPE3B663-VxGcYggl.js +0 -1
- package/dist/client/assets/percentages-5DKR754L-Ug3UfchV.js +0 -1
- package/dist/client/assets/pie-LRSECV5Y-7RrvmmEk.js +0 -1
- package/dist/client/assets/preview-diagram-utils-D94KrSQH.js +0 -1
- package/dist/client/assets/preview-render-compiler-CSggyCbw.js +0 -35
- package/dist/client/assets/preview-render-compiler-TPMesM_L.js +0 -1
- package/dist/client/assets/preview-render-profile-CQR0o67h.js +0 -23
- package/dist/client/assets/preview-render-worker-CifbXdlx.js +0 -59
- package/dist/client/assets/radar-GUYGQ44K-2SBnfFng.js +0 -1
- package/dist/client/assets/runtime-config-CM_2pVYD.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-DXm0ynOB.js +0 -1
- package/dist/client/assets/subset-shared.chunk-C9mEHUfV.js +0 -1
- package/dist/client/assets/treeView-BLDUP644-DItqHrxu.js +0 -1
- package/dist/client/assets/treemap-LRROVOQU-DD1ESKp7.js +0 -1
- package/dist/client/assets/turtle-BkP3ExOG.js +0 -1
- package/dist/client/assets/vault-api-client-Fa51l2lE.js +0 -1
- package/dist/client/assets/wardley-L42UT6IY-BoSI-SvR.js +0 -1
- /package/dist/client/assets/{apl-C1JYSI8J.js → apl-CnwPGSsG.js} +0 -0
- /package/dist/client/assets/{array-7rJMcyYQ.js → array-BifhSqXX.js} +0 -0
- /package/dist/client/assets/{asciiarmor-DHW75j1s.js → asciiarmor-qTkVPQu6.js} +0 -0
- /package/dist/client/assets/{asn1-CQiG40kG.js → asn1-Dr8qZg38.js} +0 -0
- /package/dist/client/assets/{asterisk-BWExh0n4.js → asterisk-Bja0s6e1.js} +0 -0
- /package/dist/client/assets/{base-h1uscjTi.js → base-CxPEiHuy.js} +0 -0
- /package/dist/client/assets/{brainfuck-CTNFyOLg.js → brainfuck-D5EjA2JK.js} +0 -0
- /package/dist/client/assets/{chunk-3PELD44J-DymL2rGq.js → chunk-3PELD44J-C625MXe_.js} +0 -0
- /package/dist/client/assets/{chunk-A66AFZZU-BFHL744F.js → chunk-A66AFZZU-BbU3ThId.js} +0 -0
- /package/dist/client/assets/{chunk-LOOWOR4L-C5BUwXgZ.js → chunk-LOOWOR4L-CGCAV5nC.js} +0 -0
- /package/dist/client/assets/{chunk-tBc3Ke6Z.js → chunk-aKtaBQYM.js} +0 -0
- /package/dist/client/assets/{clike-BFTLRaGS.js → clike-DHH8Ad3s.js} +0 -0
- /package/dist/client/assets/{clojure-D-DYVqu7.js → clojure-BflJGmDX.js} +0 -0
- /package/dist/client/assets/{cmake-DtGL-Unu.js → cmake-CyVbuzPu.js} +0 -0
- /package/dist/client/assets/{cobol-DP4QggbL.js → cobol-B_OZ4V-R.js} +0 -0
- /package/dist/client/assets/{coffeescript-B7GZajzV.js → coffeescript-B2pKbFk8.js} +0 -0
- /package/dist/client/assets/{commonlisp-COlJYiQT.js → commonlisp-CcllspGY.js} +0 -0
- /package/dist/client/assets/{crystal-I_dE9xG-.js → crystal-M5-qzICs.js} +0 -0
- /package/dist/client/assets/{css-CmhPNxBE.js → css-CYpP4FRV.js} +0 -0
- /package/dist/client/assets/{cypher-DEGl2llJ.js → cypher-p9eYesGn.js} +0 -0
- /package/dist/client/assets/{d-BspB0dox.js → d-BhMjBjQP.js} +0 -0
- /package/dist/client/assets/{defaultLocale-DKHHE2Ij.js → defaultLocale-C8Fc0cco.js} +0 -0
- /package/dist/client/assets/{diff-BWuPUsEo.js → diff-ChtP43wD.js} +0 -0
- /package/dist/client/assets/{drawio-room-DrZ-gy4N.js → drawio-room-B3OZRHTH.js} +0 -0
- /package/dist/client/assets/{dtd-C6brJFPg.js → dtd-DTF72YNO.js} +0 -0
- /package/dist/client/assets/{dylan-Bft86ZSB.js → dylan-C6jEEEk-.js} +0 -0
- /package/dist/client/assets/{ebnf-D6ifG44A.js → ebnf-D4c0_ac3.js} +0 -0
- /package/dist/client/assets/{ecl-D9rhJ9-u.js → ecl-BSZaIHnp.js} +0 -0
- /package/dist/client/assets/{eiffel-DwxtewZF.js → eiffel-BEjRio4Q.js} +0 -0
- /package/dist/client/assets/{elm-B1TncobV.js → elm-Cshzl8qu.js} +0 -0
- /package/dist/client/assets/{erlang-BDJZNtt8.js → erlang-DaB2Rkuy.js} +0 -0
- /package/dist/client/assets/{excalidraw-mermaid-stub-Co4Okjfg.js → excalidraw-mermaid-stub-BNckbX2n.js} +0 -0
- /package/dist/client/assets/{fcl-CUXJFJn1.js → fcl-ClOhbFR7.js} +0 -0
- /package/dist/client/assets/{file-kind-DLz-bCzA.js → file-kind-BKPOIRPE.js} +0 -0
- /package/dist/client/assets/{forth-nvhcMz63.js → forth-Cezjo90N.js} +0 -0
- /package/dist/client/assets/{fortran-BZID-z10.js → fortran-Bt6PBEDR.js} +0 -0
- /package/dist/client/assets/{gas-DjQsZDGE.js → gas-BHEdbvp9.js} +0 -0
- /package/dist/client/assets/{gherkin-S0kHlzux.js → gherkin-oBAE_ms0.js} +0 -0
- /package/dist/client/assets/{graphlib-Dduz6oB8.js → graphlib-B8gBHxth.js} +0 -0
- /package/dist/client/assets/{groovy-Di--Vb9Z.js → groovy-BC3IOsC8.js} +0 -0
- /package/dist/client/assets/{haskell-C6qH3-aI.js → haskell-BRsoo5mP.js} +0 -0
- /package/dist/client/assets/{http-DG1Y9fpK.js → http-CLVgA2GD.js} +0 -0
- /package/dist/client/assets/{idl-B64p3NTJ.js → idl-BUZw3wgd.js} +0 -0
- /package/dist/client/assets/{image-blob-reduce.esm-CRyv8pnU.js → image-blob-reduce.esm-NzmDxm1v.js} +0 -0
- /package/dist/client/assets/{init-EmgYNkpL.js → init-D6jRqBbL.js} +0 -0
- /package/dist/client/assets/{julia-B22G9Bym.js → julia-CQfgDRfP.js} +0 -0
- /package/dist/client/assets/{katex-Beiidjxi.js → katex-C7GtLiLd.js} +0 -0
- /package/dist/client/assets/{vault-api-client-D7Ck0CvR.css → keyboard-shortcuts-D7Ck0CvR.css} +0 -0
- /package/dist/client/assets/{livescript-CkcuHqeS.js → livescript-BXxG0Yva.js} +0 -0
- /package/dist/client/assets/{lua-Cg0FqIlO.js → lua-CL1SqxuB.js} +0 -0
- /package/dist/client/assets/{mathematica-CKVhKnoY.js → mathematica-u8YMmbU0.js} +0 -0
- /package/dist/client/assets/{mbox-DANyzFJ2.js → mbox-BEMVcqjs.js} +0 -0
- /package/dist/client/assets/{mirc-BVG2S5rO.js → mirc-C9zpzAZU.js} +0 -0
- /package/dist/client/assets/{mllike-C0p7lv48.js → mllike-B45xgp2S.js} +0 -0
- /package/dist/client/assets/{modelica-vJ-Qa9jV.js → modelica-CqHI_q-D.js} +0 -0
- /package/dist/client/assets/{mscgen-vUD-SWGJ.js → mscgen-qgSLujhx.js} +0 -0
- /package/dist/client/assets/{mumps-D0KfUTSd.js → mumps-CW_TBmxz.js} +0 -0
- /package/dist/client/assets/{nginx-DkVceJrH.js → nginx-BMaDbqW3.js} +0 -0
- /package/dist/client/assets/{ntriples-BBuCIfS0.js → ntriples-d28e9m0E.js} +0 -0
- /package/dist/client/assets/{octave-BTv2CqSQ.js → octave-D2Q8cUp1.js} +0 -0
- /package/dist/client/assets/{oz-D8SjVDNU.js → oz-BwTct_5T.js} +0 -0
- /package/dist/client/assets/{pascal-T-tfhVyx.js → pascal-Dp_KdFgX.js} +0 -0
- /package/dist/client/assets/{path-vqW-z8T-.js → path-BWPyau1x.js} +0 -0
- /package/dist/client/assets/{perl-BDrCkHRd.js → perl-CdEHsPfU.js} +0 -0
- /package/dist/client/assets/{pig-BEyI4fPq.js → pig-AF4Hwhju.js} +0 -0
- /package/dist/client/assets/{powershell-DtnFc6GG.js → powershell-CzG71I4L.js} +0 -0
- /package/dist/client/assets/{preload-helper-Bo9GmnuQ.js → preload-helper-kNaey6uv.js} +0 -0
- /package/dist/client/assets/{properties-DWUvbxV9.js → properties-C357ku5U.js} +0 -0
- /package/dist/client/assets/{protobuf-CQGoYyfE.js → protobuf-D1ij_kNL.js} +0 -0
- /package/dist/client/assets/{puppet-Dd-qWO3p.js → puppet-B4hC2X4m.js} +0 -0
- /package/dist/client/assets/{python-BUyhM0Ew.js → python-BqYw9LYJ.js} +0 -0
- /package/dist/client/assets/{q-Dls1OX0D.js → q-B9NhS7L_.js} +0 -0
- /package/dist/client/assets/{r-DeZ8Mdev.js → r-DADKenSm.js} +0 -0
- /package/dist/client/assets/{rough.esm-DE_lJ5Ge.js → rough.esm-CSKSodPl.js} +0 -0
- /package/dist/client/assets/{roundRect-BMsJLtvm.js → roundRect-D01gJrlt.js} +0 -0
- /package/dist/client/assets/{rpm-CjWxLM68.js → rpm-gpDK5sbt.js} +0 -0
- /package/dist/client/assets/{ruby-CB34f2Gf.js → ruby-DsYpTuWg.js} +0 -0
- /package/dist/client/assets/{runtime-config-loader-_D2KZKn-.js → runtime-config-loader-BUK56BZz.js} +0 -0
- /package/dist/client/assets/{sas-Bji4HDQq.js → sas-C2OyD2Y6.js} +0 -0
- /package/dist/client/assets/{scheme-C3elI80V.js → scheme-CyDdOh7e.js} +0 -0
- /package/dist/client/assets/{shell-DUveK2Hb.js → shell-Du5Qg9im.js} +0 -0
- /package/dist/client/assets/{sieve-2ogwMVx4.js → sieve-BAxa3IjF.js} +0 -0
- /package/dist/client/assets/{simple-mode-pOKc0mfx.js → simple-mode-DRpGK0lJ.js} +0 -0
- /package/dist/client/assets/{smalltalk-BuGhc6lW.js → smalltalk-BLp5-jwC.js} +0 -0
- /package/dist/client/assets/{solr-DTxshpm8.js → solr-BBopId9w.js} +0 -0
- /package/dist/client/assets/{sparql-vm8qNO8J.js → sparql-Dz-mlCAC.js} +0 -0
- /package/dist/client/assets/{spreadsheet-C6Vbtl9-.js → spreadsheet-CTIncYxj.js} +0 -0
- /package/dist/client/assets/{sql-GL7dVWcd.js → sql-DcCJ9jop.js} +0 -0
- /package/dist/client/assets/{stex-CEwW0Q_0.js → stex-sDrdk2BW.js} +0 -0
- /package/dist/client/assets/{stylus-D1SZIMDs.js → stylus-DLLZ8dgm.js} +0 -0
- /package/dist/client/assets/{swift-CKcKnWv9.js → swift-DKB6_1j6.js} +0 -0
- /package/dist/client/assets/{tcl-SPk7uiDB.js → tcl-BGfruO1u.js} +0 -0
- /package/dist/client/assets/{textile-C48beRus.js → textile-DWBqthVk.js} +0 -0
- /package/dist/client/assets/{tiddlywiki-CiImjFLN.js → tiddlywiki-VlUiK86J.js} +0 -0
- /package/dist/client/assets/{tiki-HkXZ4BIW.js → tiki-CxVlf5KZ.js} +0 -0
- /package/dist/client/assets/{toml-BmfpMy1_.js → toml-LvoKBwCs.js} +0 -0
- /package/dist/client/assets/{troff-BjbEOT5E.js → troff-C2dAgh7P.js} +0 -0
- /package/dist/client/assets/{ttcn-NA-V4KnY.js → ttcn-BePYh-hG.js} +0 -0
- /package/dist/client/assets/{ttcn-cfg-TPHncdGN.js → ttcn-cfg-CY0aot7Q.js} +0 -0
- /package/dist/client/assets/{vb-C19AQWqO.js → vb-BthdM_4N.js} +0 -0
- /package/dist/client/assets/{vbscript-CHJk3s95.js → vbscript-D9f6rSsU.js} +0 -0
- /package/dist/client/assets/{velocity-Ya0P4sQU.js → velocity-CqftRsjg.js} +0 -0
- /package/dist/client/assets/{verilog-DSARZZPc.js → verilog-D-x6ne0Z.js} +0 -0
- /package/dist/client/assets/{vhdl-CnYyYTpa.js → vhdl-CMrOq2q1.js} +0 -0
- /package/dist/client/assets/{webidl-DttrYZRT.js → webidl-D5jiJvOU.js} +0 -0
- /package/dist/client/assets/{xquery-CEDTd8qs.js → xquery-fj_R-kMw.js} +0 -0
- /package/dist/client/assets/{yacas-C7dxlPB0.js → yacas-CXXgtw0p.js} +0 -0
- /package/dist/client/assets/{z80-BqEfFSnA.js → z80-CL1naaMV.js} +0 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { createSign } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
function base64UrlJson(value) {
|
|
4
|
+
return Buffer.from(JSON.stringify(value)).toString('base64url');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function createRequestError(statusCode, message, code) {
|
|
8
|
+
const error = new Error(message);
|
|
9
|
+
error.statusCode = statusCode;
|
|
10
|
+
error.code = code;
|
|
11
|
+
return error;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function normalizeBaseUrl(value) {
|
|
15
|
+
return String(value ?? 'https://api.github.com').trim().replace(/\/+$/u, '') || 'https://api.github.com';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function createGitHubAppJwt({ appId, privateKey }, nowSeconds = Math.floor(Date.now() / 1000)) {
|
|
19
|
+
const header = base64UrlJson({
|
|
20
|
+
alg: 'RS256',
|
|
21
|
+
typ: 'JWT',
|
|
22
|
+
});
|
|
23
|
+
const payload = base64UrlJson({
|
|
24
|
+
exp: nowSeconds + 540,
|
|
25
|
+
iat: nowSeconds - 60,
|
|
26
|
+
iss: String(appId),
|
|
27
|
+
});
|
|
28
|
+
const signingInput = `${header}.${payload}`;
|
|
29
|
+
const signer = createSign('RSA-SHA256');
|
|
30
|
+
signer.update(signingInput);
|
|
31
|
+
signer.end();
|
|
32
|
+
return `${signingInput}.${signer.sign(privateKey).toString('base64url')}`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function parseRepositoryOwner(repository = {}) {
|
|
36
|
+
const ownerLogin = String(repository.owner?.login ?? '').trim();
|
|
37
|
+
if (ownerLogin) {
|
|
38
|
+
return ownerLogin;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return String(repository.full_name ?? '').split('/')[0] || '';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function normalizeRepository(repository = {}) {
|
|
45
|
+
const fullName = String(repository.full_name ?? '').trim();
|
|
46
|
+
const owner = parseRepositoryOwner(repository);
|
|
47
|
+
const name = String(repository.name ?? '').trim();
|
|
48
|
+
const visibility = String(repository.visibility ?? (repository.private ? 'private' : 'public')).trim() || 'private';
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
defaultBranch: String(repository.default_branch ?? '').trim(),
|
|
52
|
+
fullName,
|
|
53
|
+
id: String(repository.id ?? '').trim(),
|
|
54
|
+
name,
|
|
55
|
+
owner,
|
|
56
|
+
visibility,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export class GitHubAppClient {
|
|
61
|
+
constructor({
|
|
62
|
+
apiBaseUrl = 'https://api.github.com',
|
|
63
|
+
appId,
|
|
64
|
+
appSlug = '',
|
|
65
|
+
fetchImpl = globalThis.fetch,
|
|
66
|
+
htmlBaseUrl = 'https://github.com',
|
|
67
|
+
privateKey,
|
|
68
|
+
} = {}) {
|
|
69
|
+
this.apiBaseUrl = normalizeBaseUrl(apiBaseUrl);
|
|
70
|
+
this.appId = String(appId ?? '').trim();
|
|
71
|
+
this.appSlug = String(appSlug ?? '').trim();
|
|
72
|
+
this.fetchImpl = fetchImpl;
|
|
73
|
+
this.htmlBaseUrl = normalizeBaseUrl(htmlBaseUrl);
|
|
74
|
+
this.privateKey = String(privateKey ?? '').replace(/\\n/g, '\n').trim();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
isConfigured() {
|
|
78
|
+
return Boolean(this.appId && this.privateKey && this.fetchImpl);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
createAppJwt() {
|
|
82
|
+
if (!this.isConfigured()) {
|
|
83
|
+
throw createRequestError(503, 'GitHub App setup is not configured.', 'HOSTED_GITHUB_APP_NOT_CONFIGURED');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return createGitHubAppJwt({
|
|
87
|
+
appId: this.appId,
|
|
88
|
+
privateKey: this.privateKey,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
createInstallationSetupUrl({ state } = {}) {
|
|
93
|
+
if (!this.appSlug) {
|
|
94
|
+
throw createRequestError(503, 'GitHub App slug is not configured.', 'HOSTED_GITHUB_APP_NOT_CONFIGURED');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const setupUrl = new URL(`/apps/${encodeURIComponent(this.appSlug)}/installations/new`, this.htmlBaseUrl);
|
|
98
|
+
if (state) {
|
|
99
|
+
setupUrl.searchParams.set('state', state);
|
|
100
|
+
}
|
|
101
|
+
return setupUrl.href;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
async request(path, {
|
|
105
|
+
authToken,
|
|
106
|
+
body = null,
|
|
107
|
+
method = 'GET',
|
|
108
|
+
} = {}) {
|
|
109
|
+
const headers = {
|
|
110
|
+
Accept: 'application/vnd.github+json',
|
|
111
|
+
'User-Agent': 'collabmd',
|
|
112
|
+
'X-GitHub-Api-Version': '2022-11-28',
|
|
113
|
+
...(authToken ? { Authorization: `Bearer ${authToken}` } : {}),
|
|
114
|
+
};
|
|
115
|
+
const response = await this.fetchImpl(`${this.apiBaseUrl}${path}`, {
|
|
116
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
117
|
+
headers: body ? { ...headers, 'Content-Type': 'application/json' } : headers,
|
|
118
|
+
method,
|
|
119
|
+
});
|
|
120
|
+
const text = await response.text();
|
|
121
|
+
let payload = null;
|
|
122
|
+
if (text) {
|
|
123
|
+
try {
|
|
124
|
+
payload = JSON.parse(text);
|
|
125
|
+
} catch {
|
|
126
|
+
payload = { message: text };
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (!response.ok) {
|
|
131
|
+
throw createRequestError(
|
|
132
|
+
response.status,
|
|
133
|
+
payload?.message || 'GitHub API request failed.',
|
|
134
|
+
'HOSTED_GITHUB_API_FAILED',
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return payload ?? {};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
async createInstallationAccessToken(installationId, { appJwt = null } = {}) {
|
|
142
|
+
const normalizedInstallationId = String(installationId ?? '').trim();
|
|
143
|
+
if (!normalizedInstallationId) {
|
|
144
|
+
throw createRequestError(400, 'GitHub installation id is required.', 'HOSTED_GITHUB_INSTALLATION_REQUIRED');
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const payload = await this.request(`/app/installations/${encodeURIComponent(normalizedInstallationId)}/access_tokens`, {
|
|
148
|
+
authToken: appJwt || this.createAppJwt(),
|
|
149
|
+
method: 'POST',
|
|
150
|
+
});
|
|
151
|
+
const token = String(payload?.token ?? '').trim();
|
|
152
|
+
if (!token) {
|
|
153
|
+
throw createRequestError(502, 'GitHub did not return an installation access token.', 'HOSTED_GITHUB_TOKEN_MISSING');
|
|
154
|
+
}
|
|
155
|
+
return token;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
async getInstallation(installationId, { appJwt = null } = {}) {
|
|
159
|
+
const normalizedInstallationId = String(installationId ?? '').trim();
|
|
160
|
+
if (!normalizedInstallationId) {
|
|
161
|
+
throw createRequestError(400, 'GitHub installation id is required.', 'HOSTED_GITHUB_INSTALLATION_REQUIRED');
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
return this.request(`/app/installations/${encodeURIComponent(normalizedInstallationId)}`, {
|
|
165
|
+
authToken: appJwt || this.createAppJwt(),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
async listInstallationRepositories(installationToken) {
|
|
170
|
+
const payload = await this.request('/installation/repositories', {
|
|
171
|
+
authToken: installationToken,
|
|
172
|
+
});
|
|
173
|
+
return Array.isArray(payload?.repositories) ? payload.repositories : [];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
async resolveVaultSourceFromInstallation(installationId) {
|
|
177
|
+
const normalizedInstallationId = String(installationId ?? '').trim();
|
|
178
|
+
if (!normalizedInstallationId) {
|
|
179
|
+
throw createRequestError(400, 'GitHub installation id is required.', 'HOSTED_GITHUB_INSTALLATION_REQUIRED');
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const appJwt = this.createAppJwt();
|
|
183
|
+
const [installation, installationToken] = await Promise.all([
|
|
184
|
+
this.getInstallation(normalizedInstallationId, { appJwt }),
|
|
185
|
+
this.createInstallationAccessToken(normalizedInstallationId, { appJwt }),
|
|
186
|
+
]);
|
|
187
|
+
const repositories = await this.listInstallationRepositories(installationToken);
|
|
188
|
+
if (repositories.length !== 1) {
|
|
189
|
+
throw createRequestError(
|
|
190
|
+
409,
|
|
191
|
+
'GitHub App installation must grant access to exactly one selected repository.',
|
|
192
|
+
'HOSTED_GITHUB_REPOSITORY_SELECTION_REQUIRED',
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const repository = normalizeRepository(repositories[0]);
|
|
197
|
+
return {
|
|
198
|
+
installation: {
|
|
199
|
+
accountLogin: String(installation?.account?.login ?? repository.owner).trim(),
|
|
200
|
+
id: normalizedInstallationId,
|
|
201
|
+
},
|
|
202
|
+
repository,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
import { normalizeHostedEmail } from '../../domain/hosted-workspace-contract.js';
|
|
4
|
+
|
|
5
|
+
const GITHUB_SETUP_FLOW_TTL_MS = 15 * 60 * 1000;
|
|
6
|
+
|
|
7
|
+
function createFlowError(statusCode, message, code) {
|
|
8
|
+
const error = new Error(message);
|
|
9
|
+
error.statusCode = statusCode;
|
|
10
|
+
error.code = code;
|
|
11
|
+
return error;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class GitHubSetupFlow {
|
|
15
|
+
constructor({
|
|
16
|
+
cookieManager,
|
|
17
|
+
githubAppClient,
|
|
18
|
+
} = {}) {
|
|
19
|
+
this.cookieManager = cookieManager;
|
|
20
|
+
this.githubAppClient = githubAppClient;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
ensureConfigured() {
|
|
24
|
+
if (!this.cookieManager || !this.githubAppClient) {
|
|
25
|
+
throw createFlowError(503, 'GitHub App setup is not configured.', 'HOSTED_GITHUB_APP_NOT_CONFIGURED');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
begin(req, { admin }) {
|
|
30
|
+
this.ensureConfigured();
|
|
31
|
+
const state = randomUUID();
|
|
32
|
+
const createdAt = Date.now();
|
|
33
|
+
const expiresAt = createdAt + GITHUB_SETUP_FLOW_TTL_MS;
|
|
34
|
+
return {
|
|
35
|
+
expiresAt,
|
|
36
|
+
setCookie: this.cookieManager.create(req, {
|
|
37
|
+
adminEmail: normalizeHostedEmail(admin?.email),
|
|
38
|
+
createdAt,
|
|
39
|
+
expiresAt,
|
|
40
|
+
state,
|
|
41
|
+
}, {
|
|
42
|
+
expires: new Date(expiresAt),
|
|
43
|
+
}),
|
|
44
|
+
setupUrl: this.githubAppClient.createInstallationSetupUrl({ state }),
|
|
45
|
+
state,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
readValidFlow(req, requestUrl, { admin }) {
|
|
50
|
+
this.ensureConfigured();
|
|
51
|
+
const flow = this.cookieManager.read(req);
|
|
52
|
+
if (!flow || typeof flow !== 'object') {
|
|
53
|
+
throw createFlowError(400, 'GitHub setup session expired. Start setup again.', 'HOSTED_GITHUB_SETUP_EXPIRED');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (Number(flow.expiresAt) <= Date.now()) {
|
|
57
|
+
throw createFlowError(400, 'GitHub setup session expired. Start setup again.', 'HOSTED_GITHUB_SETUP_EXPIRED');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const expectedState = String(flow.state ?? '');
|
|
61
|
+
const actualState = String(requestUrl.searchParams.get('state') ?? '');
|
|
62
|
+
if (!expectedState || actualState !== expectedState) {
|
|
63
|
+
throw createFlowError(403, 'GitHub setup state did not match.', 'HOSTED_GITHUB_SETUP_STATE_MISMATCH');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (normalizeHostedEmail(flow.adminEmail) !== normalizeHostedEmail(admin?.email)) {
|
|
67
|
+
throw createFlowError(403, 'GitHub setup must be completed by the Team Admin who started it.', 'HOSTED_GITHUB_SETUP_ADMIN_MISMATCH');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return flow;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async complete(req, requestUrl, { admin }) {
|
|
74
|
+
this.readValidFlow(req, requestUrl, { admin });
|
|
75
|
+
const installationId = String(requestUrl.searchParams.get('installation_id') ?? '').trim();
|
|
76
|
+
if (!installationId) {
|
|
77
|
+
throw createFlowError(400, 'GitHub installation id is required.', 'HOSTED_GITHUB_INSTALLATION_REQUIRED');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
clearCookie: this.cookieManager.clear(req),
|
|
82
|
+
github: await this.githubAppClient.resolveVaultSourceFromInstallation(installationId),
|
|
83
|
+
installationId,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -47,7 +47,7 @@ async function applyWorkspaceMutationEffects({
|
|
|
47
47
|
return responsePayload;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
await workspaceMutationCoordinator?.
|
|
50
|
+
await workspaceMutationCoordinator?.reconcileVaultChangeObservation?.({
|
|
51
51
|
action,
|
|
52
52
|
origin: 'git',
|
|
53
53
|
requestId: readRequestId(req),
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { jsonResponse } from './http-response.js';
|
|
2
|
+
import { parseJsonBody } from './request-body.js';
|
|
3
|
+
|
|
4
|
+
function sendHostedError(req, res, error) {
|
|
5
|
+
const statusCode = Number(error?.statusCode || 500);
|
|
6
|
+
if (statusCode >= 500) {
|
|
7
|
+
console.error('[api] Hosted workspace request failed:', error.message);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
jsonResponse(req, res, statusCode, {
|
|
11
|
+
code: error?.code || 'HOSTED_REQUEST_FAILED',
|
|
12
|
+
error: statusCode >= 500 ? 'Hosted workspace request failed' : error.message,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function authenticatedUser(authService, req) {
|
|
17
|
+
return authService?.getAuthenticatedUser?.(req) ?? null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function readPathId(pathname, prefix) {
|
|
21
|
+
if (!pathname.startsWith(prefix)) {
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const value = pathname.slice(prefix.length).split('/')[0] || '';
|
|
26
|
+
return decodeURIComponent(value);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function createHostedApiHandler({
|
|
30
|
+
authService,
|
|
31
|
+
githubSetupFlow = null,
|
|
32
|
+
hostedWorkspaceService = null,
|
|
33
|
+
}) {
|
|
34
|
+
const exactRoutes = new Map([
|
|
35
|
+
['GET /api/hosted/status', async ({ req, res, user }) => {
|
|
36
|
+
jsonResponse(req, res, 200, await hostedWorkspaceService.getStatus(user));
|
|
37
|
+
}],
|
|
38
|
+
['POST /api/hosted/claim', async ({ req, res, user }) => {
|
|
39
|
+
const body = await parseJsonBody(req);
|
|
40
|
+
jsonResponse(req, res, 200, await hostedWorkspaceService.claimWorkspace({
|
|
41
|
+
teamName: body?.teamName,
|
|
42
|
+
token: body?.token,
|
|
43
|
+
user,
|
|
44
|
+
}));
|
|
45
|
+
}],
|
|
46
|
+
['GET /api/hosted/vault-source', async ({ req, res, user }) => {
|
|
47
|
+
jsonResponse(req, res, 200, { vaultSource: await hostedWorkspaceService.getVaultSource(user) });
|
|
48
|
+
}],
|
|
49
|
+
['POST /api/hosted/vault-source/github/setup', async ({ req, res, user }) => {
|
|
50
|
+
const admin = await hostedWorkspaceService.requireAdmin(user);
|
|
51
|
+
const setup = githubSetupFlow?.begin(req, { admin });
|
|
52
|
+
if (!setup) {
|
|
53
|
+
const error = new Error('GitHub App setup is not configured.');
|
|
54
|
+
error.statusCode = 503;
|
|
55
|
+
error.code = 'HOSTED_GITHUB_APP_NOT_CONFIGURED';
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
res.setHeader('Set-Cookie', setup.setCookie);
|
|
59
|
+
jsonResponse(req, res, 200, {
|
|
60
|
+
expiresAt: setup.expiresAt,
|
|
61
|
+
setupUrl: setup.setupUrl,
|
|
62
|
+
});
|
|
63
|
+
}],
|
|
64
|
+
['GET /api/hosted/vault-source/github/callback', async ({ req, requestUrl, res, user }) => {
|
|
65
|
+
const admin = await hostedWorkspaceService.requireAdmin(user);
|
|
66
|
+
const setup = await githubSetupFlow?.complete(req, requestUrl, { admin });
|
|
67
|
+
if (!setup) {
|
|
68
|
+
const error = new Error('GitHub App setup is not configured.');
|
|
69
|
+
error.statusCode = 503;
|
|
70
|
+
error.code = 'HOSTED_GITHUB_APP_NOT_CONFIGURED';
|
|
71
|
+
throw error;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const result = await hostedWorkspaceService.configureGithubVaultSource({
|
|
75
|
+
github: setup.github,
|
|
76
|
+
user,
|
|
77
|
+
});
|
|
78
|
+
res.setHeader('Set-Cookie', setup.clearCookie);
|
|
79
|
+
jsonResponse(req, res, 200, result);
|
|
80
|
+
}],
|
|
81
|
+
['GET /api/hosted/memberships', async ({ req, res, user }) => {
|
|
82
|
+
jsonResponse(req, res, 200, { memberships: await hostedWorkspaceService.listMemberships(user) });
|
|
83
|
+
}],
|
|
84
|
+
['POST /api/hosted/memberships/leave', async ({ req, res, user }) => {
|
|
85
|
+
jsonResponse(req, res, 200, await hostedWorkspaceService.leaveTeam(user));
|
|
86
|
+
}],
|
|
87
|
+
['GET /api/hosted/invitations', async ({ req, res, user }) => {
|
|
88
|
+
jsonResponse(req, res, 200, { invitations: await hostedWorkspaceService.listInvitations(user) });
|
|
89
|
+
}],
|
|
90
|
+
['POST /api/hosted/invitations', async ({ req, res, user }) => {
|
|
91
|
+
const body = await parseJsonBody(req);
|
|
92
|
+
jsonResponse(req, res, 200, {
|
|
93
|
+
invitation: await hostedWorkspaceService.createInvitation({
|
|
94
|
+
email: body?.email,
|
|
95
|
+
role: body?.role,
|
|
96
|
+
user,
|
|
97
|
+
}),
|
|
98
|
+
});
|
|
99
|
+
}],
|
|
100
|
+
['POST /api/hosted/invitations/accept', async ({ req, res, user }) => {
|
|
101
|
+
jsonResponse(req, res, 200, {
|
|
102
|
+
membership: await hostedWorkspaceService.acceptInvitation(user),
|
|
103
|
+
});
|
|
104
|
+
}],
|
|
105
|
+
['GET /api/hosted/audit', async ({ req, res, user }) => {
|
|
106
|
+
jsonResponse(req, res, 200, { events: await hostedWorkspaceService.listAuditEvents(user) });
|
|
107
|
+
}],
|
|
108
|
+
]);
|
|
109
|
+
|
|
110
|
+
const prefixRoutes = [
|
|
111
|
+
{
|
|
112
|
+
method: 'PATCH',
|
|
113
|
+
prefix: '/api/hosted/memberships/',
|
|
114
|
+
handle: async ({ req, res, requestUrl, user }) => {
|
|
115
|
+
const membershipId = readPathId(requestUrl.pathname, '/api/hosted/memberships/');
|
|
116
|
+
const body = await parseJsonBody(req);
|
|
117
|
+
jsonResponse(req, res, 200, {
|
|
118
|
+
membership: await hostedWorkspaceService.updateMembershipRole({
|
|
119
|
+
membershipId,
|
|
120
|
+
role: body?.role,
|
|
121
|
+
user,
|
|
122
|
+
}),
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
method: 'DELETE',
|
|
128
|
+
prefix: '/api/hosted/memberships/',
|
|
129
|
+
handle: async ({ req, res, requestUrl, user }) => {
|
|
130
|
+
const membershipId = readPathId(requestUrl.pathname, '/api/hosted/memberships/');
|
|
131
|
+
jsonResponse(req, res, 200, await hostedWorkspaceService.removeMembership({ membershipId, user }));
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
method: 'PATCH',
|
|
136
|
+
prefix: '/api/hosted/invitations/',
|
|
137
|
+
handle: async ({ req, res, requestUrl, user }) => {
|
|
138
|
+
const invitationId = readPathId(requestUrl.pathname, '/api/hosted/invitations/');
|
|
139
|
+
const body = await parseJsonBody(req);
|
|
140
|
+
jsonResponse(req, res, 200, {
|
|
141
|
+
invitation: await hostedWorkspaceService.updateInvitationRole({
|
|
142
|
+
invitationId,
|
|
143
|
+
role: body?.role,
|
|
144
|
+
user,
|
|
145
|
+
}),
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
method: 'DELETE',
|
|
151
|
+
prefix: '/api/hosted/invitations/',
|
|
152
|
+
handle: async ({ req, res, requestUrl, user }) => {
|
|
153
|
+
const invitationId = readPathId(requestUrl.pathname, '/api/hosted/invitations/');
|
|
154
|
+
jsonResponse(req, res, 200, await hostedWorkspaceService.revokeInvitation({ invitationId, user }));
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
];
|
|
158
|
+
|
|
159
|
+
return async function handleHostedApi(req, res, requestUrl) {
|
|
160
|
+
if (!requestUrl.pathname.startsWith('/api/hosted')) {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (!hostedWorkspaceService?.enabled) {
|
|
165
|
+
jsonResponse(req, res, 404, { error: 'Hosted workspace API is not enabled' });
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const auth = authService.authorizeApiRequest(req);
|
|
170
|
+
if (!auth.ok) {
|
|
171
|
+
jsonResponse(req, res, auth.statusCode, auth.body);
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const user = authenticatedUser(authService, req);
|
|
176
|
+
|
|
177
|
+
try {
|
|
178
|
+
const routeContext = { req, requestUrl, res, user };
|
|
179
|
+
const exactRoute = exactRoutes.get(`${req.method} ${requestUrl.pathname}`);
|
|
180
|
+
if (exactRoute) {
|
|
181
|
+
await exactRoute(routeContext);
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const prefixRoute = prefixRoutes.find((route) => (
|
|
186
|
+
route.method === req.method && requestUrl.pathname.startsWith(route.prefix)
|
|
187
|
+
));
|
|
188
|
+
if (prefixRoute) {
|
|
189
|
+
await prefixRoute.handle(routeContext);
|
|
190
|
+
return true;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
jsonResponse(req, res, 404, { error: 'Hosted workspace endpoint not found' });
|
|
194
|
+
return true;
|
|
195
|
+
} catch (error) {
|
|
196
|
+
sendHostedError(req, res, error);
|
|
197
|
+
return true;
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createAuthApiHandler } from './create-auth-api-handler.js';
|
|
2
2
|
import { createGitApiHandler } from './create-git-api-handler.js';
|
|
3
|
+
import { createHostedApiHandler } from './create-hosted-api-handler.js';
|
|
3
4
|
import { createEsmProxyHandler } from './create-esm-proxy-handler.js';
|
|
4
5
|
import { createStaticHandler } from './create-static-handler.js';
|
|
5
6
|
import { createVaultApiHandler } from './create-vault-api-handler.js';
|
|
@@ -49,10 +50,17 @@ export function createRequestHandler(
|
|
|
49
50
|
testControls = { wsRoomHydrateDelayMs: 0 },
|
|
50
51
|
workspaceMutationCoordinator = null,
|
|
51
52
|
fileSystemSyncService = null,
|
|
53
|
+
hostedWorkspaceService = null,
|
|
54
|
+
githubSetupFlow = null,
|
|
52
55
|
) {
|
|
53
56
|
const handleEsmProxy = createEsmProxyHandler();
|
|
54
57
|
const handleStaticRequest = createStaticHandler(config, authService, searchService);
|
|
55
58
|
const handleAuthApi = createAuthApiHandler({ authService });
|
|
59
|
+
const handleHostedApi = createHostedApiHandler({
|
|
60
|
+
authService,
|
|
61
|
+
githubSetupFlow,
|
|
62
|
+
hostedWorkspaceService,
|
|
63
|
+
});
|
|
56
64
|
const handleGitApi = createGitApiHandler({
|
|
57
65
|
authService,
|
|
58
66
|
backlinkIndex,
|
|
@@ -177,6 +185,10 @@ export function createRequestHandler(
|
|
|
177
185
|
return;
|
|
178
186
|
}
|
|
179
187
|
|
|
188
|
+
if (await handleHostedApi(req, res, requestUrl)) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
180
192
|
if (await handleEsmProxy(req, res, requestUrl)) {
|
|
181
193
|
return;
|
|
182
194
|
}
|
|
@@ -187,6 +199,14 @@ export function createRequestHandler(
|
|
|
187
199
|
jsonResponse(req, res, authorization.statusCode, authorization.body);
|
|
188
200
|
return;
|
|
189
201
|
}
|
|
202
|
+
|
|
203
|
+
const hostedAuthorization = await hostedWorkspaceService?.authorizeWorkspaceAccess?.({
|
|
204
|
+
user: authService.getAuthenticatedUser?.(req) ?? null,
|
|
205
|
+
});
|
|
206
|
+
if (hostedAuthorization && !hostedAuthorization.ok) {
|
|
207
|
+
jsonResponse(req, res, hostedAuthorization.statusCode, hostedAuthorization.body);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
190
210
|
}
|
|
191
211
|
|
|
192
212
|
if (await handleVaultApi(req, res, requestUrl)) {
|
|
@@ -49,6 +49,7 @@ function buildRuntimeConfig({
|
|
|
49
49
|
build,
|
|
50
50
|
drawioBaseUrl,
|
|
51
51
|
gitEnabled,
|
|
52
|
+
hosted,
|
|
52
53
|
nodeEnv,
|
|
53
54
|
publicWsBaseUrl,
|
|
54
55
|
search,
|
|
@@ -62,6 +63,9 @@ function buildRuntimeConfig({
|
|
|
62
63
|
drawioBaseUrl,
|
|
63
64
|
environment: nodeEnv,
|
|
64
65
|
gitEnabled,
|
|
66
|
+
hosted: {
|
|
67
|
+
enabled: Boolean(hosted?.enabled),
|
|
68
|
+
},
|
|
65
69
|
publicWsBaseUrl,
|
|
66
70
|
search,
|
|
67
71
|
wikiLinkAutoCreate,
|