@metabase/cli 0.2.1-alpha.trust-system-ca.541e4e0 → 0.2.2-alpha.extract-api-client.27e2241

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 (323) hide show
  1. package/README.md +4 -1715
  2. package/dist/add-collection-B3Ty8SzB.mjs +36 -0
  3. package/dist/alert-DT-ee7yf.mjs +23 -0
  4. package/dist/alerts-Bf2RH_p_.mjs +43 -0
  5. package/dist/{append-Cak5jykn.mjs → append-DFzQRPMd.mjs} +7 -12
  6. package/dist/{archive-BVY_jD_g.mjs → archive-4tmm946K.mjs} +8 -17
  7. package/dist/{archive-CytCvQpn.mjs → archive-B6eXiyER.mjs} +7 -13
  8. package/dist/{archive-op9pJRpg.mjs → archive-BxNPHxOY.mjs} +7 -13
  9. package/dist/archive-ByvA49Kz.mjs +34 -0
  10. package/dist/{archive-DfbI8DRB.mjs → archive-C7w49Grr.mjs} +7 -16
  11. package/dist/{archive-CPgWNCG3.mjs → archive-Cd29QC0c.mjs} +7 -13
  12. package/dist/{archive-BIEnBoE8.mjs → archive-ChORH5JH.mjs} +7 -13
  13. package/dist/archive-CwAdlv63.mjs +33 -0
  14. package/dist/{archive-CaKhG58H.mjs → archive-Dr9Xnx_Z.mjs} +7 -15
  15. package/dist/{archive-CjnCAM61.mjs → archive-gid9Y09v.mjs} +8 -17
  16. package/dist/{archive-BMbx6lt8.mjs → archive-lQqs13Uz.mjs} +7 -13
  17. package/dist/auth-Dltxua89.mjs +19 -0
  18. package/dist/{body-BW_CiL1d.mjs → body-Cur4NJt9.mjs} +5 -8
  19. package/dist/{body-flags-CgHgJBRC.mjs → body-flags-AqKpN01Y.mjs} +1 -2
  20. package/dist/{branches-gVRwKne4.mjs → branches-DchlyU0i.mjs} +7 -13
  21. package/dist/{cancel-CBOJSslz.mjs → cancel-BMQa5R1Z.mjs} +5 -12
  22. package/dist/{cancel-task-Djancczz.mjs → cancel-task-C5CU1pxU.mjs} +6 -10
  23. package/dist/card-CHI2bmds.mjs +24 -0
  24. package/dist/{card-B8G5jQQT.mjs → card-DZxRmver.mjs} +21 -48
  25. package/dist/card-zyUkr2nS.mjs +44 -0
  26. package/dist/cards-SccWvRQD.mjs +34 -0
  27. package/dist/cli.mjs +664 -83
  28. package/dist/client-BqhzKdLM.mjs +2194 -0
  29. package/dist/collection-CGoVLvcD.mjs +58 -0
  30. package/dist/collection-CY0AB99E.mjs +20 -0
  31. package/dist/{collection-C52Ndi_O.mjs → collection-CfulNRBG.mjs} +16 -61
  32. package/dist/{collection-namespace-w1y5D0Uh.mjs → collection-namespace-GwydWBF3.mjs} +3 -5
  33. package/dist/{create-VA58AF6A.mjs → create-BNQ_DytP.mjs} +8 -15
  34. package/dist/{create-CnT-L03B.mjs → create-BOLwWt8Q.mjs} +9 -17
  35. package/dist/{create-BkvdOecg.mjs → create-Beh-2uoN.mjs} +8 -15
  36. package/dist/{create-CvptjYVb.mjs → create-C79vErX0.mjs} +9 -20
  37. package/dist/{create-C_fyIHZU.mjs → create-CAQV2g6V.mjs} +9 -17
  38. package/dist/{create-q2QqkwEN.mjs → create-CAWytBE5.mjs} +9 -17
  39. package/dist/{create-CGsTL5aE.mjs → create-CCh_LyW9.mjs} +8 -15
  40. package/dist/{create-ldvT5L0W.mjs → create-CD008jdE.mjs} +13 -28
  41. package/dist/create-CHQx7jq4.mjs +45 -0
  42. package/dist/create-DF4QtgDL.mjs +44 -0
  43. package/dist/{create-D_eiLBqR.mjs → create-DJmXXQoq.mjs} +10 -18
  44. package/dist/{create-DbHIjWio.mjs → create-DV-Ln5Mo.mjs} +8 -15
  45. package/dist/create-branch-CYo6jZth.mjs +35 -0
  46. package/dist/{create-DZBtbGqj.mjs → create-i14Wv3Tj.mjs} +8 -15
  47. package/dist/{create-CnqGhtuF.mjs → create-tQbnuz-I.mjs} +8 -15
  48. package/dist/{create-BRK8TBzp.mjs → create-zeveFdnd.mjs} +6 -11
  49. package/dist/cron-LKRffEC-.mjs +5 -0
  50. package/dist/{csv-C3O1wTQ8.mjs → csv-B2Jgb1GM.mjs} +7 -19
  51. package/dist/{current-task-CZsZPe0o.mjs → current-task-MpBFGttd.mjs} +7 -12
  52. package/dist/{dashboard-BLihjDXg.mjs → dashboard-BCpSq_G-.mjs} +9 -60
  53. package/dist/dashboard-BHJBoaG7.mjs +33 -0
  54. package/dist/dashboard-CsIFFpzK.mjs +58 -0
  55. package/dist/database-B19qlLKZ.mjs +38 -0
  56. package/dist/database-C8G6ZKG0.mjs +26 -0
  57. package/dist/db-DsfojyeH.mjs +24 -0
  58. package/dist/{delete-BmT5C6eK.mjs → delete-B8e01xAG.mjs} +6 -11
  59. package/dist/{delete-Dkfu4e5K.mjs → delete-BApOjQvl.mjs} +6 -11
  60. package/dist/{delete-JeRzVISE.mjs → delete-Ck0q4Dzp.mjs} +6 -11
  61. package/dist/{delete-cF97pfFX.mjs → delete-DFmX7jTp.mjs} +6 -11
  62. package/dist/{delete-DgI03U43.mjs → delete-Ob06PPie.mjs} +6 -11
  63. package/dist/{delete-runtime-DiqKOEqi.mjs → delete-runtime-D74s6vhu.mjs} +6 -13
  64. package/dist/{delete-table-dnQs_Twm.mjs → delete-table-DuyhGrvA.mjs} +6 -11
  65. package/dist/{dependencies-BsMwFSxP.mjs → dependencies-Bj3QrGIm.mjs} +10 -13
  66. package/dist/dirty-DNYoM6Bp.mjs +31 -0
  67. package/dist/document-BbskZPTT.mjs +19 -0
  68. package/dist/{document-D4zB-5a0.mjs → document-Cd2mmqCp.mjs} +5 -33
  69. package/dist/document-D6OybtP2.mjs +29 -0
  70. package/dist/{eid-60sCZhQV.mjs → eid-WTZmDdsr.mjs} +12 -54
  71. package/dist/eid-translation-zEHtr5Oc.mjs +35 -0
  72. package/dist/{embedding-CKdw8q7p.mjs → embedding-i-KqpefC.mjs} +2 -4
  73. package/dist/events-Bn7jh5lP.mjs +39 -0
  74. package/dist/export-BjfoZRDJ.mjs +66 -0
  75. package/dist/field-BPsNa-TO.mjs +80 -0
  76. package/dist/{field-DsXTeqBy.mjs → field-Cr2DPUG9.mjs} +2 -81
  77. package/dist/field-Zau6Hc6X.mjs +18 -0
  78. package/dist/fields-CBBa-Prp.mjs +34 -0
  79. package/dist/{get-CaosV7j8.mjs → get-00lyLv6R.mjs} +7 -11
  80. package/dist/{get-DxAx-2C0.mjs → get-B7sMgsFs.mjs} +7 -11
  81. package/dist/get-B_xdF1kq.mjs +31 -0
  82. package/dist/{get-B_EinsrO.mjs → get-ByBOq30r.mjs} +7 -11
  83. package/dist/get-Bz99dAxK.mjs +35 -0
  84. package/dist/get-C2-Q3iQ5.mjs +31 -0
  85. package/dist/get-CDJFVvhj.mjs +35 -0
  86. package/dist/get-CDMGbgrh.mjs +31 -0
  87. package/dist/get-CnbUCzDM.mjs +31 -0
  88. package/dist/{get-L8c_h5EP.mjs → get-CvI--9S_.mjs} +16 -12
  89. package/dist/{get-CRXEqpar.mjs → get-DRvsATp-.mjs} +7 -11
  90. package/dist/{get-BNBRMNtC.mjs → get-DY03Azx9.mjs} +6 -11
  91. package/dist/get-DYO1kywc.mjs +32 -0
  92. package/dist/{get-CKnHNxak.mjs → get-D_h-G9bn.mjs} +7 -11
  93. package/dist/get-DdsoHaKH.mjs +31 -0
  94. package/dist/{get-Ct5TnofS.mjs → get-DkWO0EI0.mjs} +7 -11
  95. package/dist/{get-fGOQA0GF.mjs → get-Dmj9Ygz1.mjs} +7 -17
  96. package/dist/get-DmpB6J9g.mjs +31 -0
  97. package/dist/{get-Csa7Dz36.mjs → get-Dn9ZiSZr.mjs} +8 -16
  98. package/dist/{get-run-DqwPQRMJ.mjs → get-run-Cnux9ln0.mjs} +7 -11
  99. package/dist/git-sync-BDnxPrqU.mjs +104 -0
  100. package/dist/git-sync-DxD_ng48.mjs +136 -0
  101. package/dist/git-sync-MQQYRYLg.mjs +28 -0
  102. package/dist/{group-CILtQqCL.mjs → group-DBM87IgC.mjs} +2 -4
  103. package/dist/has-remote-changes-C684Redh.mjs +35 -0
  104. package/dist/import-Rmmttboo.mjs +56 -0
  105. package/dist/{input-D2-H-QKX.mjs → input-DH9i67x_.mjs} +6 -11
  106. package/dist/{is-dirty-B87YMLV2.mjs → is-dirty-DYeJYhBz.mjs} +4 -8
  107. package/dist/{items-DrP1b4Qj.mjs → items-CQlPXBXE.mjs} +13 -29
  108. package/dist/key-BEhqIzIQ.mjs +10 -0
  109. package/dist/{library-bUBWlweP.mjs → library-Bsm5KsFF.mjs} +6 -9
  110. package/dist/library-ClLgrAXy.mjs +19 -0
  111. package/dist/library-DfYAT2Ep.mjs +21 -0
  112. package/dist/{list-B8zgT05M.mjs → list-B4hJuMhA.mjs} +11 -27
  113. package/dist/list-B8nAGwP4.mjs +48 -0
  114. package/dist/list-BOET6zhP.mjs +36 -0
  115. package/dist/list-BP3MPq-M.mjs +36 -0
  116. package/dist/list-BpFp9Wre.mjs +28 -0
  117. package/dist/list-BtkWNtvY.mjs +34 -0
  118. package/dist/list-BtmsNOEn.mjs +28 -0
  119. package/dist/list-BzVTHOoH.mjs +28 -0
  120. package/dist/list-C5Zs8nrb.mjs +28 -0
  121. package/dist/list-CKK-s3Ty.mjs +28 -0
  122. package/dist/list-CMpoc2TN.mjs +70 -0
  123. package/dist/list-CNUiF8Z7.mjs +28 -0
  124. package/dist/list-CQDprvW0.mjs +39 -0
  125. package/dist/{list-DCl7zHCp.mjs → list-CQwOgIlj.mjs} +10 -24
  126. package/dist/list-DE9FM957.mjs +28 -0
  127. package/dist/{list-F_hMRbsa.mjs → list-DF2rvoO1.mjs} +22 -14
  128. package/dist/list-DMKDsBRd.mjs +38 -0
  129. package/dist/{list-TibX1b8i.mjs → list-UhpKG6_m.mjs} +15 -15
  130. package/dist/{login-C5Ug3BVC.mjs → login-CGHeSjlP.mjs} +47 -52
  131. package/dist/{logout-B_N1N2DV.mjs → logout-DAxOlbv4.mjs} +7 -12
  132. package/dist/measure-4P0bOlZ3.mjs +29 -0
  133. package/dist/measure-BsYv0p26.mjs +22 -0
  134. package/dist/{measure-ByY4U3ZK.mjs → measure-CtfjqJFP.mjs} +3 -30
  135. package/dist/network-error-CEb9ymDW.mjs +423 -0
  136. package/dist/notification-DaA4bBHW.mjs +138 -0
  137. package/dist/notification-Fcq1fIPw.mjs +67 -0
  138. package/dist/{parameter-BZ6y-Gfs.mjs → parameter-DUKR8NXo.mjs} +2 -11
  139. package/dist/{parameter-values-ZXKECrJk.mjs → parameter-values-CJTdqd8c.mjs} +17 -11
  140. package/dist/{parse-enum-D5h-JePs.mjs → parse-enum-D0Jfm_Bz.mjs} +2 -4
  141. package/dist/{parse-id-ySsF4nA3.mjs → parse-id-C_jmKFaa.mjs} +2 -4
  142. package/dist/{parse-ref-Ds8VxdKb.mjs → parse-ref-ibKVB0J4.mjs} +3 -5
  143. package/dist/{path-C6ucgeYs.mjs → path-B5gHvrYL.mjs} +8 -9
  144. package/dist/{poll-CgzD9_RH.mjs → poll-75SvT7Zv.mjs} +11 -15
  145. package/dist/predicates-Bkm2IoeX.mjs +170 -0
  146. package/dist/preflight-YpPQo-sa.mjs +29 -0
  147. package/dist/{process-jjR_DX5G.mjs → process-DBOOrmET.mjs} +4 -6
  148. package/dist/{publish-F-QbufXr.mjs → publish-DijrxaCW.mjs} +29 -24
  149. package/dist/pulse-BmsDenXm.mjs +133 -0
  150. package/dist/pulse-DhG6I9mI.mjs +57 -0
  151. package/dist/{query-DX4r0-uz.mjs → query-BbqECzmF.mjs} +20 -44
  152. package/dist/{query-DGBzATpV.mjs → query-Dc__-KJH.mjs} +13 -24
  153. package/dist/{query-result-D5J3Dlpn.mjs → query-result-DBDwk8TS.mjs} +4 -8
  154. package/dist/remove-collection-BOnxYvhj.mjs +36 -0
  155. package/dist/{render-CkuFkWlQ.mjs → render-CI93iP0I.mjs} +9 -11
  156. package/dist/{replace-xlQv9yl_.mjs → replace-Cq4CxVa-.mjs} +7 -12
  157. package/dist/rescan-values-Dr_j416g.mjs +31 -0
  158. package/dist/revision-message-flag-8TCHYJV6.mjs +8 -0
  159. package/dist/run-C3DkS6NP.mjs +82 -0
  160. package/dist/{run-opQkYIaT.mjs → run-DdGJ544X.mjs} +8 -18
  161. package/dist/runs-CUNWiidL.mjs +38 -0
  162. package/dist/runtime-DiKyBxOw.mjs +1007 -0
  163. package/dist/{schema-tables-8FjtkFIt.mjs → schema-tables-CV386fnC.mjs} +10 -14
  164. package/dist/{schemas-L9kMsEJL.mjs → schemas-DM-UqZBQ.mjs} +8 -12
  165. package/dist/search-DFBwUc6d.mjs +44 -0
  166. package/dist/{search-Csbb-u-_.mjs → search-DmGScXs8.mjs} +14 -73
  167. package/dist/segment-BzUGM2Fr.mjs +22 -0
  168. package/dist/segment-C_gl5ag6.mjs +29 -0
  169. package/dist/{segment-eeGhLo7_.mjs → segment-OsrbUDzw.mjs} +3 -30
  170. package/dist/{selectors-D34gXjQa.mjs → selectors-DGDn0Hto.mjs} +4 -6
  171. package/dist/send-CVxxEpDB.mjs +49 -0
  172. package/dist/{set-CfwncOI_.mjs → set-DFolTjbd.mjs} +10 -20
  173. package/dist/{set-active-gP4mjVDY.mjs → set-active-BD8L1lPX.mjs} +7 -18
  174. package/dist/setting-CwRYgHYN.mjs +35 -0
  175. package/dist/setting-DTiLCW8g.mjs +22 -0
  176. package/dist/setting-DyhaeICs.mjs +17 -0
  177. package/dist/setup-BbDQN8fe.mjs +44 -0
  178. package/dist/setup-CO7QV-ao.mjs +21 -0
  179. package/dist/signal-CMd0EFUa.mjs +16 -0
  180. package/dist/{skills-DvSQOPWg.mjs → skills--vK6J-e4.mjs} +4 -6
  181. package/dist/{skills-aRQfUvCq.mjs → skills-DTCrMcix.mjs} +13 -19
  182. package/dist/{snippet-CdjEhVCT.mjs → snippet-CyKAgIZl.mjs} +3 -32
  183. package/dist/snippet-DRwKb2x7.mjs +19 -0
  184. package/dist/snippet-oJLaYW9V.mjs +29 -0
  185. package/dist/stash-D0S4JmAz.mjs +61 -0
  186. package/dist/{status-BsEPyknG.mjs → status-BhswxJL1.mjs} +23 -23
  187. package/dist/{status-D1vtL5eW.mjs → status-hL1am-HV.mjs} +6 -8
  188. package/dist/subscription-_d5fB45F.mjs +22 -0
  189. package/dist/subscriptions-s4TF6Ax3.mjs +42 -0
  190. package/dist/summary-BytbDz6e.mjs +7 -0
  191. package/dist/summary-CsPvcUwW.mjs +31 -0
  192. package/dist/sync-schema-DaZ_MV-u.mjs +35 -0
  193. package/dist/sync-task-BACcrs0i.mjs +37 -0
  194. package/dist/{table-3onHpwcb.mjs → table-CeeTJgQb.mjs} +4 -38
  195. package/dist/table-CsIJNPFf.mjs +37 -0
  196. package/dist/table-DYoC1kPn.mjs +18 -0
  197. package/dist/{timeline-2ShuGr4f.mjs → timeline-CCSU2qOS.mjs} +2 -66
  198. package/dist/timeline-event-CNQdCTDg.mjs +19 -0
  199. package/dist/timeline-uDCmwGFT.mjs +66 -0
  200. package/dist/timeline-xlDbEKWg.mjs +21 -0
  201. package/dist/transform-Bs0EWijQ.mjs +28 -0
  202. package/dist/{transform-DNSMm1dV.mjs → transform-D3QX0jxA.mjs} +28 -74
  203. package/dist/transform-DoTyyXAu.mjs +74 -0
  204. package/dist/transform-job-50GZHhKH.mjs +37 -0
  205. package/dist/transform-job-BcLChRup.mjs +22 -0
  206. package/dist/{transform-job-CvE0MBBo.mjs → transform-job-DRrK28IH.mjs} +14 -41
  207. package/dist/{transform-tag-xdxjlDcD.mjs → transform-tag-CcElGp3C.mjs} +2 -21
  208. package/dist/transform-tag-Dmb4u3-Q.mjs +21 -0
  209. package/dist/transform-tag-_tgwlsdB.mjs +18 -0
  210. package/dist/{transforms-BQkmsPUR.mjs → transforms-oU4zizbO.mjs} +10 -13
  211. package/dist/{tree-CtufTBZY.mjs → tree-CH-f3bjP.mjs} +6 -10
  212. package/dist/{unpublish-CnLXPYR8.mjs → unpublish-BUl9RU5C.mjs} +7 -18
  213. package/dist/{update-BC-MLtiG.mjs → update-BCS5FxKr.mjs} +11 -19
  214. package/dist/{update-CqQj32ol.mjs → update-BZPllQoR.mjs} +9 -16
  215. package/dist/{update-DmQJqGvX.mjs → update-BiFDBcEH.mjs} +9 -16
  216. package/dist/update-BzMDeZiU.mjs +50 -0
  217. package/dist/{update-Dt9-3Tqf.mjs → update-C4YJQFDS.mjs} +9 -16
  218. package/dist/{update-C4P_YtGW.mjs → update-CHNSUHK4.mjs} +9 -16
  219. package/dist/{update-bz-FKwuR.mjs → update-CO4m4wH3.mjs} +10 -21
  220. package/dist/{update-BZxLyBVm.mjs → update-CVPAwJaH.mjs} +10 -18
  221. package/dist/{update-dJ2mlCXm.mjs → update-CmDTljK-.mjs} +9 -16
  222. package/dist/{update-DcYwxb-R.mjs → update-CvOO8TED.mjs} +9 -17
  223. package/dist/{update-QNuvGuS3.mjs → update-D-NE60AV.mjs} +9 -16
  224. package/dist/{update-DshCe-bl.mjs → update-Nfi44RrE.mjs} +10 -18
  225. package/dist/update-bD_Jh5-s.mjs +51 -0
  226. package/dist/{update-D6blsNGY.mjs → update-cYkvbqK8.mjs} +9 -16
  227. package/dist/update-dashcard-C3TuYO_k.mjs +50 -0
  228. package/dist/{update-CE-Z6E8V.mjs → update-tX9mKBN_.mjs} +10 -21
  229. package/dist/{upgrade--_g3bacj.mjs → upgrade-DXMV4AyP.mjs} +37 -44
  230. package/dist/upload-CH632qW6.mjs +46 -0
  231. package/dist/upload-DAtxBBms.mjs +13 -0
  232. package/dist/upload-Dey_8rLf.mjs +13 -0
  233. package/dist/{uuid-DBKkosBq.mjs → uuid-BJkDWj9p.mjs} +5 -7
  234. package/dist/validate-BWchyW0V.mjs +1469 -0
  235. package/dist/{validate-query-tECK019A.mjs → validate-query-DaGYSmpQ.mjs} +4 -5
  236. package/dist/{values-BAhMnVh6.mjs → values-Dxf1JEoA.mjs} +8 -13
  237. package/dist/verify-K96rItG5.mjs +89 -0
  238. package/dist/{wait-BJ_87Yz0.mjs → wait-DoMDH226.mjs} +10 -18
  239. package/dist/{wait-flags-DEn-3mjb.mjs → wait-flags-DWEF9tX4.mjs} +14 -11
  240. package/dist/window-BkvrP0gB.mjs +64 -0
  241. package/package.json +5 -35
  242. package/skill-data/core/SKILL.md +30 -25
  243. package/skill-data/dashboard/SKILL.md +6 -2
  244. package/skill-data/document/SKILL.md +2 -2
  245. package/skill-data/notification/SKILL.md +157 -0
  246. package/skill-data/transform/SKILL.md +1 -1
  247. package/.claude-plugin/marketplace.json +0 -19
  248. package/dist/add-collection-BZAVH5Wk.mjs +0 -60
  249. package/dist/add-collection-DByJYvGO.mjs +0 -9
  250. package/dist/auth-XfuGXI2K.mjs +0 -22
  251. package/dist/capabilities-CSjeWyLV.mjs +0 -684
  252. package/dist/card-B_kiDDil.mjs +0 -26
  253. package/dist/cards-23FtfL4S.mjs +0 -38
  254. package/dist/cli.d.mts +0 -1
  255. package/dist/collection-DNzM3u7n.mjs +0 -23
  256. package/dist/command-augment-D9pI9Vbh.mjs +0 -11
  257. package/dist/create-branch-BtqOfSRb.mjs +0 -57
  258. package/dist/dashboard-kb1oz7Z3.mjs +0 -35
  259. package/dist/database-BOqzcexD.mjs +0 -61
  260. package/dist/db-CHnqeJCo.mjs +0 -27
  261. package/dist/dirty-CN6sGKX3.mjs +0 -35
  262. package/dist/document-Y_DZNi4D.mjs +0 -22
  263. package/dist/events-CSZEAgs0.mjs +0 -44
  264. package/dist/export-CAxUJer6.mjs +0 -103
  265. package/dist/field-DAB2gImv.mjs +0 -21
  266. package/dist/fields-CLWtUlpR.mjs +0 -37
  267. package/dist/get-B22wjDxr.mjs +0 -38
  268. package/dist/get-BIHtWl2x.mjs +0 -35
  269. package/dist/get-B_QKP1vR.mjs +0 -35
  270. package/dist/get-Ca30K5_W.mjs +0 -35
  271. package/dist/get-DTjeTNGb.mjs +0 -49
  272. package/dist/get-DU8V-7S2.mjs +0 -35
  273. package/dist/get-H3X5e5-Y.mjs +0 -41
  274. package/dist/git-sync-BhhdNjq5.mjs +0 -31
  275. package/dist/has-remote-changes-D0ZIBHSk.mjs +0 -67
  276. package/dist/import-BcIcDPl9.mjs +0 -94
  277. package/dist/is-dirty-CXTS25Tk.mjs +0 -8
  278. package/dist/key-GP1gxZZD.mjs +0 -17
  279. package/dist/list-B-_PTqKw.mjs +0 -53
  280. package/dist/list-B8212eUr.mjs +0 -39
  281. package/dist/list-BhCahBEO.mjs +0 -39
  282. package/dist/list-CWQYaCp8.mjs +0 -31
  283. package/dist/list-Cbhx7N_t.mjs +0 -31
  284. package/dist/list-CoXeBm66.mjs +0 -49
  285. package/dist/list-D1pHJX7w.mjs +0 -31
  286. package/dist/list-DhT42e0q.mjs +0 -31
  287. package/dist/list-GeqRHx8g.mjs +0 -31
  288. package/dist/list-MPePXEWe.mjs +0 -31
  289. package/dist/list-TJjExx6e.mjs +0 -31
  290. package/dist/list-TQghfc-u.mjs +0 -39
  291. package/dist/listing-wFZuS5li.mjs +0 -10
  292. package/dist/measure-D9rKeA6Z.mjs +0 -25
  293. package/dist/paginate-FVZUxL4J.mjs +0 -49
  294. package/dist/poll-task-DF9xJl13.mjs +0 -194
  295. package/dist/preflight-Co2grgX_.mjs +0 -90
  296. package/dist/prompt-BSqji7Fo.mjs +0 -52
  297. package/dist/remove-collection-C-msSyas.mjs +0 -42
  298. package/dist/requests-COuEPJxE.mjs +0 -96
  299. package/dist/rescan-values-BC2SVtY6.mjs +0 -40
  300. package/dist/resolve-8iT-dXgX.mjs +0 -91
  301. package/dist/revision-message-flag-vt_V8ACy.mjs +0 -11
  302. package/dist/run-Cg6k3kHo.mjs +0 -135
  303. package/dist/runs-Cbqm1HYG.mjs +0 -53
  304. package/dist/runtime-MGH96fhp.mjs +0 -1695
  305. package/dist/segment-DCeafJwX.mjs +0 -25
  306. package/dist/setting-D5Y9sJha.mjs +0 -20
  307. package/dist/setting-DADuiF5W.mjs +0 -55
  308. package/dist/setup-D9HNfS7W.mjs +0 -71
  309. package/dist/snippet-CwRiMCfE.mjs +0 -22
  310. package/dist/stash-C_k1uZlf.mjs +0 -108
  311. package/dist/summary-h20AjhcO.mjs +0 -40
  312. package/dist/sync-schema-D67cYLhd.mjs +0 -54
  313. package/dist/sync-scope-CKx6xeF6.mjs +0 -55
  314. package/dist/table-CmKFWPvJ.mjs +0 -21
  315. package/dist/timeline-1ZphX3zj.mjs +0 -24
  316. package/dist/timeline-event-C6aKZ4EO.mjs +0 -22
  317. package/dist/transform-CvsBOTqB.mjs +0 -31
  318. package/dist/transform-job-D_8Kp772.mjs +0 -25
  319. package/dist/transform-tag-DhDnvbmq.mjs +0 -21
  320. package/dist/update-dashcard-CQP-qd6a.mjs +0 -73
  321. package/dist/upload-BOFc_eZD.mjs +0 -16
  322. package/dist/validate-Bpqt3ntH.mjs +0 -1496
  323. package/dist/verify-RLb2DoOX.mjs +0 -79
package/dist/cli.mjs CHANGED
@@ -1,21 +1,133 @@
1
1
  #!/usr/bin/env node
2
- import { Capabilities, ConfigError, connectionFlags, flagConsumesValue, jsonLine, normalizeFlag, outputFlags, package_default, profileFlag, reportError, resolveCitty, toAliasArray } from "./capabilities-CSjeWyLV.mjs";
3
- import { getMetabaseAugment, setMetabaseAugment } from "./command-augment-D9pI9Vbh.mjs";
2
+ import { i as ConfigError, m as toMetabaseError, n as AbortError, t as isPlainObject } from "./predicates-Bkm2IoeX.mjs";
4
3
  import { defineCommand, renderUsage, runMain } from "citty";
5
4
  import { z } from "zod";
6
5
  import tls from "node:tls";
7
-
6
+ import { confirm, isCancel, password, select, text } from "@clack/prompts";
7
+ import Table from "cli-table3";
8
+ //#region src/runtime/citty.ts
9
+ async function resolveCitty(value) {
10
+ if (value === void 0) return;
11
+ if (typeof value === "function") return value();
12
+ return value;
13
+ }
14
+ function toAliasArray(alias) {
15
+ if (alias === void 0) return [];
16
+ return Array.isArray(alias) ? alias : [alias];
17
+ }
18
+ function normalizeFlag(value) {
19
+ return value.replace(/^-+/, "").replace(/-/g, "").toLowerCase();
20
+ }
21
+ function flagConsumesValue(token, argsDef) {
22
+ if (token.includes("=")) return false;
23
+ const name = normalizeFlag(token);
24
+ for (const [key, def] of Object.entries(argsDef)) {
25
+ if (def.type !== "string" && def.type !== "enum") continue;
26
+ if (normalizeFlag(key) === name) return true;
27
+ if (toAliasArray(def.alias).some((alias) => normalizeFlag(alias) === name)) return true;
28
+ }
29
+ return false;
30
+ }
31
+ //#endregion
32
+ //#region src/output/types.ts
33
+ const DEFAULT_MAX_BYTES = 24576;
34
+ function listEnvelopeSchema(item) {
35
+ return z.object({
36
+ data: z.array(item).describe("The items in this window."),
37
+ returned: z.number().int().nonnegative().describe("Number of items in `data`; a short window is not proof the walk is over."),
38
+ offset: z.number().int().nonnegative().describe("Index of the first item in `data` within the full result set."),
39
+ limit: z.number().int().nonnegative().optional().describe("Echoes `--limit` when you passed one, and is absent otherwise."),
40
+ total: z.number().int().nonnegative().nullable().optional().describe("The server's count on endpoints that report one and `null` on those that don't, so it is a display value rather than a loop bound."),
41
+ has_more: z.boolean().describe("True when more items exist beyond this window; this alone decides whether to keep going, never a comparison of counts. True with a `null` next_offset means the remaining items are reached by widening `--max-bytes` or narrowing the selection, not by paging."),
42
+ next_offset: z.number().int().nonnegative().nullable().optional().describe("Pass back as `--offset` to fetch the next window; it is past the offset you sent, and `null` when there is nowhere to resume from — either the walk is over or `--max-bytes` left no room for a single row, which `truncated` tells apart."),
43
+ truncated: z.object({
44
+ reason: z.literal("max_bytes"),
45
+ bytes: z.number().int().nonnegative()
46
+ }).optional().describe("Present when the `--max-bytes` cap cut the output, not when the data ran out; its `bytes` is what the untruncated answer would have measured, so narrow rows with `--fields` rather than raising the cap.")
47
+ });
48
+ }
49
+ //#endregion
50
+ //#region src/commands/flags.ts
51
+ const outputFlags = {
52
+ format: {
53
+ type: "string",
54
+ description: "auto | json | text",
55
+ default: "auto"
56
+ },
57
+ json: {
58
+ type: "boolean",
59
+ description: "Shorthand for --format json"
60
+ },
61
+ full: {
62
+ type: "boolean",
63
+ description: "Return the full object (default: compact)"
64
+ },
65
+ fields: {
66
+ type: "string",
67
+ description: "Dot-paths, comma separated (mutually exclusive with --full)"
68
+ },
69
+ maxBytes: {
70
+ type: "string",
71
+ description: "Output size cap; 0 disables",
72
+ default: String(DEFAULT_MAX_BYTES),
73
+ alias: "max-bytes"
74
+ }
75
+ };
76
+ const listFlags = {
77
+ limit: {
78
+ type: "string",
79
+ description: "Max items to return (default: as many as fit the output cap)"
80
+ },
81
+ offset: {
82
+ type: "string",
83
+ description: "Start at this item index; pass the previous run's next_offset to continue",
84
+ default: "0"
85
+ }
86
+ };
87
+ function listFlagsWithDefaultLimit(defaultLimit) {
88
+ return {
89
+ ...listFlags,
90
+ limit: {
91
+ type: "string",
92
+ description: "Max items to return",
93
+ default: String(defaultLimit)
94
+ }
95
+ };
96
+ }
97
+ const profileFlag = { profile: {
98
+ type: "string",
99
+ description: "Named profile (default: 'default')",
100
+ alias: "p"
101
+ } };
102
+ const connectionFlags = {
103
+ url: {
104
+ type: "string",
105
+ description: "Metabase URL"
106
+ },
107
+ apiKey: {
108
+ type: "string",
109
+ description: "API key",
110
+ alias: "api-key"
111
+ },
112
+ skipPreflight: {
113
+ type: "boolean",
114
+ description: "Skip the server version capability check for this command",
115
+ alias: "skip-preflight"
116
+ }
117
+ };
118
+ //#endregion
8
119
  //#region src/commands/global-flags.ts
9
120
  const ARGUMENT_SEPARATOR = "--";
10
121
  const NEGATION_PREFIX = "no-";
11
122
  const GLOBAL_FLAG_ARGS = {
12
123
  ...outputFlags,
124
+ ...listFlags,
13
125
  ...profileFlag,
14
126
  ...connectionFlags
15
127
  };
16
128
  const GLOBAL_FLAG_NAMES = buildGlobalFlagNames();
17
129
  function buildGlobalFlagNames() {
18
- const names = new Set();
130
+ const names = /* @__PURE__ */ new Set();
19
131
  for (const [key, def] of Object.entries(GLOBAL_FLAG_ARGS)) {
20
132
  names.add(normalizeFlag(key));
21
133
  if ("alias" in def) for (const alias of toAliasArray(def.alias)) names.add(normalizeFlag(alias));
@@ -28,7 +140,7 @@ function isGlobalFlag(token) {
28
140
  const name = normalizeFlag(raw);
29
141
  if (GLOBAL_FLAG_NAMES.has(name)) return true;
30
142
  const bare = raw.replace(/^-+/, "");
31
- if (bare.startsWith(NEGATION_PREFIX)) return GLOBAL_FLAG_NAMES.has(normalizeFlag(bare.slice(NEGATION_PREFIX.length)));
143
+ if (bare.startsWith(NEGATION_PREFIX)) return GLOBAL_FLAG_NAMES.has(normalizeFlag(bare.slice(3)));
32
144
  return false;
33
145
  }
34
146
  function hoistGlobalFlags(rawArgs) {
@@ -50,9 +162,8 @@ function hoistGlobalFlags(rawArgs) {
50
162
  if (leading.length === 0) return [...rawArgs];
51
163
  return [...rawArgs.slice(index), ...leading];
52
164
  }
53
-
54
165
  //#endregion
55
- //#region src/core/http/system-ca.ts
166
+ //#region src/core/system-ca.ts
56
167
  function trustSystemCa() {
57
168
  const canReadSystemStore = typeof tls.getCACertificates === "function";
58
169
  const canReplaceDefaults = typeof tls.setDefaultCACertificates === "function";
@@ -61,43 +172,58 @@ function trustSystemCa() {
61
172
  if (systemCerts.length === 0) return;
62
173
  tls.setDefaultCACertificates([...tls.getCACertificates("default"), ...systemCerts]);
63
174
  }
64
-
175
+ //#endregion
176
+ //#region package.json
177
+ var name = "@metabase/cli";
178
+ var version = "0.2.2-alpha.extract-api-client.27e2241";
179
+ var description = "Metabase CLI";
180
+ //#endregion
181
+ //#region src/runtime/command-augment.ts
182
+ const augments = /* @__PURE__ */ new WeakMap();
183
+ function setMetabaseAugment(cmd, augment) {
184
+ augments.set(cmd, augment);
185
+ }
186
+ function getMetabaseAugment(cmd) {
187
+ return augments.get(cmd) ?? null;
188
+ }
65
189
  //#endregion
66
190
  //#region src/main.ts
67
191
  const main = defineCommand({
68
192
  meta: {
69
193
  name: "mb",
70
- version: package_default.version,
71
- description: package_default.description
194
+ version,
195
+ description
72
196
  },
73
197
  subCommands: {
74
- auth: () => import("./auth-XfuGXI2K.mjs").then((mod) => mod.default),
75
- db: () => import("./db-CHnqeJCo.mjs").then((mod) => mod.default),
76
- table: () => import("./table-CmKFWPvJ.mjs").then((mod) => mod.default),
77
- field: () => import("./field-DAB2gImv.mjs").then((mod) => mod.default),
78
- upload: () => import("./upload-BOFc_eZD.mjs").then((mod) => mod.default),
79
- card: () => import("./card-B_kiDDil.mjs").then((mod) => mod.default),
80
- dashboard: () => import("./dashboard-kb1oz7Z3.mjs").then((mod) => mod.default),
81
- collection: () => import("./collection-DNzM3u7n.mjs").then((mod) => mod.default),
82
- library: () => import("./library-bUBWlweP.mjs").then((mod) => mod.default),
83
- document: () => import("./document-Y_DZNi4D.mjs").then((mod) => mod.default),
84
- transform: () => import("./transform-CvsBOTqB.mjs").then((mod) => mod.default),
85
- "transform-job": () => import("./transform-job-D_8Kp772.mjs").then((mod) => mod.default),
86
- "transform-tag": () => import("./transform-tag-DhDnvbmq.mjs").then((mod) => mod.default),
87
- setting: () => import("./setting-D5Y9sJha.mjs").then((mod) => mod.default),
88
- search: () => import("./search-Csbb-u-_.mjs").then((mod) => mod.default),
89
- "git-sync": () => import("./git-sync-BhhdNjq5.mjs").then((mod) => mod.default),
90
- setup: () => import("./setup-D9HNfS7W.mjs").then((mod) => mod.default),
91
- snippet: () => import("./snippet-CwRiMCfE.mjs").then((mod) => mod.default),
92
- segment: () => import("./segment-DCeafJwX.mjs").then((mod) => mod.default),
93
- measure: () => import("./measure-D9rKeA6Z.mjs").then((mod) => mod.default),
94
- timeline: () => import("./timeline-1ZphX3zj.mjs").then((mod) => mod.default),
95
- "timeline-event": () => import("./timeline-event-C6aKZ4EO.mjs").then((mod) => mod.default),
96
- eid: () => import("./eid-60sCZhQV.mjs").then((mod) => mod.default),
97
- query: () => import("./query-DGBzATpV.mjs").then((mod) => mod.default),
98
- uuid: () => import("./uuid-DBKkosBq.mjs").then((mod) => mod.default),
99
- upgrade: () => import("./upgrade--_g3bacj.mjs").then((mod) => mod.default),
100
- skills: () => import("./skills-DvSQOPWg.mjs").then((mod) => mod.default)
198
+ auth: () => import("./auth-Dltxua89.mjs").then((mod) => mod.default),
199
+ db: () => import("./db-DsfojyeH.mjs").then((mod) => mod.default),
200
+ table: () => import("./table-DYoC1kPn.mjs").then((mod) => mod.default),
201
+ field: () => import("./field-Zau6Hc6X.mjs").then((mod) => mod.default),
202
+ upload: () => import("./upload-Dey_8rLf.mjs").then((mod) => mod.default),
203
+ card: () => import("./card-CHI2bmds.mjs").then((mod) => mod.default),
204
+ dashboard: () => import("./dashboard-BHJBoaG7.mjs").then((mod) => mod.default),
205
+ subscription: () => import("./subscription-_d5fB45F.mjs").then((mod) => mod.default),
206
+ alert: () => import("./alert-DT-ee7yf.mjs").then((mod) => mod.default),
207
+ collection: () => import("./collection-CY0AB99E.mjs").then((mod) => mod.default),
208
+ library: () => import("./library-Bsm5KsFF.mjs").then((mod) => mod.default),
209
+ document: () => import("./document-BbskZPTT.mjs").then((mod) => mod.default),
210
+ transform: () => import("./transform-Bs0EWijQ.mjs").then((mod) => mod.default),
211
+ "transform-job": () => import("./transform-job-BcLChRup.mjs").then((mod) => mod.default),
212
+ "transform-tag": () => import("./transform-tag-_tgwlsdB.mjs").then((mod) => mod.default),
213
+ setting: () => import("./setting-DyhaeICs.mjs").then((mod) => mod.default),
214
+ search: () => import("./search-DmGScXs8.mjs").then((mod) => mod.default),
215
+ "git-sync": () => import("./git-sync-MQQYRYLg.mjs").then((mod) => mod.default),
216
+ setup: () => import("./setup-BbDQN8fe.mjs").then((mod) => mod.default),
217
+ snippet: () => import("./snippet-DRwKb2x7.mjs").then((mod) => mod.default),
218
+ segment: () => import("./segment-BzUGM2Fr.mjs").then((mod) => mod.default),
219
+ measure: () => import("./measure-BsYv0p26.mjs").then((mod) => mod.default),
220
+ timeline: () => import("./timeline-xlDbEKWg.mjs").then((mod) => mod.default),
221
+ "timeline-event": () => import("./timeline-event-CNQdCTDg.mjs").then((mod) => mod.default),
222
+ eid: () => import("./eid-WTZmDdsr.mjs").then((mod) => mod.default),
223
+ query: () => import("./query-Dc__-KJH.mjs").then((mod) => mod.default),
224
+ uuid: () => import("./uuid-BJkDWj9p.mjs").then((mod) => mod.default),
225
+ upgrade: () => import("./upgrade-DXMV4AyP.mjs").then((mod) => mod.default),
226
+ skills: () => import("./skills--vK6J-e4.mjs").then((mod) => mod.default)
101
227
  }
102
228
  });
103
229
  setMetabaseAugment(main, {
@@ -114,8 +240,449 @@ setMetabaseAugment(main, {
114
240
  outputSchema: null,
115
241
  capabilities: null
116
242
  });
117
- var main_default = main;
118
-
243
+ //#endregion
244
+ //#region src/core/env.ts
245
+ const LEGACY_PREFIX = "METABASE_";
246
+ const ENV_URL = "MB_URL";
247
+ const ENV_API_KEY = "MB_API_KEY";
248
+ const ENV_PROFILE = "MB_PROFILE";
249
+ const ENV_VERBOSE = "MB_VERBOSE";
250
+ const ENV_SKIP_PREFLIGHT = "MB_CLI_SKIP_PREFLIGHT";
251
+ const ENV_DISABLE_KEYRING = "MB_CLI_DISABLE_KEYRING";
252
+ const ENV_SKILLS_DIR = "MB_SKILLS_DIR";
253
+ function legacyNameFor(canonical) {
254
+ return LEGACY_PREFIX + canonical.slice(3);
255
+ }
256
+ const legacyVarsUsed = /* @__PURE__ */ new Set();
257
+ function readEnv(canonical) {
258
+ const direct = process.env[canonical];
259
+ if (direct !== void 0) return direct;
260
+ const legacyValue = process.env[legacyNameFor(canonical)];
261
+ if (legacyValue !== void 0) {
262
+ legacyVarsUsed.add(canonical);
263
+ return legacyValue;
264
+ }
265
+ }
266
+ function consumeLegacyEnvWarnings() {
267
+ if (legacyVarsUsed.size === 0) return [];
268
+ const messages = [...legacyVarsUsed].map(legacyEnvWarning);
269
+ legacyVarsUsed.clear();
270
+ return messages;
271
+ }
272
+ function legacyEnvWarning(canonical) {
273
+ return `warning: ${legacyNameFor(canonical)} is deprecated; set ${canonical} instead`;
274
+ }
275
+ //#endregion
276
+ //#region src/output/notice.ts
277
+ function warn(message) {
278
+ process.stderr.write(message + "\n");
279
+ }
280
+ const LIST_TRUNCATION_REMEDY = "narrow the selection or raise --max-bytes";
281
+ function listTruncationNotice(bytes, nextOffset, hint) {
282
+ return `… cut at ${bytes} bytes; ${typeof nextOffset === "number" ? `continue with --offset ${nextOffset}, ` : ""}${hint ?? LIST_TRUNCATION_REMEDY}`;
283
+ }
284
+ const ITEM_OVERSIZE_REMEDY = "narrow with --fields or raise the cap with --max-bytes <n>";
285
+ function itemOversizeMessage(bytes, maxBytes, hint) {
286
+ return `output is ${bytes} bytes, over the ${maxBytes}-byte --max-bytes cap; ${hint ?? ITEM_OVERSIZE_REMEDY}`;
287
+ }
288
+ //#endregion
289
+ //#region src/output/prompt.ts
290
+ function isPromptCancel(value) {
291
+ return isCancel(value);
292
+ }
293
+ async function promptText(opts) {
294
+ requireTty(opts.message);
295
+ const value = await text({
296
+ message: opts.message,
297
+ defaultValue: "",
298
+ ...opts.placeholder !== void 0 && { placeholder: opts.placeholder },
299
+ ...opts.initialValue !== void 0 && { initialValue: opts.initialValue },
300
+ ...opts.defaultValue !== void 0 && { defaultValue: opts.defaultValue },
301
+ ...opts.validate !== void 0 && { validate: opts.validate }
302
+ });
303
+ if (isCancel(value)) throw new AbortError();
304
+ return value;
305
+ }
306
+ async function promptPassword(opts) {
307
+ requireTty(opts.message);
308
+ const value = await password({
309
+ message: opts.message,
310
+ ...opts.mask !== void 0 && { mask: opts.mask },
311
+ ...opts.validate !== void 0 && { validate: opts.validate }
312
+ });
313
+ if (isCancel(value)) throw new AbortError();
314
+ return value;
315
+ }
316
+ async function promptConfirm(opts) {
317
+ requireTty(opts.message);
318
+ const value = await confirm({
319
+ message: opts.message,
320
+ ...opts.initialValue !== void 0 && { initialValue: opts.initialValue }
321
+ });
322
+ if (isCancel(value)) throw new AbortError();
323
+ return value;
324
+ }
325
+ async function promptSelect(opts) {
326
+ requireTty(opts.message);
327
+ const value = await select({
328
+ message: opts.message,
329
+ options: opts.choices,
330
+ ...opts.initialValue !== void 0 && { initialValue: opts.initialValue }
331
+ });
332
+ if (isCancel(value)) throw new AbortError();
333
+ return value;
334
+ }
335
+ function requireTty(prompt) {
336
+ if (!process.stdin.isTTY) throw new ConfigError(`cannot prompt "${prompt}" — stdin is not a TTY`);
337
+ }
338
+ //#endregion
339
+ //#region src/output/cap.ts
340
+ function fitWithinCap(envelope, maxBytes) {
341
+ const fullBytes = jsonByteLength(envelope);
342
+ if (maxBytes <= 0 || fullBytes <= maxBytes) return {
343
+ count: envelope.data.length,
344
+ fullBytes,
345
+ cut: false
346
+ };
347
+ let lo = 0;
348
+ let hi = envelope.data.length;
349
+ while (lo < hi) {
350
+ const mid = Math.ceil((lo + hi) / 2);
351
+ if (jsonByteLength(truncate(envelope, mid, fullBytes)) <= maxBytes) lo = mid;
352
+ else hi = mid - 1;
353
+ }
354
+ return {
355
+ count: lo,
356
+ fullBytes,
357
+ cut: true
358
+ };
359
+ }
360
+ function capListEnvelope(envelope, maxBytes) {
361
+ const fit = fitWithinCap(envelope, maxBytes);
362
+ if (!fit.cut || envelope.data.length === 0) return envelope;
363
+ return truncate(envelope, fit.count, fit.fullBytes);
364
+ }
365
+ function truncate(envelope, count, originalBytes) {
366
+ return {
367
+ ...envelope,
368
+ data: envelope.data.slice(0, count),
369
+ returned: count,
370
+ has_more: true,
371
+ next_offset: count === 0 ? null : envelope.offset + count,
372
+ truncated: {
373
+ reason: "max_bytes",
374
+ bytes: originalBytes
375
+ }
376
+ };
377
+ }
378
+ function jsonByteLength(value) {
379
+ return Buffer.byteLength(JSON.stringify(value), "utf8");
380
+ }
381
+ //#endregion
382
+ //#region src/output/projection.ts
383
+ function projectForList(item, view, opts) {
384
+ const full = opts.format === "text" && opts.fields === void 0 ? false : opts.full;
385
+ try {
386
+ return applyProjection(item, view, full, opts.fields);
387
+ } catch (error) {
388
+ throw enrichListFieldPathError(error, opts.fields);
389
+ }
390
+ }
391
+ function enrichListFieldPathError(error, fields) {
392
+ if (fields === void 0 || !(error instanceof ConfigError) || !error.message.startsWith("unknown field path")) return error;
393
+ const prefix = "data.";
394
+ const culprit = fields.find((field) => field === "data" || field.startsWith(prefix));
395
+ if (culprit === void 0) return error;
396
+ const suggestion = culprit.startsWith(prefix) ? culprit.slice(5) : "<field>";
397
+ return new ConfigError(`${error.message} — on list commands --fields paths are relative to each item in \`data\`, not the envelope. Drop the \`data.\` prefix (e.g. use \`${suggestion}\` instead of \`${culprit}\`).`);
398
+ }
399
+ function applyProjection(value, view, full, fields) {
400
+ if (fields !== void 0) {
401
+ if (fields.length === 0) throw new ConfigError("--fields requires at least one path");
402
+ return projectFields(value, fields);
403
+ }
404
+ if (full) return value;
405
+ const parsed = view.compactPick.safeParse(value);
406
+ if (parsed.success) return parsed.data;
407
+ throw new ConfigError(`compact projection failed: ${parsed.error.message}`);
408
+ }
409
+ function projectFields(value, fields) {
410
+ const out = {};
411
+ for (const path of fields) {
412
+ if (path.length === 0) throw new ConfigError(`empty field path`);
413
+ const parts = path.split(".");
414
+ if (parts.some((part) => part.length === 0)) throw new ConfigError(`invalid field path: "${path}"`);
415
+ setPath(out, parts, pickPath(value, parts));
416
+ }
417
+ return out;
418
+ }
419
+ function pickPath(value, parts) {
420
+ let cursor = value;
421
+ for (const part of parts) {
422
+ if (!isPlainObject(cursor) || !Object.hasOwn(cursor, part)) throw new ConfigError(`unknown field path: "${parts.join(".")}"`);
423
+ cursor = Reflect.get(cursor, part);
424
+ }
425
+ return cursor;
426
+ }
427
+ function setPath(target, parts, value) {
428
+ let cursor = target;
429
+ const lastIndex = parts.length - 1;
430
+ for (const [index, part] of parts.entries()) {
431
+ if (index === lastIndex) {
432
+ cursor[part] = value;
433
+ return;
434
+ }
435
+ const existing = cursor[part];
436
+ if (isPlainObject(existing)) cursor = existing;
437
+ else {
438
+ const next = {};
439
+ cursor[part] = next;
440
+ cursor = next;
441
+ }
442
+ }
443
+ }
444
+ //#endregion
445
+ //#region src/output/table.ts
446
+ const PLAIN_TABLE_STYLE = {
447
+ head: [],
448
+ border: []
449
+ };
450
+ function renderTable(rows, columns) {
451
+ const head = columns.map((column) => column.label ?? column.key);
452
+ const widths = columns.map((column) => column.width ?? null);
453
+ const table = new Table(widths.some((width) => width !== null) ? {
454
+ head,
455
+ colWidths: widths,
456
+ style: PLAIN_TABLE_STYLE
457
+ } : {
458
+ head,
459
+ style: PLAIN_TABLE_STYLE
460
+ });
461
+ for (const row of rows) table.push(columns.map((column) => formatCell(row, column)));
462
+ return table.toString();
463
+ }
464
+ function renderRows(head, rows) {
465
+ const table = new Table({
466
+ head: [...head],
467
+ style: PLAIN_TABLE_STYLE
468
+ });
469
+ for (const row of rows) table.push([...row]);
470
+ return table.toString();
471
+ }
472
+ function formatCell(row, column) {
473
+ const value = row[column.key];
474
+ if (column.format !== void 0) return column.format(value);
475
+ return formatScalar(value);
476
+ }
477
+ const MALFORMED_CELL = "<malformed>";
478
+ function formatScalar(value) {
479
+ if (value === null || value === void 0) return "";
480
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return String(value);
481
+ return JSON.stringify(value);
482
+ }
483
+ //#endregion
484
+ //#region src/output/render.ts
485
+ function serializeJson(value, pretty) {
486
+ return JSON.stringify(value, null, pretty ? 2 : void 0);
487
+ }
488
+ function stdoutPretty() {
489
+ return process.stdout.isTTY === true;
490
+ }
491
+ function jsonLine(value) {
492
+ return serializeJson(value, stdoutPretty()) + "\n";
493
+ }
494
+ function writeJson(value) {
495
+ process.stdout.write(jsonLine(value));
496
+ }
497
+ function writeText(text) {
498
+ process.stdout.write(text + "\n");
499
+ }
500
+ function renderItem(item, view, opts) {
501
+ const body = renderItemBody(item, view, applyProjection(item, view, opts.full, opts.fields), opts) + "\n";
502
+ assertItemWithinMaxBytes(body, opts);
503
+ process.stdout.write(body);
504
+ }
505
+ function renderSummary(item, view, summaryText, opts) {
506
+ if (opts.format === "json" || opts.fields !== void 0 || opts.full) {
507
+ renderItem(item, view, opts);
508
+ return;
509
+ }
510
+ const body = (typeof summaryText === "function" ? summaryText() : summaryText) + "\n";
511
+ assertItemWithinMaxBytes(body, opts);
512
+ process.stdout.write(body);
513
+ }
514
+ function renderList(envelope, view, opts) {
515
+ if (opts.format === "json") {
516
+ renderJsonEnvelope(envelope, view, opts);
517
+ return;
518
+ }
519
+ if (envelope.data.length === 0) {
520
+ process.stdout.write("(no results)\n");
521
+ return;
522
+ }
523
+ if (opts.fields !== void 0) {
524
+ renderProjectedTable(envelope, view, opts.fields, opts);
525
+ return;
526
+ }
527
+ const fit = fitWithinCap(projectedEnvelope(envelope, view, opts), opts.maxBytes);
528
+ const kept = envelope.data.slice(0, fit.count);
529
+ process.stdout.write(renderTable(kept, view.tableColumns) + "\n");
530
+ warnIfCut(fit, envelope.offset, opts.oversizeHint);
531
+ }
532
+ function warnIfCut(fit, offset, hint) {
533
+ if (!fit.cut) return;
534
+ warn(listTruncationNotice(fit.fullBytes, fit.count === 0 ? null : offset + fit.count, hint));
535
+ }
536
+ function renderProjectedTable(envelope, view, fields, opts) {
537
+ const projected = projectedEnvelope(envelope, view, opts);
538
+ const fit = fitWithinCap(projected, opts.maxBytes);
539
+ const rows = projected.data.slice(0, fit.count).map((item) => fields.map((path) => formatScalar(pickPath(item, path.split(".")))));
540
+ process.stdout.write(renderRows(fields, rows) + "\n");
541
+ warnIfCut(fit, envelope.offset, opts.oversizeHint);
542
+ }
543
+ function projectedEnvelope(envelope, view, opts) {
544
+ return {
545
+ ...envelope,
546
+ data: envelope.data.map((item) => projectForList(item, view, opts))
547
+ };
548
+ }
549
+ function renderJsonEnvelope(envelope, view, opts) {
550
+ const capped = capListEnvelope(projectedEnvelope(envelope, view, opts), opts.maxBytes);
551
+ const ordered = {
552
+ returned: capped.returned,
553
+ offset: capped.offset,
554
+ limit: capped.limit,
555
+ total: capped.total,
556
+ has_more: capped.has_more,
557
+ next_offset: capped.next_offset,
558
+ truncated: capped.truncated,
559
+ data: capped.data
560
+ };
561
+ process.stdout.write(serializeJson(ordered, stdoutPretty()) + "\n");
562
+ if (capped.truncated !== void 0) warn(listTruncationNotice(capped.truncated.bytes, capped.next_offset, opts.oversizeHint));
563
+ }
564
+ function renderItemBody(item, view, projected, opts) {
565
+ if (opts.format === "json") return serializeJson(projected, stdoutPretty());
566
+ if (opts.fields !== void 0 || opts.full) return renderKeyValueLines(objectPairs(projected));
567
+ return renderKeyValueLines(columnPairs(item, view.tableColumns));
568
+ }
569
+ function columnPairs(item, columns) {
570
+ return columns.map((column) => [column.label ?? column.key, formatCell(item, column)]);
571
+ }
572
+ function objectPairs(value) {
573
+ if (!isPlainObject(value)) {
574
+ const scalar = formatScalar(value);
575
+ return scalar === "" ? [] : [["", scalar]];
576
+ }
577
+ return Object.entries(value).map(([key, raw]) => [key, formatScalar(raw)]);
578
+ }
579
+ function renderKeyValueLines(pairs) {
580
+ if (pairs.length === 0) return "";
581
+ const padding = Math.max(...pairs.map(([label]) => label.length));
582
+ return pairs.map(([label, value]) => `${label.padEnd(padding)} ${value}`).join("\n");
583
+ }
584
+ function assertItemWithinMaxBytes(body, opts) {
585
+ if (opts.maxBytes <= 0) return;
586
+ const bytes = Buffer.byteLength(body, "utf8");
587
+ if (bytes <= opts.maxBytes) return;
588
+ throw new ConfigError(itemOversizeMessage(bytes, opts.maxBytes, opts.oversizeHint));
589
+ }
590
+ //#endregion
591
+ //#region src/output/error.ts
592
+ const DOWNGRADE_REMEDY = "Or install an `@metabase/cli` release that targets this server.";
593
+ const ROUTE_MISSING_REMEDY = "Run `mb auth list` to see this server's version.";
594
+ const ROUTE_MISSING_KIND = "route-missing";
595
+ const FAILURE_EXIT_CODE = 1;
596
+ const USAGE_EXIT_CODE = 2;
597
+ const INTERRUPTED_EXIT_CODE = 130;
598
+ function exitCodeFor(category) {
599
+ switch (category) {
600
+ case "config":
601
+ case "capability": return USAGE_EXIT_CODE;
602
+ case "abort": return INTERRUPTED_EXIT_CODE;
603
+ case "network":
604
+ case "http":
605
+ case "validation":
606
+ case "response-shape":
607
+ case "timeout":
608
+ case "internal":
609
+ case "unknown": return FAILURE_EXIT_CODE;
610
+ }
611
+ }
612
+ function reportError(error, format) {
613
+ const handled = isPromptCancel(error) ? new AbortError() : toMetabaseError(error);
614
+ const verbose = readEnv(ENV_VERBOSE) === "1";
615
+ const exitCode = exitCodeFor(handled.category);
616
+ if (format === "json") writeJsonError(handled, exitCode, verbose);
617
+ else writeTextError(handled, verbose);
618
+ for (const message of consumeLegacyEnvWarnings()) warn(message);
619
+ process.exitCode = exitCode;
620
+ }
621
+ function isVersionTooOld(detail) {
622
+ return typeof detail === "object" && detail !== null && "reason" in detail && detail.reason === "version-too-old";
623
+ }
624
+ function isRouteMissing(handled) {
625
+ return "kind" in handled && handled.kind === ROUTE_MISSING_KIND;
626
+ }
627
+ function remediesFor(handled) {
628
+ if (isVersionTooOld(handled.developerDetail)) return [DOWNGRADE_REMEDY];
629
+ if (isRouteMissing(handled)) return [ROUTE_MISSING_REMEDY];
630
+ return [];
631
+ }
632
+ function writeTextError(handled, verbose) {
633
+ process.stderr.write(handled.userMessage + "\n");
634
+ for (const remedy of remediesFor(handled)) process.stderr.write(remedy + "\n");
635
+ if (handled.developerDetail === null) return;
636
+ if (verbose) process.stderr.write(serializeJson(handled.developerDetail, stderrPretty()) + "\n");
637
+ else process.stderr.write("(rerun with MB_VERBOSE=1 for details)\n");
638
+ }
639
+ function stderrPretty() {
640
+ return process.stderr.isTTY === true;
641
+ }
642
+ function writeJsonError(handled, exitCode, verbose) {
643
+ const payload = {
644
+ category: handled.category,
645
+ message: [handled.userMessage, ...remediesFor(handled)].join("\n"),
646
+ exitCode
647
+ };
648
+ if (verbose && handled.developerDetail !== null) payload.detail = handled.developerDetail;
649
+ const envelope = {
650
+ ok: false,
651
+ error: payload
652
+ };
653
+ process.stderr.write(serializeJson(envelope, stderrPretty()) + "\n");
654
+ }
655
+ //#endregion
656
+ //#region ../client/src/version/capabilities.ts
657
+ const Capabilities = z.object({
658
+ minVersion: z.number(),
659
+ tokenFeature: z.string().optional()
660
+ });
661
+ const BASELINE_CAPABILITIES = Object.freeze({ minVersion: 58 });
662
+ function mergeCapabilities(overrides) {
663
+ if (overrides === void 0) return BASELINE_CAPABILITIES;
664
+ return {
665
+ minVersion: overrides.minVersion ?? BASELINE_CAPABILITIES.minVersion,
666
+ ...overrides.tokenFeature === void 0 ? {} : { tokenFeature: overrides.tokenFeature }
667
+ };
668
+ }
669
+ function checkCapabilities(info, required) {
670
+ if (info.version === null) return {
671
+ reason: "unknown-version",
672
+ detail: "Could not detect Metabase server version. Proceeding without preflight check; failures may produce confusing errors."
673
+ };
674
+ if (info.version.major < required.minVersion) return {
675
+ reason: "version-too-old",
676
+ detail: `This operation requires Metabase v${required.minVersion}+ (this server is ${info.version.tag}). Upgrade Metabase to use it.`
677
+ };
678
+ if (required.tokenFeature !== void 0) {
679
+ if (!(info.tokenFeatures?.[required.tokenFeature] === true)) return {
680
+ reason: "missing-token-feature",
681
+ detail: `This operation requires the '${required.tokenFeature}' premium feature (not enabled on this server).`
682
+ };
683
+ }
684
+ return null;
685
+ }
119
686
  //#endregion
120
687
  //#region src/runtime/command-help.ts
121
688
  const CommandHelpArg = z.object({
@@ -140,9 +707,9 @@ const CommandHelpSkill = z.object({
140
707
  skill: z.string(),
141
708
  purpose: z.string()
142
709
  });
143
- const CommandHelpEntry = z.object({
710
+ z.object({
144
711
  command: z.string(),
145
- description: z.string(),
712
+ description: z.string().nullable(),
146
713
  details: z.string().optional(),
147
714
  skills: z.array(CommandHelpSkill),
148
715
  examples: z.array(z.string()),
@@ -153,9 +720,13 @@ const CommandHelpEntry = z.object({
153
720
  });
154
721
  const CommandIndexEntry = z.object({
155
722
  command: z.string(),
156
- description: z.string()
723
+ description: z.string().nullable()
724
+ });
725
+ z.object({
726
+ description: z.string().nullable(),
727
+ skills: z.array(CommandHelpSkill),
728
+ commands: z.array(CommandIndexEntry)
157
729
  });
158
- const CommandHelpIndex = z.object({ commands: z.array(CommandIndexEntry) });
159
730
  const EMPTY_AUGMENT = {
160
731
  examples: [],
161
732
  details: null,
@@ -182,27 +753,29 @@ async function buildHelpEntry(cmd, path) {
182
753
  return entry;
183
754
  }
184
755
  async function buildHelpIndex(cmd, path) {
185
- return { commands: await walk(cmd, path) };
756
+ const meta = await resolveCitty(cmd.meta);
757
+ const augment = getMetabaseAugment(cmd) ?? EMPTY_AUGMENT;
758
+ return {
759
+ description: readDescription(meta),
760
+ skills: Array.from(augment.skills),
761
+ commands: await walk(cmd, path)
762
+ };
186
763
  }
187
764
  async function walk(cmd, path) {
188
765
  const meta = await resolveCitty(cmd.meta);
189
766
  if (meta?.hidden === true) return [];
190
767
  const subCommands = await resolveCitty(cmd.subCommands);
191
- if (subCommands && Object.keys(subCommands).length > 0) {
192
- const groups = await Promise.all(Object.entries(subCommands).map(async ([name, lazy]) => {
193
- const sub = await resolveCitty(lazy);
194
- return sub ? walk(sub, [...path, name]) : [];
195
- }));
196
- return groups.flat();
197
- }
768
+ if (subCommands && Object.keys(subCommands).length > 0) return (await Promise.all(Object.entries(subCommands).map(async ([name, lazy]) => {
769
+ const sub = await resolveCitty(lazy);
770
+ return sub ? walk(sub, [...path, name]) : [];
771
+ }))).flat();
198
772
  return [{
199
773
  command: path.join(" "),
200
774
  description: readDescription(meta)
201
775
  }];
202
776
  }
203
777
  function readDescription(meta) {
204
- if (meta === void 0) return "";
205
- return typeof meta.description === "string" ? meta.description : "";
778
+ return typeof meta?.description === "string" ? meta.description : null;
206
779
  }
207
780
  function convertArgs(args) {
208
781
  return Object.entries(args).map(([name, def]) => convertArg(name, def));
@@ -231,11 +804,7 @@ function readAlias(def) {
231
804
  function isPrimitiveDefault(value) {
232
805
  return typeof value === "string" || typeof value === "boolean" || typeof value === "number";
233
806
  }
234
-
235
- //#endregion
236
- //#region src/output/help.ts
237
- const ANSI_ESC = String.fromCharCode(27);
238
- const ANSI_PATTERN = new RegExp(`${ANSI_ESC}\\[[0-9;]*m`, "g");
807
+ const ANSI_PATTERN = new RegExp(`\\[[0-9;]*m`, "g");
239
808
  const BREADCRUMB_SUFFIX = / \([^()]*\)\s*$/;
240
809
  const TRAILING_WHITESPACE = /[ \t]+$/;
241
810
  const ALIAS_PAIR = /-([a-z0-9]+(?:-[a-z0-9]+)+), --[A-Za-z0-9]+/g;
@@ -251,8 +820,7 @@ const GETTING_STARTED_HINT = `First time? Run \`${CLI_NAME} auth login\` to conn
251
820
  const SKILLS_HEADER = "AGENT SKILLS";
252
821
  const SKILLS_LIST_ITEM = `${CLI_NAME} skills list — every bundled skill`;
253
822
  async function showUsage(cmd, parent, breadcrumb) {
254
- const raw = (await renderUsage(cmd, parent)).replace(ANSI_PATTERN, "");
255
- const lines = raw.split("\n").map((line) => line.replace(TRAILING_WHITESPACE, ""));
823
+ const lines = (await renderUsage(cmd, parent)).replace(ANSI_PATTERN, "").split("\n").map((line) => line.replace(TRAILING_WHITESPACE, ""));
256
824
  const cmdMeta = await resolveCitty(cmd.meta);
257
825
  const parentMeta = parent === void 0 ? void 0 : await resolveCitty(parent.meta);
258
826
  const cmdName = cmdMeta?.name ?? "";
@@ -263,13 +831,11 @@ async function showUsage(cmd, parent, breadcrumb) {
263
831
  const details = augment?.details ?? null;
264
832
  const examples = augment?.examples ?? [];
265
833
  const skills = augment?.skills ?? [];
266
- const transformed = transformBody(lines, {
834
+ const sections = [withDetails(transformBody(lines, {
267
835
  cittyName,
268
836
  breadcrumb: breadcrumb ?? cittyName,
269
837
  hasSubCommands
270
- });
271
- const body = withDetails(transformed, details).join("\n").trimEnd();
272
- const sections = [body];
838
+ }), details).join("\n").trimEnd()];
273
839
  if (examples.length > 0) sections.push(renderExamples(examples));
274
840
  if (skills.length > 0) sections.push(renderSkillsSection(skills, isRoot));
275
841
  if (isRoot) sections.push(GETTING_STARTED_HINT);
@@ -279,9 +845,7 @@ async function showUsage(cmd, parent, breadcrumb) {
279
845
  async function showUsageJson(cmd, breadcrumb) {
280
846
  const path = breadcrumbPath(breadcrumb);
281
847
  const subCommands = await resolveCitty(cmd.subCommands);
282
- const hasSubCommands = subCommands !== void 0 && Object.keys(subCommands).length > 0;
283
- const payload = hasSubCommands ? await buildHelpIndex(cmd, path) : await buildHelpEntry(cmd, path);
284
- await writeUsage(jsonLine(payload));
848
+ await writeUsage(jsonLine(subCommands !== void 0 && Object.keys(subCommands).length > 0 ? await buildHelpIndex(cmd, path) : await buildHelpEntry(cmd, path)));
285
849
  }
286
850
  function writeUsage(text) {
287
851
  return new Promise((resolve, reject) => {
@@ -295,20 +859,18 @@ function breadcrumbPath(breadcrumb) {
295
859
  const MACHINE_HELP_LEAF_LABEL = "Machine-readable help (flags, output schema):";
296
860
  const MACHINE_HELP_INDEX_LABEL = "Machine-readable command index:";
297
861
  function machineHelpHint(breadcrumb, hasSubCommands) {
298
- const label = hasSubCommands ? MACHINE_HELP_INDEX_LABEL : MACHINE_HELP_LEAF_LABEL;
299
- return `${label} ${breadcrumb} --help --json`;
862
+ return `${hasSubCommands ? MACHINE_HELP_INDEX_LABEL : MACHINE_HELP_LEAF_LABEL} ${breadcrumb} --help --json`;
300
863
  }
301
864
  function transformBody(lines, rewrite) {
302
- const mapped = lines.map((line, index) => {
865
+ return injectHelpOption(lines.map((line, index) => {
303
866
  if (index === 0) return line.replace(BREADCRUMB_SUFFIX, "");
304
867
  if (line.startsWith(USAGE_PREFIX)) return rewriteUsageLine(line, rewrite);
305
868
  return fixAliasRow(line);
306
- });
307
- return injectHelpOption(mapped);
869
+ }));
308
870
  }
309
871
  function rewriteUsageLine(line, rewrite) {
310
872
  if (rewrite.hasSubCommands) return `${USAGE_PREFIX}${rewrite.breadcrumb} ${COMMAND_PLACEHOLDER}`;
311
- const content = line.slice(USAGE_PREFIX.length);
873
+ const content = line.slice(6);
312
874
  if (!content.startsWith(rewrite.cittyName)) return line;
313
875
  const rest = content.slice(rewrite.cittyName.length);
314
876
  return `${USAGE_PREFIX}${rewrite.breadcrumb}${rest}`;
@@ -423,9 +985,8 @@ async function findSubCommand(subCommands, token) {
423
985
  if (direct !== void 0) {
424
986
  const command = await resolveCitty(direct);
425
987
  if (command === void 0) return null;
426
- const meta = await resolveCitty(command.meta);
427
988
  return {
428
- name: meta?.name ?? token,
989
+ name: (await resolveCitty(command.meta))?.name ?? token,
429
990
  command
430
991
  };
431
992
  }
@@ -440,17 +1001,37 @@ async function findSubCommand(subCommands, token) {
440
1001
  }
441
1002
  return null;
442
1003
  }
443
-
1004
+ //#endregion
1005
+ //#region src/runtime/interrupt.ts
1006
+ const INTERRUPT_REASON = new AbortError("interrupted");
1007
+ const INTERRUPT_EXIT_CODE = exitCodeFor(INTERRUPT_REASON.category);
1008
+ const controller = new AbortController();
1009
+ const interruptSignal = controller.signal;
1010
+ function abortOnInterrupt() {
1011
+ if (!controller.signal.aborted) controller.abort(INTERRUPT_REASON);
1012
+ }
1013
+ const FORCED_EXIT_GRACE_MS = 2e3;
1014
+ function installInterruptHandler(exit) {
1015
+ process.on("SIGINT", () => {
1016
+ if (interruptSignal.aborted) {
1017
+ exit(INTERRUPT_EXIT_CODE);
1018
+ return;
1019
+ }
1020
+ abortOnInterrupt();
1021
+ setTimeout(() => exit(INTERRUPT_EXIT_CODE), FORCED_EXIT_GRACE_MS).unref();
1022
+ });
1023
+ }
444
1024
  //#endregion
445
1025
  //#region src/cli.ts
446
- const HELP_FLAGS = new Set(["--help", "-h"]);
1026
+ const HELP_FLAGS = /* @__PURE__ */ new Set(["--help", "-h"]);
447
1027
  const JSON_HELP_FLAG = "--json";
448
1028
  async function run() {
1029
+ installInterruptHandler((code) => process.exit(code));
449
1030
  trustSystemCa();
450
1031
  const rawArgs = hoistGlobalFlags(process.argv.slice(2));
451
1032
  const wantsJsonHelp = rawArgs.includes(JSON_HELP_FLAG);
452
1033
  const showUsageWithBreadcrumb = async (cmd, parent) => {
453
- const breadcrumb = await resolveBreadcrumb(main_default, rawArgs);
1034
+ const breadcrumb = await resolveBreadcrumb(main, rawArgs);
454
1035
  if (wantsJsonHelp) {
455
1036
  await showUsageJson(cmd, breadcrumb);
456
1037
  return;
@@ -458,17 +1039,17 @@ async function run() {
458
1039
  await showUsage(cmd, parent, breadcrumb);
459
1040
  };
460
1041
  if (rawArgs.length === 0) {
461
- await showUsageWithBreadcrumb(main_default);
1042
+ await showUsageWithBreadcrumb(main);
462
1043
  return;
463
1044
  }
464
1045
  if (!rawArgs.some((arg) => HELP_FLAGS.has(arg))) {
465
- const unknown = await findUnknownCommand(main_default, rawArgs);
1046
+ const unknown = await findUnknownCommand(main, rawArgs);
466
1047
  if (unknown !== null) {
467
1048
  reportError(new ConfigError(`unknown command: ${unknown}`));
468
1049
  return;
469
1050
  }
470
1051
  }
471
- await runMain(main_default, {
1052
+ await runMain(main, {
472
1053
  showUsage: showUsageWithBreadcrumb,
473
1054
  rawArgs
474
1055
  });
@@ -476,5 +1057,5 @@ async function run() {
476
1057
  run().catch((error) => {
477
1058
  reportError(error);
478
1059
  });
479
-
480
- //#endregion
1060
+ //#endregion
1061
+ export { name as A, normalizeFlag as B, ENV_PROFILE as C, consumeLegacyEnvWarnings as D, ENV_URL as E, outputFlags as F, profileFlag as I, DEFAULT_MAX_BYTES as L, connectionFlags as M, listFlags as N, readEnv as O, listFlagsWithDefaultLimit as P, listEnvelopeSchema as R, ENV_DISABLE_KEYRING as S, ENV_SKIP_PREFLIGHT as T, toAliasArray as V, promptSelect as _, reportError as a, warn as b, renderSummary as c, MALFORMED_CELL as d, formatScalar as f, promptPassword as g, promptConfirm as h, mergeCapabilities as i, version as j, setMetabaseAugment as k, writeJson as l, projectForList as m, BASELINE_CAPABILITIES as n, renderItem as o, renderRows as p, checkCapabilities as r, renderList as s, interruptSignal as t, writeText as u, promptText as v, ENV_SKILLS_DIR as w, ENV_API_KEY as x, listTruncationNotice as y, flagConsumesValue as z };