@wakastellar/ui 3.2.0 → 3.3.2

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.
Files changed (518) hide show
  1. package/dist/charts.cjs.js +1 -1
  2. package/dist/charts.d.ts +1 -17
  3. package/dist/charts.es.js +2 -16
  4. package/dist/chunk-BDDJmn7V.js +1 -0
  5. package/dist/chunk-BH6uBOac.mjs +23 -0
  6. package/dist/cli/index.cjs +621 -188
  7. package/dist/cn-DnPbmOCy.js +1 -0
  8. package/dist/cn-DpLcAzrf.mjs +22 -0
  9. package/dist/doc.cjs.js +2 -0
  10. package/dist/doc.d.ts +1 -0
  11. package/dist/doc.es.js +131 -0
  12. package/dist/exceljs.min-BuefmDRS.js +28 -0
  13. package/dist/exceljs.min-DG9M8IZ1.mjs +32037 -0
  14. package/dist/export.cjs.js +1 -1
  15. package/dist/export.d.ts +1 -30
  16. package/dist/export.es.js +2 -5
  17. package/dist/index.cjs.js +259 -240
  18. package/dist/index.d.ts +1 -35
  19. package/dist/index.es.js +95716 -98932
  20. package/dist/rich-text.cjs.js +1 -1
  21. package/dist/rich-text.d.ts +1 -21
  22. package/dist/rich-text.es.js +2 -4
  23. package/dist/separator-BDReXBvI.mjs +59 -0
  24. package/dist/separator-BKjNl9sI.js +1 -0
  25. package/dist/src/blocks/waka-doc-shell/index.d.ts +3 -0
  26. package/dist/src/blocks/waka-doc-shell/types.d.ts +32 -0
  27. package/dist/src/charts.d.ts +17 -0
  28. package/dist/src/components/command/index.d.ts +83 -0
  29. package/dist/{components → src/components}/index.d.ts +39 -0
  30. package/dist/src/components/waka-actor-badge/index.d.ts +8 -0
  31. package/dist/src/components/waka-actors-list/index.d.ts +18 -0
  32. package/dist/src/components/waka-ai-assistant-button/index.d.ts +8 -0
  33. package/dist/src/components/waka-credit-activity-feed/index.d.ts +21 -0
  34. package/dist/src/components/waka-credit-alert/index.d.ts +24 -0
  35. package/dist/src/components/waka-credit-balance/index.d.ts +30 -0
  36. package/dist/src/components/waka-credit-balance/types.d.ts +34 -0
  37. package/dist/src/components/waka-credit-breakdown/index.d.ts +32 -0
  38. package/dist/src/components/waka-credit-burn-rate/index.d.ts +25 -0
  39. package/dist/src/components/waka-credit-history/index.d.ts +31 -0
  40. package/dist/src/components/waka-credit-meter/index.d.ts +27 -0
  41. package/dist/src/components/waka-credit-pricing-pack/index.d.ts +17 -0
  42. package/dist/src/components/waka-credit-projection/index.d.ts +21 -0
  43. package/dist/src/components/waka-credit-quota/index.d.ts +25 -0
  44. package/dist/src/components/waka-credit-receipt/index.d.ts +23 -0
  45. package/dist/src/components/waka-credit-top-up/index.d.ts +26 -0
  46. package/dist/src/components/waka-credit-transaction/index.d.ts +22 -0
  47. package/dist/src/components/waka-credit-transfer-form/index.d.ts +27 -0
  48. package/dist/src/components/waka-credit-usage-chart/index.d.ts +34 -0
  49. package/dist/src/components/waka-doc-breadcrumb/index.d.ts +11 -0
  50. package/dist/src/components/waka-doc-callout/index.d.ts +9 -0
  51. package/dist/src/components/waka-doc-code-block/index.d.ts +9 -0
  52. package/dist/src/components/waka-doc-nav/index.d.ts +16 -0
  53. package/dist/src/components/waka-doc-renderer/index.d.ts +7 -0
  54. package/dist/src/components/waka-doc-search/index.d.ts +18 -0
  55. package/dist/src/components/waka-doc-table/index.d.ts +8 -0
  56. package/dist/src/components/waka-doc-toc/index.d.ts +11 -0
  57. package/dist/src/components/waka-doc-toolbar/index.d.ts +10 -0
  58. package/dist/src/components/waka-doc-version/index.d.ts +13 -0
  59. package/dist/src/components/waka-document-flyover/index.d.ts +10 -0
  60. package/dist/src/components/waka-document-preview-popup/index.d.ts +26 -0
  61. package/dist/src/components/waka-hour-balance-badge/index.d.ts +8 -0
  62. package/dist/src/components/waka-hour-consumption-table/index.d.ts +15 -0
  63. package/dist/src/components/waka-hour-pack-dialog/index.d.ts +8 -0
  64. package/dist/src/components/waka-project-stats-header/index.d.ts +15 -0
  65. package/dist/src/components/waka-step-comment-bubble/index.d.ts +13 -0
  66. package/dist/src/components/waka-step-comment-panel/index.d.ts +20 -0
  67. package/dist/src/components/waka-step-permission-matrix/index.d.ts +12 -0
  68. package/dist/src/components/waka-time-entry-dialog/index.d.ts +16 -0
  69. package/dist/src/components/waka-time-tracking-flyover/index.d.ts +11 -0
  70. package/dist/src/doc.d.ts +33 -0
  71. package/dist/src/export.d.ts +30 -0
  72. package/dist/src/index.d.ts +35 -0
  73. package/dist/src/rich-text.d.ts +21 -0
  74. package/dist/types-B6GVaSIP.mjs +934 -0
  75. package/dist/types-BH9cQRqZ.js +1 -0
  76. package/dist/ui.css +2 -1
  77. package/dist/useDataTableImport-BPvfo--2.mjs +250 -0
  78. package/dist/useDataTableImport-Cm_pCKnO.js +7 -0
  79. package/dist/waka-doc-renderer-BZ2-SqyT.js +3 -0
  80. package/dist/waka-doc-renderer-BkIvas3z.mjs +1679 -0
  81. package/dist/waka-rich-text-editor-BJGlQgpq.js +1 -0
  82. package/dist/waka-rich-text-editor-BJzzxeP1.mjs +361 -0
  83. package/dist/waka-rich-text-editor-wnXLwvUo.js +1 -0
  84. package/package.json +100 -70
  85. package/src/blocks/footer/index.tsx +7 -1
  86. package/src/blocks/login/index.tsx +7 -1
  87. package/src/blocks/profile/index.tsx +5 -3
  88. package/src/blocks/waka-doc-shell/WakaDocShell.stories.tsx +198 -0
  89. package/src/blocks/waka-doc-shell/index.tsx +240 -0
  90. package/src/blocks/waka-doc-shell/types.ts +40 -0
  91. package/src/components/index.ts +46 -0
  92. package/src/components/waka-actor-badge/index.tsx +34 -0
  93. package/src/components/waka-actors-list/index.tsx +125 -0
  94. package/src/components/waka-ai-assistant-button/index.tsx +31 -0
  95. package/src/components/waka-credit-activity-feed/WakaCreditActivityFeed.stories.tsx +261 -0
  96. package/src/components/waka-credit-activity-feed/index.tsx +364 -0
  97. package/src/components/waka-credit-alert/WakaCreditAlert.stories.tsx +170 -0
  98. package/src/components/waka-credit-alert/index.tsx +179 -0
  99. package/src/components/waka-credit-balance/WakaCreditBalance.stories.tsx +259 -0
  100. package/src/components/waka-credit-balance/index.tsx +433 -0
  101. package/src/components/waka-credit-balance/types.ts +38 -0
  102. package/src/components/waka-credit-breakdown/WakaCreditBreakdown.stories.tsx +186 -0
  103. package/src/components/waka-credit-breakdown/index.tsx +487 -0
  104. package/src/components/waka-credit-burn-rate/WakaCreditBurnRate.stories.tsx +227 -0
  105. package/src/components/waka-credit-burn-rate/index.tsx +475 -0
  106. package/src/components/waka-credit-history/WakaCreditHistory.stories.tsx +290 -0
  107. package/src/components/waka-credit-history/index.tsx +654 -0
  108. package/src/components/waka-credit-meter/WakaCreditMeter.stories.tsx +418 -0
  109. package/src/components/waka-credit-meter/index.tsx +624 -0
  110. package/src/components/waka-credit-pricing-pack/WakaCreditPricingPack.stories.tsx +217 -0
  111. package/src/components/waka-credit-pricing-pack/index.tsx +185 -0
  112. package/src/components/waka-credit-projection/WakaCreditProjection.stories.tsx +163 -0
  113. package/src/components/waka-credit-projection/index.tsx +345 -0
  114. package/src/components/waka-credit-quota/WakaCreditQuota.stories.tsx +260 -0
  115. package/src/components/waka-credit-quota/index.tsx +461 -0
  116. package/src/components/waka-credit-receipt/WakaCreditReceipt.stories.tsx +98 -0
  117. package/src/components/waka-credit-receipt/index.tsx +247 -0
  118. package/src/components/waka-credit-top-up/WakaCreditTopUp.stories.tsx +196 -0
  119. package/src/components/waka-credit-top-up/index.tsx +403 -0
  120. package/src/components/waka-credit-transaction/WakaCreditTransaction.stories.tsx +218 -0
  121. package/src/components/waka-credit-transaction/index.tsx +278 -0
  122. package/src/components/waka-credit-transfer-form/WakaCreditTransferForm.stories.tsx +122 -0
  123. package/src/components/waka-credit-transfer-form/index.tsx +352 -0
  124. package/src/components/waka-credit-usage-chart/WakaCreditUsageChart.stories.tsx +214 -0
  125. package/src/components/waka-credit-usage-chart/index.tsx +307 -0
  126. package/src/components/waka-doc-breadcrumb/WakaDocBreadcrumb.stories.tsx +47 -0
  127. package/src/components/waka-doc-breadcrumb/index.tsx +42 -0
  128. package/src/components/waka-doc-callout/WakaDocCallout.stories.tsx +67 -0
  129. package/src/components/waka-doc-callout/index.tsx +86 -0
  130. package/src/components/waka-doc-code-block/WakaDocCodeBlock.stories.tsx +92 -0
  131. package/src/components/waka-doc-code-block/index.tsx +120 -0
  132. package/src/components/waka-doc-nav/WakaDocNav.stories.tsx +95 -0
  133. package/src/components/waka-doc-nav/index.tsx +125 -0
  134. package/src/components/waka-doc-renderer/WakaDocRenderer.stories.tsx +120 -0
  135. package/src/components/waka-doc-renderer/index.tsx +217 -0
  136. package/src/components/waka-doc-search/WakaDocSearch.stories.tsx +64 -0
  137. package/src/components/waka-doc-search/index.tsx +158 -0
  138. package/src/components/waka-doc-table/WakaDocTable.stories.tsx +47 -0
  139. package/src/components/waka-doc-table/index.tsx +37 -0
  140. package/src/components/waka-doc-toc/WakaDocToc.stories.tsx +54 -0
  141. package/src/components/waka-doc-toc/index.tsx +90 -0
  142. package/src/components/waka-doc-toolbar/WakaDocToolbar.stories.tsx +79 -0
  143. package/src/components/waka-doc-toolbar/index.tsx +131 -0
  144. package/src/components/waka-doc-version/WakaDocVersion.stories.tsx +41 -0
  145. package/src/components/waka-doc-version/index.tsx +63 -0
  146. package/src/components/waka-document-flyover/index.tsx +36 -0
  147. package/src/components/waka-document-preview-popup/index.tsx +103 -0
  148. package/src/components/waka-hour-balance-badge/index.tsx +43 -0
  149. package/src/components/waka-hour-consumption-table/index.tsx +72 -0
  150. package/src/components/waka-hour-pack-dialog/index.tsx +72 -0
  151. package/src/components/waka-project-stats-header/index.tsx +69 -0
  152. package/src/components/waka-step-comment-bubble/index.tsx +71 -0
  153. package/src/components/waka-step-comment-panel/index.tsx +106 -0
  154. package/src/components/waka-step-permission-matrix/index.tsx +65 -0
  155. package/src/components/waka-time-entry-dialog/index.tsx +131 -0
  156. package/src/components/waka-time-tracking-flyover/index.tsx +41 -0
  157. package/dist/cn-B-fTneHh.js +0 -1
  158. package/dist/cn-DzRe1GWm.mjs +0 -21
  159. package/dist/components/command/index.d.ts +0 -51
  160. package/dist/exceljs.min-BcLLX0PC.js +0 -29
  161. package/dist/exceljs.min-KOayaaQ4.mjs +0 -23013
  162. package/dist/index-B9GTFkji.js +0 -1
  163. package/dist/index-c0jcWyEL.mjs +0 -466
  164. package/dist/types-BOWIoR7j.mjs +0 -1111
  165. package/dist/types-D2yCJ91P.js +0 -1
  166. package/dist/useDataTableImport-COVnvslz.js +0 -9
  167. package/dist/useDataTableImport-DAlxBY8w.mjs +0 -237
  168. /package/dist/{blocks → src/blocks}/activity-timeline/index.d.ts +0 -0
  169. /package/dist/{blocks → src/blocks}/antivirus-dashboard/index.d.ts +0 -0
  170. /package/dist/{blocks → src/blocks}/apm-overview/index.d.ts +0 -0
  171. /package/dist/{blocks → src/blocks}/auth-2fa/index.d.ts +0 -0
  172. /package/dist/{blocks → src/blocks}/calendar-view/index.d.ts +0 -0
  173. /package/dist/{blocks → src/blocks}/chat/index.d.ts +0 -0
  174. /package/dist/{blocks → src/blocks}/chat/widget.d.ts +0 -0
  175. /package/dist/{blocks → src/blocks}/chat-interface/index.d.ts +0 -0
  176. /package/dist/{blocks → src/blocks}/checkout-flow/index.d.ts +0 -0
  177. /package/dist/{blocks → src/blocks}/cicd-builder/index.d.ts +0 -0
  178. /package/dist/{blocks → src/blocks}/clamav-service-status/index.d.ts +0 -0
  179. /package/dist/{blocks → src/blocks}/cloud-cost-dashboard/index.d.ts +0 -0
  180. /package/dist/{blocks → src/blocks}/container-orchestrator/index.d.ts +0 -0
  181. /package/dist/{blocks → src/blocks}/dashboard/index.d.ts +0 -0
  182. /package/dist/{blocks → src/blocks}/dashboard-kpi/index.d.ts +0 -0
  183. /package/dist/{blocks → src/blocks}/database-admin/index.d.ts +0 -0
  184. /package/dist/{blocks → src/blocks}/deployment-dashboard/index.d.ts +0 -0
  185. /package/dist/{blocks → src/blocks}/empty-states/index.d.ts +0 -0
  186. /package/dist/{blocks → src/blocks}/error-pages/index.d.ts +0 -0
  187. /package/dist/{blocks → src/blocks}/faq/index.d.ts +0 -0
  188. /package/dist/{blocks → src/blocks}/file-manager/index.d.ts +0 -0
  189. /package/dist/{blocks → src/blocks}/file-scan-uploader/index.d.ts +0 -0
  190. /package/dist/{blocks → src/blocks}/footer/index.d.ts +0 -0
  191. /package/dist/{blocks → src/blocks}/gitops-sync-status/index.d.ts +0 -0
  192. /package/dist/{blocks → src/blocks}/header/index.d.ts +0 -0
  193. /package/dist/{blocks → src/blocks}/headtab/index.d.ts +0 -0
  194. /package/dist/{blocks → src/blocks}/i18n-editor/index.d.ts +0 -0
  195. /package/dist/{blocks → src/blocks}/incident-manager/index.d.ts +0 -0
  196. /package/dist/{blocks → src/blocks}/index.d.ts +0 -0
  197. /package/dist/{blocks → src/blocks}/infrastructure-map/index.d.ts +0 -0
  198. /package/dist/{blocks → src/blocks}/kanban-board/index.d.ts +0 -0
  199. /package/dist/{blocks → src/blocks}/landing/index.d.ts +0 -0
  200. /package/dist/{blocks → src/blocks}/language-selector/index.d.ts +0 -0
  201. /package/dist/{blocks → src/blocks}/layout/index.d.ts +0 -0
  202. /package/dist/{blocks → src/blocks}/login/index.d.ts +0 -0
  203. /package/dist/{blocks → src/blocks}/login/types.d.ts +0 -0
  204. /package/dist/{blocks → src/blocks}/on-call-schedule/index.d.ts +0 -0
  205. /package/dist/{blocks → src/blocks}/player-profile/index.d.ts +0 -0
  206. /package/dist/{blocks → src/blocks}/pricing/index.d.ts +0 -0
  207. /package/dist/{blocks → src/blocks}/profile/index.d.ts +0 -0
  208. /package/dist/{blocks → src/blocks}/quarantine-manager/index.d.ts +0 -0
  209. /package/dist/{blocks → src/blocks}/release-notes/index.d.ts +0 -0
  210. /package/dist/{blocks → src/blocks}/scan-history-log/index.d.ts +0 -0
  211. /package/dist/{blocks → src/blocks}/scan-policy-editor/index.d.ts +0 -0
  212. /package/dist/{blocks → src/blocks}/scan-report-generator/index.d.ts +0 -0
  213. /package/dist/{blocks → src/blocks}/settings/index.d.ts +0 -0
  214. /package/dist/{blocks → src/blocks}/sidebar/index.d.ts +0 -0
  215. /package/dist/{blocks → src/blocks}/signature-database-manager/index.d.ts +0 -0
  216. /package/dist/{blocks → src/blocks}/threat-alert-banner/index.d.ts +0 -0
  217. /package/dist/{blocks → src/blocks}/user-management/index.d.ts +0 -0
  218. /package/dist/{blocks → src/blocks}/wizard/index.d.ts +0 -0
  219. /package/dist/{cli → src/cli}/commands/add.d.ts +0 -0
  220. /package/dist/{cli → src/cli}/commands/init.d.ts +0 -0
  221. /package/dist/{cli → src/cli}/commands/list.d.ts +0 -0
  222. /package/dist/{cli → src/cli}/commands/search.d.ts +0 -0
  223. /package/dist/{cli → src/cli}/index.d.ts +0 -0
  224. /package/dist/{cli → src/cli}/utils/config.d.ts +0 -0
  225. /package/dist/{cli → src/cli}/utils/logger.d.ts +0 -0
  226. /package/dist/{cli → src/cli}/utils/registry.d.ts +0 -0
  227. /package/dist/{components → src/components}/DataTable/DataTable.d.ts +0 -0
  228. /package/dist/{components → src/components}/DataTable/DataTableAdvanced.d.ts +0 -0
  229. /package/dist/{components → src/components}/DataTable/DataTableColumnResizer.d.ts +0 -0
  230. /package/dist/{components → src/components}/DataTable/DataTableContextMenu.d.ts +0 -0
  231. /package/dist/{components → src/components}/DataTable/DataTableEditCell.d.ts +0 -0
  232. /package/dist/{components → src/components}/DataTable/DataTableFilters.d.ts +0 -0
  233. /package/dist/{components → src/components}/DataTable/DataTableGrouping.d.ts +0 -0
  234. /package/dist/{components → src/components}/DataTable/DataTablePagination.d.ts +0 -0
  235. /package/dist/{components → src/components}/DataTable/DataTableSelection.d.ts +0 -0
  236. /package/dist/{components → src/components}/DataTable/DataTableToolbar.d.ts +0 -0
  237. /package/dist/{components → src/components}/DataTable/examples/EditExample.d.ts +0 -0
  238. /package/dist/{components → src/components}/DataTable/hooks/useDataTable.d.ts +0 -0
  239. /package/dist/{components → src/components}/DataTable/hooks/useDataTableAdvanced.d.ts +0 -0
  240. /package/dist/{components → src/components}/DataTable/hooks/useDataTableEdit.d.ts +0 -0
  241. /package/dist/{components → src/components}/DataTable/hooks/useDataTableExport.d.ts +0 -0
  242. /package/dist/{components → src/components}/DataTable/hooks/useDataTableImport.d.ts +0 -0
  243. /package/dist/{components → src/components}/DataTable/hooks/useDataTableTheme.d.ts +0 -0
  244. /package/dist/{components → src/components}/DataTable/hooks/useDataTableVirtualization.d.ts +0 -0
  245. /package/dist/{components → src/components}/DataTable/hooks/useTableLayout.d.ts +0 -0
  246. /package/dist/{components → src/components}/DataTable/index.d.ts +0 -0
  247. /package/dist/{components → src/components}/DataTable/types.d.ts +0 -0
  248. /package/dist/{components → src/components}/DataTable/utils.d.ts +0 -0
  249. /package/dist/{components → src/components}/accordion/index.d.ts +0 -0
  250. /package/dist/{components → src/components}/alert/index.d.ts +0 -0
  251. /package/dist/{components → src/components}/alert-dialog/index.d.ts +0 -0
  252. /package/dist/{components → src/components}/aspect-ratio/index.d.ts +0 -0
  253. /package/dist/{components → src/components}/avatar/index.d.ts +0 -0
  254. /package/dist/{components → src/components}/badge/index.d.ts +0 -0
  255. /package/dist/{components → src/components}/button/index.d.ts +0 -0
  256. /package/dist/{components → src/components}/calendar/index.d.ts +0 -0
  257. /package/dist/{components → src/components}/card/index.d.ts +0 -0
  258. /package/dist/{components → src/components}/checkbox/index.d.ts +0 -0
  259. /package/dist/{components → src/components}/code/index.d.ts +0 -0
  260. /package/dist/{components → src/components}/collapsible/index.d.ts +0 -0
  261. /package/dist/{components → src/components}/context-menu/index.d.ts +0 -0
  262. /package/dist/{components → src/components}/dialog/index.d.ts +0 -0
  263. /package/dist/{components → src/components}/dropdown-menu/index.d.ts +0 -0
  264. /package/dist/{components → src/components}/error-boundary/ErrorBoundary.d.ts +0 -0
  265. /package/dist/{components → src/components}/error-boundary/index.d.ts +0 -0
  266. /package/dist/{components → src/components}/form/index.d.ts +0 -0
  267. /package/dist/{components → src/components}/hover-card/index.d.ts +0 -0
  268. /package/dist/{components → src/components}/input/index.d.ts +0 -0
  269. /package/dist/{components → src/components}/input-otp/index.d.ts +0 -0
  270. /package/dist/{components → src/components}/label/index.d.ts +0 -0
  271. /package/dist/{components → src/components}/language-selector/index.d.ts +0 -0
  272. /package/dist/{components → src/components}/menubar/index.d.ts +0 -0
  273. /package/dist/{components → src/components}/navigation-menu/index.d.ts +0 -0
  274. /package/dist/{components → src/components}/popover/index.d.ts +0 -0
  275. /package/dist/{components → src/components}/progress/index.d.ts +0 -0
  276. /package/dist/{components → src/components}/radio-group/index.d.ts +0 -0
  277. /package/dist/{components → src/components}/scroll-area/index.d.ts +0 -0
  278. /package/dist/{components → src/components}/select/index.d.ts +0 -0
  279. /package/dist/{components → src/components}/separator/index.d.ts +0 -0
  280. /package/dist/{components → src/components}/sheet/index.d.ts +0 -0
  281. /package/dist/{components → src/components}/skeleton/index.d.ts +0 -0
  282. /package/dist/{components → src/components}/slider/index.d.ts +0 -0
  283. /package/dist/{components → src/components}/switch/index.d.ts +0 -0
  284. /package/dist/{components → src/components}/table/index.d.ts +0 -0
  285. /package/dist/{components → src/components}/tabs/index.d.ts +0 -0
  286. /package/dist/{components → src/components}/textarea/index.d.ts +0 -0
  287. /package/dist/{components → src/components}/theme-selector/index.d.ts +0 -0
  288. /package/dist/{components → src/components}/toast/index.d.ts +0 -0
  289. /package/dist/{components → src/components}/toaster/index.d.ts +0 -0
  290. /package/dist/{components → src/components}/toggle/index.d.ts +0 -0
  291. /package/dist/{components → src/components}/tooltip/index.d.ts +0 -0
  292. /package/dist/{components → src/components}/typography/index.d.ts +0 -0
  293. /package/dist/{components → src/components}/waka-3d-pie-chart/index.d.ts +0 -0
  294. /package/dist/{components → src/components}/waka-achievement-unlock/index.d.ts +0 -0
  295. /package/dist/{components → src/components}/waka-activity-feed/index.d.ts +0 -0
  296. /package/dist/{components → src/components}/waka-ad-banner/index.d.ts +0 -0
  297. /package/dist/{components → src/components}/waka-ad-fallback/index.d.ts +0 -0
  298. /package/dist/{components → src/components}/waka-ad-inline/index.d.ts +0 -0
  299. /package/dist/{components → src/components}/waka-ad-interstitial/index.d.ts +0 -0
  300. /package/dist/{components → src/components}/waka-ad-placeholder/index.d.ts +0 -0
  301. /package/dist/{components → src/components}/waka-ad-provider/index.d.ts +0 -0
  302. /package/dist/{components → src/components}/waka-ad-sidebar/index.d.ts +0 -0
  303. /package/dist/{components → src/components}/waka-ad-sticky-footer/index.d.ts +0 -0
  304. /package/dist/{components → src/components}/waka-address-autocomplete/index.d.ts +0 -0
  305. /package/dist/{components → src/components}/waka-admincrumb/index.d.ts +0 -0
  306. /package/dist/{components → src/components}/waka-alert-panel/index.d.ts +0 -0
  307. /package/dist/{components → src/components}/waka-alert-stack/index.d.ts +0 -0
  308. /package/dist/{components → src/components}/waka-allocation-matrix/index.d.ts +0 -0
  309. /package/dist/{components → src/components}/waka-approval-chain/index.d.ts +0 -0
  310. /package/dist/{components → src/components}/waka-artifact-list/index.d.ts +0 -0
  311. /package/dist/{components → src/components}/waka-audit-log/index.d.ts +0 -0
  312. /package/dist/{components → src/components}/waka-autocomplete/index.d.ts +0 -0
  313. /package/dist/{components → src/components}/waka-badge-showcase/index.d.ts +0 -0
  314. /package/dist/{components → src/components}/waka-barcode/index.d.ts +0 -0
  315. /package/dist/{components → src/components}/waka-biometric-prompt/index.d.ts +0 -0
  316. /package/dist/{components → src/components}/waka-bottom-sheet/index.d.ts +0 -0
  317. /package/dist/{components → src/components}/waka-breadcrumb/index.d.ts +0 -0
  318. /package/dist/{components → src/components}/waka-breadcrumb-path/index.d.ts +0 -0
  319. /package/dist/{components → src/components}/waka-budget-burn/index.d.ts +0 -0
  320. /package/dist/{components → src/components}/waka-build-matrix/index.d.ts +0 -0
  321. /package/dist/{components → src/components}/waka-capacity-planner/index.d.ts +0 -0
  322. /package/dist/{components → src/components}/waka-carousel/index.d.ts +0 -0
  323. /package/dist/{components → src/components}/waka-cart-summary/index.d.ts +0 -0
  324. /package/dist/{components → src/components}/waka-challenge-timer/index.d.ts +0 -0
  325. /package/dist/{components → src/components}/waka-charts/WakaAreaChart.d.ts +0 -0
  326. /package/dist/{components → src/components}/waka-charts/WakaBarChart.d.ts +0 -0
  327. /package/dist/{components → src/components}/waka-charts/WakaChart.d.ts +0 -0
  328. /package/dist/{components → src/components}/waka-charts/WakaLineChart.d.ts +0 -0
  329. /package/dist/{components → src/components}/waka-charts/WakaMiniChart.d.ts +0 -0
  330. /package/dist/{components → src/components}/waka-charts/WakaPieChart.d.ts +0 -0
  331. /package/dist/{components → src/components}/waka-charts/WakaSparkline.d.ts +0 -0
  332. /package/dist/{components → src/components}/waka-charts/dataTableHelpers.d.ts +0 -0
  333. /package/dist/{components → src/components}/waka-charts/hooks/useChartTheme.d.ts +0 -0
  334. /package/dist/{components → src/components}/waka-charts/hooks/useRechartsLoader.d.ts +0 -0
  335. /package/dist/{components → src/components}/waka-charts/index.d.ts +0 -0
  336. /package/dist/{components → src/components}/waka-charts/types.d.ts +0 -0
  337. /package/dist/{components → src/components}/waka-chat-bubble/index.d.ts +0 -0
  338. /package/dist/{components → src/components}/waka-checklist/index.d.ts +0 -0
  339. /package/dist/{components → src/components}/waka-checkout-stepper/index.d.ts +0 -0
  340. /package/dist/{components → src/components}/waka-cohort-table/index.d.ts +0 -0
  341. /package/dist/{components → src/components}/waka-color-picker/index.d.ts +0 -0
  342. /package/dist/{components → src/components}/waka-combo-counter/index.d.ts +0 -0
  343. /package/dist/{components → src/components}/waka-combobox/index.d.ts +0 -0
  344. /package/dist/{components → src/components}/waka-command-bar/index.d.ts +0 -0
  345. /package/dist/{components → src/components}/waka-compare-period/index.d.ts +0 -0
  346. /package/dist/{components → src/components}/waka-config-comparator/index.d.ts +0 -0
  347. /package/dist/{components → src/components}/waka-connection-matrix/index.d.ts +0 -0
  348. /package/dist/{components → src/components}/waka-container-list/index.d.ts +0 -0
  349. /package/dist/{components → src/components}/waka-content-recommendation/index.d.ts +0 -0
  350. /package/dist/{components → src/components}/waka-contribution-graph/index.d.ts +0 -0
  351. /package/dist/{components → src/components}/waka-cost-breakdown/index.d.ts +0 -0
  352. /package/dist/{components → src/components}/waka-coupon-input/index.d.ts +0 -0
  353. /package/dist/{components → src/components}/waka-credit-card-input/index.d.ts +0 -0
  354. /package/dist/{components → src/components}/waka-daily-reward/index.d.ts +0 -0
  355. /package/dist/{components → src/components}/waka-database-card/index.d.ts +0 -0
  356. /package/dist/{components → src/components}/waka-date-range-picker/index.d.ts +0 -0
  357. /package/dist/{components → src/components}/waka-datetime-picker/index.d.ts +0 -0
  358. /package/dist/{components → src/components}/waka-datetime-picker.form-integration/index.d.ts +0 -0
  359. /package/dist/{components → src/components}/waka-dependency-tree/index.d.ts +0 -0
  360. /package/dist/{components → src/components}/waka-deployment-lane/index.d.ts +0 -0
  361. /package/dist/{components → src/components}/waka-device-trust/index.d.ts +0 -0
  362. /package/dist/{components → src/components}/waka-dock/index.d.ts +0 -0
  363. /package/dist/{components → src/components}/waka-drawer/index.d.ts +0 -0
  364. /package/dist/{components → src/components}/waka-empty-state/index.d.ts +0 -0
  365. /package/dist/{components → src/components}/waka-env-var-editor/index.d.ts +0 -0
  366. /package/dist/{components → src/components}/waka-error-shake/index.d.ts +0 -0
  367. /package/dist/{components → src/components}/waka-feature-announcement/index.d.ts +0 -0
  368. /package/dist/{components → src/components}/waka-feature-flag-row/index.d.ts +0 -0
  369. /package/dist/{components → src/components}/waka-file-upload/index.d.ts +0 -0
  370. /package/dist/{components → src/components}/waka-floating-nav/index.d.ts +0 -0
  371. /package/dist/{components → src/components}/waka-flow-diagram/index.d.ts +0 -0
  372. /package/dist/{components → src/components}/waka-funnel-chart/index.d.ts +0 -0
  373. /package/dist/{components → src/components}/waka-glow-card/index.d.ts +0 -0
  374. /package/dist/{components → src/components}/waka-goal-progress/index.d.ts +0 -0
  375. /package/dist/{components → src/components}/waka-haptic-button/index.d.ts +0 -0
  376. /package/dist/{components → src/components}/waka-health-pulse/index.d.ts +0 -0
  377. /package/dist/{components → src/components}/waka-heatmap/index.d.ts +0 -0
  378. /package/dist/{components → src/components}/waka-hotspot/index.d.ts +0 -0
  379. /package/dist/{components → src/components}/waka-image/index.d.ts +0 -0
  380. /package/dist/{components → src/components}/waka-incident-timeline/index.d.ts +0 -0
  381. /package/dist/{components → src/components}/waka-invoice-preview/index.d.ts +0 -0
  382. /package/dist/{components → src/components}/waka-kanban/index.d.ts +0 -0
  383. /package/dist/{components → src/components}/waka-kpi-dashboard/index.d.ts +0 -0
  384. /package/dist/{components → src/components}/waka-kubernetes-overview/index.d.ts +0 -0
  385. /package/dist/{components → src/components}/waka-leaderboard/index.d.ts +0 -0
  386. /package/dist/{components → src/components}/waka-level-progress/index.d.ts +0 -0
  387. /package/dist/{components → src/components}/waka-liquid-button/index.d.ts +0 -0
  388. /package/dist/{components → src/components}/waka-loading-orbit/index.d.ts +0 -0
  389. /package/dist/{components → src/components}/waka-log-viewer/index.d.ts +0 -0
  390. /package/dist/{components → src/components}/waka-loot-box/index.d.ts +0 -0
  391. /package/dist/{components → src/components}/waka-magic-link/index.d.ts +0 -0
  392. /package/dist/{components → src/components}/waka-magnetic-button/index.d.ts +0 -0
  393. /package/dist/{components → src/components}/waka-mention-input/index.d.ts +0 -0
  394. /package/dist/{components → src/components}/waka-metric-sparkline/index.d.ts +0 -0
  395. /package/dist/{components → src/components}/waka-migration-list/index.d.ts +0 -0
  396. /package/dist/{components → src/components}/waka-milestone-road/index.d.ts +0 -0
  397. /package/dist/{components → src/components}/waka-modal/index.d.ts +0 -0
  398. /package/dist/{components → src/components}/waka-morph-button/index.d.ts +0 -0
  399. /package/dist/{components → src/components}/waka-network-topology/index.d.ts +0 -0
  400. /package/dist/{components → src/components}/waka-notifications/index.d.ts +0 -0
  401. /package/dist/{components → src/components}/waka-number-input/index.d.ts +0 -0
  402. /package/dist/{components → src/components}/waka-orbital-menu/index.d.ts +0 -0
  403. /package/dist/{components → src/components}/waka-order-tracker/index.d.ts +0 -0
  404. /package/dist/{components → src/components}/waka-outstream-video/index.d.ts +0 -0
  405. /package/dist/{components → src/components}/waka-pagination/index.d.ts +0 -0
  406. /package/dist/{components → src/components}/waka-password-strength/index.d.ts +0 -0
  407. /package/dist/{components → src/components}/waka-payment-method-picker/index.d.ts +0 -0
  408. /package/dist/{components → src/components}/waka-permission-matrix/index.d.ts +0 -0
  409. /package/dist/{components → src/components}/waka-phone-input/index.d.ts +0 -0
  410. /package/dist/{components → src/components}/waka-pipeline-view/index.d.ts +0 -0
  411. /package/dist/{components → src/components}/waka-player-card/index.d.ts +0 -0
  412. /package/dist/{components → src/components}/waka-pod-card/index.d.ts +0 -0
  413. /package/dist/{components → src/components}/waka-points-popup/index.d.ts +0 -0
  414. /package/dist/{components → src/components}/waka-power-up/index.d.ts +0 -0
  415. /package/dist/{components → src/components}/waka-presence-indicator/index.d.ts +0 -0
  416. /package/dist/{components → src/components}/waka-pricing-table/index.d.ts +0 -0
  417. /package/dist/{components → src/components}/waka-product-card/index.d.ts +0 -0
  418. /package/dist/{components → src/components}/waka-progress-onboarding/index.d.ts +0 -0
  419. /package/dist/{components → src/components}/waka-pull-to-refresh/index.d.ts +0 -0
  420. /package/dist/{components → src/components}/waka-qrcode/index.d.ts +0 -0
  421. /package/dist/{components → src/components}/waka-query-explain/index.d.ts +0 -0
  422. /package/dist/{components → src/components}/waka-quest-card/index.d.ts +0 -0
  423. /package/dist/{components → src/components}/waka-quota-bar/index.d.ts +0 -0
  424. /package/dist/{components → src/components}/waka-radar-score/index.d.ts +0 -0
  425. /package/dist/{components → src/components}/waka-rank-badge/index.d.ts +0 -0
  426. /package/dist/{components → src/components}/waka-rating-input/index.d.ts +0 -0
  427. /package/dist/{components → src/components}/waka-reaction-picker/index.d.ts +0 -0
  428. /package/dist/{components → src/components}/waka-region-map/index.d.ts +0 -0
  429. /package/dist/{components → src/components}/waka-resource-gauge/index.d.ts +0 -0
  430. /package/dist/{components → src/components}/waka-resource-pool/index.d.ts +0 -0
  431. /package/dist/{components → src/components}/waka-rich-text-editor/index.d.ts +0 -0
  432. /package/dist/{components → src/components}/waka-rollback-slider/index.d.ts +0 -0
  433. /package/dist/{components → src/components}/waka-sankey-diagram/index.d.ts +0 -0
  434. /package/dist/{components → src/components}/waka-schedule-picker/index.d.ts +0 -0
  435. /package/dist/{components → src/components}/waka-scratch-card/index.d.ts +0 -0
  436. /package/dist/{components → src/components}/waka-season-pass/index.d.ts +0 -0
  437. /package/dist/{components → src/components}/waka-secret-card/index.d.ts +0 -0
  438. /package/dist/{components → src/components}/waka-security-scan-result/index.d.ts +0 -0
  439. /package/dist/{components → src/components}/waka-security-score/index.d.ts +0 -0
  440. /package/dist/{components → src/components}/waka-segmented-control/index.d.ts +0 -0
  441. /package/dist/{components → src/components}/waka-server-rack/index.d.ts +0 -0
  442. /package/dist/{components → src/components}/waka-service-graph/index.d.ts +0 -0
  443. /package/dist/{components → src/components}/waka-session-manager/index.d.ts +0 -0
  444. /package/dist/{components → src/components}/waka-signature-pad/index.d.ts +0 -0
  445. /package/dist/{components → src/components}/waka-skeleton-wave/index.d.ts +0 -0
  446. /package/dist/{components → src/components}/waka-skill-tree/index.d.ts +0 -0
  447. /package/dist/{components → src/components}/waka-sla-tracker/index.d.ts +0 -0
  448. /package/dist/{components → src/components}/waka-slider-range/index.d.ts +0 -0
  449. /package/dist/{components → src/components}/waka-spin-wheel/index.d.ts +0 -0
  450. /package/dist/{components → src/components}/waka-spinner/index.d.ts +0 -0
  451. /package/dist/{components → src/components}/waka-sponsored-badge/index.d.ts +0 -0
  452. /package/dist/{components → src/components}/waka-sponsored-card/index.d.ts +0 -0
  453. /package/dist/{components → src/components}/waka-sponsored-feed/index.d.ts +0 -0
  454. /package/dist/{components → src/components}/waka-spotlight/index.d.ts +0 -0
  455. /package/dist/{components → src/components}/waka-stat/index.d.ts +0 -0
  456. /package/dist/{components → src/components}/waka-stats-hexagon/index.d.ts +0 -0
  457. /package/dist/{components → src/components}/waka-status-matrix/index.d.ts +0 -0
  458. /package/dist/{components → src/components}/waka-stepper/index.d.ts +0 -0
  459. /package/dist/{components → src/components}/waka-streak-counter/index.d.ts +0 -0
  460. /package/dist/{components → src/components}/waka-success-explosion/index.d.ts +0 -0
  461. /package/dist/{components → src/components}/waka-swipe-card/index.d.ts +0 -0
  462. /package/dist/{components → src/components}/waka-tabs-morph/index.d.ts +0 -0
  463. /package/dist/{components → src/components}/waka-tag-input/index.d.ts +0 -0
  464. /package/dist/{components → src/components}/waka-team-banner/index.d.ts +0 -0
  465. /package/dist/{components → src/components}/waka-terminal-output/index.d.ts +0 -0
  466. /package/dist/{components → src/components}/waka-test-report/index.d.ts +0 -0
  467. /package/dist/{components → src/components}/waka-theme-creator/index.d.ts +0 -0
  468. /package/dist/{components → src/components}/waka-theme-manager/index.d.ts +0 -0
  469. /package/dist/{components → src/components}/waka-thread-view/index.d.ts +0 -0
  470. /package/dist/{components → src/components}/waka-tilt-card/index.d.ts +0 -0
  471. /package/dist/{components → src/components}/waka-time-picker/index.d.ts +0 -0
  472. /package/dist/{components → src/components}/waka-timeline/index.d.ts +0 -0
  473. /package/dist/{components → src/components}/waka-tooltip-tour/index.d.ts +0 -0
  474. /package/dist/{components → src/components}/waka-tour-guide/index.d.ts +0 -0
  475. /package/dist/{components → src/components}/waka-tournament-bracket/index.d.ts +0 -0
  476. /package/dist/{components → src/components}/waka-trace-viewer/index.d.ts +0 -0
  477. /package/dist/{components → src/components}/waka-tree/index.d.ts +0 -0
  478. /package/dist/{components → src/components}/waka-treemap-chart/index.d.ts +0 -0
  479. /package/dist/{components → src/components}/waka-two-factor-setup/index.d.ts +0 -0
  480. /package/dist/{components → src/components}/waka-typewriter/index.d.ts +0 -0
  481. /package/dist/{components → src/components}/waka-typing-indicator/index.d.ts +0 -0
  482. /package/dist/{components → src/components}/waka-versus-card/index.d.ts +0 -0
  483. /package/dist/{components → src/components}/waka-video/index.d.ts +0 -0
  484. /package/dist/{components → src/components}/waka-video-ad/index.d.ts +0 -0
  485. /package/dist/{components → src/components}/waka-video-call/index.d.ts +0 -0
  486. /package/dist/{components → src/components}/waka-video-overlay/index.d.ts +0 -0
  487. /package/dist/{components → src/components}/waka-virtual-list/index.d.ts +0 -0
  488. /package/dist/{components → src/components}/waka-voice-message/index.d.ts +0 -0
  489. /package/dist/{components → src/components}/waka-welcome-modal/index.d.ts +0 -0
  490. /package/dist/{components → src/components}/waka-xp-bar/index.d.ts +0 -0
  491. /package/dist/{context → src/context}/admincrumb-context.d.ts +0 -0
  492. /package/dist/{context → src/context}/index.d.ts +0 -0
  493. /package/dist/{context → src/context}/language-context.d.ts +0 -0
  494. /package/dist/{context → src/context}/theme-context.d.ts +0 -0
  495. /package/dist/{context → src/context}/theme-provider.d.ts +0 -0
  496. /package/dist/{context → src/context}/waka-provider.d.ts +0 -0
  497. /package/dist/{hooks → src/hooks}/index.d.ts +0 -0
  498. /package/dist/{hooks → src/hooks}/use-toast.d.ts +0 -0
  499. /package/dist/{hooks → src/hooks}/use-translation.d.ts +0 -0
  500. /package/dist/{hooks → src/hooks}/useToast.d.ts +0 -0
  501. /package/dist/{lib → src/lib}/i18n.d.ts +0 -0
  502. /package/dist/{stories → src/stories}/Button.d.ts +0 -0
  503. /package/dist/{stories → src/stories}/Button.stories.d.ts +0 -0
  504. /package/dist/{stories → src/stories}/Header.d.ts +0 -0
  505. /package/dist/{stories → src/stories}/Header.stories.d.ts +0 -0
  506. /package/dist/{stories → src/stories}/Page.d.ts +0 -0
  507. /package/dist/{stories → src/stories}/Page.stories.d.ts +0 -0
  508. /package/dist/{types → src/types}/index.d.ts +0 -0
  509. /package/dist/{types → src/types}/link.d.ts +0 -0
  510. /package/dist/{types → src/types}/provider.d.ts +0 -0
  511. /package/dist/{utils → src/utils}/cn.d.ts +0 -0
  512. /package/dist/{utils → src/utils}/datetime-helpers.d.ts +0 -0
  513. /package/dist/{utils → src/utils}/error-handling.d.ts +0 -0
  514. /package/dist/{utils → src/utils}/index.d.ts +0 -0
  515. /package/dist/{utils → src/utils}/logger.d.ts +0 -0
  516. /package/dist/{utils → src/utils}/security.d.ts +0 -0
  517. /package/dist/{utils → src/utils}/theme-loader.d.ts +0 -0
  518. /package/dist/{utils → src/utils}/tweak.d.ts +0 -0
@@ -26,9 +26,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
 
29
- // node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/error.js
29
+ // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js
30
30
  var require_error = __commonJS({
31
- "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/error.js"(exports2) {
31
+ "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js"(exports2) {
32
32
  var CommanderError2 = class extends Error {
33
33
  /**
34
34
  * Constructs the CommanderError class
@@ -61,9 +61,9 @@ var require_error = __commonJS({
61
61
  }
62
62
  });
63
63
 
64
- // node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/argument.js
64
+ // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/argument.js
65
65
  var require_argument = __commonJS({
66
- "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/argument.js"(exports2) {
66
+ "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/argument.js"(exports2) {
67
67
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
68
68
  var Argument2 = class {
69
69
  /**
@@ -95,7 +95,7 @@ var require_argument = __commonJS({
95
95
  this._name = name;
96
96
  break;
97
97
  }
98
- if (this._name.length > 3 && this._name.slice(-3) === "...") {
98
+ if (this._name.endsWith("...")) {
99
99
  this.variadic = true;
100
100
  this._name = this._name.slice(0, -3);
101
101
  }
@@ -111,11 +111,12 @@ var require_argument = __commonJS({
111
111
  /**
112
112
  * @package
113
113
  */
114
- _concatValue(value, previous) {
114
+ _collectValue(value, previous) {
115
115
  if (previous === this.defaultValue || !Array.isArray(previous)) {
116
116
  return [value];
117
117
  }
118
- return previous.concat(value);
118
+ previous.push(value);
119
+ return previous;
119
120
  }
120
121
  /**
121
122
  * Set the default value, and optionally supply the description to be displayed in the help.
@@ -154,7 +155,7 @@ var require_argument = __commonJS({
154
155
  );
155
156
  }
156
157
  if (this.variadic) {
157
- return this._concatValue(arg, previous);
158
+ return this._collectValue(arg, previous);
158
159
  }
159
160
  return arg;
160
161
  };
@@ -188,17 +189,29 @@ var require_argument = __commonJS({
188
189
  }
189
190
  });
190
191
 
191
- // node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/help.js
192
+ // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/help.js
192
193
  var require_help = __commonJS({
193
- "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/help.js"(exports2) {
194
+ "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/help.js"(exports2) {
194
195
  var { humanReadableArgName } = require_argument();
195
196
  var Help2 = class {
196
197
  constructor() {
197
198
  this.helpWidth = void 0;
199
+ this.minWidthToWrap = 40;
198
200
  this.sortSubcommands = false;
199
201
  this.sortOptions = false;
200
202
  this.showGlobalOptions = false;
201
203
  }
204
+ /**
205
+ * prepareContext is called by Commander after applying overrides from `Command.configureHelp()`
206
+ * and just before calling `formatHelp()`.
207
+ *
208
+ * Commander just uses the helpWidth and the rest is provided for optional use by more complex subclasses.
209
+ *
210
+ * @param {{ error?: boolean, helpWidth?: number, outputHasColors?: boolean }} contextOptions
211
+ */
212
+ prepareContext(contextOptions) {
213
+ this.helpWidth = this.helpWidth ?? contextOptions.helpWidth ?? 80;
214
+ }
202
215
  /**
203
216
  * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.
204
217
  *
@@ -335,7 +348,12 @@ var require_help = __commonJS({
335
348
  */
336
349
  longestSubcommandTermLength(cmd, helper) {
337
350
  return helper.visibleCommands(cmd).reduce((max, command) => {
338
- return Math.max(max, helper.subcommandTerm(command).length);
351
+ return Math.max(
352
+ max,
353
+ this.displayWidth(
354
+ helper.styleSubcommandTerm(helper.subcommandTerm(command))
355
+ )
356
+ );
339
357
  }, 0);
340
358
  }
341
359
  /**
@@ -347,7 +365,10 @@ var require_help = __commonJS({
347
365
  */
348
366
  longestOptionTermLength(cmd, helper) {
349
367
  return helper.visibleOptions(cmd).reduce((max, option) => {
350
- return Math.max(max, helper.optionTerm(option).length);
368
+ return Math.max(
369
+ max,
370
+ this.displayWidth(helper.styleOptionTerm(helper.optionTerm(option)))
371
+ );
351
372
  }, 0);
352
373
  }
353
374
  /**
@@ -359,7 +380,10 @@ var require_help = __commonJS({
359
380
  */
360
381
  longestGlobalOptionTermLength(cmd, helper) {
361
382
  return helper.visibleGlobalOptions(cmd).reduce((max, option) => {
362
- return Math.max(max, helper.optionTerm(option).length);
383
+ return Math.max(
384
+ max,
385
+ this.displayWidth(helper.styleOptionTerm(helper.optionTerm(option)))
386
+ );
363
387
  }, 0);
364
388
  }
365
389
  /**
@@ -371,7 +395,12 @@ var require_help = __commonJS({
371
395
  */
372
396
  longestArgumentTermLength(cmd, helper) {
373
397
  return helper.visibleArguments(cmd).reduce((max, argument) => {
374
- return Math.max(max, helper.argumentTerm(argument).length);
398
+ return Math.max(
399
+ max,
400
+ this.displayWidth(
401
+ helper.styleArgumentTerm(helper.argumentTerm(argument))
402
+ )
403
+ );
375
404
  }, 0);
376
405
  }
377
406
  /**
@@ -439,7 +468,11 @@ var require_help = __commonJS({
439
468
  extraInfo.push(`env: ${option.envVar}`);
440
469
  }
441
470
  if (extraInfo.length > 0) {
442
- return `${option.description} (${extraInfo.join(", ")})`;
471
+ const extraDescription = `(${extraInfo.join(", ")})`;
472
+ if (option.description) {
473
+ return `${option.description} ${extraDescription}`;
474
+ }
475
+ return extraDescription;
443
476
  }
444
477
  return option.description;
445
478
  }
@@ -463,14 +496,49 @@ var require_help = __commonJS({
463
496
  );
464
497
  }
465
498
  if (extraInfo.length > 0) {
466
- const extraDescripton = `(${extraInfo.join(", ")})`;
499
+ const extraDescription = `(${extraInfo.join(", ")})`;
467
500
  if (argument.description) {
468
- return `${argument.description} ${extraDescripton}`;
501
+ return `${argument.description} ${extraDescription}`;
469
502
  }
470
- return extraDescripton;
503
+ return extraDescription;
471
504
  }
472
505
  return argument.description;
473
506
  }
507
+ /**
508
+ * Format a list of items, given a heading and an array of formatted items.
509
+ *
510
+ * @param {string} heading
511
+ * @param {string[]} items
512
+ * @param {Help} helper
513
+ * @returns string[]
514
+ */
515
+ formatItemList(heading, items, helper) {
516
+ if (items.length === 0) return [];
517
+ return [helper.styleTitle(heading), ...items, ""];
518
+ }
519
+ /**
520
+ * Group items by their help group heading.
521
+ *
522
+ * @param {Command[] | Option[]} unsortedItems
523
+ * @param {Command[] | Option[]} visibleItems
524
+ * @param {Function} getGroup
525
+ * @returns {Map<string, Command[] | Option[]>}
526
+ */
527
+ groupItems(unsortedItems, visibleItems, getGroup) {
528
+ const result = /* @__PURE__ */ new Map();
529
+ unsortedItems.forEach((item) => {
530
+ const group = getGroup(item);
531
+ if (!result.has(group)) result.set(group, []);
532
+ });
533
+ visibleItems.forEach((item) => {
534
+ const group = getGroup(item);
535
+ if (!result.has(group)) {
536
+ result.set(group, []);
537
+ }
538
+ result.get(group).push(item);
539
+ });
540
+ return result;
541
+ }
474
542
  /**
475
543
  * Generate the built-in help text.
476
544
  *
@@ -480,75 +548,142 @@ var require_help = __commonJS({
480
548
  */
481
549
  formatHelp(cmd, helper) {
482
550
  const termWidth = helper.padWidth(cmd, helper);
483
- const helpWidth = helper.helpWidth || 80;
484
- const itemIndentWidth = 2;
485
- const itemSeparatorWidth = 2;
486
- function formatItem(term, description) {
487
- if (description) {
488
- const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`;
489
- return helper.wrap(
490
- fullText,
491
- helpWidth - itemIndentWidth,
492
- termWidth + itemSeparatorWidth
493
- );
494
- }
495
- return term;
551
+ const helpWidth = helper.helpWidth ?? 80;
552
+ function callFormatItem(term, description) {
553
+ return helper.formatItem(term, termWidth, description, helper);
496
554
  }
497
- function formatList(textArray) {
498
- return textArray.join("\n").replace(/^/gm, " ".repeat(itemIndentWidth));
499
- }
500
- let output = [`Usage: ${helper.commandUsage(cmd)}`, ""];
555
+ let output = [
556
+ `${helper.styleTitle("Usage:")} ${helper.styleUsage(helper.commandUsage(cmd))}`,
557
+ ""
558
+ ];
501
559
  const commandDescription = helper.commandDescription(cmd);
502
560
  if (commandDescription.length > 0) {
503
561
  output = output.concat([
504
- helper.wrap(commandDescription, helpWidth, 0),
562
+ helper.boxWrap(
563
+ helper.styleCommandDescription(commandDescription),
564
+ helpWidth
565
+ ),
505
566
  ""
506
567
  ]);
507
568
  }
508
569
  const argumentList = helper.visibleArguments(cmd).map((argument) => {
509
- return formatItem(
510
- helper.argumentTerm(argument),
511
- helper.argumentDescription(argument)
570
+ return callFormatItem(
571
+ helper.styleArgumentTerm(helper.argumentTerm(argument)),
572
+ helper.styleArgumentDescription(helper.argumentDescription(argument))
512
573
  );
513
574
  });
514
- if (argumentList.length > 0) {
515
- output = output.concat(["Arguments:", formatList(argumentList), ""]);
516
- }
517
- const optionList = helper.visibleOptions(cmd).map((option) => {
518
- return formatItem(
519
- helper.optionTerm(option),
520
- helper.optionDescription(option)
521
- );
575
+ output = output.concat(
576
+ this.formatItemList("Arguments:", argumentList, helper)
577
+ );
578
+ const optionGroups = this.groupItems(
579
+ cmd.options,
580
+ helper.visibleOptions(cmd),
581
+ (option) => option.helpGroupHeading ?? "Options:"
582
+ );
583
+ optionGroups.forEach((options, group) => {
584
+ const optionList = options.map((option) => {
585
+ return callFormatItem(
586
+ helper.styleOptionTerm(helper.optionTerm(option)),
587
+ helper.styleOptionDescription(helper.optionDescription(option))
588
+ );
589
+ });
590
+ output = output.concat(this.formatItemList(group, optionList, helper));
522
591
  });
523
- if (optionList.length > 0) {
524
- output = output.concat(["Options:", formatList(optionList), ""]);
525
- }
526
- if (this.showGlobalOptions) {
592
+ if (helper.showGlobalOptions) {
527
593
  const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
528
- return formatItem(
529
- helper.optionTerm(option),
530
- helper.optionDescription(option)
594
+ return callFormatItem(
595
+ helper.styleOptionTerm(helper.optionTerm(option)),
596
+ helper.styleOptionDescription(helper.optionDescription(option))
531
597
  );
532
598
  });
533
- if (globalOptionList.length > 0) {
534
- output = output.concat([
535
- "Global Options:",
536
- formatList(globalOptionList),
537
- ""
538
- ]);
539
- }
540
- }
541
- const commandList = helper.visibleCommands(cmd).map((cmd2) => {
542
- return formatItem(
543
- helper.subcommandTerm(cmd2),
544
- helper.subcommandDescription(cmd2)
599
+ output = output.concat(
600
+ this.formatItemList("Global Options:", globalOptionList, helper)
545
601
  );
546
- });
547
- if (commandList.length > 0) {
548
- output = output.concat(["Commands:", formatList(commandList), ""]);
549
602
  }
603
+ const commandGroups = this.groupItems(
604
+ cmd.commands,
605
+ helper.visibleCommands(cmd),
606
+ (sub) => sub.helpGroup() || "Commands:"
607
+ );
608
+ commandGroups.forEach((commands, group) => {
609
+ const commandList = commands.map((sub) => {
610
+ return callFormatItem(
611
+ helper.styleSubcommandTerm(helper.subcommandTerm(sub)),
612
+ helper.styleSubcommandDescription(helper.subcommandDescription(sub))
613
+ );
614
+ });
615
+ output = output.concat(this.formatItemList(group, commandList, helper));
616
+ });
550
617
  return output.join("\n");
551
618
  }
619
+ /**
620
+ * Return display width of string, ignoring ANSI escape sequences. Used in padding and wrapping calculations.
621
+ *
622
+ * @param {string} str
623
+ * @returns {number}
624
+ */
625
+ displayWidth(str) {
626
+ return stripColor(str).length;
627
+ }
628
+ /**
629
+ * Style the title for displaying in the help. Called with 'Usage:', 'Options:', etc.
630
+ *
631
+ * @param {string} str
632
+ * @returns {string}
633
+ */
634
+ styleTitle(str) {
635
+ return str;
636
+ }
637
+ styleUsage(str) {
638
+ return str.split(" ").map((word) => {
639
+ if (word === "[options]") return this.styleOptionText(word);
640
+ if (word === "[command]") return this.styleSubcommandText(word);
641
+ if (word[0] === "[" || word[0] === "<")
642
+ return this.styleArgumentText(word);
643
+ return this.styleCommandText(word);
644
+ }).join(" ");
645
+ }
646
+ styleCommandDescription(str) {
647
+ return this.styleDescriptionText(str);
648
+ }
649
+ styleOptionDescription(str) {
650
+ return this.styleDescriptionText(str);
651
+ }
652
+ styleSubcommandDescription(str) {
653
+ return this.styleDescriptionText(str);
654
+ }
655
+ styleArgumentDescription(str) {
656
+ return this.styleDescriptionText(str);
657
+ }
658
+ styleDescriptionText(str) {
659
+ return str;
660
+ }
661
+ styleOptionTerm(str) {
662
+ return this.styleOptionText(str);
663
+ }
664
+ styleSubcommandTerm(str) {
665
+ return str.split(" ").map((word) => {
666
+ if (word === "[options]") return this.styleOptionText(word);
667
+ if (word[0] === "[" || word[0] === "<")
668
+ return this.styleArgumentText(word);
669
+ return this.styleSubcommandText(word);
670
+ }).join(" ");
671
+ }
672
+ styleArgumentTerm(str) {
673
+ return this.styleArgumentText(str);
674
+ }
675
+ styleOptionText(str) {
676
+ return str;
677
+ }
678
+ styleArgumentText(str) {
679
+ return str;
680
+ }
681
+ styleSubcommandText(str) {
682
+ return str;
683
+ }
684
+ styleCommandText(str) {
685
+ return str;
686
+ }
552
687
  /**
553
688
  * Calculate the pad width from the maximum term length.
554
689
  *
@@ -565,46 +700,100 @@ var require_help = __commonJS({
565
700
  );
566
701
  }
567
702
  /**
568
- * Wrap the given string to width characters per line, with lines after the first indented.
569
- * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.
703
+ * Detect manually wrapped and indented strings by checking for line break followed by whitespace.
570
704
  *
571
705
  * @param {string} str
572
- * @param {number} width
573
- * @param {number} indent
574
- * @param {number} [minColumnWidth=40]
575
- * @return {string}
706
+ * @returns {boolean}
707
+ */
708
+ preformatted(str) {
709
+ return /\n[^\S\r\n]/.test(str);
710
+ }
711
+ /**
712
+ * Format the "item", which consists of a term and description. Pad the term and wrap the description, indenting the following lines.
576
713
  *
714
+ * So "TTT", 5, "DDD DDDD DD DDD" might be formatted for this.helpWidth=17 like so:
715
+ * TTT DDD DDDD
716
+ * DD DDD
717
+ *
718
+ * @param {string} term
719
+ * @param {number} termWidth
720
+ * @param {string} description
721
+ * @param {Help} helper
722
+ * @returns {string}
577
723
  */
578
- wrap(str, width, indent, minColumnWidth = 40) {
579
- const indents = " \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF";
580
- const manualIndent = new RegExp(`[\\n][${indents}]+`);
581
- if (str.match(manualIndent)) return str;
582
- const columnWidth = width - indent;
583
- if (columnWidth < minColumnWidth) return str;
584
- const leadingStr = str.slice(0, indent);
585
- const columnText = str.slice(indent).replace("\r\n", "\n");
586
- const indentString = " ".repeat(indent);
587
- const zeroWidthSpace = "\u200B";
588
- const breaks = `\\s${zeroWidthSpace}`;
589
- const regex = new RegExp(
590
- `
591
- |.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`,
592
- "g"
724
+ formatItem(term, termWidth, description, helper) {
725
+ const itemIndent = 2;
726
+ const itemIndentStr = " ".repeat(itemIndent);
727
+ if (!description) return itemIndentStr + term;
728
+ const paddedTerm = term.padEnd(
729
+ termWidth + term.length - helper.displayWidth(term)
593
730
  );
594
- const lines = columnText.match(regex) || [];
595
- return leadingStr + lines.map((line, i) => {
596
- if (line === "\n") return "";
597
- return (i > 0 ? indentString : "") + line.trimEnd();
598
- }).join("\n");
731
+ const spacerWidth = 2;
732
+ const helpWidth = this.helpWidth ?? 80;
733
+ const remainingWidth = helpWidth - termWidth - spacerWidth - itemIndent;
734
+ let formattedDescription;
735
+ if (remainingWidth < this.minWidthToWrap || helper.preformatted(description)) {
736
+ formattedDescription = description;
737
+ } else {
738
+ const wrappedDescription = helper.boxWrap(description, remainingWidth);
739
+ formattedDescription = wrappedDescription.replace(
740
+ /\n/g,
741
+ "\n" + " ".repeat(termWidth + spacerWidth)
742
+ );
743
+ }
744
+ return itemIndentStr + paddedTerm + " ".repeat(spacerWidth) + formattedDescription.replace(/\n/g, `
745
+ ${itemIndentStr}`);
746
+ }
747
+ /**
748
+ * Wrap a string at whitespace, preserving existing line breaks.
749
+ * Wrapping is skipped if the width is less than `minWidthToWrap`.
750
+ *
751
+ * @param {string} str
752
+ * @param {number} width
753
+ * @returns {string}
754
+ */
755
+ boxWrap(str, width) {
756
+ if (width < this.minWidthToWrap) return str;
757
+ const rawLines = str.split(/\r\n|\n/);
758
+ const chunkPattern = /[\s]*[^\s]+/g;
759
+ const wrappedLines = [];
760
+ rawLines.forEach((line) => {
761
+ const chunks = line.match(chunkPattern);
762
+ if (chunks === null) {
763
+ wrappedLines.push("");
764
+ return;
765
+ }
766
+ let sumChunks = [chunks.shift()];
767
+ let sumWidth = this.displayWidth(sumChunks[0]);
768
+ chunks.forEach((chunk) => {
769
+ const visibleWidth = this.displayWidth(chunk);
770
+ if (sumWidth + visibleWidth <= width) {
771
+ sumChunks.push(chunk);
772
+ sumWidth += visibleWidth;
773
+ return;
774
+ }
775
+ wrappedLines.push(sumChunks.join(""));
776
+ const nextChunk = chunk.trimStart();
777
+ sumChunks = [nextChunk];
778
+ sumWidth = this.displayWidth(nextChunk);
779
+ });
780
+ wrappedLines.push(sumChunks.join(""));
781
+ });
782
+ return wrappedLines.join("\n");
599
783
  }
600
784
  };
785
+ function stripColor(str) {
786
+ const sgrPattern = /\x1b\[\d*(;\d*)*m/g;
787
+ return str.replace(sgrPattern, "");
788
+ }
601
789
  exports2.Help = Help2;
790
+ exports2.stripColor = stripColor;
602
791
  }
603
792
  });
604
793
 
605
- // node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/option.js
794
+ // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/option.js
606
795
  var require_option = __commonJS({
607
- "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/option.js"(exports2) {
796
+ "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/option.js"(exports2) {
608
797
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
609
798
  var Option2 = class {
610
799
  /**
@@ -636,6 +825,7 @@ var require_option = __commonJS({
636
825
  this.argChoices = void 0;
637
826
  this.conflictsWith = [];
638
827
  this.implied = void 0;
828
+ this.helpGroupHeading = void 0;
639
829
  }
640
830
  /**
641
831
  * Set the default value, and optionally supply the description to be displayed in the help.
@@ -746,11 +936,12 @@ var require_option = __commonJS({
746
936
  /**
747
937
  * @package
748
938
  */
749
- _concatValue(value, previous) {
939
+ _collectValue(value, previous) {
750
940
  if (previous === this.defaultValue || !Array.isArray(previous)) {
751
941
  return [value];
752
942
  }
753
- return previous.concat(value);
943
+ previous.push(value);
944
+ return previous;
754
945
  }
755
946
  /**
756
947
  * Only allow option value to be one of choices.
@@ -767,7 +958,7 @@ var require_option = __commonJS({
767
958
  );
768
959
  }
769
960
  if (this.variadic) {
770
- return this._concatValue(arg, previous);
961
+ return this._collectValue(arg, previous);
771
962
  }
772
963
  return arg;
773
964
  };
@@ -786,12 +977,25 @@ var require_option = __commonJS({
786
977
  }
787
978
  /**
788
979
  * Return option name, in a camelcase format that can be used
789
- * as a object attribute key.
980
+ * as an object attribute key.
790
981
  *
791
982
  * @return {string}
792
983
  */
793
984
  attributeName() {
794
- return camelcase(this.name().replace(/^no-/, ""));
985
+ if (this.negate) {
986
+ return camelcase(this.name().replace(/^no-/, ""));
987
+ }
988
+ return camelcase(this.name());
989
+ }
990
+ /**
991
+ * Set the help group heading.
992
+ *
993
+ * @param {string} heading
994
+ * @return {Option}
995
+ */
996
+ helpGroup(heading) {
997
+ this.helpGroupHeading = heading;
998
+ return this;
795
999
  }
796
1000
  /**
797
1001
  * Check if `arg` matches the short or long flag.
@@ -859,14 +1063,40 @@ var require_option = __commonJS({
859
1063
  function splitOptionFlags(flags) {
860
1064
  let shortFlag;
861
1065
  let longFlag;
862
- const flagParts = flags.split(/[ |,]+/);
863
- if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1]))
1066
+ const shortFlagExp = /^-[^-]$/;
1067
+ const longFlagExp = /^--[^-]/;
1068
+ const flagParts = flags.split(/[ |,]+/).concat("guard");
1069
+ if (shortFlagExp.test(flagParts[0])) shortFlag = flagParts.shift();
1070
+ if (longFlagExp.test(flagParts[0])) longFlag = flagParts.shift();
1071
+ if (!shortFlag && shortFlagExp.test(flagParts[0]))
864
1072
  shortFlag = flagParts.shift();
865
- longFlag = flagParts.shift();
866
- if (!shortFlag && /^-[^-]$/.test(longFlag)) {
1073
+ if (!shortFlag && longFlagExp.test(flagParts[0])) {
867
1074
  shortFlag = longFlag;
868
- longFlag = void 0;
1075
+ longFlag = flagParts.shift();
869
1076
  }
1077
+ if (flagParts[0].startsWith("-")) {
1078
+ const unsupportedFlag = flagParts[0];
1079
+ const baseError = `option creation failed due to '${unsupportedFlag}' in option flags '${flags}'`;
1080
+ if (/^-[^-][^-]/.test(unsupportedFlag))
1081
+ throw new Error(
1082
+ `${baseError}
1083
+ - a short flag is a single dash and a single character
1084
+ - either use a single dash and a single character (for a short flag)
1085
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`
1086
+ );
1087
+ if (shortFlagExp.test(unsupportedFlag))
1088
+ throw new Error(`${baseError}
1089
+ - too many short flags`);
1090
+ if (longFlagExp.test(unsupportedFlag))
1091
+ throw new Error(`${baseError}
1092
+ - too many long flags`);
1093
+ throw new Error(`${baseError}
1094
+ - unrecognised flag format`);
1095
+ }
1096
+ if (shortFlag === void 0 && longFlag === void 0)
1097
+ throw new Error(
1098
+ `option creation failed due to no flags found in '${flags}'.`
1099
+ );
870
1100
  return { shortFlag, longFlag };
871
1101
  }
872
1102
  exports2.Option = Option2;
@@ -874,9 +1104,9 @@ var require_option = __commonJS({
874
1104
  }
875
1105
  });
876
1106
 
877
- // node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/suggestSimilar.js
1107
+ // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/suggestSimilar.js
878
1108
  var require_suggestSimilar = __commonJS({
879
- "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/suggestSimilar.js"(exports2) {
1109
+ "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/suggestSimilar.js"(exports2) {
880
1110
  var maxDistance = 3;
881
1111
  function editDistance(a, b) {
882
1112
  if (Math.abs(a.length - b.length) > maxDistance)
@@ -954,9 +1184,9 @@ var require_suggestSimilar = __commonJS({
954
1184
  }
955
1185
  });
956
1186
 
957
- // node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js
1187
+ // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/command.js
958
1188
  var require_command = __commonJS({
959
- "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js"(exports2) {
1189
+ "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/command.js"(exports2) {
960
1190
  var EventEmitter = require("node:events").EventEmitter;
961
1191
  var childProcess = require("node:child_process");
962
1192
  var path4 = require("node:path");
@@ -964,7 +1194,7 @@ var require_command = __commonJS({
964
1194
  var process3 = require("node:process");
965
1195
  var { Argument: Argument2, humanReadableArgName } = require_argument();
966
1196
  var { CommanderError: CommanderError2 } = require_error();
967
- var { Help: Help2 } = require_help();
1197
+ var { Help: Help2, stripColor } = require_help();
968
1198
  var { Option: Option2, DualOptions } = require_option();
969
1199
  var { suggestSimilar } = require_suggestSimilar();
970
1200
  var Command2 = class _Command extends EventEmitter {
@@ -979,7 +1209,7 @@ var require_command = __commonJS({
979
1209
  this.options = [];
980
1210
  this.parent = null;
981
1211
  this._allowUnknownOption = false;
982
- this._allowExcessArguments = true;
1212
+ this._allowExcessArguments = false;
983
1213
  this.registeredArguments = [];
984
1214
  this._args = this.registeredArguments;
985
1215
  this.args = [];
@@ -1006,18 +1236,25 @@ var require_command = __commonJS({
1006
1236
  this._lifeCycleHooks = {};
1007
1237
  this._showHelpAfterError = false;
1008
1238
  this._showSuggestionAfterError = true;
1239
+ this._savedState = null;
1009
1240
  this._outputConfiguration = {
1010
1241
  writeOut: (str) => process3.stdout.write(str),
1011
1242
  writeErr: (str) => process3.stderr.write(str),
1243
+ outputError: (str, write) => write(str),
1012
1244
  getOutHelpWidth: () => process3.stdout.isTTY ? process3.stdout.columns : void 0,
1013
1245
  getErrHelpWidth: () => process3.stderr.isTTY ? process3.stderr.columns : void 0,
1014
- outputError: (str, write) => write(str)
1246
+ getOutHasColors: () => useColor() ?? (process3.stdout.isTTY && process3.stdout.hasColors?.()),
1247
+ getErrHasColors: () => useColor() ?? (process3.stderr.isTTY && process3.stderr.hasColors?.()),
1248
+ stripColor: (str) => stripColor(str)
1015
1249
  };
1016
1250
  this._hidden = false;
1017
1251
  this._helpOption = void 0;
1018
1252
  this._addImplicitHelpCommand = void 0;
1019
1253
  this._helpCommand = void 0;
1020
1254
  this._helpConfiguration = {};
1255
+ this._helpGroupHeading = void 0;
1256
+ this._defaultCommandGroup = void 0;
1257
+ this._defaultOptionGroup = void 0;
1021
1258
  }
1022
1259
  /**
1023
1260
  * Copy settings that are useful to have in common across root command and subcommands.
@@ -1139,21 +1376,28 @@ var require_command = __commonJS({
1139
1376
  *
1140
1377
  * The configuration properties are all functions:
1141
1378
  *
1142
- * // functions to change where being written, stdout and stderr
1379
+ * // change how output being written, defaults to stdout and stderr
1143
1380
  * writeOut(str)
1144
1381
  * writeErr(str)
1145
- * // matching functions to specify width for wrapping help
1382
+ * // change how output being written for errors, defaults to writeErr
1383
+ * outputError(str, write) // used for displaying errors and not used for displaying help
1384
+ * // specify width for wrapping help
1146
1385
  * getOutHelpWidth()
1147
1386
  * getErrHelpWidth()
1148
- * // functions based on what is being written out
1149
- * outputError(str, write) // used for displaying errors, and not used for displaying help
1387
+ * // color support, currently only used with Help
1388
+ * getOutHasColors()
1389
+ * getErrHasColors()
1390
+ * stripColor() // used to remove ANSI escape codes if output does not have colors
1150
1391
  *
1151
1392
  * @param {object} [configuration] - configuration options
1152
1393
  * @return {(Command | object)} `this` command for chaining, or stored configuration
1153
1394
  */
1154
1395
  configureOutput(configuration) {
1155
1396
  if (configuration === void 0) return this._outputConfiguration;
1156
- Object.assign(this._outputConfiguration, configuration);
1397
+ this._outputConfiguration = {
1398
+ ...this._outputConfiguration,
1399
+ ...configuration
1400
+ };
1157
1401
  return this;
1158
1402
  }
1159
1403
  /**
@@ -1224,16 +1468,16 @@ var require_command = __commonJS({
1224
1468
  *
1225
1469
  * @param {string} name
1226
1470
  * @param {string} [description]
1227
- * @param {(Function|*)} [fn] - custom argument processing function
1471
+ * @param {(Function|*)} [parseArg] - custom argument processing function or default value
1228
1472
  * @param {*} [defaultValue]
1229
1473
  * @return {Command} `this` command for chaining
1230
1474
  */
1231
- argument(name, description, fn, defaultValue) {
1475
+ argument(name, description, parseArg, defaultValue) {
1232
1476
  const argument = this.createArgument(name, description);
1233
- if (typeof fn === "function") {
1234
- argument.default(defaultValue).argParser(fn);
1477
+ if (typeof parseArg === "function") {
1478
+ argument.default(defaultValue).argParser(parseArg);
1235
1479
  } else {
1236
- argument.default(fn);
1480
+ argument.default(parseArg);
1237
1481
  }
1238
1482
  this.addArgument(argument);
1239
1483
  return this;
@@ -1263,7 +1507,7 @@ var require_command = __commonJS({
1263
1507
  */
1264
1508
  addArgument(argument) {
1265
1509
  const previousArgument = this.registeredArguments.slice(-1)[0];
1266
- if (previousArgument && previousArgument.variadic) {
1510
+ if (previousArgument?.variadic) {
1267
1511
  throw new Error(
1268
1512
  `only the last argument can be variadic '${previousArgument.name()}'`
1269
1513
  );
@@ -1292,10 +1536,13 @@ var require_command = __commonJS({
1292
1536
  helpCommand(enableOrNameAndArgs, description) {
1293
1537
  if (typeof enableOrNameAndArgs === "boolean") {
1294
1538
  this._addImplicitHelpCommand = enableOrNameAndArgs;
1539
+ if (enableOrNameAndArgs && this._defaultCommandGroup) {
1540
+ this._initCommandGroup(this._getHelpCommand());
1541
+ }
1295
1542
  return this;
1296
1543
  }
1297
- enableOrNameAndArgs = enableOrNameAndArgs ?? "help [command]";
1298
- const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);
1544
+ const nameAndArgs = enableOrNameAndArgs ?? "help [command]";
1545
+ const [, helpName, helpArgs] = nameAndArgs.match(/([^ ]+) *(.*)/);
1299
1546
  const helpDescription = description ?? "display help for command";
1300
1547
  const helpCommand = this.createCommand(helpName);
1301
1548
  helpCommand.helpOption(false);
@@ -1303,6 +1550,7 @@ var require_command = __commonJS({
1303
1550
  if (helpDescription) helpCommand.description(helpDescription);
1304
1551
  this._addImplicitHelpCommand = true;
1305
1552
  this._helpCommand = helpCommand;
1553
+ if (enableOrNameAndArgs || description) this._initCommandGroup(helpCommand);
1306
1554
  return this;
1307
1555
  }
1308
1556
  /**
@@ -1319,6 +1567,7 @@ var require_command = __commonJS({
1319
1567
  }
1320
1568
  this._addImplicitHelpCommand = true;
1321
1569
  this._helpCommand = helpCommand;
1570
+ this._initCommandGroup(helpCommand);
1322
1571
  return this;
1323
1572
  }
1324
1573
  /**
@@ -1467,6 +1716,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1467
1716
  throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'
1468
1717
  - already used by option '${matchingOption.flags}'`);
1469
1718
  }
1719
+ this._initOptionGroup(option);
1470
1720
  this.options.push(option);
1471
1721
  }
1472
1722
  /**
@@ -1490,6 +1740,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1490
1740
  `cannot add command '${newCmd}' as already have command '${existingCmd}'`
1491
1741
  );
1492
1742
  }
1743
+ this._initCommandGroup(command);
1493
1744
  this.commands.push(command);
1494
1745
  }
1495
1746
  /**
@@ -1522,7 +1773,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1522
1773
  if (val !== null && option.parseArg) {
1523
1774
  val = this._callParseArg(option, val, oldValue, invalidValueMessage);
1524
1775
  } else if (val !== null && option.variadic) {
1525
- val = option._concatValue(val, oldValue);
1776
+ val = option._collectValue(val, oldValue);
1526
1777
  }
1527
1778
  if (val == null) {
1528
1779
  if (option.negate) {
@@ -1586,7 +1837,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1586
1837
  * @example
1587
1838
  * program
1588
1839
  * .option('-p, --pepper', 'add pepper')
1589
- * .option('-p, --pizza-type <TYPE>', 'type of pizza') // required option-argument
1840
+ * .option('--pt, --pizza-type <TYPE>', 'type of pizza') // required option-argument
1590
1841
  * .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default
1591
1842
  * .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function
1592
1843
  *
@@ -1853,6 +2104,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1853
2104
  * @return {Command} `this` command for chaining
1854
2105
  */
1855
2106
  parse(argv, parseOptions) {
2107
+ this._prepareForParse();
1856
2108
  const userArgs = this._prepareUserArgs(argv, parseOptions);
1857
2109
  this._parseCommand([], userArgs);
1858
2110
  return this;
@@ -1878,10 +2130,68 @@ Expecting one of '${allowedValues.join("', '")}'`);
1878
2130
  * @return {Promise}
1879
2131
  */
1880
2132
  async parseAsync(argv, parseOptions) {
2133
+ this._prepareForParse();
1881
2134
  const userArgs = this._prepareUserArgs(argv, parseOptions);
1882
2135
  await this._parseCommand([], userArgs);
1883
2136
  return this;
1884
2137
  }
2138
+ _prepareForParse() {
2139
+ if (this._savedState === null) {
2140
+ this.saveStateBeforeParse();
2141
+ } else {
2142
+ this.restoreStateBeforeParse();
2143
+ }
2144
+ }
2145
+ /**
2146
+ * Called the first time parse is called to save state and allow a restore before subsequent calls to parse.
2147
+ * Not usually called directly, but available for subclasses to save their custom state.
2148
+ *
2149
+ * This is called in a lazy way. Only commands used in parsing chain will have state saved.
2150
+ */
2151
+ saveStateBeforeParse() {
2152
+ this._savedState = {
2153
+ // name is stable if supplied by author, but may be unspecified for root command and deduced during parsing
2154
+ _name: this._name,
2155
+ // option values before parse have default values (including false for negated options)
2156
+ // shallow clones
2157
+ _optionValues: { ...this._optionValues },
2158
+ _optionValueSources: { ...this._optionValueSources }
2159
+ };
2160
+ }
2161
+ /**
2162
+ * Restore state before parse for calls after the first.
2163
+ * Not usually called directly, but available for subclasses to save their custom state.
2164
+ *
2165
+ * This is called in a lazy way. Only commands used in parsing chain will have state restored.
2166
+ */
2167
+ restoreStateBeforeParse() {
2168
+ if (this._storeOptionsAsProperties)
2169
+ throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
2170
+ - either make a new Command for each call to parse, or stop storing options as properties`);
2171
+ this._name = this._savedState._name;
2172
+ this._scriptPath = null;
2173
+ this.rawArgs = [];
2174
+ this._optionValues = { ...this._savedState._optionValues };
2175
+ this._optionValueSources = { ...this._savedState._optionValueSources };
2176
+ this.args = [];
2177
+ this.processedArgs = [];
2178
+ }
2179
+ /**
2180
+ * Throw if expected executable is missing. Add lots of help for author.
2181
+ *
2182
+ * @param {string} executableFile
2183
+ * @param {string} executableDir
2184
+ * @param {string} subcommandName
2185
+ */
2186
+ _checkForMissingExecutable(executableFile, executableDir, subcommandName) {
2187
+ if (fs4.existsSync(executableFile)) return;
2188
+ const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
2189
+ const executableMissing = `'${executableFile}' does not exist
2190
+ - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
2191
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
2192
+ - ${executableDirMessage}`;
2193
+ throw new Error(executableMissing);
2194
+ }
1885
2195
  /**
1886
2196
  * Execute a sub-command executable.
1887
2197
  *
@@ -1909,7 +2219,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1909
2219
  let resolvedScriptPath;
1910
2220
  try {
1911
2221
  resolvedScriptPath = fs4.realpathSync(this._scriptPath);
1912
- } catch (err) {
2222
+ } catch {
1913
2223
  resolvedScriptPath = this._scriptPath;
1914
2224
  }
1915
2225
  executableDir = path4.resolve(
@@ -1944,6 +2254,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1944
2254
  proc = childProcess.spawn(executableFile, args, { stdio: "inherit" });
1945
2255
  }
1946
2256
  } else {
2257
+ this._checkForMissingExecutable(
2258
+ executableFile,
2259
+ executableDir,
2260
+ subcommand._name
2261
+ );
1947
2262
  args.unshift(executableFile);
1948
2263
  args = incrementNodeInspectorPort(process3.execArgv).concat(args);
1949
2264
  proc = childProcess.spawn(process3.execPath, args, { stdio: "inherit" });
@@ -1975,12 +2290,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1975
2290
  });
1976
2291
  proc.on("error", (err) => {
1977
2292
  if (err.code === "ENOENT") {
1978
- const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
1979
- const executableMissing = `'${executableFile}' does not exist
1980
- - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
1981
- - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
1982
- - ${executableDirMessage}`;
1983
- throw new Error(executableMissing);
2293
+ this._checkForMissingExecutable(
2294
+ executableFile,
2295
+ executableDir,
2296
+ subcommand._name
2297
+ );
1984
2298
  } else if (err.code === "EACCES") {
1985
2299
  throw new Error(`'${executableFile}' not executable`);
1986
2300
  }
@@ -2004,6 +2318,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2004
2318
  _dispatchSubcommand(commandName, operands, unknown) {
2005
2319
  const subCommand = this._findCommand(commandName);
2006
2320
  if (!subCommand) this.help({ error: true });
2321
+ subCommand._prepareForParse();
2007
2322
  let promiseChain;
2008
2323
  promiseChain = this._chainOrCallSubCommandHook(
2009
2324
  promiseChain,
@@ -2110,7 +2425,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2110
2425
  * @private
2111
2426
  */
2112
2427
  _chainOrCall(promise, fn) {
2113
- if (promise && promise.then && typeof promise.then === "function") {
2428
+ if (promise?.then && typeof promise.then === "function") {
2114
2429
  return promise.then(() => fn());
2115
2430
  }
2116
2431
  return fn();
@@ -2215,7 +2530,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2215
2530
  promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
2216
2531
  return promiseChain;
2217
2532
  }
2218
- if (this.parent && this.parent.listenerCount(commandEvent)) {
2533
+ if (this.parent?.listenerCount(commandEvent)) {
2219
2534
  checkForUnknownOptions();
2220
2535
  this._processArguments();
2221
2536
  this.parent.emit(commandEvent, operands, unknown);
@@ -2316,6 +2631,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
2316
2631
  * Parse options from `argv` removing known options,
2317
2632
  * and return argv split into operands and unknown arguments.
2318
2633
  *
2634
+ * Side effects: modifies command by storing options. Does not reset state if called again.
2635
+ *
2319
2636
  * Examples:
2320
2637
  *
2321
2638
  * argv => operands, unknown
@@ -2324,26 +2641,34 @@ Expecting one of '${allowedValues.join("', '")}'`);
2324
2641
  * sub --unknown uuu op => [sub], [--unknown uuu op]
2325
2642
  * sub -- --unknown uuu op => [sub --unknown uuu op], []
2326
2643
  *
2327
- * @param {string[]} argv
2644
+ * @param {string[]} args
2328
2645
  * @return {{operands: string[], unknown: string[]}}
2329
2646
  */
2330
- parseOptions(argv) {
2647
+ parseOptions(args) {
2331
2648
  const operands = [];
2332
2649
  const unknown = [];
2333
2650
  let dest = operands;
2334
- const args = argv.slice();
2335
2651
  function maybeOption(arg) {
2336
2652
  return arg.length > 1 && arg[0] === "-";
2337
2653
  }
2654
+ const negativeNumberArg = (arg) => {
2655
+ if (!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg)) return false;
2656
+ return !this._getCommandAndAncestors().some(
2657
+ (cmd) => cmd.options.map((opt) => opt.short).some((short) => /^-\d$/.test(short))
2658
+ );
2659
+ };
2338
2660
  let activeVariadicOption = null;
2339
- while (args.length) {
2340
- const arg = args.shift();
2661
+ let activeGroup = null;
2662
+ let i = 0;
2663
+ while (i < args.length || activeGroup) {
2664
+ const arg = activeGroup ?? args[i++];
2665
+ activeGroup = null;
2341
2666
  if (arg === "--") {
2342
2667
  if (dest === unknown) dest.push(arg);
2343
- dest.push(...args);
2668
+ dest.push(...args.slice(i));
2344
2669
  break;
2345
2670
  }
2346
- if (activeVariadicOption && !maybeOption(arg)) {
2671
+ if (activeVariadicOption && (!maybeOption(arg) || negativeNumberArg(arg))) {
2347
2672
  this.emit(`option:${activeVariadicOption.name()}`, arg);
2348
2673
  continue;
2349
2674
  }
@@ -2352,13 +2677,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
2352
2677
  const option = this._findOption(arg);
2353
2678
  if (option) {
2354
2679
  if (option.required) {
2355
- const value = args.shift();
2680
+ const value = args[i++];
2356
2681
  if (value === void 0) this.optionMissingArgument(option);
2357
2682
  this.emit(`option:${option.name()}`, value);
2358
2683
  } else if (option.optional) {
2359
2684
  let value = null;
2360
- if (args.length > 0 && !maybeOption(args[0])) {
2361
- value = args.shift();
2685
+ if (i < args.length && (!maybeOption(args[i]) || negativeNumberArg(args[i]))) {
2686
+ value = args[i++];
2362
2687
  }
2363
2688
  this.emit(`option:${option.name()}`, value);
2364
2689
  } else {
@@ -2375,7 +2700,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2375
2700
  this.emit(`option:${option.name()}`, arg.slice(2));
2376
2701
  } else {
2377
2702
  this.emit(`option:${option.name()}`);
2378
- args.unshift(`-${arg.slice(2)}`);
2703
+ activeGroup = `-${arg.slice(2)}`;
2379
2704
  }
2380
2705
  continue;
2381
2706
  }
@@ -2388,27 +2713,24 @@ Expecting one of '${allowedValues.join("', '")}'`);
2388
2713
  continue;
2389
2714
  }
2390
2715
  }
2391
- if (maybeOption(arg)) {
2716
+ if (dest === operands && maybeOption(arg) && !(this.commands.length === 0 && negativeNumberArg(arg))) {
2392
2717
  dest = unknown;
2393
2718
  }
2394
2719
  if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) {
2395
2720
  if (this._findCommand(arg)) {
2396
2721
  operands.push(arg);
2397
- if (args.length > 0) unknown.push(...args);
2722
+ unknown.push(...args.slice(i));
2398
2723
  break;
2399
2724
  } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
2400
- operands.push(arg);
2401
- if (args.length > 0) operands.push(...args);
2725
+ operands.push(arg, ...args.slice(i));
2402
2726
  break;
2403
2727
  } else if (this._defaultCommandName) {
2404
- unknown.push(arg);
2405
- if (args.length > 0) unknown.push(...args);
2728
+ unknown.push(arg, ...args.slice(i));
2406
2729
  break;
2407
2730
  }
2408
2731
  }
2409
2732
  if (this._passThroughOptions) {
2410
- dest.push(arg);
2411
- if (args.length > 0) dest.push(...args);
2733
+ dest.push(arg, ...args.slice(i));
2412
2734
  break;
2413
2735
  }
2414
2736
  dest.push(arg);
@@ -2760,6 +3082,69 @@ Expecting one of '${allowedValues.join("', '")}'`);
2760
3082
  this._name = str;
2761
3083
  return this;
2762
3084
  }
3085
+ /**
3086
+ * Set/get the help group heading for this subcommand in parent command's help.
3087
+ *
3088
+ * @param {string} [heading]
3089
+ * @return {Command | string}
3090
+ */
3091
+ helpGroup(heading) {
3092
+ if (heading === void 0) return this._helpGroupHeading ?? "";
3093
+ this._helpGroupHeading = heading;
3094
+ return this;
3095
+ }
3096
+ /**
3097
+ * Set/get the default help group heading for subcommands added to this command.
3098
+ * (This does not override a group set directly on the subcommand using .helpGroup().)
3099
+ *
3100
+ * @example
3101
+ * program.commandsGroup('Development Commands:);
3102
+ * program.command('watch')...
3103
+ * program.command('lint')...
3104
+ * ...
3105
+ *
3106
+ * @param {string} [heading]
3107
+ * @returns {Command | string}
3108
+ */
3109
+ commandsGroup(heading) {
3110
+ if (heading === void 0) return this._defaultCommandGroup ?? "";
3111
+ this._defaultCommandGroup = heading;
3112
+ return this;
3113
+ }
3114
+ /**
3115
+ * Set/get the default help group heading for options added to this command.
3116
+ * (This does not override a group set directly on the option using .helpGroup().)
3117
+ *
3118
+ * @example
3119
+ * program
3120
+ * .optionsGroup('Development Options:')
3121
+ * .option('-d, --debug', 'output extra debugging')
3122
+ * .option('-p, --profile', 'output profiling information')
3123
+ *
3124
+ * @param {string} [heading]
3125
+ * @returns {Command | string}
3126
+ */
3127
+ optionsGroup(heading) {
3128
+ if (heading === void 0) return this._defaultOptionGroup ?? "";
3129
+ this._defaultOptionGroup = heading;
3130
+ return this;
3131
+ }
3132
+ /**
3133
+ * @param {Option} option
3134
+ * @private
3135
+ */
3136
+ _initOptionGroup(option) {
3137
+ if (this._defaultOptionGroup && !option.helpGroupHeading)
3138
+ option.helpGroup(this._defaultOptionGroup);
3139
+ }
3140
+ /**
3141
+ * @param {Command} cmd
3142
+ * @private
3143
+ */
3144
+ _initCommandGroup(cmd) {
3145
+ if (this._defaultCommandGroup && !cmd.helpGroup())
3146
+ cmd.helpGroup(this._defaultCommandGroup);
3147
+ }
2763
3148
  /**
2764
3149
  * Set the name of the command from script filename, such as process.argv[1],
2765
3150
  * or require.main.filename, or __filename.
@@ -2800,26 +3185,47 @@ Expecting one of '${allowedValues.join("', '")}'`);
2800
3185
  */
2801
3186
  helpInformation(contextOptions) {
2802
3187
  const helper = this.createHelp();
2803
- if (helper.helpWidth === void 0) {
2804
- helper.helpWidth = contextOptions && contextOptions.error ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth();
2805
- }
2806
- return helper.formatHelp(this, helper);
3188
+ const context = this._getOutputContext(contextOptions);
3189
+ helper.prepareContext({
3190
+ error: context.error,
3191
+ helpWidth: context.helpWidth,
3192
+ outputHasColors: context.hasColors
3193
+ });
3194
+ const text = helper.formatHelp(this, helper);
3195
+ if (context.hasColors) return text;
3196
+ return this._outputConfiguration.stripColor(text);
2807
3197
  }
2808
3198
  /**
3199
+ * @typedef HelpContext
3200
+ * @type {object}
3201
+ * @property {boolean} error
3202
+ * @property {number} helpWidth
3203
+ * @property {boolean} hasColors
3204
+ * @property {function} write - includes stripColor if needed
3205
+ *
3206
+ * @returns {HelpContext}
2809
3207
  * @private
2810
3208
  */
2811
- _getHelpContext(contextOptions) {
3209
+ _getOutputContext(contextOptions) {
2812
3210
  contextOptions = contextOptions || {};
2813
- const context = { error: !!contextOptions.error };
2814
- let write;
2815
- if (context.error) {
2816
- write = (arg) => this._outputConfiguration.writeErr(arg);
3211
+ const error = !!contextOptions.error;
3212
+ let baseWrite;
3213
+ let hasColors;
3214
+ let helpWidth;
3215
+ if (error) {
3216
+ baseWrite = (str) => this._outputConfiguration.writeErr(str);
3217
+ hasColors = this._outputConfiguration.getErrHasColors();
3218
+ helpWidth = this._outputConfiguration.getErrHelpWidth();
2817
3219
  } else {
2818
- write = (arg) => this._outputConfiguration.writeOut(arg);
3220
+ baseWrite = (str) => this._outputConfiguration.writeOut(str);
3221
+ hasColors = this._outputConfiguration.getOutHasColors();
3222
+ helpWidth = this._outputConfiguration.getOutHelpWidth();
2819
3223
  }
2820
- context.write = contextOptions.write || write;
2821
- context.command = this;
2822
- return context;
3224
+ const write = (str) => {
3225
+ if (!hasColors) str = this._outputConfiguration.stripColor(str);
3226
+ return baseWrite(str);
3227
+ };
3228
+ return { error, write, hasColors, helpWidth };
2823
3229
  }
2824
3230
  /**
2825
3231
  * Output help information for this command.
@@ -2834,23 +3240,28 @@ Expecting one of '${allowedValues.join("', '")}'`);
2834
3240
  deprecatedCallback = contextOptions;
2835
3241
  contextOptions = void 0;
2836
3242
  }
2837
- const context = this._getHelpContext(contextOptions);
2838
- this._getCommandAndAncestors().reverse().forEach((command) => command.emit("beforeAllHelp", context));
2839
- this.emit("beforeHelp", context);
2840
- let helpInformation = this.helpInformation(context);
3243
+ const outputContext = this._getOutputContext(contextOptions);
3244
+ const eventContext = {
3245
+ error: outputContext.error,
3246
+ write: outputContext.write,
3247
+ command: this
3248
+ };
3249
+ this._getCommandAndAncestors().reverse().forEach((command) => command.emit("beforeAllHelp", eventContext));
3250
+ this.emit("beforeHelp", eventContext);
3251
+ let helpInformation = this.helpInformation({ error: outputContext.error });
2841
3252
  if (deprecatedCallback) {
2842
3253
  helpInformation = deprecatedCallback(helpInformation);
2843
3254
  if (typeof helpInformation !== "string" && !Buffer.isBuffer(helpInformation)) {
2844
3255
  throw new Error("outputHelp callback must return a string or a Buffer");
2845
3256
  }
2846
3257
  }
2847
- context.write(helpInformation);
3258
+ outputContext.write(helpInformation);
2848
3259
  if (this._getHelpOption()?.long) {
2849
3260
  this.emit(this._getHelpOption().long);
2850
3261
  }
2851
- this.emit("afterHelp", context);
3262
+ this.emit("afterHelp", eventContext);
2852
3263
  this._getCommandAndAncestors().forEach(
2853
- (command) => command.emit("afterAllHelp", context)
3264
+ (command) => command.emit("afterAllHelp", eventContext)
2854
3265
  );
2855
3266
  }
2856
3267
  /**
@@ -2868,15 +3279,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
2868
3279
  helpOption(flags, description) {
2869
3280
  if (typeof flags === "boolean") {
2870
3281
  if (flags) {
2871
- this._helpOption = this._helpOption ?? void 0;
3282
+ if (this._helpOption === null) this._helpOption = void 0;
3283
+ if (this._defaultOptionGroup) {
3284
+ this._initOptionGroup(this._getHelpOption());
3285
+ }
2872
3286
  } else {
2873
3287
  this._helpOption = null;
2874
3288
  }
2875
3289
  return this;
2876
3290
  }
2877
- flags = flags ?? "-h, --help";
2878
- description = description ?? "display help for command";
2879
- this._helpOption = this.createOption(flags, description);
3291
+ this._helpOption = this.createOption(
3292
+ flags ?? "-h, --help",
3293
+ description ?? "display help for command"
3294
+ );
3295
+ if (flags || description) this._initOptionGroup(this._helpOption);
2880
3296
  return this;
2881
3297
  }
2882
3298
  /**
@@ -2901,6 +3317,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2901
3317
  */
2902
3318
  addHelpOption(option) {
2903
3319
  this._helpOption = option;
3320
+ this._initOptionGroup(option);
2904
3321
  return this;
2905
3322
  }
2906
3323
  /**
@@ -2912,12 +3329,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
2912
3329
  */
2913
3330
  help(contextOptions) {
2914
3331
  this.outputHelp(contextOptions);
2915
- let exitCode = process3.exitCode || 0;
3332
+ let exitCode = Number(process3.exitCode ?? 0);
2916
3333
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) {
2917
3334
  exitCode = 1;
2918
3335
  }
2919
3336
  this._exit(exitCode, "commander.help", "(outputHelp)");
2920
3337
  }
3338
+ /**
3339
+ * // Do a little typing to coordinate emit and listener for the help text events.
3340
+ * @typedef HelpTextEventContext
3341
+ * @type {object}
3342
+ * @property {boolean} error
3343
+ * @property {Command} command
3344
+ * @property {function} write
3345
+ */
2921
3346
  /**
2922
3347
  * Add additional text to be displayed with the built-in help.
2923
3348
  *
@@ -2993,13 +3418,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
2993
3418
  return arg;
2994
3419
  });
2995
3420
  }
3421
+ function useColor() {
3422
+ if (process3.env.NO_COLOR || process3.env.FORCE_COLOR === "0" || process3.env.FORCE_COLOR === "false")
3423
+ return false;
3424
+ if (process3.env.FORCE_COLOR || process3.env.CLICOLOR_FORCE !== void 0)
3425
+ return true;
3426
+ return void 0;
3427
+ }
2996
3428
  exports2.Command = Command2;
3429
+ exports2.useColor = useColor;
2997
3430
  }
2998
3431
  });
2999
3432
 
3000
- // node_modules/.pnpm/commander@12.1.0/node_modules/commander/index.js
3433
+ // node_modules/.pnpm/commander@14.0.3/node_modules/commander/index.js
3001
3434
  var require_commander = __commonJS({
3002
- "node_modules/.pnpm/commander@12.1.0/node_modules/commander/index.js"(exports2) {
3435
+ "node_modules/.pnpm/commander@14.0.3/node_modules/commander/index.js"(exports2) {
3003
3436
  var { Argument: Argument2 } = require_argument();
3004
3437
  var { Command: Command2 } = require_command();
3005
3438
  var { CommanderError: CommanderError2, InvalidArgumentError: InvalidArgumentError2 } = require_error();
@@ -3019,7 +3452,7 @@ var require_commander = __commonJS({
3019
3452
  }
3020
3453
  });
3021
3454
 
3022
- // node_modules/.pnpm/commander@12.1.0/node_modules/commander/esm.mjs
3455
+ // node_modules/.pnpm/commander@14.0.3/node_modules/commander/esm.mjs
3023
3456
  var import_index = __toESM(require_commander(), 1);
3024
3457
  var {
3025
3458
  program,
@@ -3471,9 +3904,9 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
3471
3904
 
3472
3905
  // node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
3473
3906
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
3474
- var GENERATOR = Symbol("GENERATOR");
3475
- var STYLER = Symbol("STYLER");
3476
- var IS_EMPTY = Symbol("IS_EMPTY");
3907
+ var GENERATOR = /* @__PURE__ */ Symbol("GENERATOR");
3908
+ var STYLER = /* @__PURE__ */ Symbol("STYLER");
3909
+ var IS_EMPTY = /* @__PURE__ */ Symbol("IS_EMPTY");
3477
3910
  var levelMapping = [
3478
3911
  "ansi",
3479
3912
  "ansi",