@unbrained/pm-cli 2026.7.5 → 2026.7.6
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/CHANGELOG.md +10 -0
- package/dist/cli-bundle/chunks/activity-WJCGCYPU.js +18 -0
- package/dist/cli-bundle/chunks/activity-Z6QUAUSG.js +22 -0
- package/dist/cli-bundle/chunks/aggregate-BDM6EIAR.js +25 -0
- package/dist/cli-bundle/chunks/aggregate-VQ2DHU3S.js +21 -0
- package/dist/cli-bundle/chunks/append-BGML6VLD.js +19 -0
- package/dist/cli-bundle/chunks/append-RKJYPU74.js +15 -0
- package/dist/cli-bundle/chunks/chunk-22KBU3MW.js +57 -0
- package/dist/cli-bundle/chunks/chunk-24YG75HI.js +634 -0
- package/dist/cli-bundle/chunks/chunk-2XG4IZON.js +218 -0
- package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js +228 -0
- package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js +2330 -0
- package/dist/cli-bundle/chunks/chunk-3N6RRO2Q.js +808 -0
- package/dist/cli-bundle/chunks/chunk-3N6RRO2Q.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3UJRFJ5R.js +1573 -0
- package/dist/cli-bundle/chunks/chunk-3VHSI5FL.js +1001 -0
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js +278 -0
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-45FYNUFJ.js +38 -0
- package/dist/cli-bundle/chunks/chunk-45FYNUFJ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-46CUF5L6.js +1018 -0
- package/dist/cli-bundle/chunks/chunk-4CJFCTLM.js +222 -0
- package/dist/cli-bundle/chunks/chunk-4CJFCTLM.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js +249 -0
- package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js +819 -0
- package/dist/cli-bundle/chunks/chunk-4LELACOL.js +391 -0
- package/dist/cli-bundle/chunks/chunk-4LELACOL.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js +279 -0
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4ZBE5GUN.js +184 -0
- package/dist/cli-bundle/chunks/chunk-4ZBE5GUN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-57NWPFF2.js +5640 -0
- package/dist/cli-bundle/chunks/chunk-57NWPFF2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js +268 -0
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js +508 -0
- package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js +1868 -0
- package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js +1749 -0
- package/dist/cli-bundle/chunks/chunk-64YKRTSV.js +1961 -0
- package/dist/cli-bundle/chunks/chunk-6LLVNJXT.js +429 -0
- package/dist/cli-bundle/chunks/chunk-6QBJLYBP.js +120 -0
- package/dist/cli-bundle/chunks/chunk-6QBJLYBP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-7D7OOEYG.js +278 -0
- package/dist/cli-bundle/chunks/chunk-7D7OOEYG.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-7DT4WSH2.js +60 -0
- package/dist/cli-bundle/chunks/chunk-7WBAJSS6.js +102 -0
- package/dist/cli-bundle/chunks/chunk-AGHMOTGM.js +150 -0
- package/dist/cli-bundle/chunks/chunk-ALFPSEWO.js +112 -0
- package/dist/cli-bundle/chunks/chunk-AZYGZGGI.js +361 -0
- package/dist/cli-bundle/chunks/chunk-B6DUFX6H.js +1413 -0
- package/dist/cli-bundle/chunks/chunk-B6XS3R3O.js +275 -0
- package/dist/cli-bundle/chunks/chunk-B6XS3R3O.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js +421 -0
- package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js +1985 -0
- package/dist/cli-bundle/chunks/chunk-CFB33L7W.js +398 -0
- package/dist/cli-bundle/chunks/chunk-CFNGIXZP.js +784 -0
- package/dist/cli-bundle/chunks/chunk-CFNGIXZP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-CL36D4PC.js +225 -0
- package/dist/cli-bundle/chunks/chunk-COSPOP7H.js +6677 -0
- package/dist/cli-bundle/chunks/chunk-COSPOP7H.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js +3461 -0
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CRVYGJUI.js +553 -0
- package/dist/cli-bundle/chunks/chunk-CRVYGJUI.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-D2XRLB55.js +645 -0
- package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js +1858 -0
- package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js +1063 -0
- package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js +1932 -0
- package/dist/cli-bundle/chunks/chunk-E42XTBSP.js +1359 -0
- package/dist/cli-bundle/chunks/chunk-E42XTBSP.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-EBRZZ54H.js +655 -0
- package/dist/cli-bundle/chunks/chunk-EBRZZ54H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js +4712 -0
- package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-EGY6JBQ3.js +160 -0
- package/dist/cli-bundle/chunks/chunk-EKFNL33R.js +222 -0
- package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js +1704 -0
- package/dist/cli-bundle/chunks/chunk-EOKXK3R3.js +2046 -0
- package/dist/cli-bundle/chunks/chunk-F3K4JGFD.js +121 -0
- package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js +231 -0
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js +2090 -0
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-FT3QTERD.js +550 -0
- package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js +1570 -0
- package/dist/cli-bundle/chunks/chunk-G64OCSKU.js +444 -0
- package/dist/cli-bundle/chunks/chunk-GANUTS7W.js +1775 -0
- package/dist/cli-bundle/chunks/chunk-GBAX2ZAQ.js +401 -0
- package/dist/cli-bundle/chunks/chunk-GDDAGPWJ.js +105 -0
- package/dist/cli-bundle/chunks/chunk-GDDAGPWJ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js +239 -0
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GJ7QC5DJ.js +624 -0
- package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js +530 -0
- package/dist/cli-bundle/chunks/chunk-GZRDYONU.js +1005 -0
- package/dist/cli-bundle/chunks/chunk-HFDADVJZ.js +1356 -0
- package/dist/cli-bundle/chunks/chunk-HFDADVJZ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-HIHMT6WS.js +41 -0
- package/dist/cli-bundle/chunks/chunk-HIHMT6WS.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js +277 -0
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HOVCGJSD.js +293 -0
- package/dist/cli-bundle/chunks/chunk-HOVCGJSD.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-I36Y7PCE.js +38 -0
- package/dist/cli-bundle/chunks/chunk-I36Y7PCE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js +309 -0
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-IWVU4C2F.js +358 -0
- package/dist/cli-bundle/chunks/chunk-IX5BXEMX.js +267 -0
- package/dist/cli-bundle/chunks/chunk-JDDLOQAE.js +265 -0
- package/dist/cli-bundle/chunks/chunk-JJP45OEI.js +119 -0
- package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js +2257 -0
- package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-JVH7QBVV.js +24 -0
- package/dist/cli-bundle/chunks/chunk-JVH7QBVV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-K46RF36U.js +207 -0
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js +371 -0
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KGFUY7WN.js +814 -0
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js +76 -0
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KUOOJR35.js +260 -0
- package/dist/cli-bundle/chunks/chunk-L5PSPMZ4.js +277 -0
- package/dist/cli-bundle/chunks/chunk-LK6XLOGP.js +5799 -0
- package/dist/cli-bundle/chunks/chunk-LK6XLOGP.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js +140 -0
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-LPSSSDJR.js +1239 -0
- package/dist/cli-bundle/chunks/chunk-M7JNBQAD.js +225 -0
- package/dist/cli-bundle/chunks/chunk-M7JNBQAD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MA4SM3QZ.js +655 -0
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js +1601 -0
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js +1031 -0
- package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js +995 -0
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js +296 -0
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-MLIYFOE7.js +357 -0
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js +2043 -0
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MUH7A3FD.js +61 -0
- package/dist/cli-bundle/chunks/chunk-MVSP7WGJ.js +108 -0
- package/dist/cli-bundle/chunks/chunk-MVSP7WGJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MVYWGY2A.js +262 -0
- package/dist/cli-bundle/chunks/chunk-MWMVPCIE.js +1423 -0
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js +2033 -0
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js +1604 -0
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NB7RLQFW.js +57 -0
- package/dist/cli-bundle/chunks/chunk-NB7RLQFW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NC33K5ZS.js +123 -0
- package/dist/cli-bundle/chunks/chunk-NC33K5ZS.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NGXQ3PFT.js +263 -0
- package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js +1615 -0
- package/dist/cli-bundle/chunks/chunk-NO442GWJ.js +41 -0
- package/dist/cli-bundle/chunks/chunk-NO442GWJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NZEHECMW.js +658 -0
- package/dist/cli-bundle/chunks/chunk-NZEHECMW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-O6AWCQRQ.js +124 -0
- package/dist/cli-bundle/chunks/chunk-OGWQ2IEP.js +240 -0
- package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js +143 -0
- package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-QLMX7SRD.js +210 -0
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js +398 -0
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-R5BMJX33.js +27 -0
- package/dist/cli-bundle/chunks/chunk-R5BMJX33.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RCQZK2GO.js +296 -0
- package/dist/cli-bundle/chunks/chunk-RCQZK2GO.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RFNYTESG.js +520 -0
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js +79 -0
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js +282 -0
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js +274 -0
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SCUR7K7N.js +2198 -0
- package/dist/cli-bundle/chunks/chunk-SGMFPXKR.js +68 -0
- package/dist/cli-bundle/chunks/chunk-SGMFPXKR.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js +1977 -0
- package/dist/cli-bundle/chunks/chunk-SMB7RV23.js +130 -0
- package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js +1041 -0
- package/dist/cli-bundle/chunks/chunk-SQOIV3OQ.js +563 -0
- package/dist/cli-bundle/chunks/chunk-SQOIV3OQ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SQYJ4HF2.js +1765 -0
- package/dist/cli-bundle/chunks/chunk-T42JWV3F.js +822 -0
- package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js +6567 -0
- package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-TULGS6X6.js +2132 -0
- package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js +2306 -0
- package/dist/cli-bundle/chunks/chunk-UH7T2DAX.js +181 -0
- package/dist/cli-bundle/chunks/chunk-UH7T2DAX.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js +4773 -0
- package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-VPIM42PC.js +367 -0
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js +368 -0
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-W3DSJQIO.js +447 -0
- package/dist/cli-bundle/chunks/chunk-W572BIEB.js +1249 -0
- package/dist/cli-bundle/chunks/chunk-W6DYWXPQ.js +1073 -0
- package/dist/cli-bundle/chunks/chunk-W6DYWXPQ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js +3423 -0
- package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js +2247 -0
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-WRTENIX3.js +215 -0
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js +388 -0
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-XB7KFVFI.js +533 -0
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js +306 -0
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js +424 -0
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XG625QP4.js +58 -0
- package/dist/cli-bundle/chunks/chunk-XHET7YUZ.js +71 -0
- package/dist/cli-bundle/chunks/chunk-XHET7YUZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XUC7PI2H.js +243 -0
- package/dist/cli-bundle/chunks/chunk-Y46GD4IX.js +116 -0
- package/dist/cli-bundle/chunks/chunk-Y4M7CPQP.js +804 -0
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js +2128 -0
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-YN7Y6DQZ.js +426 -0
- package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js +511 -0
- package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZGK4L4JM.js +133 -0
- package/dist/cli-bundle/chunks/chunk-ZJ262CED.js +394 -0
- package/dist/cli-bundle/chunks/chunk-ZJ262CED.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js +299 -0
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZSUS2OD3.js +2105 -0
- package/dist/cli-bundle/chunks/chunk-ZWBEPGD7.js +54 -0
- package/dist/cli-bundle/chunks/chunk-ZWBEPGD7.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ZZD4J5XY.js +1570 -0
- package/dist/cli-bundle/chunks/claim-RFS7BROJ.js +19 -0
- package/dist/cli-bundle/chunks/claim-XP5AWZ5H.js +23 -0
- package/dist/cli-bundle/chunks/close-2SSSHHUZ.js +20 -0
- package/dist/cli-bundle/chunks/close-GEANHQ2J.js +16 -0
- package/dist/cli-bundle/chunks/close-many-CMZW7ITN.js +31 -0
- package/dist/cli-bundle/chunks/close-many-ZFDIG6M7.js +27 -0
- package/dist/cli-bundle/chunks/comments-MFSYVNNU.js +21 -0
- package/dist/cli-bundle/chunks/comments-XUBPXDYX.js +17 -0
- package/dist/cli-bundle/chunks/config-D7XQMONX.js +18 -0
- package/dist/cli-bundle/chunks/config-T4FHBSYN.js +22 -0
- package/dist/cli-bundle/chunks/context-DIU275XI.js +48 -0
- package/dist/cli-bundle/chunks/context-JCOYB4LZ.js +44 -0
- package/dist/cli-bundle/chunks/contracts-BVO7CSLK.js +12 -0
- package/dist/cli-bundle/chunks/contracts-NYPEW2G4.js +16 -0
- package/dist/cli-bundle/chunks/copy-32ROBIDL.js +17 -0
- package/dist/cli-bundle/chunks/copy-NAGLGMHZ.js +13 -0
- package/dist/cli-bundle/chunks/create-4V7SWNBB.js +30 -0
- package/dist/cli-bundle/chunks/create-E77SDCUP.js +34 -0
- package/dist/cli-bundle/chunks/delete-NQI5OSKN.js +14 -0
- package/dist/cli-bundle/chunks/delete-RA5KTCLB.js +18 -0
- package/dist/cli-bundle/chunks/deps-32SU7HO5.js +21 -0
- package/dist/cli-bundle/chunks/deps-T7SCWXEX.js +17 -0
- package/dist/cli-bundle/chunks/docs-RRUPT7O2.js +22 -0
- package/dist/cli-bundle/chunks/docs-WL2IWGWV.js +18 -0
- package/dist/cli-bundle/chunks/eval-NF2J5SHR.js +23 -0
- package/dist/cli-bundle/chunks/eval-SKDT3MZU.js +27 -0
- package/dist/cli-bundle/chunks/extension-LAXKCAYE.js +42 -0
- package/dist/cli-bundle/chunks/extension-LAXKCAYE.js.map +1 -0
- package/dist/cli-bundle/chunks/extension-ZISPBRBC.js +38 -0
- package/dist/cli-bundle/chunks/extension-ZISPBRBC.js.map +7 -0
- package/dist/cli-bundle/chunks/files-EWRQHGIS.js +22 -0
- package/dist/cli-bundle/chunks/files-EWRQHGIS.js.map +7 -0
- package/dist/cli-bundle/chunks/files-PYKR2UUG.js +26 -0
- package/dist/cli-bundle/chunks/files-PYKR2UUG.js.map +1 -0
- package/dist/cli-bundle/chunks/focus-4T7TM4MT.js +18 -0
- package/dist/cli-bundle/chunks/focus-4T7TM4MT.js.map +1 -0
- package/dist/cli-bundle/chunks/focus-L3YUASOD.js +14 -0
- package/dist/cli-bundle/chunks/focus-L3YUASOD.js.map +7 -0
- package/dist/cli-bundle/chunks/gc-2DNMPXMC.js +16 -0
- package/dist/cli-bundle/chunks/gc-2DNMPXMC.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-2PCTYYRI.js +12 -0
- package/dist/cli-bundle/chunks/gc-2PCTYYRI.js.map +7 -0
- package/dist/cli-bundle/chunks/get-7DMITJ3G.js +23 -0
- package/dist/cli-bundle/chunks/get-7DMITJ3G.js.map +1 -0
- package/dist/cli-bundle/chunks/get-VKQXCXLL.js +19 -0
- package/dist/cli-bundle/chunks/get-VKQXCXLL.js.map +7 -0
- package/dist/cli-bundle/chunks/health-CVSTAR2F.js +31 -0
- package/dist/cli-bundle/chunks/health-CVSTAR2F.js.map +7 -0
- package/dist/cli-bundle/chunks/health-TV3GKTFN.js +35 -0
- package/dist/cli-bundle/chunks/health-TV3GKTFN.js.map +1 -0
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js +20 -0
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js.map +7 -0
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js +24 -0
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js.map +1 -0
- package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js +29 -0
- package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js.map +1 -0
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js +25 -0
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js.map +7 -0
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js +21 -0
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js.map +7 -0
- package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js +25 -0
- package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js.map +1 -0
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js +23 -0
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js.map +7 -0
- package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js +27 -0
- package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js.map +1 -0
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js +30 -0
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js.map +1 -0
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js +26 -0
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js.map +7 -0
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js +21 -0
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js.map +1 -0
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js +17 -0
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js.map +7 -0
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js +36 -0
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js.map +1 -0
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js +32 -0
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js.map +7 -0
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js +28 -0
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js.map +7 -0
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js +32 -0
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js.map +1 -0
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js +17 -0
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js.map +7 -0
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js +21 -0
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js.map +1 -0
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js +29 -0
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js.map +7 -0
- package/dist/cli-bundle/chunks/plan-CHVE7PBR.js +33 -0
- package/dist/cli-bundle/chunks/plan-CHVE7PBR.js.map +1 -0
- package/dist/cli-bundle/chunks/profile-LD23PSI6.js +37 -0
- package/dist/cli-bundle/chunks/profile-LD23PSI6.js.map +7 -0
- package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js +41 -0
- package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js.map +1 -0
- package/dist/cli-bundle/chunks/register-list-query-B42JCCOI.js +409 -0
- package/dist/cli-bundle/chunks/register-list-query-OEYQHFXO.js +419 -0
- package/dist/cli-bundle/chunks/register-mutation-3QXIHCQG.js +1273 -0
- package/dist/cli-bundle/chunks/register-mutation-IAEST26S.js +1256 -0
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js +19 -0
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js +23 -0
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js.map +1 -0
- package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js +324 -0
- package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js.map +7 -0
- package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js +321 -0
- package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js.map +1 -0
- package/dist/cli-bundle/chunks/restore-5RQHAPMA.js +23 -0
- package/dist/cli-bundle/chunks/restore-5RQHAPMA.js.map +1 -0
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js +19 -0
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js.map +7 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js +29 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js.map +1 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js +25 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js.map +7 -0
- package/dist/cli-bundle/chunks/schema-245WW4G2.js +78 -0
- package/dist/cli-bundle/chunks/schema-245WW4G2.js.map +1 -0
- package/dist/cli-bundle/chunks/schema-HBORFC6B.js +74 -0
- package/dist/cli-bundle/chunks/schema-HBORFC6B.js.map +7 -0
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js +34 -0
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js.map +7 -0
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js +38 -0
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js +21 -0
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js +17 -0
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js +14 -0
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js +18 -0
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js.map +1 -0
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js +39 -0
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js.map +7 -0
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js +43 -0
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js.map +1 -0
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js +29 -0
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js +33 -0
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js +28 -0
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js +24 -0
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js.map +7 -0
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js +30 -0
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js.map +1 -0
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js +26 -0
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js +37 -0
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js +41 -0
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js.map +1 -0
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js +24 -0
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js.map +7 -0
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js +28 -0
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js +36 -0
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js +32 -0
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js.map +7 -0
- package/dist/cli-bundle/main.js +16 -16
- package/dist/cli-bundle/sdk-runtime.js +88 -28
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +92 -49
- package/dist/cli-bundle/sdk.js.map +2 -2
- package/dist/mcp/server.d.ts +22 -50
- package/dist/mcp/server.js +62 -916
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/index.d.ts +4 -2
- package/dist/sdk/index.js +4 -4
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +168 -4
- package/dist/sdk/runtime.js +1149 -25
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/workspace-contracts-cache.d.ts +17 -0
- package/dist/sdk/workspace-contracts-cache.js +36 -0
- package/dist/sdk/workspace-contracts-cache.js.map +1 -0
- package/docs/RELEASING.md +3 -1
- package/docs/SDK.md +46 -0
- package/docs/examples/sdk-app-embedding/run-embedded-pm.mjs +16 -2
- package/docs/examples/sdk-contract-consumer/inspect-contracts.mjs +16 -1
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +0 -18
- package/dist/cli-bundle/chunks/activity-YKAKZTZ4.js +0 -22
- package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js +0 -375
- package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js.map +0 -7
- package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js +0 -372
- package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js.map +0 -1
- package/dist/cli-bundle/chunks/append-CZGUZ45Q.js +0 -73
- package/dist/cli-bundle/chunks/append-CZGUZ45Q.js.map +0 -7
- package/dist/cli-bundle/chunks/append-NSQBCXZJ.js +0 -70
- package/dist/cli-bundle/chunks/append-NSQBCXZJ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js +0 -1413
- package/dist/cli-bundle/chunks/chunk-3PL6LEKP.js +0 -1961
- package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js +0 -1749
- package/dist/cli-bundle/chunks/chunk-3Y4OESPP.js +0 -277
- package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js +0 -822
- package/dist/cli-bundle/chunks/chunk-4OFLJHX6.js +0 -356
- package/dist/cli-bundle/chunks/chunk-4QQ6PM7M.js +0 -1249
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js +0 -2181
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-57C2RLW5.js +0 -1704
- package/dist/cli-bundle/chunks/chunk-5B3X4Y22.js +0 -2330
- package/dist/cli-bundle/chunks/chunk-5J2XPTAD.js +0 -225
- package/dist/cli-bundle/chunks/chunk-5JE6SMYS.js +0 -262
- package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js +0 -995
- package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js +0 -5789
- package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js +0 -819
- package/dist/cli-bundle/chunks/chunk-7EQNAZX2.js +0 -1018
- package/dist/cli-bundle/chunks/chunk-7MDXZAZS.js +0 -102
- package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js +0 -2046
- package/dist/cli-bundle/chunks/chunk-7WYXBPYQ.js +0 -358
- package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js +0 -150
- package/dist/cli-bundle/chunks/chunk-ABRA3BHY.js +0 -429
- package/dist/cli-bundle/chunks/chunk-BFVHCAOO.js +0 -240
- package/dist/cli-bundle/chunks/chunk-BVEUCSH2.js +0 -530
- package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js +0 -160
- package/dist/cli-bundle/chunks/chunk-D3UCE7RW.js +0 -243
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +0 -275
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js +0 -634
- package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js +0 -231
- package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js +0 -2184
- package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EEY54JMF.js +0 -60
- package/dist/cli-bundle/chunks/chunk-EZFKWSC7.js +0 -1615
- package/dist/cli-bundle/chunks/chunk-FDBARR33.js +0 -655
- package/dist/cli-bundle/chunks/chunk-FGQKEDE4.js +0 -447
- package/dist/cli-bundle/chunks/chunk-FJRKQREY.js +0 -228
- package/dist/cli-bundle/chunks/chunk-FUM6UMY4.js +0 -804
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js +0 -3237
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HBYZDSK5.js +0 -426
- package/dist/cli-bundle/chunks/chunk-HJE4JTKQ.js +0 -124
- package/dist/cli-bundle/chunks/chunk-HK72NWAD.js +0 -1570
- package/dist/cli-bundle/chunks/chunk-IJ6CO3JV.js +0 -645
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js +0 -3206
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JLA7EVYV.js +0 -222
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +0 -76
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-K3AGVXSF.js +0 -444
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +0 -79
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +0 -915
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KLG4ZULO.js +0 -218
- package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js +0 -2105
- package/dist/cli-bundle/chunks/chunk-MNZ7DRNC.js +0 -1858
- package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js +0 -2198
- package/dist/cli-bundle/chunks/chunk-MZ7VNEVY.js +0 -520
- package/dist/cli-bundle/chunks/chunk-N6DNM2FA.js +0 -116
- package/dist/cli-bundle/chunks/chunk-N7X4WP6L.js +0 -1041
- package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js +0 -2132
- package/dist/cli-bundle/chunks/chunk-NER3KUUS.js +0 -260
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +0 -918
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OESSOFJ4.js +0 -1985
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +0 -238
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OWTIRHX4.js +0 -112
- package/dist/cli-bundle/chunks/chunk-P3VRG72Q.js +0 -1765
- package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js +0 -1423
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +0 -1977
- package/dist/cli-bundle/chunks/chunk-PDXT6Q55.js +0 -58
- package/dist/cli-bundle/chunks/chunk-PJ3A56YF.js +0 -1239
- package/dist/cli-bundle/chunks/chunk-PPAJG4GB.js +0 -1031
- package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js +0 -4725
- package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QHZO65XW.js +0 -1775
- package/dist/cli-bundle/chunks/chunk-R3ZBLGTC.js +0 -814
- package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js +0 -624
- package/dist/cli-bundle/chunks/chunk-RX3HQSYG.js +0 -265
- package/dist/cli-bundle/chunks/chunk-S4APD35C.js +0 -210
- package/dist/cli-bundle/chunks/chunk-S5AYOUT5.js +0 -130
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js +0 -1149
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-T35XLYZF.js +0 -263
- package/dist/cli-bundle/chunks/chunk-T3ABIMGW.js +0 -361
- package/dist/cli-bundle/chunks/chunk-T3F4DF23.js +0 -267
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +0 -272
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js +0 -5354
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TSPKZRRW.js +0 -1570
- package/dist/cli-bundle/chunks/chunk-TT42JUMF.js +0 -207
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +0 -165
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js +0 -4786
- package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +0 -1932
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +0 -175
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VZIYHZDX.js +0 -1868
- package/dist/cli-bundle/chunks/chunk-WISPVC2E.js +0 -401
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js +0 -5434
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js +0 -1152
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Y76TWC45.js +0 -550
- package/dist/cli-bundle/chunks/chunk-YD5FML7K.js +0 -5630
- package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YFIE7YK6.js +0 -57
- package/dist/cli-bundle/chunks/chunk-YMABYTNG.js +0 -1573
- package/dist/cli-bundle/chunks/chunk-YOF5VPKM.js +0 -119
- package/dist/cli-bundle/chunks/chunk-YPPVU5GX.js +0 -398
- package/dist/cli-bundle/chunks/chunk-YQMMMONE.js +0 -133
- package/dist/cli-bundle/chunks/chunk-YSAH5FY5.js +0 -1001
- package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js +0 -1005
- package/dist/cli-bundle/chunks/chunk-Z2CRRZYF.js +0 -215
- package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js +0 -533
- package/dist/cli-bundle/chunks/chunk-ZCJAA3JK.js +0 -121
- package/dist/cli-bundle/chunks/chunk-ZD34OFFQ.js +0 -366
- package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js +0 -2306
- package/dist/cli-bundle/chunks/chunk-ZMD35NYG.js +0 -61
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +0 -241
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +0 -7
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js +0 -144
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +0 -1
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js +0 -147
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +0 -7
- package/dist/cli-bundle/chunks/close-3YRR3XY6.js +0 -20
- package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +0 -16
- package/dist/cli-bundle/chunks/close-many-AP4MWU36.js +0 -397
- package/dist/cli-bundle/chunks/close-many-AP4MWU36.js.map +0 -1
- package/dist/cli-bundle/chunks/close-many-OMZIGZB4.js +0 -400
- package/dist/cli-bundle/chunks/close-many-OMZIGZB4.js.map +0 -7
- package/dist/cli-bundle/chunks/comments-MIW5MZOX.js +0 -128
- package/dist/cli-bundle/chunks/comments-MIW5MZOX.js.map +0 -7
- package/dist/cli-bundle/chunks/comments-SAG5LSKL.js +0 -125
- package/dist/cli-bundle/chunks/comments-SAG5LSKL.js.map +0 -1
- package/dist/cli-bundle/chunks/config-DJJKZB5R.js +0 -1075
- package/dist/cli-bundle/chunks/config-DJJKZB5R.js.map +0 -7
- package/dist/cli-bundle/chunks/config-V57QD47V.js +0 -1065
- package/dist/cli-bundle/chunks/config-V57QD47V.js.map +0 -1
- package/dist/cli-bundle/chunks/context-4OQGIPSO.js +0 -45
- package/dist/cli-bundle/chunks/context-WLA6IAWE.js +0 -49
- package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +0 -12
- package/dist/cli-bundle/chunks/contracts-OJEXMKVW.js +0 -16
- package/dist/cli-bundle/chunks/copy-LEE6P6EM.js +0 -184
- package/dist/cli-bundle/chunks/copy-LEE6P6EM.js.map +0 -7
- package/dist/cli-bundle/chunks/copy-OTJOWFL6.js +0 -181
- package/dist/cli-bundle/chunks/copy-OTJOWFL6.js.map +0 -1
- package/dist/cli-bundle/chunks/create-WKOZKPQR.js +0 -30
- package/dist/cli-bundle/chunks/create-XWWQFQ6S.js +0 -34
- package/dist/cli-bundle/chunks/delete-62JQTYT4.js +0 -59
- package/dist/cli-bundle/chunks/delete-62JQTYT4.js.map +0 -7
- package/dist/cli-bundle/chunks/delete-HQKGRNRZ.js +0 -56
- package/dist/cli-bundle/chunks/delete-HQKGRNRZ.js.map +0 -1
- package/dist/cli-bundle/chunks/deps-55FTG6Z5.js +0 -224
- package/dist/cli-bundle/chunks/deps-55FTG6Z5.js.map +0 -1
- package/dist/cli-bundle/chunks/deps-L2FPIAD3.js +0 -227
- package/dist/cli-bundle/chunks/deps-L2FPIAD3.js.map +0 -7
- package/dist/cli-bundle/chunks/docs-6CRCSVKK.js +0 -33
- package/dist/cli-bundle/chunks/docs-6CRCSVKK.js.map +0 -1
- package/dist/cli-bundle/chunks/docs-S6UTOTO5.js +0 -36
- package/dist/cli-bundle/chunks/docs-S6UTOTO5.js.map +0 -7
- package/dist/cli-bundle/chunks/eval-N6UHFWVO.js +0 -288
- package/dist/cli-bundle/chunks/eval-N6UHFWVO.js.map +0 -7
- package/dist/cli-bundle/chunks/eval-PHOTWYHI.js +0 -278
- package/dist/cli-bundle/chunks/eval-PHOTWYHI.js.map +0 -1
- package/dist/cli-bundle/chunks/extension-NBAH62ML.js +0 -40
- package/dist/cli-bundle/chunks/extension-ZF6ZZPOU.js +0 -44
- package/dist/cli-bundle/chunks/files-6P57MRKL.js +0 -301
- package/dist/cli-bundle/chunks/files-6P57MRKL.js.map +0 -7
- package/dist/cli-bundle/chunks/files-JPU3FNJ7.js +0 -298
- package/dist/cli-bundle/chunks/files-JPU3FNJ7.js.map +0 -1
- package/dist/cli-bundle/chunks/focus-LFZ6IDBR.js +0 -106
- package/dist/cli-bundle/chunks/focus-LFZ6IDBR.js.map +0 -1
- package/dist/cli-bundle/chunks/focus-WNMYCVYA.js +0 -109
- package/dist/cli-bundle/chunks/focus-WNMYCVYA.js.map +0 -7
- package/dist/cli-bundle/chunks/gc-AETFKZ44.js +0 -398
- package/dist/cli-bundle/chunks/gc-AETFKZ44.js.map +0 -7
- package/dist/cli-bundle/chunks/gc-RLBP4QVN.js +0 -388
- package/dist/cli-bundle/chunks/gc-RLBP4QVN.js.map +0 -1
- package/dist/cli-bundle/chunks/get-NH2MPBCI.js +0 -283
- package/dist/cli-bundle/chunks/get-NH2MPBCI.js.map +0 -1
- package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js +0 -286
- package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js.map +0 -7
- package/dist/cli-bundle/chunks/health-3GVPMQBL.js +0 -1612
- package/dist/cli-bundle/chunks/health-3GVPMQBL.js.map +0 -1
- package/dist/cli-bundle/chunks/health-DNTM72GJ.js +0 -1615
- package/dist/cli-bundle/chunks/health-DNTM72GJ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-RYKLC72X.js +0 -20
- package/dist/cli-bundle/chunks/history-SGPYRAFT.js +0 -24
- package/dist/cli-bundle/chunks/history-compact-3F6VELO7.js +0 -565
- package/dist/cli-bundle/chunks/history-compact-3F6VELO7.js.map +0 -7
- package/dist/cli-bundle/chunks/history-compact-656Y2TN4.js +0 -555
- package/dist/cli-bundle/chunks/history-compact-656Y2TN4.js.map +0 -1
- package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +0 -21
- package/dist/cli-bundle/chunks/history-redact-54ICFKXM.js +0 -25
- package/dist/cli-bundle/chunks/history-repair-4N6SDVHK.js +0 -281
- package/dist/cli-bundle/chunks/history-repair-4N6SDVHK.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-EVTO6LIH.js +0 -278
- package/dist/cli-bundle/chunks/history-repair-EVTO6LIH.js.map +0 -1
- package/dist/cli-bundle/chunks/init-RPIPQUNV.js +0 -32
- package/dist/cli-bundle/chunks/init-SKQAESQS.js +0 -28
- package/dist/cli-bundle/chunks/learnings-2HTPZNGZ.js +0 -48
- package/dist/cli-bundle/chunks/learnings-2HTPZNGZ.js.map +0 -7
- package/dist/cli-bundle/chunks/learnings-YBIHY3D6.js +0 -45
- package/dist/cli-bundle/chunks/learnings-YBIHY3D6.js.map +0 -1
- package/dist/cli-bundle/chunks/list-64LHZ3HM.js +0 -32
- package/dist/cli-bundle/chunks/list-7LXBTEKI.js +0 -36
- package/dist/cli-bundle/chunks/next-7ODPAQ4U.js +0 -306
- package/dist/cli-bundle/chunks/next-7ODPAQ4U.js.map +0 -7
- package/dist/cli-bundle/chunks/next-ODJUM4ZM.js +0 -303
- package/dist/cli-bundle/chunks/next-ODJUM4ZM.js.map +0 -1
- package/dist/cli-bundle/chunks/notes-72YXN5JX.js +0 -48
- package/dist/cli-bundle/chunks/notes-72YXN5JX.js.map +0 -7
- package/dist/cli-bundle/chunks/notes-NJ7IQJX4.js +0 -45
- package/dist/cli-bundle/chunks/notes-NJ7IQJX4.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-R4NDQ27E.js +0 -1366
- package/dist/cli-bundle/chunks/plan-R4NDQ27E.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-XWY5T67S.js +0 -1363
- package/dist/cli-bundle/chunks/plan-XWY5T67S.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +0 -397
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +0 -400
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-5H66WFYF.js +0 -419
- package/dist/cli-bundle/chunks/register-list-query-FB3FNDLZ.js +0 -409
- package/dist/cli-bundle/chunks/register-mutation-UJO23C7R.js +0 -1256
- package/dist/cli-bundle/chunks/register-mutation-Z2ETYHKS.js +0 -1273
- package/dist/cli-bundle/chunks/register-operations-A3XAM5J7.js +0 -513
- package/dist/cli-bundle/chunks/register-operations-A3XAM5J7.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-SG7HBSUP.js +0 -516
- package/dist/cli-bundle/chunks/register-operations-SG7HBSUP.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-I45OGJUV.js +0 -323
- package/dist/cli-bundle/chunks/register-setup-I45OGJUV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-K6U3NVY5.js +0 -326
- package/dist/cli-bundle/chunks/register-setup-K6U3NVY5.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +0 -19
- package/dist/cli-bundle/chunks/restore-YJ2ET6AT.js +0 -23
- package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js +0 -91
- package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js.map +0 -7
- package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js +0 -88
- package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js.map +0 -1
- package/dist/cli-bundle/chunks/schema-2PUXCZ25.js +0 -74
- package/dist/cli-bundle/chunks/schema-Y6DXXK2F.js +0 -78
- package/dist/cli-bundle/chunks/search-3S72CTD6.js +0 -38
- package/dist/cli-bundle/chunks/search-WNUNBQXO.js +0 -34
- package/dist/cli-bundle/chunks/stats-IJYTRQGV.js +0 -250
- package/dist/cli-bundle/chunks/stats-IJYTRQGV.js.map +0 -7
- package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js +0 -240
- package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js.map +0 -1
- package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js +0 -309
- package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js +0 -306
- package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js.map +0 -1
- package/dist/cli-bundle/chunks/test-DQ2QFJ7W.js +0 -45
- package/dist/cli-bundle/chunks/test-W7QBLVJS.js +0 -41
- package/dist/cli-bundle/chunks/test-all-636NTRTT.js +0 -434
- package/dist/cli-bundle/chunks/test-all-636NTRTT.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js +0 -437
- package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js +0 -28
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +0 -24
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js +0 -30
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js +0 -26
- package/dist/cli-bundle/chunks/update-many-DC7X3EWM.js +0 -671
- package/dist/cli-bundle/chunks/update-many-DC7X3EWM.js.map +0 -7
- package/dist/cli-bundle/chunks/update-many-SLLAMHT7.js +0 -668
- package/dist/cli-bundle/chunks/update-many-SLLAMHT7.js.map +0 -1
- package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js +0 -290
- package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js +0 -287
- package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-PA4FDTOV.js +0 -2143
- package/dist/cli-bundle/chunks/validate-PA4FDTOV.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js +0 -2105
- package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-4XQIDNM5.js.map → activity-WJCGCYPU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-YKAKZTZ4.js.map → activity-Z6QUAUSG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-3YRR3XY6.js.map → aggregate-BDM6EIAR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-OB2Y4QP5.js.map → aggregate-VQ2DHU3S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-WLA6IAWE.js.map → append-BGML6VLD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-4OQGIPSO.js.map → append-RKJYPU74.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YFIE7YK6.js.map → chunk-22KBU3MW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DLQ4ZTCU.js.map → chunk-24YG75HI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KLG4ZULO.js.map → chunk-2XG4IZON.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FJRKQREY.js.map → chunk-3GCS5SKL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5B3X4Y22.js.map → chunk-3KTN6IBA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YMABYTNG.js.map → chunk-3UJRFJ5R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YSAH5FY5.js.map → chunk-3VHSI5FL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7EQNAZX2.js.map → chunk-46CUF5L6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-75U6M5ZD.js.map → chunk-4IWYTWGF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VZIYHZDX.js.map → chunk-5GZ7TDD6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3U3VEWK6.js.map → chunk-5VAA4YHR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3PL6LEKP.js.map → chunk-64YKRTSV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ABRA3BHY.js.map → chunk-6LLVNJXT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EEY54JMF.js.map → chunk-7DT4WSH2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7MDXZAZS.js.map → chunk-7WBAJSS6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AAEQMOC6.js.map → chunk-AGHMOTGM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OWTIRHX4.js.map → chunk-ALFPSEWO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T3ABIMGW.js.map → chunk-AZYGZGGI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3JZNEQBA.js.map → chunk-B6DUFX6H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OESSOFJ4.js.map → chunk-C5JBZRPU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YPPVU5GX.js.map → chunk-CFB33L7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5J2XPTAD.js.map → chunk-CL36D4PC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IJ6CO3JV.js.map → chunk-D2XRLB55.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MNZ7DRNC.js.map → chunk-DEWEK6AN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-US3T3W5J.js.map → chunk-E3SZTQ4K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-C3PMDWGX.js.map → chunk-EGY6JBQ3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JLA7EVYV.js.map → chunk-EKFNL33R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-57C2RLW5.js.map → chunk-ENGQOEUY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7QH7DHUB.js.map → chunk-EOKXK3R3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZCJAA3JK.js.map → chunk-F3K4JGFD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DRBV5UC2.js.map → chunk-FLZSGSQR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y76TWC45.js.map → chunk-FT3QTERD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HK72NWAD.js.map → chunk-G24G7ZAV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K3AGVXSF.js.map → chunk-G64OCSKU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QHZO65XW.js.map → chunk-GANUTS7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WISPVC2E.js.map → chunk-GBAX2ZAQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RCT3YJOK.js.map → chunk-GJ7QC5DJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BVEUCSH2.js.map → chunk-GPLPTGOV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YZIR4R3U.js.map → chunk-GZRDYONU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7WYXBPYQ.js.map → chunk-IWVU4C2F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T3F4DF23.js.map → chunk-IX5BXEMX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RX3HQSYG.js.map → chunk-JDDLOQAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YOF5VPKM.js.map → chunk-JJP45OEI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TT42JUMF.js.map → chunk-K46RF36U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R3ZBLGTC.js.map → chunk-KGFUY7WN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NER3KUUS.js.map → chunk-KUOOJR35.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3Y4OESPP.js.map → chunk-L5PSPMZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PJ3A56YF.js.map → chunk-LPSSSDJR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FDBARR33.js.map → chunk-MA4SM3QZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PPAJG4GB.js.map → chunk-MFAZSEM5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5JZ7APJU.js.map → chunk-MFSCBT5Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4OFLJHX6.js.map → chunk-MLIYFOE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZMD35NYG.js.map → chunk-MUH7A3FD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5JE6SMYS.js.map → chunk-MVYWGY2A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P5TFTLWW.js.map → chunk-MWMVPCIE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T35XLYZF.js.map → chunk-NGXQ3PFT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EZFKWSC7.js.map → chunk-NMP5I3I5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HJE4JTKQ.js.map → chunk-O6AWCQRQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BFVHCAOO.js.map → chunk-OGWQ2IEP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S4APD35C.js.map → chunk-QLMX7SRD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MZ7VNEVY.js.map → chunk-RFNYTESG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MTTXDAK4.js.map → chunk-SCUR7K7N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P5YORJRH.js.map → chunk-SHQY2IDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S5AYOUT5.js.map → chunk-SMB7RV23.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N7X4WP6L.js.map → chunk-SPZ6DOGY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P3VRG72Q.js.map → chunk-SQYJ4HF2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4LRVSBO6.js.map → chunk-T42JWV3F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NBFCNJ7Q.js.map → chunk-TULGS6X6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZJB3UV5U.js.map → chunk-TZXRBVAM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZD34OFFQ.js.map → chunk-VPIM42PC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FGQKEDE4.js.map → chunk-W3DSJQIO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4QQ6PM7M.js.map → chunk-W572BIEB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z2CRRZYF.js.map → chunk-WRTENIX3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZAHXPXVY.js.map → chunk-XB7KFVFI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PDXT6Q55.js.map → chunk-XG625QP4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D3UCE7RW.js.map → chunk-XUC7PI2H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N6DNM2FA.js.map → chunk-Y46GD4IX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FUM6UMY4.js.map → chunk-Y4M7CPQP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HBYZDSK5.js.map → chunk-YN7Y6DQZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YQMMMONE.js.map → chunk-ZGK4L4JM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LEKT4K7I.js.map → chunk-ZSUS2OD3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TSPKZRRW.js.map → chunk-ZZD4J5XY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-HXJLKCRI.js.map → claim-RFS7BROJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-OJEXMKVW.js.map → claim-XP5AWZ5H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-XWWQFQ6S.js.map → close-2SSSHHUZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-WKOZKPQR.js.map → close-GEANHQ2J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-ZF6ZZPOU.js.map → close-many-CMZW7ITN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-NBAH62ML.js.map → close-many-ZFDIG6M7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-SGPYRAFT.js.map → comments-MFSYVNNU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-RYKLC72X.js.map → comments-XUBPXDYX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-4H3FCKF3.js.map → config-D7XQMONX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-54ICFKXM.js.map → config-T4FHBSYN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-RPIPQUNV.js.map → context-DIU275XI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-SKQAESQS.js.map → context-JCOYB4LZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-64LHZ3HM.js.map → contracts-BVO7CSLK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-7LXBTEKI.js.map → contracts-NYPEW2G4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-YJ2ET6AT.js.map → copy-32ROBIDL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-PXOFL6AM.js.map → copy-NAGLGMHZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-2PUXCZ25.js.map → create-4V7SWNBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-Y6DXXK2F.js.map → create-E77SDCUP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-WNUNBQXO.js.map → delete-NQI5OSKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-3S72CTD6.js.map → delete-RA5KTCLB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-DQ2QFJ7W.js.map → deps-32SU7HO5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-W7QBLVJS.js.map → deps-T7SCWXEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-245OINZR.js.map → docs-RRUPT7O2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-ZRD4GCTT.js.map → docs-WL2IWGWV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-SJZ6S77U.js.map → eval-NF2J5SHR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-SFLZPJXX.js.map → eval-SKDT3MZU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-FB3FNDLZ.js.map → register-list-query-B42JCCOI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-5H66WFYF.js.map → register-list-query-OEYQHFXO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-Z2ETYHKS.js.map → register-mutation-3QXIHCQG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-UJO23C7R.js.map → register-mutation-IAEST26S.js.map} +0 -0
|
@@ -0,0 +1,1985 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LINKED_TEST_PM_CONTEXT_MODE_VALUES,
|
|
3
|
+
LINKED_TEST_PROTECTED_ENV_KEYS,
|
|
4
|
+
looksLikeStructuredLinkedTestEntry,
|
|
5
|
+
normalizeStructuredLinkedTestEntry,
|
|
6
|
+
parseLinkedTestAssertionEqualsMap,
|
|
7
|
+
parseLinkedTestAssertionGteMap,
|
|
8
|
+
parseLinkedTestBoolean,
|
|
9
|
+
parseLinkedTestContextMode,
|
|
10
|
+
parseLinkedTestEnvClear,
|
|
11
|
+
parseLinkedTestEnvSet,
|
|
12
|
+
parseLinkedTestJsonEntries,
|
|
13
|
+
parseLinkedTestMinLines,
|
|
14
|
+
parseLinkedTestRegexList,
|
|
15
|
+
parseLinkedTestStringList
|
|
16
|
+
} from "./chunk-GPLPTGOV.js";
|
|
17
|
+
import {
|
|
18
|
+
createStdinTokenResolver,
|
|
19
|
+
parseCsvKv,
|
|
20
|
+
parseOptionalNumber
|
|
21
|
+
} from "./chunk-AZYGZGGI.js";
|
|
22
|
+
import {
|
|
23
|
+
runInit
|
|
24
|
+
} from "./chunk-GZRDYONU.js";
|
|
25
|
+
import {
|
|
26
|
+
locateItem,
|
|
27
|
+
mutateItem,
|
|
28
|
+
readLocatedItem
|
|
29
|
+
} from "./chunk-5VAA4YHR.js";
|
|
30
|
+
import {
|
|
31
|
+
compareTimestampStrings,
|
|
32
|
+
nowIso
|
|
33
|
+
} from "./chunk-FLZSGSQR.js";
|
|
34
|
+
import {
|
|
35
|
+
PmCliError,
|
|
36
|
+
getActiveExtensionRegistrations,
|
|
37
|
+
readSettings,
|
|
38
|
+
stableValueEquals
|
|
39
|
+
} from "./chunk-SHQY2IDC.js";
|
|
40
|
+
import {
|
|
41
|
+
EXIT_CODE,
|
|
42
|
+
ITEM_FILE_EXTENSIONS,
|
|
43
|
+
SCOPE_VALUES,
|
|
44
|
+
getSettingsPath,
|
|
45
|
+
pathExists,
|
|
46
|
+
resolveGlobalPmRoot,
|
|
47
|
+
resolveItemTypeRegistry,
|
|
48
|
+
resolvePmRoot
|
|
49
|
+
} from "./chunk-LK6XLOGP.js";
|
|
50
|
+
|
|
51
|
+
// dist/cli/commands/test.js
|
|
52
|
+
import { spawn } from "node:child_process";
|
|
53
|
+
import { cp, mkdir, mkdtemp, readdir, rm } from "node:fs/promises";
|
|
54
|
+
import { tmpdir } from "node:os";
|
|
55
|
+
import path from "node:path";
|
|
56
|
+
|
|
57
|
+
// dist/core/test/item-test-run-tracking.js
|
|
58
|
+
!(function() {
|
|
59
|
+
try {
|
|
60
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
61
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7681f869-8f0d-5927-86ac-af1ef0dfd5fd");
|
|
62
|
+
} catch (e2) {
|
|
63
|
+
}
|
|
64
|
+
})();
|
|
65
|
+
var DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT = 20;
|
|
66
|
+
function trackedTestRunHistoryLimit() {
|
|
67
|
+
const raw = process.env.PM_TRACKED_TEST_RUN_HISTORY_LIMIT;
|
|
68
|
+
if (!raw || raw.trim().length === 0) {
|
|
69
|
+
return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
|
|
70
|
+
}
|
|
71
|
+
const parsed = Number.parseInt(raw, 10);
|
|
72
|
+
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
73
|
+
return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
|
|
74
|
+
}
|
|
75
|
+
return parsed;
|
|
76
|
+
}
|
|
77
|
+
function normalizeTrackedTestRunSummaries(entries) {
|
|
78
|
+
return [...entries].filter((entry) => entry.run_id.trim().length > 0 && entry.started_at.trim().length > 0 && entry.finished_at.trim().length > 0 && entry.recorded_at.trim().length > 0).sort((left, right) => {
|
|
79
|
+
const byRecorded = compareTimestampStrings(left.recorded_at, right.recorded_at);
|
|
80
|
+
if (byRecorded !== 0)
|
|
81
|
+
return byRecorded;
|
|
82
|
+
const byRunId = left.run_id.localeCompare(right.run_id);
|
|
83
|
+
if (byRunId !== 0)
|
|
84
|
+
return byRunId;
|
|
85
|
+
return left.kind.localeCompare(right.kind);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
async function appendTrackedTestRunSummary(options) {
|
|
89
|
+
const historyLimit = trackedTestRunHistoryLimit();
|
|
90
|
+
await mutateItem({
|
|
91
|
+
pmRoot: options.pmRoot,
|
|
92
|
+
settings: options.settings,
|
|
93
|
+
id: options.itemId,
|
|
94
|
+
op: "test_run_track",
|
|
95
|
+
author: options.author,
|
|
96
|
+
message: options.message,
|
|
97
|
+
force: false,
|
|
98
|
+
mutate(document) {
|
|
99
|
+
const current = document.metadata.test_runs ?? [];
|
|
100
|
+
const next = normalizeTrackedTestRunSummaries([...current, options.entry]);
|
|
101
|
+
const bounded = next.length > historyLimit ? next.slice(next.length - historyLimit) : next;
|
|
102
|
+
document.metadata.test_runs = bounded;
|
|
103
|
+
return { changedFields: ["test_runs"] };
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// dist/core/test/run-selectors.js
|
|
109
|
+
!(function() {
|
|
110
|
+
try {
|
|
111
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
112
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "bdcc9109-f60d-5068-b2c2-bcc9dc9d5e50");
|
|
113
|
+
} catch (e2) {
|
|
114
|
+
}
|
|
115
|
+
})();
|
|
116
|
+
var MAX_SELECTOR_ENTRY_LABEL_LENGTH = 100;
|
|
117
|
+
function parseOnlyIndexValue(raw, optionName = "--only-index") {
|
|
118
|
+
const value = typeof raw === "number" ? raw : Number(String(raw).trim());
|
|
119
|
+
if (!Number.isInteger(value) || value < 1) {
|
|
120
|
+
throw new PmCliError(`${optionName} requires a 1-based integer index into the linked-test list (got "${raw}"). Use pm test <id> --list to inspect positions.`, EXIT_CODE.USAGE);
|
|
121
|
+
}
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
124
|
+
function summarizeSelectorEntry(entry) {
|
|
125
|
+
const label = entry.command ?? entry.path ?? "<no command>";
|
|
126
|
+
const normalized = label.replaceAll(/\s+/g, " ").trim() || "<no command>";
|
|
127
|
+
if (normalized.length <= MAX_SELECTOR_ENTRY_LABEL_LENGTH) {
|
|
128
|
+
return normalized;
|
|
129
|
+
}
|
|
130
|
+
return `${normalized.slice(0, MAX_SELECTOR_ENTRY_LABEL_LENGTH - 3)}...`;
|
|
131
|
+
}
|
|
132
|
+
function describeLinkedTestEntries(tests) {
|
|
133
|
+
return tests.map((entry, index) => `${index + 1}. ${summarizeSelectorEntry(entry)}`).join("; ");
|
|
134
|
+
}
|
|
135
|
+
function activeSelectorKinds(selector) {
|
|
136
|
+
const kinds = [];
|
|
137
|
+
if (selector.match !== void 0) {
|
|
138
|
+
kinds.push("match");
|
|
139
|
+
}
|
|
140
|
+
if (selector.onlyIndex !== void 0) {
|
|
141
|
+
kinds.push("only-index");
|
|
142
|
+
}
|
|
143
|
+
if (selector.onlyLast === true) {
|
|
144
|
+
kinds.push("only-last");
|
|
145
|
+
}
|
|
146
|
+
return kinds;
|
|
147
|
+
}
|
|
148
|
+
function entryMatchesSubstring(entry, needle) {
|
|
149
|
+
const command = entry.command?.toLowerCase() ?? "";
|
|
150
|
+
const entryPath = entry.path?.toLowerCase() ?? "";
|
|
151
|
+
return command.includes(needle) || entryPath.includes(needle);
|
|
152
|
+
}
|
|
153
|
+
function resolveLinkedTestRunSelection(tests, selector) {
|
|
154
|
+
const kinds = activeSelectorKinds(selector);
|
|
155
|
+
if (kinds.length === 0) {
|
|
156
|
+
return {
|
|
157
|
+
selector: null,
|
|
158
|
+
requested: null,
|
|
159
|
+
selected: tests,
|
|
160
|
+
selected_indexes: tests.map((_, index) => index + 1),
|
|
161
|
+
selected_count: tests.length,
|
|
162
|
+
skipped_count: 0
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
if (kinds.length > 1) {
|
|
166
|
+
throw new PmCliError(`Combine at most one linked-test selector per run: ${kinds.map((kind2) => `--${kind2}`).join(" and ")} were provided. Pick one of --match, --only-index, --only-last.`, EXIT_CODE.USAGE);
|
|
167
|
+
}
|
|
168
|
+
const kind = kinds[0];
|
|
169
|
+
if (tests.length === 0) {
|
|
170
|
+
throw new PmCliError(`--${kind} matched no linked tests because this item has none. Add one first with --add, --command, or --add-json.`, EXIT_CODE.USAGE);
|
|
171
|
+
}
|
|
172
|
+
if (kind === "match") {
|
|
173
|
+
const needle = selector.match.trim().toLowerCase();
|
|
174
|
+
if (needle.length === 0) {
|
|
175
|
+
throw new PmCliError("--match requires a non-empty substring to match against linked-test command/path values", EXIT_CODE.USAGE);
|
|
176
|
+
}
|
|
177
|
+
const selectedIndexes = [];
|
|
178
|
+
const selected = [];
|
|
179
|
+
for (let index = 0; index < tests.length; index += 1) {
|
|
180
|
+
if (entryMatchesSubstring(tests[index], needle)) {
|
|
181
|
+
selected.push(tests[index]);
|
|
182
|
+
selectedIndexes.push(index + 1);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (selected.length === 0) {
|
|
186
|
+
throw new PmCliError(`--match "${selector.match}" matched none of the ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
selector: "match",
|
|
190
|
+
requested: selector.match,
|
|
191
|
+
selected,
|
|
192
|
+
selected_indexes: selectedIndexes,
|
|
193
|
+
selected_count: selected.length,
|
|
194
|
+
skipped_count: tests.length - selected.length
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
if (kind === "only-index") {
|
|
198
|
+
const index = parseOnlyIndexValue(selector.onlyIndex);
|
|
199
|
+
if (index > tests.length) {
|
|
200
|
+
throw new PmCliError(`--only-index ${index} is out of range: this item has ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
selector: "only-index",
|
|
204
|
+
requested: String(index),
|
|
205
|
+
selected: [tests[index - 1]],
|
|
206
|
+
selected_indexes: [index],
|
|
207
|
+
selected_count: 1,
|
|
208
|
+
skipped_count: tests.length - 1
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
return {
|
|
212
|
+
selector: "only-last",
|
|
213
|
+
requested: "last",
|
|
214
|
+
selected: [tests[tests.length - 1]],
|
|
215
|
+
selected_indexes: [tests.length],
|
|
216
|
+
selected_count: 1,
|
|
217
|
+
skipped_count: tests.length - 1
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// dist/cli/commands/test/linked-command-detection.js
|
|
222
|
+
!(function() {
|
|
223
|
+
try {
|
|
224
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
225
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5d95440c-7913-547a-ae78-d9fe282d8edb");
|
|
226
|
+
} catch (e2) {
|
|
227
|
+
}
|
|
228
|
+
})();
|
|
229
|
+
var PM_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["--path"]);
|
|
230
|
+
var NPX_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["-p", "--package", "-c", "--call"]);
|
|
231
|
+
var PNPM_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set([
|
|
232
|
+
"-c",
|
|
233
|
+
"-C",
|
|
234
|
+
"--config",
|
|
235
|
+
"--dir",
|
|
236
|
+
"--filter",
|
|
237
|
+
"--workspace-dir"
|
|
238
|
+
]);
|
|
239
|
+
var NPM_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["-C", "--prefix", "--userconfig", "--cache"]);
|
|
240
|
+
var YARN_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["--cwd"]);
|
|
241
|
+
var BUN_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["--cwd"]);
|
|
242
|
+
var NPM_EXEC_SUBCOMMANDS = /* @__PURE__ */ new Set(["exec", "x"]);
|
|
243
|
+
var SCRIPT_RUN_SUBCOMMANDS = /* @__PURE__ */ new Set(["run", "run-script"]);
|
|
244
|
+
var SCRIPT_RUN_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["-C", "--dir", "--cwd", "-w", "--workspace", "--filter"]);
|
|
245
|
+
function splitNormalizedCommandSegments(normalizedCommand) {
|
|
246
|
+
return normalizedCommand.split(/&&|\|\||\||;/).map((segment) => segment.trim()).filter((segment) => segment.length > 0);
|
|
247
|
+
}
|
|
248
|
+
function stripLeadingEnvAssignments(tokens) {
|
|
249
|
+
let start = 0;
|
|
250
|
+
if (tokens[start] === "env") {
|
|
251
|
+
start += 1;
|
|
252
|
+
}
|
|
253
|
+
while (start < tokens.length) {
|
|
254
|
+
const token = tokens[start];
|
|
255
|
+
if (/^(?:[a-z_][a-z0-9_]*|\$env:[a-z_][a-z0-9_]*)=.*/.test(token)) {
|
|
256
|
+
start += 1;
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
return tokens.slice(start);
|
|
262
|
+
}
|
|
263
|
+
function firstPmSubcommand(args) {
|
|
264
|
+
let index = 0;
|
|
265
|
+
while (index < args.length) {
|
|
266
|
+
const token = args[index];
|
|
267
|
+
if (token === "--") {
|
|
268
|
+
index += 1;
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
if (token.startsWith("-")) {
|
|
272
|
+
if (PM_GLOBAL_FLAGS_WITH_VALUE.has(token)) {
|
|
273
|
+
index += 2;
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
index += 1;
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
return token;
|
|
280
|
+
}
|
|
281
|
+
return void 0;
|
|
282
|
+
}
|
|
283
|
+
function isPmExecutableToken(token) {
|
|
284
|
+
return token === "pm" || token === "pm.cmd" || token === "pm.exe" || token.endsWith("/pm") || token.endsWith("/pm.cmd") || token.endsWith("/pm.exe");
|
|
285
|
+
}
|
|
286
|
+
function normalizePackageSpecifier(token) {
|
|
287
|
+
const trimmed = token.trim();
|
|
288
|
+
if (!trimmed.startsWith("@")) {
|
|
289
|
+
const versionSeparator2 = trimmed.indexOf("@");
|
|
290
|
+
return versionSeparator2 === -1 ? trimmed : trimmed.slice(0, versionSeparator2);
|
|
291
|
+
}
|
|
292
|
+
const scopeSeparator = trimmed.indexOf("/");
|
|
293
|
+
if (scopeSeparator === -1) {
|
|
294
|
+
return trimmed;
|
|
295
|
+
}
|
|
296
|
+
const versionSeparator = trimmed.indexOf("@", scopeSeparator + 1);
|
|
297
|
+
return versionSeparator === -1 ? trimmed : trimmed.slice(0, versionSeparator);
|
|
298
|
+
}
|
|
299
|
+
function isPmCliPackageToken(token) {
|
|
300
|
+
const normalizedSpecifier = normalizePackageSpecifier(token);
|
|
301
|
+
return normalizedSpecifier === "pm-cli" || normalizedSpecifier.endsWith("/pm-cli") || token === "pm-cli" || token.endsWith("/pm-cli");
|
|
302
|
+
}
|
|
303
|
+
function isPmCliScriptToken(token) {
|
|
304
|
+
return token === "dist/cli.js" || token === "./dist/cli.js" || token.endsWith("/dist/cli.js");
|
|
305
|
+
}
|
|
306
|
+
function parseNpxCommand(tokens) {
|
|
307
|
+
let index = 0;
|
|
308
|
+
while (index < tokens.length) {
|
|
309
|
+
const token = tokens[index];
|
|
310
|
+
if (token === "--") {
|
|
311
|
+
index += 1;
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
if (!token.startsWith("-")) {
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
if (token.includes("=")) {
|
|
318
|
+
index += 1;
|
|
319
|
+
continue;
|
|
320
|
+
}
|
|
321
|
+
if (NPX_FLAGS_WITH_VALUE.has(token)) {
|
|
322
|
+
index += 2;
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
index += 1;
|
|
326
|
+
}
|
|
327
|
+
const command = tokens[index];
|
|
328
|
+
if (!command) {
|
|
329
|
+
return null;
|
|
330
|
+
}
|
|
331
|
+
return {
|
|
332
|
+
command,
|
|
333
|
+
args: tokens.slice(index + 1)
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
function parseLauncherSubcommand(tokens, flagsWithValue) {
|
|
337
|
+
let index = 0;
|
|
338
|
+
while (index < tokens.length) {
|
|
339
|
+
const token = tokens[index];
|
|
340
|
+
if (token === "--") {
|
|
341
|
+
index += 1;
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
if (token.startsWith("-")) {
|
|
345
|
+
if (token.includes("=")) {
|
|
346
|
+
index += 1;
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
if (flagsWithValue.has(token)) {
|
|
350
|
+
index += 2;
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
index += 1;
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
return {
|
|
357
|
+
subcommand: token,
|
|
358
|
+
args: tokens.slice(index + 1)
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
return null;
|
|
362
|
+
}
|
|
363
|
+
function parsePnpmDlxCommand(tokens) {
|
|
364
|
+
const parsed = parseLauncherSubcommand(tokens, PNPM_GLOBAL_FLAGS_WITH_VALUE);
|
|
365
|
+
if (parsed?.subcommand !== "dlx") {
|
|
366
|
+
return null;
|
|
367
|
+
}
|
|
368
|
+
return parseNpxCommand(parsed.args);
|
|
369
|
+
}
|
|
370
|
+
function parseNpmExecCommand(tokens) {
|
|
371
|
+
const parsed = parseLauncherSubcommand(tokens, NPM_GLOBAL_FLAGS_WITH_VALUE);
|
|
372
|
+
if (!parsed || !NPM_EXEC_SUBCOMMANDS.has(parsed.subcommand)) {
|
|
373
|
+
return null;
|
|
374
|
+
}
|
|
375
|
+
return parseNpxCommand(parsed.args);
|
|
376
|
+
}
|
|
377
|
+
function resolvePmSubcommandContext(args) {
|
|
378
|
+
let index = 0;
|
|
379
|
+
while (index < args.length) {
|
|
380
|
+
const token = args[index];
|
|
381
|
+
if (token === "--") {
|
|
382
|
+
index += 1;
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
if (token.startsWith("-")) {
|
|
386
|
+
if (PM_GLOBAL_FLAGS_WITH_VALUE.has(token)) {
|
|
387
|
+
index += 2;
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
index += 1;
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
return {
|
|
394
|
+
subcommand: token,
|
|
395
|
+
remaining: args.slice(index + 1)
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
return null;
|
|
399
|
+
}
|
|
400
|
+
function firstPositionalToken(tokens) {
|
|
401
|
+
for (const token of tokens) {
|
|
402
|
+
if (!token.startsWith("-")) {
|
|
403
|
+
return token;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
return void 0;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// dist/cli/commands/test.js
|
|
410
|
+
!(function() {
|
|
411
|
+
try {
|
|
412
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
413
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "caa941ed-c848-506c-9a3c-3d4959be0246");
|
|
414
|
+
} catch (e2) {
|
|
415
|
+
}
|
|
416
|
+
})();
|
|
417
|
+
var TEST_OUTPUT_MAX_BUFFER_BYTES = 20 * 1024 * 1024;
|
|
418
|
+
var DEFAULT_LINKED_TEST_TIMEOUT_FORCE_KILL_DELAY_MS = 3e3;
|
|
419
|
+
var DEFAULT_LINKED_TEST_HEARTBEAT_INTERVAL_MS = 1e4;
|
|
420
|
+
var DEFAULT_LINKED_TEST_PIPE_CLOSE_GRACE_MS = 5e3;
|
|
421
|
+
var MAX_LINKED_TEST_COMMAND_LABEL_LENGTH = 120;
|
|
422
|
+
var LINKED_TEST_TRACKER_DIRS_TO_SKIP = /* @__PURE__ */ new Set(["locks", "extensions", "runtime"]);
|
|
423
|
+
var LINKED_TEST_ITEM_COUNT_DIRS_TO_SKIP = /* @__PURE__ */ new Set(["history", "index", "search", "extensions", "locks", "runtime"]);
|
|
424
|
+
var LINKED_TEST_INFRA_COLLISION_PATTERNS = [
|
|
425
|
+
/eaddrinuse/i,
|
|
426
|
+
/address already in use/i,
|
|
427
|
+
/port\s+\d+\s+is already in use/i,
|
|
428
|
+
/web server[^.\n]*already running/i,
|
|
429
|
+
/failed to listen on/i
|
|
430
|
+
];
|
|
431
|
+
var PM_SUBCOMMANDS_WITH_ITEM_REFERENCE = /* @__PURE__ */ new Set([
|
|
432
|
+
"get",
|
|
433
|
+
"history",
|
|
434
|
+
"restore",
|
|
435
|
+
"update",
|
|
436
|
+
"close",
|
|
437
|
+
"delete",
|
|
438
|
+
"append",
|
|
439
|
+
"claim",
|
|
440
|
+
"release",
|
|
441
|
+
"comments",
|
|
442
|
+
"notes",
|
|
443
|
+
"learnings",
|
|
444
|
+
"files",
|
|
445
|
+
"docs",
|
|
446
|
+
"deps",
|
|
447
|
+
"test"
|
|
448
|
+
]);
|
|
449
|
+
var PM_TRACKER_READ_SUBCOMMANDS = /* @__PURE__ */ new Set([
|
|
450
|
+
"activity",
|
|
451
|
+
"calendar",
|
|
452
|
+
"context",
|
|
453
|
+
"ctx",
|
|
454
|
+
"deps",
|
|
455
|
+
"get",
|
|
456
|
+
"health",
|
|
457
|
+
"history",
|
|
458
|
+
"list",
|
|
459
|
+
"list-all",
|
|
460
|
+
"list-blocked",
|
|
461
|
+
"list-canceled",
|
|
462
|
+
"list-closed",
|
|
463
|
+
"list-draft",
|
|
464
|
+
"list-in-progress",
|
|
465
|
+
"list-open",
|
|
466
|
+
"search",
|
|
467
|
+
"stats",
|
|
468
|
+
"test-all",
|
|
469
|
+
"validate"
|
|
470
|
+
]);
|
|
471
|
+
function readPositiveIntegerEnv(name, fallback) {
|
|
472
|
+
const raw = process.env[name];
|
|
473
|
+
if (typeof raw !== "string" || raw.trim().length === 0) {
|
|
474
|
+
return fallback;
|
|
475
|
+
}
|
|
476
|
+
const parsed = Number.parseInt(raw, 10);
|
|
477
|
+
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
478
|
+
return fallback;
|
|
479
|
+
}
|
|
480
|
+
return parsed;
|
|
481
|
+
}
|
|
482
|
+
function linkedTestTimeoutForceKillDelayMs() {
|
|
483
|
+
return readPositiveIntegerEnv("PM_LINKED_TEST_TIMEOUT_FORCE_KILL_DELAY_MS", DEFAULT_LINKED_TEST_TIMEOUT_FORCE_KILL_DELAY_MS);
|
|
484
|
+
}
|
|
485
|
+
function linkedTestHeartbeatIntervalMs() {
|
|
486
|
+
return readPositiveIntegerEnv("PM_LINKED_TEST_HEARTBEAT_INTERVAL_MS", DEFAULT_LINKED_TEST_HEARTBEAT_INTERVAL_MS);
|
|
487
|
+
}
|
|
488
|
+
function linkedTestPipeCloseGraceMs() {
|
|
489
|
+
return readPositiveIntegerEnv("PM_LINKED_TEST_PIPE_CLOSE_GRACE_MS", DEFAULT_LINKED_TEST_PIPE_CLOSE_GRACE_MS);
|
|
490
|
+
}
|
|
491
|
+
function resolveAuthor(candidate, fallback) {
|
|
492
|
+
const resolved = candidate ?? process.env.PM_AUTHOR ?? fallback;
|
|
493
|
+
const trimmed = resolved.trim();
|
|
494
|
+
return trimmed || "unknown";
|
|
495
|
+
}
|
|
496
|
+
function resolveTrackedRunId(kind) {
|
|
497
|
+
const fromEnv = process.env.PM_BACKGROUND_TEST_RUN_ID?.trim();
|
|
498
|
+
if (fromEnv && fromEnv.length > 0) {
|
|
499
|
+
return fromEnv;
|
|
500
|
+
}
|
|
501
|
+
return `${kind}-local-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
502
|
+
}
|
|
503
|
+
function summarizeRunResultStatuses(results) {
|
|
504
|
+
let passed = 0;
|
|
505
|
+
let failed = 0;
|
|
506
|
+
let skipped = 0;
|
|
507
|
+
for (const entry of results) {
|
|
508
|
+
if (entry.status === "passed") {
|
|
509
|
+
passed += 1;
|
|
510
|
+
continue;
|
|
511
|
+
}
|
|
512
|
+
if (entry.status === "failed") {
|
|
513
|
+
failed += 1;
|
|
514
|
+
continue;
|
|
515
|
+
}
|
|
516
|
+
skipped += 1;
|
|
517
|
+
}
|
|
518
|
+
return { passed, failed, skipped };
|
|
519
|
+
}
|
|
520
|
+
function summarizeContextPreflight(runResults) {
|
|
521
|
+
let checkedPmCommands = 0;
|
|
522
|
+
let trackerReadCommands = 0;
|
|
523
|
+
let mismatches = 0;
|
|
524
|
+
let autoRemediated = 0;
|
|
525
|
+
for (const result of runResults) {
|
|
526
|
+
const context = result.execution_context;
|
|
527
|
+
if (!context || context.is_pm_command !== true) {
|
|
528
|
+
continue;
|
|
529
|
+
}
|
|
530
|
+
checkedPmCommands += 1;
|
|
531
|
+
if (context.is_pm_tracker_read_command === true) {
|
|
532
|
+
trackerReadCommands += 1;
|
|
533
|
+
}
|
|
534
|
+
if (context.mismatch_detected === true) {
|
|
535
|
+
mismatches += 1;
|
|
536
|
+
}
|
|
537
|
+
if (context.auto_pm_context_applied === true) {
|
|
538
|
+
autoRemediated += 1;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
return {
|
|
542
|
+
checked_pm_commands: checkedPmCommands,
|
|
543
|
+
tracker_read_commands: trackerReadCommands,
|
|
544
|
+
mismatches,
|
|
545
|
+
auto_remediated: autoRemediated
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
function ensureScope(raw) {
|
|
549
|
+
const value = raw ?? "project";
|
|
550
|
+
if (!SCOPE_VALUES.includes(value)) {
|
|
551
|
+
throw new PmCliError(`Invalid scope "${raw}"`, EXIT_CODE.USAGE);
|
|
552
|
+
}
|
|
553
|
+
return value;
|
|
554
|
+
}
|
|
555
|
+
function parsePmContextMode(raw) {
|
|
556
|
+
if (!raw) {
|
|
557
|
+
return "schema";
|
|
558
|
+
}
|
|
559
|
+
const normalized = raw.trim().toLowerCase();
|
|
560
|
+
if (LINKED_TEST_PM_CONTEXT_MODE_VALUES.includes(normalized)) {
|
|
561
|
+
return normalized;
|
|
562
|
+
}
|
|
563
|
+
throw new PmCliError(`Invalid --pm-context value "${raw}". Expected one of: ${LINKED_TEST_PM_CONTEXT_MODE_VALUES.join(", ")}`, EXIT_CODE.USAGE);
|
|
564
|
+
}
|
|
565
|
+
function resolveLinkedTestRequestedContextMode(linkedTest, runLevelMode, overrideLinkedPmContext) {
|
|
566
|
+
if (overrideLinkedPmContext) {
|
|
567
|
+
return runLevelMode;
|
|
568
|
+
}
|
|
569
|
+
if (typeof linkedTest.pm_context_mode !== "string" || linkedTest.pm_context_mode.trim().length === 0) {
|
|
570
|
+
return runLevelMode;
|
|
571
|
+
}
|
|
572
|
+
return parsePmContextMode(linkedTest.pm_context_mode);
|
|
573
|
+
}
|
|
574
|
+
function resolveLinkedTestEffectiveContextMode(requestedMode, isPmTrackerReadCommand) {
|
|
575
|
+
if (requestedMode === "auto") {
|
|
576
|
+
return isPmTrackerReadCommand ? "tracker" : "schema";
|
|
577
|
+
}
|
|
578
|
+
return requestedMode;
|
|
579
|
+
}
|
|
580
|
+
function hasLinkedTestAssertions(linkedTest) {
|
|
581
|
+
return (linkedTest.assert_stdout_contains?.length ?? 0) > 0 || (linkedTest.assert_stdout_regex?.length ?? 0) > 0 || (linkedTest.assert_stderr_contains?.length ?? 0) > 0 || (linkedTest.assert_stderr_regex?.length ?? 0) > 0 || typeof linkedTest.assert_stdout_min_lines === "number" || Object.keys(linkedTest.assert_json_field_equals ?? {}).length > 0 || Object.keys(linkedTest.assert_json_field_gte ?? {}).length > 0;
|
|
582
|
+
}
|
|
583
|
+
function buildPmContextMismatchHint(params) {
|
|
584
|
+
const { executionContext, runLevelPmContextMode, linkedOverridePmContextMode } = params;
|
|
585
|
+
if (!executionContext.is_pm_tracker_read_command || !executionContext.mismatch_detected) {
|
|
586
|
+
return "";
|
|
587
|
+
}
|
|
588
|
+
if (runLevelPmContextMode === "tracker" && linkedOverridePmContextMode === "schema") {
|
|
589
|
+
return " Linked test metadata pm_context_mode=schema overrides run-level --pm-context tracker. Set pm_context_mode=tracker (or auto) on the linked test, or remove the override, to run against seeded tracker data.";
|
|
590
|
+
}
|
|
591
|
+
if (executionContext.pm_context_mode === "schema") {
|
|
592
|
+
return " Use --pm-context tracker to run PM tracker-read commands against seeded tracker data.";
|
|
593
|
+
}
|
|
594
|
+
return "";
|
|
595
|
+
}
|
|
596
|
+
function mergeEnvSetDirectives(entries, optionName) {
|
|
597
|
+
const merged = {};
|
|
598
|
+
if (!entries) {
|
|
599
|
+
return merged;
|
|
600
|
+
}
|
|
601
|
+
for (const entry of entries) {
|
|
602
|
+
const parsed = parseLinkedTestEnvSet(entry, optionName);
|
|
603
|
+
if (!parsed) {
|
|
604
|
+
continue;
|
|
605
|
+
}
|
|
606
|
+
for (const [key, value] of Object.entries(parsed)) {
|
|
607
|
+
merged[key] = value;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
return merged;
|
|
611
|
+
}
|
|
612
|
+
function mergeEnvClearDirectives(entries, optionName) {
|
|
613
|
+
if (!entries) {
|
|
614
|
+
return [];
|
|
615
|
+
}
|
|
616
|
+
const values = [];
|
|
617
|
+
for (const entry of entries) {
|
|
618
|
+
const parsed = parseLinkedTestEnvClear(entry, optionName);
|
|
619
|
+
if (parsed) {
|
|
620
|
+
values.push(...parsed);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
return [...new Set(values)];
|
|
624
|
+
}
|
|
625
|
+
function looksLikePrefixedItemId(token, idPrefix) {
|
|
626
|
+
const normalizedPrefix = idPrefix.trim().toLowerCase().replace(/-+$/, "");
|
|
627
|
+
if (normalizedPrefix.length === 0) {
|
|
628
|
+
return false;
|
|
629
|
+
}
|
|
630
|
+
const normalized = token.trim().toLowerCase();
|
|
631
|
+
if (!normalized.startsWith(`${normalizedPrefix}-`)) {
|
|
632
|
+
return false;
|
|
633
|
+
}
|
|
634
|
+
return normalized.length > normalizedPrefix.length + 1;
|
|
635
|
+
}
|
|
636
|
+
function extractPmInvocationArgsFromSegment(segment) {
|
|
637
|
+
const rawTokens = segment.split(" ").filter((token) => token.length > 0);
|
|
638
|
+
const tokens = stripLeadingEnvAssignments(rawTokens);
|
|
639
|
+
if (tokens.length === 0) {
|
|
640
|
+
return null;
|
|
641
|
+
}
|
|
642
|
+
const [executable, ...args] = tokens;
|
|
643
|
+
if (isPmExecutableToken(executable) || isPmCliScriptToken(executable)) {
|
|
644
|
+
return args;
|
|
645
|
+
}
|
|
646
|
+
if (executable === "node" && args.length > 0 && isPmCliScriptToken(args[0])) {
|
|
647
|
+
return args.slice(1);
|
|
648
|
+
}
|
|
649
|
+
return extractPackageManagerPmInvocationArgs(executable, args);
|
|
650
|
+
}
|
|
651
|
+
function extractPackageManagerPmInvocationArgs(executable, args) {
|
|
652
|
+
const parsed = parsePackageManagerPmInvocation(executable, args);
|
|
653
|
+
if (!parsed || !isPmExecutableToken(parsed.command) && !isPmCliPackageToken(parsed.command)) {
|
|
654
|
+
return null;
|
|
655
|
+
}
|
|
656
|
+
return parsed.args;
|
|
657
|
+
}
|
|
658
|
+
function parsePackageManagerPmInvocation(executable, args) {
|
|
659
|
+
if (executable === "npx" || executable === "bunx") {
|
|
660
|
+
return parseNpxCommand(args);
|
|
661
|
+
}
|
|
662
|
+
if (executable === "pnpm") {
|
|
663
|
+
return parsePnpmDlxCommand(args);
|
|
664
|
+
}
|
|
665
|
+
if (executable === "npm") {
|
|
666
|
+
return parseNpmExecCommand(args);
|
|
667
|
+
}
|
|
668
|
+
return null;
|
|
669
|
+
}
|
|
670
|
+
function commandInvokesPmCli(command) {
|
|
671
|
+
const normalizedCommand = normalizeCommandForValidation(command);
|
|
672
|
+
return splitNormalizedCommandSegments(normalizedCommand).some((segment) => extractPmInvocationArgsFromSegment(segment) !== null);
|
|
673
|
+
}
|
|
674
|
+
function commandInvokesPmTrackerReadCommand(command) {
|
|
675
|
+
const normalizedCommand = normalizeCommandForValidation(command);
|
|
676
|
+
return splitNormalizedCommandSegments(normalizedCommand).some((segment) => {
|
|
677
|
+
const invocationArgs = extractPmInvocationArgsFromSegment(segment);
|
|
678
|
+
if (!invocationArgs) {
|
|
679
|
+
return false;
|
|
680
|
+
}
|
|
681
|
+
const context = resolvePmSubcommandContext(invocationArgs);
|
|
682
|
+
if (!context) {
|
|
683
|
+
return false;
|
|
684
|
+
}
|
|
685
|
+
return PM_TRACKER_READ_SUBCOMMANDS.has(context.subcommand);
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
function extractReferencedPmItemIdsFromCommand(command, idPrefix = "pm") {
|
|
689
|
+
const normalizedCommand = normalizeCommandForValidation(command);
|
|
690
|
+
const ids = /* @__PURE__ */ new Set();
|
|
691
|
+
for (const segment of splitNormalizedCommandSegments(normalizedCommand)) {
|
|
692
|
+
const invocationArgs = extractPmInvocationArgsFromSegment(segment);
|
|
693
|
+
if (!invocationArgs) {
|
|
694
|
+
continue;
|
|
695
|
+
}
|
|
696
|
+
const context = resolvePmSubcommandContext(invocationArgs);
|
|
697
|
+
if (!context) {
|
|
698
|
+
continue;
|
|
699
|
+
}
|
|
700
|
+
if (!PM_SUBCOMMANDS_WITH_ITEM_REFERENCE.has(context.subcommand)) {
|
|
701
|
+
continue;
|
|
702
|
+
}
|
|
703
|
+
const candidate = firstPositionalToken(context.remaining);
|
|
704
|
+
if (!candidate) {
|
|
705
|
+
continue;
|
|
706
|
+
}
|
|
707
|
+
if (looksLikePrefixedItemId(candidate, idPrefix)) {
|
|
708
|
+
ids.add(candidate);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
return [...ids].sort((left, right) => left.localeCompare(right));
|
|
712
|
+
}
|
|
713
|
+
function resolveDirectRunnerSubcommand(parsed) {
|
|
714
|
+
if (!parsed) {
|
|
715
|
+
return void 0;
|
|
716
|
+
}
|
|
717
|
+
if (!SCRIPT_RUN_SUBCOMMANDS.has(parsed.subcommand)) {
|
|
718
|
+
return parsed.subcommand;
|
|
719
|
+
}
|
|
720
|
+
return parseLauncherSubcommand(parsed.args, SCRIPT_RUN_FLAGS_WITH_VALUE)?.subcommand;
|
|
721
|
+
}
|
|
722
|
+
function firstDirectTestRunnerSubcommand(executable, args) {
|
|
723
|
+
if (executable === "npx" || executable === "bunx") {
|
|
724
|
+
return parseNpxCommand(args)?.command;
|
|
725
|
+
}
|
|
726
|
+
if (executable === "pnpm") {
|
|
727
|
+
return resolveDirectRunnerSubcommand(parseLauncherSubcommand(args, PNPM_GLOBAL_FLAGS_WITH_VALUE));
|
|
728
|
+
}
|
|
729
|
+
if (executable === "npm") {
|
|
730
|
+
return resolveDirectRunnerSubcommand(parseLauncherSubcommand(args, NPM_GLOBAL_FLAGS_WITH_VALUE));
|
|
731
|
+
}
|
|
732
|
+
if (executable === "yarn") {
|
|
733
|
+
return resolveDirectRunnerSubcommand(parseLauncherSubcommand(args, YARN_GLOBAL_FLAGS_WITH_VALUE));
|
|
734
|
+
}
|
|
735
|
+
if (executable === "bun") {
|
|
736
|
+
return resolveDirectRunnerSubcommand(parseLauncherSubcommand(args, BUN_GLOBAL_FLAGS_WITH_VALUE));
|
|
737
|
+
}
|
|
738
|
+
return void 0;
|
|
739
|
+
}
|
|
740
|
+
function isDirectTestRunnerSubcommand(token) {
|
|
741
|
+
if (!token) {
|
|
742
|
+
return false;
|
|
743
|
+
}
|
|
744
|
+
return token === "vitest" || token === "test" || token.startsWith("test:");
|
|
745
|
+
}
|
|
746
|
+
function parsedLauncherInvokesRecursiveTestAll(parsed) {
|
|
747
|
+
if (!parsed) {
|
|
748
|
+
return false;
|
|
749
|
+
}
|
|
750
|
+
if (!isPmExecutableToken(parsed.command) && !isPmCliPackageToken(parsed.command)) {
|
|
751
|
+
return false;
|
|
752
|
+
}
|
|
753
|
+
return firstPmSubcommand(parsed.args) === "test-all";
|
|
754
|
+
}
|
|
755
|
+
function segmentInvokesRecursiveTestAll(segment) {
|
|
756
|
+
const rawTokens = segment.split(" ").filter((token) => token.length > 0);
|
|
757
|
+
const tokens = stripLeadingEnvAssignments(rawTokens);
|
|
758
|
+
if (tokens.length === 0) {
|
|
759
|
+
return false;
|
|
760
|
+
}
|
|
761
|
+
const [executable, ...args] = tokens;
|
|
762
|
+
if (isPmExecutableToken(executable) || isPmCliScriptToken(executable)) {
|
|
763
|
+
return firstPmSubcommand(args) === "test-all";
|
|
764
|
+
}
|
|
765
|
+
if (executable === "node" && args.length > 0 && isPmCliScriptToken(args[0])) {
|
|
766
|
+
return firstPmSubcommand(args.slice(1)) === "test-all";
|
|
767
|
+
}
|
|
768
|
+
if (executable === "npx" || executable === "bunx") {
|
|
769
|
+
return parsedLauncherInvokesRecursiveTestAll(parseNpxCommand(args));
|
|
770
|
+
}
|
|
771
|
+
if (executable === "pnpm") {
|
|
772
|
+
return parsedLauncherInvokesRecursiveTestAll(parsePnpmDlxCommand(args));
|
|
773
|
+
}
|
|
774
|
+
if (executable === "npm") {
|
|
775
|
+
return parsedLauncherInvokesRecursiveTestAll(parseNpmExecCommand(args));
|
|
776
|
+
}
|
|
777
|
+
return false;
|
|
778
|
+
}
|
|
779
|
+
function invokesRecursiveTestAllCommand(command) {
|
|
780
|
+
const normalized = normalizeCommandForValidation(command);
|
|
781
|
+
return splitNormalizedCommandSegments(normalized).some((segment) => segmentInvokesRecursiveTestAll(segment));
|
|
782
|
+
}
|
|
783
|
+
function assertNoRecursiveTestAllCommand(command) {
|
|
784
|
+
if (!invokesRecursiveTestAllCommand(command))
|
|
785
|
+
return;
|
|
786
|
+
throw new PmCliError('Linked test commands must not invoke "pm test-all"; this creates recursive orchestration.', EXIT_CODE.USAGE);
|
|
787
|
+
}
|
|
788
|
+
function normalizeCommandForValidation(command) {
|
|
789
|
+
return command.trim().replaceAll("\\", "/").replaceAll('"', "").replaceAll("'", "").replaceAll(/\s+/g, " ").toLowerCase();
|
|
790
|
+
}
|
|
791
|
+
function commandUsesSandboxRunner(normalizedCommand) {
|
|
792
|
+
return normalizedCommand.includes("node scripts/run-tests.mjs ") || normalizedCommand.endsWith("node scripts/run-tests.mjs") || normalizedCommand.includes("node ./scripts/run-tests.mjs ") || normalizedCommand.endsWith("node ./scripts/run-tests.mjs");
|
|
793
|
+
}
|
|
794
|
+
function segmentHasExplicitSandboxEnv(normalizedSegment) {
|
|
795
|
+
const hasExplicitPmPath = /\bpm_path\s*=/.test(normalizedSegment) || /\$env:pm_path\s*=/.test(normalizedSegment);
|
|
796
|
+
const hasExplicitPmGlobalPath = /\bpm_global_path\s*=/.test(normalizedSegment) || /\$env:pm_global_path\s*=/.test(normalizedSegment);
|
|
797
|
+
return hasExplicitPmPath && hasExplicitPmGlobalPath;
|
|
798
|
+
}
|
|
799
|
+
function segmentInvokesUnsafeDirectTestRunner(normalizedSegment) {
|
|
800
|
+
const rawTokens = normalizedSegment.split(" ").filter((token) => token.length > 0);
|
|
801
|
+
const tokens = stripLeadingEnvAssignments(rawTokens);
|
|
802
|
+
if (tokens.length === 0) {
|
|
803
|
+
return false;
|
|
804
|
+
}
|
|
805
|
+
const [executable, ...args] = tokens;
|
|
806
|
+
if (executable === "vitest" || executable.endsWith("/vitest") || executable.endsWith("/vitest.mjs")) {
|
|
807
|
+
return true;
|
|
808
|
+
}
|
|
809
|
+
if (executable === "node") {
|
|
810
|
+
return nodeArgsInvokeUnsafeDirectTestRunner(args);
|
|
811
|
+
}
|
|
812
|
+
return packageManagerInvokesUnsafeDirectTestRunner(executable, args);
|
|
813
|
+
}
|
|
814
|
+
function nodeArgsInvokeUnsafeDirectTestRunner(args) {
|
|
815
|
+
return args.includes("--test") || args.some((arg) => arg === "vitest" || arg === "vitest.mjs" || arg.endsWith("/vitest") || arg.endsWith("/vitest.mjs"));
|
|
816
|
+
}
|
|
817
|
+
function packageManagerInvokesUnsafeDirectTestRunner(executable, args) {
|
|
818
|
+
if (executable === "npx" || executable === "bunx") {
|
|
819
|
+
return isDirectTestRunnerSubcommand(parseNpxCommand(args)?.command);
|
|
820
|
+
}
|
|
821
|
+
if (executable === "pnpm" || executable === "npm") {
|
|
822
|
+
return isDirectTestRunnerSubcommand(parsePackageManagerPmInvocation(executable, args)?.command) || firstDirectTestRunnerSubcommand(executable, args) === "vitest";
|
|
823
|
+
}
|
|
824
|
+
return (executable === "yarn" || executable === "bun") && firstDirectTestRunnerSubcommand(executable, args) === "vitest";
|
|
825
|
+
}
|
|
826
|
+
function assertSandboxSafeTestRunnerCommand(command) {
|
|
827
|
+
const normalized = normalizeCommandForValidation(command);
|
|
828
|
+
const segments = splitNormalizedCommandSegments(normalized);
|
|
829
|
+
const hasUnsafeDirectRunnerSegment = segments.some((segment) => !commandUsesSandboxRunner(segment) && segmentInvokesUnsafeDirectTestRunner(segment) && !segmentHasExplicitSandboxEnv(segment));
|
|
830
|
+
if (!hasUnsafeDirectRunnerSegment) {
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
throw new PmCliError('Linked test runner commands must be sandbox-safe: use "node scripts/run-tests.mjs <test|coverage>", use a package-manager script such as "pnpm test", or include PM_PATH=... PM_GLOBAL_PATH=... INLINE in the command string (exporting them in your shell environment is not checked). Example: "PM_PATH=/tmp/pm-x PM_GLOBAL_PATH=/tmp/pm-x-g vitest run".', EXIT_CODE.USAGE);
|
|
834
|
+
}
|
|
835
|
+
function getRuntimeSafetySkipReason(command) {
|
|
836
|
+
if (!invokesRecursiveTestAllCommand(command))
|
|
837
|
+
return void 0;
|
|
838
|
+
return 'Linked test command skipped: Linked test commands must not invoke "pm test-all"; this creates recursive orchestration.';
|
|
839
|
+
}
|
|
840
|
+
function parseAddEntries(raw) {
|
|
841
|
+
if (!raw)
|
|
842
|
+
return [];
|
|
843
|
+
return raw.map(parseAddEntry);
|
|
844
|
+
}
|
|
845
|
+
function parseAddEntry(entry) {
|
|
846
|
+
const trimmed = entry.trim();
|
|
847
|
+
const kv = looksLikeStructuredLinkedTestEntry(trimmed) ? normalizeStructuredLinkedTestEntry(parseCsvKv(entry, "--add"), "--add") : { command: trimmed };
|
|
848
|
+
const command = trimLinkedTestEntryField(kv.command);
|
|
849
|
+
if (!command) {
|
|
850
|
+
throw new PmCliError("--add requires command=<value> or a bare command (path=<value> is optional metadata)", EXIT_CODE.USAGE);
|
|
851
|
+
}
|
|
852
|
+
assertNoRecursiveTestAllCommand(command);
|
|
853
|
+
assertSandboxSafeTestRunnerCommand(command);
|
|
854
|
+
return {
|
|
855
|
+
command,
|
|
856
|
+
path: trimLinkedTestEntryField(kv.path),
|
|
857
|
+
scope: ensureScope(kv.scope),
|
|
858
|
+
timeout_seconds: parseLinkedTestTimeoutSeconds(trimLinkedTestEntryField(kv.timeout_seconds), trimLinkedTestEntryField(kv.timeout)),
|
|
859
|
+
pm_context_mode: parseLinkedTestContextMode(trimLinkedTestEntryField(kv.pm_context_mode), "--add"),
|
|
860
|
+
env_set: parseLinkedTestEnvSet(trimLinkedTestEntryField(kv.env_set), "--add"),
|
|
861
|
+
env_clear: parseLinkedTestEnvClear(trimLinkedTestEntryField(kv.env_clear), "--add"),
|
|
862
|
+
shared_host_safe: parseLinkedTestBoolean(trimLinkedTestEntryField(kv.shared_host_safe), "--add", "shared_host_safe"),
|
|
863
|
+
assert_stdout_contains: parseLinkedTestStringList(trimLinkedTestEntryField(kv.assert_stdout_contains)),
|
|
864
|
+
assert_stdout_regex: parseLinkedTestRegexList(trimLinkedTestEntryField(kv.assert_stdout_regex), "--add", "assert_stdout_regex"),
|
|
865
|
+
assert_stderr_contains: parseLinkedTestStringList(trimLinkedTestEntryField(kv.assert_stderr_contains)),
|
|
866
|
+
assert_stderr_regex: parseLinkedTestRegexList(trimLinkedTestEntryField(kv.assert_stderr_regex), "--add", "assert_stderr_regex"),
|
|
867
|
+
assert_stdout_min_lines: parseLinkedTestMinLines(trimLinkedTestEntryField(kv.assert_stdout_min_lines), "--add"),
|
|
868
|
+
assert_json_field_equals: parseLinkedTestAssertionEqualsMap(trimLinkedTestEntryField(kv.assert_json_field_equals), "--add"),
|
|
869
|
+
assert_json_field_gte: parseLinkedTestAssertionGteMap(trimLinkedTestEntryField(kv.assert_json_field_gte), "--add"),
|
|
870
|
+
note: trimLinkedTestEntryField(kv.note)
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
function trimLinkedTestEntryField(value) {
|
|
874
|
+
const trimmed = value?.trim();
|
|
875
|
+
return trimmed && trimmed.length > 0 ? trimmed : void 0;
|
|
876
|
+
}
|
|
877
|
+
function parseLinkedTestTimeoutSeconds(timeoutSecondsRaw, timeoutAliasRaw) {
|
|
878
|
+
if (timeoutSecondsRaw && timeoutAliasRaw && timeoutSecondsRaw !== timeoutAliasRaw) {
|
|
879
|
+
throw new PmCliError("--add timeout and timeout_seconds must match when both are provided", EXIT_CODE.USAGE);
|
|
880
|
+
}
|
|
881
|
+
const timeoutRaw = timeoutSecondsRaw ?? timeoutAliasRaw;
|
|
882
|
+
return timeoutRaw === void 0 ? void 0 : Math.floor(parseOptionalNumber(timeoutRaw, "timeout_seconds"));
|
|
883
|
+
}
|
|
884
|
+
function parseAddJsonEntries(raw) {
|
|
885
|
+
if (!raw)
|
|
886
|
+
return [];
|
|
887
|
+
return raw.flatMap((entry) => {
|
|
888
|
+
const parsed = parseLinkedTestJsonEntries(entry, "--add-json");
|
|
889
|
+
for (const linkedTest of parsed) {
|
|
890
|
+
const command = linkedTest.command;
|
|
891
|
+
if (!command) {
|
|
892
|
+
throw new PmCliError("--add-json requires a non-empty command string", EXIT_CODE.USAGE);
|
|
893
|
+
}
|
|
894
|
+
assertNoRecursiveTestAllCommand(command);
|
|
895
|
+
assertSandboxSafeTestRunnerCommand(command);
|
|
896
|
+
}
|
|
897
|
+
return parsed;
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
function parseRemoveEntries(raw) {
|
|
901
|
+
if (!raw)
|
|
902
|
+
return [];
|
|
903
|
+
return raw.map((entry) => {
|
|
904
|
+
const trimmed = entry.trim();
|
|
905
|
+
if (!trimmed) {
|
|
906
|
+
throw new PmCliError("--remove requires command or path value", EXIT_CODE.USAGE);
|
|
907
|
+
}
|
|
908
|
+
if (trimmed.includes("=") || /^(?:[-*+]\s+)?(?:path|command)\s*[:=]/i.test(trimmed) || trimmed.startsWith("```")) {
|
|
909
|
+
const kv = parseCsvKv(trimmed, "--remove");
|
|
910
|
+
const value = kv.path ?? kv.command;
|
|
911
|
+
if (!value?.trim()) {
|
|
912
|
+
throw new PmCliError("--remove requires command=<value> and/or path=<value>", EXIT_CODE.USAGE);
|
|
913
|
+
}
|
|
914
|
+
return value.trim();
|
|
915
|
+
}
|
|
916
|
+
return trimmed;
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
function closeLinkedTestStdin(child) {
|
|
920
|
+
try {
|
|
921
|
+
child.stdin?.end();
|
|
922
|
+
} catch {
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
function summarizeLinkedTestCommand(command) {
|
|
926
|
+
const normalized = command.trim().replaceAll(/\s+/g, " ");
|
|
927
|
+
if (normalized.length <= MAX_LINKED_TEST_COMMAND_LABEL_LENGTH) {
|
|
928
|
+
return normalized;
|
|
929
|
+
}
|
|
930
|
+
return `${normalized.slice(0, MAX_LINKED_TEST_COMMAND_LABEL_LENGTH - 3)}...`;
|
|
931
|
+
}
|
|
932
|
+
function shouldEmitLinkedTestProgress(mode) {
|
|
933
|
+
if (mode === "off") {
|
|
934
|
+
return false;
|
|
935
|
+
}
|
|
936
|
+
if (mode === "always") {
|
|
937
|
+
return true;
|
|
938
|
+
}
|
|
939
|
+
return process.stderr.isTTY === true;
|
|
940
|
+
}
|
|
941
|
+
function emitLinkedTestProgress(message) {
|
|
942
|
+
try {
|
|
943
|
+
process.stderr.write(`${message}
|
|
944
|
+
`);
|
|
945
|
+
} catch {
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
function beginLinkedTestProgress(context, mode) {
|
|
949
|
+
if (!shouldEmitLinkedTestProgress(mode)) {
|
|
950
|
+
return null;
|
|
951
|
+
}
|
|
952
|
+
const commandLabel = summarizeLinkedTestCommand(context.command);
|
|
953
|
+
const startAt = Date.now();
|
|
954
|
+
emitLinkedTestProgress(`[pm test] linked-test ${context.index}/${context.total} start timeout_ms=${context.timeoutMs} command="${commandLabel}"`);
|
|
955
|
+
const heartbeat = setInterval(() => {
|
|
956
|
+
const elapsedMs = Date.now() - startAt;
|
|
957
|
+
emitLinkedTestProgress(`[pm test] linked-test ${context.index}/${context.total} running elapsed_ms=${elapsedMs} command="${commandLabel}"`);
|
|
958
|
+
}, linkedTestHeartbeatIntervalMs());
|
|
959
|
+
heartbeat.unref?.();
|
|
960
|
+
return heartbeat;
|
|
961
|
+
}
|
|
962
|
+
function endLinkedTestProgress(context, executionResult, startedAt, mode) {
|
|
963
|
+
if (!shouldEmitLinkedTestProgress(mode)) {
|
|
964
|
+
return;
|
|
965
|
+
}
|
|
966
|
+
const commandLabel = summarizeLinkedTestCommand(context.command);
|
|
967
|
+
const elapsedMs = Date.now() - startedAt;
|
|
968
|
+
const failed = executionResult.timedOut || executionResult.maxBufferExceeded || executionResult.exitCode !== 0;
|
|
969
|
+
const statusLabel = failed ? "failed" : "passed";
|
|
970
|
+
const reasonTokens = [];
|
|
971
|
+
if (executionResult.timedOut) {
|
|
972
|
+
reasonTokens.push("reason=timeout");
|
|
973
|
+
}
|
|
974
|
+
if (executionResult.maxBufferExceeded) {
|
|
975
|
+
reasonTokens.push("reason=max_buffer");
|
|
976
|
+
}
|
|
977
|
+
if (executionResult.signal) {
|
|
978
|
+
reasonTokens.push(`signal=${executionResult.signal}`);
|
|
979
|
+
}
|
|
980
|
+
const exitLabel = executionResult.exitCode === null ? "null" : String(executionResult.exitCode);
|
|
981
|
+
const reasonSuffix = reasonTokens.length > 0 ? ` ${reasonTokens.join(" ")}` : "";
|
|
982
|
+
emitLinkedTestProgress(`[pm test] linked-test ${context.index}/${context.total} end status=${statusLabel} exit_code=${exitLabel} elapsed_ms=${elapsedMs}${reasonSuffix} command="${commandLabel}"`);
|
|
983
|
+
}
|
|
984
|
+
async function killProcessTree(pid) {
|
|
985
|
+
if (!Number.isInteger(pid) || pid <= 0) {
|
|
986
|
+
return;
|
|
987
|
+
}
|
|
988
|
+
if (process.platform === "win32") {
|
|
989
|
+
await new Promise((resolve) => {
|
|
990
|
+
const killer = spawn("taskkill", ["/pid", String(pid), "/T", "/F"], {
|
|
991
|
+
stdio: "ignore",
|
|
992
|
+
windowsHide: true
|
|
993
|
+
});
|
|
994
|
+
killer.on("error", () => resolve());
|
|
995
|
+
killer.on("close", () => resolve());
|
|
996
|
+
});
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
999
|
+
try {
|
|
1000
|
+
process.kill(-pid, "SIGKILL");
|
|
1001
|
+
return;
|
|
1002
|
+
} catch {
|
|
1003
|
+
}
|
|
1004
|
+
try {
|
|
1005
|
+
process.kill(pid, "SIGKILL");
|
|
1006
|
+
} catch {
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
async function runLinkedTestCommand(command, timeoutMs, env, progressContext, progressMode) {
|
|
1010
|
+
const startedAt = Date.now();
|
|
1011
|
+
const heartbeat = beginLinkedTestProgress(progressContext, progressMode);
|
|
1012
|
+
const child = spawn(command, {
|
|
1013
|
+
cwd: process.cwd(),
|
|
1014
|
+
env,
|
|
1015
|
+
shell: true,
|
|
1016
|
+
windowsHide: true,
|
|
1017
|
+
detached: process.platform !== "win32",
|
|
1018
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
1019
|
+
});
|
|
1020
|
+
closeLinkedTestStdin(child);
|
|
1021
|
+
let stdout = "";
|
|
1022
|
+
let stderr = "";
|
|
1023
|
+
let stdoutBytes = 0;
|
|
1024
|
+
let stderrBytes = 0;
|
|
1025
|
+
let timedOut = false;
|
|
1026
|
+
let maxBufferExceeded = false;
|
|
1027
|
+
let spawnError;
|
|
1028
|
+
let forceKillTimer = null;
|
|
1029
|
+
let timedOutTimer = null;
|
|
1030
|
+
let terminationRequested = false;
|
|
1031
|
+
const clearTimers = () => {
|
|
1032
|
+
if (heartbeat) {
|
|
1033
|
+
clearInterval(heartbeat);
|
|
1034
|
+
}
|
|
1035
|
+
if (timedOutTimer) {
|
|
1036
|
+
clearTimeout(timedOutTimer);
|
|
1037
|
+
timedOutTimer = null;
|
|
1038
|
+
}
|
|
1039
|
+
if (forceKillTimer) {
|
|
1040
|
+
clearTimeout(forceKillTimer);
|
|
1041
|
+
forceKillTimer = null;
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
1044
|
+
const requestTermination = async () => {
|
|
1045
|
+
if (terminationRequested) {
|
|
1046
|
+
return;
|
|
1047
|
+
}
|
|
1048
|
+
terminationRequested = true;
|
|
1049
|
+
const pid = child.pid;
|
|
1050
|
+
if (!pid || pid <= 0) {
|
|
1051
|
+
try {
|
|
1052
|
+
child.kill("SIGTERM");
|
|
1053
|
+
} catch {
|
|
1054
|
+
}
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1057
|
+
if (process.platform === "win32") {
|
|
1058
|
+
await killProcessTree(pid);
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1061
|
+
try {
|
|
1062
|
+
process.kill(-pid, "SIGTERM");
|
|
1063
|
+
} catch {
|
|
1064
|
+
try {
|
|
1065
|
+
child.kill("SIGTERM");
|
|
1066
|
+
} catch {
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
forceKillTimer = setTimeout(() => {
|
|
1070
|
+
void killProcessTree(pid);
|
|
1071
|
+
}, linkedTestTimeoutForceKillDelayMs());
|
|
1072
|
+
forceKillTimer.unref?.();
|
|
1073
|
+
};
|
|
1074
|
+
const appendChunk = (chunk, target) => {
|
|
1075
|
+
const text = typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
1076
|
+
const bytes = Buffer.byteLength(text);
|
|
1077
|
+
if (target === "stdout") {
|
|
1078
|
+
stdoutBytes += bytes;
|
|
1079
|
+
if (stdoutBytes <= TEST_OUTPUT_MAX_BUFFER_BYTES) {
|
|
1080
|
+
stdout += text;
|
|
1081
|
+
}
|
|
1082
|
+
} else {
|
|
1083
|
+
stderrBytes += bytes;
|
|
1084
|
+
if (stderrBytes <= TEST_OUTPUT_MAX_BUFFER_BYTES) {
|
|
1085
|
+
stderr += text;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
if (!maxBufferExceeded && (stdoutBytes > TEST_OUTPUT_MAX_BUFFER_BYTES || stderrBytes > TEST_OUTPUT_MAX_BUFFER_BYTES)) {
|
|
1089
|
+
maxBufferExceeded = true;
|
|
1090
|
+
void requestTermination();
|
|
1091
|
+
}
|
|
1092
|
+
};
|
|
1093
|
+
child.stdout?.on("data", (chunk) => appendChunk(chunk, "stdout"));
|
|
1094
|
+
child.stderr?.on("data", (chunk) => appendChunk(chunk, "stderr"));
|
|
1095
|
+
child.on("error", (error) => {
|
|
1096
|
+
spawnError = error.message;
|
|
1097
|
+
});
|
|
1098
|
+
timedOutTimer = setTimeout(() => {
|
|
1099
|
+
timedOut = true;
|
|
1100
|
+
void requestTermination();
|
|
1101
|
+
}, timeoutMs);
|
|
1102
|
+
timedOutTimer.unref?.();
|
|
1103
|
+
const { code, signal } = await new Promise((resolve) => {
|
|
1104
|
+
let settled = false;
|
|
1105
|
+
let pipeCloseGraceTimer = null;
|
|
1106
|
+
const settle = (value, destroyPipes = false) => {
|
|
1107
|
+
if (settled) {
|
|
1108
|
+
return;
|
|
1109
|
+
}
|
|
1110
|
+
settled = true;
|
|
1111
|
+
if (pipeCloseGraceTimer) {
|
|
1112
|
+
clearTimeout(pipeCloseGraceTimer);
|
|
1113
|
+
pipeCloseGraceTimer = null;
|
|
1114
|
+
}
|
|
1115
|
+
if (destroyPipes) {
|
|
1116
|
+
child.stdin?.destroy();
|
|
1117
|
+
child.stdout?.destroy();
|
|
1118
|
+
child.stderr?.destroy();
|
|
1119
|
+
}
|
|
1120
|
+
resolve(value);
|
|
1121
|
+
};
|
|
1122
|
+
child.on("exit", (exitCode, exitSignal) => {
|
|
1123
|
+
if (settled) {
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1126
|
+
pipeCloseGraceTimer = setTimeout(() => {
|
|
1127
|
+
settle({
|
|
1128
|
+
code: exitCode,
|
|
1129
|
+
signal: exitSignal
|
|
1130
|
+
}, true);
|
|
1131
|
+
}, linkedTestPipeCloseGraceMs());
|
|
1132
|
+
pipeCloseGraceTimer.unref?.();
|
|
1133
|
+
});
|
|
1134
|
+
child.on("close", (closeCode, closeSignal) => {
|
|
1135
|
+
settle({
|
|
1136
|
+
code: closeCode,
|
|
1137
|
+
signal: closeSignal
|
|
1138
|
+
});
|
|
1139
|
+
});
|
|
1140
|
+
});
|
|
1141
|
+
clearTimers();
|
|
1142
|
+
const executionResult = {
|
|
1143
|
+
stdout,
|
|
1144
|
+
stderr,
|
|
1145
|
+
exitCode: code,
|
|
1146
|
+
signal,
|
|
1147
|
+
timedOut,
|
|
1148
|
+
maxBufferExceeded,
|
|
1149
|
+
spawnError
|
|
1150
|
+
};
|
|
1151
|
+
endLinkedTestProgress(progressContext, executionResult, startedAt, progressMode);
|
|
1152
|
+
return executionResult;
|
|
1153
|
+
}
|
|
1154
|
+
function formatLinkedTestExecutionError(result, timeoutMs) {
|
|
1155
|
+
const details = [];
|
|
1156
|
+
if (result.maxBufferExceeded) {
|
|
1157
|
+
details.push(`Linked test output exceeded maxBuffer=${TEST_OUTPUT_MAX_BUFFER_BYTES} bytes. Reduce output volume or split the command.`);
|
|
1158
|
+
}
|
|
1159
|
+
if (result.timedOut && timeoutMs > 0) {
|
|
1160
|
+
details.push(`Linked test timed out after ${timeoutMs}ms.`);
|
|
1161
|
+
}
|
|
1162
|
+
const signalMessage = result.signal ? `Linked test command terminated by signal ${result.signal}.` : void 0;
|
|
1163
|
+
const baseMessage = result.spawnError?.trim() || signalMessage || "Linked test command failed.";
|
|
1164
|
+
if (details.length === 0) {
|
|
1165
|
+
return baseMessage;
|
|
1166
|
+
}
|
|
1167
|
+
return `${baseMessage} ${details.join(" ")}`;
|
|
1168
|
+
}
|
|
1169
|
+
function hasInfraCollisionSignal(result) {
|
|
1170
|
+
const combined = [result.spawnError ?? "", result.stderr, result.stdout].join("\n");
|
|
1171
|
+
return LINKED_TEST_INFRA_COLLISION_PATTERNS.some((pattern) => pattern.test(combined));
|
|
1172
|
+
}
|
|
1173
|
+
function classifyLinkedTestFailure(result) {
|
|
1174
|
+
if (hasInfraCollisionSignal(result)) {
|
|
1175
|
+
return "infra_collision";
|
|
1176
|
+
}
|
|
1177
|
+
if (result.timedOut) {
|
|
1178
|
+
return "timeout";
|
|
1179
|
+
}
|
|
1180
|
+
if (result.maxBufferExceeded) {
|
|
1181
|
+
return "max_buffer";
|
|
1182
|
+
}
|
|
1183
|
+
if (result.spawnError) {
|
|
1184
|
+
return "spawn_error";
|
|
1185
|
+
}
|
|
1186
|
+
if (result.signal) {
|
|
1187
|
+
return "signal";
|
|
1188
|
+
}
|
|
1189
|
+
return "assertion_failure";
|
|
1190
|
+
}
|
|
1191
|
+
function createEmptyFailureCategoryCounts() {
|
|
1192
|
+
return {
|
|
1193
|
+
infra_collision: 0,
|
|
1194
|
+
assertion_failure: 0,
|
|
1195
|
+
empty_run: 0,
|
|
1196
|
+
timeout: 0,
|
|
1197
|
+
max_buffer: 0,
|
|
1198
|
+
spawn_error: 0,
|
|
1199
|
+
signal: 0
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
function countFailureCategories(runResults) {
|
|
1203
|
+
const counts = createEmptyFailureCategoryCounts();
|
|
1204
|
+
for (const result of runResults) {
|
|
1205
|
+
if (result.status !== "failed" || !result.failure_category) {
|
|
1206
|
+
continue;
|
|
1207
|
+
}
|
|
1208
|
+
counts[result.failure_category] += 1;
|
|
1209
|
+
}
|
|
1210
|
+
return counts;
|
|
1211
|
+
}
|
|
1212
|
+
function applyEnvDirectiveStage(env, directives) {
|
|
1213
|
+
for (const [key, value] of Object.entries(directives.env_set)) {
|
|
1214
|
+
if (LINKED_TEST_PROTECTED_ENV_KEYS.has(key.toUpperCase())) {
|
|
1215
|
+
continue;
|
|
1216
|
+
}
|
|
1217
|
+
env[key] = value;
|
|
1218
|
+
}
|
|
1219
|
+
for (const key of directives.env_clear) {
|
|
1220
|
+
if (LINKED_TEST_PROTECTED_ENV_KEYS.has(key.toUpperCase())) {
|
|
1221
|
+
continue;
|
|
1222
|
+
}
|
|
1223
|
+
delete env[key];
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
function applySharedHostSafeDefaults(env) {
|
|
1227
|
+
if (env.PORT === void 0) {
|
|
1228
|
+
env.PORT = "0";
|
|
1229
|
+
}
|
|
1230
|
+
if (env.HOST === void 0) {
|
|
1231
|
+
env.HOST = "127.0.0.1";
|
|
1232
|
+
}
|
|
1233
|
+
if (env.PM_SHARED_HOST_SAFE === void 0) {
|
|
1234
|
+
env.PM_SHARED_HOST_SAFE = "1";
|
|
1235
|
+
}
|
|
1236
|
+
if (env.PLAYWRIGHT_HTML_OPEN === void 0) {
|
|
1237
|
+
env.PLAYWRIGHT_HTML_OPEN = "never";
|
|
1238
|
+
}
|
|
1239
|
+
if (env.PW_TEST_HTML_REPORT_OPEN === void 0) {
|
|
1240
|
+
env.PW_TEST_HTML_REPORT_OPEN = "never";
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
function resolveEffectiveLinkedTestDirectives(runtimeDirectives, linkedTest) {
|
|
1244
|
+
const envSet = { ...runtimeDirectives.env_set, ...linkedTest.env_set };
|
|
1245
|
+
const envClear = [.../* @__PURE__ */ new Set([...runtimeDirectives.env_clear, ...linkedTest.env_clear ?? []])];
|
|
1246
|
+
const sharedHostSafe = linkedTest.shared_host_safe ?? runtimeDirectives.shared_host_safe;
|
|
1247
|
+
return {
|
|
1248
|
+
env_set: envSet,
|
|
1249
|
+
env_clear: envClear,
|
|
1250
|
+
shared_host_safe: sharedHostSafe
|
|
1251
|
+
};
|
|
1252
|
+
}
|
|
1253
|
+
function resolveRuntimeDirectives(envSetEntries, envClearEntries, sharedHostSafe) {
|
|
1254
|
+
return {
|
|
1255
|
+
env_set: mergeEnvSetDirectives(envSetEntries, "--env-set"),
|
|
1256
|
+
env_clear: mergeEnvClearDirectives(envClearEntries, "--env-clear"),
|
|
1257
|
+
shared_host_safe: sharedHostSafe === true
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1260
|
+
async function copyIntoSandboxIfPresent(sourcePath, targetPath, recursive = false) {
|
|
1261
|
+
if (!await pathExists(sourcePath)) {
|
|
1262
|
+
return;
|
|
1263
|
+
}
|
|
1264
|
+
await mkdir(path.dirname(targetPath), { recursive: true });
|
|
1265
|
+
try {
|
|
1266
|
+
if (recursive) {
|
|
1267
|
+
await cp(sourcePath, targetPath, { recursive: true, force: true });
|
|
1268
|
+
return;
|
|
1269
|
+
}
|
|
1270
|
+
await cp(sourcePath, targetPath, { force: true });
|
|
1271
|
+
} catch (error) {
|
|
1272
|
+
if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
|
|
1273
|
+
return;
|
|
1274
|
+
}
|
|
1275
|
+
throw error;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
async function seedLinkedTestSandbox(sandboxPmPath, sandboxGlobalPath, sourceRoots) {
|
|
1279
|
+
await copyIntoSandboxIfPresent(getSettingsPath(sourceRoots.projectPmRoot), getSettingsPath(sandboxPmPath));
|
|
1280
|
+
await copyIntoSandboxIfPresent(path.join(sourceRoots.projectPmRoot, "extensions"), path.join(sandboxPmPath, "extensions"), true);
|
|
1281
|
+
await copyIntoSandboxIfPresent(getSettingsPath(sourceRoots.globalPmRoot), getSettingsPath(sandboxGlobalPath));
|
|
1282
|
+
await copyIntoSandboxIfPresent(path.join(sourceRoots.globalPmRoot, "extensions"), path.join(sandboxGlobalPath, "extensions"), true);
|
|
1283
|
+
}
|
|
1284
|
+
async function seedLinkedTestTrackerData(sourceRoot, sandboxRoot) {
|
|
1285
|
+
if (!await pathExists(sourceRoot)) {
|
|
1286
|
+
return;
|
|
1287
|
+
}
|
|
1288
|
+
const entries = await readdir(sourceRoot, { withFileTypes: true });
|
|
1289
|
+
for (const entry of entries) {
|
|
1290
|
+
if (LINKED_TEST_TRACKER_DIRS_TO_SKIP.has(entry.name)) {
|
|
1291
|
+
continue;
|
|
1292
|
+
}
|
|
1293
|
+
const sourcePath = path.join(sourceRoot, entry.name);
|
|
1294
|
+
const targetPath = path.join(sandboxRoot, entry.name);
|
|
1295
|
+
if (entry.isDirectory()) {
|
|
1296
|
+
await copyIntoSandboxIfPresent(sourcePath, targetPath, true);
|
|
1297
|
+
continue;
|
|
1298
|
+
}
|
|
1299
|
+
if (entry.isFile()) {
|
|
1300
|
+
await copyIntoSandboxIfPresent(sourcePath, targetPath);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
async function countLinkedTestItemFiles(pmRoot) {
|
|
1305
|
+
if (!await pathExists(pmRoot)) {
|
|
1306
|
+
return 0;
|
|
1307
|
+
}
|
|
1308
|
+
let total = 0;
|
|
1309
|
+
const entries = await readdir(pmRoot, { withFileTypes: true });
|
|
1310
|
+
for (const entry of entries) {
|
|
1311
|
+
if (!entry.isDirectory() || LINKED_TEST_ITEM_COUNT_DIRS_TO_SKIP.has(entry.name)) {
|
|
1312
|
+
continue;
|
|
1313
|
+
}
|
|
1314
|
+
const folderPath = path.join(pmRoot, entry.name);
|
|
1315
|
+
let files;
|
|
1316
|
+
try {
|
|
1317
|
+
files = await readdir(folderPath, { withFileTypes: true });
|
|
1318
|
+
} catch {
|
|
1319
|
+
continue;
|
|
1320
|
+
}
|
|
1321
|
+
for (const file of files) {
|
|
1322
|
+
if (!file.isFile()) {
|
|
1323
|
+
continue;
|
|
1324
|
+
}
|
|
1325
|
+
if (ITEM_FILE_EXTENSIONS.some((extension) => file.name.toLowerCase().endsWith(extension))) {
|
|
1326
|
+
total += 1;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
return total;
|
|
1331
|
+
}
|
|
1332
|
+
function resolveLinkedTestFailureExitCode(execution) {
|
|
1333
|
+
const rawExitCode = typeof execution.exitCode === "number" ? execution.exitCode : 1;
|
|
1334
|
+
if ((execution.timedOut || execution.maxBufferExceeded) && rawExitCode === 0) {
|
|
1335
|
+
return 1;
|
|
1336
|
+
}
|
|
1337
|
+
return rawExitCode;
|
|
1338
|
+
}
|
|
1339
|
+
function splitJsonPathSegments(fieldPath) {
|
|
1340
|
+
const segments = [];
|
|
1341
|
+
const tokens = fieldPath.match(/[^.[\]]+|\[\d+\]/g) ?? [];
|
|
1342
|
+
for (const token of tokens) {
|
|
1343
|
+
if (token.startsWith("[") && token.endsWith("]")) {
|
|
1344
|
+
const parsedIndex = Number.parseInt(token.slice(1, -1), 10);
|
|
1345
|
+
if (!Number.isInteger(parsedIndex) || parsedIndex < 0) {
|
|
1346
|
+
return [];
|
|
1347
|
+
}
|
|
1348
|
+
segments.push(parsedIndex);
|
|
1349
|
+
continue;
|
|
1350
|
+
}
|
|
1351
|
+
segments.push(token);
|
|
1352
|
+
}
|
|
1353
|
+
return segments;
|
|
1354
|
+
}
|
|
1355
|
+
function readJsonPathValue(root, fieldPath) {
|
|
1356
|
+
const normalizedPath = fieldPath.trim();
|
|
1357
|
+
if (normalizedPath.length === 0) {
|
|
1358
|
+
return { found: false, value: void 0 };
|
|
1359
|
+
}
|
|
1360
|
+
const segments = splitJsonPathSegments(normalizedPath);
|
|
1361
|
+
if (segments.length === 0) {
|
|
1362
|
+
return { found: false, value: void 0 };
|
|
1363
|
+
}
|
|
1364
|
+
let current = root;
|
|
1365
|
+
for (const segment of segments) {
|
|
1366
|
+
if (typeof segment === "number") {
|
|
1367
|
+
if (!Array.isArray(current) || segment >= current.length) {
|
|
1368
|
+
return { found: false, value: void 0 };
|
|
1369
|
+
}
|
|
1370
|
+
current = current[segment];
|
|
1371
|
+
continue;
|
|
1372
|
+
}
|
|
1373
|
+
if (typeof current !== "object" || current === null || !(segment in current)) {
|
|
1374
|
+
return { found: false, value: void 0 };
|
|
1375
|
+
}
|
|
1376
|
+
current = current[segment];
|
|
1377
|
+
}
|
|
1378
|
+
return { found: true, value: current };
|
|
1379
|
+
}
|
|
1380
|
+
function parseAssertionLiteral(raw) {
|
|
1381
|
+
const trimmed = raw.trim();
|
|
1382
|
+
if (trimmed === "true") {
|
|
1383
|
+
return true;
|
|
1384
|
+
}
|
|
1385
|
+
if (trimmed === "false") {
|
|
1386
|
+
return false;
|
|
1387
|
+
}
|
|
1388
|
+
if (trimmed === "null") {
|
|
1389
|
+
return null;
|
|
1390
|
+
}
|
|
1391
|
+
const numeric = Number(trimmed);
|
|
1392
|
+
if (trimmed.length > 0 && Number.isFinite(numeric)) {
|
|
1393
|
+
return numeric;
|
|
1394
|
+
}
|
|
1395
|
+
if (trimmed.startsWith("{") && trimmed.endsWith("}") || trimmed.startsWith("[") && trimmed.endsWith("]")) {
|
|
1396
|
+
try {
|
|
1397
|
+
return JSON.parse(trimmed);
|
|
1398
|
+
} catch {
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
return trimmed;
|
|
1402
|
+
}
|
|
1403
|
+
function compareAssertionValues(actual, expected) {
|
|
1404
|
+
if (typeof actual === "object" && actual !== null && typeof expected === "object" && expected !== null) {
|
|
1405
|
+
return stableValueEquals(actual, expected);
|
|
1406
|
+
}
|
|
1407
|
+
return Object.is(actual, expected);
|
|
1408
|
+
}
|
|
1409
|
+
function evaluateLinkedTestAssertions(linkedTest, stdout, stderr) {
|
|
1410
|
+
const failures = [];
|
|
1411
|
+
failures.push(...evaluateContainsAssertions("stdout", stdout, linkedTest.assert_stdout_contains));
|
|
1412
|
+
failures.push(...evaluateRegexAssertions("stdout", stdout, linkedTest.assert_stdout_regex));
|
|
1413
|
+
failures.push(...evaluateContainsAssertions("stderr", stderr, linkedTest.assert_stderr_contains));
|
|
1414
|
+
failures.push(...evaluateRegexAssertions("stderr", stderr, linkedTest.assert_stderr_regex));
|
|
1415
|
+
failures.push(...evaluateStdoutLineCountAssertion(stdout, linkedTest.assert_stdout_min_lines));
|
|
1416
|
+
const jsonEqualsAssertions = linkedTest.assert_json_field_equals ?? {};
|
|
1417
|
+
const jsonGteAssertions = linkedTest.assert_json_field_gte ?? {};
|
|
1418
|
+
const needsJsonAssertions = Object.keys(jsonEqualsAssertions).length > 0 || Object.keys(jsonGteAssertions).length > 0;
|
|
1419
|
+
if (!needsJsonAssertions) {
|
|
1420
|
+
return failures;
|
|
1421
|
+
}
|
|
1422
|
+
let parsedJson;
|
|
1423
|
+
try {
|
|
1424
|
+
parsedJson = JSON.parse(stdout);
|
|
1425
|
+
} catch (error) {
|
|
1426
|
+
failures.push(`stdout is not valid JSON for assert_json_field_* checks: ${error instanceof Error ? error.message : String(error)}`);
|
|
1427
|
+
return failures;
|
|
1428
|
+
}
|
|
1429
|
+
for (const [fieldPath, expectedRaw] of Object.entries(jsonEqualsAssertions)) {
|
|
1430
|
+
const resolved = readJsonPathValue(parsedJson, fieldPath);
|
|
1431
|
+
if (!resolved.found) {
|
|
1432
|
+
failures.push(`assert_json_field_equals missing path "${fieldPath}"`);
|
|
1433
|
+
continue;
|
|
1434
|
+
}
|
|
1435
|
+
const expected = parseAssertionLiteral(expectedRaw);
|
|
1436
|
+
if (!compareAssertionValues(resolved.value, expected)) {
|
|
1437
|
+
failures.push(`assert_json_field_equals mismatch at "${fieldPath}" (expected=${JSON.stringify(expected)} actual=${JSON.stringify(resolved.value)})`);
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
for (const [fieldPath, expectedMinimum] of Object.entries(jsonGteAssertions)) {
|
|
1441
|
+
const resolved = readJsonPathValue(parsedJson, fieldPath);
|
|
1442
|
+
if (!resolved.found) {
|
|
1443
|
+
failures.push(`assert_json_field_gte missing path "${fieldPath}"`);
|
|
1444
|
+
continue;
|
|
1445
|
+
}
|
|
1446
|
+
if (typeof resolved.value !== "number" || !Number.isFinite(resolved.value)) {
|
|
1447
|
+
failures.push(`assert_json_field_gte path "${fieldPath}" resolved to non-numeric value`);
|
|
1448
|
+
continue;
|
|
1449
|
+
}
|
|
1450
|
+
if (resolved.value < expectedMinimum) {
|
|
1451
|
+
failures.push(`assert_json_field_gte failed at "${fieldPath}" (expected >= ${expectedMinimum}, actual ${resolved.value})`);
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
return failures;
|
|
1455
|
+
}
|
|
1456
|
+
function evaluateContainsAssertions(streamName, output, expectedValues) {
|
|
1457
|
+
const failures = [];
|
|
1458
|
+
for (const expected of expectedValues ?? []) {
|
|
1459
|
+
if (!output.includes(expected)) {
|
|
1460
|
+
failures.push(`${streamName} missing required text: "${expected}"`);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
return failures;
|
|
1464
|
+
}
|
|
1465
|
+
function evaluateRegexAssertions(streamName, output, patterns) {
|
|
1466
|
+
const failures = [];
|
|
1467
|
+
for (const pattern of patterns ?? []) {
|
|
1468
|
+
try {
|
|
1469
|
+
const regex = new RegExp(pattern, "m");
|
|
1470
|
+
if (!regex.test(output)) {
|
|
1471
|
+
failures.push(`${streamName} failed regex assertion: /${pattern}/m`);
|
|
1472
|
+
}
|
|
1473
|
+
} catch (error) {
|
|
1474
|
+
failures.push(`${streamName} regex assertion is invalid: /${pattern}/ (${error instanceof Error ? error.message : String(error)})`);
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
return failures;
|
|
1478
|
+
}
|
|
1479
|
+
function evaluateStdoutLineCountAssertion(stdout, minimum) {
|
|
1480
|
+
if (typeof minimum !== "number") {
|
|
1481
|
+
return [];
|
|
1482
|
+
}
|
|
1483
|
+
const lineCount = stdout.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0).length;
|
|
1484
|
+
return lineCount < minimum ? [`stdout line count ${lineCount} is below required minimum ${minimum}`] : [];
|
|
1485
|
+
}
|
|
1486
|
+
var EMPTY_LINKED_TEST_RUN_PATTERNS = [
|
|
1487
|
+
{ code: "no_projects_matched_filters", regex: /\bNo projects matched the filters\b/i },
|
|
1488
|
+
{ code: "no_test_files_found", regex: /\bNo test files found\b/i },
|
|
1489
|
+
{ code: "no_tests_found", regex: /\bNo tests found\b/i },
|
|
1490
|
+
{ code: "no_matching_tests", regex: /\bNo matching tests?\b/i },
|
|
1491
|
+
{ code: "collected_zero_items", regex: /\bcollected 0 items?\b/i }
|
|
1492
|
+
];
|
|
1493
|
+
function detectEmptyLinkedTestRun(stdout, stderr) {
|
|
1494
|
+
const combined = `${stdout}
|
|
1495
|
+
${stderr}`;
|
|
1496
|
+
for (const pattern of EMPTY_LINKED_TEST_RUN_PATTERNS) {
|
|
1497
|
+
if (pattern.regex.test(combined)) {
|
|
1498
|
+
return pattern.code;
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
return null;
|
|
1502
|
+
}
|
|
1503
|
+
function createLinkedTestSandboxLayout(sandboxRoot) {
|
|
1504
|
+
return {
|
|
1505
|
+
root: sandboxRoot,
|
|
1506
|
+
schemaProjectPmPath: path.join(sandboxRoot, "schema", "project", ".agents", "pm"),
|
|
1507
|
+
schemaGlobalPmPath: path.join(sandboxRoot, "schema", "global"),
|
|
1508
|
+
trackerProjectPmPath: path.join(sandboxRoot, "tracker", "project", ".agents", "pm"),
|
|
1509
|
+
trackerGlobalPmPath: path.join(sandboxRoot, "tracker", "global")
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
async function initializeLinkedTestSandboxes(layout) {
|
|
1513
|
+
await runInit(void 0, { path: layout.schemaProjectPmPath });
|
|
1514
|
+
await runInit(void 0, { path: layout.schemaGlobalPmPath });
|
|
1515
|
+
await runInit(void 0, { path: layout.trackerProjectPmPath });
|
|
1516
|
+
await runInit(void 0, { path: layout.trackerGlobalPmPath });
|
|
1517
|
+
}
|
|
1518
|
+
async function seedLinkedTestSandboxesFromSource(layout, sourceRoots) {
|
|
1519
|
+
if (!sourceRoots) {
|
|
1520
|
+
return;
|
|
1521
|
+
}
|
|
1522
|
+
await seedLinkedTestSandbox(layout.schemaProjectPmPath, layout.schemaGlobalPmPath, sourceRoots);
|
|
1523
|
+
await seedLinkedTestSandbox(layout.trackerProjectPmPath, layout.trackerGlobalPmPath, sourceRoots);
|
|
1524
|
+
await seedLinkedTestTrackerData(sourceRoots.projectPmRoot, layout.trackerProjectPmPath);
|
|
1525
|
+
await seedLinkedTestTrackerData(sourceRoots.globalPmRoot, layout.trackerGlobalPmPath);
|
|
1526
|
+
}
|
|
1527
|
+
async function countLinkedTestSandboxItems(layout, sourceRoots) {
|
|
1528
|
+
return {
|
|
1529
|
+
sourceProjectItemCount: sourceRoots ? await countLinkedTestItemFiles(sourceRoots.projectPmRoot) : 0,
|
|
1530
|
+
sourceGlobalItemCount: sourceRoots ? await countLinkedTestItemFiles(sourceRoots.globalPmRoot) : 0,
|
|
1531
|
+
schemaProjectItemCount: await countLinkedTestItemFiles(layout.schemaProjectPmPath),
|
|
1532
|
+
schemaGlobalItemCount: await countLinkedTestItemFiles(layout.schemaGlobalPmPath),
|
|
1533
|
+
trackerProjectItemCount: await countLinkedTestItemFiles(layout.trackerProjectPmPath),
|
|
1534
|
+
trackerGlobalItemCount: await countLinkedTestItemFiles(layout.trackerGlobalPmPath)
|
|
1535
|
+
};
|
|
1536
|
+
}
|
|
1537
|
+
function buildLinkedTestExecutionContext(params) {
|
|
1538
|
+
const trackerMode = params.effectivePmContextMode === "tracker";
|
|
1539
|
+
const selectedSandboxProjectPmPath = trackerMode ? params.layout.trackerProjectPmPath : params.layout.schemaProjectPmPath;
|
|
1540
|
+
const selectedSandboxGlobalPmPath = trackerMode ? params.layout.trackerGlobalPmPath : params.layout.schemaGlobalPmPath;
|
|
1541
|
+
const selectedSandboxProjectItemCount = trackerMode ? params.counts.trackerProjectItemCount : params.counts.schemaProjectItemCount;
|
|
1542
|
+
const selectedSandboxGlobalItemCount = trackerMode ? params.counts.trackerGlobalItemCount : params.counts.schemaGlobalItemCount;
|
|
1543
|
+
return {
|
|
1544
|
+
requested_pm_context_mode: params.requestedPmContextMode,
|
|
1545
|
+
pm_context_mode: params.effectivePmContextMode,
|
|
1546
|
+
auto_pm_context_applied: params.autoPmContextApplied,
|
|
1547
|
+
is_pm_command: params.isPmCommand,
|
|
1548
|
+
is_pm_tracker_read_command: params.isPmTrackerReadCommand,
|
|
1549
|
+
source_project_pm_path: params.sourceRoots?.projectPmRoot ?? "",
|
|
1550
|
+
sandbox_project_pm_path: selectedSandboxProjectPmPath,
|
|
1551
|
+
source_global_pm_path: params.sourceRoots?.globalPmRoot ?? "",
|
|
1552
|
+
sandbox_global_pm_path: selectedSandboxGlobalPmPath,
|
|
1553
|
+
source_project_item_count: params.counts.sourceProjectItemCount,
|
|
1554
|
+
sandbox_project_item_count: selectedSandboxProjectItemCount,
|
|
1555
|
+
source_global_item_count: params.counts.sourceGlobalItemCount,
|
|
1556
|
+
sandbox_global_item_count: selectedSandboxGlobalItemCount,
|
|
1557
|
+
mismatch_detected: params.isPmCommand && params.counts.sourceProjectItemCount !== selectedSandboxProjectItemCount,
|
|
1558
|
+
project_extensions_seeded: Boolean(params.sourceRoots),
|
|
1559
|
+
global_extensions_seeded: Boolean(params.sourceRoots)
|
|
1560
|
+
};
|
|
1561
|
+
}
|
|
1562
|
+
function resolveLinkedTestCommandContext(params) {
|
|
1563
|
+
const linkedOverridePmContextMode = typeof params.linkedTest.pm_context_mode === "string" && params.linkedTest.pm_context_mode.trim().length > 0 ? parsePmContextMode(params.linkedTest.pm_context_mode) : void 0;
|
|
1564
|
+
const command = typeof params.linkedTest.command === "string" && params.linkedTest.command.length > 0 ? params.linkedTest.command : void 0;
|
|
1565
|
+
const isPmCommand = command ? commandInvokesPmCli(command) : false;
|
|
1566
|
+
const isPmTrackerReadCommand = isPmCommand && command ? commandInvokesPmTrackerReadCommand(command) : false;
|
|
1567
|
+
const autoPmContextApplied = params.options?.autoPmContext === true && isPmTrackerReadCommand;
|
|
1568
|
+
const requestedPmContextMode = autoPmContextApplied ? "auto" : resolveLinkedTestRequestedContextMode(params.linkedTest, params.runLevelPmContextMode, params.options?.overrideLinkedPmContext === true);
|
|
1569
|
+
const effectivePmContextMode = resolveLinkedTestEffectiveContextMode(requestedPmContextMode, isPmTrackerReadCommand);
|
|
1570
|
+
return {
|
|
1571
|
+
linkedOverridePmContextMode,
|
|
1572
|
+
executionContext: buildLinkedTestExecutionContext({
|
|
1573
|
+
layout: params.layout,
|
|
1574
|
+
counts: params.counts,
|
|
1575
|
+
sourceRoots: params.sourceRoots,
|
|
1576
|
+
isPmCommand,
|
|
1577
|
+
isPmTrackerReadCommand,
|
|
1578
|
+
requestedPmContextMode,
|
|
1579
|
+
effectivePmContextMode,
|
|
1580
|
+
autoPmContextApplied
|
|
1581
|
+
})
|
|
1582
|
+
};
|
|
1583
|
+
}
|
|
1584
|
+
function buildLinkedTestSkippedResult(linkedTest, executionContext, error) {
|
|
1585
|
+
return {
|
|
1586
|
+
command: linkedTest.command,
|
|
1587
|
+
path: linkedTest.path,
|
|
1588
|
+
status: "skipped",
|
|
1589
|
+
execution_context: executionContext,
|
|
1590
|
+
error
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1593
|
+
function buildLinkedTestAssertionFailureResult(linkedTest, executionContext, error, output) {
|
|
1594
|
+
return {
|
|
1595
|
+
command: linkedTest.command,
|
|
1596
|
+
path: linkedTest.path,
|
|
1597
|
+
status: "failed",
|
|
1598
|
+
exit_code: 1,
|
|
1599
|
+
failure_category: "assertion_failure",
|
|
1600
|
+
execution_context: executionContext,
|
|
1601
|
+
...output ? { stdout: output.stdout, stderr: output.stderr } : {},
|
|
1602
|
+
error
|
|
1603
|
+
};
|
|
1604
|
+
}
|
|
1605
|
+
function resolveLinkedTestPreflightResult(params) {
|
|
1606
|
+
if (!params.linkedTest.command) {
|
|
1607
|
+
return buildLinkedTestSkippedResult(params.linkedTest, params.executionContext, "No command configured for this linked test.");
|
|
1608
|
+
}
|
|
1609
|
+
const runtimeSafetySkipReason = getRuntimeSafetySkipReason(params.linkedTest.command);
|
|
1610
|
+
if (runtimeSafetySkipReason) {
|
|
1611
|
+
return buildLinkedTestSkippedResult(params.linkedTest, params.executionContext, runtimeSafetySkipReason);
|
|
1612
|
+
}
|
|
1613
|
+
const failOnMismatchByDefault = params.executionContext.pm_context_mode === "schema" && params.executionContext.is_pm_tracker_read_command && params.executionContext.mismatch_detected;
|
|
1614
|
+
const failOnMismatchByFlag = params.options?.failOnContextMismatch === true && params.executionContext.is_pm_command && params.executionContext.mismatch_detected;
|
|
1615
|
+
if (failOnMismatchByDefault || failOnMismatchByFlag) {
|
|
1616
|
+
const mismatchHint = buildPmContextMismatchHint({
|
|
1617
|
+
executionContext: params.executionContext,
|
|
1618
|
+
runLevelPmContextMode: params.runLevelPmContextMode,
|
|
1619
|
+
linkedOverridePmContextMode: params.linkedOverridePmContextMode
|
|
1620
|
+
});
|
|
1621
|
+
const mismatchPrefix = params.options?.checkContext === true ? "Linked test preflight PM context mismatch detected" : "Linked test PM context mismatch detected";
|
|
1622
|
+
return buildLinkedTestAssertionFailureResult(params.linkedTest, params.executionContext, `${mismatchPrefix} (source_project_items=${params.executionContext.source_project_item_count}, sandbox_project_items=${params.executionContext.sandbox_project_item_count}).${mismatchHint}`);
|
|
1623
|
+
}
|
|
1624
|
+
if (params.options?.requireAssertionsForPm === true && params.executionContext.is_pm_command && !hasLinkedTestAssertions(params.linkedTest)) {
|
|
1625
|
+
return buildLinkedTestAssertionFailureResult(params.linkedTest, params.executionContext, "Linked PM command requires assertions when --require-assertions-for-pm is enabled.");
|
|
1626
|
+
}
|
|
1627
|
+
return null;
|
|
1628
|
+
}
|
|
1629
|
+
function buildLinkedTestExecutionEnv(params) {
|
|
1630
|
+
const effectiveDirectives = resolveEffectiveLinkedTestDirectives(params.runtimeDirectives, params.linkedTest);
|
|
1631
|
+
const executionEnv = { ...process.env };
|
|
1632
|
+
applyEnvDirectiveStage(executionEnv, params.runtimeDirectives);
|
|
1633
|
+
applyEnvDirectiveStage(executionEnv, {
|
|
1634
|
+
env_set: params.linkedTest.env_set ?? {},
|
|
1635
|
+
env_clear: params.linkedTest.env_clear ?? []
|
|
1636
|
+
});
|
|
1637
|
+
if (effectiveDirectives.shared_host_safe) {
|
|
1638
|
+
applySharedHostSafeDefaults(executionEnv);
|
|
1639
|
+
}
|
|
1640
|
+
executionEnv.FORCE_COLOR = "0";
|
|
1641
|
+
executionEnv.PM_PATH = params.executionContext.sandbox_project_pm_path;
|
|
1642
|
+
executionEnv.PM_GLOBAL_PATH = params.executionContext.sandbox_global_pm_path;
|
|
1643
|
+
return executionEnv;
|
|
1644
|
+
}
|
|
1645
|
+
function buildLinkedTestPassedResult(linkedTest, executionContext, execution) {
|
|
1646
|
+
return {
|
|
1647
|
+
command: linkedTest.command,
|
|
1648
|
+
path: linkedTest.path,
|
|
1649
|
+
status: "passed",
|
|
1650
|
+
exit_code: 0,
|
|
1651
|
+
execution_context: executionContext,
|
|
1652
|
+
stdout: execution.stdout,
|
|
1653
|
+
stderr: execution.stderr
|
|
1654
|
+
};
|
|
1655
|
+
}
|
|
1656
|
+
function buildLinkedTestEmptyRunResult(params) {
|
|
1657
|
+
return {
|
|
1658
|
+
command: params.linkedTest.command,
|
|
1659
|
+
path: params.linkedTest.path,
|
|
1660
|
+
status: "failed",
|
|
1661
|
+
exit_code: 1,
|
|
1662
|
+
failure_category: "empty_run",
|
|
1663
|
+
execution_context: params.executionContext,
|
|
1664
|
+
stdout: params.execution.stdout,
|
|
1665
|
+
stderr: params.execution.stderr,
|
|
1666
|
+
error: `Linked test reported an empty test run (${params.emptyRunSignal}) while --fail-on-empty-test-run is enabled. Update test selection or disable --fail-on-empty-test-run for this run.`
|
|
1667
|
+
};
|
|
1668
|
+
}
|
|
1669
|
+
function buildLinkedTestCommandFailureResult(params) {
|
|
1670
|
+
return {
|
|
1671
|
+
command: params.linkedTest.command,
|
|
1672
|
+
path: params.linkedTest.path,
|
|
1673
|
+
status: "failed",
|
|
1674
|
+
exit_code: resolveLinkedTestFailureExitCode(params.execution),
|
|
1675
|
+
failure_category: classifyLinkedTestFailure(params.execution),
|
|
1676
|
+
execution_context: params.executionContext,
|
|
1677
|
+
stdout: params.execution.stdout,
|
|
1678
|
+
stderr: params.execution.stderr,
|
|
1679
|
+
error: formatLinkedTestExecutionError(params.execution, params.timeoutMs)
|
|
1680
|
+
};
|
|
1681
|
+
}
|
|
1682
|
+
function buildLinkedTestPassedExecutionResult(params) {
|
|
1683
|
+
if (params.options?.failOnEmptyTestRun === true) {
|
|
1684
|
+
const emptyRunSignal = detectEmptyLinkedTestRun(params.execution.stdout, params.execution.stderr);
|
|
1685
|
+
if (emptyRunSignal) {
|
|
1686
|
+
return buildLinkedTestEmptyRunResult({ ...params, emptyRunSignal });
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
const assertionFailures = evaluateLinkedTestAssertions(params.linkedTest, params.execution.stdout, params.execution.stderr);
|
|
1690
|
+
if (assertionFailures.length > 0) {
|
|
1691
|
+
return buildLinkedTestAssertionFailureResult(params.linkedTest, params.executionContext, `Linked test assertion(s) failed: ${assertionFailures.join("; ")}`, params.execution);
|
|
1692
|
+
}
|
|
1693
|
+
return buildLinkedTestPassedResult(params.linkedTest, params.executionContext, params.execution);
|
|
1694
|
+
}
|
|
1695
|
+
async function runSingleLinkedTest(params) {
|
|
1696
|
+
const command = params.linkedTest.command ?? "";
|
|
1697
|
+
const timeoutMs = (params.linkedTest.timeout_seconds ?? params.defaultTimeoutSeconds ?? 120) * 1e3;
|
|
1698
|
+
const execution = await runLinkedTestCommand(command, timeoutMs, buildLinkedTestExecutionEnv(params), {
|
|
1699
|
+
index: params.index + 1,
|
|
1700
|
+
total: params.total,
|
|
1701
|
+
timeoutMs,
|
|
1702
|
+
command
|
|
1703
|
+
}, params.progressMode);
|
|
1704
|
+
const passed = execution.exitCode === 0 && !execution.timedOut && !execution.maxBufferExceeded;
|
|
1705
|
+
return passed ? buildLinkedTestPassedExecutionResult({ ...params, execution }) : buildLinkedTestCommandFailureResult({ ...params, execution, timeoutMs });
|
|
1706
|
+
}
|
|
1707
|
+
async function runLinkedTests(tests, defaultTimeoutSeconds, options) {
|
|
1708
|
+
const results = [];
|
|
1709
|
+
const sandboxRoot = await mkdtemp(path.join(tmpdir(), "pm-linked-test-"));
|
|
1710
|
+
const layout = createLinkedTestSandboxLayout(sandboxRoot);
|
|
1711
|
+
const runLevelPmContextMode = parsePmContextMode(options?.pmContext);
|
|
1712
|
+
const progressMode = options?.progress === true ? "always" : "auto";
|
|
1713
|
+
const runtimeDirectives = resolveRuntimeDirectives(options?.envSet, options?.envClear, options?.sharedHostSafe);
|
|
1714
|
+
const sourceRoots = options?.sourceRoots;
|
|
1715
|
+
try {
|
|
1716
|
+
await initializeLinkedTestSandboxes(layout);
|
|
1717
|
+
await seedLinkedTestSandboxesFromSource(layout, sourceRoots);
|
|
1718
|
+
const counts = await countLinkedTestSandboxItems(layout, sourceRoots);
|
|
1719
|
+
for (let index = 0; index < tests.length; index += 1) {
|
|
1720
|
+
const linkedTest = tests[index];
|
|
1721
|
+
const commandContext = resolveLinkedTestCommandContext({
|
|
1722
|
+
linkedTest,
|
|
1723
|
+
layout,
|
|
1724
|
+
counts,
|
|
1725
|
+
sourceRoots,
|
|
1726
|
+
runLevelPmContextMode,
|
|
1727
|
+
options
|
|
1728
|
+
});
|
|
1729
|
+
const preflightResult = resolveLinkedTestPreflightResult({
|
|
1730
|
+
linkedTest,
|
|
1731
|
+
executionContext: commandContext.executionContext,
|
|
1732
|
+
runLevelPmContextMode,
|
|
1733
|
+
linkedOverridePmContextMode: commandContext.linkedOverridePmContextMode,
|
|
1734
|
+
options
|
|
1735
|
+
});
|
|
1736
|
+
if (preflightResult) {
|
|
1737
|
+
results.push(preflightResult);
|
|
1738
|
+
continue;
|
|
1739
|
+
}
|
|
1740
|
+
results.push(await runSingleLinkedTest({
|
|
1741
|
+
linkedTest,
|
|
1742
|
+
index,
|
|
1743
|
+
total: tests.length,
|
|
1744
|
+
defaultTimeoutSeconds,
|
|
1745
|
+
runtimeDirectives,
|
|
1746
|
+
progressMode,
|
|
1747
|
+
executionContext: commandContext.executionContext,
|
|
1748
|
+
options
|
|
1749
|
+
}));
|
|
1750
|
+
}
|
|
1751
|
+
} finally {
|
|
1752
|
+
await rm(layout.root, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });
|
|
1753
|
+
}
|
|
1754
|
+
return results;
|
|
1755
|
+
}
|
|
1756
|
+
function hasTestRuntimeDirectiveFlags(options) {
|
|
1757
|
+
return (options.envSet?.length ?? 0) > 0 || (options.envClear?.length ?? 0) > 0 || options.sharedHostSafe === true || options.pmContext !== void 0 || options.overrideLinkedPmContext === true || options.failOnContextMismatch === true || options.failOnSkipped === true || options.failOnEmptyTestRun === true || options.requireAssertionsForPm === true || options.checkContext === true || options.autoPmContext === true;
|
|
1758
|
+
}
|
|
1759
|
+
function assertTestRunFlagUsage(options) {
|
|
1760
|
+
if (hasTestRuntimeDirectiveFlags(options) && options.run !== true) {
|
|
1761
|
+
throw new PmCliError("--env-set, --env-clear, --shared-host-safe, --pm-context, --override-linked-pm-context, --fail-on-context-mismatch, --fail-on-skipped, --fail-on-empty-test-run, --require-assertions-for-pm, --check-context, and --auto-pm-context require --run", EXIT_CODE.USAGE);
|
|
1762
|
+
}
|
|
1763
|
+
const hasSelectorFlags = options.match !== void 0 || options.onlyIndex !== void 0 || options.onlyLast === true;
|
|
1764
|
+
if (hasSelectorFlags && options.run !== true) {
|
|
1765
|
+
throw new PmCliError("--match, --only-index, and --only-last require --run", EXIT_CODE.USAGE);
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
async function resolveLinkedTestItem(params) {
|
|
1769
|
+
const { id, options, pmRoot, settings, typeToFolder, adds, removes } = params;
|
|
1770
|
+
if (adds.length === 0 && removes.length === 0) {
|
|
1771
|
+
const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeToFolder);
|
|
1772
|
+
if (!located) {
|
|
1773
|
+
throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);
|
|
1774
|
+
}
|
|
1775
|
+
const loaded = await readLocatedItem(located, { schema: settings.schema });
|
|
1776
|
+
return { itemId: located.id, tests: loaded.document.metadata.tests ?? [], changed: false };
|
|
1777
|
+
}
|
|
1778
|
+
const result = await mutateItem({
|
|
1779
|
+
pmRoot,
|
|
1780
|
+
settings,
|
|
1781
|
+
id,
|
|
1782
|
+
op: "tests_add",
|
|
1783
|
+
author: resolveAuthor(options.author, settings.author_default),
|
|
1784
|
+
message: options.message,
|
|
1785
|
+
force: options.force,
|
|
1786
|
+
skipNoop: true,
|
|
1787
|
+
mutate(document) {
|
|
1788
|
+
const previous = document.metadata.tests ?? [];
|
|
1789
|
+
const next = [...previous];
|
|
1790
|
+
for (const add of adds) {
|
|
1791
|
+
const exists = next.some((entry) => entry.command === add.command && entry.path === add.path && entry.scope === add.scope && entry.pm_context_mode === add.pm_context_mode);
|
|
1792
|
+
if (!exists) {
|
|
1793
|
+
next.push(add);
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
if (removes.length > 0) {
|
|
1797
|
+
for (let i = next.length - 1; i >= 0; i -= 1) {
|
|
1798
|
+
const entry = next[i];
|
|
1799
|
+
if (removes.includes(entry.path ?? "") || removes.includes(entry.command ?? "")) {
|
|
1800
|
+
next.splice(i, 1);
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
document.metadata.tests = next;
|
|
1805
|
+
return { changedFields: stableValueEquals(previous, next) ? [] : ["tests"] };
|
|
1806
|
+
}
|
|
1807
|
+
});
|
|
1808
|
+
return {
|
|
1809
|
+
itemId: result.item.id,
|
|
1810
|
+
tests: result.item.tests ?? [],
|
|
1811
|
+
changed: result.changedFields.length > 0
|
|
1812
|
+
};
|
|
1813
|
+
}
|
|
1814
|
+
function resolveTestRunOptions(options, tests) {
|
|
1815
|
+
assertTestRunFlagUsage(options);
|
|
1816
|
+
const selectorInput = {
|
|
1817
|
+
match: options.match,
|
|
1818
|
+
onlyIndex: options.onlyIndex === void 0 ? void 0 : parseOnlyIndexValue(options.onlyIndex),
|
|
1819
|
+
onlyLast: options.onlyLast
|
|
1820
|
+
};
|
|
1821
|
+
const runSelection = options.run === true ? resolveLinkedTestRunSelection(tests, selectorInput) : void 0;
|
|
1822
|
+
return {
|
|
1823
|
+
defaultTimeoutSeconds: options.timeout === void 0 ? void 0 : parseOptionalNumber(options.timeout, "timeout"),
|
|
1824
|
+
pmContextMode: parsePmContextMode(options.pmContext),
|
|
1825
|
+
runSelection,
|
|
1826
|
+
testsToRun: runSelection?.selected ?? tests
|
|
1827
|
+
};
|
|
1828
|
+
}
|
|
1829
|
+
async function executeSelectedLinkedTests(params) {
|
|
1830
|
+
const { options, runOptions, pmRoot } = params;
|
|
1831
|
+
if (options.run !== true) {
|
|
1832
|
+
return [];
|
|
1833
|
+
}
|
|
1834
|
+
return await runLinkedTests(runOptions.testsToRun, runOptions.defaultTimeoutSeconds, {
|
|
1835
|
+
progress: options.progress,
|
|
1836
|
+
envSet: options.envSet,
|
|
1837
|
+
envClear: options.envClear,
|
|
1838
|
+
sharedHostSafe: options.sharedHostSafe,
|
|
1839
|
+
pmContext: runOptions.pmContextMode,
|
|
1840
|
+
overrideLinkedPmContext: options.overrideLinkedPmContext,
|
|
1841
|
+
failOnContextMismatch: options.failOnContextMismatch,
|
|
1842
|
+
failOnEmptyTestRun: options.failOnEmptyTestRun,
|
|
1843
|
+
requireAssertionsForPm: options.requireAssertionsForPm,
|
|
1844
|
+
checkContext: options.checkContext,
|
|
1845
|
+
autoPmContext: options.autoPmContext,
|
|
1846
|
+
sourceRoots: {
|
|
1847
|
+
projectPmRoot: pmRoot,
|
|
1848
|
+
globalPmRoot: resolveGlobalPmRoot(process.cwd())
|
|
1849
|
+
}
|
|
1850
|
+
});
|
|
1851
|
+
}
|
|
1852
|
+
function buildTestWarnings(options, runSelection, runResults) {
|
|
1853
|
+
const warnings = [];
|
|
1854
|
+
if (runSelection && runSelection.selector !== null) {
|
|
1855
|
+
warnings.push(`linked_test_selection:${runSelection.selector}=${runSelection.requested};selected=${runSelection.selected_count};skipped=${runSelection.skipped_count};indexes=${runSelection.selected_indexes.join(",")}`);
|
|
1856
|
+
}
|
|
1857
|
+
if (options.run === true && options.checkContext === true) {
|
|
1858
|
+
const preflight = summarizeContextPreflight(runResults);
|
|
1859
|
+
warnings.push(`context_preflight:checked_pm_commands=${preflight.checked_pm_commands};tracker_read_commands=${preflight.tracker_read_commands};mismatches=${preflight.mismatches};auto_remediated=${preflight.auto_remediated}`);
|
|
1860
|
+
}
|
|
1861
|
+
return warnings;
|
|
1862
|
+
}
|
|
1863
|
+
async function recordTestRunSummary(params) {
|
|
1864
|
+
const { options, pmRoot, settings, itemId, runStartedAt, runResults, failOnSkippedTriggered, warnings } = params;
|
|
1865
|
+
if (options.run !== true || !runStartedAt || settings.testing.record_results_to_items !== true) {
|
|
1866
|
+
return;
|
|
1867
|
+
}
|
|
1868
|
+
const summary = summarizeRunResultStatuses(runResults);
|
|
1869
|
+
const trackedRunId = resolveTrackedRunId("test");
|
|
1870
|
+
const attemptRaw = process.env.PM_BACKGROUND_TEST_RUN_ATTEMPT?.trim();
|
|
1871
|
+
const parsedAttempt = attemptRaw ? Number.parseInt(attemptRaw, 10) : Number.NaN;
|
|
1872
|
+
const resumedFrom = process.env.PM_BACKGROUND_TEST_RUN_RESUMED_FROM?.trim();
|
|
1873
|
+
try {
|
|
1874
|
+
await appendTrackedTestRunSummary({
|
|
1875
|
+
pmRoot,
|
|
1876
|
+
settings,
|
|
1877
|
+
itemId,
|
|
1878
|
+
author: resolveAuthor(options.author, settings.author_default),
|
|
1879
|
+
message: `Track test run summary (${trackedRunId})`,
|
|
1880
|
+
entry: {
|
|
1881
|
+
run_id: trackedRunId,
|
|
1882
|
+
kind: "test",
|
|
1883
|
+
status: summary.failed > 0 || failOnSkippedTriggered === true ? "failed" : "passed",
|
|
1884
|
+
started_at: runStartedAt,
|
|
1885
|
+
finished_at: nowIso(),
|
|
1886
|
+
recorded_at: nowIso(),
|
|
1887
|
+
attempt: Number.isFinite(parsedAttempt) && parsedAttempt >= 1 ? parsedAttempt : void 0,
|
|
1888
|
+
resumed_from: resumedFrom && resumedFrom.length > 0 ? resumedFrom : void 0,
|
|
1889
|
+
passed: summary.passed,
|
|
1890
|
+
failed: summary.failed,
|
|
1891
|
+
skipped: summary.skipped,
|
|
1892
|
+
fail_on_skipped_triggered: failOnSkippedTriggered ? true : void 0
|
|
1893
|
+
}
|
|
1894
|
+
});
|
|
1895
|
+
} catch (error) {
|
|
1896
|
+
warnings.push(`test_result_tracking_failed:${itemId}:${error instanceof Error ? error.message : String(error)}`);
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
async function runTest(id, options, global2) {
|
|
1900
|
+
const stdinResolver = createStdinTokenResolver();
|
|
1901
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
1902
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
1903
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
1904
|
+
}
|
|
1905
|
+
const settings = await readSettings(pmRoot);
|
|
1906
|
+
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
1907
|
+
const resolvedAdds = await stdinResolver.resolveList(options.add, "--add");
|
|
1908
|
+
const resolvedAddJsons = await stdinResolver.resolveList(options.addJson, "--add-json");
|
|
1909
|
+
const resolvedRemoves = await stdinResolver.resolveList(options.remove, "--remove");
|
|
1910
|
+
const adds = [...parseAddEntries(resolvedAdds), ...parseAddJsonEntries(resolvedAddJsons)];
|
|
1911
|
+
const removes = parseRemoveEntries(resolvedRemoves);
|
|
1912
|
+
const item = await resolveLinkedTestItem({
|
|
1913
|
+
id,
|
|
1914
|
+
options,
|
|
1915
|
+
pmRoot,
|
|
1916
|
+
settings,
|
|
1917
|
+
typeToFolder: typeRegistry.type_to_folder,
|
|
1918
|
+
adds,
|
|
1919
|
+
removes
|
|
1920
|
+
});
|
|
1921
|
+
const runOptions = resolveTestRunOptions(options, item.tests);
|
|
1922
|
+
const runStartedAt = options.run === true ? nowIso() : void 0;
|
|
1923
|
+
const runResults = await executeSelectedLinkedTests({ options, runOptions, pmRoot });
|
|
1924
|
+
const failureCategories = countFailureCategories(runResults);
|
|
1925
|
+
const failOnSkippedTriggered = options.run === true && options.failOnSkipped === true && runResults.some((entry) => entry.status === "skipped");
|
|
1926
|
+
const warnings = buildTestWarnings(options, runOptions.runSelection, runResults);
|
|
1927
|
+
await recordTestRunSummary({ options, pmRoot, settings, itemId: item.itemId, runStartedAt, runResults, failOnSkippedTriggered, warnings });
|
|
1928
|
+
return {
|
|
1929
|
+
ok: runResults.every((entry) => entry.status !== "failed") && failOnSkippedTriggered !== true,
|
|
1930
|
+
id: item.itemId,
|
|
1931
|
+
tests: item.tests,
|
|
1932
|
+
run_results: runResults,
|
|
1933
|
+
failure_categories: failureCategories,
|
|
1934
|
+
selection: runOptions.runSelection ? {
|
|
1935
|
+
selector: runOptions.runSelection.selector,
|
|
1936
|
+
requested: runOptions.runSelection.requested,
|
|
1937
|
+
selected_indexes: runOptions.runSelection.selected_indexes,
|
|
1938
|
+
selected_count: runOptions.runSelection.selected_count,
|
|
1939
|
+
skipped_count: runOptions.runSelection.skipped_count
|
|
1940
|
+
} : void 0,
|
|
1941
|
+
fail_on_skipped_triggered: failOnSkippedTriggered ? true : void 0,
|
|
1942
|
+
warnings: warnings.length > 0 ? warnings : void 0,
|
|
1943
|
+
changed: item.changed,
|
|
1944
|
+
count: item.tests.length
|
|
1945
|
+
};
|
|
1946
|
+
}
|
|
1947
|
+
var _testOnlyTestCommand = {
|
|
1948
|
+
buildPmContextMismatchHint,
|
|
1949
|
+
commandInvokesPmCli,
|
|
1950
|
+
commandInvokesPmTrackerReadCommand,
|
|
1951
|
+
copyIntoSandboxIfPresent,
|
|
1952
|
+
countLinkedTestItemFiles,
|
|
1953
|
+
ensureScope,
|
|
1954
|
+
evaluateLinkedTestAssertions,
|
|
1955
|
+
extractPmInvocationArgsFromSegment,
|
|
1956
|
+
firstDirectTestRunnerSubcommand,
|
|
1957
|
+
hasLinkedTestAssertions,
|
|
1958
|
+
parseAddJsonEntries,
|
|
1959
|
+
parsePmContextMode,
|
|
1960
|
+
readJsonPathValue,
|
|
1961
|
+
resolveAuthor,
|
|
1962
|
+
resolveDirectRunnerSubcommand,
|
|
1963
|
+
resolveLinkedTestEffectiveContextMode,
|
|
1964
|
+
resolveLinkedTestFailureExitCode,
|
|
1965
|
+
resolveLinkedTestRequestedContextMode,
|
|
1966
|
+
resolveTrackedRunId,
|
|
1967
|
+
runLinkedTestCommand,
|
|
1968
|
+
seedLinkedTestSandbox,
|
|
1969
|
+
seedLinkedTestTrackerData,
|
|
1970
|
+
splitJsonPathSegments,
|
|
1971
|
+
summarizeRunResultStatuses
|
|
1972
|
+
};
|
|
1973
|
+
|
|
1974
|
+
export {
|
|
1975
|
+
appendTrackedTestRunSummary,
|
|
1976
|
+
summarizeContextPreflight,
|
|
1977
|
+
extractReferencedPmItemIdsFromCommand,
|
|
1978
|
+
classifyLinkedTestFailure,
|
|
1979
|
+
countFailureCategories,
|
|
1980
|
+
resolveLinkedTestFailureExitCode,
|
|
1981
|
+
runLinkedTests,
|
|
1982
|
+
runTest,
|
|
1983
|
+
_testOnlyTestCommand
|
|
1984
|
+
};
|
|
1985
|
+
//# sourceMappingURL=chunk-C5JBZRPU.js.map
|