@metabase/cli 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-collection-BjVAdZ1n.mjs → add-collection-CC6KSwjX.mjs} +5 -5
- package/dist/{alert-DCLhfwdv.mjs → alert-Dt6La9tK.mjs} +7 -7
- package/dist/{alerts-DRin_wt2.mjs → alerts-ClKnJqgB.mjs} +6 -6
- package/dist/{append-DQ9rPJHZ.mjs → append-pnaQWP_A.mjs} +4 -4
- package/dist/{archive-D6xzHaM3.mjs → archive-By1pLYtO.mjs} +3 -3
- package/dist/{archive-xcgoVPwv.mjs → archive-CLu2TGW5.mjs} +5 -5
- package/dist/{archive-HeRygdKz2.mjs → archive-COP9joWU.mjs} +4 -4
- package/dist/{archive-COFQAHAL.mjs → archive-CSnBFcQ_.mjs} +3 -3
- package/dist/{archive-1YVo-Wsu.mjs → archive-Ct1eyolN.mjs} +3 -3
- package/dist/{archive-_c-ISZmi.mjs → archive-D7nAQcCz.mjs} +3 -3
- package/dist/{archive-BzVxRqpL.mjs → archive-DEDA48w3.mjs} +5 -5
- package/dist/{archive-BVRKE9Ev.mjs → archive-DJAsSzCz.mjs} +5 -5
- package/dist/{archive-BPCgmLcV.mjs → archive-DtabbPUk.mjs} +4 -4
- package/dist/{archive-o5cWV3vZ.mjs → archive-YNpa8daf.mjs} +3 -3
- package/dist/{archive-D3yPvUtz.mjs → archive-ewitrKdx.mjs} +5 -5
- package/dist/{auth-DJn5T6zA.mjs → auth-DdLhXCn-.mjs} +5 -5
- package/dist/body-Dd-TwYYL.mjs +17 -0
- package/dist/branch-flag-pFQPNYKr.mjs +9 -0
- package/dist/{branches-CUyPxeeW.mjs → branches-ZvGNhed6.mjs} +3 -3
- package/dist/breaking-BLswgvkA.mjs +36 -0
- package/dist/broken-BN0nL2hf.mjs +37 -0
- package/dist/bulk-discard-values-DFJUjSnE.mjs +49 -0
- package/dist/bulk-edit-Brqr67bu.mjs +53 -0
- package/dist/bulk-rescan-values-DndXXi2N.mjs +28 -0
- package/dist/bulk-sync-schema-mO-t2QlL.mjs +28 -0
- package/dist/{cancel-BNuVls58.mjs → cancel-DP03dXBf.mjs} +3 -3
- package/dist/{cancel-task-DUmlQQpi.mjs → cancel-task-CELBfBPP.mjs} +4 -4
- package/dist/{card-voh1k4hl.mjs → card-Bv4ZN0oV.mjs} +5 -3
- package/dist/card-CFd-GUEM.mjs +25 -0
- package/dist/{card-CEkp1mcI.mjs → card-DSrgU7lT.mjs} +1 -1
- package/dist/{cards-_gbvw3wp.mjs → cards-Cn2ywFTJ.mjs} +6 -6
- package/dist/cli.mjs +410 -100
- package/dist/{client-BnK0evYf.mjs → client-ToLiPu9q.mjs} +316 -316
- package/dist/{collection-DYM0p3Xl.mjs → collection-BG3Ksea-.mjs} +1 -1
- package/dist/collection-BKNShKcY.mjs +21 -0
- package/dist/{collection-BxdPxD38.mjs → collection-D3KXhvnc.mjs} +7 -5
- package/dist/{collection-namespace-DM90lA8C.mjs → collection-namespace-CWW6hZxK.mjs} +2 -2
- package/dist/{content-translation-CqB3peU9.mjs → content-translation-C19SqZWp.mjs} +3 -3
- package/dist/copy-BGK8Wz6d.mjs +55 -0
- package/dist/copy-COLUuiuF.mjs +36 -0
- package/dist/copy-flags-eU8aa0zj.mjs +32 -0
- package/dist/{create-CnJKj9Nl.mjs → create-B2tuInV9.mjs} +4 -4
- package/dist/{create-D4Y69cDF.mjs → create-B3TKri1E.mjs} +4 -4
- package/dist/{create-BSvTs-EV.mjs → create-B4gXKDRr.mjs} +3 -3
- package/dist/create-B63JphYe.mjs +34 -0
- package/dist/{create-IFjwHs0G.mjs → create-BH6kLjHS.mjs} +4 -4
- package/dist/{create-BIUVvIGH.mjs → create-BwifyhyL.mjs} +3 -3
- package/dist/{create-CwXUMOMd.mjs → create-Colz5bOO.mjs} +3 -3
- package/dist/{create-Cm9Z-rfe2.mjs → create-CulUZgN1.mjs} +4 -4
- package/dist/{create-DNx9TGHs.mjs → create-Cxuqr3kT.mjs} +6 -6
- package/dist/{create-CUHpxANR.mjs → create-CzW_UTE7.mjs} +6 -6
- package/dist/{create-BMKuihoI.mjs → create-DNR8RMvV.mjs} +6 -6
- package/dist/{create-DMVw9nrZ.mjs → create-DSHeoV7e.mjs} +4 -4
- package/dist/{create-DVo8-IzZ.mjs → create-DWbW2WSc.mjs} +6 -6
- package/dist/{create-va8bByVt.mjs → create-Dx8nfjGs.mjs} +3 -3
- package/dist/{create-B7S5fCkD.mjs → create-XGomrTz5.mjs} +5 -5
- package/dist/{create-branch-Cw-uXows.mjs → create-branch-DxL7KUZp.mjs} +4 -4
- package/dist/{create-B48rmY8v.mjs → create-g1f2yJ4s.mjs} +3 -3
- package/dist/{csv-CaKx1oFZ.mjs → csv-C6TEfLMi.mjs} +4 -4
- package/dist/{current-task-lGh69Z1i.mjs → current-task-CHs0zNFM.mjs} +4 -4
- package/dist/dashboard-AWrXqQ7a.mjs +35 -0
- package/dist/{dashboard-D0hwTC-f.mjs → dashboard-Phz3XpRM.mjs} +2 -1
- package/dist/{dashboard-DgK81azj.mjs → dashboard-XSTr9QCr.mjs} +6 -2
- package/dist/database-D-CRyRIv.mjs +45 -0
- package/dist/{database-C3E9PZSx.mjs → database-MlUPpitM.mjs} +1 -1
- package/dist/dataset-p5oNPQgL.mjs +66 -0
- package/dist/{db-BRHPjshe.mjs → db-BFSeETMO.mjs} +7 -7
- package/dist/{delete-DMETa-37.mjs → delete-BUKgSJhh.mjs} +4 -4
- package/dist/{delete-CQWCfqHf.mjs → delete-CPBByycV.mjs} +4 -4
- package/dist/{delete-Ci0aDYpf.mjs → delete-Cucqn4-V.mjs} +4 -4
- package/dist/{delete-BxBadE3q.mjs → delete-D79TlpcE.mjs} +4 -4
- package/dist/delete-DZJxBmdU.mjs +44 -0
- package/dist/{delete-G6EiGn2Q.mjs → delete-DndykJn2.mjs} +4 -4
- package/dist/delete-runtime-BbmRg_in.mjs +55 -0
- package/dist/{delete-table-N4rZtt1T.mjs → delete-table-CbsWcjh5.mjs} +4 -4
- package/dist/{dependencies-edN0P1SS.mjs → dependencies-B-880phi.mjs} +5 -5
- package/dist/dependency-DBUJwXqv.mjs +15 -0
- package/dist/dependency-DKSjKT8P.mjs +165 -0
- package/dist/dependency-DSxKm9oS.mjs +111 -0
- package/dist/dependents-C_FDnpZs.mjs +52 -0
- package/dist/{dirty-U51bMoCP.mjs → dirty-B-Is68--.mjs} +5 -5
- package/dist/discard-values-yzH-kIsr.mjs +55 -0
- package/dist/document-BRaba87v.mjs +20 -0
- package/dist/{document-CA0Q6lqu.mjs → document-C18b5rM6.mjs} +1 -1
- package/dist/{document-BHpLJbKU.mjs → document-DFCj1Az_.mjs} +2 -1
- package/dist/{download-BJA6k-e6.mjs → download-DluF-vnU.mjs} +2 -2
- package/dist/{eid-BtlRU1E0.mjs → eid-Dz-mP40j.mjs} +11 -10
- package/dist/entity-CA4zfRt4.mjs +20 -0
- package/dist/entry-flags-7x7bIyOQ.mjs +42 -0
- package/dist/{events-B5rnOo-L.mjs → events-2sOk6H09.mjs} +4 -4
- package/dist/export-BKkAJOFb.mjs +74 -0
- package/dist/export-flags-NiZ7C3Gm.mjs +81 -0
- package/dist/export-preflight-CwJ_3-iX.mjs +35 -0
- package/dist/{field-CcN4oZy6.mjs → field-5nivEfd6.mjs} +33 -3
- package/dist/field-BARgq5I9.mjs +21 -0
- package/dist/field-wmN6raOG.mjs +128 -0
- package/dist/{fields-zQ6O_W_H.mjs → fields-Bod0s_uV.mjs} +6 -6
- package/dist/filter-flags-BYcbB85j.mjs +71 -0
- package/dist/fks-IUw66K_Q.mjs +36 -0
- package/dist/{get-BDrmBZ1z.mjs → get-B8DUMrCw.mjs} +5 -5
- package/dist/{get-is8x5f2n.mjs → get-BGqvoGQM.mjs} +3 -3
- package/dist/{get-CekXFP3x.mjs → get-BSUsfysk.mjs} +3 -3
- package/dist/{get-CeSQptdl.mjs → get-BXsLkoit.mjs} +5 -5
- package/dist/{get-DhpMuTSt.mjs → get-BXssHyJ1.mjs} +5 -5
- package/dist/get-Bct52yPw.mjs +36 -0
- package/dist/{get-DXwlZjw0.mjs → get-Besqwy32.mjs} +3 -3
- package/dist/{get-BLjcCXp8.mjs → get-BfSX-OeS.mjs} +3 -3
- package/dist/{get-BLcS4il2.mjs → get-Biy4gOzu2.mjs} +3 -3
- package/dist/{get-BSoMWp4t2.mjs → get-CYIeiTZ9.mjs} +4 -4
- package/dist/{get-CwiJWeH4.mjs → get-CaEiQnSw.mjs} +4 -4
- package/dist/{get-xPv7e5Ez.mjs → get-Cl81y0Md.mjs} +5 -5
- package/dist/{get-Cf6a4fFN.mjs → get-D1NjMXAH.mjs} +4 -4
- package/dist/{get-EFsmL4le.mjs → get-D2cPuOPR.mjs} +5 -5
- package/dist/{get-Dg-S07ri.mjs → get-DITlshJH.mjs} +3 -3
- package/dist/{get-CTp5l7aU.mjs → get-DLyg6Al9.mjs} +3 -3
- package/dist/{get-93wuhTn2.mjs → get-DQZfaVNq.mjs} +4 -4
- package/dist/{get-CG6G-mzV.mjs → get-DtBqoGTa.mjs} +5 -5
- package/dist/{get-DC_huYD8.mjs → get-_ik_5_lQ.mjs} +5 -5
- package/dist/{get-run-DwY4sFGy.mjs → get-run-CEc_tr5b.mjs} +4 -4
- package/dist/{git-sync-BwBRmEhE.mjs → git-sync-COokpYgc.mjs} +12 -3
- package/dist/git-sync-DKcaddkV.mjs +29 -0
- package/dist/git-sync-DspFahwV.mjs +165 -0
- package/dist/glossary-BlNCrYbw.mjs +30 -0
- package/dist/glossary-CWIX8Zh6.mjs +14 -0
- package/dist/glossary-LmZWwCNP.mjs +21 -0
- package/dist/graph-f6Bp1e8U.mjs +34 -0
- package/dist/{group-YQQ5GIcP.mjs → group-bpD_KcjA.mjs} +1 -1
- package/dist/{has-remote-changes-DE2_14FK.mjs → has-remote-changes-B8MmN6yh.mjs} +4 -4
- package/dist/{import-Cs7wk058.mjs → import-Bhq15KgP.mjs} +19 -8
- package/dist/{input-DEvkIjGr.mjs → input-D8qW-KtR.mjs} +6 -2
- package/dist/{is-dirty-XqDfqXGi.mjs → is-dirty-CAsVuVx8.mjs} +2 -2
- package/dist/{items-BloAjPwA.mjs → items-BZJomiDE.mjs} +8 -8
- package/dist/{key-PYetuQ13.mjs → key-BynJSK9u.mjs} +1 -1
- package/dist/{library-Dgq_5BFh.mjs → library-B7wDH-Nc.mjs} +5 -5
- package/dist/{library-PGCfm0UA.mjs → library-BOv5SY24.mjs} +1 -1
- package/dist/{library-BPIzb3K_.mjs → library-Ck0EK5bi.mjs} +4 -2
- package/dist/{list-CZCaqPoo.mjs → list-B2uUl26x.mjs} +6 -6
- package/dist/{list-3ErmGdY0.mjs → list-B4luDSYj.mjs} +6 -6
- package/dist/{list-D04uiS3F.mjs → list-B8ND9t2h.mjs} +3 -3
- package/dist/{list-CghNKfYJ.mjs → list-BT5t8ZOl.mjs} +4 -4
- package/dist/{list-VzrtA9lt.mjs → list-BT7xiUQe.mjs} +3 -3
- package/dist/{list-D9d5ocYi.mjs → list-BWFCv_zk.mjs} +5 -5
- package/dist/{list-DboUvg-Y.mjs → list-BtZVe1Nq.mjs} +6 -6
- package/dist/{list-sdCIS2Df.mjs → list-BwdSG-P5.mjs} +5 -5
- package/dist/{list-yV6CyPzn.mjs → list-C-A-2HFq.mjs} +3 -3
- package/dist/list-C9x--9Jq.mjs +101 -0
- package/dist/{list-CUJ1wem9.mjs → list-CCdXig7b.mjs} +4 -4
- package/dist/{list-BfLo1xI8.mjs → list-CJDFoOHb.mjs} +3 -3
- package/dist/{list-Bzm5mXRo.mjs → list-CLFu3mQB.mjs} +3 -3
- package/dist/{list-BZnf3RmA.mjs → list-Cd40Kr0R.mjs} +3 -3
- package/dist/{list-CUXlZiS1.mjs → list-Cj_mTxbY.mjs} +4 -4
- package/dist/{list-f8Csdjyc.mjs → list-CtS50R7m.mjs} +5 -5
- package/dist/{list-vsXIMssK.mjs → list-CvZyTwmV.mjs} +5 -5
- package/dist/list-DcnNlYQA.mjs +35 -0
- package/dist/{list-DuJezLm_.mjs → list-DtgbtE3_.mjs} +3 -3
- package/dist/{login-Vw51Gts5.mjs → login-Bi_nGMJ9.mjs} +6 -6
- package/dist/{logout-BDIqoVhv.mjs → logout-CiHQJWTu.mjs} +2 -2
- package/dist/{measure-LY9Tp9QZ.mjs → measure-D2qq5e8f.mjs} +6 -6
- package/dist/moderation-review-BdqEH6N1.mjs +31 -0
- package/dist/{notification-DVrLkjFT.mjs → notification-DOYdl0ao.mjs} +1 -1
- package/dist/{parameter-values-DWjmO7Ai.mjs → parameter-values-CZow98nb.mjs} +3 -3
- package/dist/{parse-enum-Dc0dMZ3P.mjs → parse-enum-CLIXMsd8.mjs} +1 -1
- package/dist/parse-id-BW09NysN.mjs +13 -0
- package/dist/{parse-ref-DTDld_LJ.mjs → parse-ref-Cw5fa4FI.mjs} +1 -1
- package/dist/parse-text-T0lTXzTZ.mjs +11 -0
- package/dist/{path-BUUAGYO5.mjs → path-K6LPLYPb.mjs} +4 -4
- package/dist/{poll-CZeXepUQ.mjs → poll-Dz4tUm2f.mjs} +2 -2
- package/dist/{preflight-DcULqq8E.mjs → preflight-CX6cqB90.mjs} +3 -3
- package/dist/{process-CTrfxxaC.mjs → process-D0HdqZ3r.mjs} +1 -1
- package/dist/{publish-qVFmJQ1E.mjs → publish-COatW4Un.mjs} +4 -4
- package/dist/{pulse-x0gFxWfG.mjs → pulse-D1uh8UIU.mjs} +1 -1
- package/dist/query-BJXTIDhy.mjs +328 -0
- package/dist/{query-Cq1lmqL5.mjs → query-DmvkyDfo.mjs} +14 -33
- package/dist/remapping-CPAvDKHV.mjs +53 -0
- package/dist/{remove-collection-DBqh2Lqm.mjs → remove-collection-Bg-sNX3U.mjs} +5 -5
- package/dist/{render-Gx1hR7IF.mjs → render-BSfDD6ip.mjs} +2 -2
- package/dist/{replace-CujInVY9.mjs → replace-RCHeZLUT.mjs} +4 -4
- package/dist/{rescan-values-HypqBCSK.mjs → rescan-values-CpDGYZvf.mjs} +5 -5
- package/dist/rescan-values-PeMnpaFY.mjs +32 -0
- package/dist/{run-DEkQSOQa.mjs → run-CaQ7kubO.mjs} +3 -3
- package/dist/{run-b3jyF29q.mjs → run-DkRkZRgf.mjs} +4 -4
- package/dist/{runs-GHqHLGy4.mjs → runs-BDjoVJ0P.mjs} +5 -5
- package/dist/{runtime-nCPku2nN.mjs → runtime-CZ5zh32z.mjs} +21 -82
- package/dist/{schema-tables-B5L05Y1L.mjs → schema-tables-C2qjLcPq.mjs} +6 -6
- package/dist/{schemas-Clx26p_4.mjs → schemas-D8hfNduk.mjs} +4 -4
- package/dist/search-BrQQuNmh.mjs +131 -0
- package/dist/search-CnTXKJgx.mjs +85 -0
- package/dist/{segment-DiRJcbam.mjs → segment-Bi6eqj3e.mjs} +6 -6
- package/dist/{send-DIHkDNBN.mjs → send-CAjgVNlA.mjs} +3 -3
- package/dist/{set-D77qUZML.mjs → set-BXTkYWid.mjs} +4 -4
- package/dist/{set-active-DCdFgD0O.mjs → set-active-CBQVCePU.mjs} +3 -3
- package/dist/set-sensitivity-D39kGTob.mjs +57 -0
- package/dist/{setting-DR9bj232.mjs → setting-CPkvkc4H.mjs} +4 -4
- package/dist/{setup-DGa2LLEp.mjs → setup-Be3xDXHi.mjs} +3 -3
- package/dist/{signal-k7cm5N6h.mjs → signal-CxWeLszu.mjs} +1 -1
- package/dist/{skill-list-DAvGGHzS.mjs → skill-list-CBGq30sI.mjs} +2 -2
- package/dist/{skills-CqtNuSXM.mjs → skills-CJ9eXouJ.mjs} +2 -2
- package/dist/{skills-CCn7cyMP.mjs → skills-DyiLycMY.mjs} +3 -3
- package/dist/snippet-QirK70R_.mjs +19 -0
- package/dist/{stash-BTtsV0AG.mjs → stash-BVN3s5N_.mjs} +6 -6
- package/dist/{status-CW7Dt-nV.mjs → status-BtbMmIWo.mjs} +7 -7
- package/dist/{status-XgSS3StV.mjs → status-CxP6w3aL.mjs} +3 -3
- package/dist/{subscription-CofRU47d.mjs → subscription-Dr-YHARg.mjs} +6 -6
- package/dist/{subscriptions-DCuuPF6U.mjs → subscriptions-8tM8TTeQ.mjs} +6 -6
- package/dist/{summary-uGlgKE3C.mjs → summary-DKx6ptQe.mjs} +5 -5
- package/dist/sync-schema-B8RY0Ra4.mjs +32 -0
- package/dist/{sync-schema-Cu9rD3eH.mjs → sync-schema-kNriXZjG.mjs} +6 -6
- package/dist/sync-task-CXFoqlpF.mjs +53 -0
- package/dist/table-CZnT6d9x.mjs +26 -0
- package/dist/{table-DfuY0N8e.mjs → table-Ci6bhZkb.mjs} +35 -12
- package/dist/table-CxvaDiIZ.mjs +155 -0
- package/dist/table-selector-flags-1bYkAKld.mjs +42 -0
- package/dist/text-DaNkPRwt.mjs +6 -0
- package/dist/timeline-CUzx6uXi.mjs +21 -0
- package/dist/{timeline-event-D-h0A_oh.mjs → timeline-event-DpNm4dkn.mjs} +6 -6
- package/dist/{transform-CtqB1WYo.mjs → transform-CNBIV7No.mjs} +1 -1
- package/dist/transform-g4-HHzDp.mjs +28 -0
- package/dist/transform-job-DqBtnTrG.mjs +22 -0
- package/dist/{transform-tag-BLp_p9J-.mjs → transform-tag-nTb0Ivpj.mjs} +5 -5
- package/dist/{transforms-n2IwEcbU.mjs → transforms-BSsAfwAg.mjs} +5 -5
- package/dist/tree-lMvw1jnZ.mjs +34 -0
- package/dist/{unpublish-DVQCAa3g.mjs → unpublish-CYFDd828.mjs} +3 -3
- package/dist/unreferenced-8Xdq76Kw.mjs +36 -0
- package/dist/{update-oQeQyqKO.mjs → update-6P_GYCLT.mjs} +5 -5
- package/dist/{update-DFdBeJwc.mjs → update-B28EJzrx.mjs} +13 -8
- package/dist/{update-DffrdV4b.mjs → update-BDunZa7G.mjs} +4 -4
- package/dist/{update-DKO9HF1f.mjs → update-BT2yNB_g.mjs} +6 -6
- package/dist/{update-rFRPLlb6.mjs → update-BnMUSFYZ.mjs} +4 -4
- package/dist/update-BwrYeKso.mjs +41 -0
- package/dist/{update-B7CikkI0.mjs → update-C7DEMiu-.mjs} +7 -7
- package/dist/{update-CAsqNhDC.mjs → update-CITzAFG8.mjs} +4 -4
- package/dist/update-CLl8tE20.mjs +181 -0
- package/dist/{update-C05J2nZ2.mjs → update-CM5uuhjB.mjs} +4 -4
- package/dist/{update-ChpOukqq.mjs → update-CQXcsvaa.mjs} +5 -5
- package/dist/{update-D4ggtuG4.mjs → update-Cs2zv_L2.mjs} +7 -7
- package/dist/{update-NGq0yXZk.mjs → update-D--Fw7-_.mjs} +5 -5
- package/dist/{update-D9H6Lh5U.mjs → update-D9p0N8ky.mjs} +4 -4
- package/dist/{update-CKDRuduL.mjs → update-DAzRx0of.mjs} +5 -5
- package/dist/{update-CnkPYL2i.mjs → update-D_DCOOAB.mjs} +6 -6
- package/dist/{update-DScUzKLI.mjs → update-_sYM1GuU.mjs} +7 -7
- package/dist/{update-dashcard-DvPqLJ3N.mjs → update-dashcard-VNnIqHDI.mjs} +6 -6
- package/dist/{upgrade-BRgw0fvn.mjs → upgrade-Tj_reACv.mjs} +4 -4
- package/dist/upload-BKxOpSz3.mjs +13 -0
- package/dist/{upload-Do2PBSeH.mjs → upload-C2fhpKkP.mjs} +2 -2
- package/dist/{upload-BrfbcbBW.mjs → upload-Dg91ldGg.mjs} +3 -3
- package/dist/{uuid-B4eij1d7.mjs → uuid-Blpv_e0S.mjs} +2 -2
- package/dist/{validate-xR_MHBNR.mjs → validate-D7e110oU.mjs} +1 -1
- package/dist/{validate-query-D6_ad-Gi.mjs → validate-query-C7LuKiUT.mjs} +2 -2
- package/dist/{values-xgOftPq5.mjs → values-PonkbYAK.mjs} +5 -5
- package/dist/verify-DixUBbd2.mjs +38 -0
- package/dist/verify-Dv7ER11c.mjs +38 -0
- package/dist/{verify-DTOA_wVM.mjs → verify-Mpb65a5v.mjs} +3 -3
- package/dist/verify-flags-CMpRkMPa.mjs +58 -0
- package/dist/{wait-BjeFgR13.mjs → wait-CaH6XHQV.mjs} +6 -6
- package/dist/{wait-flags-BCeCnaz3.mjs → wait-flags-rUU4NUrv.mjs} +2 -2
- package/dist/{window-DSb1tqSe.mjs → window-CI_QD04s.mjs} +1 -1
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +18 -11
- package/skill-data/dashboard/SKILL.md +1 -1
- package/skill-data/document/SKILL.md +12 -1
- package/skill-data/git-sync/SKILL.md +61 -9
- package/skill-data/mbql/SKILL.md +5 -0
- package/skill-data/metadata/SKILL.md +36 -6
- package/dist/body-Cu94pH4P.mjs +0 -17
- package/dist/card-ByOzVxpI.mjs +0 -24
- package/dist/collection-BGbW7u_Q.mjs +0 -20
- package/dist/dashboard-Bzjz2v6u.mjs +0 -33
- package/dist/database-JtHTqSpq.mjs +0 -26
- package/dist/delete-runtime-BKEzJn22.mjs +0 -49
- package/dist/document-DqJ7Cysa.mjs +0 -19
- package/dist/export-DO2josC0.mjs +0 -63
- package/dist/field-CHZByaXa.mjs +0 -18
- package/dist/field-fDtIrY6D.mjs +0 -80
- package/dist/get-yHIEezeG.mjs +0 -31
- package/dist/git-sync-NhfLSZA6.mjs +0 -28
- package/dist/git-sync-TjX1r_wF.mjs +0 -136
- package/dist/list-DgteFn01.mjs +0 -34
- package/dist/parse-id-whJX4DAb.mjs +0 -10
- package/dist/query-BPtIy79s.mjs +0 -114
- package/dist/query-result-E4Q-Gra6.mjs +0 -15
- package/dist/search-DxiuY5EV.mjs +0 -97
- package/dist/selectors-rEFuyXPZ.mjs +0 -35
- package/dist/snippet-g9JTDxqu.mjs +0 -19
- package/dist/sync-task-BXeWuARG.mjs +0 -37
- package/dist/table-C6h4tIRw.mjs +0 -37
- package/dist/table-Di-EY7pg.mjs +0 -18
- package/dist/timeline-D7EsWZm6.mjs +0 -21
- package/dist/transform-8XK1LIgC.mjs +0 -28
- package/dist/transform-job-CTizQkWy.mjs +0 -22
- package/dist/tree-cqxiDh2b.mjs +0 -26
- package/dist/upload-VXBFKzLT.mjs +0 -13
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { H as connectionFlags, J as profileFlag, p as renderSummary, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-CZ5zh32z.mjs";
|
|
3
|
+
import { t as parseId } from "./parse-id-BW09NysN.mjs";
|
|
4
|
+
import { l as tableValuesDiscardResultView, n as TableValuesDiscardResult } from "./table-CxvaDiIZ.mjs";
|
|
5
|
+
import { r as confirmDestructive } from "./delete-runtime-BbmRg_in.mjs";
|
|
6
|
+
//#region src/commands/table/discard-values.ts
|
|
7
|
+
var discard_values_default = defineMetabaseCommand({
|
|
8
|
+
meta: {
|
|
9
|
+
name: "discard-values",
|
|
10
|
+
description: "Discard the cached field values of one table"
|
|
11
|
+
},
|
|
12
|
+
details: "Deletes the cached distinct values behind this table's filter dropdowns, and with them any custom display values set on those values. No scan recreates a discarded set, neither `mb table rescan-values` nor the database's scheduled scan; Metabase rebuilds a set, without its display values, the next time it is read (a filter dropdown, `mb field values <id>`). Asks for confirmation on a terminal; pass --yes to skip it, which a non-interactive run must. To discard a set of tables use `mb table bulk-discard-values`.",
|
|
13
|
+
requires: ["table.discardValues"],
|
|
14
|
+
args: {
|
|
15
|
+
...outputFlags,
|
|
16
|
+
...profileFlag,
|
|
17
|
+
...connectionFlags,
|
|
18
|
+
yes: {
|
|
19
|
+
type: "boolean",
|
|
20
|
+
description: "Skip confirmation",
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
id: {
|
|
24
|
+
type: "positional",
|
|
25
|
+
description: "Table id",
|
|
26
|
+
required: true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
outputSchema: TableValuesDiscardResult,
|
|
30
|
+
examples: ["mb table discard-values 42 --yes", "mb table discard-values 42"],
|
|
31
|
+
async run({ args, ctx, getClient }) {
|
|
32
|
+
const id = parseId(args.id);
|
|
33
|
+
const client = await getClient();
|
|
34
|
+
if (!await confirmDestructive({
|
|
35
|
+
yes: args.yes,
|
|
36
|
+
action: `discard the field values of table ${id}`,
|
|
37
|
+
promptMessage: `Discard the cached field values of table ${id}, custom display values included?`
|
|
38
|
+
})) {
|
|
39
|
+
renderSummary({
|
|
40
|
+
id,
|
|
41
|
+
discarded: false,
|
|
42
|
+
aborted: true
|
|
43
|
+
}, tableValuesDiscardResultView, `Aborted; the field values of table ${id} were not discarded.`, ctx);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
await client.table.discardValues(id);
|
|
47
|
+
renderSummary({
|
|
48
|
+
id,
|
|
49
|
+
discarded: true,
|
|
50
|
+
aborted: false
|
|
51
|
+
}, tableValuesDiscardResultView, `Cached field values discarded for table ${id}.`, ctx);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
//#endregion
|
|
55
|
+
export { discard_values_default as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { t as defineCommandGroup } from "./group-bpD_KcjA.mjs";
|
|
2
|
+
//#region src/commands/document/index.ts
|
|
3
|
+
var document_default = defineCommandGroup({
|
|
4
|
+
name: "document",
|
|
5
|
+
description: "Manage Metabase documents",
|
|
6
|
+
skills: [{
|
|
7
|
+
skill: "document",
|
|
8
|
+
purpose: "author the ProseMirror document body"
|
|
9
|
+
}],
|
|
10
|
+
subCommands: {
|
|
11
|
+
list: () => import("./list-CvZyTwmV.mjs").then((mod) => mod.default),
|
|
12
|
+
get: () => import("./get-BXsLkoit.mjs").then((mod) => mod.default),
|
|
13
|
+
create: () => import("./create-XGomrTz5.mjs").then((mod) => mod.default),
|
|
14
|
+
update: () => import("./update-BT2yNB_g.mjs").then((mod) => mod.default),
|
|
15
|
+
copy: () => import("./copy-COLUuiuF.mjs").then((mod) => mod.default),
|
|
16
|
+
archive: () => import("./archive-ewitrKdx.mjs").then((mod) => mod.default)
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
//#endregion
|
|
20
|
+
export { document_default as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as NonBlankText } from "./text-DaNkPRwt.mjs";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
//#region ../client/src/domain/document.ts
|
|
3
4
|
const TipTapNode = z.looseObject({
|
|
@@ -85,7 +86,7 @@ const DocumentUpdateInput = z.object({
|
|
|
85
86
|
cards: z.record(z.string().regex(/^-?\d+$/), DocumentCardInput).nullable().optional().describe("cards keyed by card id; negative ids create new cards")
|
|
86
87
|
}).loose();
|
|
87
88
|
z.object({
|
|
88
|
-
name:
|
|
89
|
+
name: NonBlankText.nullable().optional(),
|
|
89
90
|
collection_id: z.number().int().positive().nullable().optional(),
|
|
90
91
|
collection_position: z.number().int().positive().nullable().optional()
|
|
91
92
|
}).strict();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as defineMetabaseCommand } from "./runtime-
|
|
1
|
+
import { H as connectionFlags, J as profileFlag } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-CZ5zh32z.mjs";
|
|
3
3
|
import { t as pipeToStdout } from "./stream-McixcoUl.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/commands/content-translation/download.ts
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { H as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { H as connectionFlags, J as profileFlag, at as ConfigError, et as parseCsv, p as renderSummary, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-CZ5zh32z.mjs";
|
|
3
|
+
import { r as givenValue } from "./input-D8qW-KtR.mjs";
|
|
4
|
+
import { t as readBody } from "./body-Dd-TwYYL.mjs";
|
|
4
5
|
import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
|
|
5
6
|
import { a as EidTranslateResultCompact, i as EidTranslateResult, n as EidModel, r as EidTranslateInput, t as EID_MODELS } from "./eid-translation-zEHtr5Oc.mjs";
|
|
6
7
|
//#region src/output/views/eid-translation.ts
|
|
@@ -14,14 +15,14 @@ const eidTranslateView = {
|
|
|
14
15
|
//#endregion
|
|
15
16
|
//#region src/commands/flag-pair.ts
|
|
16
17
|
function requireBothOrNeither(first, second) {
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
if (
|
|
21
|
-
if (
|
|
18
|
+
const firstValue = givenValue(first.value);
|
|
19
|
+
const secondValue = givenValue(second.value);
|
|
20
|
+
if (firstValue === null && secondValue === null) return null;
|
|
21
|
+
if (firstValue === null) throw new ConfigError(`${first.name} is required when using ${second.name}`);
|
|
22
|
+
if (secondValue === null) throw new ConfigError(`${second.name} is required when using ${first.name}`);
|
|
22
23
|
return {
|
|
23
|
-
first:
|
|
24
|
-
second:
|
|
24
|
+
first: firstValue,
|
|
25
|
+
second: secondValue
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
//#endregion
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { f as DependencyType } from "./dependency-DKSjKT8P.mjs";
|
|
2
|
+
import { t as parseEnumFlag } from "./parse-enum-CLIXMsd8.mjs";
|
|
3
|
+
//#region src/commands/dependency/entity.ts
|
|
4
|
+
const entityArgs = {
|
|
5
|
+
type: {
|
|
6
|
+
type: "positional",
|
|
7
|
+
description: `Entity kind (${DependencyType.options.join(" | ")})`,
|
|
8
|
+
required: true
|
|
9
|
+
},
|
|
10
|
+
id: {
|
|
11
|
+
type: "positional",
|
|
12
|
+
description: "Entity id",
|
|
13
|
+
required: true
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
function parseDependencyType(value) {
|
|
17
|
+
return parseEnumFlag(value, DependencyType, "type");
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { parseDependencyType as n, entityArgs as t };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { at as ConfigError } from "./cli.mjs";
|
|
2
|
+
import { r as givenValue } from "./input-D8qW-KtR.mjs";
|
|
3
|
+
import { t as readBody } from "./body-Dd-TwYYL.mjs";
|
|
4
|
+
import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
|
|
5
|
+
import { r as GlossaryCreateInput } from "./glossary-BlNCrYbw.mjs";
|
|
6
|
+
//#region src/commands/glossary/entry-flags.ts
|
|
7
|
+
const entryFlags = {
|
|
8
|
+
...bodyInputFlags,
|
|
9
|
+
term: {
|
|
10
|
+
type: "string",
|
|
11
|
+
description: "The term (used with --definition)"
|
|
12
|
+
},
|
|
13
|
+
definition: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "The definition (used with --term)"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The flag pair and a body are alternatives, so a `--body` or `--file` beside the flags is refused
|
|
20
|
+
* rather than dropped. A body piped on stdin is not read while the flags are given: telling an
|
|
21
|
+
* idle inherited pipe from one still to send would cost every flag-driven call the stdin wait.
|
|
22
|
+
*/
|
|
23
|
+
async function readEntryInput(args) {
|
|
24
|
+
if (args.term === void 0 && args.definition === void 0) return readBody({
|
|
25
|
+
flag: args.body,
|
|
26
|
+
file: args.file
|
|
27
|
+
}, GlossaryCreateInput);
|
|
28
|
+
if (givenValue(args.body) !== null || givenValue(args.file) !== null) throw new ConfigError("--term, --definition cannot be combined with --body or --file");
|
|
29
|
+
if (args.term === void 0) throw new ConfigError("--term is required when using --definition");
|
|
30
|
+
if (args.definition === void 0) throw new ConfigError("--definition is required when using --term");
|
|
31
|
+
return {
|
|
32
|
+
term: parseFlag(GlossaryCreateInput.shape.term, args.term, "--term"),
|
|
33
|
+
definition: parseFlag(GlossaryCreateInput.shape.definition, args.definition, "--definition")
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function parseFlag(schema, value, flag) {
|
|
37
|
+
const parsed = schema.safeParse(value);
|
|
38
|
+
if (!parsed.success) throw new ConfigError(`${flag} ${parsed.error.issues.map((issue) => issue.message).join("; ")}`);
|
|
39
|
+
return parsed.data;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { readEntryInput as n, entryFlags as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as defineMetabaseCommand } from "./runtime-
|
|
3
|
-
import { t as parseId } from "./parse-id-
|
|
4
|
-
import { n as windowList } from "./window-
|
|
1
|
+
import { G as listFlags, H as connectionFlags, J as profileFlag, X as listEnvelopeSchema, d as renderList, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-CZ5zh32z.mjs";
|
|
3
|
+
import { t as parseId } from "./parse-id-BW09NysN.mjs";
|
|
4
|
+
import { n as windowList } from "./window-CI_QD04s.mjs";
|
|
5
5
|
import { a as TimelineEventCompact } from "./timeline-CCSU2qOS.mjs";
|
|
6
6
|
import { t as timelineEventView } from "./timeline-uDCmwGFT.mjs";
|
|
7
7
|
//#region src/commands/timeline/events.ts
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { H as connectionFlags, J as profileFlag, at as ConfigError, k as warn, p as renderSummary, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-CZ5zh32z.mjs";
|
|
3
|
+
import { o as SyncExportResult } from "./git-sync-COokpYgc.mjs";
|
|
4
|
+
import { n as parseWaitFlags, t as gitSyncWaitFlags } from "./wait-flags-rUU4NUrv.mjs";
|
|
5
|
+
import { a as syncExportView } from "./git-sync-DspFahwV.mjs";
|
|
6
|
+
import { a as throwIfFailedTask, i as taskPollOptions, n as formatSyncTask } from "./sync-task-CXFoqlpF.mjs";
|
|
7
|
+
import { t as branchFlag } from "./branch-flag-pFQPNYKr.mjs";
|
|
8
|
+
//#region src/commands/git-sync/export.ts
|
|
9
|
+
var export_default = defineMetabaseCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
name: "export",
|
|
12
|
+
description: "Export Metabase changes back to the configured git remote"
|
|
13
|
+
},
|
|
14
|
+
details: "The export targets the branch git-sync tracks. On Metabase 63+ `--branch` defaults to it and must name it (the server answers 409 for any other branch); older servers export to the branch `--branch` names and switch git-sync to it, refusing with 400 when that branch's tip is not the last synced commit unless --force is given. To push to a new branch, use `git-sync stash` or `git-sync create-branch` first. When the remote has moved past the last sync, a plain export ends in a `conflict` task on 63+ and is refused with 400 on older servers. --merge (63+) folds the remote's changes in by a three-way merge (entities changed on both sides still end in `conflict`), --force overwrites them. `git-sync export-preflight` previews which applies. A task that ends in `conflict` makes the server count the remote commit it saw as synced, so a retry, --merge included, no longer sees the remote's changes: resolve a conflict with --force on the side to keep, or `git-sync create-branch` then export, never with a retry.",
|
|
15
|
+
requires: ["gitSync.export"],
|
|
16
|
+
args: {
|
|
17
|
+
...outputFlags,
|
|
18
|
+
...profileFlag,
|
|
19
|
+
...connectionFlags,
|
|
20
|
+
branch: {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "Branch to export to (defaults to the remote-sync-branch setting; on 63+ it must be that branch)",
|
|
23
|
+
alias: "b"
|
|
24
|
+
},
|
|
25
|
+
message: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Commit message",
|
|
28
|
+
alias: "m"
|
|
29
|
+
},
|
|
30
|
+
force: {
|
|
31
|
+
type: "boolean",
|
|
32
|
+
description: "Force-push / overwrite remote",
|
|
33
|
+
default: false
|
|
34
|
+
},
|
|
35
|
+
merge: {
|
|
36
|
+
type: "boolean",
|
|
37
|
+
description: "When the remote moved on, fold its changes in by a three-way merge instead of ending in conflict",
|
|
38
|
+
default: false
|
|
39
|
+
},
|
|
40
|
+
...gitSyncWaitFlags
|
|
41
|
+
},
|
|
42
|
+
outputSchema: SyncExportResult,
|
|
43
|
+
examples: [
|
|
44
|
+
"mb git-sync export -m \"update dashboards\"",
|
|
45
|
+
"mb git-sync export --merge -m \"update dashboards\"",
|
|
46
|
+
"mb git-sync export --branch main --json",
|
|
47
|
+
"mb git-sync export --no-wait"
|
|
48
|
+
],
|
|
49
|
+
async run({ args, ctx, getClient }) {
|
|
50
|
+
const wait = parseWaitFlags(args);
|
|
51
|
+
if (args.merge && args.force) throw new ConfigError("--merge cannot be combined with --force");
|
|
52
|
+
const branch = branchFlag(args.branch);
|
|
53
|
+
const params = {};
|
|
54
|
+
if (branch !== null) params.branch = branch;
|
|
55
|
+
if (args.message !== void 0 && args.message !== "") params.message = args.message;
|
|
56
|
+
if (args.force) params.force = true;
|
|
57
|
+
if (args.merge) params.merge = true;
|
|
58
|
+
if (wait.enabled) params.wait = taskPollOptions(wait.schedule);
|
|
59
|
+
const result = await (await getClient()).gitSync.export(params);
|
|
60
|
+
if (!wait.enabled) renderSummary(result, syncExportView, `Started export task #${result.task_id}.`, ctx);
|
|
61
|
+
else {
|
|
62
|
+
const final = result.final ?? null;
|
|
63
|
+
renderSummary(result, syncExportView, final === null ? `Export task #${result.task_id} finished.` : formatSyncTask(final), ctx);
|
|
64
|
+
throwIfFailedTask(final, "export");
|
|
65
|
+
}
|
|
66
|
+
emitRealignHint(ctx);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
function emitRealignHint(ctx) {
|
|
70
|
+
if (ctx.format !== "text") return;
|
|
71
|
+
warn("\nNote: if exporting to a host-bound repo, realign the host working tree with:\n git -C <repo-path> restore --staged --worktree .");
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { export_default as default };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { at as ConfigError, v as formatScalar, y as renderRows } from "./cli.mjs";
|
|
2
|
+
import { d as PivotExportFormat, u as ExportFormat } from "./card-Bv4ZN0oV.mjs";
|
|
3
|
+
import { t as parseEnumFlag } from "./parse-enum-CLIXMsd8.mjs";
|
|
4
|
+
//#region src/output/query-result.ts
|
|
5
|
+
function formatQueryResult(result) {
|
|
6
|
+
if (result.status !== "completed" || result.data === void 0) {
|
|
7
|
+
const detail = typeof result.error === "string" && result.error !== "" ? `: ${result.error}` : "";
|
|
8
|
+
return `Query ${result.status}${detail}`;
|
|
9
|
+
}
|
|
10
|
+
const head = result.data.cols.map((col) => col.display_name ?? col.name);
|
|
11
|
+
const rowCount = result.row_count ?? result.data.rows.length;
|
|
12
|
+
const summary = `${rowCount} row${rowCount === 1 ? "" : "s"}.`;
|
|
13
|
+
if (result.data.rows.length === 0) return summary;
|
|
14
|
+
return `${renderRows(head, result.data.rows.map((row) => Array.isArray(row) ? row.map((cell) => formatScalar(cell)) : [formatScalar(row)]))}\n${summary}`;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/commands/export-flags.ts
|
|
18
|
+
const PIVOT_FORMATS = PivotExportFormat.options.join(" or ");
|
|
19
|
+
const exportOnlyFlags = {
|
|
20
|
+
"format-rows": {
|
|
21
|
+
type: "boolean",
|
|
22
|
+
description: "Streamed exports only: format values as Metabase displays them, column settings included",
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
"pivot-results": {
|
|
26
|
+
type: "boolean",
|
|
27
|
+
description: `With --export-format ${PIVOT_FORMATS}: lay a pivot table's rows out as the pivot, with its subtotals; refused when the server has pivoted exports turned off`,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
"csv-include-bom": {
|
|
31
|
+
type: "boolean",
|
|
32
|
+
description: "With --export-format csv: open the file with a UTF-8 byte order mark, so Excel reads it as UTF-8",
|
|
33
|
+
default: false
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const exportFlags = {
|
|
37
|
+
"export-format": {
|
|
38
|
+
type: "string",
|
|
39
|
+
description: `Bypass the JSON envelope and stream the raw export: ${ExportFormat.options.join(" | ")}`
|
|
40
|
+
},
|
|
41
|
+
...exportOnlyFlags
|
|
42
|
+
};
|
|
43
|
+
function isExportOnlyFlag(flag) {
|
|
44
|
+
return flag in exportOnlyFlags;
|
|
45
|
+
}
|
|
46
|
+
const EXPORT_ONLY_FLAGS = Object.keys(exportOnlyFlags).filter(isExportOnlyFlag);
|
|
47
|
+
/**
|
|
48
|
+
* The export the flags ask for, or `null` when `--export-format` is absent. An export-only flag
|
|
49
|
+
* given without a format would be ignored silently, so it is refused.
|
|
50
|
+
*/
|
|
51
|
+
function readExportRequest(args) {
|
|
52
|
+
const raw = args["export-format"];
|
|
53
|
+
if (raw === void 0 || raw === "") {
|
|
54
|
+
const stray = EXPORT_ONLY_FLAGS.find((flag) => args[flag]);
|
|
55
|
+
if (stray !== void 0) throw new ConfigError(`--${stray} requires --export-format`);
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
const format = parseEnumFlag(raw, ExportFormat, "--export-format");
|
|
59
|
+
if (args["csv-include-bom"] && format !== "csv") throw new ConfigError("--csv-include-bom requires --export-format csv");
|
|
60
|
+
if (args["pivot-results"] && !PivotExportFormat.safeParse(format).success) throw new ConfigError(`--pivot-results requires --export-format ${PIVOT_FORMATS}`);
|
|
61
|
+
return {
|
|
62
|
+
format,
|
|
63
|
+
params: {
|
|
64
|
+
format_rows: args["format-rows"],
|
|
65
|
+
pivot_results: args["pivot-results"],
|
|
66
|
+
csv_include_bom: args["csv-include-bom"]
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A streamed export is the server's bytes, so a flag that shapes the JSON output would be ignored
|
|
72
|
+
* silently and is refused. `--json` and `--format` still pick the shape of an error report.
|
|
73
|
+
*/
|
|
74
|
+
function assertStreamedOutput(ctx) {
|
|
75
|
+
if (ctx.full) throw new ConfigError("--full cannot be combined with --export-format");
|
|
76
|
+
if (ctx.fields !== void 0) throw new ConfigError("--fields cannot be combined with --export-format");
|
|
77
|
+
if (ctx.maxBytesGiven) throw new ConfigError("--max-bytes cannot be combined with --export-format");
|
|
78
|
+
if (ctx.range.limit !== void 0) throw new ConfigError("--limit cannot be combined with --export-format");
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
export { formatQueryResult as i, exportFlags as n, readExportRequest as r, assertStreamedOutput as t };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { H as connectionFlags, J as profileFlag, p as renderSummary, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-CZ5zh32z.mjs";
|
|
3
|
+
import { i as SyncExportPreflight } from "./git-sync-COokpYgc.mjs";
|
|
4
|
+
import { i as syncExportPreflightView, t as formatExportPreflight } from "./git-sync-DspFahwV.mjs";
|
|
5
|
+
import { t as branchFlag } from "./branch-flag-pFQPNYKr.mjs";
|
|
6
|
+
//#region src/commands/git-sync/export-preflight.ts
|
|
7
|
+
var export_preflight_default = defineMetabaseCommand({
|
|
8
|
+
meta: {
|
|
9
|
+
name: "export-preflight",
|
|
10
|
+
description: "Preview what an export would do against the live remote branch, without writing"
|
|
11
|
+
},
|
|
12
|
+
details: "Compares the current Metabase content with the remote branch. `has_changes` says whether the remote has advanced past the last synced version (false when nothing has been synced yet, and after a task that ended in `conflict`, which the server counts as synced), `clean` whether a three-way merge would apply without conflicts, `conflicts` names the entities that would conflict, `summary` counts the remote changes a merge would fold in, `force_push_casualties` names the remote content a force push would discard (empty when nothing has been synced yet, although a forced export then replaces the remote's managed directories wholesale), and `reason` is `history-rewritten` when the remote was force-pushed or rebased so no merge base exists. The branch must be the one git-sync tracks; the server answers 409 otherwise.",
|
|
13
|
+
requires: ["gitSync.exportPreflight", "gitSync.trackedBranch"],
|
|
14
|
+
args: {
|
|
15
|
+
...outputFlags,
|
|
16
|
+
...profileFlag,
|
|
17
|
+
...connectionFlags,
|
|
18
|
+
branch: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "Branch to preview against (defaults to the remote-sync-branch setting; must be that branch)",
|
|
21
|
+
alias: "b"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
outputSchema: SyncExportPreflight,
|
|
25
|
+
examples: ["mb git-sync export-preflight", "mb git-sync export-preflight --branch main --json"],
|
|
26
|
+
async run({ args, ctx, getClient }) {
|
|
27
|
+
const given = branchFlag(args.branch);
|
|
28
|
+
const mb = await getClient();
|
|
29
|
+
const branch = given ?? await mb.gitSync.trackedBranch();
|
|
30
|
+
const result = await mb.gitSync.exportPreflight({ branch });
|
|
31
|
+
renderSummary(result, syncExportPreflightView, () => formatExportPreflight(branch, result), ctx);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { export_preflight_default as default };
|
|
@@ -187,6 +187,17 @@ const FieldCompact = Field.pick({
|
|
|
187
187
|
semantic_type: true,
|
|
188
188
|
fk_target_field_id: true
|
|
189
189
|
}).strip();
|
|
190
|
+
const FieldWithDataSensitivity = Field.extend({ data_sensitivity: FieldDataSensitivity.nullable() });
|
|
191
|
+
const FieldDetail = z.union([FieldWithDataSensitivity, Field]);
|
|
192
|
+
/** The shape `GET` and `PUT /api/field/{id}` answer on a server with `features`. */
|
|
193
|
+
function fieldDetailSchema(features) {
|
|
194
|
+
return features.fieldDataSensitivity ? FieldWithDataSensitivity : Field;
|
|
195
|
+
}
|
|
196
|
+
/** Whether `field` came from a server that labels data sensitivity. */
|
|
197
|
+
function hasDataSensitivity(field) {
|
|
198
|
+
return "data_sensitivity" in field && FieldWithDataSensitivity.shape.data_sensitivity.safeParse(field.data_sensitivity).success;
|
|
199
|
+
}
|
|
200
|
+
const FieldWithDataSensitivityCompact = FieldCompact.extend({ data_sensitivity: FieldDataSensitivity.nullable() }).strip();
|
|
190
201
|
const NonBlankNullable = z.string().min(1).nullable();
|
|
191
202
|
const FieldUpdateInput = z.object({
|
|
192
203
|
display_name: NonBlankNullable.optional(),
|
|
@@ -214,12 +225,31 @@ const FieldValuesCompact = FieldValues.pick({
|
|
|
214
225
|
field_id: true,
|
|
215
226
|
has_more_values: true
|
|
216
227
|
}).strip();
|
|
217
|
-
const FieldSearchMatches = z.array(z.
|
|
218
|
-
const
|
|
228
|
+
const FieldSearchMatches = z.array(z.union([z.tuple([z.unknown()]), z.tuple([z.unknown(), z.unknown()])]));
|
|
229
|
+
const FieldRemappedPair = z.tuple([z.unknown(), z.unknown()]);
|
|
230
|
+
const FieldRemappedSingle = z.tuple([z.unknown()]).transform(([value]) => [value, value]);
|
|
231
|
+
const FieldRemappedValue = z.union([FieldRemappedPair, FieldRemappedSingle]);
|
|
232
|
+
const FieldRemappedRowWireV59 = z.array(z.unknown()).min(1);
|
|
233
|
+
function firstTwoCells(row) {
|
|
234
|
+
const [value, second] = row;
|
|
235
|
+
return row.length === 1 ? [value, value] : [value, second];
|
|
236
|
+
}
|
|
237
|
+
function valueTwice(row) {
|
|
238
|
+
const [value] = row;
|
|
239
|
+
return [value, value];
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* The row `GET /api/field/{id}/remapping/{remapped-id}` answers on a server with `features`, read as
|
|
243
|
+
* `FieldRemappedValue`. `sameField` says the two ids name one field.
|
|
244
|
+
*/
|
|
245
|
+
function fieldRemappedValueSchema(features, sameField) {
|
|
246
|
+
if (!features.fieldRemappingAppendsDisplayColumns) return FieldRemappedValue;
|
|
247
|
+
return FieldRemappedRowWireV59.transform(sameField ? valueTwice : firstTwoCells);
|
|
248
|
+
}
|
|
219
249
|
const FieldSummary = z.object({
|
|
220
250
|
field_id: z.number().int(),
|
|
221
251
|
count: z.number().int(),
|
|
222
252
|
distincts: z.number().int()
|
|
223
253
|
});
|
|
224
254
|
//#endregion
|
|
225
|
-
export {
|
|
255
|
+
export { FieldDetail as a, FieldSummary as c, FieldValuesCompact as d, FieldWithDataSensitivity as f, hasDataSensitivity as g, fieldRemappedValueSchema as h, FieldDataSensitivity as i, FieldUpdateInput as l, fieldDetailSchema as m, FieldBaseType as n, FieldSearchMatches as o, FieldWithDataSensitivityCompact as p, FieldCompact as r, FieldSemanticType as s, Field as t, FieldValues as u };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { t as defineCommandGroup } from "./group-bpD_KcjA.mjs";
|
|
2
|
+
//#region src/commands/field/index.ts
|
|
3
|
+
var field_default = defineCommandGroup({
|
|
4
|
+
name: "field",
|
|
5
|
+
description: "Manage Metabase fields",
|
|
6
|
+
skills: [{
|
|
7
|
+
skill: "metadata",
|
|
8
|
+
purpose: "semantic types, FK targets, visibility, dropdown behavior"
|
|
9
|
+
}],
|
|
10
|
+
subCommands: {
|
|
11
|
+
get: () => import("./get-Bct52yPw.mjs").then((m) => m.default),
|
|
12
|
+
values: () => import("./values-PonkbYAK.mjs").then((m) => m.default),
|
|
13
|
+
summary: () => import("./summary-DKx6ptQe.mjs").then((m) => m.default),
|
|
14
|
+
update: () => import("./update-B28EJzrx.mjs").then((m) => m.default),
|
|
15
|
+
search: () => import("./search-CnTXKJgx.mjs").then((m) => m.default),
|
|
16
|
+
remapping: () => import("./remapping-CPAvDKHV.mjs").then((m) => m.default),
|
|
17
|
+
"set-sensitivity": () => import("./set-sensitivity-D39kGTob.mjs").then((m) => m.default)
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { field_default as default };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { c as FieldSummary, d as FieldValuesCompact, p as FieldWithDataSensitivityCompact, r as FieldCompact } from "./field-5nivEfd6.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/output/views/field.ts
|
|
4
|
+
function formatTypeTag(value) {
|
|
5
|
+
return typeof value === "string" ? value.replace(/^type\//, "") : "";
|
|
6
|
+
}
|
|
7
|
+
function formatFkTarget(value) {
|
|
8
|
+
return typeof value === "number" ? `field ${value}` : "";
|
|
9
|
+
}
|
|
10
|
+
const FIELD_COLUMNS = [
|
|
11
|
+
{
|
|
12
|
+
key: "id",
|
|
13
|
+
label: "ID"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
key: "name",
|
|
17
|
+
label: "Name"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
key: "display_name",
|
|
21
|
+
label: "Display Name"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: "base_type",
|
|
25
|
+
label: "Base Type",
|
|
26
|
+
format: formatTypeTag
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: "semantic_type",
|
|
30
|
+
label: "Semantic Type",
|
|
31
|
+
format: formatTypeTag
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
key: "fk_target_field_id",
|
|
35
|
+
label: "FK Target",
|
|
36
|
+
format: formatFkTarget
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: "description",
|
|
40
|
+
label: "Description"
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
const fieldView = {
|
|
44
|
+
compactPick: FieldCompact,
|
|
45
|
+
tableColumns: FIELD_COLUMNS
|
|
46
|
+
};
|
|
47
|
+
const fieldWithDataSensitivityView = {
|
|
48
|
+
compactPick: FieldWithDataSensitivityCompact,
|
|
49
|
+
tableColumns: [...FIELD_COLUMNS, {
|
|
50
|
+
key: "data_sensitivity",
|
|
51
|
+
label: "Sensitivity"
|
|
52
|
+
}]
|
|
53
|
+
};
|
|
54
|
+
const FieldValueLabel = z.object({
|
|
55
|
+
value: z.unknown(),
|
|
56
|
+
label: z.unknown()
|
|
57
|
+
});
|
|
58
|
+
function toValueLabel(row) {
|
|
59
|
+
const [value, label = null] = row;
|
|
60
|
+
return {
|
|
61
|
+
value,
|
|
62
|
+
label
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const VALUE_LABEL_COLUMNS = [{
|
|
66
|
+
key: "value",
|
|
67
|
+
label: "Value"
|
|
68
|
+
}, {
|
|
69
|
+
key: "label",
|
|
70
|
+
label: "Label"
|
|
71
|
+
}];
|
|
72
|
+
const fieldValueLabelView = {
|
|
73
|
+
compactPick: FieldValueLabel,
|
|
74
|
+
tableColumns: VALUE_LABEL_COLUMNS
|
|
75
|
+
};
|
|
76
|
+
const FieldRemappingMatch = z.object({
|
|
77
|
+
found: z.literal(true),
|
|
78
|
+
...FieldValueLabel.shape
|
|
79
|
+
});
|
|
80
|
+
const FieldRemappingMiss = z.object({ found: z.literal(false) });
|
|
81
|
+
const FieldRemappingResult = z.discriminatedUnion("found", [FieldRemappingMatch, FieldRemappingMiss]);
|
|
82
|
+
const fieldRemappingMatchView = {
|
|
83
|
+
compactPick: FieldRemappingMatch,
|
|
84
|
+
tableColumns: VALUE_LABEL_COLUMNS
|
|
85
|
+
};
|
|
86
|
+
const fieldRemappingMissView = {
|
|
87
|
+
compactPick: FieldRemappingMiss,
|
|
88
|
+
tableColumns: [{
|
|
89
|
+
key: "found",
|
|
90
|
+
label: "Found"
|
|
91
|
+
}]
|
|
92
|
+
};
|
|
93
|
+
const fieldValuesView = {
|
|
94
|
+
compactPick: FieldValuesCompact,
|
|
95
|
+
tableColumns: [
|
|
96
|
+
{
|
|
97
|
+
key: "field_id",
|
|
98
|
+
label: "Field"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: "has_more_values",
|
|
102
|
+
label: "Has More"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
key: "values",
|
|
106
|
+
label: "Values"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
const fieldSummaryView = {
|
|
111
|
+
compactPick: FieldSummary,
|
|
112
|
+
tableColumns: [
|
|
113
|
+
{
|
|
114
|
+
key: "field_id",
|
|
115
|
+
label: "Field"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
key: "count",
|
|
119
|
+
label: "Count"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
key: "distincts",
|
|
123
|
+
label: "Distinct"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
export { fieldSummaryView as a, fieldView as c, fieldRemappingMissView as i, fieldWithDataSensitivityView as l, FieldValueLabel as n, fieldValueLabelView as o, fieldRemappingMatchView as r, fieldValuesView as s, FieldRemappingResult as t, toValueLabel as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as defineMetabaseCommand } from "./runtime-
|
|
3
|
-
import { t as parseId } from "./parse-id-
|
|
4
|
-
import { n as windowList } from "./window-
|
|
5
|
-
import { r as FieldCompact } from "./field-
|
|
6
|
-
import {
|
|
1
|
+
import { G as listFlags, H as connectionFlags, J as profileFlag, X as listEnvelopeSchema, d as renderList, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-CZ5zh32z.mjs";
|
|
3
|
+
import { t as parseId } from "./parse-id-BW09NysN.mjs";
|
|
4
|
+
import { n as windowList } from "./window-CI_QD04s.mjs";
|
|
5
|
+
import { r as FieldCompact } from "./field-5nivEfd6.mjs";
|
|
6
|
+
import { c as fieldView } from "./field-wmN6raOG.mjs";
|
|
7
7
|
//#region src/commands/table/fields.ts
|
|
8
8
|
const FieldListEnvelope = listEnvelopeSchema(FieldCompact);
|
|
9
9
|
var fields_default = defineMetabaseCommand({
|