@maycombhq/atticus 2.0.0-beta.2 → 2.0.0-beta.22
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/bin.js +8 -4
- package/dist/chunk-23XVSEV5.js +49 -0
- package/dist/{chunk-ZDPAS56H.js → chunk-24OXGB3P.js} +8 -2
- package/dist/{chunk-7EOBHUMC.js → chunk-24XLDU72.js} +4 -3
- package/dist/{chunk-CR3MTH32.js → chunk-2F4CYZKJ.js} +86 -11
- package/dist/{chunk-6IU67AEK.js → chunk-2GF7OLF3.js} +23 -15
- package/dist/chunk-2IIMFOPM.js +41 -0
- package/dist/chunk-2LGRMVCA.js +617 -0
- package/dist/{chunk-XPCM366L.js → chunk-2MMCFP5C.js} +10 -8
- package/dist/{chunk-JBTK5OP2.js → chunk-2Q56PQPS.js} +6 -4
- package/dist/{chunk-Z6LF7HQN.js → chunk-2Q5EDGEO.js} +7 -5
- package/dist/{chunk-3USYZGRF.js → chunk-2RLKFUUL.js} +38 -27
- package/dist/chunk-2SKB4O2E.js +59 -0
- package/dist/{chunk-SP2I63OO.js → chunk-34S2WGOB.js} +87 -4
- package/dist/{chunk-GQ4N4WKF.js → chunk-3NFFJL5D.js} +33 -27
- package/dist/{chunk-SJRGMG6A.js → chunk-3NWDLGG6.js} +28 -25
- package/dist/{chunk-4WBVUHXN.js → chunk-3RM4UK6W.js} +20 -18
- package/dist/chunk-42SIDKEU.js +583 -0
- package/dist/{chunk-GLUX4EEP.js → chunk-4EURQWQD.js} +20 -15
- package/dist/chunk-4U276ICE.js +39 -0
- package/dist/{chunk-ZMFPW66A.js → chunk-53T4O55J.js} +4 -3
- package/dist/{chunk-6J5OKA4Y.js → chunk-57TDNMI3.js} +17 -15
- package/dist/chunk-5BD2KYLE.js +57 -0
- package/dist/{chunk-7EFILTCI.js → chunk-5F7GFN2F.js} +28 -0
- package/dist/chunk-5NMKONLP.js +95 -0
- package/dist/{chunk-7ZUIMTOU.js → chunk-5SJZW52K.js} +26 -24
- package/dist/{chunk-4RS5KZQD.js → chunk-63YRMR6J.js} +6 -5
- package/dist/chunk-66PPNOON.js +62 -0
- package/dist/chunk-6H3Z5JHH.js +64 -0
- package/dist/{chunk-CEXSU4S6.js → chunk-6MUGR4LS.js} +775 -89
- package/dist/{chunk-QSXK2RGH.js → chunk-6OJQOPUN.js} +5 -3
- package/dist/{chunk-MVZVGYXH.js → chunk-6PPOWY5E.js} +84 -14
- package/dist/{chunk-7EKXJZ2Y.js → chunk-6ZGLAACW.js} +299 -38
- package/dist/chunk-6ZJ5A7AF.js +222 -0
- package/dist/{chunk-L24C55VN.js → chunk-745DAZ4L.js} +142 -30
- package/dist/{chunk-Q4D5X7QB.js → chunk-7ASNL4Q4.js} +46 -24
- package/dist/chunk-7BR7IPOH.js +35 -0
- package/dist/{chunk-7WD63HU2.js → chunk-7DOR27HL.js} +6 -6
- package/dist/chunk-7FTTA3HD.js +341 -0
- package/dist/{chunk-OLQJTJJU.js → chunk-7GJS6DNX.js} +12 -3
- package/dist/{chunk-7JUKDRSZ.js → chunk-7IGKHZ4Z.js} +347 -226
- package/dist/{chunk-G2B4ZQGH.js → chunk-7IOWA5D5.js} +11 -6
- package/dist/{chunk-EBEW3XXQ.js → chunk-7JITZFJC.js} +7 -5
- package/dist/chunk-7MJSQTL5.js +174 -0
- package/dist/{chunk-I4JRCD6M.js → chunk-7UOMVMFG.js} +25 -17
- package/dist/{chunk-YY6ZQQBP.js → chunk-AFWUDXEM.js} +19 -7
- package/dist/chunk-AFZ3QA6W.js +47 -0
- package/dist/chunk-AJQ72EBM.js +420 -0
- package/dist/chunk-AJYXNTNZ.js +317 -0
- package/dist/chunk-AVTBS4OW.js +49 -0
- package/dist/{chunk-FHH4I4ZV.js → chunk-BDKC6H5P.js} +12 -6
- package/dist/{chunk-IPKHE5D6.js → chunk-BEVTIBRH.js} +1526 -875
- package/dist/chunk-BHT7QK4G.js +162 -0
- package/dist/{chunk-6JUBZBMW.js → chunk-BIGDQDHD.js} +6 -4
- package/dist/{chunk-2BFCZ3RK.js → chunk-BO4KX37X.js} +20 -18
- package/dist/chunk-BPK5P77O.js +115 -0
- package/dist/chunk-BQ4SQQC6.js +59 -0
- package/dist/chunk-BQGDB6ZL.js +7342 -0
- package/dist/{chunk-2ANOROX3.js → chunk-BTGPE6CR.js} +11 -9
- package/dist/chunk-BTY3HZBO.js +93 -0
- package/dist/{chunk-DPZHZQKE.js → chunk-BXYMYEJ4.js} +44 -10
- package/dist/{chunk-2RMYG36Q.js → chunk-C3RY6KU6.js} +309 -346
- package/dist/chunk-C4R4JLHE.js +40 -0
- package/dist/chunk-CADWLE2T.js +18 -0
- package/dist/chunk-CBGGOQWU.js +82 -0
- package/dist/chunk-CMDXGQTS.js +47 -0
- package/dist/{chunk-MC3H7736.js → chunk-CQDGOPGH.js} +58 -18
- package/dist/{chunk-HFQCFSJR.js → chunk-CX4RZ2KS.js} +4 -3
- package/dist/{chunk-PAMPPUR6.js → chunk-CXJ6FUKN.js} +1852 -207
- package/dist/{chunk-ABWHYWNI.js → chunk-D73UEXYW.js} +3 -3
- package/dist/chunk-DCZWQLYT.js +1205 -0
- package/dist/chunk-DLOBCJL6.js +48 -0
- package/dist/{chunk-4BN53TG3.js → chunk-DOBQKHIF.js} +31 -23
- package/dist/chunk-E3ISYXO3.js +423 -0
- package/dist/{chunk-7SW2QWLU.js → chunk-E6ZIEVOI.js} +16 -13
- package/dist/chunk-EBL2R3YG.js +43 -0
- package/dist/{chunk-AIOQPLA5.js → chunk-EGQRREQH.js} +41 -15
- package/dist/chunk-EHA7RMZ3.js +58 -0
- package/dist/{chunk-M766ZJ6W.js → chunk-EIPTLPFC.js} +38 -27
- package/dist/chunk-EMRIQUND.js +517 -0
- package/dist/{chunk-DFBCSHVT.js → chunk-EPCJQQWD.js} +6 -4
- package/dist/{chunk-RZPYKDWS.js → chunk-F3P7N7SF.js} +1 -1
- package/dist/{chunk-R77KLRB3.js → chunk-FFLNS6VP.js} +21 -18
- package/dist/chunk-FFTRTL6R.js +26 -0
- package/dist/{chunk-IHMLFRVV.js → chunk-FPJPLKDW.js} +62 -16
- package/dist/{chunk-JCZIKA4C.js → chunk-FSMSFDLD.js} +5 -4
- package/dist/{chunk-AVJDSJ2F.js → chunk-FUJM6RTF.js} +8 -7
- package/dist/chunk-FZOJFH7Q.js +132 -0
- package/dist/{chunk-QRAOANID.js → chunk-G6X77UJZ.js} +23 -21
- package/dist/{chunk-3ALD2W2A.js → chunk-GCWRWSU7.js} +10 -4
- package/dist/chunk-GIW4ZVDB.js +39 -0
- package/dist/{chunk-B2WLAWNJ.js → chunk-GUX3PTYM.js} +3 -3
- package/dist/{chunk-DPUYDDQG.js → chunk-GZY6RUZ6.js} +25 -3
- package/dist/chunk-H4VO6WG3.js +10 -0
- package/dist/{chunk-MMOSZPWJ.js → chunk-H5HBGNXU.js} +5 -4
- package/dist/chunk-H7KM7LZE.js +229 -0
- package/dist/{chunk-AA6YULYB.js → chunk-HNM2YQT2.js} +7 -7
- package/dist/{chunk-3C7EYRFZ.js → chunk-HYU5VLGA.js} +1 -1
- package/dist/{chunk-XY3P7JW7.js → chunk-IDKCWSM5.js} +1032 -172
- package/dist/chunk-IFKEI4SA.js +237 -0
- package/dist/{chunk-F7HYOUFF.js → chunk-IGOE6KPG.js} +67 -22
- package/dist/{chunk-TDD55CJH.js → chunk-IH2XURVQ.js} +6 -5
- package/dist/chunk-INQHESFB.js +38 -0
- package/dist/chunk-IP74LCOQ.js +57 -0
- package/dist/chunk-IPHHDDC6.js +45 -0
- package/dist/{chunk-T6AIP7H5.js → chunk-ISUAAMGS.js} +110 -153
- package/dist/{chunk-A7UPUQFY.js → chunk-IUPG3UKI.js} +624 -319
- package/dist/{chunk-L6SGQIR3.js → chunk-IVBOQAGB.js} +7 -3
- package/dist/{chunk-27NKUS3X.js → chunk-J2JAKCIW.js} +2205 -796
- package/dist/{chunk-V2YTAIQO.js → chunk-J3IOLXWM.js} +24 -7
- package/dist/chunk-JA5FI3QV.js +142 -0
- package/dist/chunk-JAVI7JSP.js +49 -0
- package/dist/{chunk-HLJAXMM4.js → chunk-JB5LINEM.js} +6 -2
- package/dist/{chunk-2VHF7OXM.js → chunk-JENSEMXF.js} +1 -1
- package/dist/{chunk-6BVONWJ7.js → chunk-JJF6HALY.js} +4 -3
- package/dist/chunk-JLUCKAEL.js +38 -0
- package/dist/chunk-JRBFANFE.js +221 -0
- package/dist/{chunk-R6XF6UR3.js → chunk-KDNTAPLX.js} +4 -4
- package/dist/chunk-KFAVQZSX.js +33 -0
- package/dist/chunk-KJXD4PNL.js +50 -0
- package/dist/chunk-KN5BXMWN.js +44 -0
- package/dist/{chunk-PCVDV3UZ.js → chunk-KQGURXFU.js} +9 -7
- package/dist/{chunk-WY6PP6AA.js → chunk-KXITGYLF.js} +40 -6
- package/dist/{chunk-66YVAGGM.js → chunk-L27SV425.js} +22 -20
- package/dist/{chunk-NE2W3OO7.js → chunk-LDLL7LB3.js} +24 -22
- package/dist/chunk-LFGTYX5U.js +379 -0
- package/dist/{chunk-EYWIDJFU.js → chunk-LGBMTVNT.js} +7 -5
- package/dist/{chunk-Q5AMFEWD.js → chunk-LGFL54FP.js} +3 -2
- package/dist/{chunk-6TACQN3N.js → chunk-LJXMYKZJ.js} +7 -5
- package/dist/{chunk-BKVWTZ6A.js → chunk-LKOR5UET.js} +29 -26
- package/dist/chunk-LNBQOP7D.js +294 -0
- package/dist/{chunk-O3WI5KWW.js → chunk-LO6P2VYG.js} +2 -2
- package/dist/chunk-LQJPN536.js +122 -0
- package/dist/{chunk-YEDDOYSC.js → chunk-LYBNHMVZ.js} +29 -5
- package/dist/{chunk-A3GY6SOA.js → chunk-LZ7NUC62.js} +20 -18
- package/dist/chunk-M32BLWDH.js +37 -0
- package/dist/{chunk-VYDBJ73M.js → chunk-M3NANSDZ.js} +17 -15
- package/dist/chunk-MFHL5URL.js +31 -0
- package/dist/chunk-MFR5OPBD.js +109 -0
- package/dist/{chunk-DE76JROX.js → chunk-MG4ZL5RW.js} +32 -20
- package/dist/{chunk-N7IXEHK3.js → chunk-MO6P2JZH.js} +10 -8
- package/dist/{chunk-65NYPGRC.js → chunk-MUWDB4R4.js} +1 -1
- package/dist/chunk-MZCGSXVR.js +34 -0
- package/dist/{chunk-MGYZM27B.js → chunk-N3XIYPU3.js} +51 -23
- package/dist/chunk-NDCF4R6S.js +172 -0
- package/dist/{chunk-DHPACDG7.js → chunk-NR2UJWOC.js} +10 -8
- package/dist/chunk-NXJ5URP6.js +51 -0
- package/dist/{chunk-UNM6ZOKP.js → chunk-NY2XSR5K.js} +147 -18
- package/dist/{chunk-5GDRCDQB.js → chunk-O45HFTFS.js} +3 -2
- package/dist/{chunk-ONLS5QA5.js → chunk-O4GXGGBX.js} +14 -12
- package/dist/chunk-O5PXQR67.js +249 -0
- package/dist/{chunk-PRPPGYZG.js → chunk-O66DM6DJ.js} +6 -4
- package/dist/{chunk-KEM4SDDP.js → chunk-O7FDLW7L.js} +11 -8
- package/dist/{chunk-T2UYZSCQ.js → chunk-O7XLYEFA.js} +169 -29
- package/dist/{chunk-FITWGOJ2.js → chunk-OHNCWBKF.js} +4 -4
- package/dist/{chunk-652QWTLZ.js → chunk-OHVTTOPS.js} +3 -3
- package/dist/chunk-OMI6FPPN.js +43 -0
- package/dist/chunk-ONUPY3H6.js +53 -0
- package/dist/chunk-OTLDSZDV.js +69 -0
- package/dist/chunk-OUBGGKDU.js +22 -0
- package/dist/chunk-OWNCM4ZN.js +330 -0
- package/dist/{chunk-YISXLPHN.js → chunk-P2V7QW4D.js} +235 -35
- package/dist/{chunk-CNUKCS2T.js → chunk-P32RUW3B.js} +1632 -93
- package/dist/{chunk-BWZ77RQT.js → chunk-PAQ2AS5E.js} +1 -1
- package/dist/{chunk-ZMAINWBW.js → chunk-PBPBMP2B.js} +4 -3
- package/dist/{chunk-ZVM6AKKM.js → chunk-PJSJPMJI.js} +3 -3
- package/dist/{chunk-EFHQ3TWP.js → chunk-PKBHS4AA.js} +233 -56
- package/dist/{chunk-GT4I4ZWM.js → chunk-PMUAJGLI.js} +20 -16
- package/dist/chunk-PPD7HTDP.js +152 -0
- package/dist/chunk-PSOFBQWB.js +42 -0
- package/dist/{chunk-S2A7YC3Q.js → chunk-Q2TECDIT.js} +10694 -8896
- package/dist/chunk-Q4K5WB2W.js +42 -0
- package/dist/{chunk-UGLN7QHV.js → chunk-Q6DFNVRJ.js} +14 -12
- package/dist/chunk-QA4O2GGC.js +265 -0
- package/dist/chunk-QAXW2N3B.js +1216 -0
- package/dist/chunk-QBNWF5ZU.js +19 -0
- package/dist/chunk-QFWA2DPH.js +224 -0
- package/dist/{chunk-23W7VWKR.js → chunk-QKUJMING.js} +1363 -114
- package/dist/{chunk-NXFPS2LR.js → chunk-R44CYFPV.js} +16 -13
- package/dist/{chunk-CKSITVS4.js → chunk-R7NYHMUU.js} +2687 -786
- package/dist/chunk-REWWDVQB.js +162 -0
- package/dist/{chunk-JMSCMUCA.js → chunk-RGERPOIV.js} +145 -21
- package/dist/{chunk-6JCPI55B.js → chunk-RLDGWLQ7.js} +49 -7
- package/dist/chunk-RUGXBPWI.js +384 -0
- package/dist/{chunk-CPA6HPVR.js → chunk-RXPJMEOW.js} +18 -12
- package/dist/{chunk-3HI6Z55Y.js → chunk-S4PMJU6H.js} +339 -43
- package/dist/chunk-S5LSDXV4.js +40 -0
- package/dist/chunk-S7FCV7S5.js +51 -0
- package/dist/{chunk-5GGOLAKC.js → chunk-SDKLKB6I.js} +28 -26
- package/dist/chunk-SFSPGFCV.js +62 -0
- package/dist/{chunk-ZNCEKR4J.js → chunk-SFUP7TTO.js} +12 -8
- package/dist/{chunk-64EQYWCA.js → chunk-SLXZOMA6.js} +69 -19
- package/dist/chunk-SQV37XO2.js +273 -0
- package/dist/{chunk-K65BJIMT.js → chunk-SU74NDMQ.js} +19 -17
- package/dist/chunk-SYV5LHML.js +165 -0
- package/dist/chunk-T4YPZIQN.js +36 -0
- package/dist/chunk-T6DQR5TV.js +323 -0
- package/dist/{chunk-JIITQXFB.js → chunk-THDMSZ3R.js} +3075 -802
- package/dist/{chunk-JGZCG5VM.js → chunk-TNR75OXT.js} +7 -7
- package/dist/{chunk-D3PO4DOZ.js → chunk-TUULXQRW.js} +174 -15
- package/dist/chunk-TYQBFTBR.js +516 -0
- package/dist/chunk-U76OWS3Q.js +49 -0
- package/dist/{chunk-YYQN46FY.js → chunk-UCROWG2D.js} +27 -24
- package/dist/{chunk-6M5NK3K3.js → chunk-UF4AZOZB.js} +50 -10
- package/dist/chunk-UF4GLFBX.js +345 -0
- package/dist/{chunk-OT2O76OS.js → chunk-UGUP3ZM6.js} +240 -39
- package/dist/chunk-UNAGJYET.js +45 -0
- package/dist/{chunk-5WG5YP4T.js → chunk-UOR2DTHH.js} +16 -14
- package/dist/{chunk-S3QNRWYR.js → chunk-UPOY4YSQ.js} +14 -12
- package/dist/{chunk-EPTBZ3GP.js → chunk-UPS2DGFC.js} +1 -1
- package/dist/{chunk-4AK7IBVP.js → chunk-UUU4CLJG.js} +4 -2
- package/dist/{chunk-W3BQAZ3Q.js → chunk-UWMJKX5U.js} +14 -12
- package/dist/{chunk-QZSX3F7C.js → chunk-UWOJLHFT.js} +27 -23
- package/dist/chunk-VBTP56CE.js +535 -0
- package/dist/chunk-VCTWPLAO.js +211 -0
- package/dist/chunk-VNU26RCO.js +1215 -0
- package/dist/{chunk-CSZ4C5N6.js → chunk-VTZMAJ3W.js} +93 -10
- package/dist/{chunk-TXLH6WHQ.js → chunk-VW62D6QE.js} +14 -12
- package/dist/{chunk-CAQZUNOH.js → chunk-VY72R2XZ.js} +610 -3
- package/dist/{chunk-2DIQQJCB.js → chunk-VZALIKIF.js} +18 -15
- package/dist/{chunk-TYAID7B7.js → chunk-W62H2XSO.js} +25 -23
- package/dist/{chunk-HVUPKCGJ.js → chunk-W7VWI2YH.js} +9 -6
- package/dist/{chunk-TANFV3MZ.js → chunk-WERM6KPJ.js} +7 -4
- package/dist/{chunk-BOHJZTEQ.js → chunk-WF7B67YE.js} +208 -87
- package/dist/{chunk-7FBGJFEE.js → chunk-WG5U3F5V.js} +14 -12
- package/dist/{chunk-4NDAAFQT.js → chunk-WJF2CS6M.js} +8 -5
- package/dist/{chunk-XAKWMCXI.js → chunk-WKUJ3KPV.js} +4 -4
- package/dist/chunk-WMTRHUI5.js +103 -0
- package/dist/chunk-WNKPRSGI.js +36 -0
- package/dist/chunk-WXFLMQSR.js +223 -0
- package/dist/{chunk-RRTKKSLQ.js → chunk-X3WY6MN3.js} +8 -6
- package/dist/{chunk-ZCJDOK2S.js → chunk-X4CXA2IL.js} +47 -23
- package/dist/{chunk-UBBC2XSG.js → chunk-X5F3Q5LV.js} +560 -105
- package/dist/{chunk-C6EKFH7J.js → chunk-XD75VZIH.js} +9 -7
- package/dist/chunk-XERYFDB5.js +297 -0
- package/dist/chunk-XI2LCCYQ.js +420 -0
- package/dist/chunk-Y2EQNWKV.js +933 -0
- package/dist/{chunk-LR3R6Z2A.js → chunk-YHCMZC2J.js} +7 -7
- package/dist/chunk-YYY3AZFE.js +122 -0
- package/dist/{chunk-GDLULHTC.js → chunk-Z5IA3WDR.js} +19 -31
- package/dist/{chunk-T6XQL73F.js → chunk-ZFFYNRIO.js} +63 -23
- package/dist/{chunk-EDS2L2LD.js → chunk-ZFL7NY4F.js} +56 -27
- package/dist/{chunk-YMZ3TNYB.js → chunk-ZGULQAPZ.js} +7 -4
- package/dist/{chunk-4SKZDI62.js → chunk-ZIUFM5HT.js} +3 -1
- package/dist/{chunk-DKJA76CJ.js → chunk-ZJFRMSJT.js} +15 -13
- package/dist/chunk-ZJXLNDH4.js +239 -0
- package/dist/chunk-ZQ3ON2VQ.js +252 -0
- package/dist/{chunk-HITVBIJS.js → chunk-ZQ7SKESZ.js} +150 -415
- package/dist/{chunk-6QSERWXH.js → chunk-ZQXZ2SES.js} +24 -21
- package/dist/chunk-ZX57KSEQ.js +39 -0
- package/dist/{chunk-I3E7CX4H.js → chunk-ZZK56BLP.js} +5 -3
- package/dist/files.json +664 -368
- package/dist/packages/naysayer/constitution/constitution.yaml +19 -0
- package/dist/packages/sdk/npm/index.js +6194 -2542
- package/dist/packages/ui/dist/assets/{elk-api-tma0MCuh.js → elk-api-CIf-0gz5.js} +2 -2
- package/dist/packages/ui/dist/assets/index-CoK_Dl0D.js +47 -0
- package/dist/packages/ui/dist/assets/index-Dw20IRhQ.css +1 -0
- package/dist/packages/ui/dist/index.html +3 -2
- package/package.json +5 -5
- package/dist/chunk-2BF2EYJV.js +0 -174
- package/dist/chunk-42EVSKME.js +0 -37
- package/dist/chunk-4BKGMUIK.js +0 -53
- package/dist/chunk-5KLGBXG5.js +0 -48
- package/dist/chunk-6BNC6EQ4.js +0 -41
- package/dist/chunk-6D2CQ5II.js +0 -41
- package/dist/chunk-7AVHLZGD.js +0 -45
- package/dist/chunk-D46WUV3T.js +0 -33
- package/dist/chunk-E36QOJMD.js +0 -47
- package/dist/chunk-FQXYPF7E.js +0 -147
- package/dist/chunk-GBRFVT63.js +0 -45
- package/dist/chunk-ICY36XCH.js +0 -34
- package/dist/chunk-J4K3KVLD.js +0 -131
- package/dist/chunk-JZU3H6UQ.js +0 -54
- package/dist/chunk-NN2ZQEB4.js +0 -38
- package/dist/chunk-PCOCACY3.js +0 -385
- package/dist/chunk-RTEYOSJY.js +0 -29
- package/dist/chunk-RUVFXE2L.js +0 -666
- package/dist/chunk-RVH5SUW5.js +0 -69
- package/dist/chunk-VN3DP4LQ.js +0 -43
- package/dist/chunk-W5BVQF44.js +0 -36
- package/dist/chunk-WVPJSRRJ.js +0 -52
- package/dist/chunk-XPTOBS2D.js +0 -48
- package/dist/packages/ui/dist/assets/index-B54fm9FQ.js +0 -29
- package/dist/packages/ui/dist/assets/index-DD_hufQz.css +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createRequire as __atticusCreateRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __atticusFileURLToPath } from "node:url";
|
|
3
|
+
var require = __atticusCreateRequire(import.meta.url);
|
|
4
|
+
var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
|
|
5
|
+
var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
|
|
6
|
+
import {
|
|
7
|
+
boxesOf,
|
|
8
|
+
candidatesOf,
|
|
9
|
+
settingsOf,
|
|
10
|
+
uiLinkRoutes
|
|
11
|
+
} from "./chunk-LFGTYX5U.js";
|
|
12
|
+
import "./chunk-C3RY6KU6.js";
|
|
13
|
+
import "./chunk-S7FCV7S5.js";
|
|
14
|
+
import "./chunk-T6DQR5TV.js";
|
|
15
|
+
import "./chunk-SFUP7TTO.js";
|
|
16
|
+
import "./chunk-7FTTA3HD.js";
|
|
17
|
+
import "./chunk-ZQ3ON2VQ.js";
|
|
18
|
+
import "./chunk-ISUAAMGS.js";
|
|
19
|
+
import "./chunk-VOGCSYOI.js";
|
|
20
|
+
import "./chunk-S4PMJU6H.js";
|
|
21
|
+
import "./chunk-IDKCWSM5.js";
|
|
22
|
+
import "./chunk-UUU4CLJG.js";
|
|
23
|
+
import "./chunk-7IGKHZ4Z.js";
|
|
24
|
+
import "./chunk-J2JAKCIW.js";
|
|
25
|
+
import "./chunk-745DAZ4L.js";
|
|
26
|
+
import "./chunk-CXJ6FUKN.js";
|
|
27
|
+
import "./chunk-QKUJMING.js";
|
|
28
|
+
import "./chunk-6ZGLAACW.js";
|
|
29
|
+
import "./chunk-CQDGOPGH.js";
|
|
30
|
+
import "./chunk-3NFFJL5D.js";
|
|
31
|
+
import "./chunk-F3P7N7SF.js";
|
|
32
|
+
import "./chunk-PKBHS4AA.js";
|
|
33
|
+
import "./chunk-P32RUW3B.js";
|
|
34
|
+
import "./chunk-QA4O2GGC.js";
|
|
35
|
+
import "./chunk-Q2TECDIT.js";
|
|
36
|
+
import "./chunk-TUULXQRW.js";
|
|
37
|
+
import "./chunk-BQGDB6ZL.js";
|
|
38
|
+
import "./chunk-TV45EUGM.js";
|
|
39
|
+
export {
|
|
40
|
+
boxesOf,
|
|
41
|
+
candidatesOf,
|
|
42
|
+
settingsOf,
|
|
43
|
+
uiLinkRoutes
|
|
44
|
+
};
|
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
INPUTS_SOURCE,
|
|
8
8
|
INPUTS_SOURCE_ID,
|
|
9
9
|
inputsPages
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-D73UEXYW.js";
|
|
11
11
|
import {
|
|
12
12
|
judgingRuntime
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PAQ2AS5E.js";
|
|
14
14
|
import {
|
|
15
15
|
table
|
|
16
16
|
} from "./chunk-VOGCSYOI.js";
|
|
17
17
|
import {
|
|
18
18
|
readCatalog
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-J2JAKCIW.js";
|
|
20
20
|
import {
|
|
21
21
|
checkoutGitWiki,
|
|
22
22
|
coverage,
|
|
@@ -28,18 +28,20 @@ import {
|
|
|
28
28
|
syncSources,
|
|
29
29
|
toApiCoverage,
|
|
30
30
|
writeSnapshots
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-745DAZ4L.js";
|
|
32
32
|
import {
|
|
33
33
|
createGit
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-PKBHS4AA.js";
|
|
35
35
|
import {
|
|
36
36
|
Sources,
|
|
37
37
|
fileJudgments,
|
|
38
38
|
inputsDirOf,
|
|
39
39
|
loadOrgPack,
|
|
40
|
-
orgPackDirOf
|
|
40
|
+
orgPackDirOf
|
|
41
|
+
} from "./chunk-Q2TECDIT.js";
|
|
42
|
+
import {
|
|
41
43
|
require_dist
|
|
42
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-BQGDB6ZL.js";
|
|
43
45
|
import {
|
|
44
46
|
__toESM
|
|
45
47
|
} from "./chunk-TV45EUGM.js";
|
|
@@ -8,10 +8,16 @@ import {
|
|
|
8
8
|
notMetarepo
|
|
9
9
|
} from "./chunk-3G4YI4ZU.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
11
|
+
eolOf,
|
|
12
|
+
inEol,
|
|
13
|
+
orgPackDirOf
|
|
14
|
+
} from "./chunk-Q2TECDIT.js";
|
|
15
|
+
import {
|
|
16
|
+
writeFileIfUnchanged
|
|
17
|
+
} from "./chunk-TUULXQRW.js";
|
|
18
|
+
import {
|
|
12
19
|
require_dist
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-D3PO4DOZ.js";
|
|
20
|
+
} from "./chunk-BQGDB6ZL.js";
|
|
15
21
|
import {
|
|
16
22
|
__toESM
|
|
17
23
|
} from "./chunk-TV45EUGM.js";
|
|
@@ -20,6 +26,32 @@ import {
|
|
|
20
26
|
var import_yaml = __toESM(require_dist(), 1);
|
|
21
27
|
import { readFile, writeFile } from "node:fs/promises";
|
|
22
28
|
import { join, relative, sep } from "node:path";
|
|
29
|
+
var OwnerEditError = class extends Error {
|
|
30
|
+
code;
|
|
31
|
+
constructor(code, message) {
|
|
32
|
+
super(message);
|
|
33
|
+
this.code = code;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var HANDLE = /^[A-Za-z0-9][A-Za-z0-9._@-]*$/;
|
|
37
|
+
async function setOrgPackOwner(root, handle, was) {
|
|
38
|
+
const file = join(orgPackDirOf(root), "pack.yaml");
|
|
39
|
+
const rel = relative(root, file).split(sep).join("/");
|
|
40
|
+
const text = await readFile(file, "utf8").catch(() => void 0);
|
|
41
|
+
if (text === void 0)
|
|
42
|
+
throw new OwnerEditError("not-found", `${rel} isn't there: atticus upgrade writes it.`);
|
|
43
|
+
const h = handle.trim();
|
|
44
|
+
if (!HANDLE.test(h))
|
|
45
|
+
throw new OwnerEditError("invalid", "The owner is one handle, such as priya.nair or team-platform: letters, digits, dots, hyphens.");
|
|
46
|
+
const doc = (0, import_yaml.parseDocument)(text);
|
|
47
|
+
const now = doc.get("owner");
|
|
48
|
+
const current = typeof now === "string" && now !== "unassigned" ? now : "";
|
|
49
|
+
if (was !== void 0 && was !== current)
|
|
50
|
+
throw new OwnerEditError("conflict", `pack.yaml's owner changed since you opened the form (now ${current || "unassigned"}): look again, then save.`);
|
|
51
|
+
doc.set("owner", h);
|
|
52
|
+
await writeFileIfUnchanged(file, text, inEol(doc.toString({ lineWidth: 0 }), eolOf(text)));
|
|
53
|
+
return { file: rel, owner: h };
|
|
54
|
+
}
|
|
23
55
|
async function orgPackOwnerCli(root, handle, io) {
|
|
24
56
|
if (!isMetarepo(root)) {
|
|
25
57
|
io.err(notMetarepo(root));
|
|
@@ -39,15 +71,17 @@ async function orgPackOwnerCli(root, handle, io) {
|
|
|
39
71
|
return 0;
|
|
40
72
|
}
|
|
41
73
|
const h = handle.trim();
|
|
42
|
-
if (
|
|
74
|
+
if (!HANDLE.test(h)) {
|
|
43
75
|
io.err("The owner is one handle, such as priya.nair or team-platform: letters, digits, dots, hyphens.");
|
|
44
76
|
return 2;
|
|
45
77
|
}
|
|
46
78
|
doc.set("owner", h);
|
|
47
|
-
await writeFile(file, doc.toString({ lineWidth: 0 }), "utf8");
|
|
79
|
+
await writeFile(file, inEol(doc.toString({ lineWidth: 0 }), eolOf(text)), "utf8");
|
|
48
80
|
io.out(`${h} now looks after the org pack. Commit ${rel} through a pull request; its owner approves changes to it.`);
|
|
49
81
|
return 0;
|
|
50
82
|
}
|
|
51
83
|
export {
|
|
52
|
-
|
|
84
|
+
OwnerEditError,
|
|
85
|
+
orgPackOwnerCli,
|
|
86
|
+
setOrgPackOwner
|
|
53
87
|
};
|
|
@@ -12,27 +12,29 @@ import {
|
|
|
12
12
|
snowSubmit,
|
|
13
13
|
storyBarCommand,
|
|
14
14
|
templatesDraft
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-HNM2YQT2.js";
|
|
16
|
+
import "./chunk-PAQ2AS5E.js";
|
|
17
|
+
import "./chunk-R7NYHMUU.js";
|
|
18
|
+
import "./chunk-IVBOQAGB.js";
|
|
19
|
+
import "./chunk-ISUAAMGS.js";
|
|
17
20
|
import "./chunk-VOGCSYOI.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-D3PO4DOZ.js";
|
|
21
|
+
import "./chunk-S4PMJU6H.js";
|
|
22
|
+
import "./chunk-IDKCWSM5.js";
|
|
23
|
+
import "./chunk-UUU4CLJG.js";
|
|
24
|
+
import "./chunk-7IGKHZ4Z.js";
|
|
25
|
+
import "./chunk-J2JAKCIW.js";
|
|
26
|
+
import "./chunk-745DAZ4L.js";
|
|
27
|
+
import "./chunk-CXJ6FUKN.js";
|
|
28
|
+
import "./chunk-QKUJMING.js";
|
|
29
|
+
import "./chunk-6ZGLAACW.js";
|
|
30
|
+
import "./chunk-CQDGOPGH.js";
|
|
31
|
+
import "./chunk-3NFFJL5D.js";
|
|
32
|
+
import "./chunk-PKBHS4AA.js";
|
|
33
|
+
import "./chunk-P32RUW3B.js";
|
|
34
|
+
import "./chunk-QA4O2GGC.js";
|
|
35
|
+
import "./chunk-Q2TECDIT.js";
|
|
36
|
+
import "./chunk-TUULXQRW.js";
|
|
37
|
+
import "./chunk-BQGDB6ZL.js";
|
|
36
38
|
import "./chunk-TV45EUGM.js";
|
|
37
39
|
export {
|
|
38
40
|
adoSync,
|
|
@@ -6,32 +6,34 @@ var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
|
|
|
6
6
|
import {
|
|
7
7
|
renderTaskContext,
|
|
8
8
|
taskContext
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-R7NYHMUU.js";
|
|
10
|
+
import "./chunk-IVBOQAGB.js";
|
|
11
|
+
import "./chunk-ISUAAMGS.js";
|
|
12
|
+
import "./chunk-S4PMJU6H.js";
|
|
12
13
|
import {
|
|
13
14
|
changeFolder,
|
|
14
15
|
changeStore
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-IDKCWSM5.js";
|
|
17
|
+
import "./chunk-UUU4CLJG.js";
|
|
18
|
+
import "./chunk-7IGKHZ4Z.js";
|
|
19
|
+
import "./chunk-J2JAKCIW.js";
|
|
20
|
+
import "./chunk-745DAZ4L.js";
|
|
21
|
+
import "./chunk-CXJ6FUKN.js";
|
|
21
22
|
import {
|
|
22
23
|
attachToChange
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-QKUJMING.js";
|
|
25
|
+
import "./chunk-6ZGLAACW.js";
|
|
26
|
+
import "./chunk-CQDGOPGH.js";
|
|
27
|
+
import "./chunk-3NFFJL5D.js";
|
|
28
|
+
import "./chunk-PKBHS4AA.js";
|
|
29
|
+
import "./chunk-P32RUW3B.js";
|
|
30
|
+
import "./chunk-QA4O2GGC.js";
|
|
30
31
|
import {
|
|
31
32
|
changesRelOf,
|
|
32
33
|
inputsDirOf
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
34
|
+
} from "./chunk-Q2TECDIT.js";
|
|
35
|
+
import "./chunk-TUULXQRW.js";
|
|
36
|
+
import "./chunk-BQGDB6ZL.js";
|
|
35
37
|
import "./chunk-TV45EUGM.js";
|
|
36
38
|
|
|
37
39
|
// packages/cli/dist/attach-commands.js
|
|
@@ -90,7 +92,7 @@ async function promoteChangeInput(root, change, file) {
|
|
|
90
92
|
} catch {
|
|
91
93
|
throw new AttachError("not-found", `inputs/${name} isn't attached to ${c.id}: atticus change attach ${c.id} adds it.`);
|
|
92
94
|
}
|
|
93
|
-
const { addToInbox } = await import("./chunk-
|
|
95
|
+
const { addToInbox } = await import("./chunk-UWMJKX5U.js");
|
|
94
96
|
const r = await addToInbox(root, [{ name, bytes }]);
|
|
95
97
|
const added = r.added[0];
|
|
96
98
|
if (!added)
|
|
@@ -107,11 +109,11 @@ function attachedLine(rel, a) {
|
|
|
107
109
|
async function changeAttachCli(root, change, paths, o, io) {
|
|
108
110
|
if (change && o.prototype) {
|
|
109
111
|
if (paths.length) {
|
|
110
|
-
const { PROTOTYPE_CLI_WORDS } = await import("./chunk-
|
|
112
|
+
const { PROTOTYPE_CLI_WORDS } = await import("./chunk-7ASNL4Q4.js");
|
|
111
113
|
io.err(PROTOTYPE_CLI_WORDS.usage(change, o.prototype));
|
|
112
114
|
return 2;
|
|
113
115
|
}
|
|
114
|
-
const { attachPrototype } = await import("./chunk-
|
|
116
|
+
const { attachPrototype } = await import("./chunk-7ASNL4Q4.js");
|
|
115
117
|
return attachPrototype(root, change, o.prototype, { by: o.by, ...o.json ? { json: true } : {}, ...o.now ? { now: o.now } : {} }, io);
|
|
116
118
|
}
|
|
117
119
|
if (change && o.like) {
|
|
@@ -119,7 +121,7 @@ async function changeAttachCli(root, change, paths, o, io) {
|
|
|
119
121
|
io.err("--like names an archived change, attached on its own: atticus change attach add-refund-window --like raise-transfer-limit");
|
|
120
122
|
return 2;
|
|
121
123
|
}
|
|
122
|
-
const { attachPastChange, findPastChange } = await import("./chunk-
|
|
124
|
+
const { attachPastChange, findPastChange } = await import("./chunk-W7VWI2YH.js");
|
|
123
125
|
const folder = await findPastChange(root, o.like);
|
|
124
126
|
if (!folder) {
|
|
125
127
|
io.err(`There is no archived change ${o.like}: atticus change similar "<what it is about>" lists them.`);
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { createRequire as __atticusCreateRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __atticusFileURLToPath } from "node:url";
|
|
3
|
+
var require = __atticusCreateRequire(import.meta.url);
|
|
4
|
+
var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
|
|
5
|
+
var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
|
|
6
|
+
import {
|
|
7
|
+
HttpError,
|
|
8
|
+
badRequest,
|
|
9
|
+
conflict,
|
|
10
|
+
notFound
|
|
11
|
+
} from "./chunk-C3RY6KU6.js";
|
|
12
|
+
import {
|
|
13
|
+
appendLines,
|
|
14
|
+
safeMessage
|
|
15
|
+
} from "./chunk-S7FCV7S5.js";
|
|
16
|
+
import {
|
|
17
|
+
estateJoinOnFile,
|
|
18
|
+
stampOf
|
|
19
|
+
} from "./chunk-T6DQR5TV.js";
|
|
20
|
+
import {
|
|
21
|
+
intakeContext
|
|
22
|
+
} from "./chunk-SFUP7TTO.js";
|
|
23
|
+
import {
|
|
24
|
+
estateFacts,
|
|
25
|
+
estateRepos,
|
|
26
|
+
outsideProfileSystems
|
|
27
|
+
} from "./chunk-J2JAKCIW.js";
|
|
28
|
+
import {
|
|
29
|
+
readVendorSpec
|
|
30
|
+
} from "./chunk-QKUJMING.js";
|
|
31
|
+
import {
|
|
32
|
+
FactCorrection,
|
|
33
|
+
QuestionError,
|
|
34
|
+
TARGETS_STEP_ID,
|
|
35
|
+
answerQuestion,
|
|
36
|
+
api_exports,
|
|
37
|
+
correctionLine,
|
|
38
|
+
factsDirOf,
|
|
39
|
+
factsRelOf,
|
|
40
|
+
inputsDirOf,
|
|
41
|
+
isAdopted,
|
|
42
|
+
linkCandidates,
|
|
43
|
+
listQuestions,
|
|
44
|
+
loadOrgPack,
|
|
45
|
+
orgPackDirOf,
|
|
46
|
+
parseCorrections,
|
|
47
|
+
questionsRelOf
|
|
48
|
+
} from "./chunk-Q2TECDIT.js";
|
|
49
|
+
import {
|
|
50
|
+
withSharedFileLock,
|
|
51
|
+
writeFileAtomic
|
|
52
|
+
} from "./chunk-TUULXQRW.js";
|
|
53
|
+
|
|
54
|
+
// packages/cli/dist/ui-api-links.js
|
|
55
|
+
import { mkdir, readFile } from "node:fs/promises";
|
|
56
|
+
import { join } from "node:path";
|
|
57
|
+
var REPO = /^[A-Za-z0-9._-]{1,200}$/;
|
|
58
|
+
var SPECS = /* @__PURE__ */ new Set(["openapi", "swagger"]);
|
|
59
|
+
var quiet = { out: () => void 0, err: () => void 0 };
|
|
60
|
+
var JOINABLE_CALL = /* @__PURE__ */ new Set(["rest", "soap", "grpc", "graphql"]);
|
|
61
|
+
function settingsOf(facts) {
|
|
62
|
+
const out = {};
|
|
63
|
+
for (const f of facts)
|
|
64
|
+
if (f.kind === "config" && f.value && !(f.key in out))
|
|
65
|
+
out[f.key] = f.value;
|
|
66
|
+
return out;
|
|
67
|
+
}
|
|
68
|
+
async function boxApis(root, op, estate, to) {
|
|
69
|
+
if (to.repo) {
|
|
70
|
+
const known = estateRepos(op).find((r) => r.id === to.repo);
|
|
71
|
+
if (!known)
|
|
72
|
+
throw notFound(`No repo of the manifest is ${to.repo}.`);
|
|
73
|
+
const facts = estate.repos.find((r) => r.repo === to.repo)?.facts ?? [];
|
|
74
|
+
const gateway = /gateway|proxy|apigee/i.test(known.type ?? "");
|
|
75
|
+
const forwardsOf = (entry) => {
|
|
76
|
+
const f = facts.find((x) => x.kind === "call" && x.from === entry && JOINABLE_CALL.has(x.callType));
|
|
77
|
+
return f?.kind === "call" ? f.path : void 0;
|
|
78
|
+
};
|
|
79
|
+
const apis2 = facts.flatMap((f) => {
|
|
80
|
+
if (f.kind !== "entry" || !f.path)
|
|
81
|
+
return [];
|
|
82
|
+
const forwards = gateway ? forwardsOf(f.id) : void 0;
|
|
83
|
+
return [
|
|
84
|
+
{
|
|
85
|
+
id: f.id,
|
|
86
|
+
kind: gateway ? "route" : "entry",
|
|
87
|
+
...f.method ? { method: f.method.toUpperCase() } : {},
|
|
88
|
+
path: f.path,
|
|
89
|
+
at: `${f.cite.file}:${f.cite.line}`,
|
|
90
|
+
...forwards ? { forwards } : {}
|
|
91
|
+
}
|
|
92
|
+
];
|
|
93
|
+
});
|
|
94
|
+
return {
|
|
95
|
+
name: to.repo,
|
|
96
|
+
apis: apis2,
|
|
97
|
+
...apis2.length ? {} : {
|
|
98
|
+
noApis: estate.unverified?.includes(to.repo) ? { why: "unverified", command: `atticus verify ${to.repo}` } : { why: "not-read", command: `atticus map --all --repos ${to.repo}` }
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const system = outsideProfileSystems(op).find((s) => s.id === to.system);
|
|
103
|
+
if (!system)
|
|
104
|
+
throw notFound(`No outside system of the profile is ${to.system}.`);
|
|
105
|
+
const { inputs } = await intakeContext(root, quiet);
|
|
106
|
+
const doc = inputs.documents.find((d) => d.id && !d.supersededBy && SPECS.has(d.classification) && d.systems[0] === system.id);
|
|
107
|
+
const spec = doc ? readVendorSpec(doc.path, await readFile(join(inputsDirOf(root), ...doc.path.split("/").slice(1)), "utf8"), system.id) : void 0;
|
|
108
|
+
const apis = (spec?.operations ?? []).map((o) => ({
|
|
109
|
+
id: o.id,
|
|
110
|
+
kind: "operation",
|
|
111
|
+
method: o.method.toUpperCase(),
|
|
112
|
+
path: o.fullPath ?? o.path,
|
|
113
|
+
...o.cite ? { at: o.cite } : {},
|
|
114
|
+
...o.operationId ? { words: o.operationId } : {}
|
|
115
|
+
}));
|
|
116
|
+
return {
|
|
117
|
+
name: system.name || system.id,
|
|
118
|
+
apis,
|
|
119
|
+
...apis.length ? {} : {
|
|
120
|
+
noApis: {
|
|
121
|
+
why: "no-spec",
|
|
122
|
+
command: `atticus intake add <${system.id}'s OpenAPI file>`
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
async function context(root, from, to) {
|
|
128
|
+
if (!REPO.test(from))
|
|
129
|
+
throw badRequest(`${JSON.stringify(from)} isn't a repo name.`);
|
|
130
|
+
if (to.repo && to.repo === from)
|
|
131
|
+
throw badRequest("Pick another box: a box can't call itself here.");
|
|
132
|
+
const op = await loadOrgPack(orgPackDirOf(root));
|
|
133
|
+
if (!estateRepos(op).some((r) => r.id === from))
|
|
134
|
+
throw notFound(`No repo of the manifest is ${from}.`);
|
|
135
|
+
const stamp = await stampOf(root);
|
|
136
|
+
const estate = await estateFacts(root, op, "");
|
|
137
|
+
const join0 = await estateJoinOnFile(root, op, estate, stamp);
|
|
138
|
+
const facts = estate.repos.find((r) => r.repo === from)?.facts ?? [];
|
|
139
|
+
const b = await boxApis(root, op, estate, to);
|
|
140
|
+
return { op, estate, join: join0, facts, b, pairs: estate.pairs[from] ?? {} };
|
|
141
|
+
}
|
|
142
|
+
async function openRuleQuestion(root, from) {
|
|
143
|
+
const qs = (await listQuestions(root, { step: TARGETS_STEP_ID }).catch(() => ({ questions: [] }))).questions;
|
|
144
|
+
return qs.find((q) => q.repo === from && q.state === "open");
|
|
145
|
+
}
|
|
146
|
+
function boxesOf(query) {
|
|
147
|
+
const from = query.get("from") ?? "";
|
|
148
|
+
const to = query.get("system") ? { system: query.get("system") } : { repo: query.get("to") ?? "" };
|
|
149
|
+
if (!from || !to.repo && !to.system)
|
|
150
|
+
throw badRequest("Say both boxes: from=<repo> and to=<repo> (or system=<id>).");
|
|
151
|
+
return { from, to };
|
|
152
|
+
}
|
|
153
|
+
async function candidatesOf(root, from, to) {
|
|
154
|
+
const c = await context(root, from, to);
|
|
155
|
+
const cands = linkCandidates({
|
|
156
|
+
from,
|
|
157
|
+
facts: c.facts,
|
|
158
|
+
join: c.join,
|
|
159
|
+
apis: c.b.apis,
|
|
160
|
+
pairs: c.pairs,
|
|
161
|
+
to,
|
|
162
|
+
settings: settingsOf(c.facts)
|
|
163
|
+
});
|
|
164
|
+
const q = await openRuleQuestion(root, from);
|
|
165
|
+
const loose = cands.calls.filter((x) => x.status !== "paired").length;
|
|
166
|
+
const view = {
|
|
167
|
+
from,
|
|
168
|
+
to,
|
|
169
|
+
toName: c.b.name,
|
|
170
|
+
calls: cands.calls,
|
|
171
|
+
apis: cands.apis,
|
|
172
|
+
...c.facts.some((f) => f.kind === "call") ? {} : c.estate.unverified.includes(from) ? { noCalls: { why: "unverified", command: `atticus verify ${from}` } } : { noCalls: { command: `atticus map --all --gaps --repos ${from}` } },
|
|
173
|
+
...c.b.noApis ? { noApis: c.b.noApis } : {},
|
|
174
|
+
...q && loose ? { rule: { question: q.id, calls: loose } } : {}
|
|
175
|
+
};
|
|
176
|
+
return { view, facts: c.facts };
|
|
177
|
+
}
|
|
178
|
+
function uiLinkRoutes(r, ctx, deps = {}) {
|
|
179
|
+
const now = deps.now ?? (() => /* @__PURE__ */ new Date());
|
|
180
|
+
return r.add("GET", "/api/links/candidates", async ({ query }) => {
|
|
181
|
+
const { from, to } = boxesOf(query);
|
|
182
|
+
return { status: 200, body: (await candidatesOf(ctx.root, from, to)).view };
|
|
183
|
+
}).add("POST", "/api/links/connect", async ({ body }) => {
|
|
184
|
+
const b = api_exports.ConnectLinksRequest.safeParse(body ?? {});
|
|
185
|
+
if (!b.success)
|
|
186
|
+
throw badRequest("Say from, to and the pairs: { from, to: { repo }, pairs: [{ call, api }] }.", {
|
|
187
|
+
errors: b.error.issues.map((i) => ({ path: i.path.join("."), message: i.message }))
|
|
188
|
+
});
|
|
189
|
+
const { from, to, pairs, rule, preview } = b.data;
|
|
190
|
+
if (!pairs.length && !rule)
|
|
191
|
+
throw badRequest("Pick at least one pair, or the rule for all.");
|
|
192
|
+
const c = await context(ctx.root, from, to);
|
|
193
|
+
const calls = new Map(c.facts.filter((f) => f.kind === "call").map((f) => [f.id, f]));
|
|
194
|
+
const apis = new Map(c.b.apis.map((a) => [a.id, a]));
|
|
195
|
+
const at = now().toISOString();
|
|
196
|
+
const corrections = [];
|
|
197
|
+
for (const p of pairs) {
|
|
198
|
+
const f = calls.get(p.call);
|
|
199
|
+
if (!f)
|
|
200
|
+
throw c.estate.unverified.includes(from) ? conflict(`${from}'s facts aren't all verified yet: atticus verify ${from} first.`) : notFound(`${from} has no call ${p.call} on record.`);
|
|
201
|
+
const api = apis.get(p.api);
|
|
202
|
+
if (!api)
|
|
203
|
+
throw notFound(`${c.b.name} has no API ${p.api} on record.`);
|
|
204
|
+
corrections.push(FactCorrection.parse({
|
|
205
|
+
schemaVersion: 1,
|
|
206
|
+
fact: f.id,
|
|
207
|
+
target: { kind: "call", file: f.cite.file, line: f.cite.line, value: f.cite.value },
|
|
208
|
+
action: "link",
|
|
209
|
+
link: {
|
|
210
|
+
...to.repo ? { repo: to.repo } : { system: to.system },
|
|
211
|
+
...api.kind !== "operation" ? { entry: api.id } : {},
|
|
212
|
+
...api.method ? { method: api.method } : {},
|
|
213
|
+
path: api.path
|
|
214
|
+
},
|
|
215
|
+
by: ctx.user,
|
|
216
|
+
at
|
|
217
|
+
}));
|
|
218
|
+
}
|
|
219
|
+
let ruleOut;
|
|
220
|
+
const q = rule ? await openRuleQuestion(ctx.root, from) : void 0;
|
|
221
|
+
if (rule && !q)
|
|
222
|
+
throw conflict(`${from} has no open target question to answer for all its calls: pair them one by one.`);
|
|
223
|
+
const target = to.repo ?? to.system;
|
|
224
|
+
if (q)
|
|
225
|
+
ruleOut = { question: q.id, match: "/**", target };
|
|
226
|
+
const rel = `${factsRelOf(ctx.root)}/${from}.corrections.jsonl`;
|
|
227
|
+
const lines = corrections.map(correctionLine);
|
|
228
|
+
const verify = `atticus verify ${from} --write`;
|
|
229
|
+
const commit = `git add ${rel}${q ? ` ${questionsRelOf(ctx.root)}/` : ""}
|
|
230
|
+
git commit -m "${safeMessage(`${from}: calls paired with ${target} on the canvas`)}"`;
|
|
231
|
+
let answer;
|
|
232
|
+
if (q) {
|
|
233
|
+
const { targetAnswerOf } = await import("./chunk-KFAVQZSX.js");
|
|
234
|
+
const t = await targetAnswerOf(ctx.root, q, target);
|
|
235
|
+
if ("problem" in t)
|
|
236
|
+
throw new HttpError(422, "Atticus can't do that yet", t.problem);
|
|
237
|
+
answer = t;
|
|
238
|
+
}
|
|
239
|
+
if (preview) {
|
|
240
|
+
const { verifyWritePreview } = await import("./chunk-XERYFDB5.js");
|
|
241
|
+
const v = await verifyWritePreview(ctx.root, from, { extra: corrections });
|
|
242
|
+
return {
|
|
243
|
+
status: 200,
|
|
244
|
+
body: {
|
|
245
|
+
written: false,
|
|
246
|
+
file: rel,
|
|
247
|
+
lines,
|
|
248
|
+
...ruleOut ? { rule: ruleOut } : {},
|
|
249
|
+
...v ? { preview: v } : {},
|
|
250
|
+
verify,
|
|
251
|
+
commit
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
if (lines.length) {
|
|
256
|
+
await mkdir(factsDirOf(ctx.root), { recursive: true });
|
|
257
|
+
const file = join(factsDirOf(ctx.root), `${from}.corrections.jsonl`);
|
|
258
|
+
await appendLines(file, lines);
|
|
259
|
+
ctx.events.publish({ type: "file.changed", path: rel });
|
|
260
|
+
}
|
|
261
|
+
if (q && answer) {
|
|
262
|
+
try {
|
|
263
|
+
await answerQuestion(ctx.root, q.id, {
|
|
264
|
+
text: answer.text,
|
|
265
|
+
match: "/**",
|
|
266
|
+
by: ctx.user,
|
|
267
|
+
at
|
|
268
|
+
});
|
|
269
|
+
ctx.events.publish({ type: "file.changed", path: questionsRelOf(ctx.root) });
|
|
270
|
+
} catch (e) {
|
|
271
|
+
if (e instanceof QuestionError)
|
|
272
|
+
throw new HttpError(422, "Atticus can't do that yet", e.message);
|
|
273
|
+
throw e;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
return {
|
|
277
|
+
status: 200,
|
|
278
|
+
body: {
|
|
279
|
+
written: true,
|
|
280
|
+
file: rel,
|
|
281
|
+
lines,
|
|
282
|
+
...ruleOut ? { rule: ruleOut } : {},
|
|
283
|
+
verify,
|
|
284
|
+
commit
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
}).add("POST", "/api/reading-rules/from-pairing", async ({ body }) => {
|
|
288
|
+
const b = api_exports.RuleFromPairingRequest.safeParse(body ?? {});
|
|
289
|
+
if (!b.success)
|
|
290
|
+
throw badRequest("Say the repo and the pairing's line: { repo, line }.");
|
|
291
|
+
if (!REPO.test(b.data.repo))
|
|
292
|
+
throw badRequest(`${JSON.stringify(b.data.repo)} isn't a repo name.`);
|
|
293
|
+
const onFile = await readFile(join(factsDirOf(ctx.root), `${b.data.repo}.corrections.jsonl`), "utf8").catch(() => "");
|
|
294
|
+
if (!onFile.split(/\r?\n/).some((l) => l.trim() === b.data.line.trim()))
|
|
295
|
+
throw notFound(`${b.data.repo}'s corrections have no such pairing.`);
|
|
296
|
+
const c = parseCorrections(b.data.line).corrections[0];
|
|
297
|
+
if (!c || c.action !== "link" || !c.link)
|
|
298
|
+
throw badRequest("That line isn't a pairing (a link correction).");
|
|
299
|
+
const op = await loadOrgPack(orgPackDirOf(ctx.root));
|
|
300
|
+
const type = estateRepos(op).find((x) => x.id === b.data.repo)?.type;
|
|
301
|
+
if (!type)
|
|
302
|
+
throw notFound(`No repo of the manifest is ${b.data.repo}.`);
|
|
303
|
+
const { ruleFromPairing } = await import("./chunk-UNAGJYET.js");
|
|
304
|
+
const { rulesAddCommand } = await import("./chunk-66PPNOON.js");
|
|
305
|
+
const rule = ruleFromPairing({
|
|
306
|
+
type,
|
|
307
|
+
to: c.link.repo ?? c.link.system ?? "it",
|
|
308
|
+
file: c.target.file,
|
|
309
|
+
line: c.target.line,
|
|
310
|
+
value: c.target.value,
|
|
311
|
+
...c.link.method ? { method: c.link.method } : {},
|
|
312
|
+
path: c.link.path,
|
|
313
|
+
by: c.by,
|
|
314
|
+
drafter: ctx.user
|
|
315
|
+
});
|
|
316
|
+
const said = [];
|
|
317
|
+
const code = await rulesAddCommand(ctx.root, { type }, {
|
|
318
|
+
key: rule.key,
|
|
319
|
+
rule: rule.rule,
|
|
320
|
+
files: (rule.files ?? []).join(","),
|
|
321
|
+
...rule.example ? { example: rule.example } : {},
|
|
322
|
+
draft: true,
|
|
323
|
+
...rule.by ? { by: rule.by } : {}
|
|
324
|
+
}, { out: (l) => said.push(l), err: (l) => said.push(l) });
|
|
325
|
+
if (code !== 0)
|
|
326
|
+
throw conflict(said.join(" "));
|
|
327
|
+
const rel = `${isAdopted(ctx.root) ? ".atticus/org-pack" : "org-pack"}/reading-rules/types/${type}.yaml`;
|
|
328
|
+
ctx.events.publish({ type: "file.changed", path: rel });
|
|
329
|
+
return {
|
|
330
|
+
status: 200,
|
|
331
|
+
body: {
|
|
332
|
+
file: rel,
|
|
333
|
+
key: rule.key,
|
|
334
|
+
rule: rule.rule,
|
|
335
|
+
activate: `atticus rules activate ${rule.key} --type ${type}`
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
}).add("POST", "/api/facts/{repo}/corrections/undo", async ({ params, body }) => {
|
|
339
|
+
const repo = params.repo;
|
|
340
|
+
if (!REPO.test(repo))
|
|
341
|
+
throw badRequest(`${JSON.stringify(repo)} isn't a repo name.`);
|
|
342
|
+
const b = api_exports.UndoCorrectionRequest.safeParse(body ?? {});
|
|
343
|
+
if (!b.success)
|
|
344
|
+
throw badRequest("Say which line to remove: { line }.");
|
|
345
|
+
const file = join(factsDirOf(ctx.root), `${repo}.corrections.jsonl`);
|
|
346
|
+
const rel = `${factsRelOf(ctx.root)}/${repo}.corrections.jsonl`;
|
|
347
|
+
await withSharedFileLock(file, async () => {
|
|
348
|
+
const text = await readFile(file, "utf8").catch(() => void 0);
|
|
349
|
+
if (text === void 0)
|
|
350
|
+
throw notFound(`There is no ${rel}.`);
|
|
351
|
+
const lines = text.split(/\r?\n/);
|
|
352
|
+
if (!b.data.line.trim())
|
|
353
|
+
throw badRequest("Say which correction line to remove.");
|
|
354
|
+
const i = lines.findIndex((l) => l.trim() === b.data.line.trim());
|
|
355
|
+
if (i < 0)
|
|
356
|
+
throw notFound(`${rel} has no such line (it may be removed already).`);
|
|
357
|
+
lines.splice(i, 1);
|
|
358
|
+
await writeFileAtomic(file, lines.join(/\r\n/.test(text) ? "\r\n" : "\n"));
|
|
359
|
+
});
|
|
360
|
+
ctx.events.publish({ type: "file.changed", path: rel });
|
|
361
|
+
return {
|
|
362
|
+
status: 200,
|
|
363
|
+
body: {
|
|
364
|
+
removed: b.data.line,
|
|
365
|
+
file: rel,
|
|
366
|
+
verify: `atticus verify ${repo} --write`,
|
|
367
|
+
commit: `git add ${rel}
|
|
368
|
+
git commit -m "${safeMessage(`${repo}: a correction undone`)}"`
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export {
|
|
375
|
+
settingsOf,
|
|
376
|
+
boxesOf,
|
|
377
|
+
candidatesOf,
|
|
378
|
+
uiLinkRoutes
|
|
379
|
+
};
|