@maycombhq/atticus 2.0.0-beta.2 → 2.0.0-beta.21
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-265LWMOA.js +91 -0
- package/dist/chunk-26WBY34Y.js +37 -0
- package/dist/{chunk-UBBC2XSG.js → chunk-26Z7OGQW.js} +518 -93
- package/dist/chunk-2D7PWSOK.js +172 -0
- package/dist/{chunk-JCZIKA4C.js → chunk-2HH3UCZM.js} +4 -4
- package/dist/{chunk-GDLULHTC.js → chunk-2HTEMYTB.js} +12 -26
- package/dist/chunk-2UCRFXFZ.js +130 -0
- package/dist/{chunk-MVZVGYXH.js → chunk-2V2ZPQQU.js} +81 -13
- package/dist/{chunk-BOHJZTEQ.js → chunk-36RY7ZXM.js} +130 -71
- package/dist/{chunk-I3E7CX4H.js → chunk-37WE3LS2.js} +3 -3
- package/dist/{chunk-IPKHE5D6.js → chunk-3AQ2R5NL.js} +1520 -871
- package/dist/chunk-3G6S7LAA.js +43 -0
- package/dist/chunk-3J5I7ZOU.js +58 -0
- package/dist/{chunk-65NYPGRC.js → chunk-3LZ6P5EP.js} +1 -1
- package/dist/chunk-3SSTNB4E.js +191 -0
- package/dist/chunk-3TD6S4TC.js +49 -0
- package/dist/{chunk-3C7EYRFZ.js → chunk-3UTYPHN3.js} +1 -1
- package/dist/{chunk-G2B4ZQGH.js → chunk-3WON4G3M.js} +2 -2
- package/dist/{chunk-S3QNRWYR.js → chunk-42EPP7OB.js} +12 -12
- package/dist/chunk-455SYIIE.js +113 -0
- package/dist/{chunk-YISXLPHN.js → chunk-4B6BT75O.js} +166 -23
- package/dist/{chunk-C6EKFH7J.js → chunk-4CLK2RJO.js} +7 -7
- package/dist/chunk-4CYTJ5TZ.js +38 -0
- package/dist/{chunk-EYWIDJFU.js → chunk-4D62IZII.js} +5 -5
- package/dist/chunk-4FOAYLI4.js +328 -0
- package/dist/{chunk-7JUKDRSZ.js → chunk-4KNOJC6J.js} +294 -215
- package/dist/{chunk-YMZ3TNYB.js → chunk-4PYC2UGC.js} +2 -2
- package/dist/{chunk-27NKUS3X.js → chunk-4SLBCEPD.js} +2104 -726
- package/dist/chunk-4TKVU2I2.js +122 -0
- package/dist/{chunk-RUVFXE2L.js → chunk-4WXRPQDE.js} +448 -47
- package/dist/{chunk-7ZUIMTOU.js → chunk-5CMPVC3N.js} +24 -24
- package/dist/chunk-5G7ILBUG.js +66 -0
- package/dist/{chunk-HFQCFSJR.js → chunk-5PV7S2ZP.js} +3 -3
- package/dist/{chunk-FITWGOJ2.js → chunk-5QUOPNLN.js} +4 -4
- package/dist/{chunk-Z6LF7HQN.js → chunk-5TDRBOAV.js} +5 -5
- package/dist/{chunk-T6AIP7H5.js → chunk-5WERBKLE.js} +199 -63
- package/dist/{chunk-XPCM366L.js → chunk-62DLJSLV.js} +8 -8
- package/dist/{chunk-L24C55VN.js → chunk-64AADMTW.js} +99 -25
- package/dist/{chunk-K65BJIMT.js → chunk-67BP7HXL.js} +17 -17
- package/dist/chunk-6DQYZU2W.js +379 -0
- package/dist/{chunk-EDS2L2LD.js → chunk-6EXDI5GI.js} +52 -26
- package/dist/chunk-6FNAKCET.js +38 -0
- package/dist/{chunk-6IU67AEK.js → chunk-75ASLHBT.js} +21 -15
- package/dist/{chunk-A3GY6SOA.js → chunk-75ZOZFGH.js} +18 -18
- package/dist/{chunk-MGYZM27B.js → chunk-77O633L5.js} +49 -23
- package/dist/{chunk-GQ4N4WKF.js → chunk-7AB6OWTV.js} +3 -3
- package/dist/{chunk-M766ZJ6W.js → chunk-7CZHUZBL.js} +25 -25
- package/dist/{chunk-A7UPUQFY.js → chunk-7FHNFCHK.js} +643 -124
- package/dist/chunk-7FUIVIBG.js +415 -0
- package/dist/{chunk-6QSERWXH.js → chunk-7QPCGTPS.js} +21 -21
- package/dist/{chunk-LR3R6Z2A.js → chunk-A2G72UI4.js} +7 -7
- package/dist/{chunk-I4JRCD6M.js → chunk-AE4P57KK.js} +23 -17
- package/dist/{chunk-AVJDSJ2F.js → chunk-AHW3RY3X.js} +7 -7
- package/dist/chunk-AM6FP6JW.js +43 -0
- package/dist/{chunk-CSZ4C5N6.js → chunk-AOCWFA7T.js} +93 -10
- package/dist/{chunk-EPTBZ3GP.js → chunk-API5TOUB.js} +1 -1
- package/dist/{chunk-652QWTLZ.js → chunk-AZDITBCT.js} +3 -3
- package/dist/{chunk-DPUYDDQG.js → chunk-BA2HUMDN.js} +25 -3
- package/dist/chunk-BA3U7ALS.js +99 -0
- package/dist/{chunk-HVUPKCGJ.js → chunk-BC6KKZ67.js} +5 -5
- package/dist/{chunk-CKSITVS4.js → chunk-BEPCKDCP.js} +2554 -722
- package/dist/{chunk-3ALD2W2A.js → chunk-BPPU3PW7.js} +4 -4
- package/dist/{chunk-QRAOANID.js → chunk-BVWWPBKD.js} +21 -21
- package/dist/{chunk-ZDPAS56H.js → chunk-BXBCMGIQ.js} +7 -1
- package/dist/chunk-BXZ4PKIT.js +233 -0
- package/dist/chunk-C7CEK3KW.js +247 -0
- package/dist/chunk-CFH3QH26.js +29 -0
- package/dist/chunk-CG6CULP6.js +170 -0
- package/dist/chunk-CLD4RVTA.js +45 -0
- package/dist/{chunk-DKJA76CJ.js → chunk-CNPY4NTZ.js} +13 -13
- package/dist/chunk-CNU5Q2D5.js +575 -0
- package/dist/{chunk-T2UYZSCQ.js → chunk-COYN3UAN.js} +126 -23
- package/dist/{chunk-23W7VWKR.js → chunk-CPK7QSBG.js} +1360 -113
- package/dist/{chunk-4AK7IBVP.js → chunk-D2WSW4GU.js} +1 -1
- package/dist/{chunk-ABWHYWNI.js → chunk-D57MFJPP.js} +3 -3
- package/dist/chunk-D5KV5PSK.js +45 -0
- package/dist/chunk-D5MASS4I.js +48 -0
- package/dist/{chunk-7EOBHUMC.js → chunk-DCWN3HFV.js} +2 -2
- package/dist/{chunk-QSXK2RGH.js → chunk-DDJPM5YX.js} +2 -2
- package/dist/chunk-DN4A2Q2O.js +57 -0
- package/dist/{chunk-IHMLFRVV.js → chunk-DUPZPDCJ.js} +58 -16
- package/dist/{chunk-PRPPGYZG.js → chunk-E2VXBSIR.js} +4 -4
- package/dist/chunk-E57AOFYN.js +32 -0
- package/dist/{chunk-UGLN7QHV.js → chunk-ECLXZWAG.js} +12 -12
- package/dist/{chunk-5WG5YP4T.js → chunk-EDZ45WIR.js} +14 -14
- package/dist/chunk-EFCQSMXB.js +37 -0
- package/dist/{chunk-2ANOROX3.js → chunk-EZIN5E5B.js} +8 -8
- package/dist/{chunk-BWZ77RQT.js → chunk-F6H2RJ3N.js} +1 -1
- package/dist/{chunk-OLQJTJJU.js → chunk-FAJDKNSD.js} +7 -3
- package/dist/chunk-FGAGWYZB.js +47 -0
- package/dist/{chunk-4WBVUHXN.js → chunk-FLVZFTLQ.js} +18 -18
- package/dist/chunk-FQ6WH6PB.js +140 -0
- package/dist/{chunk-T6XQL73F.js → chunk-FRHD22WM.js} +61 -23
- package/dist/{chunk-XAKWMCXI.js → chunk-FVMPFCDS.js} +4 -4
- package/dist/{chunk-B2WLAWNJ.js → chunk-FY3QIRTL.js} +3 -3
- package/dist/{chunk-CPA6HPVR.js → chunk-FYBF5MB2.js} +15 -11
- package/dist/{chunk-V2YTAIQO.js → chunk-G5YJBNDZ.js} +21 -6
- package/dist/chunk-G6IQYM25.js +339 -0
- package/dist/chunk-G6X4YL4D.js +161 -0
- package/dist/{chunk-SJRGMG6A.js → chunk-GC2VK3JT.js} +25 -25
- package/dist/{chunk-SP2I63OO.js → chunk-GCS3FZOB.js} +77 -3
- package/dist/{chunk-6TACQN3N.js → chunk-GDZB57IU.js} +5 -5
- package/dist/chunk-GIFMBCTW.js +221 -0
- package/dist/{chunk-YY6ZQQBP.js → chunk-GK4PYVEC.js} +18 -8
- package/dist/{chunk-TDD55CJH.js → chunk-GNWAOVFQ.js} +6 -5
- package/dist/chunk-GS76RXQE.js +226 -0
- package/dist/{chunk-YYQN46FY.js → chunk-GSGIZ2OO.js} +23 -23
- package/dist/chunk-GUYL7RMK.js +60 -0
- package/dist/chunk-GX74YWR7.js +321 -0
- package/dist/chunk-HE3HRDNZ.js +122 -0
- package/dist/{chunk-AIOQPLA5.js → chunk-HGHRSF3E.js} +30 -12
- package/dist/{chunk-2RMYG36Q.js → chunk-HK3VOHIE.js} +198 -336
- package/dist/{chunk-QZSX3F7C.js → chunk-HS4BGB4G.js} +24 -22
- package/dist/{chunk-XY3P7JW7.js → chunk-HSZMPH5T.js} +834 -149
- package/dist/{chunk-L6SGQIR3.js → chunk-HWD4JPU7.js} +4 -2
- package/dist/{chunk-PCVDV3UZ.js → chunk-HXXP2NTE.js} +6 -6
- package/dist/{chunk-AA6YULYB.js → chunk-I2A3Z5AK.js} +7 -7
- package/dist/{chunk-N7IXEHK3.js → chunk-ICHDSWEY.js} +7 -7
- package/dist/chunk-IFFRGC3N.js +31 -0
- package/dist/{chunk-4BN53TG3.js → chunk-IFHDV6KQ.js} +31 -23
- package/dist/chunk-J2O4LFVI.js +80 -0
- package/dist/chunk-J5AAZ6OJ.js +161 -0
- package/dist/{chunk-ZMFPW66A.js → chunk-JAABT3DA.js} +3 -3
- package/dist/chunk-JITJP64K.js +34 -0
- package/dist/chunk-JKIGL3XQ.js +162 -0
- package/dist/chunk-JRVNXLZP.js +615 -0
- package/dist/chunk-JRXHON4E.js +41 -0
- package/dist/{chunk-DHPACDG7.js → chunk-JS6WMC3J.js} +8 -8
- package/dist/chunk-JU4QNJSR.js +62 -0
- package/dist/{chunk-PAMPPUR6.js → chunk-JYMIB5XY.js} +1697 -172
- package/dist/{chunk-RRTKKSLQ.js → chunk-JYTIHTIK.js} +8 -6
- package/dist/{chunk-3HI6Z55Y.js → chunk-K332XW7K.js} +324 -39
- package/dist/{chunk-GLUX4EEP.js → chunk-K6JB6XTX.js} +9 -9
- package/dist/chunk-KDAHXQIE.js +294 -0
- package/dist/chunk-KYZMRSPS.js +93 -0
- package/dist/chunk-L4CESDPB.js +22 -0
- package/dist/{chunk-NXFPS2LR.js → chunk-LEBR5NHW.js} +14 -14
- package/dist/chunk-LIJJCBQI.js +223 -0
- package/dist/{chunk-DE76JROX.js → chunk-LIRVU3HW.js} +16 -16
- package/dist/{chunk-JMSCMUCA.js → chunk-LN77DXBM.js} +145 -21
- package/dist/{chunk-JIITQXFB.js → chunk-LNWEWYCM.js} +2969 -788
- package/dist/{chunk-TANFV3MZ.js → chunk-LO3BLMVG.js} +3 -3
- package/dist/chunk-LPV6T362.js +250 -0
- package/dist/{chunk-2VHF7OXM.js → chunk-LQH4P45K.js} +1 -1
- package/dist/chunk-LU4MQVAL.js +41 -0
- package/dist/chunk-LWDNKE4X.js +273 -0
- package/dist/chunk-M4H2UG4R.js +218 -0
- package/dist/{chunk-6BVONWJ7.js → chunk-M6D2U3YM.js} +3 -3
- package/dist/chunk-MD7KUEJ3.js +514 -0
- package/dist/{chunk-66YVAGGM.js → chunk-MMZUN7ZO.js} +20 -20
- package/dist/chunk-MZGRDONP.js +916 -0
- package/dist/chunk-N3RUGTGV.js +39 -0
- package/dist/{chunk-JGZCG5VM.js → chunk-NCB6656Z.js} +7 -7
- package/dist/{chunk-4NDAAFQT.js → chunk-NRQ65LTQ.js} +7 -5
- package/dist/{chunk-UNM6ZOKP.js → chunk-NTAVOWYD.js} +145 -18
- package/dist/{chunk-3USYZGRF.js → chunk-NYOABJNK.js} +36 -27
- package/dist/{chunk-WVPJSRRJ.js → chunk-O4IKAIZ2.js} +24 -20
- package/dist/{chunk-D3PO4DOZ.js → chunk-ODMBPDDV.js} +51 -14
- package/dist/chunk-OKUB6RJA.js +533 -0
- package/dist/chunk-OMPENNWY.js +39 -0
- package/dist/chunk-OPQZISG3.js +25 -0
- package/dist/{chunk-5GGOLAKC.js → chunk-OV57AHCG.js} +26 -26
- package/dist/chunk-OZJ3JLYI.js +58 -0
- package/dist/{chunk-KEM4SDDP.js → chunk-P2VBXX7N.js} +11 -10
- package/dist/{chunk-S2A7YC3Q.js → chunk-PAINMSID.js} +10150 -1720
- package/dist/chunk-PKJAV25S.js +43 -0
- package/dist/{chunk-EBEW3XXQ.js → chunk-PNQLCRSS.js} +4 -4
- package/dist/{chunk-WY6PP6AA.js → chunk-PQH56YF6.js} +37 -5
- package/dist/chunk-PRTBPXYA.js +50 -0
- package/dist/{chunk-YEDDOYSC.js → chunk-PRW3HXM3.js} +2 -2
- package/dist/chunk-PRZ7KMWL.js +42 -0
- package/dist/{chunk-6M5NK3K3.js → chunk-PTQ3ZALZ.js} +42 -4
- package/dist/{chunk-5GDRCDQB.js → chunk-PUEWDYGP.js} +2 -2
- package/dist/chunk-Q26LDIUV.js +236 -0
- package/dist/{chunk-CR3MTH32.js → chunk-Q46QDDMF.js} +77 -7
- package/dist/chunk-QBNWF5ZU.js +19 -0
- package/dist/chunk-QE527XRY.js +342 -0
- package/dist/{chunk-CNUKCS2T.js → chunk-QHJJMZLX.js} +1518 -54
- package/dist/chunk-QJCJOMW3.js +425 -0
- package/dist/{chunk-VYDBJ73M.js → chunk-QKMRFNMA.js} +15 -15
- package/dist/chunk-QOOEYDNJ.js +317 -0
- package/dist/chunk-QSIDVFB7.js +45 -0
- package/dist/{chunk-R77KLRB3.js → chunk-RA33EYS4.js} +19 -18
- package/dist/{chunk-DFBCSHVT.js → chunk-RALY3E5U.js} +4 -4
- package/dist/{chunk-ZCJDOK2S.js → chunk-S2RY3BOD.js} +35 -21
- package/dist/chunk-S5LSDXV4.js +40 -0
- package/dist/chunk-SB5GRUFM.js +54 -0
- package/dist/chunk-SH27FYPF.js +150 -0
- package/dist/chunk-T74WQQGS.js +40 -0
- package/dist/{chunk-O3WI5KWW.js → chunk-TGVVUKTG.js} +2 -2
- package/dist/chunk-THN26IEF.js +48 -0
- package/dist/chunk-TJH2EUAZ.js +47 -0
- package/dist/{chunk-ZNCEKR4J.js → chunk-TQ4TG57V.js} +12 -8
- package/dist/{chunk-7FBGJFEE.js → chunk-TQTRWENN.js} +12 -12
- package/dist/{chunk-TYAID7B7.js → chunk-TSM6T6GQ.js} +23 -23
- package/dist/{chunk-DPZHZQKE.js → chunk-TW3KOSQK.js} +43 -10
- package/dist/{chunk-MC3H7736.js → chunk-TWQRPM76.js} +37 -4
- package/dist/chunk-TYD6I4CZ.js +109 -0
- package/dist/chunk-U3NBK4EU.js +420 -0
- package/dist/{chunk-6JCPI55B.js → chunk-UDXWIPCB.js} +47 -7
- package/dist/{chunk-MMOSZPWJ.js → chunk-UEVZZZU2.js} +4 -4
- package/dist/{chunk-JBTK5OP2.js → chunk-UF4UHCIG.js} +2 -2
- package/dist/{chunk-6JUBZBMW.js → chunk-UFE36WJH.js} +4 -4
- package/dist/{chunk-ONLS5QA5.js → chunk-URIKUID7.js} +12 -12
- package/dist/chunk-UYLBRRFK.js +1106 -0
- package/dist/chunk-UZACEG2C.js +515 -0
- package/dist/{chunk-7SW2QWLU.js → chunk-VAMHOHUU.js} +12 -12
- package/dist/{chunk-RZPYKDWS.js → chunk-VUVGX5L2.js} +1 -1
- package/dist/{chunk-Q4D5X7QB.js → chunk-VYOCPTUB.js} +44 -24
- package/dist/{chunk-CAQZUNOH.js → chunk-WAZEXEJH.js} +567 -3
- package/dist/chunk-WCEF7H6L.js +221 -0
- package/dist/{chunk-2DIQQJCB.js → chunk-WEOMJHPV.js} +12 -12
- package/dist/{chunk-FHH4I4ZV.js → chunk-WFU77T3A.js} +12 -6
- package/dist/chunk-WIWTJMMR.js +292 -0
- package/dist/{chunk-2BFCZ3RK.js → chunk-WNTIOBOG.js} +18 -18
- package/dist/{chunk-7WD63HU2.js → chunk-X2CUXTWU.js} +6 -6
- package/dist/chunk-X7EMBM5X.js +34 -0
- package/dist/chunk-XEQCQO66.js +33 -0
- package/dist/{chunk-F7HYOUFF.js → chunk-XG4WJHLQ.js} +20 -4
- package/dist/{chunk-EFHQ3TWP.js → chunk-XOL3GFW2.js} +171 -31
- package/dist/{chunk-NE2W3OO7.js → chunk-XQ3YZ4QW.js} +22 -22
- package/dist/{chunk-CEXSU4S6.js → chunk-Y6K3CJBU.js} +723 -85
- package/dist/{chunk-4RS5KZQD.js → chunk-YAH5IQAL.js} +5 -5
- package/dist/{chunk-64EQYWCA.js → chunk-YBOVNMHC.js} +51 -14
- package/dist/chunk-YF5DZCPN.js +1212 -0
- package/dist/chunk-YIGBJNH4.js +37 -0
- package/dist/{chunk-BKVWTZ6A.js → chunk-YJ3TBOTK.js} +25 -25
- package/dist/{chunk-Q5AMFEWD.js → chunk-YKTE2RU3.js} +2 -2
- package/dist/{chunk-7EKXJZ2Y.js → chunk-YO2PKTXT.js} +296 -37
- package/dist/{chunk-6J5OKA4Y.js → chunk-YTTNTQOX.js} +15 -15
- package/dist/{chunk-OT2O76OS.js → chunk-YWAKDNMH.js} +183 -33
- package/dist/{chunk-R6XF6UR3.js → chunk-YZDZOEV4.js} +4 -4
- package/dist/chunk-Z3QFH7YG.js +17 -0
- package/dist/{chunk-W5BVQF44.js → chunk-Z6VLC5X4.js} +17 -17
- package/dist/{chunk-HLJAXMM4.js → chunk-ZFQMMU5Y.js} +2 -2
- package/dist/{chunk-W3BQAZ3Q.js → chunk-ZKYRDV7A.js} +12 -12
- package/dist/{chunk-ZMAINWBW.js → chunk-ZLS6PU2O.js} +3 -3
- package/dist/{chunk-ZVM6AKKM.js → chunk-ZOSD4FXV.js} +3 -3
- package/dist/chunk-ZPDDEVQX.js +47 -0
- package/dist/{chunk-TXLH6WHQ.js → chunk-ZQLRCA2V.js} +11 -11
- package/dist/{chunk-HITVBIJS.js → chunk-ZX7235KR.js} +128 -54
- package/dist/{chunk-GT4I4ZWM.js → chunk-ZZFHLRQW.js} +18 -16
- package/dist/files.json +636 -364
- package/dist/packages/naysayer/constitution/constitution.yaml +19 -0
- package/dist/packages/sdk/npm/index.js +5614 -2343
- package/dist/packages/ui/dist/assets/{elk-api-tma0MCuh.js → elk-api-CowTnhEJ.js} +2 -2
- package/dist/packages/ui/dist/assets/index-Dw20IRhQ.css +1 -0
- package/dist/packages/ui/dist/assets/index-z2wv0d5d.js +47 -0
- package/dist/packages/ui/dist/index.html +2 -2
- package/package.json +4 -4
- 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-RVH5SUW5.js +0 -69
- package/dist/chunk-VN3DP4LQ.js +0 -43
- 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,221 @@
|
|
|
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
|
+
badRequest
|
|
8
|
+
} from "./chunk-HK3VOHIE.js";
|
|
9
|
+
import {
|
|
10
|
+
catalogRecords
|
|
11
|
+
} from "./chunk-FY3QIRTL.js";
|
|
12
|
+
import {
|
|
13
|
+
RecordId,
|
|
14
|
+
catalogDirOf,
|
|
15
|
+
changesDirOf,
|
|
16
|
+
readRepoSpec,
|
|
17
|
+
require_dist,
|
|
18
|
+
specRepos,
|
|
19
|
+
specsDirOf
|
|
20
|
+
} from "./chunk-PAINMSID.js";
|
|
21
|
+
import {
|
|
22
|
+
__toESM
|
|
23
|
+
} from "./chunk-TV45EUGM.js";
|
|
24
|
+
|
|
25
|
+
// packages/cli/dist/ui-api-cites.js
|
|
26
|
+
import { readdir, readFile, stat } from "node:fs/promises";
|
|
27
|
+
import { isAbsolute, join, relative, sep } from "node:path";
|
|
28
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
29
|
+
async function fingerprint(dirs) {
|
|
30
|
+
let count = 0;
|
|
31
|
+
let newest = 0;
|
|
32
|
+
const walk = async (d) => {
|
|
33
|
+
const entries = await readdir(d, { withFileTypes: true }).catch(() => []);
|
|
34
|
+
for (const e of entries) {
|
|
35
|
+
const p = join(d, e.name);
|
|
36
|
+
if (e.isDirectory())
|
|
37
|
+
await walk(p);
|
|
38
|
+
else {
|
|
39
|
+
count++;
|
|
40
|
+
const s = await stat(p).catch(() => void 0);
|
|
41
|
+
if (s && s.mtimeMs > newest)
|
|
42
|
+
newest = s.mtimeMs;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
for (const d of dirs)
|
|
47
|
+
await walk(d);
|
|
48
|
+
return `${count}:${newest}`;
|
|
49
|
+
}
|
|
50
|
+
async function build(root) {
|
|
51
|
+
const index = /* @__PURE__ */ new Map();
|
|
52
|
+
const lineOf = (repo, path, line) => {
|
|
53
|
+
const files = index.get(repo) ?? /* @__PURE__ */ new Map();
|
|
54
|
+
index.set(repo, files);
|
|
55
|
+
const lines = files.get(path) ?? /* @__PURE__ */ new Map();
|
|
56
|
+
files.set(path, lines);
|
|
57
|
+
const l = lines.get(line) ?? { line, flows: [], records: [] };
|
|
58
|
+
lines.set(line, l);
|
|
59
|
+
return l;
|
|
60
|
+
};
|
|
61
|
+
for (const specRepo of await specRepos(root))
|
|
62
|
+
for (const f of (await readRepoSpec(root, specRepo, { cacheRoot: root })).flows) {
|
|
63
|
+
const parts = [
|
|
64
|
+
{ step: 0, kind: f.trigger.kind, evidence: f.trigger.evidence },
|
|
65
|
+
...f.steps.map((s, i) => ({
|
|
66
|
+
step: i + 1,
|
|
67
|
+
kind: s.kind,
|
|
68
|
+
...s.confirmedBy ? { confirmedBy: s.confirmedBy } : {},
|
|
69
|
+
evidence: s.evidence
|
|
70
|
+
}))
|
|
71
|
+
];
|
|
72
|
+
for (const part of parts)
|
|
73
|
+
for (const e of part.evidence) {
|
|
74
|
+
if (!e.path || e.line === void 0)
|
|
75
|
+
continue;
|
|
76
|
+
const l = lineOf(e.repo ?? specRepo, e.path, e.line);
|
|
77
|
+
if (l.flows.some((x) => x.flow === f.id && x.step === part.step))
|
|
78
|
+
continue;
|
|
79
|
+
l.flows.push({
|
|
80
|
+
repo: specRepo,
|
|
81
|
+
flow: f.id,
|
|
82
|
+
name: f.name,
|
|
83
|
+
step: part.step,
|
|
84
|
+
kind: part.kind,
|
|
85
|
+
...part.confirmedBy ? { confirmedBy: part.confirmedBy } : {}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
for (const r of await catalogRecords(root)) {
|
|
90
|
+
const name = r.name;
|
|
91
|
+
for (const e of r.evidence) {
|
|
92
|
+
if (!e.repo || !e.path || e.line === void 0)
|
|
93
|
+
continue;
|
|
94
|
+
const l = lineOf(e.repo, e.path, e.line);
|
|
95
|
+
if (l.records.some((x) => x.kind === r.kind && x.id === r.id))
|
|
96
|
+
continue;
|
|
97
|
+
l.records.push({
|
|
98
|
+
kind: r.kind,
|
|
99
|
+
id: r.id,
|
|
100
|
+
...typeof name === "string" && name !== r.id ? { name } : {},
|
|
101
|
+
source: e.source
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return index;
|
|
106
|
+
}
|
|
107
|
+
var DONE = /* @__PURE__ */ new Set(["released", "archived", "post-release-review"]);
|
|
108
|
+
async function inFlight(root) {
|
|
109
|
+
const out = /* @__PURE__ */ new Map();
|
|
110
|
+
const dir = changesDirOf(root);
|
|
111
|
+
for (const e of await readdir(dir, { withFileTypes: true }).catch(() => [])) {
|
|
112
|
+
if (!e.isDirectory() || e.name === "archive")
|
|
113
|
+
continue;
|
|
114
|
+
const yaml = await readFile(join(dir, e.name, "change.yaml"), "utf8").catch(() => "");
|
|
115
|
+
const state = (() => {
|
|
116
|
+
try {
|
|
117
|
+
return (0, import_yaml.parse)(yaml)?.state;
|
|
118
|
+
} catch {
|
|
119
|
+
return void 0;
|
|
120
|
+
}
|
|
121
|
+
})();
|
|
122
|
+
if (!yaml || typeof state === "string" && DONE.has(state))
|
|
123
|
+
continue;
|
|
124
|
+
for (const f of await readdir(join(dir, e.name, "target-flows")).catch(() => []))
|
|
125
|
+
if (f.endsWith(".yaml")) {
|
|
126
|
+
const flow = f.slice(0, -".yaml".length);
|
|
127
|
+
out.set(flow, [...out.get(flow) ?? [], e.name]);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return out;
|
|
131
|
+
}
|
|
132
|
+
async function citeList(root, index, repo, path) {
|
|
133
|
+
const lines = [...index.get(repo)?.get(path)?.values() ?? []].sort((a, b) => a.line - b.line);
|
|
134
|
+
const flying = await inFlight(root);
|
|
135
|
+
const shown = lines.map((l) => ({
|
|
136
|
+
...l,
|
|
137
|
+
flows: [...l.flows].sort((a, b) => a.flow.localeCompare(b.flow) || a.step - b.step).map((f) => flying.get(f.flow)?.length ? { ...f, changes: flying.get(f.flow) } : f)
|
|
138
|
+
}));
|
|
139
|
+
return { repo, path, lines: shown };
|
|
140
|
+
}
|
|
141
|
+
function fileInRepo(root, file) {
|
|
142
|
+
const rel = relative(root, file);
|
|
143
|
+
if (!rel || rel.startsWith("..") || isAbsolute(rel))
|
|
144
|
+
return void 0;
|
|
145
|
+
const parts = rel.split(sep);
|
|
146
|
+
if (parts[0] !== "workspace")
|
|
147
|
+
return { path: parts.join("/") };
|
|
148
|
+
const at = parts[1] === ".worktrees" ? 3 : parts[1] === ".branches" ? 2 : 1;
|
|
149
|
+
const repo = parts[at];
|
|
150
|
+
const rest = parts.slice(parts[1] === ".branches" ? 4 : at + 1);
|
|
151
|
+
if (!repo || !rest.length || !RecordId.safeParse(repo).success)
|
|
152
|
+
return void 0;
|
|
153
|
+
return { repo, path: rest.join("/") };
|
|
154
|
+
}
|
|
155
|
+
async function citesCli(root, o, io) {
|
|
156
|
+
let repo = o.repo;
|
|
157
|
+
let path = o.path;
|
|
158
|
+
const index = await build(root);
|
|
159
|
+
if (o.file) {
|
|
160
|
+
const at = fileInRepo(root, o.file);
|
|
161
|
+
if (!at) {
|
|
162
|
+
io.err(`${o.file} isn't in this metarepo or a repo's checkout in its workspace.`);
|
|
163
|
+
return 1;
|
|
164
|
+
}
|
|
165
|
+
path = at.path;
|
|
166
|
+
repo = at.repo ?? [...index.keys()].find((r) => index.get(r).has(at.path)) ?? void 0;
|
|
167
|
+
if (!repo) {
|
|
168
|
+
if (o.json)
|
|
169
|
+
io.out(JSON.stringify({ repo: "", path, lines: [] }, null, 2));
|
|
170
|
+
else
|
|
171
|
+
io.out(`Nothing in the specs or the catalog cites ${path}.`);
|
|
172
|
+
return 0;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (!repo || !path || !RecordId.safeParse(repo).success) {
|
|
176
|
+
io.err("Say which file: atticus cites --repo <repo> --path <its path in the repo>, or --file <path on disk>.");
|
|
177
|
+
return 2;
|
|
178
|
+
}
|
|
179
|
+
const v = await citeList(root, index, repo, path);
|
|
180
|
+
if (o.json) {
|
|
181
|
+
io.out(JSON.stringify(v, null, 2));
|
|
182
|
+
return 0;
|
|
183
|
+
}
|
|
184
|
+
if (!v.lines.length) {
|
|
185
|
+
io.out(`Nothing in the specs or the catalog cites ${repo}/${path}.`);
|
|
186
|
+
return 0;
|
|
187
|
+
}
|
|
188
|
+
for (const l of v.lines) {
|
|
189
|
+
const flows = l.flows.map((f) => `${f.name} (step ${f.step})${f.changes?.length ? `, changed by ${f.changes.join(", ")}` : ""}`);
|
|
190
|
+
const records = l.records.map((r) => `${r.kind} ${r.name ?? r.id}`);
|
|
191
|
+
io.out(`Line ${l.line}: ${[...flows, ...records].join("; ")}`);
|
|
192
|
+
}
|
|
193
|
+
return 0;
|
|
194
|
+
}
|
|
195
|
+
function uiCiteRoutes(r, ctx) {
|
|
196
|
+
const root = ctx.root;
|
|
197
|
+
let cached;
|
|
198
|
+
const indexNow = async () => {
|
|
199
|
+
const print = await fingerprint([specsDirOf(root), catalogDirOf(root)]);
|
|
200
|
+
if (cached?.print !== print)
|
|
201
|
+
cached = { print, index: build(root) };
|
|
202
|
+
return cached.index;
|
|
203
|
+
};
|
|
204
|
+
void indexNow().catch(() => void 0);
|
|
205
|
+
r.add("GET", "/api/cites", async ({ query }) => {
|
|
206
|
+
const repo = query.get("repo");
|
|
207
|
+
const path = query.get("path");
|
|
208
|
+
if (!repo || !RecordId.safeParse(repo).success)
|
|
209
|
+
throw badRequest("Say which repo: ?repo=<the repo's id>.");
|
|
210
|
+
if (!path)
|
|
211
|
+
throw badRequest("Say which file: ?path=<its path in the repo>.");
|
|
212
|
+
return { status: 200, body: await citeList(root, await indexNow(), repo, path) };
|
|
213
|
+
});
|
|
214
|
+
return r;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export {
|
|
218
|
+
fileInRepo,
|
|
219
|
+
citesCli,
|
|
220
|
+
uiCiteRoutes
|
|
221
|
+
};
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
exportFrameworksKit,
|
|
8
8
|
formatFrameworkSurvey,
|
|
9
9
|
surveyFrameworks
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-P2VBXX7N.js";
|
|
11
|
+
import "./chunk-4SLBCEPD.js";
|
|
12
|
+
import "./chunk-64AADMTW.js";
|
|
13
|
+
import "./chunk-JYMIB5XY.js";
|
|
14
|
+
import "./chunk-CPK7QSBG.js";
|
|
15
|
+
import "./chunk-YO2PKTXT.js";
|
|
16
16
|
import {
|
|
17
17
|
houseDependencies,
|
|
18
18
|
learnFramework,
|
|
@@ -20,14 +20,14 @@ import {
|
|
|
20
20
|
learnJsFramework,
|
|
21
21
|
learnJsFrameworkFromTarball,
|
|
22
22
|
runFrameworkTests
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TWQRPM76.js";
|
|
24
24
|
import {
|
|
25
25
|
baseClonePath
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XOL3GFW2.js";
|
|
27
|
+
import "./chunk-QHJJMZLX.js";
|
|
27
28
|
import {
|
|
28
29
|
fsRepo
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-CNUKCS2T.js";
|
|
30
|
+
} from "./chunk-7AB6OWTV.js";
|
|
31
31
|
import {
|
|
32
32
|
FrameworkModel,
|
|
33
33
|
RecordId,
|
|
@@ -35,8 +35,8 @@ import {
|
|
|
35
35
|
orgPackDirOf,
|
|
36
36
|
require_dist,
|
|
37
37
|
toCanonicalYaml
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-PAINMSID.js";
|
|
39
|
+
import "./chunk-ODMBPDDV.js";
|
|
40
40
|
import {
|
|
41
41
|
__toESM
|
|
42
42
|
} from "./chunk-TV45EUGM.js";
|
|
@@ -5,23 +5,25 @@ var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
|
|
|
5
5
|
var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
|
|
6
6
|
import {
|
|
7
7
|
targetFlowsOf
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GNWAOVFQ.js";
|
|
9
9
|
import {
|
|
10
10
|
estimateChange,
|
|
11
11
|
loadRelease,
|
|
12
12
|
releaseForecast
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-36RY7ZXM.js";
|
|
14
14
|
import {
|
|
15
15
|
gateStatus,
|
|
16
16
|
reviewedGates
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-K332XW7K.js";
|
|
18
18
|
import {
|
|
19
|
-
detectConflicts
|
|
20
|
-
|
|
19
|
+
detectConflicts,
|
|
20
|
+
outsideSystemsOf
|
|
21
|
+
} from "./chunk-HSZMPH5T.js";
|
|
21
22
|
import {
|
|
22
23
|
loadEstimates,
|
|
24
|
+
loadOrgPack,
|
|
23
25
|
orgPackDirOf
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PAINMSID.js";
|
|
25
27
|
|
|
26
28
|
// packages/cli/dist/change-estimate.js
|
|
27
29
|
import { relative, sep } from "node:path";
|
|
@@ -42,6 +44,9 @@ async function estimateOf(root, change, o = {}) {
|
|
|
42
44
|
systemOf.set(r.id, r.system);
|
|
43
45
|
}
|
|
44
46
|
const boundaryOf = (c) => systems.get(systemOf.get(c) ?? c);
|
|
47
|
+
const op = await loadOrgPack(orgPackDirOf(root)).catch(() => void 0);
|
|
48
|
+
const outside = op ? outsideSystemsOf(op) : /* @__PURE__ */ new Map();
|
|
49
|
+
const otherTeam = (c) => boundaryOf(c) !== "vendor" && outside.get(systemOf.get(c) ?? c) === "other-team";
|
|
45
50
|
let openBlocking = 0;
|
|
46
51
|
for (const gate of await reviewedGates(root, change).catch(() => []))
|
|
47
52
|
openBlocking += await gateStatus(root, change, gate).then((s) => s.open.blocking, () => 0);
|
|
@@ -76,6 +81,7 @@ async function estimateOf(root, change, o = {}) {
|
|
|
76
81
|
flows,
|
|
77
82
|
...estimates ? { table: estimates } : {},
|
|
78
83
|
boundaryOf,
|
|
84
|
+
otherTeam,
|
|
79
85
|
openBlocking,
|
|
80
86
|
conflicts,
|
|
81
87
|
...waitDays !== void 0 ? { waitDays } : {}
|
|
@@ -0,0 +1,292 @@
|
|
|
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
|
+
targetFlowsOf
|
|
8
|
+
} from "./chunk-GNWAOVFQ.js";
|
|
9
|
+
import {
|
|
10
|
+
withFileLock
|
|
11
|
+
} from "./chunk-THN26IEF.js";
|
|
12
|
+
import "./chunk-5QUOPNLN.js";
|
|
13
|
+
import {
|
|
14
|
+
TARGET_DIR,
|
|
15
|
+
applyStroke,
|
|
16
|
+
endpointKey,
|
|
17
|
+
loadEstate,
|
|
18
|
+
planSketchWrite,
|
|
19
|
+
readDeltas,
|
|
20
|
+
writeSketch
|
|
21
|
+
} from "./chunk-BEPCKDCP.js";
|
|
22
|
+
import "./chunk-HWD4JPU7.js";
|
|
23
|
+
import "./chunk-5WERBKLE.js";
|
|
24
|
+
import "./chunk-K332XW7K.js";
|
|
25
|
+
import {
|
|
26
|
+
changeFolder
|
|
27
|
+
} from "./chunk-HSZMPH5T.js";
|
|
28
|
+
import "./chunk-D2WSW4GU.js";
|
|
29
|
+
import "./chunk-4KNOJC6J.js";
|
|
30
|
+
import "./chunk-4SLBCEPD.js";
|
|
31
|
+
import "./chunk-64AADMTW.js";
|
|
32
|
+
import "./chunk-JYMIB5XY.js";
|
|
33
|
+
import "./chunk-CPK7QSBG.js";
|
|
34
|
+
import {
|
|
35
|
+
labelText,
|
|
36
|
+
readDrawio
|
|
37
|
+
} from "./chunk-YO2PKTXT.js";
|
|
38
|
+
import "./chunk-TWQRPM76.js";
|
|
39
|
+
import "./chunk-XOL3GFW2.js";
|
|
40
|
+
import "./chunk-QHJJMZLX.js";
|
|
41
|
+
import "./chunk-7AB6OWTV.js";
|
|
42
|
+
import {
|
|
43
|
+
changesRelOf
|
|
44
|
+
} from "./chunk-PAINMSID.js";
|
|
45
|
+
import "./chunk-ODMBPDDV.js";
|
|
46
|
+
import "./chunk-TV45EUGM.js";
|
|
47
|
+
|
|
48
|
+
// packages/cli/dist/change-sketch.js
|
|
49
|
+
import { readFile } from "node:fs/promises";
|
|
50
|
+
import { basename, extname, join } from "node:path";
|
|
51
|
+
var METHODS = /* @__PURE__ */ new Set(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]);
|
|
52
|
+
function lineParts(text) {
|
|
53
|
+
const toks = text.trim().split(/\s+/).filter(Boolean);
|
|
54
|
+
if (toks.length >= 2 && METHODS.has(toks[0].toUpperCase()) && toks[1].startsWith("/"))
|
|
55
|
+
return { method: toks[0].toUpperCase(), path: toks[1] };
|
|
56
|
+
if (toks.length === 1 && /^[A-Za-z0-9][\w.-]*\.[\w.-]+$/.test(toks[0]))
|
|
57
|
+
return { topic: toks[0] };
|
|
58
|
+
return {};
|
|
59
|
+
}
|
|
60
|
+
function readMermaidSketch(text) {
|
|
61
|
+
const labels = /* @__PURE__ */ new Map();
|
|
62
|
+
const lines = [];
|
|
63
|
+
const problems = [];
|
|
64
|
+
const legendOf = (s) => {
|
|
65
|
+
const m = /^\s*[[(]\s*(new|modify|modified|changed|retire|retired|removed)\s*[\])]\s*(.*)$/i.exec(s);
|
|
66
|
+
if (!m)
|
|
67
|
+
return { text: s.trim() };
|
|
68
|
+
const w = m[1].toLowerCase();
|
|
69
|
+
return {
|
|
70
|
+
legend: w.startsWith("new") ? "new" : w.startsWith("ret") || w === "removed" ? "retire" : "modify",
|
|
71
|
+
text: m[2].trim()
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
const node = (tok) => {
|
|
75
|
+
const m = /^([A-Za-z0-9_.-]+)(?:\[\s*"?([^\]"]*)"?\s*\]|\(+\s*"?([^)"]*)"?\s*\)+|\{+\s*"?([^}"]*)"?\s*\}+|>\s*"?([^\]"]*)"?\s*\])?$/.exec(tok.trim());
|
|
76
|
+
if (!m)
|
|
77
|
+
return tok.trim();
|
|
78
|
+
const label = (m[2] ?? m[3] ?? m[4] ?? m[5])?.trim();
|
|
79
|
+
if (label)
|
|
80
|
+
labels.set(m[1], label);
|
|
81
|
+
return m[1];
|
|
82
|
+
};
|
|
83
|
+
const rows = text.split(/\r?\n/);
|
|
84
|
+
rows.forEach((raw, i) => {
|
|
85
|
+
const row = raw.replace(/%%.*$/, "").trim();
|
|
86
|
+
if (!row || /^(flowchart|graph)\b/i.test(row) || /^(subgraph|end|classDef|class|style|direction)\b/i.test(row))
|
|
87
|
+
return;
|
|
88
|
+
if (/<\s*[-=.]/.test(row)) {
|
|
89
|
+
problems.push(`line ${i + 1}: a two-way line: draw one line each way: ${row}`);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const m = /^(.+?)\s*(?:--+|==+|-\.+-?)\s*(?:\|([^|]*)\||"?([^">=-]*?)"?\s*(?:--+|==+|\.-+))?\s*>\s*(?:\|([^|]*)\|)?\s*(.+)$/.exec(row);
|
|
93
|
+
if (!m) {
|
|
94
|
+
if (/^[A-Za-z0-9_.-]+\s*[[({]/.test(row))
|
|
95
|
+
node(row);
|
|
96
|
+
else
|
|
97
|
+
problems.push(`line ${i + 1}: not a box or a line: ${row}`);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (/-->|==>|\.->|&/.test(m[1]) || /-->|==>|\.->|&/.test(m[5])) {
|
|
101
|
+
problems.push(`line ${i + 1}: one line between two boxes at a time (no chains or &): ${row}`);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const from = node(m[1]);
|
|
105
|
+
const to = node(m[5]);
|
|
106
|
+
const { legend, text: label } = legendOf((m[2] ?? m[3] ?? m[4] ?? "").trim().replace(/^"(.*)"$/, "$1"));
|
|
107
|
+
lines.push({
|
|
108
|
+
from: labels.get(from) ?? from,
|
|
109
|
+
to: labels.get(to) ?? to,
|
|
110
|
+
label,
|
|
111
|
+
...lineParts(label),
|
|
112
|
+
...legend ? { legend } : {},
|
|
113
|
+
at: `line ${i + 1}`
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
for (const l of lines) {
|
|
117
|
+
l.from = labels.get(l.from) ?? l.from;
|
|
118
|
+
l.to = labels.get(l.to) ?? l.to;
|
|
119
|
+
}
|
|
120
|
+
return { lines, problems };
|
|
121
|
+
}
|
|
122
|
+
function readDrawioSketch(xml) {
|
|
123
|
+
const d = readDrawio(xml);
|
|
124
|
+
const lines = d.edges.map((e) => ({
|
|
125
|
+
from: e.from,
|
|
126
|
+
to: e.to,
|
|
127
|
+
label: labelText(e.label),
|
|
128
|
+
...e.method ? { method: e.method } : {},
|
|
129
|
+
...e.path ? { path: e.path } : {},
|
|
130
|
+
...e.topic ? { topic: e.topic } : {},
|
|
131
|
+
...e.legend ? { legend: e.legend } : {},
|
|
132
|
+
at: `${e.page}:${e.line}`
|
|
133
|
+
}));
|
|
134
|
+
return { lines, problems: d.problems.map((p) => `${p.cell}: ${p.message}`) };
|
|
135
|
+
}
|
|
136
|
+
var slug = (s) => s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
137
|
+
function componentOf(label, estate) {
|
|
138
|
+
const s = slug(label);
|
|
139
|
+
const known = (id) => estate.ids.has(id) || estate.flows.some((f) => f.flow.component === id);
|
|
140
|
+
if (known(label))
|
|
141
|
+
return label;
|
|
142
|
+
if (known(s))
|
|
143
|
+
return s;
|
|
144
|
+
for (const r of estate.records)
|
|
145
|
+
if (r.kind === "Component" && (slug(("name" in r && typeof r.name === "string" ? r.name : "") ?? "") === s || slug(r.id) === s))
|
|
146
|
+
return r.id;
|
|
147
|
+
return void 0;
|
|
148
|
+
}
|
|
149
|
+
function strokesOfLines(lines, estate, drawnAlready = []) {
|
|
150
|
+
const plan = { strokes: [], skipped: [] };
|
|
151
|
+
for (const l of lines) {
|
|
152
|
+
const from = componentOf(l.from, estate);
|
|
153
|
+
const to = componentOf(l.to, estate) ?? slug(l.to);
|
|
154
|
+
if (!from) {
|
|
155
|
+
plan.skipped.push({
|
|
156
|
+
line: l,
|
|
157
|
+
why: `${l.from} isn't a component of the catalog: a stroke can't start from it here (a new box needs a flow name and a trigger; draw it in the app).`
|
|
158
|
+
});
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
const entry = l.topic ?? (l.method && l.path ? `${l.method} ${l.path}` : l.label);
|
|
162
|
+
if (!entry) {
|
|
163
|
+
plan.skipped.push({
|
|
164
|
+
line: l,
|
|
165
|
+
why: "the line has no label: say the API (METHOD /path) or the topic."
|
|
166
|
+
});
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
const todaySteps = estate.flows.filter((f) => f.flow.component === from).flatMap((f) => f.flow.steps.map((s, i) => ({ flow: f.flow.id, step: i + 1, s })).filter(({ s }) => s.to?.component === to && (s.to.entry === entry || !!l.path && s.to.entry.replace(/^[A-Z]+\s+/, "") === l.path)));
|
|
170
|
+
if (l.legend === "retire") {
|
|
171
|
+
if (!todaySteps.length) {
|
|
172
|
+
plan.skipped.push({
|
|
173
|
+
line: l,
|
|
174
|
+
why: `marked retired, but today's map has no step from ${from} to ${to} ${entry}.`
|
|
175
|
+
});
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
for (const t of todaySteps)
|
|
179
|
+
plan.strokes.push({
|
|
180
|
+
line: l,
|
|
181
|
+
stroke: {
|
|
182
|
+
kind: "remove",
|
|
183
|
+
flow: t.flow,
|
|
184
|
+
step: t.step,
|
|
185
|
+
why: `Removed in the sketch (${l.at}).`
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
if (todaySteps.length && l.legend !== "new") {
|
|
191
|
+
plan.skipped.push({ line: l, why: "already on today's map; nothing to draw." });
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
const drawnBefore = drawnAlready.some((d) => (d.repo === from || d.runsOn?.component === from || d.flow.startsWith(`${from}.`)) && d.steps.some((st) => st.op === "add" && (l.topic && st.kind === "publish" && st.to?.entry === l.topic || !l.topic && st.to?.component === to && st.to.entry === entry)));
|
|
195
|
+
if (drawnBefore) {
|
|
196
|
+
plan.skipped.push({ line: l, why: "already drawn in this change; nothing to add." });
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
const isNew = !componentOf(l.to, estate) || !!l.method && !estate.endpoints.has(endpointKey(entry));
|
|
200
|
+
plan.strokes.push({
|
|
201
|
+
line: l,
|
|
202
|
+
stroke: l.topic ? {
|
|
203
|
+
kind: "topic",
|
|
204
|
+
from: { component: from },
|
|
205
|
+
topic: l.topic,
|
|
206
|
+
...componentOf(l.to, estate) && to !== from ? { listener: { component: to } } : {},
|
|
207
|
+
what: `Publishes ${l.topic} (${l.at}).`
|
|
208
|
+
} : {
|
|
209
|
+
kind: "call",
|
|
210
|
+
from: { component: from },
|
|
211
|
+
to: { component: to, entry, new: isNew },
|
|
212
|
+
what: `Calls ${to}'s ${entry} (${l.at}).`
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
return plan;
|
|
217
|
+
}
|
|
218
|
+
async function changeSketchCommand(root, change, o, io) {
|
|
219
|
+
if (!change || !o.from) {
|
|
220
|
+
io.err("Usage: atticus change sketch <change> --from <file.drawio|.mmd> [--save]");
|
|
221
|
+
return 2;
|
|
222
|
+
}
|
|
223
|
+
const t = await targetFlowsOf(root, change);
|
|
224
|
+
if (!t) {
|
|
225
|
+
io.err(`There is no change ${change}.`);
|
|
226
|
+
return 2;
|
|
227
|
+
}
|
|
228
|
+
const text = await readFile(o.from, "utf8").catch(() => void 0);
|
|
229
|
+
if (text === void 0) {
|
|
230
|
+
io.err(`${o.from} can't be read.`);
|
|
231
|
+
return 2;
|
|
232
|
+
}
|
|
233
|
+
const ext = extname(o.from).toLowerCase();
|
|
234
|
+
const read = ext === ".drawio" || ext === ".xml" || text.trimStart().startsWith("<") ? readDrawioSketch(text) : readMermaidSketch(text);
|
|
235
|
+
const estate = await loadEstate(root, t.records);
|
|
236
|
+
const dir = changeFolder(root, change);
|
|
237
|
+
const plan = strokesOfLines(read.lines, estate, (await readDeltas(dir)).deltas);
|
|
238
|
+
const by = `${o.by ?? "a person"} from ${basename(o.from)}`;
|
|
239
|
+
const problems = [...read.problems];
|
|
240
|
+
const drawn = [];
|
|
241
|
+
await withFileLock(join(dir, TARGET_DIR), async () => {
|
|
242
|
+
const read2 = await readDeltas(dir);
|
|
243
|
+
if (read2.problems.length) {
|
|
244
|
+
problems.push(...read2.problems.map((x) => `${x} (fix it before drawing over it)`));
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
let deltas = read2.deltas;
|
|
248
|
+
const changed = [];
|
|
249
|
+
for (const s of plan.strokes) {
|
|
250
|
+
const r = applyStroke(deltas, s.stroke, estate, by);
|
|
251
|
+
if (r.problem) {
|
|
252
|
+
plan.skipped.push({ line: s.line, why: r.problem });
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
deltas = r.deltas;
|
|
256
|
+
changed.push(...r.changed);
|
|
257
|
+
drawn.push(`${s.line.from} \u2192 ${s.line.to} ${s.line.label} (${s.line.at})`);
|
|
258
|
+
}
|
|
259
|
+
if (o.save && drawn.length)
|
|
260
|
+
await writeSketch(dir, await planSketchWrite(dir, deltas, changed, estate, by));
|
|
261
|
+
});
|
|
262
|
+
if (o.json) {
|
|
263
|
+
io.out(JSON.stringify({
|
|
264
|
+
change,
|
|
265
|
+
written: !!o.save && drawn.length > 0,
|
|
266
|
+
drawn,
|
|
267
|
+
skipped: plan.skipped,
|
|
268
|
+
problems
|
|
269
|
+
}, null, 2));
|
|
270
|
+
return 0;
|
|
271
|
+
}
|
|
272
|
+
for (const d of drawn)
|
|
273
|
+
io.out(`${o.save ? "Drawn" : "Would draw"}: ${d}`);
|
|
274
|
+
for (const s of plan.skipped)
|
|
275
|
+
io.out(`Left out: ${s.line.from} \u2192 ${s.line.to} ${s.line.label} (${s.line.at}): ${s.why}`);
|
|
276
|
+
for (const p of problems)
|
|
277
|
+
io.out(`Didn't read: ${p}`);
|
|
278
|
+
if (!drawn.length) {
|
|
279
|
+
io.out("Nothing to draw from this file.");
|
|
280
|
+
return plan.skipped.length || problems.length ? 1 : 0;
|
|
281
|
+
}
|
|
282
|
+
io.out(o.save ? `${drawn.length} stroke${drawn.length === 1 ? "" : "s"} written to ${changesRelOf(root)}/${change}/${TARGET_DIR}/; the change diagram shows them, and atticus change architecture ${change} fills in the rest.` : `${drawn.length} stroke${drawn.length === 1 ? "" : "s"} to draw; nothing written. Add --save to draw them.`);
|
|
283
|
+
return 0;
|
|
284
|
+
}
|
|
285
|
+
export {
|
|
286
|
+
changeSketchCommand,
|
|
287
|
+
componentOf,
|
|
288
|
+
lineParts,
|
|
289
|
+
readDrawioSketch,
|
|
290
|
+
readMermaidSketch,
|
|
291
|
+
strokesOfLines
|
|
292
|
+
};
|
|
@@ -3,35 +3,35 @@ import { fileURLToPath as __atticusFileURLToPath } from "node:url";
|
|
|
3
3
|
var require = __atticusCreateRequire(import.meta.url);
|
|
4
4
|
var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
|
|
5
5
|
var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-K6JB6XTX.js";
|
|
7
7
|
import {
|
|
8
8
|
loadCatalog
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5QUOPNLN.js";
|
|
10
10
|
import {
|
|
11
11
|
repoFor
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-TGVVUKTG.js";
|
|
13
|
+
import "./chunk-P2VBXX7N.js";
|
|
14
14
|
import {
|
|
15
15
|
askHosts
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-TYD6I4CZ.js";
|
|
17
|
+
import "./chunk-ZOSD4FXV.js";
|
|
18
|
+
import "./chunk-5WERBKLE.js";
|
|
18
19
|
import {
|
|
19
20
|
estateFlow,
|
|
20
21
|
estateStepKey,
|
|
21
22
|
fieldLineage,
|
|
22
23
|
joinEstate
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-4SLBCEPD.js";
|
|
25
|
+
import "./chunk-64AADMTW.js";
|
|
26
|
+
import "./chunk-JYMIB5XY.js";
|
|
27
|
+
import "./chunk-CPK7QSBG.js";
|
|
28
|
+
import "./chunk-YO2PKTXT.js";
|
|
29
|
+
import "./chunk-TWQRPM76.js";
|
|
30
|
+
import "./chunk-XOL3GFW2.js";
|
|
31
|
+
import "./chunk-QHJJMZLX.js";
|
|
31
32
|
import {
|
|
32
33
|
fsRepo
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-CNUKCS2T.js";
|
|
34
|
+
} from "./chunk-7AB6OWTV.js";
|
|
35
35
|
import {
|
|
36
36
|
listQuestions,
|
|
37
37
|
loadOrgPack,
|
|
@@ -45,8 +45,8 @@ import {
|
|
|
45
45
|
specsRelOf,
|
|
46
46
|
templateRef,
|
|
47
47
|
writeEstateJoins
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-PAINMSID.js";
|
|
49
|
+
import "./chunk-ODMBPDDV.js";
|
|
50
50
|
import "./chunk-TV45EUGM.js";
|
|
51
51
|
|
|
52
52
|
// packages/cli/dist/estate-commands.js
|