@unbrained/pm-cli 2026.6.6 → 2026.6.7
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 +37 -0
- package/README.md +5 -1
- package/dist/cli/commander-usage.js +74 -4
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/aggregate.d.ts +8 -0
- package/dist/cli/commands/aggregate.js +84 -7
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +10 -3
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.js +13 -10
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.d.ts +1 -1
- package/dist/cli/commands/close.js +20 -10
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +68 -13
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +5 -4
- package/dist/cli/commands/config.js +50 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +4 -3
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/copy.d.ts +14 -0
- package/dist/cli/commands/copy.js +153 -0
- package/dist/cli/commands/copy.js.map +1 -0
- package/dist/cli/commands/extension/doctor.js +62 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.d.ts +8 -0
- package/dist/cli/commands/extension/install-sources.js +82 -2
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +29 -0
- package/dist/cli/commands/extension.js +61 -2
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/get.d.ts +9 -0
- package/dist/cli/commands/get.js +23 -2
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/history-compact.d.ts +39 -0
- package/dist/cli/commands/history-compact.js +262 -0
- package/dist/cli/commands/history-compact.js.map +1 -0
- package/dist/cli/commands/index.d.ts +2 -0
- package/dist/cli/commands/index.js +4 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/list.d.ts +2 -0
- package/dist/cli/commands/list.js +87 -9
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/reindex.js +8 -4
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.d.ts +1 -0
- package/dist/cli/commands/search.js +232 -35
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/error-guidance.js +26 -2
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.d.ts +1 -0
- package/dist/cli/extension-command-help.js +3 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/help-content.js +10 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.js +13 -21
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +19 -4
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +52 -17
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +31 -7
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +5 -5
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +21 -3
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-5UROHJ3D.js +16 -0
- package/dist/cli-bundle/chunks/{activity-JM6DTDND.js → activity-YVB3QRTE.js} +11 -11
- package/dist/cli-bundle/chunks/{aggregate-VNAHUNNF.js → aggregate-LH66F75F.js} +87 -17
- package/dist/cli-bundle/chunks/aggregate-LH66F75F.js.map +7 -0
- package/dist/cli-bundle/chunks/{aggregate-GI7WSZPH.js → aggregate-OHSWFQJM.js} +88 -18
- package/dist/cli-bundle/chunks/aggregate-OHSWFQJM.js.map +1 -0
- package/dist/cli-bundle/chunks/{append-WMKRXKCE.js → append-2PPYFAG5.js} +8 -8
- package/dist/cli-bundle/chunks/{append-7H5N64R2.js → append-AUGT5W6J.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-6P6GGMOG.js → chunk-2IF7WLB7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-T3LC5LKB.js → chunk-2IXCHCLM.js} +5 -6
- package/dist/cli-bundle/chunks/chunk-2IXCHCLM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KAG77BY3.js → chunk-2OJHLWBZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GXSUPCBV.js → chunk-3A2CMEM7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-UM2GBHS4.js → chunk-3EOBJOF4.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-Q7SPNHLW.js → chunk-42LOFGJS.js} +91 -16
- package/dist/cli-bundle/chunks/chunk-42LOFGJS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PRJCELV4.js → chunk-4CHEG6UK.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-4LL6TK5B.js → chunk-4GHZR3BA.js} +56 -28
- package/dist/cli-bundle/chunks/chunk-4GHZR3BA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OZ7NSQHL.js → chunk-5AXMRKN5.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-GCOQW437.js → chunk-6J4K6JLA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2RSPZI5H.js → chunk-6RZXO5M2.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-KJ33AOCY.js → chunk-AVJD6VTA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TCD3R2PF.js → chunk-B2KZGPM2.js} +39 -8
- package/dist/cli-bundle/chunks/chunk-B2KZGPM2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-I6BNFU5X.js → chunk-B5RF3IP7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RZN6VURO.js → chunk-C5W2UH56.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3LB74A67.js → chunk-CKLBZHS7.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-KWU6HG75.js → chunk-CLD3XNCH.js} +91 -10
- package/dist/cli-bundle/chunks/chunk-CLD3XNCH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QO7EBBOM.js → chunk-FHHBD7PN.js} +38 -7
- package/dist/cli-bundle/chunks/chunk-FHHBD7PN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3VAM3NNM.js → chunk-FY6Z3FYY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RWPSOIEE.js → chunk-GNIUOLZ2.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-MITFDD35.js → chunk-GPXQBR3H.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-2VBQ6ZXS.js → chunk-GUZBNB3G.js} +27 -5
- package/dist/cli-bundle/chunks/chunk-GUZBNB3G.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-I2HSTRJF.js → chunk-H7EO3QA3.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-77GFDHGF.js → chunk-HLC3KTLP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OVQCEJPG.js → chunk-HMMMWBK2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KJE2FOS4.js → chunk-HRMHZ4RV.js} +26 -4
- package/dist/cli-bundle/chunks/chunk-HRMHZ4RV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XLTD2HN3.js → chunk-HV5SSZXF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GU2ZJ2VV.js → chunk-IMCJBN2Q.js} +23 -14
- package/dist/cli-bundle/chunks/chunk-IMCJBN2Q.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-2HVRUSQA.js → chunk-KNGVP5WJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ECCMVXGM.js → chunk-KR6R465K.js} +304 -215
- package/dist/cli-bundle/chunks/chunk-KR6R465K.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3BWOVLTH.js → chunk-LI65XLJR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-NUZ5HKR4.js → chunk-LIN2BPJ7.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js +112 -0
- package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-N7ACFE26.js → chunk-LQHBENVW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-23YFZ3IG.js → chunk-LXO6V66E.js} +14 -14
- package/dist/cli-bundle/chunks/{chunk-PDDFYW4X.js → chunk-M2PW7EZU.js} +26 -7
- package/dist/cli-bundle/chunks/chunk-M2PW7EZU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PIU6RSL3.js → chunk-MOYM2C3J.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-PROOHX4K.js → chunk-MWRS7Z4P.js} +94 -13
- package/dist/cli-bundle/chunks/chunk-MWRS7Z4P.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FRAUKRU2.js → chunk-NHR2QXXZ.js} +24 -15
- package/dist/cli-bundle/chunks/chunk-NHR2QXXZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IJGCZSIQ.js → chunk-NQL32HQ5.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-52MAOQ6J.js → chunk-O7HSSFCC.js} +65 -16
- package/dist/cli-bundle/chunks/chunk-O7HSSFCC.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6ER6DXH5.js → chunk-OKSKJKHX.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-IOR7LGF4.js → chunk-QQL5QSTZ.js} +88 -7
- package/dist/cli-bundle/chunks/chunk-QQL5QSTZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2VVCGBNV.js → chunk-R3V3YCMH.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-UBOPJT3S.js → chunk-RVPTZKBC.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-WKY2IBOQ.js → chunk-SFFVGNHC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WSMOSYRD.js → chunk-SQPKRA54.js} +14 -14
- package/dist/cli-bundle/chunks/chunk-THDEID2Z.js +115 -0
- package/dist/cli-bundle/chunks/chunk-THDEID2Z.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-W7XABV4H.js → chunk-TINUJMWN.js} +92 -17
- package/dist/cli-bundle/chunks/chunk-TINUJMWN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YL2DJGYS.js → chunk-TNPBPNII.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-XTGLRY2Y.js → chunk-TP4DDY27.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-AY43SBIN.js → chunk-TYJJOTUA.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-LCM63IXU.js → chunk-UAQOQ7IE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BQHUILZS.js → chunk-UEWA73ZZ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-PO3GSVFV.js → chunk-UIIQC5YO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-U5SXYXSY.js → chunk-UJUT6AHZ.js} +241 -35
- package/dist/cli-bundle/chunks/chunk-UJUT6AHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HZGUAH22.js → chunk-UT6WFXW2.js} +6 -7
- package/dist/cli-bundle/chunks/chunk-UT6WFXW2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LB3RUL2N.js → chunk-UYQ7HXH4.js} +10 -6
- package/dist/cli-bundle/chunks/chunk-UYQ7HXH4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-R6UFP2GE.js → chunk-V6EYFTRL.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-3FI4SEFT.js → chunk-WAA7UI6M.js} +58 -30
- package/dist/cli-bundle/chunks/chunk-WAA7UI6M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AO442XLN.js → chunk-WCQZBDDH.js} +10 -6
- package/dist/cli-bundle/chunks/{chunk-AO442XLN.js.map → chunk-WCQZBDDH.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SKJWX3QB.js → chunk-WR5567FH.js} +87 -6
- package/dist/cli-bundle/chunks/chunk-WR5567FH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XSJCLN2R.js → chunk-WYEXLDDY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5SFCOO6B.js → chunk-X4IZKYHP.js} +234 -28
- package/dist/cli-bundle/chunks/chunk-X4IZKYHP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-E5FJNAZA.js → chunk-X7UHMKPE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WOPXVEZP.js → chunk-XS3O2TFJ.js} +27 -8
- package/dist/cli-bundle/chunks/chunk-XS3O2TFJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TPH5XEVD.js → chunk-XYNT7UFP.js} +303 -207
- package/dist/cli-bundle/chunks/chunk-XYNT7UFP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GGYWB3Y2.js → chunk-YBZW2QQ7.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-ME2YH6FN.js → chunk-YO3THIJF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-5FDATVEZ.js → chunk-YPH4ESA2.js} +66 -17
- package/dist/cli-bundle/chunks/chunk-YPH4ESA2.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-X2P4IB7J.js → claim-BJ4QMPJC.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-4DBF6RVG.js → claim-KW743OSW.js} +10 -10
- package/dist/cli-bundle/chunks/close-P4ZBKODL.js +13 -0
- package/dist/cli-bundle/chunks/{close-PTYFA45H.js → close-SYHSRZDC.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-7CGIDPTJ.js → close-many-DBLEYFOY.js} +29 -26
- package/dist/cli-bundle/chunks/close-many-DBLEYFOY.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-many-ERFO6LHR.js → close-many-LAC5VR4G.js} +30 -27
- package/dist/cli-bundle/chunks/close-many-LAC5VR4G.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-QKBYCWKD.js → comments-JEO6HHVM.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-OONGABK5.js → comments-YT2PQ5DD.js} +10 -10
- package/dist/cli-bundle/chunks/{config-6FXCQKIF.js → config-RZRVS3ZV.js} +127 -11
- package/dist/cli-bundle/chunks/config-RZRVS3ZV.js.map +1 -0
- package/dist/cli-bundle/chunks/{config-U4RZ4CQB.js → config-YJSAAADD.js} +128 -12
- package/dist/cli-bundle/chunks/config-YJSAAADD.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-FYYJGFWS.js → context-LGYEEKAW.js} +14 -14
- package/dist/cli-bundle/chunks/{context-FYYJGFWS.js.map → context-LGYEEKAW.js.map} +2 -2
- package/dist/cli-bundle/chunks/{context-YMJ3Z2HQ.js → context-ZUH5IOOI.js} +15 -15
- package/dist/cli-bundle/chunks/context-ZUH5IOOI.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-RFSPGVVJ.js → contracts-YXJ6NXKH.js} +7 -5
- package/dist/cli-bundle/chunks/contracts-YXJ6NXKH.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-QDB6OMLQ.js → contracts-ZIBXROPE.js} +8 -6
- package/dist/cli-bundle/chunks/contracts-ZIBXROPE.js.map +1 -0
- package/dist/cli-bundle/chunks/copy-BZALX5MQ.js +182 -0
- package/dist/cli-bundle/chunks/copy-BZALX5MQ.js.map +1 -0
- package/dist/cli-bundle/chunks/copy-YPWEIAPD.js +185 -0
- package/dist/cli-bundle/chunks/copy-YPWEIAPD.js.map +7 -0
- package/dist/cli-bundle/chunks/create-4DS2QWQC.js +27 -0
- package/dist/cli-bundle/chunks/{create-I5L4EYYZ.js → create-CF7EVRX7.js} +13 -13
- package/dist/cli-bundle/chunks/{delete-7HPGI4GZ.js → delete-KR4VBWVE.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-VXUPH5RS.js → delete-XLZRTRKR.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-JSRRWC3Z.js → deps-2YTXD3VM.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-SCZIFK2Z.js → deps-GZMFMTGS.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-GJK6K4VP.js → docs-SLROFEQ4.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-WW4N3MBM.js → docs-ZHISRR2D.js} +9 -9
- package/dist/cli-bundle/chunks/{extension-J7IBMFTD.js → extension-3C7OOI4F.js} +8 -6
- package/dist/cli-bundle/chunks/{extension-VDY2U33M.js → extension-XYCUXICD.js} +8 -6
- package/dist/cli-bundle/chunks/{files-ISZJGILQ.js → files-FUWF2FYJ.js} +9 -9
- package/dist/cli-bundle/chunks/{files-WKOD326U.js → files-J4I5IU4O.js} +9 -9
- package/dist/cli-bundle/chunks/{gc-JDVJ6OQ2.js → gc-34NXSNSN.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-ULPVWMTN.js → gc-SPIIZX3A.js} +3 -3
- package/dist/cli-bundle/chunks/{get-RV37HT3G.js → get-SZKNRHMA.js} +34 -12
- package/dist/cli-bundle/chunks/get-SZKNRHMA.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-WXU6WI5P.js → get-VITKYP6S.js} +33 -11
- package/dist/cli-bundle/chunks/get-VITKYP6S.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-6L6EH4WR.js → health-4SNTA2TF.js} +12 -11
- package/dist/cli-bundle/chunks/{health-6L6EH4WR.js.map → health-4SNTA2TF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-LOI2HHKB.js → health-7G3EPM57.js} +14 -13
- package/dist/cli-bundle/chunks/{health-LOI2HHKB.js.map → health-7G3EPM57.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-PKN67D5O.js → history-SDAWYZR3.js} +10 -10
- package/dist/cli-bundle/chunks/history-YDUEILKP.js +20 -0
- package/dist/cli-bundle/chunks/history-compact-DMW536VH.js +287 -0
- package/dist/cli-bundle/chunks/history-compact-DMW536VH.js.map +1 -0
- package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js +290 -0
- package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-redact-V4FOJGS7.js → history-redact-EPJ7GENL.js} +11 -11
- package/dist/cli-bundle/chunks/history-redact-KASLLPE7.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-SDMHR7JT.js → history-repair-IJ7LLBET.js} +11 -11
- package/dist/cli-bundle/chunks/{history-repair-HIBCBIKK.js → history-repair-YNESJRT6.js} +11 -11
- package/dist/cli-bundle/chunks/init-IGSS4GNH.js +17 -0
- package/dist/cli-bundle/chunks/{init-P56QYWJF.js → init-YHVBTEET.js} +9 -8
- package/dist/cli-bundle/chunks/{learnings-GDFRG5J7.js → learnings-4YBMIVCZ.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-MIXSESLK.js → learnings-T4PF24YN.js} +10 -10
- package/dist/cli-bundle/chunks/{list-FGOWQMSM.js → list-3KEVBOYW.js} +10 -10
- package/dist/cli-bundle/chunks/list-E44O2K64.js +20 -0
- package/dist/cli-bundle/chunks/{notes-4XVSH2AZ.js → notes-FLUCNJSH.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-5UK3GEH2.js → notes-GJKALVZM.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-SLMODHWX.js → plan-T5MMZLI3.js} +13 -13
- package/dist/cli-bundle/chunks/{plan-DUMBV3QB.js → plan-YYMIL3HV.js} +13 -13
- package/dist/cli-bundle/chunks/{register-list-query-POCFZ5JW.js → register-list-query-I65EZ3HB.js} +29 -25
- package/dist/cli-bundle/chunks/register-list-query-I65EZ3HB.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-WST76HSQ.js → register-list-query-OECMHO4G.js} +28 -24
- package/dist/cli-bundle/chunks/register-list-query-OECMHO4G.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-N5GSUZJV.js → register-mutation-2FLXORLR.js} +65 -47
- package/dist/cli-bundle/chunks/register-mutation-2FLXORLR.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-OA675SOU.js → register-mutation-5GPDEKHR.js} +64 -46
- package/dist/cli-bundle/chunks/register-mutation-5GPDEKHR.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-GNHBE5I3.js → register-operations-BNGAUMGK.js} +58 -35
- package/dist/cli-bundle/chunks/register-operations-BNGAUMGK.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-N3PMHXH5.js → register-operations-GQKT35H5.js} +57 -34
- package/dist/cli-bundle/chunks/register-operations-GQKT35H5.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-JIMPKJKV.js → register-setup-DNDCGZ4O.js} +18 -18
- package/dist/cli-bundle/chunks/{register-setup-JIMPKJKV.js.map → register-setup-DNDCGZ4O.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-ZHJI2DI3.js → register-setup-EJY44FPH.js} +17 -17
- package/dist/cli-bundle/chunks/{register-setup-ZHJI2DI3.js.map → register-setup-EJY44FPH.js.map} +2 -2
- package/dist/cli-bundle/chunks/{restore-PBL6T5TW.js → restore-DDJGVZIN.js} +11 -11
- package/dist/cli-bundle/chunks/restore-SJSASGZP.js +17 -0
- package/dist/cli-bundle/chunks/{schema-2NOO6NGB.js → schema-B7NQ6XVP.js} +8 -8
- package/dist/cli-bundle/chunks/{schema-EBI4NLUO.js → schema-HEGYH6CE.js} +8 -8
- package/dist/cli-bundle/chunks/{search-JPUQTVCY.js → search-DVVQ4UO2.js} +421 -42
- package/dist/cli-bundle/chunks/search-DVVQ4UO2.js.map +1 -0
- package/dist/cli-bundle/chunks/{search-OA6JX27A.js → search-JNEZJV7H.js} +427 -41
- package/dist/cli-bundle/chunks/search-JNEZJV7H.js.map +7 -0
- package/dist/cli-bundle/chunks/{stats-CV54BAWY.js → stats-7JDIJRDH.js} +7 -7
- package/dist/cli-bundle/chunks/{stats-XYB6KTFG.js → stats-SYTJRR4Z.js} +7 -7
- package/dist/cli-bundle/chunks/{telemetry-LMJ7PFUO.js → telemetry-4HHWD5Y7.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-NCMEPJNR.js → telemetry-EGWP7ZUX.js} +4 -4
- package/dist/cli-bundle/chunks/{test-WBROAJIE.js → test-IIELLSZX.js} +14 -13
- package/dist/cli-bundle/chunks/test-ML5RLWXE.js +32 -0
- package/dist/cli-bundle/chunks/{test-all-NTOZ7C3M.js → test-all-7DNCMML7.js} +14 -13
- package/dist/cli-bundle/chunks/{test-all-NTOZ7C3M.js.map → test-all-7DNCMML7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-N6NSRDTV.js → test-all-IHTUJRRC.js} +16 -15
- package/dist/cli-bundle/chunks/{test-all-N6NSRDTV.js.map → test-all-IHTUJRRC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-runs-V6A7LPWZ.js → test-runs-5FEMBV3A.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-WMVTQU3Y.js → test-runs-RNKZ37PS.js} +5 -5
- package/dist/cli-bundle/chunks/update-6C67X4KS.js +21 -0
- package/dist/cli-bundle/chunks/update-VF26YPT3.js +25 -0
- package/dist/cli-bundle/chunks/{update-many-KGGEYABR.js → update-many-BSZZZYXY.js} +22 -22
- package/dist/cli-bundle/chunks/{update-many-EM6OXYGO.js → update-many-BWKJJEBF.js} +22 -22
- package/dist/cli-bundle/chunks/{upgrade-LXPOQKFV.js → upgrade-RSE5PC44.js} +7 -6
- package/dist/cli-bundle/chunks/{upgrade-LXPOQKFV.js.map → upgrade-RSE5PC44.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-BLI7XBAJ.js → upgrade-YWI5DJFA.js} +5 -4
- package/dist/cli-bundle/chunks/{upgrade-BLI7XBAJ.js.map → upgrade-YWI5DJFA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-AGOAUOVW.js → validate-NK3WKB7C.js} +18 -17
- package/dist/cli-bundle/chunks/{validate-AGOAUOVW.js.map → validate-NK3WKB7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-L5J6A7YO.js → validate-UCEOB7S6.js} +20 -19
- package/dist/cli-bundle/chunks/{validate-L5J6A7YO.js.map → validate-UCEOB7S6.js.map} +1 -1
- package/dist/cli-bundle/main.js +127 -43
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/core/config/nested-settings.d.ts +8 -6
- package/dist/core/config/nested-settings.js +71 -5
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/config/positional-value.js +4 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +36 -0
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.js +46 -5
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/drift-scan.d.ts +3 -4
- package/dist/core/history/drift-scan.js +71 -18
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/item/id.js +4 -5
- package/dist/core/item/id.js.map +1 -1
- package/dist/core/item/item-format.js +7 -3
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/toon-decode.d.ts +7 -0
- package/dist/core/item/toon-decode.js +11 -2
- package/dist/core/item/toon-decode.js.map +1 -1
- package/dist/core/item/type-registry.js +25 -7
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/search/cache.js +5 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +6 -0
- package/dist/core/search/corpus.js +22 -9
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/search/embedding-batches.js +10 -7
- package/dist/core/search/embedding-batches.js.map +1 -1
- package/dist/core/search/relevance.d.ts +29 -0
- package/dist/core/search/relevance.js +226 -0
- package/dist/core/search/relevance.js.map +1 -0
- package/dist/core/search/vector-stores.d.ts +3 -0
- package/dist/core/search/vector-stores.js +23 -10
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/shared/constants.js +15 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +6 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/primitives.d.ts +8 -0
- package/dist/core/shared/primitives.js +29 -2
- package/dist/core/shared/primitives.js.map +1 -1
- package/dist/core/shared/time.js +42 -6
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/paths.js +25 -7
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +11 -0
- package/dist/core/store/settings-validator.js +14 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +109 -12
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/runtime.js +85 -4
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.js +36 -9
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
- package/dist/sdk/cli-contracts/commander-types.js +13 -2
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +7 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +31 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +3 -1
- package/dist/sdk/cli-contracts.js +36 -6
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/testing.d.ts +51 -1
- package/dist/sdk/testing.js +93 -2
- package/dist/sdk/testing.js.map +1 -1
- package/dist/types.d.ts +14 -0
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/CODEX_PLUGIN.md +1 -1
- package/docs/COMMANDS.md +9 -2
- package/docs/CONFIGURATION.md +22 -1
- package/docs/EXTENSIONS.md +22 -9
- package/docs/QUICKSTART.md +1 -1
- package/docs/SDK.md +66 -0
- package/docs/TESTING.md +14 -0
- package/package.json +2 -1
- package/packages/pm-governance-audit/README.md +14 -0
- package/packages/pm-governance-audit/extensions/governance-audit/index.js +39 -1
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +40 -2
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +1 -1
- package/packages/pm-governance-audit/package.json +4 -2
- package/packages/pm-lifecycle-hooks/README.md +21 -0
- package/packages/pm-search-advanced/README.md +38 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +17 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +17 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +216 -1
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +271 -2
- package/plugins/pm-claude/README.md +4 -4
- package/plugins/pm-codex/README.md +1 -1
- package/dist/cli-bundle/chunks/activity-CVXTCHYY.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-GI7WSZPH.js.map +0 -1
- package/dist/cli-bundle/chunks/aggregate-VNAHUNNF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-2VBQ6ZXS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3FI4SEFT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4LL6TK5B.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-52MAOQ6J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5FDATVEZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5SFCOO6B.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ECCMVXGM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FRAUKRU2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GU2ZJ2VV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HZGUAH22.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KJE2FOS4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KWU6HG75.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LB3RUL2N.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PDDFYW4X.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PROOHX4K.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Q7SPNHLW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QO7EBBOM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-T3LC5LKB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TCD3R2PF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TPH5XEVD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-U5SXYXSY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-W7XABV4H.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WOPXVEZP.js.map +0 -1
- package/dist/cli-bundle/chunks/close-3HDWDA3L.js +0 -13
- package/dist/cli-bundle/chunks/close-many-7CGIDPTJ.js.map +0 -7
- package/dist/cli-bundle/chunks/close-many-ERFO6LHR.js.map +0 -1
- package/dist/cli-bundle/chunks/config-6FXCQKIF.js.map +0 -1
- package/dist/cli-bundle/chunks/config-U4RZ4CQB.js.map +0 -7
- package/dist/cli-bundle/chunks/context-YMJ3Z2HQ.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-RFSPGVVJ.js.map +0 -7
- package/dist/cli-bundle/chunks/create-JTZNCTQC.js +0 -27
- package/dist/cli-bundle/chunks/get-RV37HT3G.js.map +0 -1
- package/dist/cli-bundle/chunks/get-WXU6WI5P.js.map +0 -7
- package/dist/cli-bundle/chunks/history-2BA3T5AE.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-JBZNXHGR.js +0 -19
- package/dist/cli-bundle/chunks/init-HIVSNX3O.js +0 -16
- package/dist/cli-bundle/chunks/list-MUSQNMTD.js +0 -20
- package/dist/cli-bundle/chunks/register-list-query-POCFZ5JW.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-WST76HSQ.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-N5GSUZJV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-OA675SOU.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-N3PMHXH5.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-D4RGNX33.js +0 -17
- package/dist/cli-bundle/chunks/search-JPUQTVCY.js.map +0 -1
- package/dist/cli-bundle/chunks/search-OA6JX27A.js.map +0 -7
- package/dist/cli-bundle/chunks/test-MXX3E5JL.js +0 -31
- package/dist/cli-bundle/chunks/update-OSV3NAQB.js +0 -25
- package/dist/cli-bundle/chunks/update-YRXSUGYQ.js +0 -21
- /package/dist/cli-bundle/chunks/{activity-CVXTCHYY.js.map → activity-5UROHJ3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-JM6DTDND.js.map → activity-YVB3QRTE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-WMKRXKCE.js.map → append-2PPYFAG5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-7H5N64R2.js.map → append-AUGT5W6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6P6GGMOG.js.map → chunk-2IF7WLB7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KAG77BY3.js.map → chunk-2OJHLWBZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GXSUPCBV.js.map → chunk-3A2CMEM7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UM2GBHS4.js.map → chunk-3EOBJOF4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PRJCELV4.js.map → chunk-4CHEG6UK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OZ7NSQHL.js.map → chunk-5AXMRKN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GCOQW437.js.map → chunk-6J4K6JLA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2RSPZI5H.js.map → chunk-6RZXO5M2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KJ33AOCY.js.map → chunk-AVJD6VTA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I6BNFU5X.js.map → chunk-B5RF3IP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RZN6VURO.js.map → chunk-C5W2UH56.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3LB74A67.js.map → chunk-CKLBZHS7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3VAM3NNM.js.map → chunk-FY6Z3FYY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RWPSOIEE.js.map → chunk-GNIUOLZ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MITFDD35.js.map → chunk-GPXQBR3H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I2HSTRJF.js.map → chunk-H7EO3QA3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-77GFDHGF.js.map → chunk-HLC3KTLP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OVQCEJPG.js.map → chunk-HMMMWBK2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XLTD2HN3.js.map → chunk-HV5SSZXF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2HVRUSQA.js.map → chunk-KNGVP5WJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3BWOVLTH.js.map → chunk-LI65XLJR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NUZ5HKR4.js.map → chunk-LIN2BPJ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N7ACFE26.js.map → chunk-LQHBENVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-23YFZ3IG.js.map → chunk-LXO6V66E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PIU6RSL3.js.map → chunk-MOYM2C3J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IJGCZSIQ.js.map → chunk-NQL32HQ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6ER6DXH5.js.map → chunk-OKSKJKHX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2VVCGBNV.js.map → chunk-R3V3YCMH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UBOPJT3S.js.map → chunk-RVPTZKBC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WKY2IBOQ.js.map → chunk-SFFVGNHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WSMOSYRD.js.map → chunk-SQPKRA54.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YL2DJGYS.js.map → chunk-TNPBPNII.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XTGLRY2Y.js.map → chunk-TP4DDY27.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AY43SBIN.js.map → chunk-TYJJOTUA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LCM63IXU.js.map → chunk-UAQOQ7IE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BQHUILZS.js.map → chunk-UEWA73ZZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PO3GSVFV.js.map → chunk-UIIQC5YO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R6UFP2GE.js.map → chunk-V6EYFTRL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XSJCLN2R.js.map → chunk-WYEXLDDY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E5FJNAZA.js.map → chunk-X7UHMKPE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GGYWB3Y2.js.map → chunk-YBZW2QQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ME2YH6FN.js.map → chunk-YO3THIJF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-X2P4IB7J.js.map → claim-BJ4QMPJC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-4DBF6RVG.js.map → claim-KW743OSW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-3HDWDA3L.js.map → close-P4ZBKODL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-PTYFA45H.js.map → close-SYHSRZDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-QKBYCWKD.js.map → comments-JEO6HHVM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-OONGABK5.js.map → comments-YT2PQ5DD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-JTZNCTQC.js.map → create-4DS2QWQC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-I5L4EYYZ.js.map → create-CF7EVRX7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-7HPGI4GZ.js.map → delete-KR4VBWVE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-VXUPH5RS.js.map → delete-XLZRTRKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-JSRRWC3Z.js.map → deps-2YTXD3VM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-SCZIFK2Z.js.map → deps-GZMFMTGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-GJK6K4VP.js.map → docs-SLROFEQ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-WW4N3MBM.js.map → docs-ZHISRR2D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-J7IBMFTD.js.map → extension-3C7OOI4F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-VDY2U33M.js.map → extension-XYCUXICD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-ISZJGILQ.js.map → files-FUWF2FYJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-WKOD326U.js.map → files-J4I5IU4O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-JDVJ6OQ2.js.map → gc-34NXSNSN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-ULPVWMTN.js.map → gc-SPIIZX3A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-PKN67D5O.js.map → history-SDAWYZR3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-2BA3T5AE.js.map → history-YDUEILKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-V4FOJGS7.js.map → history-redact-EPJ7GENL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-JBZNXHGR.js.map → history-redact-KASLLPE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-SDMHR7JT.js.map → history-repair-IJ7LLBET.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-HIBCBIKK.js.map → history-repair-YNESJRT6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-HIVSNX3O.js.map → init-IGSS4GNH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-P56QYWJF.js.map → init-YHVBTEET.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-GDFRG5J7.js.map → learnings-4YBMIVCZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-MIXSESLK.js.map → learnings-T4PF24YN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-FGOWQMSM.js.map → list-3KEVBOYW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-MUSQNMTD.js.map → list-E44O2K64.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-4XVSH2AZ.js.map → notes-FLUCNJSH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-5UK3GEH2.js.map → notes-GJKALVZM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-SLMODHWX.js.map → plan-T5MMZLI3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-DUMBV3QB.js.map → plan-YYMIL3HV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-PBL6T5TW.js.map → restore-DDJGVZIN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-D4RGNX33.js.map → restore-SJSASGZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-2NOO6NGB.js.map → schema-B7NQ6XVP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-EBI4NLUO.js.map → schema-HEGYH6CE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-CV54BAWY.js.map → stats-7JDIJRDH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-XYB6KTFG.js.map → stats-SYTJRR4Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-LMJ7PFUO.js.map → telemetry-4HHWD5Y7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-NCMEPJNR.js.map → telemetry-EGWP7ZUX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-WBROAJIE.js.map → test-IIELLSZX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-MXX3E5JL.js.map → test-ML5RLWXE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-V6A7LPWZ.js.map → test-runs-5FEMBV3A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-WMVTQU3Y.js.map → test-runs-RNKZ37PS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-YRXSUGYQ.js.map → update-6C67X4KS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-OSV3NAQB.js.map → update-VF26YPT3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-KGGEYABR.js.map → update-many-BSZZZYXY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-EM6OXYGO.js.map → update-many-BWKJJEBF.js.map} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runActivity
|
|
3
|
+
} from "./chunk-TNPBPNII.js";
|
|
4
|
+
import "./chunk-4CHEG6UK.js";
|
|
5
|
+
import "./chunk-3EOBJOF4.js";
|
|
6
|
+
import "./chunk-SFFVGNHC.js";
|
|
7
|
+
import "./chunk-TP4DDY27.js";
|
|
8
|
+
import "./chunk-2IXCHCLM.js";
|
|
9
|
+
import "./chunk-WCQZBDDH.js";
|
|
10
|
+
import "./chunk-HRMHZ4RV.js";
|
|
11
|
+
import "./chunk-FHHBD7PN.js";
|
|
12
|
+
import "./chunk-UJUT6AHZ.js";
|
|
13
|
+
export {
|
|
14
|
+
runActivity
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=activity-5UROHJ3D.js.map
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="45eac7fa-f181-5cca-93b7-cfb58909dbb3")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
runActivity
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-YO3THIJF.js";
|
|
6
|
+
import "./chunk-6RZXO5M2.js";
|
|
7
|
+
import "./chunk-3A2CMEM7.js";
|
|
8
|
+
import "./chunk-FY6Z3FYY.js";
|
|
9
|
+
import "./chunk-YBZW2QQ7.js";
|
|
10
|
+
import "./chunk-UT6WFXW2.js";
|
|
11
|
+
import "./chunk-UYQ7HXH4.js";
|
|
12
|
+
import "./chunk-GUZBNB3G.js";
|
|
13
|
+
import "./chunk-B2KZGPM2.js";
|
|
14
|
+
import "./chunk-X4IZKYHP.js";
|
|
15
15
|
export {
|
|
16
16
|
runActivity
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=activity-
|
|
18
|
+
//# sourceMappingURL=activity-YVB3QRTE.js.map
|
|
19
19
|
|
|
20
20
|
//# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
|
|
@@ -3,32 +3,32 @@ import {
|
|
|
3
3
|
} from "./chunk-3HUE7XOF.js";
|
|
4
4
|
import {
|
|
5
5
|
runList
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-42LOFGJS.js";
|
|
7
|
+
import "./chunk-B5RF3IP7.js";
|
|
8
|
+
import "./chunk-SFFVGNHC.js";
|
|
9
9
|
import "./chunk-EAOG77HM.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-TP4DDY27.js";
|
|
11
|
+
import "./chunk-2IXCHCLM.js";
|
|
12
12
|
import {
|
|
13
13
|
normalizeStatusInput
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-WCQZBDDH.js";
|
|
15
|
+
import "./chunk-HRMHZ4RV.js";
|
|
16
16
|
import {
|
|
17
17
|
nowIso
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FHHBD7PN.js";
|
|
19
19
|
import {
|
|
20
20
|
EXIT_CODE,
|
|
21
21
|
PmCliError,
|
|
22
22
|
readSettings,
|
|
23
23
|
resolvePmRoot,
|
|
24
24
|
resolveRuntimeStatusRegistry
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-UJUT6AHZ.js";
|
|
26
26
|
|
|
27
27
|
// dist/cli/commands/aggregate.js
|
|
28
28
|
!(function() {
|
|
29
29
|
try {
|
|
30
30
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
31
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
31
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5718f2e5-0007-5359-81bd-71998b031aa5");
|
|
32
32
|
} catch (e2) {
|
|
33
33
|
}
|
|
34
34
|
})();
|
|
@@ -52,6 +52,23 @@ function parseStatus(raw, statusRegistry) {
|
|
|
52
52
|
}
|
|
53
53
|
return normalized;
|
|
54
54
|
}
|
|
55
|
+
function parseNumericAggregation(options) {
|
|
56
|
+
const sumField = options.sum?.trim();
|
|
57
|
+
const avgField = options.avg?.trim();
|
|
58
|
+
const normalizedSum = sumField && sumField.length > 0 ? sumField : void 0;
|
|
59
|
+
const normalizedAvg = avgField && avgField.length > 0 ? avgField : void 0;
|
|
60
|
+
if (!normalizedSum && !normalizedAvg) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
if (normalizedSum && normalizedAvg && normalizedSum !== normalizedAvg) {
|
|
64
|
+
throw new PmCliError("Aggregate --sum and --avg must target the same numeric field", EXIT_CODE.USAGE);
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
field: normalizedSum ?? normalizedAvg ?? "",
|
|
68
|
+
sum: normalizedSum !== void 0,
|
|
69
|
+
avg: normalizedAvg !== void 0
|
|
70
|
+
};
|
|
71
|
+
}
|
|
55
72
|
function parseGroupBy(raw) {
|
|
56
73
|
const value = raw?.trim() ?? "status";
|
|
57
74
|
if (value.length === 0) {
|
|
@@ -126,15 +143,34 @@ function compareAggregateRows(left, right, groupBy) {
|
|
|
126
143
|
}
|
|
127
144
|
return 0;
|
|
128
145
|
}
|
|
146
|
+
function readNumericAggregateValue(item, field) {
|
|
147
|
+
const source = item;
|
|
148
|
+
const raw = source[field];
|
|
149
|
+
if (typeof raw === "number" && Number.isFinite(raw)) {
|
|
150
|
+
return raw;
|
|
151
|
+
}
|
|
152
|
+
if (typeof raw === "string") {
|
|
153
|
+
const trimmed = raw.trim();
|
|
154
|
+
if (trimmed.length === 0) {
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
const parsed = Number(trimmed);
|
|
158
|
+
if (Number.isFinite(parsed)) {
|
|
159
|
+
return parsed;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
129
164
|
async function runAggregate(options, global2) {
|
|
130
165
|
if (options.count === false) {
|
|
131
|
-
throw new PmCliError("Aggregate
|
|
166
|
+
throw new PmCliError("Aggregate grouped counts are always enabled; omit count=false.", EXIT_CODE.USAGE);
|
|
132
167
|
}
|
|
133
168
|
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
134
169
|
const settings = await readSettings(pmRoot);
|
|
135
170
|
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
136
171
|
const groupBy = parseGroupBy(options.groupBy);
|
|
137
172
|
const status = parseStatus(options.status, statusRegistry);
|
|
173
|
+
const numericAggregation = parseNumericAggregation(options);
|
|
138
174
|
const includeUnparented = options.includeUnparented === true;
|
|
139
175
|
const listed = await runList(status, {
|
|
140
176
|
type: options.type,
|
|
@@ -163,17 +199,46 @@ async function runAggregate(options, global2) {
|
|
|
163
199
|
}
|
|
164
200
|
const key = buildGroupKey(groupBy, group);
|
|
165
201
|
const existing = grouped.get(key);
|
|
202
|
+
const numericValue = numericAggregation === null ? null : readNumericAggregateValue(item, numericAggregation.field);
|
|
166
203
|
if (existing) {
|
|
167
|
-
existing.count += 1;
|
|
204
|
+
existing.row.count += 1;
|
|
205
|
+
if (numericAggregation !== null) {
|
|
206
|
+
if (numericValue === null) {
|
|
207
|
+
existing.null_count += 1;
|
|
208
|
+
} else {
|
|
209
|
+
existing.numeric_count += 1;
|
|
210
|
+
existing.numeric_sum += numericValue;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
168
213
|
} else {
|
|
169
214
|
grouped.set(key, {
|
|
170
|
-
|
|
171
|
-
|
|
215
|
+
row: {
|
|
216
|
+
group,
|
|
217
|
+
count: 1
|
|
218
|
+
},
|
|
219
|
+
numeric_count: numericValue === null ? 0 : 1,
|
|
220
|
+
numeric_sum: numericValue ?? 0,
|
|
221
|
+
null_count: numericValue === null ? 1 : 0
|
|
172
222
|
});
|
|
173
223
|
}
|
|
174
224
|
groupedItemCount += 1;
|
|
175
225
|
}
|
|
176
|
-
const groups = [...grouped.values()].
|
|
226
|
+
const groups = [...grouped.values()].map((entry) => {
|
|
227
|
+
if (numericAggregation === null) {
|
|
228
|
+
return entry.row;
|
|
229
|
+
}
|
|
230
|
+
const withNumeric = {
|
|
231
|
+
...entry.row,
|
|
232
|
+
null_count: entry.null_count
|
|
233
|
+
};
|
|
234
|
+
if (numericAggregation.sum) {
|
|
235
|
+
withNumeric.sum = entry.numeric_sum;
|
|
236
|
+
}
|
|
237
|
+
if (numericAggregation.avg) {
|
|
238
|
+
withNumeric.avg = entry.numeric_count === 0 ? null : entry.numeric_sum / entry.numeric_count;
|
|
239
|
+
}
|
|
240
|
+
return withNumeric;
|
|
241
|
+
}).sort((left, right) => compareAggregateRows(left, right, groupBy));
|
|
177
242
|
const warnings = listed.warnings && listed.warnings.length > 0 ? listed.warnings : void 0;
|
|
178
243
|
return {
|
|
179
244
|
groups,
|
|
@@ -197,7 +262,12 @@ async function runAggregate(options, global2) {
|
|
|
197
262
|
assignee_filter: options.assigneeFilter ?? null,
|
|
198
263
|
parent: options.parent ?? null,
|
|
199
264
|
sprint: options.sprint ?? null,
|
|
200
|
-
release: options.release ?? null
|
|
265
|
+
release: options.release ?? null,
|
|
266
|
+
...numericAggregation !== null ? {
|
|
267
|
+
sum: options.sum ?? null,
|
|
268
|
+
avg: options.avg ?? null,
|
|
269
|
+
numeric_field: numericAggregation.field
|
|
270
|
+
} : {}
|
|
201
271
|
},
|
|
202
272
|
now: nowIso(),
|
|
203
273
|
...warnings ? { warnings } : {}
|
|
@@ -206,4 +276,4 @@ async function runAggregate(options, global2) {
|
|
|
206
276
|
export {
|
|
207
277
|
runAggregate
|
|
208
278
|
};
|
|
209
|
-
//# sourceMappingURL=aggregate-
|
|
279
|
+
//# sourceMappingURL=aggregate-LH66F75F.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../cli/commands/aggregate.ts"],
|
|
4
|
+
"sourcesContent": ["import { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../core/shared/split-comma-list.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { normalizeStatusInput } from \"../../core/item/status.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { type ItemStatus } from \"../../types/index.js\";\nimport { runList } from \"./list.js\";\n\ntype AggregateGroupField = \"parent\" | \"type\" | \"priority\" | \"status\" | \"assignee\" | \"tags\" | \"sprint\" | \"release\";\ntype AggregateGroupValue = string | number | null;\ntype AggregateGroupRecord = Partial<Record<AggregateGroupField, AggregateGroupValue>>;\ntype AggregateListedItem = {\n type: string;\n status: ItemStatus;\n priority: number;\n parent?: string;\n assignee?: string;\n tags: string[];\n sprint?: string;\n release?: string;\n};\n\nconst AGGREGATE_GROUP_FIELDS: AggregateGroupField[] = [\n \"parent\",\n \"type\",\n \"priority\",\n \"status\",\n \"assignee\",\n \"tags\",\n \"sprint\",\n \"release\",\n];\n\nexport interface AggregateOptions {\n groupBy?: string;\n count?: boolean;\n sum?: string;\n avg?: string;\n includeUnparented?: boolean;\n status?: string;\n type?: string;\n tag?: string;\n priority?: string;\n deadlineBefore?: string;\n deadlineAfter?: string;\n assignee?: string;\n assigneeFilter?: string;\n parent?: string;\n sprint?: string;\n release?: string;\n}\n\nexport interface AggregateRow {\n group: AggregateGroupRecord;\n count: number;\n null_count?: number;\n sum?: number | null;\n avg?: number | null;\n}\n\nexport interface AggregateResult {\n groups: AggregateRow[];\n count: number;\n totals: {\n items_considered: number;\n items_grouped: number;\n items_skipped_unparented: number;\n };\n filters: {\n group_by: AggregateGroupField[];\n count: boolean;\n sum?: string | null;\n avg?: string | null;\n numeric_field?: string | null;\n include_unparented: boolean;\n status: ItemStatus | null;\n type: string | null;\n tag: string | null;\n priority: string | null;\n deadline_before: string | null;\n deadline_after: string | null;\n assignee: string | null;\n assignee_filter: string | null;\n parent: string | null;\n sprint: string | null;\n release: string | null;\n };\n now: string;\n warnings?: string[];\n}\n\nfunction parseStatus(raw: string | undefined, statusRegistry: RuntimeStatusRegistry): ItemStatus | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = normalizeStatusInput(raw, statusRegistry);\n if (!normalized) {\n throw new PmCliError(\n `Status filter must be one of ${statusRegistry.definitions.map((definition) => definition.id).join(\"|\")}`,\n EXIT_CODE.USAGE,\n );\n }\n return normalized;\n}\n\ninterface NumericAggregation {\n field: string;\n sum: boolean;\n avg: boolean;\n}\n\nfunction parseNumericAggregation(options: AggregateOptions): NumericAggregation | null {\n const sumField = options.sum?.trim();\n const avgField = options.avg?.trim();\n const normalizedSum = sumField && sumField.length > 0 ? sumField : undefined;\n const normalizedAvg = avgField && avgField.length > 0 ? avgField : undefined;\n if (!normalizedSum && !normalizedAvg) {\n return null;\n }\n if (normalizedSum && normalizedAvg && normalizedSum !== normalizedAvg) {\n throw new PmCliError(\"Aggregate --sum and --avg must target the same numeric field\", EXIT_CODE.USAGE);\n }\n return {\n field: normalizedSum ?? normalizedAvg ?? \"\",\n sum: normalizedSum !== undefined,\n avg: normalizedAvg !== undefined,\n };\n}\n\nfunction parseGroupBy(raw: string | undefined): AggregateGroupField[] {\n const value = raw?.trim() ?? \"status\";\n if (value.length === 0) {\n throw new PmCliError(\"--group-by requires at least one field name\", EXIT_CODE.USAGE);\n }\n const requested = splitCommaList(value);\n if (requested.length === 0) {\n throw new PmCliError(\"--group-by requires a comma-separated list of fields\", EXIT_CODE.USAGE);\n }\n for (const field of requested) {\n if (!AGGREGATE_GROUP_FIELDS.includes(field as AggregateGroupField)) {\n throw new PmCliError(\n `Aggregate group fields must be one of ${AGGREGATE_GROUP_FIELDS.join(\"|\")}; received \"${field}\"`,\n EXIT_CODE.USAGE,\n );\n }\n }\n return requested as AggregateGroupField[];\n}\n\nfunction normalizeTagGroupValue(tags: string[]): string | null {\n const normalized = [...new Set(tags.map((tag) => tag.trim().toLowerCase()).filter((tag) => tag.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n if (normalized.length === 0) {\n return null;\n }\n return normalized.join(\",\");\n}\n\nfunction resolveGroupValue(field: AggregateGroupField, item: AggregateListedItem): AggregateGroupValue {\n switch (field) {\n case \"parent\":\n return item.parent ?? null;\n case \"type\":\n return item.type;\n case \"priority\":\n return item.priority;\n case \"status\":\n return item.status;\n case \"assignee\":\n return item.assignee ?? null;\n case \"tags\":\n return normalizeTagGroupValue(item.tags);\n case \"sprint\":\n return item.sprint ?? null;\n case \"release\":\n return item.release ?? null;\n default:\n return null;\n }\n}\n\nfunction compareNullableGroupValue(left: AggregateGroupValue | undefined, right: AggregateGroupValue | undefined): number {\n const leftValue = left ?? null;\n const rightValue = right ?? null;\n if (leftValue === rightValue) {\n return 0;\n }\n if (leftValue === null) {\n return 1;\n }\n if (rightValue === null) {\n return -1;\n }\n if (typeof leftValue === \"number\" && typeof rightValue === \"number\") {\n return leftValue - rightValue;\n }\n return String(leftValue).localeCompare(String(rightValue));\n}\n\nfunction buildGroupKey(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n return groupBy.map((field) => `${field}:${JSON.stringify(group[field] ?? null)}`).join(\"|\");\n}\n\nfunction compareAggregateRows(\n left: AggregateRow,\n right: AggregateRow,\n groupBy: AggregateGroupField[],\n): number {\n for (const field of groupBy) {\n const byField = compareNullableGroupValue(left.group[field], right.group[field]);\n if (byField !== 0) {\n return byField;\n }\n }\n return 0;\n}\n\nfunction readNumericAggregateValue(item: AggregateListedItem, field: string): number | null {\n const source = item as unknown as Record<string, unknown>;\n const raw = source[field];\n if (typeof raw === \"number\" && Number.isFinite(raw)) {\n return raw;\n }\n if (typeof raw === \"string\") {\n const trimmed = raw.trim();\n if (trimmed.length === 0) {\n return null;\n }\n const parsed = Number(trimmed);\n if (Number.isFinite(parsed)) {\n return parsed;\n }\n }\n return null;\n}\n\ninterface AggregateAccumulator {\n row: AggregateRow;\n numeric_count: number;\n numeric_sum: number;\n null_count: number;\n}\n\nexport async function runAggregate(options: AggregateOptions, global: GlobalOptions): Promise<AggregateResult> {\n if (options.count === false) {\n throw new PmCliError(\"Aggregate grouped counts are always enabled; omit count=false.\", EXIT_CODE.USAGE);\n }\n\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const groupBy = parseGroupBy(options.groupBy);\n const status = parseStatus(options.status, statusRegistry);\n const numericAggregation = parseNumericAggregation(options);\n const includeUnparented = options.includeUnparented === true;\n\n const listed = await runList(\n status,\n {\n type: options.type,\n tag: options.tag,\n priority: options.priority,\n deadlineBefore: options.deadlineBefore,\n deadlineAfter: options.deadlineAfter,\n assignee: options.assignee,\n assigneeFilter: options.assigneeFilter,\n parent: options.parent,\n sprint: options.sprint,\n release: options.release,\n },\n global,\n );\n\n const grouped = new Map<string, AggregateAccumulator>();\n let skippedUnparented = 0;\n let groupedItemCount = 0;\n\n for (const listedItem of listed.items) {\n const item = listedItem as AggregateListedItem;\n const group: AggregateGroupRecord = {};\n for (const field of groupBy) {\n group[field] = resolveGroupValue(field, item);\n }\n if (groupBy.includes(\"parent\") && group.parent === null && !includeUnparented) {\n skippedUnparented += 1;\n continue;\n }\n const key = buildGroupKey(groupBy, group);\n const existing = grouped.get(key);\n const numericValue =\n numericAggregation === null\n ? null\n : readNumericAggregateValue(item, numericAggregation.field);\n if (existing) {\n existing.row.count += 1;\n if (numericAggregation !== null) {\n if (numericValue === null) {\n existing.null_count += 1;\n } else {\n existing.numeric_count += 1;\n existing.numeric_sum += numericValue;\n }\n }\n } else {\n grouped.set(key, {\n row: {\n group,\n count: 1,\n },\n numeric_count: numericValue === null ? 0 : 1,\n numeric_sum: numericValue ?? 0,\n null_count: numericValue === null ? 1 : 0,\n });\n }\n groupedItemCount += 1;\n }\n\n const groups = [...grouped.values()]\n .map((entry) => {\n if (numericAggregation === null) {\n return entry.row;\n }\n const withNumeric: AggregateRow = {\n ...entry.row,\n null_count: entry.null_count,\n };\n if (numericAggregation.sum) {\n withNumeric.sum = entry.numeric_sum;\n }\n if (numericAggregation.avg) {\n withNumeric.avg = entry.numeric_count === 0 ? null : entry.numeric_sum / entry.numeric_count;\n }\n return withNumeric;\n })\n .sort((left, right) => compareAggregateRows(left, right, groupBy));\n const warnings = listed.warnings && listed.warnings.length > 0 ? listed.warnings : undefined;\n\n return {\n groups,\n count: groups.length,\n totals: {\n items_considered: listed.items.length,\n items_grouped: groupedItemCount,\n items_skipped_unparented: skippedUnparented,\n },\n filters: {\n group_by: groupBy,\n count: true,\n include_unparented: includeUnparented,\n status: status ?? null,\n type: options.type ?? null,\n tag: options.tag ?? null,\n priority: options.priority ?? null,\n deadline_before: options.deadlineBefore ?? null,\n deadline_after: options.deadlineAfter ?? null,\n assignee: options.assignee ?? null,\n assignee_filter: options.assigneeFilter ?? null,\n parent: options.parent ?? null,\n sprint: options.sprint ?? null,\n release: options.release ?? null,\n ...(numericAggregation !== null\n ? {\n sum: options.sum ?? null,\n avg: options.avg ?? null,\n numeric_field: numericAggregation.field,\n }\n : {}),\n },\n now: nowIso(),\n ...(warnings ? { warnings } : {}),\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAM,yBAAgD;EACpD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA6DF,SAAS,YAAY,KAAyB,gBAAqC;AACjF,MAAI,QAAQ,QAAW;AACrB,WAAO;EACT;AACA,QAAM,aAAa,qBAAqB,KAAK,cAAc;AAC3D,MAAI,CAAC,YAAY;AACf,UAAM,IAAI,WACR,gCAAgC,eAAe,YAAY,IAAI,CAAC,eAAe,WAAW,EAAE,EAAE,KAAK,GAAG,CAAC,IACvG,UAAU,KAAK;EAEnB;AACA,SAAO;AACT;AAQA,SAAS,wBAAwB,SAAyB;AACxD,QAAM,WAAW,QAAQ,KAAK,KAAI;AAClC,QAAM,WAAW,QAAQ,KAAK,KAAI;AAClC,QAAM,gBAAgB,YAAY,SAAS,SAAS,IAAI,WAAW;AACnE,QAAM,gBAAgB,YAAY,SAAS,SAAS,IAAI,WAAW;AACnE,MAAI,CAAC,iBAAiB,CAAC,eAAe;AACpC,WAAO;EACT;AACA,MAAI,iBAAiB,iBAAiB,kBAAkB,eAAe;AACrE,UAAM,IAAI,WAAW,gEAAgE,UAAU,KAAK;EACtG;AACA,SAAO;IACL,OAAO,iBAAiB,iBAAiB;IACzC,KAAK,kBAAkB;IACvB,KAAK,kBAAkB;;AAE3B;AAEA,SAAS,aAAa,KAAuB;AAC3C,QAAM,QAAQ,KAAK,KAAI,KAAM;AAC7B,M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IACf;AACA,UAAM,cAA4B;MAChC,GAAG,MAAM;MACT,YAAY,MAAM;;AAEpB,QAAI,mBAAmB,KAAK;AAC1B,kBAAY,MAAM,MAAM;IAC1B;AACA,QAAI,mBAAmB,KAAK;AAC1B,kBAAY,MAAM,MAAM,kBAAkB,IAAI,OAAO,MAAM,cAAc,MAAM;IACjF;AACA,WAAO;EACT,CAAC,EACA,KAAK,CAAC,MAAM,UAAU,qBAAqB,MAAM,OAAO,OAAO,CAAC;AACnE,QAAM,WAAW,OAAO,YAAY,OAAO,SAAS,SAAS,IAAI,OAAO,WAAW;AAEnF,SAAO;IACL;IACA,OAAO,OAAO;IACd,QAAQ;MACN,kBAAkB,OAAO,MAAM;MAC/B,eAAe;MACf,0BAA0B;;IAE5B,SAAS;MACP,UAAU;MACV,OAAO;MACP,oBAAoB;MACpB,QAAQ,UAAU;MAClB,MAAM,QAAQ,QAAQ;MACtB,KAAK,QAAQ,OAAO;MACpB,UAAU,QAAQ,YAAY;MAC9B,iBAAiB,QAAQ,kBAAkB;MAC3C,gBAAgB,QAAQ,iBAAiB;MACzC,UAAU,QAAQ,YAAY;MAC9B,iBAAiB,QAAQ,kBAAkB;MAC3C,QAAQ,QAAQ,UAAU;MAC1B,QAAQ,QAAQ,UAAU;MAC1B,SAAS,QAAQ,WAAW;MAC5B,GAAI,uBAAuB,OACvB;QACE,KAAK,QAAQ,OAAO;QACpB,KAAK,QAAQ,OAAO;QACpB,eAAe,mBAAmB;UAEpC,CAAA;;IAEN,KAAK,OAAM;IACX,GAAI,WAAW,EAAE,SAAQ,IAAK,CAAA;;AAElC;",
|
|
6
|
+
"names": ["global"]
|
|
7
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c24fe9b2-4bb2-532c-a721-de78c2fb7ee5")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
splitCommaList
|
|
5
5
|
} from "./chunk-LXYVKYMQ.js";
|
|
6
6
|
import {
|
|
7
7
|
runList
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-TINUJMWN.js";
|
|
9
|
+
import "./chunk-6J4K6JLA.js";
|
|
10
|
+
import "./chunk-FY6Z3FYY.js";
|
|
11
11
|
import "./chunk-XSLQSXAH.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-YBZW2QQ7.js";
|
|
13
|
+
import "./chunk-UT6WFXW2.js";
|
|
14
14
|
import {
|
|
15
15
|
normalizeStatusInput
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-UYQ7HXH4.js";
|
|
17
|
+
import "./chunk-GUZBNB3G.js";
|
|
18
18
|
import {
|
|
19
19
|
nowIso
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-B2KZGPM2.js";
|
|
21
21
|
import {
|
|
22
22
|
EXIT_CODE,
|
|
23
23
|
PmCliError,
|
|
24
24
|
readSettings,
|
|
25
25
|
resolvePmRoot,
|
|
26
26
|
resolveRuntimeStatusRegistry
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-X4IZKYHP.js";
|
|
28
28
|
|
|
29
29
|
// dist/cli/commands/aggregate.js
|
|
30
30
|
var AGGREGATE_GROUP_FIELDS = [
|
|
@@ -47,6 +47,23 @@ function parseStatus(raw, statusRegistry) {
|
|
|
47
47
|
}
|
|
48
48
|
return normalized;
|
|
49
49
|
}
|
|
50
|
+
function parseNumericAggregation(options) {
|
|
51
|
+
const sumField = options.sum?.trim();
|
|
52
|
+
const avgField = options.avg?.trim();
|
|
53
|
+
const normalizedSum = sumField && sumField.length > 0 ? sumField : void 0;
|
|
54
|
+
const normalizedAvg = avgField && avgField.length > 0 ? avgField : void 0;
|
|
55
|
+
if (!normalizedSum && !normalizedAvg) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
if (normalizedSum && normalizedAvg && normalizedSum !== normalizedAvg) {
|
|
59
|
+
throw new PmCliError("Aggregate --sum and --avg must target the same numeric field", EXIT_CODE.USAGE);
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
field: normalizedSum ?? normalizedAvg ?? "",
|
|
63
|
+
sum: normalizedSum !== void 0,
|
|
64
|
+
avg: normalizedAvg !== void 0
|
|
65
|
+
};
|
|
66
|
+
}
|
|
50
67
|
function parseGroupBy(raw) {
|
|
51
68
|
const value = raw?.trim() ?? "status";
|
|
52
69
|
if (value.length === 0) {
|
|
@@ -121,15 +138,34 @@ function compareAggregateRows(left, right, groupBy) {
|
|
|
121
138
|
}
|
|
122
139
|
return 0;
|
|
123
140
|
}
|
|
141
|
+
function readNumericAggregateValue(item, field) {
|
|
142
|
+
const source = item;
|
|
143
|
+
const raw = source[field];
|
|
144
|
+
if (typeof raw === "number" && Number.isFinite(raw)) {
|
|
145
|
+
return raw;
|
|
146
|
+
}
|
|
147
|
+
if (typeof raw === "string") {
|
|
148
|
+
const trimmed = raw.trim();
|
|
149
|
+
if (trimmed.length === 0) {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
const parsed = Number(trimmed);
|
|
153
|
+
if (Number.isFinite(parsed)) {
|
|
154
|
+
return parsed;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
124
159
|
async function runAggregate(options, global) {
|
|
125
160
|
if (options.count === false) {
|
|
126
|
-
throw new PmCliError("Aggregate
|
|
161
|
+
throw new PmCliError("Aggregate grouped counts are always enabled; omit count=false.", EXIT_CODE.USAGE);
|
|
127
162
|
}
|
|
128
163
|
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
129
164
|
const settings = await readSettings(pmRoot);
|
|
130
165
|
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
131
166
|
const groupBy = parseGroupBy(options.groupBy);
|
|
132
167
|
const status = parseStatus(options.status, statusRegistry);
|
|
168
|
+
const numericAggregation = parseNumericAggregation(options);
|
|
133
169
|
const includeUnparented = options.includeUnparented === true;
|
|
134
170
|
const listed = await runList(status, {
|
|
135
171
|
type: options.type,
|
|
@@ -158,17 +194,46 @@ async function runAggregate(options, global) {
|
|
|
158
194
|
}
|
|
159
195
|
const key = buildGroupKey(groupBy, group);
|
|
160
196
|
const existing = grouped.get(key);
|
|
197
|
+
const numericValue = numericAggregation === null ? null : readNumericAggregateValue(item, numericAggregation.field);
|
|
161
198
|
if (existing) {
|
|
162
|
-
existing.count += 1;
|
|
199
|
+
existing.row.count += 1;
|
|
200
|
+
if (numericAggregation !== null) {
|
|
201
|
+
if (numericValue === null) {
|
|
202
|
+
existing.null_count += 1;
|
|
203
|
+
} else {
|
|
204
|
+
existing.numeric_count += 1;
|
|
205
|
+
existing.numeric_sum += numericValue;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
163
208
|
} else {
|
|
164
209
|
grouped.set(key, {
|
|
165
|
-
|
|
166
|
-
|
|
210
|
+
row: {
|
|
211
|
+
group,
|
|
212
|
+
count: 1
|
|
213
|
+
},
|
|
214
|
+
numeric_count: numericValue === null ? 0 : 1,
|
|
215
|
+
numeric_sum: numericValue ?? 0,
|
|
216
|
+
null_count: numericValue === null ? 1 : 0
|
|
167
217
|
});
|
|
168
218
|
}
|
|
169
219
|
groupedItemCount += 1;
|
|
170
220
|
}
|
|
171
|
-
const groups = [...grouped.values()].
|
|
221
|
+
const groups = [...grouped.values()].map((entry) => {
|
|
222
|
+
if (numericAggregation === null) {
|
|
223
|
+
return entry.row;
|
|
224
|
+
}
|
|
225
|
+
const withNumeric = {
|
|
226
|
+
...entry.row,
|
|
227
|
+
null_count: entry.null_count
|
|
228
|
+
};
|
|
229
|
+
if (numericAggregation.sum) {
|
|
230
|
+
withNumeric.sum = entry.numeric_sum;
|
|
231
|
+
}
|
|
232
|
+
if (numericAggregation.avg) {
|
|
233
|
+
withNumeric.avg = entry.numeric_count === 0 ? null : entry.numeric_sum / entry.numeric_count;
|
|
234
|
+
}
|
|
235
|
+
return withNumeric;
|
|
236
|
+
}).sort((left, right) => compareAggregateRows(left, right, groupBy));
|
|
172
237
|
const warnings = listed.warnings && listed.warnings.length > 0 ? listed.warnings : void 0;
|
|
173
238
|
return {
|
|
174
239
|
groups,
|
|
@@ -192,7 +257,12 @@ async function runAggregate(options, global) {
|
|
|
192
257
|
assignee_filter: options.assigneeFilter ?? null,
|
|
193
258
|
parent: options.parent ?? null,
|
|
194
259
|
sprint: options.sprint ?? null,
|
|
195
|
-
release: options.release ?? null
|
|
260
|
+
release: options.release ?? null,
|
|
261
|
+
...numericAggregation !== null ? {
|
|
262
|
+
sum: options.sum ?? null,
|
|
263
|
+
avg: options.avg ?? null,
|
|
264
|
+
numeric_field: numericAggregation.field
|
|
265
|
+
} : {}
|
|
196
266
|
},
|
|
197
267
|
now: nowIso(),
|
|
198
268
|
...warnings ? { warnings } : {}
|
|
@@ -201,6 +271,6 @@ async function runAggregate(options, global) {
|
|
|
201
271
|
export {
|
|
202
272
|
runAggregate
|
|
203
273
|
};
|
|
204
|
-
//# sourceMappingURL=aggregate-
|
|
274
|
+
//# sourceMappingURL=aggregate-OHSWFQJM.js.map
|
|
205
275
|
|
|
206
|
-
//# debugId=
|
|
276
|
+
//# debugId=c24fe9b2-4bb2-532c-a721-de78c2fb7ee5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/aggregate.ts"],"sourcesContent":["import { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../core/shared/split-comma-list.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { normalizeStatusInput } from \"../../core/item/status.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { type ItemStatus } from \"../../types/index.js\";\nimport { runList } from \"./list.js\";\n\ntype AggregateGroupField = \"parent\" | \"type\" | \"priority\" | \"status\" | \"assignee\" | \"tags\" | \"sprint\" | \"release\";\ntype AggregateGroupValue = string | number | null;\ntype AggregateGroupRecord = Partial<Record<AggregateGroupField, AggregateGroupValue>>;\ntype AggregateListedItem = {\n type: string;\n status: ItemStatus;\n priority: number;\n parent?: string;\n assignee?: string;\n tags: string[];\n sprint?: string;\n release?: string;\n};\n\nconst AGGREGATE_GROUP_FIELDS: AggregateGroupField[] = [\n \"parent\",\n \"type\",\n \"priority\",\n \"status\",\n \"assignee\",\n \"tags\",\n \"sprint\",\n \"release\",\n];\n\nexport interface AggregateOptions {\n groupBy?: string;\n count?: boolean;\n sum?: string;\n avg?: string;\n includeUnparented?: boolean;\n status?: string;\n type?: string;\n tag?: string;\n priority?: string;\n deadlineBefore?: string;\n deadlineAfter?: string;\n assignee?: string;\n assigneeFilter?: string;\n parent?: string;\n sprint?: string;\n release?: string;\n}\n\nexport interface AggregateRow {\n group: AggregateGroupRecord;\n count: number;\n null_count?: number;\n sum?: number | null;\n avg?: number | null;\n}\n\nexport interface AggregateResult {\n groups: AggregateRow[];\n count: number;\n totals: {\n items_considered: number;\n items_grouped: number;\n items_skipped_unparented: number;\n };\n filters: {\n group_by: AggregateGroupField[];\n count: boolean;\n sum?: string | null;\n avg?: string | null;\n numeric_field?: string | null;\n include_unparented: boolean;\n status: ItemStatus | null;\n type: string | null;\n tag: string | null;\n priority: string | null;\n deadline_before: string | null;\n deadline_after: string | null;\n assignee: string | null;\n assignee_filter: string | null;\n parent: string | null;\n sprint: string | null;\n release: string | null;\n };\n now: string;\n warnings?: string[];\n}\n\nfunction parseStatus(raw: string | undefined, statusRegistry: RuntimeStatusRegistry): ItemStatus | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = normalizeStatusInput(raw, statusRegistry);\n if (!normalized) {\n throw new PmCliError(\n `Status filter must be one of ${statusRegistry.definitions.map((definition) => definition.id).join(\"|\")}`,\n EXIT_CODE.USAGE,\n );\n }\n return normalized;\n}\n\ninterface NumericAggregation {\n field: string;\n sum: boolean;\n avg: boolean;\n}\n\nfunction parseNumericAggregation(options: AggregateOptions): NumericAggregation | null {\n const sumField = options.sum?.trim();\n const avgField = options.avg?.trim();\n const normalizedSum = sumField && sumField.length > 0 ? sumField : undefined;\n const normalizedAvg = avgField && avgField.length > 0 ? avgField : undefined;\n if (!normalizedSum && !normalizedAvg) {\n return null;\n }\n if (normalizedSum && normalizedAvg && normalizedSum !== normalizedAvg) {\n throw new PmCliError(\"Aggregate --sum and --avg must target the same numeric field\", EXIT_CODE.USAGE);\n }\n return {\n field: normalizedSum ?? normalizedAvg ?? \"\",\n sum: normalizedSum !== undefined,\n avg: normalizedAvg !== undefined,\n };\n}\n\nfunction parseGroupBy(raw: string | undefined): AggregateGroupField[] {\n const value = raw?.trim() ?? \"status\";\n if (value.length === 0) {\n throw new PmCliError(\"--group-by requires at least one field name\", EXIT_CODE.USAGE);\n }\n const requested = splitCommaList(value);\n if (requested.length === 0) {\n throw new PmCliError(\"--group-by requires a comma-separated list of fields\", EXIT_CODE.USAGE);\n }\n for (const field of requested) {\n if (!AGGREGATE_GROUP_FIELDS.includes(field as AggregateGroupField)) {\n throw new PmCliError(\n `Aggregate group fields must be one of ${AGGREGATE_GROUP_FIELDS.join(\"|\")}; received \"${field}\"`,\n EXIT_CODE.USAGE,\n );\n }\n }\n return requested as AggregateGroupField[];\n}\n\nfunction normalizeTagGroupValue(tags: string[]): string | null {\n const normalized = [...new Set(tags.map((tag) => tag.trim().toLowerCase()).filter((tag) => tag.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n if (normalized.length === 0) {\n return null;\n }\n return normalized.join(\",\");\n}\n\nfunction resolveGroupValue(field: AggregateGroupField, item: AggregateListedItem): AggregateGroupValue {\n switch (field) {\n case \"parent\":\n return item.parent ?? null;\n case \"type\":\n return item.type;\n case \"priority\":\n return item.priority;\n case \"status\":\n return item.status;\n case \"assignee\":\n return item.assignee ?? null;\n case \"tags\":\n return normalizeTagGroupValue(item.tags);\n case \"sprint\":\n return item.sprint ?? null;\n case \"release\":\n return item.release ?? null;\n default:\n return null;\n }\n}\n\nfunction compareNullableGroupValue(left: AggregateGroupValue | undefined, right: AggregateGroupValue | undefined): number {\n const leftValue = left ?? null;\n const rightValue = right ?? null;\n if (leftValue === rightValue) {\n return 0;\n }\n if (leftValue === null) {\n return 1;\n }\n if (rightValue === null) {\n return -1;\n }\n if (typeof leftValue === \"number\" && typeof rightValue === \"number\") {\n return leftValue - rightValue;\n }\n return String(leftValue).localeCompare(String(rightValue));\n}\n\nfunction buildGroupKey(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n return groupBy.map((field) => `${field}:${JSON.stringify(group[field] ?? null)}`).join(\"|\");\n}\n\nfunction compareAggregateRows(\n left: AggregateRow,\n right: AggregateRow,\n groupBy: AggregateGroupField[],\n): number {\n for (const field of groupBy) {\n const byField = compareNullableGroupValue(left.group[field], right.group[field]);\n if (byField !== 0) {\n return byField;\n }\n }\n return 0;\n}\n\nfunction readNumericAggregateValue(item: AggregateListedItem, field: string): number | null {\n const source = item as unknown as Record<string, unknown>;\n const raw = source[field];\n if (typeof raw === \"number\" && Number.isFinite(raw)) {\n return raw;\n }\n if (typeof raw === \"string\") {\n const trimmed = raw.trim();\n if (trimmed.length === 0) {\n return null;\n }\n const parsed = Number(trimmed);\n if (Number.isFinite(parsed)) {\n return parsed;\n }\n }\n return null;\n}\n\ninterface AggregateAccumulator {\n row: AggregateRow;\n numeric_count: number;\n numeric_sum: number;\n null_count: number;\n}\n\nexport async function runAggregate(options: AggregateOptions, global: GlobalOptions): Promise<AggregateResult> {\n if (options.count === false) {\n throw new PmCliError(\"Aggregate grouped counts are always enabled; omit count=false.\", EXIT_CODE.USAGE);\n }\n\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const groupBy = parseGroupBy(options.groupBy);\n const status = parseStatus(options.status, statusRegistry);\n const numericAggregation = parseNumericAggregation(options);\n const includeUnparented = options.includeUnparented === true;\n\n const listed = await runList(\n status,\n {\n type: options.type,\n tag: options.tag,\n priority: options.priority,\n deadlineBefore: options.deadlineBefore,\n deadlineAfter: options.deadlineAfter,\n assignee: options.assignee,\n assigneeFilter: options.assigneeFilter,\n parent: options.parent,\n sprint: options.sprint,\n release: options.release,\n },\n global,\n );\n\n const grouped = new Map<string, AggregateAccumulator>();\n let skippedUnparented = 0;\n let groupedItemCount = 0;\n\n for (const listedItem of listed.items) {\n const item = listedItem as AggregateListedItem;\n const group: AggregateGroupRecord = {};\n for (const field of groupBy) {\n group[field] = resolveGroupValue(field, item);\n }\n if (groupBy.includes(\"parent\") && group.parent === null && !includeUnparented) {\n skippedUnparented += 1;\n continue;\n }\n const key = buildGroupKey(groupBy, group);\n const existing = grouped.get(key);\n const numericValue =\n numericAggregation === null\n ? null\n : readNumericAggregateValue(item, numericAggregation.field);\n if (existing) {\n existing.row.count += 1;\n if (numericAggregation !== null) {\n if (numericValue === null) {\n existing.null_count += 1;\n } else {\n existing.numeric_count += 1;\n existing.numeric_sum += numericValue;\n }\n }\n } else {\n grouped.set(key, {\n row: {\n group,\n count: 1,\n },\n numeric_count: numericValue === null ? 0 : 1,\n numeric_sum: numericValue ?? 0,\n null_count: numericValue === null ? 1 : 0,\n });\n }\n groupedItemCount += 1;\n }\n\n const groups = [...grouped.values()]\n .map((entry) => {\n if (numericAggregation === null) {\n return entry.row;\n }\n const withNumeric: AggregateRow = {\n ...entry.row,\n null_count: entry.null_count,\n };\n if (numericAggregation.sum) {\n withNumeric.sum = entry.numeric_sum;\n }\n if (numericAggregation.avg) {\n withNumeric.avg = entry.numeric_count === 0 ? null : entry.numeric_sum / entry.numeric_count;\n }\n return withNumeric;\n })\n .sort((left, right) => compareAggregateRows(left, right, groupBy));\n const warnings = listed.warnings && listed.warnings.length > 0 ? listed.warnings : undefined;\n\n return {\n groups,\n count: groups.length,\n totals: {\n items_considered: listed.items.length,\n items_grouped: groupedItemCount,\n items_skipped_unparented: skippedUnparented,\n },\n filters: {\n group_by: groupBy,\n count: true,\n include_unparented: includeUnparented,\n status: status ?? null,\n type: options.type ?? null,\n tag: options.tag ?? null,\n priority: options.priority ?? null,\n deadline_before: options.deadlineBefore ?? null,\n deadline_after: options.deadlineAfter ?? null,\n assignee: options.assignee ?? null,\n assignee_filter: options.assigneeFilter ?? null,\n parent: options.parent ?? null,\n sprint: options.sprint ?? null,\n release: options.release ?? null,\n ...(numericAggregation !== null\n ? {\n sum: options.sum ?? null,\n avg: options.avg ?? null,\n numeric_field: numericAggregation.field,\n }\n : {}),\n },\n now: nowIso(),\n ...(warnings ? { warnings } : {}),\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAM,yBAAgD;EACpD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA6DF,SAAS,YAAY,KAAyB,gBAAqC;AACjF,MAAI,QAAQ,QAAW;AACrB,WAAO;EACT;AACA,QAAM,aAAa,qBAAqB,KAAK,cAAc;AAC3D,MAAI,CAAC,YAAY;AACf,UAAM,IAAI,WACR,gCAAgC,eAAe,YAAY,IAAI,CAAC,eAAe,WAAW,EAAE,EAAE,KAAK,GAAG,CAAC,IACvG,UAAU,KAAK;EAEnB;AACA,SAAO;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,kBAAkB;MAC3C,QAAQ,QAAQ,UAAU;MAC1B,QAAQ,QAAQ,UAAU;MAC1B,SAAS,QAAQ,WAAW;MAC5B,GAAI,uBAAuB,OACvB;QACE,KAAK,QAAQ,OAAO;QACpB,KAAK,QAAQ,OAAO;QACpB,eAAe,mBAAmB;UAEpC,CAAA;;IAEN,KAAK,OAAM;IACX,GAAI,WAAW,EAAE,SAAQ,IAAK,CAAA;;AAElC","debugId":"c24fe9b2-4bb2-532c-a721-de78c2fb7ee5"}
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
} from "./chunk-J27KIHTG.js";
|
|
6
6
|
import {
|
|
7
7
|
createStdinTokenResolver
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UIIQC5YO.js";
|
|
9
9
|
import {
|
|
10
10
|
mutateItem,
|
|
11
11
|
toItemRecord
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-YBZW2QQ7.js";
|
|
13
|
+
import "./chunk-UT6WFXW2.js";
|
|
14
|
+
import "./chunk-UYQ7HXH4.js";
|
|
15
|
+
import "./chunk-GUZBNB3G.js";
|
|
16
|
+
import "./chunk-B2KZGPM2.js";
|
|
17
17
|
import {
|
|
18
18
|
EXIT_CODE,
|
|
19
19
|
PmCliError,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
pathExists,
|
|
22
22
|
readSettings,
|
|
23
23
|
resolvePmRoot
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-X4IZKYHP.js";
|
|
25
25
|
|
|
26
26
|
// dist/cli/commands/append.js
|
|
27
27
|
async function runAppend(id, options, global) {
|
|
@@ -64,6 +64,6 @@ async function runAppend(id, options, global) {
|
|
|
64
64
|
export {
|
|
65
65
|
runAppend
|
|
66
66
|
};
|
|
67
|
-
//# sourceMappingURL=append-
|
|
67
|
+
//# sourceMappingURL=append-2PPYFAG5.js.map
|
|
68
68
|
|
|
69
69
|
//# debugId=d55ae411-c33e-5225-b6a5-d0d0b8006d7c
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
} from "./chunk-O7IWB35H.js";
|
|
4
4
|
import {
|
|
5
5
|
createStdinTokenResolver
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HV5SSZXF.js";
|
|
7
7
|
import {
|
|
8
8
|
mutateItem,
|
|
9
9
|
toItemRecord
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-TP4DDY27.js";
|
|
11
|
+
import "./chunk-2IXCHCLM.js";
|
|
12
|
+
import "./chunk-WCQZBDDH.js";
|
|
13
|
+
import "./chunk-HRMHZ4RV.js";
|
|
14
|
+
import "./chunk-FHHBD7PN.js";
|
|
15
15
|
import {
|
|
16
16
|
EXIT_CODE,
|
|
17
17
|
PmCliError,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
pathExists,
|
|
20
20
|
readSettings,
|
|
21
21
|
resolvePmRoot
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-UJUT6AHZ.js";
|
|
23
23
|
|
|
24
24
|
// dist/cli/commands/append.js
|
|
25
25
|
!(function() {
|
|
@@ -69,4 +69,4 @@ async function runAppend(id, options, global2) {
|
|
|
69
69
|
export {
|
|
70
70
|
runAppend
|
|
71
71
|
};
|
|
72
|
-
//# sourceMappingURL=append-
|
|
72
|
+
//# sourceMappingURL=append-AUGT5W6J.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9d7e4d46-ea22-536a-8a47-90006a264b88")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
BUILTIN_ITEM_TYPE_VALUES
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-X4IZKYHP.js";
|
|
6
6
|
|
|
7
7
|
// dist/core/schema/item-types-file.js
|
|
8
8
|
var BUILTIN_NAME_LOOKUP = new Map(BUILTIN_ITEM_TYPE_VALUES.map((name) => [name.toLowerCase(), name]));
|
|
@@ -213,6 +213,6 @@ export {
|
|
|
213
213
|
buildInvalidTypeHint,
|
|
214
214
|
buildInvalidTypeError
|
|
215
215
|
};
|
|
216
|
-
//# sourceMappingURL=chunk-
|
|
216
|
+
//# sourceMappingURL=chunk-2IF7WLB7.js.map
|
|
217
217
|
|
|
218
218
|
//# debugId=9d7e4d46-ea22-536a-8a47-90006a264b88
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TYPE_TO_FOLDER,
|
|
3
3
|
pathExists
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UJUT6AHZ.js";
|
|
5
5
|
|
|
6
6
|
// dist/core/item/id.js
|
|
7
7
|
import crypto from "node:crypto";
|
|
@@ -9,7 +9,7 @@ import path from "node:path";
|
|
|
9
9
|
!(function() {
|
|
10
10
|
try {
|
|
11
11
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
12
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
12
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "681913fe-dcec-59f2-a0dc-0f3578f11e37");
|
|
13
13
|
} catch (e2) {
|
|
14
14
|
}
|
|
15
15
|
})();
|
|
@@ -35,10 +35,9 @@ function normalizeItemId(input, prefix) {
|
|
|
35
35
|
return `${canonicalPrefix}${normalized}`;
|
|
36
36
|
}
|
|
37
37
|
function randomToken(length) {
|
|
38
|
-
const bytes = crypto.randomBytes(length);
|
|
39
38
|
let token = "";
|
|
40
|
-
for (
|
|
41
|
-
token += (
|
|
39
|
+
for (let index = 0; index < length; index += 1) {
|
|
40
|
+
token += crypto.randomInt(0, 36).toString(36);
|
|
42
41
|
}
|
|
43
42
|
return token;
|
|
44
43
|
}
|
|
@@ -76,4 +75,4 @@ export {
|
|
|
76
75
|
normalizeItemId,
|
|
77
76
|
generateItemId
|
|
78
77
|
};
|
|
79
|
-
//# sourceMappingURL=chunk-
|
|
78
|
+
//# sourceMappingURL=chunk-2IXCHCLM.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../core/item/id.ts"],
|
|
4
|
+
"sourcesContent": ["import crypto from \"node:crypto\";\nimport path from \"node:path\";\nimport { TYPE_TO_FOLDER } from \"../shared/constants.js\";\nimport { pathExists } from \"../fs/fs-utils.js\";\n\nexport function normalizePrefix(input: string | undefined): string {\n const normalized = (input ?? \"\").trim().toLowerCase();\n if (!normalized) return \"pm-\";\n return normalized.endsWith(\"-\") ? normalized : `${normalized}-`;\n}\n\nexport function normalizeRawItemId(input: string): string {\n let normalized = input.trim().toLowerCase();\n if (normalized.startsWith(\"#\")) {\n normalized = normalized.slice(1);\n }\n return normalized;\n}\n\nexport function normalizeItemId(input: string, prefix: string): string {\n const canonicalPrefix = normalizePrefix(prefix);\n const normalized = normalizeRawItemId(input);\n if (normalized.startsWith(canonicalPrefix)) {\n return normalized;\n }\n return `${canonicalPrefix}${normalized}`;\n}\n\nfunction randomToken(length: number): string {\n let token = \"\";\n for (let index = 0; index < length; index += 1) {\n token += crypto.randomInt(0, 36).toString(36);\n }\n return token;\n}\n\nasync function idExists(pmRoot: string, id: string): Promise<boolean> {\n const checks = Object.values(TYPE_TO_FOLDER).flatMap((folder) => [\n path.join(pmRoot, folder, `${id}.md`),\n path.join(pmRoot, folder, `${id}.toon`),\n ]);\n for (const target of checks) {\n if (await pathExists(target)) {\n return true;\n }\n }\n return false;\n}\n\nexport async function generateItemId(pmRoot: string, prefix: string): Promise<string> {\n let tokenLength = 4;\n let attempts = 0;\n\n while (tokenLength <= 10) {\n for (let i = 0; i < 32; i += 1) {\n const id = `${normalizePrefix(prefix)}${randomToken(tokenLength)}`;\n if (!(await idExists(pmRoot, id))) {\n return id;\n }\n attempts += 1;\n }\n tokenLength += 1;\n }\n\n throw new Error(`Unable to generate unique id after ${attempts} attempts`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,OAAO,YAAY;AACnB,OAAO,UAAU;;;;;;;;AAIX,SAAU,gBAAgB,OAAyB;AACvD,QAAM,cAAc,SAAS,IAAI,KAAI,EAAG,YAAW;AACnD,MAAI,CAAC;AAAY,WAAO;AACxB,SAAO,WAAW,SAAS,GAAG,IAAI,aAAa,GAAG,UAAU;AAC9D;AAEM,SAAU,mBAAmB,OAAa;AAC9C,MAAI,aAAa,MAAM,KAAI,EAAG,YAAW;AACzC,MAAI,WAAW,WAAW,GAAG,GAAG;AAC9B,iBAAa,WAAW,MAAM,CAAC;EACjC;AACA,SAAO;AACT;AAEM,SAAU,gBAAgB,OAAe,QAAc;AAC3D,QAAM,kBAAkB,gBAAgB,MAAM;AAC9C,QAAM,aAAa,mBAAmB,KAAK;AAC3C,MAAI,WAAW,WAAW,eAAe,GAAG;AAC1C,WAAO;EACT;AACA,SAAO,GAAG,eAAe,GAAG,UAAU;AACxC;AAEA,SAAS,YAAY,QAAc;AACjC,MAAI,QAAQ;AACZ,WAAS,QAAQ,GAAG,QAAQ,QAAQ,SAAS,GAAG;AAC9C,aAAS,OAAO,UAAU,GAAG,EAAE,EAAE,SAAS,EAAE;EAC9C;AACA,SAAO;AACT;AAEA,eAAe,SAAS,QAAgB,IAAU;AAChD,QAAM,SAAS,OAAO,OAAO,cAAc,EAAE,QAAQ,CAAC,WAAW;IAC/D,KAAK,KAAK,QAAQ,QAAQ,GAAG,EAAE,KAAK;IACpC,KAAK,KAAK,QAAQ,QAAQ,GAAG,EAAE,OAAO;GACvC;AACD,aAAW,UAAU,QAAQ;AAC3B,QAAI,MAAM,WAAW,MAAM,GAAG;AAC5B,aAAO;IACT;EACF;AACA,SAAO;AACT;AAEA,eAAsB,eAAe,QAAgB,QAAc;AACjE,MAAI,cAAc;AAClB,MAAI,WAAW;AAEf,SAAO,eAAe,IAAI;AACxB,aAAS,IAAI,GAAG,IAAI,IAAI,KAAK,GAAG;AAC9B,YAAM,KAAK,GAAG,gBAAgB,MAAM,CAAC,GAAG,YAAY,WAAW,CAAC;AAChE,UAAI,CAAE,MAAM,SAAS,QAAQ,EAAE,GAAI;AACjC,eAAO;MACT;AACA,kBAAY;IACd;AACA,mBAAe;EACjB;AAEA,QAAM,IAAI,MAAM,sCAAsC,QAAQ,WAAW;AAC3E;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EXIT_CODE,
|
|
3
3
|
PmCliError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UJUT6AHZ.js";
|
|
5
5
|
|
|
6
6
|
// dist/core/item/parent-reference-policy.js
|
|
7
7
|
!(function() {
|
|
@@ -87,4 +87,4 @@ export {
|
|
|
87
87
|
normalizeSprintReleaseFormatPolicy,
|
|
88
88
|
validateSprintOrReleaseValue
|
|
89
89
|
};
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-2OJHLWBZ.js.map
|