@unbrained/pm-cli 2026.5.30 → 2026.6.5
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 +152 -0
- package/dist/cli/argv-utils.js +7 -3
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.d.ts +1 -0
- package/dist/cli/bootstrap-args.js +23 -3
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commands/calendar.js +96 -10
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.d.ts +63 -0
- package/dist/cli/commands/close-many.js +302 -0
- package/dist/cli/commands/close-many.js.map +1 -0
- package/dist/cli/commands/completion.d.ts +1 -0
- package/dist/cli/commands/completion.js +241 -27
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +4 -4
- package/dist/cli/commands/config.js +115 -3
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +191 -162
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +109 -116
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/doctor.d.ts +12 -0
- package/dist/cli/commands/extension/doctor.js +97 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.d.ts +2 -0
- package/dist/cli/commands/extension/install-sources.js +11 -4
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.js +49 -48
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.js +51 -23
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/get.js +7 -7
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +38 -3
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/index.d.ts +2 -1
- package/dist/cli/commands/index.js +4 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +10 -0
- package/dist/cli/commands/init.js +107 -4
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list.d.ts +5 -0
- package/dist/cli/commands/list.js +58 -26
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/reindex.js +164 -48
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/repeatable-metadata-parsers.d.ts +15 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js +120 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -0
- package/dist/cli/commands/restore.js +25 -4
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +122 -1
- package/dist/cli/commands/schema.js +536 -6
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +18 -0
- package/dist/cli/commands/search.js +56 -12
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test.js +4 -3
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +69 -140
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +2 -0
- package/dist/cli/commands/update.js +138 -119
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +1 -0
- package/dist/cli/commands/validate.js +63 -33
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +26 -3
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/help-content.js +82 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.js +377 -23
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +16 -12
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +217 -47
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +34 -25
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +8 -8
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +35 -5
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli/search-refresh.d.ts +2 -0
- package/dist/cli/search-refresh.js +13 -0
- package/dist/cli/search-refresh.js.map +1 -0
- package/dist/cli-bundle/chunks/activity-3RWRRNOW.js +20 -0
- package/dist/cli-bundle/chunks/activity-3RWRRNOW.js.map +1 -0
- package/dist/cli-bundle/chunks/activity-P5BUMWP3.js +16 -0
- package/dist/cli-bundle/chunks/activity-P5BUMWP3.js.map +7 -0
- package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js +206 -0
- package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js.map +1 -0
- package/dist/cli-bundle/chunks/aggregate-OOAGKWRG.js +209 -0
- package/dist/cli-bundle/chunks/aggregate-OOAGKWRG.js.map +7 -0
- package/dist/cli-bundle/chunks/append-5JE3YGXU.js +72 -0
- package/dist/cli-bundle/chunks/append-5JE3YGXU.js.map +7 -0
- package/dist/cli-bundle/chunks/append-PNN6UIBZ.js +69 -0
- package/dist/cli-bundle/chunks/append-PNN6UIBZ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-26KTVXJW.js +218 -0
- package/dist/cli-bundle/chunks/chunk-26KTVXJW.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js +27 -0
- package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3OH4DAEB.js +761 -0
- package/dist/cli-bundle/chunks/chunk-3OH4DAEB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js +5553 -0
- package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js +634 -0
- package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js +1832 -0
- package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js +1891 -0
- package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js +412 -0
- package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js +182 -0
- package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-7K24QB23.js +698 -0
- package/dist/cli-bundle/chunks/chunk-7K24QB23.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js +380 -0
- package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js +230 -0
- package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ATBVS6WW.js +185 -0
- package/dist/cli-bundle/chunks/chunk-ATBVS6WW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js +332 -0
- package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-B3N4TKNL.js +1681 -0
- package/dist/cli-bundle/chunks/chunk-B3N4TKNL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PB2YU2E3.js → chunk-BNL6S7QH.js} +28 -70
- package/dist/cli-bundle/chunks/chunk-BNL6S7QH.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js +154 -0
- package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-CJDQB2ED.js +341 -0
- package/dist/cli-bundle/chunks/chunk-CJDQB2ED.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CWT53EYT.js +1340 -0
- package/dist/cli-bundle/chunks/chunk-CWT53EYT.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-D3WUNETC.js +349 -0
- package/dist/cli-bundle/chunks/chunk-D3WUNETC.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-D5X7N6FI.js +1714 -0
- package/dist/cli-bundle/chunks/chunk-D5X7N6FI.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DFIZGAI5.js +550 -0
- package/dist/cli-bundle/chunks/chunk-DFIZGAI5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js +1704 -0
- package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-EAOG77HM.js +56 -0
- package/dist/cli-bundle/chunks/chunk-EAOG77HM.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js +2988 -0
- package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js +128 -0
- package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-G5BACLYH.js +454 -0
- package/dist/cli-bundle/chunks/chunk-G5BACLYH.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GCAVRLGE.js +383 -0
- package/dist/cli-bundle/chunks/chunk-GCAVRLGE.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js +57 -0
- package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js +3860 -0
- package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GPGAYASV.js +346 -0
- package/dist/cli-bundle/chunks/chunk-GPGAYASV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-HPH6X4ZZ.js +1356 -0
- package/dist/cli-bundle/chunks/chunk-HPH6X4ZZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HZOS2UG5.js +342 -0
- package/dist/cli-bundle/chunks/chunk-HZOS2UG5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-IUV734HF.js +17 -0
- package/dist/cli-bundle/chunks/chunk-IUV734HF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-J27KIHTG.js +15 -0
- package/dist/cli-bundle/chunks/chunk-J27KIHTG.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-JB4RGL4V.js +185 -0
- package/dist/cli-bundle/chunks/chunk-JB4RGL4V.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-JQI2HE55.js +130 -0
- package/dist/cli-bundle/chunks/chunk-JQI2HE55.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-K47WAYQV.js +60 -0
- package/dist/cli-bundle/chunks/chunk-K47WAYQV.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KA24HME7.js +79 -0
- package/dist/cli-bundle/chunks/chunk-KA24HME7.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js +1325 -0
- package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js +242 -0
- package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KK6YPGH3.js +221 -0
- package/dist/cli-bundle/chunks/chunk-KK6YPGH3.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LDJK7SHN.js +157 -0
- package/dist/cli-bundle/chunks/chunk-LDJK7SHN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js +24 -0
- package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-MISYRLEP.js +80 -0
- package/dist/cli-bundle/chunks/chunk-MISYRLEP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js +457 -0
- package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js +173 -0
- package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js +338 -0
- package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-O7IWB35H.js +18 -0
- package/dist/cli-bundle/chunks/chunk-O7IWB35H.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js +3040 -0
- package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js +751 -0
- package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-OUF3ARDX.js +1861 -0
- package/dist/cli-bundle/chunks/chunk-OUF3ARDX.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js +20 -0
- package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RANZIID5.js +176 -0
- package/dist/cli-bundle/chunks/chunk-RANZIID5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js +140 -0
- package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-S3CV7JGJ.js +233 -0
- package/dist/cli-bundle/chunks/chunk-S3CV7JGJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js +5705 -0
- package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js +76 -0
- package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SZQCER6S.js +631 -0
- package/dist/cli-bundle/chunks/chunk-SZQCER6S.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js +540 -0
- package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js +422 -0
- package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RJONRNXN.js → chunk-TK633IVD.js} +51 -32
- package/dist/cli-bundle/chunks/chunk-TK633IVD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js +131 -0
- package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js +119 -0
- package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-UOVLWB47.js +1664 -0
- package/dist/cli-bundle/chunks/chunk-UOVLWB47.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js +186 -0
- package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js +182 -0
- package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js +189 -0
- package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XG7RJYHV.js +1385 -0
- package/dist/cli-bundle/chunks/chunk-XG7RJYHV.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js +53 -0
- package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-XX5LRINW.js +90 -0
- package/dist/cli-bundle/chunks/chunk-XX5LRINW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-Y2AKE2HS.js +252 -0
- package/dist/cli-bundle/chunks/chunk-Y2AKE2HS.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js +3898 -0
- package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js +1809 -0
- package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js.map +1 -0
- package/dist/cli-bundle/chunks/claim-AZLP7YFO.js +132 -0
- package/dist/cli-bundle/chunks/claim-AZLP7YFO.js.map +7 -0
- package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js +129 -0
- package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js.map +1 -0
- package/dist/cli-bundle/chunks/close-65DFYAVS.js +17 -0
- package/dist/cli-bundle/chunks/close-65DFYAVS.js.map +1 -0
- package/dist/cli-bundle/chunks/close-RMHQ3KWH.js +13 -0
- package/dist/cli-bundle/chunks/close-RMHQ3KWH.js.map +7 -0
- package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js +311 -0
- package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js.map +1 -0
- package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js +314 -0
- package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js.map +7 -0
- package/dist/cli-bundle/chunks/comments-AGBNSJJH.js +103 -0
- package/dist/cli-bundle/chunks/comments-AGBNSJJH.js.map +7 -0
- package/dist/cli-bundle/chunks/comments-CJWXQI7X.js +100 -0
- package/dist/cli-bundle/chunks/comments-CJWXQI7X.js.map +1 -0
- package/dist/cli-bundle/chunks/config-5ON3ADRH.js +1688 -0
- package/dist/cli-bundle/chunks/config-5ON3ADRH.js.map +7 -0
- package/dist/cli-bundle/chunks/config-DDPYIA6J.js +1671 -0
- package/dist/cli-bundle/chunks/config-DDPYIA6J.js.map +1 -0
- package/dist/cli-bundle/chunks/context-E6U3DWVM.js +1471 -0
- package/dist/cli-bundle/chunks/context-E6U3DWVM.js.map +7 -0
- package/dist/cli-bundle/chunks/context-ZOJEN5VT.js +1461 -0
- package/dist/cli-bundle/chunks/context-ZOJEN5VT.js.map +1 -0
- package/dist/cli-bundle/chunks/contracts-CXSFM45B.js +1277 -0
- package/dist/cli-bundle/chunks/contracts-CXSFM45B.js.map +7 -0
- package/dist/cli-bundle/chunks/contracts-LCSX5R53.js +1274 -0
- package/dist/cli-bundle/chunks/contracts-LCSX5R53.js.map +1 -0
- package/dist/cli-bundle/chunks/create-ATONSAZW.js +27 -0
- package/dist/cli-bundle/chunks/create-ATONSAZW.js.map +7 -0
- package/dist/cli-bundle/chunks/create-WYFKN2U4.js +31 -0
- package/dist/cli-bundle/chunks/create-WYFKN2U4.js.map +1 -0
- package/dist/cli-bundle/chunks/delete-RONNH4F4.js +58 -0
- package/dist/cli-bundle/chunks/delete-RONNH4F4.js.map +7 -0
- package/dist/cli-bundle/chunks/delete-ZXWC56WO.js +55 -0
- package/dist/cli-bundle/chunks/delete-ZXWC56WO.js.map +1 -0
- package/dist/cli-bundle/chunks/deps-EHXIFOZR.js +225 -0
- package/dist/cli-bundle/chunks/deps-EHXIFOZR.js.map +1 -0
- package/dist/cli-bundle/chunks/deps-WII3O4HB.js +228 -0
- package/dist/cli-bundle/chunks/deps-WII3O4HB.js.map +7 -0
- package/dist/cli-bundle/chunks/docs-JMVCFNHH.js +34 -0
- package/dist/cli-bundle/chunks/docs-JMVCFNHH.js.map +7 -0
- package/dist/cli-bundle/chunks/docs-PDREIMLS.js +31 -0
- package/dist/cli-bundle/chunks/docs-PDREIMLS.js.map +1 -0
- package/dist/cli-bundle/chunks/extension-B4ROVWJD.js +28 -0
- package/dist/cli-bundle/chunks/extension-B4ROVWJD.js.map +1 -0
- package/dist/cli-bundle/chunks/extension-G6UXSM5S.js +24 -0
- package/dist/cli-bundle/chunks/extension-G6UXSM5S.js.map +7 -0
- package/dist/cli-bundle/chunks/files-2PN7UM2D.js +282 -0
- package/dist/cli-bundle/chunks/files-2PN7UM2D.js.map +1 -0
- package/dist/cli-bundle/chunks/files-MXYS5W4M.js +285 -0
- package/dist/cli-bundle/chunks/files-MXYS5W4M.js.map +7 -0
- package/dist/cli-bundle/chunks/gc-GT552UJH.js +178 -0
- package/dist/cli-bundle/chunks/gc-GT552UJH.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js +181 -0
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js.map +7 -0
- package/dist/cli-bundle/chunks/get-CINFEUIY.js +197 -0
- package/dist/cli-bundle/chunks/get-CINFEUIY.js.map +7 -0
- package/dist/cli-bundle/chunks/get-WXMLRG7M.js +194 -0
- package/dist/cli-bundle/chunks/get-WXMLRG7M.js.map +1 -0
- package/dist/cli-bundle/chunks/health-5VPOJQ53.js +1258 -0
- package/dist/cli-bundle/chunks/health-5VPOJQ53.js.map +1 -0
- package/dist/cli-bundle/chunks/health-IT5DBPRJ.js +1261 -0
- package/dist/cli-bundle/chunks/health-IT5DBPRJ.js.map +7 -0
- package/dist/cli-bundle/chunks/history-6FC4H6HI.js +20 -0
- package/dist/cli-bundle/chunks/history-6FC4H6HI.js.map +7 -0
- package/dist/cli-bundle/chunks/history-FLZIP7PM.js +24 -0
- package/dist/cli-bundle/chunks/history-FLZIP7PM.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js +23 -0
- package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js +19 -0
- package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js.map +7 -0
- package/dist/cli-bundle/chunks/history-repair-KC5ZOJRZ.js +196 -0
- package/dist/cli-bundle/chunks/history-repair-KC5ZOJRZ.js.map +7 -0
- package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js +193 -0
- package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js.map +1 -0
- package/dist/cli-bundle/chunks/init-6MRFVOLH.js +20 -0
- package/dist/cli-bundle/chunks/init-6MRFVOLH.js.map +1 -0
- package/dist/cli-bundle/chunks/init-KHX3FEEM.js +16 -0
- package/dist/cli-bundle/chunks/init-KHX3FEEM.js.map +7 -0
- package/dist/cli-bundle/chunks/learnings-A3CLB5CO.js +47 -0
- package/dist/cli-bundle/chunks/learnings-A3CLB5CO.js.map +7 -0
- package/dist/cli-bundle/chunks/learnings-DCX55BNX.js +44 -0
- package/dist/cli-bundle/chunks/learnings-DCX55BNX.js.map +1 -0
- package/dist/cli-bundle/chunks/list-53LZ2AEO.js +20 -0
- package/dist/cli-bundle/chunks/list-53LZ2AEO.js.map +7 -0
- package/dist/cli-bundle/chunks/list-DBRECOG4.js +24 -0
- package/dist/cli-bundle/chunks/list-DBRECOG4.js.map +1 -0
- package/dist/cli-bundle/chunks/notes-42LIC3UE.js +47 -0
- package/dist/cli-bundle/chunks/notes-42LIC3UE.js.map +7 -0
- package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js +44 -0
- package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js.map +1 -0
- package/dist/cli-bundle/chunks/plan-HDQXEUKD.js +1174 -0
- package/dist/cli-bundle/chunks/plan-HDQXEUKD.js.map +7 -0
- package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js +1171 -0
- package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-EIVQ5FMR.js → register-list-query-AG3XKXWL.js} +25 -18
- package/dist/cli-bundle/chunks/register-list-query-AG3XKXWL.js.map +7 -0
- package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js +227 -0
- package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js.map +1 -0
- package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js +813 -0
- package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-RSZNPSGI.js → register-mutation-RSMT6DPK.js} +160 -39
- package/dist/cli-bundle/chunks/register-mutation-RSMT6DPK.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js +370 -0
- package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-APUSYDMR.js → register-operations-Q54JQZUN.js} +50 -32
- package/dist/cli-bundle/chunks/register-operations-Q54JQZUN.js.map +7 -0
- package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js +242 -0
- package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-OZOKSMPJ.js → register-setup-YJKIQRKA.js} +21 -13
- package/dist/cli-bundle/chunks/register-setup-YJKIQRKA.js.map +7 -0
- package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js +21 -0
- package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js.map +1 -0
- package/dist/cli-bundle/chunks/restore-JL5QIH7H.js +17 -0
- package/dist/cli-bundle/chunks/restore-JL5QIH7H.js.map +7 -0
- package/dist/cli-bundle/chunks/schema-LVXZWFGY.js +770 -0
- package/dist/cli-bundle/chunks/schema-LVXZWFGY.js.map +1 -0
- package/dist/cli-bundle/chunks/schema-V6BX65Q2.js +780 -0
- package/dist/cli-bundle/chunks/schema-V6BX65Q2.js.map +7 -0
- package/dist/cli-bundle/chunks/search-5A3BMFA7.js +1144 -0
- package/dist/cli-bundle/chunks/search-5A3BMFA7.js.map +7 -0
- package/dist/cli-bundle/chunks/search-C7NPB7G7.js +1127 -0
- package/dist/cli-bundle/chunks/search-C7NPB7G7.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js +120 -0
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js +123 -0
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js.map +7 -0
- package/dist/cli-bundle/chunks/test-OFYONO3C.js +35 -0
- package/dist/cli-bundle/chunks/test-OFYONO3C.js.map +1 -0
- package/dist/cli-bundle/chunks/test-RJ4ZF35X.js +31 -0
- package/dist/cli-bundle/chunks/test-RJ4ZF35X.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-EEMKNTGU.js +331 -0
- package/dist/cli-bundle/chunks/test-all-EEMKNTGU.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js +328 -0
- package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js +929 -0
- package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-L2M7WKH7.js +939 -0
- package/dist/cli-bundle/chunks/test-runs-L2M7WKH7.js.map +7 -0
- package/dist/cli-bundle/chunks/update-6YEHPVXH.js +25 -0
- package/dist/cli-bundle/chunks/update-6YEHPVXH.js.map +1 -0
- package/dist/cli-bundle/chunks/update-PYLVHMRD.js +21 -0
- package/dist/cli-bundle/chunks/update-PYLVHMRD.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-322CCH2L.js +608 -0
- package/dist/cli-bundle/chunks/update-many-322CCH2L.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-DYWGW57M.js +605 -0
- package/dist/cli-bundle/chunks/update-many-DYWGW57M.js.map +1 -0
- package/dist/cli-bundle/chunks/upgrade-2U727SAM.js +269 -0
- package/dist/cli-bundle/chunks/upgrade-2U727SAM.js.map +7 -0
- package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js +266 -0
- package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-GZ24NYHO.js +1120 -0
- package/dist/cli-bundle/chunks/validate-GZ24NYHO.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-ZFVWPEEN.js +1123 -0
- package/dist/cli-bundle/chunks/validate-ZFVWPEEN.js.map +7 -0
- package/dist/cli-bundle/main.js +615 -121
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/checkpoint/mutation-checkpoint.d.ts +44 -0
- package/dist/core/checkpoint/mutation-checkpoint.js +119 -0
- package/dist/core/checkpoint/mutation-checkpoint.js.map +1 -0
- package/dist/core/config/positional-value.js +4 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/diagnostics/remediation.d.ts +73 -0
- package/dist/core/diagnostics/remediation.js +328 -0
- package/dist/core/diagnostics/remediation.js.map +1 -0
- package/dist/core/extensions/extension-hook-runtime.js +9 -2
- package/dist/core/extensions/extension-hook-runtime.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +60 -4
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +5 -1
- package/dist/core/extensions/index.js +61 -2
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/item-fields.d.ts +5 -1
- package/dist/core/extensions/item-fields.js +126 -4
- package/dist/core/extensions/item-fields.js.map +1 -1
- package/dist/core/extensions/loader.js +283 -8
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/item/item-format.d.ts +3 -2
- package/dist/core/item/item-format.js +15 -10
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/item-type-definition.js +6 -2
- package/dist/core/item/item-type-definition.js.map +1 -1
- package/dist/core/item/status-filter.d.ts +29 -0
- package/dist/core/item/status-filter.js +97 -0
- package/dist/core/item/status-filter.js.map +1 -0
- package/dist/core/item/type-registry.d.ts +4 -0
- package/dist/core/item/type-registry.js +12 -2
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/output/output.js +17 -5
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/schema/item-types-file.d.ts +15 -0
- package/dist/core/schema/item-types-file.js +27 -2
- package/dist/core/schema/item-types-file.js.map +1 -1
- package/dist/core/schema/runtime-field-filters.js +4 -3
- package/dist/core/schema/runtime-field-filters.js.map +1 -1
- package/dist/core/schema/runtime-field-values.d.ts +1 -1
- package/dist/core/schema/runtime-field-values.js +10 -4
- package/dist/core/schema/runtime-field-values.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +75 -2
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/status-defs-file.d.ts +113 -0
- package/dist/core/schema/status-defs-file.js +260 -0
- package/dist/core/schema/status-defs-file.js.map +1 -0
- package/dist/core/schema/type-workflows.d.ts +64 -0
- package/dist/core/schema/type-workflows.js +98 -0
- package/dist/core/schema/type-workflows.js.map +1 -0
- package/dist/core/search/background-refresh.d.ts +53 -0
- package/dist/core/search/background-refresh.js +286 -0
- package/dist/core/search/background-refresh.js.map +1 -0
- package/dist/core/search/cache.d.ts +23 -2
- package/dist/core/search/cache.js +135 -30
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/http-client.d.ts +2 -2
- package/dist/core/search/http-client.js +2 -2
- package/dist/core/search/http-client.js.map +1 -1
- package/dist/core/search/vector-stores.d.ts +1 -0
- package/dist/core/search/vector-stores.js +69 -15
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/search/vectorization-metadata.d.ts +13 -0
- package/dist/core/search/vectorization-metadata.js +65 -0
- package/dist/core/search/vectorization-metadata.js.map +1 -0
- package/dist/core/shared/constants.d.ts +2 -2
- package/dist/core/shared/constants.js +2 -3
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/serialization.d.ts +1 -0
- package/dist/core/shared/serialization.js +86 -2
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/store/front-matter-cache.js +14 -5
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-format-migration.js +25 -15
- package/dist/core/store/item-format-migration.js.map +1 -1
- package/dist/core/store/item-store.d.ts +2 -0
- package/dist/core/store/item-store.js +61 -6
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.js +22 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +40 -5
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/consent.js +3 -3
- package/dist/core/telemetry/consent.js.map +1 -1
- package/dist/core/telemetry/observability.js +4 -3
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +10 -0
- package/dist/core/telemetry/runtime.js +86 -2
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.js +221 -12
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +7 -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 +4 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.js +53 -3
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +37 -8
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +19 -1
- package/dist/sdk/cli-contracts.js +211 -18
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/errors.d.ts +22 -0
- package/dist/sdk/errors.js +46 -0
- package/dist/sdk/errors.js.map +1 -0
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +3 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/package-import-adapters.js +14 -3
- package/dist/sdk/package-import-adapters.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -0
- package/dist/sdk/runtime.js +3 -2
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/testing.d.ts +77 -0
- package/dist/sdk/testing.js +239 -0
- package/dist/sdk/testing.js.map +1 -0
- package/dist/types.d.ts +26 -1
- package/dist/types.js +3 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +21 -2
- package/docs/COMMANDS.md +85 -5
- package/docs/CONFIGURATION.md +49 -2
- package/docs/EXTENSIONS.md +118 -6
- package/docs/QUICKSTART.md +2 -0
- package/docs/RELEASING.md +3 -3
- package/docs/SDK.md +273 -1
- package/docs/TESTING.md +17 -0
- package/docs/examples/policy-restricted-extension/manifest.json +1 -0
- package/docs/examples/starter-extension/index.js +9 -1
- package/docs/examples/starter-extension/manifest.json +1 -0
- package/package.json +12 -7
- package/packages/pm-beads/extensions/beads/index.js +2 -4
- package/packages/pm-beads/extensions/beads/index.ts +43 -33
- package/packages/pm-beads/extensions/beads/manifest.json +12 -1
- package/packages/pm-calendar/README.md +6 -0
- package/packages/pm-calendar/extensions/calendar/index.js +6 -1
- package/packages/pm-calendar/extensions/calendar/index.ts +6 -1
- package/packages/pm-calendar/extensions/calendar/manifest.json +6 -1
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +6 -1
- package/packages/pm-guide-shell/README.md +4 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.js +22 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +22 -0
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +6 -1
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +74 -3
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +84 -4
- package/packages/pm-lifecycle-hooks/README.md +29 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +18 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +20 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +9 -0
- package/packages/pm-lifecycle-hooks/package.json +52 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +13 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +69 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +91 -2
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +13 -1
- package/packages/pm-templates/extensions/templates/manifest.json +6 -1
- package/packages/pm-todos/extensions/todos/index.js +3 -7
- package/packages/pm-todos/extensions/todos/index.ts +55 -42
- package/packages/pm-todos/extensions/todos/manifest.json +13 -1
- package/scripts/bundle-cli.mjs +121 -17
- package/dist/cli-bundle/chunks/chunk-PB2YU2E3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RJONRNXN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js +0 -13864
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js.map +0 -7
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js +0 -24225
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-EIVQ5FMR.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-RSZNPSGI.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-APUSYDMR.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-OZOKSMPJ.js.map +0 -7
|
@@ -0,0 +1,634 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ITEM_TYPE_VALUES,
|
|
3
|
+
TYPE_TO_FOLDER,
|
|
4
|
+
normalizeItemTypeDefinition,
|
|
5
|
+
normalizeItemTypeStringList,
|
|
6
|
+
strictPolicyCommand
|
|
7
|
+
} from "./chunk-SRVKTWPR.js";
|
|
8
|
+
|
|
9
|
+
// dist/core/item/type-registry.js
|
|
10
|
+
!(function() {
|
|
11
|
+
try {
|
|
12
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
13
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a9d817e7-a20f-58e2-a7ee-eed2f71c0743");
|
|
14
|
+
} catch (e2) {
|
|
15
|
+
}
|
|
16
|
+
})();
|
|
17
|
+
var DEFAULT_REQUIRED_CREATE_FIELDS = [
|
|
18
|
+
"title",
|
|
19
|
+
"description",
|
|
20
|
+
"status",
|
|
21
|
+
"priority",
|
|
22
|
+
"tags",
|
|
23
|
+
"body",
|
|
24
|
+
"deadline",
|
|
25
|
+
"estimatedMinutes",
|
|
26
|
+
"acceptanceCriteria",
|
|
27
|
+
"author",
|
|
28
|
+
"message",
|
|
29
|
+
"assignee"
|
|
30
|
+
];
|
|
31
|
+
var DEFAULT_REQUIRED_CREATE_REPEATABLES = ["dep", "comment", "note", "learning", "file", "test", "doc"];
|
|
32
|
+
var CREATE_COMMAND_OPTION_KEYS = [
|
|
33
|
+
"title",
|
|
34
|
+
"description",
|
|
35
|
+
"type",
|
|
36
|
+
"status",
|
|
37
|
+
"priority",
|
|
38
|
+
"tags",
|
|
39
|
+
"body",
|
|
40
|
+
"deadline",
|
|
41
|
+
"estimatedMinutes",
|
|
42
|
+
"acceptanceCriteria",
|
|
43
|
+
"definitionOfReady",
|
|
44
|
+
"order",
|
|
45
|
+
"goal",
|
|
46
|
+
"objective",
|
|
47
|
+
"value",
|
|
48
|
+
"impact",
|
|
49
|
+
"outcome",
|
|
50
|
+
"whyNow",
|
|
51
|
+
"author",
|
|
52
|
+
"message",
|
|
53
|
+
"assignee",
|
|
54
|
+
"parent",
|
|
55
|
+
"reviewer",
|
|
56
|
+
"risk",
|
|
57
|
+
"confidence",
|
|
58
|
+
"sprint",
|
|
59
|
+
"release",
|
|
60
|
+
"blockedBy",
|
|
61
|
+
"blockedReason",
|
|
62
|
+
"unblockNote",
|
|
63
|
+
"reporter",
|
|
64
|
+
"severity",
|
|
65
|
+
"environment",
|
|
66
|
+
"reproSteps",
|
|
67
|
+
"resolution",
|
|
68
|
+
"expectedResult",
|
|
69
|
+
"actualResult",
|
|
70
|
+
"affectedVersion",
|
|
71
|
+
"fixedVersion",
|
|
72
|
+
"component",
|
|
73
|
+
"regression",
|
|
74
|
+
"customerImpact",
|
|
75
|
+
"dep",
|
|
76
|
+
"comment",
|
|
77
|
+
"note",
|
|
78
|
+
"learning",
|
|
79
|
+
"file",
|
|
80
|
+
"test",
|
|
81
|
+
"doc",
|
|
82
|
+
"reminder",
|
|
83
|
+
"event",
|
|
84
|
+
"typeOption",
|
|
85
|
+
"field"
|
|
86
|
+
];
|
|
87
|
+
var UPDATE_COMMAND_OPTION_KEYS = [
|
|
88
|
+
"title",
|
|
89
|
+
"description",
|
|
90
|
+
"body",
|
|
91
|
+
"status",
|
|
92
|
+
"closeReason",
|
|
93
|
+
"priority",
|
|
94
|
+
"type",
|
|
95
|
+
"tags",
|
|
96
|
+
"deadline",
|
|
97
|
+
"estimatedMinutes",
|
|
98
|
+
"acceptanceCriteria",
|
|
99
|
+
"definitionOfReady",
|
|
100
|
+
"order",
|
|
101
|
+
"goal",
|
|
102
|
+
"objective",
|
|
103
|
+
"value",
|
|
104
|
+
"impact",
|
|
105
|
+
"outcome",
|
|
106
|
+
"whyNow",
|
|
107
|
+
"author",
|
|
108
|
+
"message",
|
|
109
|
+
"assignee",
|
|
110
|
+
"parent",
|
|
111
|
+
"reviewer",
|
|
112
|
+
"risk",
|
|
113
|
+
"confidence",
|
|
114
|
+
"sprint",
|
|
115
|
+
"release",
|
|
116
|
+
"blockedBy",
|
|
117
|
+
"blockedReason",
|
|
118
|
+
"unblockNote",
|
|
119
|
+
"reporter",
|
|
120
|
+
"severity",
|
|
121
|
+
"environment",
|
|
122
|
+
"reproSteps",
|
|
123
|
+
"resolution",
|
|
124
|
+
"expectedResult",
|
|
125
|
+
"actualResult",
|
|
126
|
+
"affectedVersion",
|
|
127
|
+
"fixedVersion",
|
|
128
|
+
"component",
|
|
129
|
+
"regression",
|
|
130
|
+
"customerImpact",
|
|
131
|
+
"comment",
|
|
132
|
+
"note",
|
|
133
|
+
"learning",
|
|
134
|
+
"file",
|
|
135
|
+
"test",
|
|
136
|
+
"doc",
|
|
137
|
+
"reminder",
|
|
138
|
+
"event",
|
|
139
|
+
"typeOption",
|
|
140
|
+
"field",
|
|
141
|
+
"allowAuditUpdate",
|
|
142
|
+
"force"
|
|
143
|
+
];
|
|
144
|
+
var SHARED_COMMAND_OPTION_ALIASES = {
|
|
145
|
+
"close-reason": "closeReason",
|
|
146
|
+
close_reason: "closeReason",
|
|
147
|
+
"estimated-minutes": "estimatedMinutes",
|
|
148
|
+
estimated_minutes: "estimatedMinutes",
|
|
149
|
+
estimate: "estimatedMinutes",
|
|
150
|
+
"acceptance-criteria": "acceptanceCriteria",
|
|
151
|
+
acceptance_criteria: "acceptanceCriteria",
|
|
152
|
+
ac: "acceptanceCriteria",
|
|
153
|
+
"definition-of-ready": "definitionOfReady",
|
|
154
|
+
definition_of_ready: "definitionOfReady",
|
|
155
|
+
rank: "order",
|
|
156
|
+
"why-now": "whyNow",
|
|
157
|
+
why_now: "whyNow",
|
|
158
|
+
"blocked-by": "blockedBy",
|
|
159
|
+
blocked_by: "blockedBy",
|
|
160
|
+
"blocked-reason": "blockedReason",
|
|
161
|
+
blocked_reason: "blockedReason",
|
|
162
|
+
"unblock-note": "unblockNote",
|
|
163
|
+
unblock_note: "unblockNote",
|
|
164
|
+
"repro-steps": "reproSteps",
|
|
165
|
+
repro_steps: "reproSteps",
|
|
166
|
+
"expected-result": "expectedResult",
|
|
167
|
+
expected_result: "expectedResult",
|
|
168
|
+
"actual-result": "actualResult",
|
|
169
|
+
actual_result: "actualResult",
|
|
170
|
+
"affected-version": "affectedVersion",
|
|
171
|
+
affected_version: "affectedVersion",
|
|
172
|
+
"fixed-version": "fixedVersion",
|
|
173
|
+
fixed_version: "fixedVersion",
|
|
174
|
+
"customer-impact": "customerImpact",
|
|
175
|
+
customer_impact: "customerImpact",
|
|
176
|
+
"type-option": "typeOption",
|
|
177
|
+
type_option: "typeOption",
|
|
178
|
+
type_options: "typeOption"
|
|
179
|
+
};
|
|
180
|
+
var CREATE_COMMAND_OPTION_ALIASES = {
|
|
181
|
+
...SHARED_COMMAND_OPTION_ALIASES
|
|
182
|
+
};
|
|
183
|
+
var UPDATE_COMMAND_OPTION_ALIASES = {
|
|
184
|
+
...SHARED_COMMAND_OPTION_ALIASES,
|
|
185
|
+
"allow-audit-update": "allowAuditUpdate",
|
|
186
|
+
allow_audit_update: "allowAuditUpdate"
|
|
187
|
+
};
|
|
188
|
+
var CREATE_COMMAND_OPTION_FLAG_LABELS = {
|
|
189
|
+
title: "--title",
|
|
190
|
+
description: "--description",
|
|
191
|
+
type: "--type",
|
|
192
|
+
status: "--status",
|
|
193
|
+
priority: "--priority",
|
|
194
|
+
tags: "--tags",
|
|
195
|
+
body: "--body",
|
|
196
|
+
deadline: "--deadline",
|
|
197
|
+
estimatedMinutes: "--estimate/--estimated-minutes",
|
|
198
|
+
acceptanceCriteria: "--acceptance-criteria/--ac",
|
|
199
|
+
definitionOfReady: "--definition-of-ready",
|
|
200
|
+
order: "--order/--rank",
|
|
201
|
+
goal: "--goal",
|
|
202
|
+
objective: "--objective",
|
|
203
|
+
value: "--value",
|
|
204
|
+
impact: "--impact",
|
|
205
|
+
outcome: "--outcome",
|
|
206
|
+
whyNow: "--why-now",
|
|
207
|
+
author: "--author",
|
|
208
|
+
message: "--message",
|
|
209
|
+
assignee: "--assignee",
|
|
210
|
+
parent: "--parent",
|
|
211
|
+
reviewer: "--reviewer",
|
|
212
|
+
risk: "--risk",
|
|
213
|
+
confidence: "--confidence",
|
|
214
|
+
sprint: "--sprint",
|
|
215
|
+
release: "--release",
|
|
216
|
+
blockedBy: "--blocked-by",
|
|
217
|
+
blockedReason: "--blocked-reason",
|
|
218
|
+
unblockNote: "--unblock-note",
|
|
219
|
+
reporter: "--reporter",
|
|
220
|
+
severity: "--severity",
|
|
221
|
+
environment: "--environment",
|
|
222
|
+
reproSteps: "--repro-steps",
|
|
223
|
+
resolution: "--resolution",
|
|
224
|
+
expectedResult: "--expected-result",
|
|
225
|
+
actualResult: "--actual-result",
|
|
226
|
+
affectedVersion: "--affected-version",
|
|
227
|
+
fixedVersion: "--fixed-version",
|
|
228
|
+
component: "--component",
|
|
229
|
+
regression: "--regression",
|
|
230
|
+
customerImpact: "--customer-impact",
|
|
231
|
+
dep: "--dep",
|
|
232
|
+
comment: "--comment",
|
|
233
|
+
note: "--note",
|
|
234
|
+
learning: "--learning",
|
|
235
|
+
file: "--file",
|
|
236
|
+
test: "--test",
|
|
237
|
+
doc: "--doc",
|
|
238
|
+
reminder: "--reminder",
|
|
239
|
+
event: "--event",
|
|
240
|
+
typeOption: "--type-option"
|
|
241
|
+
};
|
|
242
|
+
var UPDATE_COMMAND_OPTION_FLAG_LABELS = {
|
|
243
|
+
title: "--title",
|
|
244
|
+
description: "--description",
|
|
245
|
+
body: "--body",
|
|
246
|
+
status: "--status",
|
|
247
|
+
closeReason: "--close-reason",
|
|
248
|
+
priority: "--priority",
|
|
249
|
+
type: "--type",
|
|
250
|
+
tags: "--tags",
|
|
251
|
+
deadline: "--deadline",
|
|
252
|
+
estimatedMinutes: "--estimate/--estimated-minutes",
|
|
253
|
+
acceptanceCriteria: "--acceptance-criteria/--ac",
|
|
254
|
+
definitionOfReady: "--definition-of-ready",
|
|
255
|
+
order: "--order/--rank",
|
|
256
|
+
goal: "--goal",
|
|
257
|
+
objective: "--objective",
|
|
258
|
+
value: "--value",
|
|
259
|
+
impact: "--impact",
|
|
260
|
+
outcome: "--outcome",
|
|
261
|
+
whyNow: "--why-now",
|
|
262
|
+
assignee: "--assignee",
|
|
263
|
+
parent: "--parent",
|
|
264
|
+
reviewer: "--reviewer",
|
|
265
|
+
risk: "--risk",
|
|
266
|
+
confidence: "--confidence",
|
|
267
|
+
sprint: "--sprint",
|
|
268
|
+
release: "--release",
|
|
269
|
+
blockedBy: "--blocked-by",
|
|
270
|
+
blockedReason: "--blocked-reason",
|
|
271
|
+
unblockNote: "--unblock-note",
|
|
272
|
+
reporter: "--reporter",
|
|
273
|
+
severity: "--severity",
|
|
274
|
+
environment: "--environment",
|
|
275
|
+
reproSteps: "--repro-steps",
|
|
276
|
+
resolution: "--resolution",
|
|
277
|
+
expectedResult: "--expected-result",
|
|
278
|
+
actualResult: "--actual-result",
|
|
279
|
+
affectedVersion: "--affected-version",
|
|
280
|
+
fixedVersion: "--fixed-version",
|
|
281
|
+
component: "--component",
|
|
282
|
+
regression: "--regression",
|
|
283
|
+
customerImpact: "--customer-impact",
|
|
284
|
+
comment: "--comment",
|
|
285
|
+
note: "--note",
|
|
286
|
+
learning: "--learning",
|
|
287
|
+
file: "--file",
|
|
288
|
+
test: "--test",
|
|
289
|
+
doc: "--doc",
|
|
290
|
+
reminder: "--reminder",
|
|
291
|
+
event: "--event",
|
|
292
|
+
typeOption: "--type-option",
|
|
293
|
+
allowAuditUpdate: "--allow-audit-update",
|
|
294
|
+
author: "--author",
|
|
295
|
+
message: "--message",
|
|
296
|
+
force: "--force"
|
|
297
|
+
};
|
|
298
|
+
function normalizeCommandOptionToken(value) {
|
|
299
|
+
return value.trim().replace(/^--+/, "").toLowerCase();
|
|
300
|
+
}
|
|
301
|
+
function commandOptionKeys(command) {
|
|
302
|
+
return command === "create" ? CREATE_COMMAND_OPTION_KEYS : UPDATE_COMMAND_OPTION_KEYS;
|
|
303
|
+
}
|
|
304
|
+
function commandOptionAliases(command) {
|
|
305
|
+
return command === "create" ? CREATE_COMMAND_OPTION_ALIASES : UPDATE_COMMAND_OPTION_ALIASES;
|
|
306
|
+
}
|
|
307
|
+
function canonicalizeCommandOptionKey(command, rawOption) {
|
|
308
|
+
const normalizedToken = normalizeCommandOptionToken(rawOption);
|
|
309
|
+
if (normalizedToken.length === 0) {
|
|
310
|
+
return void 0;
|
|
311
|
+
}
|
|
312
|
+
const aliased = commandOptionAliases(command)[normalizedToken];
|
|
313
|
+
if (aliased) {
|
|
314
|
+
return aliased;
|
|
315
|
+
}
|
|
316
|
+
return commandOptionKeys(command).find((candidate) => candidate.toLowerCase() === normalizedToken);
|
|
317
|
+
}
|
|
318
|
+
function commandOptionFlagLabel(command, optionKey) {
|
|
319
|
+
const labels = command === "create" ? CREATE_COMMAND_OPTION_FLAG_LABELS : UPDATE_COMMAND_OPTION_FLAG_LABELS;
|
|
320
|
+
return labels[optionKey] ?? `--${optionKey.replace(/([A-Z])/g, "-$1").toLowerCase()}`;
|
|
321
|
+
}
|
|
322
|
+
function toDefaultFolder(name) {
|
|
323
|
+
const normalized = name.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
324
|
+
if (normalized.length === 0) {
|
|
325
|
+
return "items";
|
|
326
|
+
}
|
|
327
|
+
return normalized.endsWith("s") ? normalized : `${normalized}s`;
|
|
328
|
+
}
|
|
329
|
+
function normalizeTypeDefinition(definition) {
|
|
330
|
+
return normalizeItemTypeDefinition(definition, { resolvePolicyCommand: strictPolicyCommand });
|
|
331
|
+
}
|
|
332
|
+
function coerceTypeDefinitionFromUnknown(raw) {
|
|
333
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
const record = raw;
|
|
337
|
+
const name = typeof record.name === "string" ? record.name : "";
|
|
338
|
+
if (name.trim().length === 0) {
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
const folder = typeof record.folder === "string" ? record.folder : void 0;
|
|
342
|
+
const description = typeof record.description === "string" ? record.description : void 0;
|
|
343
|
+
const defaultStatus = typeof record.default_status === "string" ? record.default_status : void 0;
|
|
344
|
+
const aliases = Array.isArray(record.aliases) ? record.aliases.filter((value) => typeof value === "string") : void 0;
|
|
345
|
+
const requiredCreateFields = Array.isArray(record.required_create_fields) ? record.required_create_fields.filter((value) => typeof value === "string") : void 0;
|
|
346
|
+
const requiredCreateRepeatables = Array.isArray(record.required_create_repeatables) ? record.required_create_repeatables.filter((value) => typeof value === "string") : void 0;
|
|
347
|
+
let options;
|
|
348
|
+
if (Array.isArray(record.options)) {
|
|
349
|
+
options = [];
|
|
350
|
+
for (const entry of record.options) {
|
|
351
|
+
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
const optionRecord = entry;
|
|
355
|
+
if (typeof optionRecord.key !== "string") {
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
options.push({
|
|
359
|
+
key: optionRecord.key,
|
|
360
|
+
values: Array.isArray(optionRecord.values) ? optionRecord.values.filter((value) => typeof value === "string") : [],
|
|
361
|
+
required: optionRecord.required === void 0 ? void 0 : Boolean(optionRecord.required),
|
|
362
|
+
aliases: Array.isArray(optionRecord.aliases) ? optionRecord.aliases.filter((value) => typeof value === "string") : void 0,
|
|
363
|
+
description: typeof optionRecord.description === "string" ? optionRecord.description : void 0
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
let commandOptionPolicies;
|
|
368
|
+
if (Array.isArray(record.command_option_policies)) {
|
|
369
|
+
commandOptionPolicies = [];
|
|
370
|
+
for (const entry of record.command_option_policies) {
|
|
371
|
+
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
|
|
372
|
+
continue;
|
|
373
|
+
}
|
|
374
|
+
const policyRecord = entry;
|
|
375
|
+
if (typeof policyRecord.command !== "string" || typeof policyRecord.option !== "string") {
|
|
376
|
+
continue;
|
|
377
|
+
}
|
|
378
|
+
const normalizedCommand = policyRecord.command.trim().toLowerCase();
|
|
379
|
+
if (normalizedCommand !== "create" && normalizedCommand !== "update") {
|
|
380
|
+
continue;
|
|
381
|
+
}
|
|
382
|
+
commandOptionPolicies.push({
|
|
383
|
+
command: normalizedCommand,
|
|
384
|
+
option: policyRecord.option,
|
|
385
|
+
required: policyRecord.required === void 0 ? void 0 : Boolean(policyRecord.required),
|
|
386
|
+
visible: policyRecord.visible === void 0 ? void 0 : Boolean(policyRecord.visible),
|
|
387
|
+
enabled: policyRecord.enabled === void 0 ? void 0 : Boolean(policyRecord.enabled)
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
return {
|
|
392
|
+
name,
|
|
393
|
+
description,
|
|
394
|
+
default_status: defaultStatus,
|
|
395
|
+
folder,
|
|
396
|
+
aliases,
|
|
397
|
+
required_create_fields: requiredCreateFields,
|
|
398
|
+
required_create_repeatables: requiredCreateRepeatables,
|
|
399
|
+
options,
|
|
400
|
+
command_option_policies: commandOptionPolicies
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
function applyTypeDefinitions(source, target, preserveBuiltinDefaults) {
|
|
404
|
+
for (const rawDefinition of source) {
|
|
405
|
+
const normalizedDefinition = normalizeTypeDefinition(rawDefinition);
|
|
406
|
+
if (!normalizedDefinition) {
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
const lowerName = normalizedDefinition.name.toLowerCase();
|
|
410
|
+
const existing = target.get(lowerName);
|
|
411
|
+
const keepName = existing?.name ?? normalizedDefinition.name;
|
|
412
|
+
const folder = normalizedDefinition.folder ?? existing?.folder ?? toDefaultFolder(keepName);
|
|
413
|
+
const aliases = normalizeItemTypeStringList([
|
|
414
|
+
...existing?.aliases ?? [],
|
|
415
|
+
...normalizedDefinition.aliases ?? []
|
|
416
|
+
]);
|
|
417
|
+
const requiredCreateFields = normalizedDefinition.required_create_fields ? normalizeItemTypeStringList(normalizedDefinition.required_create_fields) : existing?.required_create_fields ?? (preserveBuiltinDefaults ? [...DEFAULT_REQUIRED_CREATE_FIELDS] : []);
|
|
418
|
+
const requiredCreateRepeatables = normalizedDefinition.required_create_repeatables ? normalizeItemTypeStringList(normalizedDefinition.required_create_repeatables) : existing?.required_create_repeatables ?? (preserveBuiltinDefaults ? [...DEFAULT_REQUIRED_CREATE_REPEATABLES] : []);
|
|
419
|
+
const options = normalizedDefinition.options ? normalizedDefinition.options : existing?.options ? [...existing.options] : [];
|
|
420
|
+
const commandOptionPolicies = normalizedDefinition.command_option_policies ? normalizedDefinition.command_option_policies : existing?.command_option_policies ? [...existing.command_option_policies] : [];
|
|
421
|
+
const defaultStatus = normalizedDefinition.default_status ?? existing?.default_status;
|
|
422
|
+
const description = normalizedDefinition.description ?? existing?.description;
|
|
423
|
+
target.set(lowerName, {
|
|
424
|
+
name: keepName,
|
|
425
|
+
...description ? { description } : {},
|
|
426
|
+
...defaultStatus ? { default_status: defaultStatus } : {},
|
|
427
|
+
folder,
|
|
428
|
+
aliases,
|
|
429
|
+
required_create_fields: requiredCreateFields,
|
|
430
|
+
required_create_repeatables: requiredCreateRepeatables,
|
|
431
|
+
options,
|
|
432
|
+
command_option_policies: commandOptionPolicies
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
function collectExtensionTypeDefinitions(registrations) {
|
|
437
|
+
if (!registrations) {
|
|
438
|
+
return [];
|
|
439
|
+
}
|
|
440
|
+
const definitions = [];
|
|
441
|
+
for (const registration of registrations.item_types ?? []) {
|
|
442
|
+
const typeDefinitionsRaw = registration.types;
|
|
443
|
+
if (!Array.isArray(typeDefinitionsRaw)) {
|
|
444
|
+
continue;
|
|
445
|
+
}
|
|
446
|
+
for (const rawDefinition of typeDefinitionsRaw) {
|
|
447
|
+
const normalized = coerceTypeDefinitionFromUnknown(rawDefinition);
|
|
448
|
+
if (normalized) {
|
|
449
|
+
definitions.push(normalized);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
return definitions;
|
|
454
|
+
}
|
|
455
|
+
function resolveItemTypeRegistry(settings, extensionRegistrations = null) {
|
|
456
|
+
const byLowerName = /* @__PURE__ */ new Map();
|
|
457
|
+
for (const builtin of ITEM_TYPE_VALUES) {
|
|
458
|
+
byLowerName.set(builtin.toLowerCase(), {
|
|
459
|
+
name: builtin,
|
|
460
|
+
folder: TYPE_TO_FOLDER[builtin],
|
|
461
|
+
aliases: [],
|
|
462
|
+
required_create_fields: [...DEFAULT_REQUIRED_CREATE_FIELDS],
|
|
463
|
+
required_create_repeatables: [...DEFAULT_REQUIRED_CREATE_REPEATABLES],
|
|
464
|
+
options: [],
|
|
465
|
+
command_option_policies: []
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
applyTypeDefinitions(settings.item_types?.definitions ?? [], byLowerName, false);
|
|
469
|
+
applyTypeDefinitions(collectExtensionTypeDefinitions(extensionRegistrations), byLowerName, false);
|
|
470
|
+
const definitions = [...byLowerName.values()].sort((left, right) => left.name.localeCompare(right.name));
|
|
471
|
+
const byType = {};
|
|
472
|
+
const aliasToType = {};
|
|
473
|
+
const typeToFolder = {};
|
|
474
|
+
for (const definition of definitions) {
|
|
475
|
+
byType[definition.name] = definition;
|
|
476
|
+
typeToFolder[definition.name] = definition.folder;
|
|
477
|
+
aliasToType[definition.name.toLowerCase()] = definition.name;
|
|
478
|
+
for (const alias of definition.aliases) {
|
|
479
|
+
aliasToType[alias.toLowerCase()] = definition.name;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
const folders = [...new Set(definitions.map((definition) => definition.folder))].sort((left, right) => left.localeCompare(right));
|
|
483
|
+
return {
|
|
484
|
+
types: definitions.map((definition) => definition.name),
|
|
485
|
+
folders,
|
|
486
|
+
type_to_folder: typeToFolder,
|
|
487
|
+
by_type: byType,
|
|
488
|
+
alias_to_type: aliasToType
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
function resolveTypeName(rawType, registry) {
|
|
492
|
+
if (rawType === void 0) {
|
|
493
|
+
return void 0;
|
|
494
|
+
}
|
|
495
|
+
return registry.alias_to_type[rawType.trim().toLowerCase()];
|
|
496
|
+
}
|
|
497
|
+
function resolveTypeDefinition(typeName, registry) {
|
|
498
|
+
const resolvedName = resolveTypeName(typeName, registry);
|
|
499
|
+
if (!resolvedName) {
|
|
500
|
+
return void 0;
|
|
501
|
+
}
|
|
502
|
+
return registry.by_type[resolvedName];
|
|
503
|
+
}
|
|
504
|
+
function resolveCommandOptionPolicyState(typeDefinition, command, baseRequiredOptions) {
|
|
505
|
+
const errors = [];
|
|
506
|
+
const required = /* @__PURE__ */ new Set();
|
|
507
|
+
const hidden = /* @__PURE__ */ new Set();
|
|
508
|
+
const disabled = /* @__PURE__ */ new Set();
|
|
509
|
+
for (const rawBase of baseRequiredOptions) {
|
|
510
|
+
const canonical = canonicalizeCommandOptionKey(command, rawBase);
|
|
511
|
+
if (!canonical) {
|
|
512
|
+
errors.push(`Unsupported base required option "${rawBase}" for command "${command}" on type "${typeDefinition.name}"`);
|
|
513
|
+
continue;
|
|
514
|
+
}
|
|
515
|
+
required.add(canonical);
|
|
516
|
+
}
|
|
517
|
+
for (const policy of typeDefinition.command_option_policies) {
|
|
518
|
+
if (policy.command !== command) {
|
|
519
|
+
continue;
|
|
520
|
+
}
|
|
521
|
+
const canonical = canonicalizeCommandOptionKey(command, policy.option);
|
|
522
|
+
if (!canonical) {
|
|
523
|
+
errors.push(`Unsupported command_option_policies option "${policy.option}" for command "${command}" on type "${typeDefinition.name}"`);
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
526
|
+
if (policy.required !== void 0) {
|
|
527
|
+
if (policy.required) {
|
|
528
|
+
required.add(canonical);
|
|
529
|
+
} else {
|
|
530
|
+
required.delete(canonical);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
if (policy.visible !== void 0) {
|
|
534
|
+
if (policy.visible) {
|
|
535
|
+
hidden.delete(canonical);
|
|
536
|
+
} else {
|
|
537
|
+
hidden.add(canonical);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
if (policy.enabled !== void 0) {
|
|
541
|
+
if (policy.enabled) {
|
|
542
|
+
disabled.delete(canonical);
|
|
543
|
+
} else {
|
|
544
|
+
disabled.add(canonical);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
for (const option of required) {
|
|
549
|
+
if (disabled.has(option)) {
|
|
550
|
+
errors.push(`Option "${option}" cannot be both required and disabled for command "${command}" on type "${typeDefinition.name}"`);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
return {
|
|
554
|
+
required: [...required],
|
|
555
|
+
hidden: [...hidden].sort((left, right) => left.localeCompare(right)),
|
|
556
|
+
disabled: [...disabled].sort((left, right) => left.localeCompare(right)),
|
|
557
|
+
errors
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
function validateTypeOptions(typeName, rawTypeOptions, registry) {
|
|
561
|
+
const typeDefinition = resolveTypeDefinition(typeName, registry);
|
|
562
|
+
if (!typeDefinition) {
|
|
563
|
+
return {
|
|
564
|
+
normalized: void 0,
|
|
565
|
+
errors: [`Unknown type "${typeName}"`]
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
const errors = [];
|
|
569
|
+
const optionByAlias = /* @__PURE__ */ new Map();
|
|
570
|
+
for (const option of typeDefinition.options) {
|
|
571
|
+
optionByAlias.set(option.key.toLowerCase(), option);
|
|
572
|
+
for (const alias of option.aliases ?? []) {
|
|
573
|
+
optionByAlias.set(alias.toLowerCase(), option);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
const normalized = {};
|
|
577
|
+
for (const [rawKey, rawValue] of Object.entries(rawTypeOptions ?? {})) {
|
|
578
|
+
const trimmedKey = rawKey.trim();
|
|
579
|
+
const trimmedValue = rawValue.trim();
|
|
580
|
+
if (trimmedKey.length === 0) {
|
|
581
|
+
errors.push("type option keys must not be empty");
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
if (trimmedValue.length === 0) {
|
|
585
|
+
errors.push(`type option "${trimmedKey}" must not be empty`);
|
|
586
|
+
continue;
|
|
587
|
+
}
|
|
588
|
+
const optionDefinition = optionByAlias.get(trimmedKey.toLowerCase());
|
|
589
|
+
if (!optionDefinition) {
|
|
590
|
+
const allowed = typeDefinition.options.map((option) => option.key).join(", ");
|
|
591
|
+
errors.push(typeDefinition.options.length > 0 ? `Unknown type option "${trimmedKey}" for type "${typeDefinition.name}". Allowed: ${allowed}` : `Type "${typeDefinition.name}" does not define any configurable type options`);
|
|
592
|
+
continue;
|
|
593
|
+
}
|
|
594
|
+
const allowedValues = optionDefinition.values;
|
|
595
|
+
let resolvedValue = trimmedValue;
|
|
596
|
+
if (allowedValues.length > 0) {
|
|
597
|
+
const valueLookup = new Map(allowedValues.map((value) => [value.toLowerCase(), value]));
|
|
598
|
+
const canonical = valueLookup.get(trimmedValue.toLowerCase());
|
|
599
|
+
if (!canonical) {
|
|
600
|
+
errors.push(`Invalid value "${trimmedValue}" for type option "${optionDefinition.key}". Allowed: ${allowedValues.join(", ")}`);
|
|
601
|
+
continue;
|
|
602
|
+
}
|
|
603
|
+
resolvedValue = canonical;
|
|
604
|
+
}
|
|
605
|
+
normalized[optionDefinition.key] = resolvedValue;
|
|
606
|
+
}
|
|
607
|
+
for (const option of typeDefinition.options) {
|
|
608
|
+
if (option.required && !(option.key in normalized)) {
|
|
609
|
+
errors.push(`Missing required type option "${option.key}" for type "${typeDefinition.name}"`);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
const sortedKeys = Object.keys(normalized).sort((left, right) => left.localeCompare(right));
|
|
613
|
+
if (sortedKeys.length === 0) {
|
|
614
|
+
return {
|
|
615
|
+
normalized: void 0,
|
|
616
|
+
errors
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
return {
|
|
620
|
+
normalized: Object.fromEntries(sortedKeys.map((key) => [key, normalized[key]])),
|
|
621
|
+
errors
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export {
|
|
626
|
+
canonicalizeCommandOptionKey,
|
|
627
|
+
commandOptionFlagLabel,
|
|
628
|
+
resolveItemTypeRegistry,
|
|
629
|
+
resolveTypeName,
|
|
630
|
+
resolveTypeDefinition,
|
|
631
|
+
resolveCommandOptionPolicyState,
|
|
632
|
+
validateTypeOptions
|
|
633
|
+
};
|
|
634
|
+
//# sourceMappingURL=chunk-4PJQSECJ.js.map
|