@metabase/cli 0.3.0 → 0.3.1-alpha.versioning.9ac5f50

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 (234) hide show
  1. package/dist/{add-collection-B3Ty8SzB.mjs → add-collection-Dmd-uNeU.mjs} +4 -7
  2. package/dist/{alert-DT-ee7yf.mjs → alert-D1u2MVZj.mjs} +7 -7
  3. package/dist/{alerts-Bf2RH_p_.mjs → alerts-DcBjcfEE.mjs} +5 -5
  4. package/dist/{append-DFzQRPMd.mjs → append-B9Htvmab.mjs} +6 -5
  5. package/dist/{archive-lQqs13Uz.mjs → archive-B660RguB.mjs} +4 -4
  6. package/dist/{archive-ByvA49Kz.mjs → archive-BNivAYGr.mjs} +4 -4
  7. package/dist/{archive-4tmm946K.mjs → archive-BUoYMkxO.mjs} +4 -4
  8. package/dist/{archive-C7w49Grr.mjs → archive-BVmFGFwG.mjs} +4 -4
  9. package/dist/{archive-ChORH5JH.mjs → archive-Bf014rFm.mjs} +4 -4
  10. package/dist/{archive-gid9Y09v.mjs → archive-BmsZFOZY.mjs} +4 -4
  11. package/dist/{archive-BxNPHxOY.mjs → archive-CNif6BKy.mjs} +6 -6
  12. package/dist/{archive-Cd29QC0c.mjs → archive-CgmidYZV.mjs} +4 -4
  13. package/dist/{archive-CwAdlv63.mjs → archive-CvU2z5192.mjs} +4 -4
  14. package/dist/{archive-Dr9Xnx_Z.mjs → archive-DhDQIKR_.mjs} +6 -6
  15. package/dist/{archive-B6eXiyER.mjs → archive-bPdDITuY.mjs} +4 -4
  16. package/dist/{auth-Dltxua89.mjs → auth-CefYEPP5.mjs} +5 -5
  17. package/dist/{body-Cur4NJt9.mjs → body-C7m9q4cm.mjs} +3 -3
  18. package/dist/{branches-DchlyU0i.mjs → branches-pz04OjF2.mjs} +3 -6
  19. package/dist/{cancel-BMQa5R1Z.mjs → cancel-CNLnv19e.mjs} +4 -4
  20. package/dist/{cancel-task-C5CU1pxU.mjs → cancel-task-DbnxSh7U.mjs} +3 -6
  21. package/dist/card-BRarvKYX.mjs +24 -0
  22. package/dist/{cards-SccWvRQD.mjs → cards-DtYlVoGP.mjs} +6 -6
  23. package/dist/cli.mjs +554 -62
  24. package/dist/{client-BqhzKdLM.mjs → client-Bv7Iwdvh.mjs} +258 -76
  25. package/dist/collection-CKeO8X7U.mjs +20 -0
  26. package/dist/{collection-CGoVLvcD.mjs → collection-DALwHnbz.mjs} +1 -1
  27. package/dist/{collection-CfulNRBG.mjs → collection-WFdBeyqa.mjs} +1 -1
  28. package/dist/{collection-namespace-GwydWBF3.mjs → collection-namespace-CvT0TIZA.mjs} +2 -2
  29. package/dist/content-translation-BrHOrmj9.mjs +5 -0
  30. package/dist/content-translation-D7POzJJ6.mjs +12 -0
  31. package/dist/{create-CD008jdE.mjs → create-BEE8uvz2.mjs} +12 -8
  32. package/dist/{create-CAQV2g6V.mjs → create-Bh2j733n.mjs} +7 -7
  33. package/dist/{create-BNQ_DytP.mjs → create-Bwg-5p08.mjs} +4 -4
  34. package/dist/{create-C79vErX0.mjs → create-CGPle4nE.mjs} +5 -5
  35. package/dist/{create-i14Wv3Tj.mjs → create-CGgPnb7L.mjs} +4 -4
  36. package/dist/{create-DJmXXQoq.mjs → create-CLgalJUe.mjs} +8 -8
  37. package/dist/{create-Beh-2uoN.mjs → create-CN24yp_W.mjs} +6 -6
  38. package/dist/{create-DF4QtgDL.mjs → create-CuYGZ4gu2.mjs} +4 -4
  39. package/dist/{create-CAWytBE5.mjs → create-DGHILnnk.mjs} +5 -5
  40. package/dist/{create-zeveFdnd.mjs → create-DYd_o9BD.mjs} +5 -8
  41. package/dist/{create-DV-Ln5Mo.mjs → create-DhDREiiy.mjs} +4 -4
  42. package/dist/{create-CHQx7jq4.mjs → create-Di4YvIbK.mjs} +4 -4
  43. package/dist/{create-tQbnuz-I.mjs → create-DnqnjGGf.mjs} +4 -4
  44. package/dist/{create-CCh_LyW9.mjs → create-Ds-DnSBe.mjs} +4 -4
  45. package/dist/{create-BOLwWt8Q.mjs → create-JOXq0ULN.mjs} +5 -5
  46. package/dist/{create-branch-CYo6jZth.mjs → create-branch-DWcxC30N.mjs} +3 -7
  47. package/dist/{csv-B2Jgb1GM.mjs → csv-CUQvcCEk.mjs} +6 -5
  48. package/dist/{current-task-MpBFGttd.mjs → current-task-D6P0eL21.mjs} +3 -6
  49. package/dist/{dashboard-CsIFFpzK.mjs → dashboard-BlbNszi8.mjs} +1 -1
  50. package/dist/{dashboard-BHJBoaG7.mjs → dashboard-BudI952R.mjs} +10 -10
  51. package/dist/{dashboard-BCpSq_G-.mjs → dashboard-CKUR8ZpQ.mjs} +1 -0
  52. package/dist/{db-DsfojyeH.mjs → db-C7UTd-6P.mjs} +7 -7
  53. package/dist/{delete-DFmX7jTp.mjs → delete-DSxqbcFE.mjs} +5 -5
  54. package/dist/{delete-Ck0q4Dzp.mjs → delete-DbZZKcYj.mjs} +5 -5
  55. package/dist/{delete-Ob06PPie.mjs → delete-Ds-zGh9C.mjs} +5 -5
  56. package/dist/{delete-B8e01xAG.mjs → delete-Ud6iliGM.mjs} +5 -5
  57. package/dist/{delete-BApOjQvl.mjs → delete-_IHffP-A.mjs} +5 -5
  58. package/dist/{delete-runtime-D74s6vhu.mjs → delete-runtime-BjHL1ryM.mjs} +1 -2
  59. package/dist/{delete-table-DuyhGrvA.mjs → delete-table-DtXH6IN5.mjs} +5 -5
  60. package/dist/{dependencies-Bj3QrGIm.mjs → dependencies-CR1dlq-A.mjs} +6 -6
  61. package/dist/{dirty-DNYoM6Bp.mjs → dirty-CYxnOnh0.mjs} +3 -6
  62. package/dist/document-BoILnE_1.mjs +19 -0
  63. package/dist/download-DPpmmYQe.mjs +25 -0
  64. package/dist/{eid-WTZmDdsr.mjs → eid-D-BbtWjt.mjs} +4 -5
  65. package/dist/{events-Bn7jh5lP.mjs → events-CJEnn8WE.mjs} +4 -4
  66. package/dist/{export-BjfoZRDJ.mjs → export-BOgyuIOQ.mjs} +4 -7
  67. package/dist/{field-Zau6Hc6X.mjs → field-CzHBOPER.mjs} +5 -5
  68. package/dist/{fields-CBBa-Prp.mjs → fields-Bwgkrvus.mjs} +4 -4
  69. package/dist/{get-C2-Q3iQ5.mjs → get-B89DUSvw.mjs} +4 -4
  70. package/dist/{get-DkWO0EI0.mjs → get-BL90QC64.mjs} +6 -6
  71. package/dist/{get-ByBOq30r.mjs → get-BLJSCw53.mjs} +6 -6
  72. package/dist/{get-DRvsATp-.mjs → get-BOLwso0V.mjs} +6 -6
  73. package/dist/{get-B7sMgsFs.mjs → get-BaPadzdM.mjs} +4 -4
  74. package/dist/{get-00lyLv6R.mjs → get-BfVCLBqc.mjs} +4 -4
  75. package/dist/{get-DdsoHaKH.mjs → get-C1ZdOvMm.mjs} +4 -4
  76. package/dist/{get-DmpB6J9g.mjs → get-CLu4yzMp2.mjs} +4 -4
  77. package/dist/{get-DY03Azx9.mjs → get-COwdtskS.mjs} +5 -8
  78. package/dist/{get-D_h-G9bn.mjs → get-CWfIiXwL.mjs} +4 -4
  79. package/dist/get-CqQ-pf0q.mjs +89 -0
  80. package/dist/{get-DYO1kywc.mjs → get-CvIgxPXV.mjs} +4 -4
  81. package/dist/{get-Bz99dAxK.mjs → get-D4OTJblo.mjs} +6 -6
  82. package/dist/{get-Dn9ZiSZr.mjs → get-D8lHwu4-.mjs} +4 -4
  83. package/dist/{get-B_xdF1kq.mjs → get-DVi3a2nm.mjs} +4 -4
  84. package/dist/{get-CDJFVvhj.mjs → get-DgnYF7LR.mjs} +4 -4
  85. package/dist/{get-CDMGbgrh.mjs → get-DsKmZfM2.mjs} +4 -4
  86. package/dist/{get-Dmj9Ygz1.mjs → get-DyyPiiaB.mjs} +4 -4
  87. package/dist/{get-CnbUCzDM.mjs → get-Eqq13YY-.mjs} +4 -4
  88. package/dist/{get-run-Cnux9ln0.mjs → get-run-Iya0Yw9s.mjs} +6 -6
  89. package/dist/git-sync-CdN0Maun.mjs +28 -0
  90. package/dist/{group-DBM87IgC.mjs → group-CmVCLBDz.mjs} +2 -1
  91. package/dist/{has-remote-changes-C684Redh.mjs → has-remote-changes-DfJUMP8F.mjs} +3 -6
  92. package/dist/{import-Rmmttboo.mjs → import-FEAx-Y5A.mjs} +4 -7
  93. package/dist/{input-DH9i67x_.mjs → input-DFZ_qGW_.mjs} +1 -1
  94. package/dist/{is-dirty-DYeJYhBz.mjs → is-dirty-BsYjBSXG.mjs} +3 -6
  95. package/dist/{items-CQlPXBXE.mjs → items-D4rstE12.mjs} +6 -6
  96. package/dist/{key-BEhqIzIQ.mjs → key-BmWundO3.mjs} +1 -1
  97. package/dist/{library-DfYAT2Ep.mjs → library-CmctxHjv.mjs} +1 -1
  98. package/dist/library-DXB8sm4r.mjs +81 -0
  99. package/dist/{library-Bsm5KsFF.mjs → library-uzyHWBap.mjs} +5 -5
  100. package/dist/{list-DF2rvoO1.mjs → list-1DkkU82x.mjs} +13 -12
  101. package/dist/{list-BpFp9Wre.mjs → list-B7tqNV8B.mjs} +3 -3
  102. package/dist/{list-DE9FM957.mjs → list-BRpPbvyS.mjs} +3 -3
  103. package/dist/{list-CQwOgIlj.mjs → list-BXL8HFr_.mjs} +3 -3
  104. package/dist/{list-BzVTHOoH.mjs → list-Bjj0z5BS.mjs} +5 -5
  105. package/dist/{list-CQDprvW0.mjs → list-BmMi_wPD.mjs} +6 -6
  106. package/dist/{list-C5Zs8nrb.mjs → list-CC1M_n6Z.mjs} +5 -5
  107. package/dist/{list-CKK-s3Ty.mjs → list-CQy0z7f9.mjs} +3 -3
  108. package/dist/{list-BtmsNOEn.mjs → list-D_zvX0ms.mjs} +3 -3
  109. package/dist/{list-CMpoc2TN.mjs → list-DeNGm9G4.mjs} +3 -3
  110. package/dist/{list-DMKDsBRd.mjs → list-Dgm6TkqR.mjs} +6 -6
  111. package/dist/{list-BOET6zhP.mjs → list-DoTiQc3D.mjs} +3 -3
  112. package/dist/{list-BP3MPq-M.mjs → list-DrS3ePsv.mjs} +3 -3
  113. package/dist/list-bN0RC14-.mjs +59 -0
  114. package/dist/{list-B4hJuMhA.mjs → list-ndIl9XqV.mjs} +4 -4
  115. package/dist/{list-B8nAGwP4.mjs → list-sQcA4g05.mjs} +3 -3
  116. package/dist/{list-CNUiF8Z7.mjs → list-squb_ioH.mjs} +3 -3
  117. package/dist/{list-BtkWNtvY.mjs → list-xMfCeuZc.mjs} +4 -4
  118. package/dist/{login-CGHeSjlP.mjs → login-D_1-zE4A.mjs} +15 -12
  119. package/dist/{logout-DAxOlbv4.mjs → logout-DPi2q1Wu.mjs} +3 -4
  120. package/dist/{measure-BsYv0p26.mjs → measure-CdA8Nl3Z.mjs} +6 -6
  121. package/dist/{parameter-values-CJTdqd8c.mjs → parameter-values-C6dj6I4g.mjs} +4 -5
  122. package/dist/{parse-enum-D0Jfm_Bz.mjs → parse-enum-B1t8S194.mjs} +1 -1
  123. package/dist/{parse-id-C_jmKFaa.mjs → parse-id-DR8aUSdL.mjs} +1 -1
  124. package/dist/{parse-ref-ibKVB0J4.mjs → parse-ref-BJ_Q0tNW.mjs} +1 -1
  125. package/dist/{path-B5gHvrYL.mjs → path-B96DI8u2.mjs} +4 -4
  126. package/dist/{poll-75SvT7Zv.mjs → poll-By46YQ5J.mjs} +2 -2
  127. package/dist/{preflight-YpPQo-sa.mjs → preflight-Bl1oitm8.mjs} +3 -4
  128. package/dist/{process-DBOOrmET.mjs → process-CcQM4qPv.mjs} +1 -1
  129. package/dist/{publish-DijrxaCW.mjs → publish-BKJYvxif.mjs} +9 -9
  130. package/dist/{query-Dc__-KJH.mjs → query-BKSM-pbi.mjs} +6 -7
  131. package/dist/{query-BbqECzmF.mjs → query-qBHjZQc_.mjs} +5 -12
  132. package/dist/{remove-collection-BOnxYvhj.mjs → remove-collection-BWFW7Rn6.mjs} +4 -7
  133. package/dist/{render-CI93iP0I.mjs → render-DmykmrFB.mjs} +11 -2
  134. package/dist/{replace-Cq4CxVa-.mjs → replace-BmAqD3zY.mjs} +6 -5
  135. package/dist/{rescan-values-Dr_j416g.mjs → rescan-values-BrCLrihF.mjs} +4 -4
  136. package/dist/{run-C3DkS6NP.mjs → run-CtbzjDKY.mjs} +6 -6
  137. package/dist/{run-DdGJ544X.mjs → run-q5Y44Fxj.mjs} +26 -14
  138. package/dist/{runs-CUNWiidL.mjs → runs-JFlbezkQ.mjs} +6 -6
  139. package/dist/{runtime-DiKyBxOw.mjs → runtime-BQiGgbgZ.mjs} +850 -265
  140. package/dist/{schema-tables-CV386fnC.mjs → schema-tables-Bzx2ShyE.mjs} +4 -4
  141. package/dist/{schemas-DM-UqZBQ.mjs → schemas-ww5mU2AS.mjs} +4 -4
  142. package/dist/{search-DmGScXs8.mjs → search-J4RwCof-.mjs} +4 -4
  143. package/dist/{segment-BzUGM2Fr.mjs → segment-XXTjU0eG.mjs} +6 -6
  144. package/dist/{selectors-DGDn0Hto.mjs → selectors-BAAZMi43.mjs} +3 -3
  145. package/dist/{send-CVxxEpDB.mjs → send-BmpDlw9O.mjs} +4 -4
  146. package/dist/{set-DFolTjbd.mjs → set-DUWrSza9.mjs} +5 -5
  147. package/dist/{set-active-BD8L1lPX.mjs → set-active-BiUlbNI5.mjs} +5 -5
  148. package/dist/{setting-DyhaeICs.mjs → setting-B1KBQN3M.mjs} +4 -4
  149. package/dist/{setup-BbDQN8fe.mjs → setup-CVaNVwOd.mjs} +4 -4
  150. package/dist/{signal-CMd0EFUa.mjs → signal-GhGmuHfx.mjs} +11 -2
  151. package/dist/{list-UhpKG6_m.mjs → skill-list-DTnDhnL5.mjs} +17 -46
  152. package/dist/{skills--vK6J-e4.mjs → skills-BWrAlj9l.mjs} +3 -3
  153. package/dist/{skills-DTCrMcix.mjs → skills-DkDsSH5F.mjs} +102 -14
  154. package/dist/snippet-CG75L2DS.mjs +19 -0
  155. package/dist/{stash-D0S4JmAz.mjs → stash-DMm8YF8V.mjs} +4 -8
  156. package/dist/{status-hL1am-HV.mjs → status-BzEQjQ_t.mjs} +12 -11
  157. package/dist/{status-BhswxJL1.mjs → status-ClWsQD6v.mjs} +9 -7
  158. package/dist/stream-McixcoUl.mjs +7 -0
  159. package/dist/{subscription-_d5fB45F.mjs → subscription-CdFn2hre.mjs} +6 -6
  160. package/dist/{subscriptions-s4TF6Ax3.mjs → subscriptions-DBda1pE5.mjs} +5 -5
  161. package/dist/{summary-CsPvcUwW.mjs → summary-B4GPiuqD.mjs} +4 -4
  162. package/dist/{sync-schema-DaZ_MV-u.mjs → sync-schema-DsIM5g2U.mjs} +5 -5
  163. package/dist/{table-DYoC1kPn.mjs → table-D4Alrrwh.mjs} +5 -5
  164. package/dist/timeline-DmM0BuX8.mjs +21 -0
  165. package/dist/{timeline-event-CNQdCTDg.mjs → timeline-event-DWIh3Tdt.mjs} +6 -6
  166. package/dist/transform-BcV_XlSX.mjs +28 -0
  167. package/dist/{transform-DoTyyXAu.mjs → transform-Bk0D0nIs.mjs} +1 -1
  168. package/dist/{transform-D3QX0jxA.mjs → transform-DpuG-ON3.mjs} +26 -5
  169. package/dist/{transform-job-50GZHhKH.mjs → transform-job-AaMZRxAq.mjs} +1 -1
  170. package/dist/{transform-job-DRrK28IH.mjs → transform-job-CCguL6LP.mjs} +41 -4
  171. package/dist/transform-job-CjtwBGoM.mjs +22 -0
  172. package/dist/{transform-tag-_tgwlsdB.mjs → transform-tag-DJ3_bksm.mjs} +5 -5
  173. package/dist/{transforms-oU4zizbO.mjs → transforms-Dg2MfB2a.mjs} +6 -6
  174. package/dist/{tree-CH-f3bjP.mjs → tree-BQL0f7YX.mjs} +4 -5
  175. package/dist/{unpublish-BUl9RU5C.mjs → unpublish-DfSvb_Rs.mjs} +4 -7
  176. package/dist/{update-D-NE60AV.mjs → update-B-hRR8gW.mjs} +5 -5
  177. package/dist/{update-CO4m4wH3.mjs → update-BCgAyfj_.mjs} +6 -6
  178. package/dist/{update-BzMDeZiU.mjs → update-Bhmli02m.mjs} +5 -5
  179. package/dist/{update-CvOO8TED.mjs → update-BxIyFtrX.mjs} +5 -5
  180. package/dist/{update-BiFDBcEH.mjs → update-CDo0Orvu.mjs} +5 -5
  181. package/dist/{update-BCS5FxKr.mjs → update-CKoBDTL7.mjs} +9 -9
  182. package/dist/{update-CmDTljK-.mjs → update-CiYxcf8M.mjs} +7 -7
  183. package/dist/{update-CHNSUHK4.mjs → update-Cr5zHb0D.mjs} +5 -5
  184. package/dist/{update-Nfi44RrE.mjs → update-CtDHMxW8.mjs} +6 -6
  185. package/dist/{update-bD_Jh5-s.mjs → update-D1QdfpKR.mjs} +5 -5
  186. package/dist/{update-BZPllQoR.mjs → update-D4qdTlLF.mjs} +5 -5
  187. package/dist/{update-C4YJQFDS.mjs → update-DBGaJDsj.mjs} +5 -5
  188. package/dist/{update-tX9mKBN_.mjs → update-Izqip6jY.mjs} +9 -9
  189. package/dist/{update-cYkvbqK8.mjs → update-NZhIjTCf.mjs} +5 -5
  190. package/dist/{update-dashcard-C3TuYO_k.mjs → update-dashcard-D5b971AO.mjs} +7 -7
  191. package/dist/{update-CVPAwJaH.mjs → update-sYLQIUgh.mjs} +6 -6
  192. package/dist/{upgrade-DXMV4AyP.mjs → upgrade-CD1xtsIv.mjs} +6 -8
  193. package/dist/upload-BUd3MG90.mjs +23 -0
  194. package/dist/upload-C3z5ZaXA.mjs +24 -0
  195. package/dist/upload-DzGTlldn.mjs +13 -0
  196. package/dist/upload-akKFxpVA.mjs +39 -0
  197. package/dist/{uuid-BJkDWj9p.mjs → uuid-oVdJ62eA.mjs} +3 -4
  198. package/dist/{validate-BWchyW0V.mjs → validate-CWd6l6KZ.mjs} +1 -1
  199. package/dist/{validate-query-DaGYSmpQ.mjs → validate-query-Boi8-cAP.mjs} +2 -3
  200. package/dist/{values-Dxf1JEoA.mjs → values-DLwZl-P8.mjs} +4 -4
  201. package/dist/{verify-K96rItG5.mjs → verify-CH9Tw8yv.mjs} +3 -18
  202. package/dist/{wait-flags-DWEF9tX4.mjs → wait-flags-DiQ_kRjZ.mjs} +2 -2
  203. package/dist/{wait-DoMDH226.mjs → wait-rfTdQWdi.mjs} +5 -8
  204. package/package.json +1 -1
  205. package/skill-data/core/SKILL.md +16 -5
  206. package/skill-data/dashboard/SKILL.md +2 -2
  207. package/skill-data/data-workflow/references/building-clean-tables.md +6 -2
  208. package/skill-data/data-workflow/references/reusable-definitions.md +11 -3
  209. package/skill-data/document/SKILL.md +4 -1
  210. package/skill-data/git-sync/SKILL.md +5 -0
  211. package/skill-data/mbql/SKILL.md +1 -1
  212. package/skill-data/mbql/references/operators.md +20 -15
  213. package/skill-data/metadata/SKILL.md +1 -1
  214. package/skill-data/metadata/references/semantic-types.md +7 -1
  215. package/skill-data/native-sql/references/template-tags.md +6 -2
  216. package/skill-data/notification/SKILL.md +7 -1
  217. package/skill-data/transform/SKILL.md +12 -2
  218. package/skill-data/visualization/SKILL.md +11 -3
  219. package/skill-data/visualization/references/settings.md +6 -4
  220. package/skills/metabase-cli/SKILL.md +1 -1
  221. package/dist/card-CHI2bmds.mjs +0 -24
  222. package/dist/collection-CY0AB99E.mjs +0 -20
  223. package/dist/document-BbskZPTT.mjs +0 -19
  224. package/dist/get-CvI--9S_.mjs +0 -80
  225. package/dist/git-sync-MQQYRYLg.mjs +0 -28
  226. package/dist/library-ClLgrAXy.mjs +0 -19
  227. package/dist/network-error-CEb9ymDW.mjs +0 -423
  228. package/dist/predicates-Bkm2IoeX.mjs +0 -170
  229. package/dist/snippet-DRwKb2x7.mjs +0 -19
  230. package/dist/timeline-xlDbEKWg.mjs +0 -21
  231. package/dist/transform-Bs0EWijQ.mjs +0 -28
  232. package/dist/transform-job-BcLChRup.mjs +0 -22
  233. package/dist/upload-CH632qW6.mjs +0 -46
  234. package/dist/upload-Dey_8rLf.mjs +0 -13
@@ -1,7 +1,7 @@
1
- import { F as outputFlags, I as profileFlag, M as connectionFlags, c as renderSummary } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
3
- import { t as parseId } from "./parse-id-C_jmKFaa.mjs";
4
- import { t as readBody } from "./body-Cur4NJt9.mjs";
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary } from "./cli.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { t as parseId } from "./parse-id-DR8aUSdL.mjs";
4
+ import { t as readBody } from "./body-C7m9q4cm.mjs";
5
5
  import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
6
6
  import { i as SnippetUpdateInput, t as Snippet } from "./snippet-CyKAgIZl.mjs";
7
7
  import { t as snippetView } from "./snippet-oJLaYW9V.mjs";
@@ -11,7 +11,7 @@ var update_default = defineMetabaseCommand({
11
11
  name: "update",
12
12
  description: "Update a native query snippet by id"
13
13
  },
14
- capabilities: { minVersion: 58 },
14
+ requires: ["snippet.update"],
15
15
  args: {
16
16
  ...outputFlags,
17
17
  ...profileFlag,
@@ -1,10 +1,10 @@
1
- import { F as outputFlags, I as profileFlag, M as connectionFlags, c as renderSummary } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
3
- import { t as parseId } from "./parse-id-C_jmKFaa.mjs";
4
- import { t as readBody } from "./body-Cur4NJt9.mjs";
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary } from "./cli.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { t as parseId } from "./parse-id-DR8aUSdL.mjs";
4
+ import { t as readBody } from "./body-C7m9q4cm.mjs";
5
5
  import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
6
6
  import { i as MeasureUpdateInput, t as Measure } from "./measure-CtfjqJFP.mjs";
7
- import { a as preflightMbql5Query, n as MEASURE_DEFINITION_LABELS, o as skipValidateFlag } from "./validate-query-DaGYSmpQ.mjs";
7
+ import { a as preflightMbql5Query, n as MEASURE_DEFINITION_LABELS, o as skipValidateFlag } from "./validate-query-Boi8-cAP.mjs";
8
8
  import { t as measureView } from "./measure-4P0bOlZ3.mjs";
9
9
  //#region src/commands/measure/update.ts
10
10
  var update_default = defineMetabaseCommand({
@@ -17,7 +17,7 @@ var update_default = defineMetabaseCommand({
17
17
  skill: "mbql",
18
18
  purpose: "the definition aggregation"
19
19
  }],
20
- capabilities: { minVersion: 59 },
20
+ requires: ["measure.update"],
21
21
  args: {
22
22
  ...outputFlags,
23
23
  ...profileFlag,
@@ -1,10 +1,10 @@
1
- import { F as outputFlags, I as profileFlag, M as connectionFlags, c as renderSummary } from "./cli.mjs";
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary } from "./cli.mjs";
2
2
  import { c as NotificationUpdateInput, n as Notification } from "./notification-DaA4bBHW.mjs";
3
3
  import { t as notificationView } from "./notification-Fcq1fIPw.mjs";
4
- import { t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
5
- import { t as parseId } from "./parse-id-C_jmKFaa.mjs";
4
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
5
+ import { t as parseId } from "./parse-id-DR8aUSdL.mjs";
6
6
  import { t as describeAlert } from "./summary-BytbDz6e.mjs";
7
- import { t as readBody } from "./body-Cur4NJt9.mjs";
7
+ import { t as readBody } from "./body-C7m9q4cm.mjs";
8
8
  import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
9
9
  //#region src/commands/alert/update.ts
10
10
  var update_default = defineMetabaseCommand({
@@ -18,7 +18,7 @@ var update_default = defineMetabaseCommand({
18
18
  "`subscriptions` and `handlers` replace the whole list, so send every schedule and recipient you want to keep —",
19
19
  "`mb alert get <id>` prints the current ones. An alert's card cannot be moved to a different card."
20
20
  ].join(" "),
21
- capabilities: { minVersion: 58 },
21
+ requires: ["notification.update"],
22
22
  args: {
23
23
  ...outputFlags,
24
24
  ...profileFlag,
@@ -1,7 +1,7 @@
1
- import { F as outputFlags, I as profileFlag, M as connectionFlags, c as renderSummary } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
3
- import { t as parseId } from "./parse-id-C_jmKFaa.mjs";
4
- import { t as readBody } from "./body-Cur4NJt9.mjs";
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary } from "./cli.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { t as parseId } from "./parse-id-DR8aUSdL.mjs";
4
+ import { t as readBody } from "./body-C7m9q4cm.mjs";
5
5
  import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
6
6
  import { i as TimelineEvent, s as TimelineEventUpdateInput } from "./timeline-CCSU2qOS.mjs";
7
7
  import { t as timelineEventView } from "./timeline-uDCmwGFT.mjs";
@@ -12,7 +12,7 @@ var update_default = defineMetabaseCommand({
12
12
  description: "Update a timeline event by id"
13
13
  },
14
14
  details: "Patches only the fields you send: `name`, `description`, `timestamp`, `timezone`, `time_matters`, `icon`, `timeline_id` (moves the event to another timeline), `archived`.",
15
- capabilities: { minVersion: 58 },
15
+ requires: ["timelineEvent.update"],
16
16
  args: {
17
17
  ...outputFlags,
18
18
  ...profileFlag,
@@ -1,7 +1,7 @@
1
- import { F as outputFlags, I as profileFlag, M as connectionFlags, c as renderSummary } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
3
- import { t as parseId } from "./parse-id-C_jmKFaa.mjs";
4
- import { t as readBody } from "./body-Cur4NJt9.mjs";
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary } from "./cli.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { t as parseId } from "./parse-id-DR8aUSdL.mjs";
4
+ import { t as readBody } from "./body-C7m9q4cm.mjs";
5
5
  import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
6
6
  import { o as FieldUpdateInput, t as Field } from "./field-Cr2DPUG9.mjs";
7
7
  import { r as fieldView } from "./field-BPsNa-TO.mjs";
@@ -11,7 +11,7 @@ var update_default = defineMetabaseCommand({
11
11
  name: "update",
12
12
  description: "Update a field (description, semantic_type, FK target, visibility, etc.)"
13
13
  },
14
- capabilities: { minVersion: 58 },
14
+ requires: ["field.update"],
15
15
  args: {
16
16
  ...outputFlags,
17
17
  ...profileFlag,
@@ -1,18 +1,18 @@
1
- import { F as outputFlags, I as profileFlag, M as connectionFlags, c as renderSummary } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
3
- import { t as parseId } from "./parse-id-C_jmKFaa.mjs";
4
- import { t as readBody } from "./body-Cur4NJt9.mjs";
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary } from "./cli.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { t as parseId } from "./parse-id-DR8aUSdL.mjs";
4
+ import { t as readBody } from "./body-C7m9q4cm.mjs";
5
5
  import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
6
- import { i as DashboardDetail, o as DashboardUpdateInput } from "./dashboard-BCpSq_G-.mjs";
7
- import { t as dashboardView } from "./dashboard-CsIFFpzK.mjs";
8
- import { t as preflightDashcardCardReferences } from "./preflight-YpPQo-sa.mjs";
6
+ import { i as DashboardDetail, o as DashboardUpdateInput } from "./dashboard-CKUR8ZpQ.mjs";
7
+ import { t as dashboardView } from "./dashboard-BlbNszi8.mjs";
8
+ import { t as preflightDashcardCardReferences } from "./preflight-Bl1oitm8.mjs";
9
9
  //#region src/commands/dashboard/update.ts
10
10
  var update_default = defineMetabaseCommand({
11
11
  meta: {
12
12
  name: "update",
13
13
  description: "Update a dashboard (and optionally its dashcards/tabs) by id"
14
14
  },
15
- details: "Any positive card_id referenced from dashcards is pre-flight-validated (exists and readable, not archived) before the PUT.",
15
+ details: "Every dashcard must include card_id (a card id, or null for a virtual card). Any positive card_id is pre-flight-validated (exists and readable, not archived) before the PUT.",
16
16
  skills: [{
17
17
  skill: "dashboard",
18
18
  purpose: "wiring filters, cross-filtering, click behavior, tabs"
@@ -20,7 +20,7 @@ var update_default = defineMetabaseCommand({
20
20
  skill: "visualization",
21
21
  purpose: "dashcard visualization_settings and the 24-column grid"
22
22
  }],
23
- capabilities: { minVersion: 58 },
23
+ requires: ["dashboard.update", "dashboard.checkCardReferences"],
24
24
  args: {
25
25
  ...outputFlags,
26
26
  ...profileFlag,
@@ -1,7 +1,7 @@
1
- import { F as outputFlags, I as profileFlag, M as connectionFlags, c as renderSummary } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
3
- import { t as parseId } from "./parse-id-C_jmKFaa.mjs";
4
- import { t as readBody } from "./body-Cur4NJt9.mjs";
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary } from "./cli.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { t as parseId } from "./parse-id-DR8aUSdL.mjs";
4
+ import { t as readBody } from "./body-C7m9q4cm.mjs";
5
5
  import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
6
6
  import { c as TimelineUpdateInput, t as Timeline } from "./timeline-CCSU2qOS.mjs";
7
7
  import { n as timelineView } from "./timeline-uDCmwGFT.mjs";
@@ -12,7 +12,7 @@ var update_default = defineMetabaseCommand({
12
12
  description: "Update a timeline by id"
13
13
  },
14
14
  details: "Patches only the fields you send: `name`, `description`, `icon`, `collection_id`, `default`, `archived`. Changing `archived` cascades to every event on the timeline.",
15
- capabilities: { minVersion: 58 },
15
+ requires: ["timeline.update"],
16
16
  args: {
17
17
  ...outputFlags,
18
18
  ...profileFlag,
@@ -1,17 +1,17 @@
1
- import { F as outputFlags, I as profileFlag, M as connectionFlags, c as renderSummary } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
3
- import { t as parseId } from "./parse-id-C_jmKFaa.mjs";
4
- import { t as readBody } from "./body-Cur4NJt9.mjs";
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary } from "./cli.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { t as parseId } from "./parse-id-DR8aUSdL.mjs";
4
+ import { t as readBody } from "./body-C7m9q4cm.mjs";
5
5
  import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
6
- import { l as DashcardPatchInput, s as Dashcard } from "./dashboard-BCpSq_G-.mjs";
7
- import { n as dashcardView } from "./dashboard-CsIFFpzK.mjs";
6
+ import { l as DashcardPatchInput, s as Dashcard } from "./dashboard-CKUR8ZpQ.mjs";
7
+ import { n as dashcardView } from "./dashboard-BlbNszi8.mjs";
8
8
  //#region src/commands/dashboard/update-dashcard.ts
9
9
  var update_dashcard_default = defineMetabaseCommand({
10
10
  meta: {
11
11
  name: "update-dashcard",
12
12
  description: "Patch a single dashcard's layout or settings on a dashboard"
13
13
  },
14
- capabilities: { minVersion: 58 },
14
+ requires: ["dashboard.updateDashcard"],
15
15
  args: {
16
16
  ...outputFlags,
17
17
  ...profileFlag,
@@ -1,10 +1,10 @@
1
- import { F as outputFlags, I as profileFlag, M as connectionFlags, c as renderSummary } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
3
- import { t as parseId } from "./parse-id-C_jmKFaa.mjs";
4
- import { t as readBody } from "./body-Cur4NJt9.mjs";
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary } from "./cli.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { t as parseId } from "./parse-id-DR8aUSdL.mjs";
4
+ import { t as readBody } from "./body-C7m9q4cm.mjs";
5
5
  import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
6
6
  import { i as SegmentUpdateInput, t as Segment } from "./segment-OsrbUDzw.mjs";
7
- import { a as preflightMbql5Query, o as skipValidateFlag, r as SEGMENT_DEFINITION_LABELS } from "./validate-query-DaGYSmpQ.mjs";
7
+ import { a as preflightMbql5Query, o as skipValidateFlag, r as SEGMENT_DEFINITION_LABELS } from "./validate-query-Boi8-cAP.mjs";
8
8
  import { t as segmentView } from "./segment-C_gl5ag6.mjs";
9
9
  //#region src/commands/segment/update.ts
10
10
  var update_default = defineMetabaseCommand({
@@ -17,7 +17,7 @@ var update_default = defineMetabaseCommand({
17
17
  skill: "mbql",
18
18
  purpose: "the definition filter clause"
19
19
  }],
20
- capabilities: { minVersion: 58 },
20
+ requires: ["segment.update"],
21
21
  args: {
22
22
  ...outputFlags,
23
23
  ...profileFlag,
@@ -1,12 +1,10 @@
1
- import { f as errorMessage, l as TimeoutError, n as AbortError, s as NetworkError, u as UnknownError } from "./predicates-Bkm2IoeX.mjs";
2
- import { A as name, F as outputFlags, h as promptConfirm, j as version, o as renderItem, t as interruptSignal, u as writeText } from "./cli.mjs";
3
- import { t as defineMetabaseCommand, u as USER_AGENT } from "./runtime-DiKyBxOw.mjs";
4
- import { h as parseJson, r as HttpError } from "./network-error-CEb9ymDW.mjs";
5
- import { n as throwIfAborted, t as combineAborts } from "./signal-CMd0EFUa.mjs";
6
- import { n as streamProcess } from "./process-DBOOrmET.mjs";
1
+ import { I as outputFlags, M as version, Q as UnknownError, W as AbortError, Y as NetworkError, Z as TimeoutError, a as renderItem, et as errorMessage, g as promptConfirm, j as name, t as interruptSignal, u as writeText } from "./cli.mjs";
2
+ import { L as HttpError, O as USER_AGENT, V as parseJson, t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { n as throwIfAborted, t as combineAborts } from "./signal-GhGmuHfx.mjs";
4
+ import { n as streamProcess } from "./process-CcQM4qPv.mjs";
7
5
  import { z } from "zod";
8
- import { compare, valid } from "semver";
9
6
  import { realpathSync } from "node:fs";
7
+ import { compare, valid } from "semver";
10
8
  //#region src/core/npm-registry.ts
11
9
  const DEFAULT_REGISTRY = "https://registry.npmjs.org";
12
10
  const DEFAULT_TIMEOUT_MS = 15e3;
@@ -291,7 +289,7 @@ var upgrade_default = defineMetabaseCommand({
291
289
  name: "upgrade",
292
290
  description: "Upgrade the Metabase CLI itself to the latest published release"
293
291
  },
294
- capabilities: null,
292
+ requires: null,
295
293
  args: {
296
294
  ...outputFlags,
297
295
  check: {
@@ -0,0 +1,23 @@
1
+ import { K as ConfigError, tt as isFileNotFoundError } from "./cli.mjs";
2
+ import { n as fileNotFoundError } from "./input-DFZ_qGW_.mjs";
3
+ import { basename } from "node:path";
4
+ import { readFile } from "node:fs/promises";
5
+ //#region src/runtime/upload.ts
6
+ function requireUploadFilePath(file) {
7
+ if (typeof file !== "string" || file.trim() === "") throw new ConfigError("provide the CSV file to upload with --file <path>");
8
+ return file;
9
+ }
10
+ async function readCsvFile(path) {
11
+ try {
12
+ const bytes = await readFile(path);
13
+ return {
14
+ filename: basename(path),
15
+ bytes
16
+ };
17
+ } catch (error) {
18
+ if (isFileNotFoundError(error)) throw fileNotFoundError(path);
19
+ throw error;
20
+ }
21
+ }
22
+ //#endregion
23
+ export { requireUploadFilePath as n, readCsvFile as t };
@@ -0,0 +1,24 @@
1
+ import { n as UploadUpdateResult, t as UploadResult } from "./upload-DAtxBBms.mjs";
2
+ //#region src/output/views/upload.ts
3
+ const uploadResultView = {
4
+ compactPick: UploadResult,
5
+ tableColumns: [{
6
+ key: "model_id",
7
+ label: "Model ID"
8
+ }, {
9
+ key: "table_id",
10
+ label: "Table ID"
11
+ }]
12
+ };
13
+ const uploadUpdateResultView = {
14
+ compactPick: UploadUpdateResult,
15
+ tableColumns: [{
16
+ key: "table_id",
17
+ label: "Table ID"
18
+ }, {
19
+ key: "action",
20
+ label: "Action"
21
+ }]
22
+ };
23
+ //#endregion
24
+ export { uploadUpdateResultView as n, uploadResultView as t };
@@ -0,0 +1,13 @@
1
+ import { t as defineCommandGroup } from "./group-CmVCLBDz.mjs";
2
+ //#region src/commands/upload/index.ts
3
+ var upload_default = defineCommandGroup({
4
+ name: "upload",
5
+ description: "Upload CSV files into Metabase",
6
+ subCommands: {
7
+ csv: () => import("./csv-CUQvcCEk.mjs").then((m) => m.default),
8
+ append: () => import("./append-B9Htvmab.mjs").then((m) => m.default),
9
+ replace: () => import("./replace-BmAqD3zY.mjs").then((m) => m.default)
10
+ }
11
+ });
12
+ //#endregion
13
+ export { upload_default as default };
@@ -0,0 +1,39 @@
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary } from "./cli.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { t as ContentTranslationUploadResult } from "./content-translation-BrHOrmj9.mjs";
4
+ import { n as requireUploadFilePath, t as readCsvFile } from "./upload-BUd3MG90.mjs";
5
+ //#region src/output/views/content-translation.ts
6
+ const contentTranslationUploadView = {
7
+ compactPick: ContentTranslationUploadResult,
8
+ tableColumns: [{
9
+ key: "success",
10
+ label: "Success"
11
+ }]
12
+ };
13
+ //#endregion
14
+ //#region src/commands/content-translation/upload.ts
15
+ var upload_default = defineMetabaseCommand({
16
+ meta: {
17
+ name: "upload",
18
+ description: "Replace the complete content translation dictionary from CSV"
19
+ },
20
+ details: "Uploads one complete dictionary and replaces every active content translation on the server. Keep the canonical full CSV in version control and download the current dictionary before replacing it. Metabase accepts dictionaries up to 1.5 MiB.",
21
+ requires: ["contentTranslation.upload"],
22
+ args: {
23
+ ...outputFlags,
24
+ ...profileFlag,
25
+ ...connectionFlags,
26
+ file: {
27
+ type: "string",
28
+ description: "Path to the complete translation dictionary CSV"
29
+ }
30
+ },
31
+ outputSchema: ContentTranslationUploadResult,
32
+ examples: ["mb content-translation upload --file translations.csv", "mb content-translation upload --file translations.csv --profile prod --json"],
33
+ async run({ args, ctx, getClient }) {
34
+ const file = await readCsvFile(requireUploadFilePath(args.file));
35
+ renderSummary(await (await getClient()).contentTranslation.upload(file), contentTranslationUploadView, `Replaced the content translation dictionary with "${file.filename}".`, ctx);
36
+ }
37
+ });
38
+ //#endregion
39
+ export { upload_default as default };
@@ -1,6 +1,5 @@
1
- import { i as ConfigError } from "./predicates-Bkm2IoeX.mjs";
2
- import { F as outputFlags, l as writeJson, u as writeText } from "./cli.mjs";
3
- import { R as parseInteger, t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
1
+ import { I as outputFlags, K as ConfigError, l as writeJson, u as writeText } from "./cli.mjs";
2
+ import { nt as parseInteger, t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
4
3
  import { z } from "zod";
5
4
  import { randomUUID } from "node:crypto";
6
5
  //#region src/commands/uuid.ts
@@ -16,7 +15,7 @@ var uuid_default = defineMetabaseCommand({
16
15
  skill: "mbql",
17
16
  purpose: "where lib/uuid values are used"
18
17
  }],
19
- capabilities: null,
18
+ requires: null,
20
19
  args: {
21
20
  ...outputFlags,
22
21
  count: {
@@ -1,4 +1,4 @@
1
- import { h as escapeJsonPointerSegment, i as ConfigError, t as isPlainObject } from "./predicates-Bkm2IoeX.mjs";
1
+ import { K as ConfigError, gt as escapeJsonPointerSegment, h as isPlainObject } from "./cli.mjs";
2
2
  import { z } from "zod";
3
3
  import Ajv2020 from "ajv/dist/2020.js";
4
4
  import addFormats from "ajv-formats";
@@ -1,6 +1,5 @@
1
- import { i as ConfigError } from "./predicates-Bkm2IoeX.mjs";
2
- import { l as writeJson } from "./cli.mjs";
3
- import { i as validateQuery, r as isMbql5Query, t as assertNotLegacyEnvelopeWrappingMbql5 } from "./validate-BWchyW0V.mjs";
1
+ import { K as ConfigError, l as writeJson } from "./cli.mjs";
2
+ import { i as validateQuery, r as isMbql5Query, t as assertNotLegacyEnvelopeWrappingMbql5 } from "./validate-CWd6l6KZ.mjs";
4
3
  //#region src/commands/validate-query.ts
5
4
  const skipValidateFlag = { "skip-validate": {
6
5
  type: "boolean",
@@ -1,6 +1,6 @@
1
- import { F as outputFlags, I as profileFlag, M as connectionFlags, c as renderSummary, f as formatScalar } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
3
- import { t as parseId } from "./parse-id-C_jmKFaa.mjs";
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary, f as formatScalar } from "./cli.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { t as parseId } from "./parse-id-DR8aUSdL.mjs";
4
4
  import { s as FieldValues } from "./field-Cr2DPUG9.mjs";
5
5
  import { n as fieldValuesView } from "./field-BPsNa-TO.mjs";
6
6
  //#region src/commands/field/values.ts
@@ -9,7 +9,7 @@ var values_default = defineMetabaseCommand({
9
9
  name: "values",
10
10
  description: "Fetch the cached distinct values for a field (FieldValues list)"
11
11
  },
12
- capabilities: { minVersion: 58 },
12
+ requires: ["field.values"],
13
13
  args: {
14
14
  ...outputFlags,
15
15
  ...profileFlag,
@@ -1,21 +1,6 @@
1
- import { n as createClient } from "./client-BqhzKdLM.mjs";
2
- import { f as errorMessage, l as TimeoutError, o as MetabaseError, s as NetworkError } from "./predicates-Bkm2IoeX.mjs";
3
- import { F as tryParseTag, I as SessionProperties, u as USER_AGENT } from "./runtime-DiKyBxOw.mjs";
4
- import { r as HttpError } from "./network-error-CEb9ymDW.mjs";
5
- //#region ../client/src/version/probe.ts
6
- const PROBE_PATH = "/api/session/properties";
7
- const PROBE_TIMEOUT_MS = 1e4;
8
- async function probeServer(client, opts = {}) {
9
- const properties = await client.requestParsed(SessionProperties, PROBE_PATH, {
10
- timeoutMs: PROBE_TIMEOUT_MS,
11
- retries: opts.retries ?? 0
12
- });
13
- return {
14
- version: tryParseTag(properties.version.tag),
15
- tokenFeatures: properties["token-features"] ?? null
16
- };
17
- }
18
- //#endregion
1
+ import { n as createClient } from "./client-Bv7Iwdvh.mjs";
2
+ import { J as MetabaseError, Y as NetworkError, Z as TimeoutError, et as errorMessage } from "./cli.mjs";
3
+ import { $ as probeServer, L as HttpError, O as USER_AGENT } from "./runtime-BQiGgbgZ.mjs";
19
4
  //#region src/core/auth/verify.ts
20
5
  const VERIFY_TIMEOUT_MS = 15e3;
21
6
  async function verifyAndProbe(url, credential, options = {}) {
@@ -1,6 +1,6 @@
1
1
  import { t as interruptSignal } from "./cli.mjs";
2
- import { t as parseId } from "./parse-id-C_jmKFaa.mjs";
3
- import { n as DEFAULT_TIMEOUT_MS, t as DEFAULT_INTERVAL_MS } from "./poll-75SvT7Zv.mjs";
2
+ import { t as parseId } from "./parse-id-DR8aUSdL.mjs";
3
+ import { n as DEFAULT_TIMEOUT_MS, t as DEFAULT_INTERVAL_MS } from "./poll-By46YQ5J.mjs";
4
4
  //#region src/commands/wait-flags.ts
5
5
  const waitScheduleFlags = {
6
6
  timeout: {
@@ -1,7 +1,7 @@
1
- import { F as outputFlags, I as profileFlag, M as connectionFlags, c as renderSummary } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-DiKyBxOw.mjs";
3
- import { n as DEFAULT_TIMEOUT_MS, t as DEFAULT_INTERVAL_MS } from "./poll-75SvT7Zv.mjs";
4
- import { r as parseWaitSchedule } from "./wait-flags-DWEF9tX4.mjs";
1
+ import { I as outputFlags, L as profileFlag, N as connectionFlags, c as renderSummary } from "./cli.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-BQiGgbgZ.mjs";
3
+ import { n as DEFAULT_TIMEOUT_MS, t as DEFAULT_INTERVAL_MS } from "./poll-By46YQ5J.mjs";
4
+ import { r as parseWaitSchedule } from "./wait-flags-DiQ_kRjZ.mjs";
5
5
  import { c as syncTaskView } from "./git-sync-DxD_ng48.mjs";
6
6
  import { a as throwIfFailedTask, i as taskPollOptions, n as formatSyncTask, r as syncTaskIdleView, t as SyncTaskOrIdle } from "./sync-task-BACcrs0i.mjs";
7
7
  //#region src/commands/git-sync/wait.ts
@@ -11,10 +11,7 @@ var wait_default = defineMetabaseCommand({
11
11
  name: "wait",
12
12
  description: "Poll the current git-sync task until it reaches a terminal status"
13
13
  },
14
- capabilities: {
15
- minVersion: 60,
16
- tokenFeature: "remote_sync"
17
- },
14
+ requires: ["gitSync.waitForTask"],
18
15
  args: {
19
16
  ...outputFlags,
20
17
  ...profileFlag,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metabase/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1-alpha.versioning.9ac5f50",
4
4
  "description": "Metabase CLI",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: core
3
- description: Foundations for driving Metabase from the terminal with the `mb` CLI — authentication and named profiles, the flag/output/`--json` conventions every command shares, JSON body input, command discovery via `--help` (add `--json` for machine-readable schemas), and the per-resource footguns (db, table, field, upload, card, dashboard, collection, segment, measure, timeline, alert, subscription, library, setting, search, eid). Load first for any `mb` task; it routes to the specialized skills for deeper work.
3
+ description: Foundations for driving Metabase from the terminal with the `mb` CLI — authentication and named profiles, the flag/output/`--json` conventions every command shares, JSON body input, command discovery via `--help` (add `--json` for machine-readable schemas), and the per-resource footguns (db, table, field, upload, content translation, card, dashboard, collection, segment, measure, timeline, alert, subscription, library, setting, search, eid). Load first for any `mb` task; it routes to the specialized skills for deeper work.
4
4
  allowed-tools: Read, Write, Edit, Bash, AskUserQuestion
5
5
  ---
6
6
 
@@ -11,7 +11,7 @@ The official Metabase CLI (`mb`) drives a Metabase instance over its REST API: a
11
11
  Top-level command groups (run `mb <group> --help` to discover verbs):
12
12
 
13
13
  ```
14
- auth | db | table | field | upload | query | card | dashboard | snippet | segment | measure | collection | library
14
+ auth | db | table | field | upload | content-translation | query | card | dashboard | snippet | segment | measure | collection | library
15
15
  document | timeline | timeline-event | transform | transform-job | transform-tag | alert | subscription | setting
16
16
  search | git-sync | setup | eid | uuid | upgrade | skills
17
17
  ```
@@ -129,8 +129,11 @@ Routine verb shapes (list / get / create / update), every flag, and output schem
129
129
  - **table fields.** `table get` never returns fields on its own — pass `--include fields` (compact; the underlying query_metadata response also carries FK targets and dimensions, visible under `--full`) or use `table fields <id>` (list envelope). `table update` patches table-level metadata only; physical columns aren't editable.
130
130
  - **field has no `list`.** Fields are per-table — get them via `table get <id> --include fields`. Never enumerate fields across a whole db (context blow-up). `field summary` is live cardinality `{field_id, count, distincts}`; `field values` is the cached distinct set (`has_more_values: true` ⇒ truncated cache). `field update` patches metadata only (`base_type` isn't editable) — this is where you set a column's `semantic_type` or foreign-key target.
131
131
  - **upload (CSV → tables).** `upload csv --file <path>` creates a new table + model (prints `{model_id, table_id}`); `upload append <table-id>` / `upload replace <table-id> --file <path>` add to / overwrite a table **previously created by upload** (columns must match). The destination db+schema is admin-configured, not per-call — check with `mb setting get uploads-settings --json` (`db_id: null` ⇒ uploads off/unconfigured; needs admin to read). `--collection <id|root>` only sets the model's collection. Max 50 MB. Errors: **"The uploads database is not configured."** = no db has uploads enabled; **"Uploads are not enabled."** = the append/replace target isn't an uploaded table.
132
+ <!-- requires: contentTranslation -->
133
+ - **content-translation.** Admin-only, and separate from Remote Sync. `content-translation download > translations.csv` streams the complete active dictionary; `content-translation upload --file translations.csv` replaces every active translation with the file's contents. Always upload the canonical complete CSV, never a partial patch. An empty dictionary downloads as Metabase's four-row sample dictionary — don't re-upload it as real translations. Metabase limits dictionaries to 1.5 MiB.
134
+ <!-- /requires -->
132
135
  - **card.** `dataset_query` is the **flat** `mbql/query` value, not a legacy `{type:"query",query:…}` envelope (→ `mbql`). `--export-format csv|xlsx` streams the raw export (pipe to a file), bypassing the JSON envelope. `archive` is the only delete; unarchive with `update --body '{"archived":false}'`. `visualization_settings` keys are scoped by `display` and aren't pre-flighted — see `visualization`.
133
- - **dashboard.** Dashcards round-trip through `PUT /api/dashboard/:id` (no per-dashcard endpoint): `update-dashcard <dash-id> <dashcard-id>` patches one safely; `update --body '{"dashcards":[…]}'` replaces the whole set (omitted ids are deleted server-side; negative ids for new cards). `create` accepts the **same** `dashcards` array in its initial body — lay out the whole dashboard in one call: negative ids for new cards, and `card_id:null` plus a `visualization_settings.virtual_card` block (`{display:"text"|"heading"|"link"|…}`) for non-question cards. `create`/`update` pre-flight every positive `card_id` and exit **2** with `{ok:false,errors:[…]}` on a bad ref (non-bypassable). `dashboard get <id>` (or `--full`) hydrates dashcards/tabs; `list` omits them. **The grid is 24 columns wide:** each dashcard's `{col, row, size_x, size_y}` is in grid units — **full-width is `size_x: 24`** (`size_x: 12` is half a row, the usual cause of a card filling only half the width). Keep `col + size_x ≤ 24`, start a full-width stack's `col` at 0, and don't overlap (the server stores collisions as sent — no auto-fix). Layout patterns and per-chart default sizes → the `dashboard` skill; load it before composing any `dashcards` array.
136
+ - **dashboard.** Dashcards round-trip through `PUT /api/dashboard/:id` (no per-dashcard endpoint): `update-dashcard <dash-id> <dashcard-id>` patches one safely; `update --body '{"dashcards":[…]}'` replaces the whole set (omitted ids are deleted server-side; negative ids for new cards). Every dashcard must include `card_id`, including existing rows; use `card_id:null` plus a `visualization_settings.virtual_card` block (`{display:"text"|"heading"|"link"|…}`) for non-question cards. `create` accepts the **same** `dashcards` array in its initial body, so lay out the whole dashboard in one call. `create`/`update` pre-flight every positive `card_id` and exit **2** with `{ok:false,errors:[…]}` on a bad ref (non-bypassable). `dashboard get <id>` (or `--full`) hydrates dashcards/tabs; `list` omits them. **The grid is 24 columns wide:** each dashcard's `{col, row, size_x, size_y}` is in grid units — **full-width is `size_x: 24`** (`size_x: 12` is half a row, the usual cause of a card filling only half the width). Keep `col + size_x ≤ 24`, start a full-width stack's `col` at 0, and don't overlap (the server stores collisions as sent — no auto-fix). Layout patterns and per-chart default sizes → the `dashboard` skill; load it before composing any `dashcards` array.
134
137
  - **dashboard parameters (filters).** A dashboard's `parameters` array holds its filter widgets; they're part of the dashboard record, so read them with `dashboard get <id> --fields parameters --json` (no separate verb). **Editing replaces the _whole_ array** (like dashcards), so it's a read-modify-write loop and omitting a parameter deletes it. A parameter only filters a card once it is **mapped** onto that dashcard's `parameter_mappings` — an unmapped parameter is an inert widget. `type` is a **closed enum**; an unlisted value is a hard parse error that echoes the full allowed set back to you. `dashboard parameter-values <id> <parameter-id> [--query <substr>]` fetches a widget's selectable values (`{values, has_more_values}`; `--query` is a case-insensitive substring search). Parameter types, ids, mapping targets, and value sources → the `dashboard` skill; load it before authoring a `parameters` array.
135
138
  - **alert / subscription are two unrelated systems.** `alert` watches one **card** and fires on a send condition (`/api/notification`: a cron string, `channel/email`-prefixed handlers, typed recipients); `subscription` delivers one **dashboard** on a schedule (`/api/pulse`: structured `schedule_type` + hour/day/frame, bare `email` channels, `{id}|{email}` recipients). The bodies are not interchangeable. Both silently deliver nowhere if the server has no SMTP / Slack app — check `mb setting get 'email-configured?'` (quote it; the `?` is a shell glob) before creating either. Their list-valued fields (`handlers`/`subscriptions`, `channels`/`cards`) **replace wholesale** on update, so adding one recipient is a read-modify-write. `mb card alerts <id>` and `mb dashboard subscriptions <id>` list what's already attached to a card/dashboard; `archive` deactivates rather than deletes. Load the `notification` skill before authoring either body.
136
139
  - **snippet `--archived` is a swap, not a union** — list returns _either_ active _or_ archived rows, never both. (Same for `--filter archived` on dashboard/collection.)
@@ -139,10 +142,14 @@ Routine verb shapes (list / get / create / update), every flag, and output schem
139
142
  - **collection `<ref>`** accepts four forms only — positive int, `root`, `trash`, or a 21-char entity_id; anything else is a client-side `ConfigError`. `collection items` pages the server endpoint, pulling only as far as the output cap can show — read `has_more`/`next_offset` to continue. `collection tree` is **JSON-only** (`--format text` is rejected). A transform collection needs `collection create --namespace transforms`.
140
143
  - **setting set** parses the value as **strict JSON**: a string is `'"value"'` (inner quotes), booleans `true`/`false`, numbers bare. Wrong quoting silently errors — confirm with `setting get <key>` after. `setting get --json` works on every value type (wrapping bare-text responses into `{key, value}`).
141
144
  - **search vs. list.** For plain enumeration of cards/dashboards/collections use the dedicated `… list` verbs; reach for `search --models <kind>` only for ranking against a query string or a cross-resource lookup.
145
+ <!-- requires: transforms -->
142
146
  - **transform.** Iterate with `transform update <id>`, never `delete` + `create` (keeps the row, `entity_id`, materialized table, and YAML filename — avoids `_2` suffixes and noisy git history). `transform run` needs `--wait` (or `--sync`, which also waits for the output table to register and returns `target_table_id`) or you get only `{run_id, final:null}`. (→ `transform`.)
147
+ <!-- /requires -->
143
148
  - **setup is one-shot.** `mb setup` walks `/api/setup` for a **fresh** instance only — errors against an already-configured one. Mostly for bootstrapping local / e2e instances.
144
149
  - **eid** translates a string entity id → numeric id: `mb eid --model <model> <eid1,eid2> --json`. Entity ids are NanoIDs that can start with `-`, which the positional form misreads as a flag (shell quotes don't help) — for those, use `--body '{"entity_ids":{"card":["-…"]}}'` (the id is a JSON string value, immune to flag parsing).
145
- - **library.** EE-only (`library` premium feature, v59+). The Library is a curated subtree (`library-data` "Data" + `library-metrics` "Metrics" under a `library` root): tables published to **Data** appear first in data pickers and rank up in search; metrics saved to **Metrics** are prioritized in nav, search, and the query builder — it's how you tell people (and agents) "start from these, they're trusted." `library get` shows the Library and its Data/Metrics collection ids; `library create` provisions it (idempotent). `library publish --table-ids/--db-ids/--schemas` publishes tables into Data — it **resolves the Data collection itself and creates the Library if absent** (no collection id to find); each `--schemas` entry is `<db-id>:<schema>` (e.g. `1:public`), not a bare name. `publish` cascades to upstream FK dependencies, `unpublish` to downstream dependents; both need **admin or data-analyst** (Curate alone won't publish) and exit **403** without write **and** query permission on every affected table. Publish status shows on the table: `table get`/`table list` carry `is_published` (`collection_id` under `--full`). Good candidates are finished, analysis-ready tables — clean/combine via transforms first, then publish the polished result. Publishing does not put the Data collection in the git-sync scope: on a remote-sync instance, `mb git-sync add-collection <data-collection-id>` is what makes exports carry the published tables' metadata (see the `git-sync` skill).
150
+ <!-- requires: library -->
151
+ - **library.** The Library is a curated subtree (`library-data` "Data" + `library-metrics` "Metrics" under a `library` root): tables published to **Data** appear first in data pickers and rank up in search; metrics saved to **Metrics** are prioritized in nav, search, and the query builder — it's how you tell people (and agents) "start from these, they're trusted." `library get` shows the Library and its Data/Metrics collection ids; `library create` provisions it (idempotent). `library publish --table-ids/--db-ids/--schemas` publishes tables into Data — it **resolves the Data collection itself and creates the Library if absent** (no collection id to find); each `--schemas` entry is `<db-id>:<schema>` (e.g. `1:public`), not a bare name. `publish` cascades to upstream FK dependencies, `unpublish` to downstream dependents; both need **admin or data-analyst** (Curate alone won't publish) and exit **403** without write **and** query permission on every affected table. Publish status shows on the table: `table get`/`table list` carry `is_published` (`collection_id` under `--full`). Good candidates are finished, analysis-ready tables — clean/combine via transforms first, then publish the polished result. Publishing does not put the Data collection in the git-sync scope: on a remote-sync instance, `mb git-sync add-collection <data-collection-id>` is what makes exports carry the published tables' metadata (see the `git-sync` skill).
152
+ <!-- /requires -->
146
153
  - **query / uuid.** `mb query` is the ad-hoc MBQL surface (`--print-schema` → `--dry-run` → run); `mb uuid --count <n>` mints the `lib/uuid` values MBQL clauses need. Both live in `mbql`.
147
154
 
148
155
  ## Specialized skills (load on demand)
@@ -155,12 +162,16 @@ This file is enough for any single-command task. For anything deeper, load the r
155
162
  - **`dashboard`** — building interactive dashboards: wiring filters (parameters + mappings), linked/cascading filters, cross-filtering, click behavior, series, and tabs. Load beyond a plain card-layout task.
156
163
  - **`metadata`** — setting field/table metadata: semantic types, foreign-key targets, dropdown/scan behavior, and column visibility, and the downstream features each unlocks. Load when editing what a column _means_, not its data.
157
164
  - **`notification`** — scheduled delivery: question alerts (`mb alert`) and dashboard subscriptions (`mb subscription`). Choosing between them, the two schedule/recipient contracts, channel prerequisites, testing a send.
165
+ <!-- requires: transforms -->
158
166
  - **`transform`** — transform body JSON, create + run-with-wait, run inspection, tags, jobs.
167
+ <!-- /requires -->
159
168
  - **`document`** — Metabase documents (TipTap body, embedding cards).
169
+ <!-- requires: remoteSync -->
160
170
  - **`git-sync`** — round-tripping content to/from a git remote.
171
+ <!-- /requires -->
161
172
  - **`data-workflow`** — the guided, end-to-end data workflow: investigate raw data, build clean analysis-ready tables, define reusable segments/measures/metrics, answer questions, build dashboards. **Start here when the user states a goal rather than a single verb** — "make sense of my data", "build a data model", "go from raw data to a dashboard", "be my data analyst", "set up analytics for X". It detects where the data is and routes to the right stage.
162
173
 
163
- If a task spans more than one, load each. `mb skills list` enumerates everything on the installed version.
174
+ If a task spans more than one, load each. `mb skills list` enumerates the skills the profile's server can use, and `mb skills get` prints a skill with the sections that server cannot use left out; `--all` shows everything.
164
175
 
165
176
  ## Don't
166
177
 
@@ -8,7 +8,7 @@ allowed-tools: Read, Write, Edit, Bash, AskUserQuestion
8
8
 
9
9
  A dashboard starts as cards on a grid; it becomes an **app** when filters drive the cards, charts cross-filter each other, and clicks navigate. This skill owns both: the grid layout and the interactive layer.
10
10
 
11
- **`core` owns the transport mechanics** — the whole-array replace semantics (editing `dashcards` or `parameters` replaces the entire set; omitted entries are deleted; new cards use negative ids), `update-dashcard` for a single safe patch vs. `update --body` for a full replace, and the `parameter-values` verb. Read it first (`mb skills get core`). **`visualization`** owns each card's chart and the full `click_behavior` key catalog.
11
+ **`core` owns the transport mechanics** — the whole-array replace semantics (editing `dashcards` or `parameters` replaces the entire set; omitted entries are deleted; every dashcard carries `card_id`, with `null` for virtual cards; new cards use negative ids), `update-dashcard` for a single safe patch vs. `update --body` for a full replace, and the `parameter-values` verb. Read it first (`mb skills get core`). **`visualization`** owns each card's chart and the full `click_behavior` key catalog.
12
12
 
13
13
  Inspect before you wire: `mb dashboard get <id> --json` hydrates `parameters`, `dashcards`, and `tabs`; `mb dashboard cards <id>` lists just the dashcards.
14
14
 
@@ -123,7 +123,7 @@ Set the **driver** chart's whole-card click behavior to `crossfilter`, mapping t
123
123
  - **Auto-connect / the missing map:** a filter that "does nothing" or "won't show" is almost always unmapped, or mapped only to cards on another tab.
124
124
  - **Time-grouping parameters** (`temporal-unit`) bind only to a datetime column in the query's **last** stage — add one after a time-bucketed summary and it can't attach.
125
125
  - **Required + default:** a `required: true` parameter with no `default` blocks its cards until a value is chosen; give it a `default` for expensive queries you don't want running unfiltered.
126
- - **Whole-array replace:** never send a partial `parameters`/`dashcards` array to `update` — you'll delete what you omit. Use `update-dashcard` for a single-card change.
126
+ - **Whole-array replace:** never send a partial `parameters`/`dashcards` array to `update` — you'll delete what you omit. Include `card_id` on every dashcard (`null` for virtual cards). Use `update-dashcard` for a single-card change.
127
127
 
128
128
  ## Don't
129
129