@metabase/cli 0.3.2-alpha.fix-transform-test-ee-path.8ac2a7a → 0.4.0-alpha.release-65-integration-branch.31ca6bb
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-B_-eMU_k.mjs → add-collection-B-Kczwcj.mjs} +5 -5
- package/dist/{alert-Dalin_DD.mjs → alert-Ne0ivd5m.mjs} +7 -7
- package/dist/{alerts-DpBgrjPI.mjs → alerts-Fakzg9iP.mjs} +6 -6
- package/dist/{append-C1JNVALm.mjs → append-DCDVqPmR.mjs} +4 -4
- package/dist/archive-55sDfnHf.mjs +32 -0
- package/dist/{archive-CdKf_Eqq.mjs → archive-BNJit8eD.mjs} +3 -3
- package/dist/{archive-DckxlWBt.mjs → archive-BbNqts-V.mjs} +3 -3
- package/dist/{archive-B51prFgS.mjs → archive-C93UR4Uc.mjs} +3 -3
- package/dist/{archive-CISXgZAI.mjs → archive-CGmvQht4.mjs} +5 -5
- package/dist/{archive-cAdUa1-2.mjs → archive-CL8wqAzm.mjs} +3 -3
- package/dist/{archive-DVHxeDKS.mjs → archive-CSdktxvW.mjs} +5 -5
- package/dist/{archive-CicPYX27.mjs → archive-CpCSY4RT.mjs} +5 -5
- package/dist/{archive-CwITzj_j.mjs → archive-DCCkQTjQ.mjs} +5 -5
- package/dist/{archive-BkITQyWW.mjs → archive-DCE087yD.mjs} +4 -4
- package/dist/{archive-DA3OiLEE.mjs → archive-DEef7eB8.mjs} +3 -3
- package/dist/{archive-52ZHbFDm2.mjs → archive-DIZu7o4C.mjs} +4 -4
- package/dist/{auth-A96JOCQx.mjs → auth-Bx4QQhqt.mjs} +5 -5
- package/dist/body-CB2eDFFb.mjs +17 -0
- package/dist/branch-flag-pFQPNYKr.mjs +9 -0
- package/dist/{branches-CbcwWYL9.mjs → branches-B6ilUG-7.mjs} +3 -3
- package/dist/breaking-Dg3-8yDF.mjs +36 -0
- package/dist/broken-BNBD4Eo3.mjs +37 -0
- package/dist/bulk-discard-values-DfKXuZpR.mjs +49 -0
- package/dist/bulk-edit-oUCfDQ_M.mjs +53 -0
- package/dist/bulk-rescan-values-B8pNlXUH.mjs +28 -0
- package/dist/bulk-sync-schema-tRp7jBJt.mjs +28 -0
- package/dist/{cancel-DpDcVY7M.mjs → cancel-Bl4BMkwI.mjs} +3 -3
- package/dist/{cancel-task-B4RDvIYb.mjs → cancel-task-CWWo7vLf.mjs} +4 -4
- package/dist/card-CQD4D8mw.mjs +25 -0
- package/dist/{card-CEkp1mcI.mjs → card-CQNUT9pm.mjs} +1 -1
- package/dist/{card-voh1k4hl.mjs → card-P5mBknsl.mjs} +3 -11
- package/dist/{cards-BC0JX8Yg.mjs → cards-BIUYdSIR.mjs} +6 -6
- package/dist/cli.mjs +420 -111
- package/dist/{client-ClL6gf7G.mjs → client-BHIFvEg2.mjs} +863 -316
- package/dist/{collection-DYM0p3Xl.mjs → collection-BG3Ksea-.mjs} +1 -1
- package/dist/collection-CuaTd10G.mjs +21 -0
- package/dist/{collection-BxdPxD38.mjs → collection-D3KXhvnc.mjs} +7 -5
- package/dist/{collection-namespace-Dv0l-V9K.mjs → collection-namespace-ZQePD67z.mjs} +2 -2
- package/dist/{content-translation-BXIXL4eW.mjs → content-translation-BRdNdAmn.mjs} +3 -3
- package/dist/copy-BMEaYmTb.mjs +55 -0
- package/dist/copy-CbDfVZRC.mjs +36 -0
- package/dist/copy-flags-anRhAvB5.mjs +32 -0
- package/dist/{create-Dhai9zAt.mjs → create-5cDaZcRL.mjs} +3 -3
- package/dist/{create-DWFJdyIr.mjs → create-BEN-2XFK.mjs} +3 -3
- package/dist/create-BJG630xB.mjs +48 -0
- package/dist/{create-NCKHHdov.mjs → create-BTQB1lqX.mjs} +4 -4
- package/dist/{create-kZIIEN2Y.mjs → create-C3TmU1Bi.mjs} +6 -6
- package/dist/create-C7O9tPL2.mjs +34 -0
- package/dist/{create-BVNhtAgF.mjs → create-C8hsOv_D.mjs} +6 -6
- package/dist/{create-D--Z1S3p2.mjs → create-CBSsW8Hm.mjs} +6 -6
- package/dist/{create-BcsVwXgS2.mjs → create-CG6WWY6k.mjs} +4 -4
- package/dist/{create--fiwuTWc.mjs → create-D2Shlb7t.mjs} +3 -3
- package/dist/{create-DmN2gFc4.mjs → create-DVEqry26.mjs} +4 -4
- package/dist/{create-YetX69Re.mjs → create-D_pNX7d0.mjs} +3 -3
- package/dist/{create-Za1EskpV.mjs → create-R0Q-nRlq.mjs} +4 -4
- package/dist/{create-Bryrkb9g.mjs → create-SqmOf6WQ.mjs} +6 -6
- package/dist/{create-branch-CseVn3lp.mjs → create-branch-Cb3CWojg.mjs} +4 -4
- package/dist/{create-BbjSOTN-.mjs → create-c2zR9y4J.mjs} +4 -4
- package/dist/{create-CHr8MPPq.mjs → create-xt4ff6fP.mjs} +3 -3
- package/dist/{create-B9qXQ_wV.mjs → create-zpJIRn9j.mjs} +5 -5
- package/dist/{csv-DNzesu8y.mjs → csv-CRNOhy4X.mjs} +4 -4
- package/dist/{current-task-DRTKZcP9.mjs → current-task-DFo1ZJ51.mjs} +4 -4
- package/dist/dashboard-D11YAa7I.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/data-action-BiHjjVjc.mjs +24 -0
- package/dist/data-action-DZxVB_hD.mjs +85 -0
- package/dist/data-action-R9qxJDPA.mjs +40 -0
- package/dist/database-BT7DVgSr.mjs +45 -0
- package/dist/{database-C3E9PZSx.mjs → database-Kq2AL5jH.mjs} +1 -1
- package/dist/dataset-BmvCxGoE.mjs +66 -0
- package/dist/{db-BDijt81U.mjs → db-C8lj73Dz.mjs} +7 -7
- package/dist/delete-09O7BTNw.mjs +44 -0
- package/dist/{delete-wFsy80db.mjs → delete-CYgNpHl7.mjs} +4 -4
- package/dist/{delete-BudvZkvK.mjs → delete-D_ZNoYVv.mjs} +4 -4
- package/dist/{delete--15it-A8.mjs → delete-HWeQtc4M.mjs} +4 -4
- package/dist/delete-I4eFpsed.mjs +44 -0
- package/dist/{delete-Dc8E5YwZ.mjs → delete-My8TX-B2.mjs} +4 -4
- package/dist/{delete-BxjJ66BS.mjs → delete-qwdN0N7e.mjs} +4 -4
- package/dist/delete-runtime-BbmRg_in.mjs +55 -0
- package/dist/{delete-table-5AQpn8OB.mjs → delete-table-BCvjX7bh.mjs} +4 -4
- package/dist/{dependencies-C1ogC3BV.mjs → dependencies-BAE4YPXX.mjs} +5 -5
- package/dist/dependency-CIam7zmr.mjs +15 -0
- package/dist/dependency-DzLH3J8P.mjs +165 -0
- package/dist/dependency-zElFM-os.mjs +111 -0
- package/dist/dependents-Dv6tLdSs.mjs +52 -0
- package/dist/{dirty-CSLDYO-K.mjs → dirty-CZORg0i0.mjs} +5 -5
- package/dist/discard-values-DKnP-JHr.mjs +55 -0
- package/dist/{document-CA0Q6lqu.mjs → document-C18b5rM6.mjs} +1 -1
- package/dist/{document-BHpLJbKU.mjs → document-DFCj1Az_.mjs} +2 -1
- package/dist/document-uxz96Lah.mjs +20 -0
- package/dist/{download-Ddap1OAo.mjs → download-BImtTll0.mjs} +2 -2
- package/dist/{eid-HnrWhPoe.mjs → eid-D0FxhT9H.mjs} +11 -10
- package/dist/entity-DWp9WJbU.mjs +20 -0
- package/dist/entry-flags-3sDWwa90.mjs +42 -0
- package/dist/{events-CXqetjcS.mjs → events-BzCjVA3-.mjs} +4 -4
- package/dist/execute-BhHbkBqf.mjs +45 -0
- package/dist/export-CjqjDnaZ.mjs +74 -0
- package/dist/export-flags-BETJHNcw.mjs +81 -0
- package/dist/export-preflight-DzvIP6TB.mjs +35 -0
- package/dist/{field-CcN4oZy6.mjs → field-5nivEfd6.mjs} +33 -3
- package/dist/field-fBpiGiqr.mjs +21 -0
- package/dist/field-wmN6raOG.mjs +128 -0
- package/dist/{fields-DxHxuxwO.mjs → fields-C-au1eLO.mjs} +6 -6
- package/dist/filter-flags-BIFcA2TT.mjs +72 -0
- package/dist/fks-83QIm8xb.mjs +36 -0
- package/dist/{get-CDnmpfHQ.mjs → get-BMHbEGbr.mjs} +4 -4
- package/dist/{get-BiPclcIP.mjs → get-BTCOzSkl.mjs} +3 -3
- package/dist/{get-DmKtPNOy.mjs → get-BawLhSwW.mjs} +3 -3
- package/dist/{get-BcoJ9Aha.mjs → get-BjqqFG2m.mjs} +3 -3
- package/dist/{get-C3cuZNeW.mjs → get-C-R_Fdsi.mjs} +3 -3
- package/dist/{get-H6kInHIx.mjs → get-C73V2KsB.mjs} +5 -5
- package/dist/{get-BGLvyOO3.mjs → get-C9sq2boy.mjs} +5 -5
- package/dist/{get-B2pj2q3X.mjs → get-Cggv6yLC.mjs} +4 -4
- package/dist/{get-CxUQyhte.mjs → get-CkXc0Xld.mjs} +5 -5
- package/dist/{get-BF2vdF3W.mjs → get-CqNEVAX_2.mjs} +3 -3
- package/dist/{get-Dtre5jzh.mjs → get-D7h7uH4k.mjs} +5 -5
- package/dist/get-DGmE5fmp.mjs +31 -0
- package/dist/{get-D_x-ENFe.mjs → get-DTTsPd-c.mjs} +5 -5
- package/dist/{get-DW7mCaGe.mjs → get-DXBXhPrU.mjs} +5 -5
- package/dist/{get-CE9_4Q7E.mjs → get-D_v1IAL1.mjs} +3 -3
- package/dist/{get-eJilYnHk.mjs → get-DkzO3G5p.mjs} +5 -5
- package/dist/{get-DjlQhgD4.mjs → get-Dvr_69L7.mjs} +3 -3
- package/dist/get-NOMvMvYJ.mjs +36 -0
- package/dist/{get-C_tdSMwW2.mjs → get-YPDWhgm_2.mjs} +4 -4
- package/dist/{get-b0CoPz5B.mjs → get-Z36_0HX_.mjs} +4 -4
- package/dist/{get-run-BE1HtJDW.mjs → get-run-v1QHn-Mx.mjs} +4 -4
- package/dist/{git-sync-BwBRmEhE.mjs → git-sync-COokpYgc.mjs} +12 -3
- package/dist/git-sync-DspFahwV.mjs +165 -0
- package/dist/git-sync-VAqASCQ5.mjs +29 -0
- package/dist/glossary-BlNCrYbw.mjs +30 -0
- package/dist/glossary-Brnk2PBi.mjs +14 -0
- package/dist/glossary-LmZWwCNP.mjs +21 -0
- package/dist/graph-B6OliqnW.mjs +34 -0
- package/dist/{group-YQQ5GIcP.mjs → group-bpD_KcjA.mjs} +1 -1
- package/dist/{has-remote-changes-Cj1KhBOT.mjs → has-remote-changes-iTRCU9j0.mjs} +4 -4
- package/dist/{import-DLb9VN4l.mjs → import-CdSs5CtT.mjs} +19 -8
- package/dist/{input-D5tQEfqN.mjs → input-D8qW-KtR.mjs} +6 -2
- package/dist/{is-dirty-BxtgV2xF.mjs → is-dirty-B5fj9NeS.mjs} +2 -2
- package/dist/{items-DLUYc5-z.mjs → items-BxWnNEh7.mjs} +8 -8
- package/dist/{key-PYetuQ13.mjs → key-BynJSK9u.mjs} +1 -1
- package/dist/{library-BNSxXOpc.mjs → library-BHHgurW0.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-cIMww2Me.mjs → list-BPMOLrwn.mjs} +5 -5
- package/dist/{list-jhQSgh6i.mjs → list-BTcEm4td.mjs} +3 -3
- package/dist/{list-M8J10Ozk.mjs → list-BTgAbqeS.mjs} +4 -4
- package/dist/{list-CERbeLbQ.mjs → list-Bop1NTbU.mjs} +6 -6
- package/dist/{list-BQnOEB3W.mjs → list-By9XJRiv.mjs} +3 -3
- package/dist/list-CNC-XHbN.mjs +35 -0
- package/dist/{list-CX9qZ-bx.mjs → list-CPWgBkPa.mjs} +4 -4
- package/dist/{list-C5mS_ehX.mjs → list-Cpa0Se7M.mjs} +5 -5
- package/dist/list-DA9KsA0o.mjs +101 -0
- package/dist/{list-Dat8QNcf.mjs → list-DE9gYY3I.mjs} +3 -3
- package/dist/{list-COLpwXW4.mjs → list-DFJt2-fY.mjs} +4 -4
- package/dist/{list-CBLxhaNZ.mjs → list-DUcnAb1h.mjs} +3 -3
- package/dist/{list-CehE6KBV.mjs → list-DW4-u7eO.mjs} +5 -5
- package/dist/{list-CQbiSx26.mjs → list-DbXnSL2x.mjs} +5 -5
- package/dist/list-DgsM9YQX.mjs +28 -0
- package/dist/{list-Sd7jGZoX.mjs → list-Dzzt6Yee.mjs} +3 -3
- package/dist/{list-BUz6KOfw.mjs → list-ZHLsjxXg.mjs} +6 -6
- package/dist/{list-CzRzCbCY.mjs → list-e7yvJYMw.mjs} +3 -3
- package/dist/{list-B1soS8QW.mjs → list-hN_Tu2T6.mjs} +6 -6
- package/dist/{list-BcP1DTJH.mjs → list-zyKxxNvn.mjs} +3 -3
- package/dist/{login-BfLqBfCd.mjs → login-B7nGQDZK.mjs} +6 -6
- package/dist/{logout-BpRXB3Ze.mjs → logout-pZffAh1G.mjs} +2 -2
- package/dist/{measure-Ds8O5Evr.mjs → measure-AtnrCTCC.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-DhrkLXoN.mjs → parameter-values-CxTkEjCs.mjs} +3 -3
- package/dist/{parse-enum-Dc0dMZ3P.mjs → parse-enum-CLIXMsd8.mjs} +1 -1
- package/dist/parse-id-7ja3HUdB.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-_GHFrTLx.mjs → path-DM4vyihl.mjs} +4 -4
- package/dist/{poll-KLl4Eq8Y.mjs → poll-Dz4tUm2f.mjs} +2 -2
- package/dist/{preflight-BpYtF0IU.mjs → preflight-DaZ2z2C1.mjs} +3 -3
- package/dist/{process-CLtOWKBn.mjs → process-D0HdqZ3r.mjs} +1 -1
- package/dist/{publish-D-7Zlmuk.mjs → publish-C0HCL04a.mjs} +4 -4
- package/dist/{pulse-x0gFxWfG.mjs → pulse-D1uh8UIU.mjs} +1 -1
- package/dist/{query-B1CZztxs.mjs → query-BC-C6efK.mjs} +14 -33
- package/dist/query-BKtMP5eH.mjs +13 -0
- package/dist/query-CAFPlqfi.mjs +329 -0
- package/dist/remapping-CgA6UJGU.mjs +53 -0
- package/dist/{remove-collection-C4saCFxz.mjs → remove-collection-DoctJa9g.mjs} +5 -5
- package/dist/{render-6O_eF-P1.mjs → render-Bvm9mta6.mjs} +2 -2
- package/dist/{replace-BuR4f2Ai.mjs → replace-CaFJd9fO.mjs} +4 -4
- package/dist/rescan-values-7VOGCLMe.mjs +32 -0
- package/dist/{rescan-values-CNOiiWQ5.mjs → rescan-values-sJRwcHsk.mjs} +5 -5
- package/dist/{run-DijA_BXt.mjs → run-COHDQ5J4.mjs} +3 -3
- package/dist/{run-QEUbWNm7.mjs → run-RXpFlDAB.mjs} +7 -7
- package/dist/{runs-BSlhVeDO.mjs → runs-CUYdCKiE.mjs} +5 -5
- package/dist/{runtime-Dtb93zKy.mjs → runtime-B8RtMb4B.mjs} +21 -82
- package/dist/{schema-tables-BE3rEb6I.mjs → schema-tables-CO5qyZBe.mjs} +6 -6
- package/dist/{schemas-yDjBiwlH.mjs → schemas-CzHHgDdF.mjs} +4 -4
- package/dist/search-BWb052_b.mjs +131 -0
- package/dist/search-Cc9vHNae.mjs +85 -0
- package/dist/{segment-Cm6zQjJW.mjs → segment-C_rsUkHK.mjs} +6 -6
- package/dist/{send-kC8oerkT.mjs → send-C-3bkpni.mjs} +3 -3
- package/dist/{set-tFhPkxrL.mjs → set-BDkT37OT.mjs} +4 -4
- package/dist/{set-active-lDKhAlij.mjs → set-active-CDJTfQEc.mjs} +3 -3
- package/dist/set-sensitivity-DVrINHde.mjs +57 -0
- package/dist/{setting-DrJXCaFE.mjs → setting-CoLzd08x.mjs} +4 -4
- package/dist/{setup-BWY9M0iR.mjs → setup-C4F4XYbU.mjs} +3 -3
- package/dist/{signal-Csom0mt5.mjs → signal-CxWeLszu.mjs} +1 -1
- package/dist/{skill-list-CCes8pKe.mjs → skill-list-BgihWuPf.mjs} +2 -2
- package/dist/{skills-DE9ej5Rg.mjs → skills-4qDjKRSk.mjs} +2 -2
- package/dist/{skills-DPRN2384.mjs → skills-BWEFRpUj.mjs} +3 -3
- package/dist/snippet-CYd8D9SK.mjs +19 -0
- package/dist/{stash-C9oDvQ9P.mjs → stash-CZ1x0rox.mjs} +6 -6
- package/dist/{status-DSdXmNC3.mjs → status-BM6eYW7I.mjs} +3 -3
- package/dist/{status-CkpujA26.mjs → status-gqpPZvue.mjs} +7 -7
- package/dist/{subscription-DKOKoHRG.mjs → subscription-pSuO241O.mjs} +6 -6
- package/dist/{subscriptions-C5SyJL4B.mjs → subscriptions-n5zJ9rYZ.mjs} +6 -6
- package/dist/{summary-DTPgXsc0.mjs → summary-DvIf2EiO.mjs} +5 -5
- package/dist/sync-schema-Cc21crxQ.mjs +32 -0
- package/dist/{sync-schema-DKKkNSR7.mjs → sync-schema-D1t8rhdQ.mjs} +6 -6
- package/dist/sync-task-CXFoqlpF.mjs +53 -0
- package/dist/{table-DfuY0N8e.mjs → table-Ci6bhZkb.mjs} +35 -12
- package/dist/table-CxvaDiIZ.mjs +155 -0
- package/dist/table-Dc0dLfyg.mjs +26 -0
- package/dist/table-selector-flags-BVZvnhUa.mjs +42 -0
- package/dist/text-DaNkPRwt.mjs +6 -0
- package/dist/timeline-BqU5sOb6.mjs +21 -0
- package/dist/{timeline-event-n4Lzet7l.mjs → timeline-event-jn1SOKd4.mjs} +6 -6
- package/dist/transform-BUIlFqpv.mjs +28 -0
- package/dist/{transform-CtqB1WYo.mjs → transform-CNBIV7No.mjs} +1 -1
- package/dist/transform-job-DsbY9mme.mjs +22 -0
- package/dist/{transform-tag-D6NXqWaX.mjs → transform-tag-C0jzV6Dk.mjs} +5 -5
- package/dist/{transforms-O4NtXqFz.mjs → transforms-DwTy_Quh.mjs} +5 -5
- package/dist/tree-p2j6IVy-.mjs +34 -0
- package/dist/{unpublish-DvWefKJi.mjs → unpublish-B-961jX1.mjs} +3 -3
- package/dist/unreferenced-Dxy-aYI7.mjs +36 -0
- package/dist/{update-DXmZuJho.mjs → update-BFYRBbRu.mjs} +6 -6
- package/dist/{update-xEegxIyH.mjs → update-BGeaPntx.mjs} +5 -5
- package/dist/{update-Bah7N8QX.mjs → update-BnIEN390.mjs} +5 -5
- package/dist/{update-To6A1Ugu.mjs → update-CALlEgIC.mjs} +4 -4
- package/dist/{update-76nzOc71.mjs → update-CHkVN69L.mjs} +13 -8
- package/dist/{update-AJ2JmwDl.mjs → update-CKqL9PmU.mjs} +5 -5
- package/dist/{update-DmgRIp7o.mjs → update-CYGYUCFQ.mjs} +4 -4
- package/dist/update-CuQy2g51.mjs +52 -0
- package/dist/{update-DOdcflLH.mjs → update-D4TGE6FS.mjs} +7 -7
- package/dist/{update-H_fdjugs.mjs → update-D7xi-0bU.mjs} +4 -4
- package/dist/{update-2KIpYgyj.mjs → update-DK77vtFF.mjs} +6 -6
- package/dist/{update-7oKvP1HC.mjs → update-DKDQTlnV.mjs} +5 -5
- package/dist/update-DXxJHC8y.mjs +41 -0
- package/dist/update-DiJK0uRG.mjs +181 -0
- package/dist/{update-CGJvIS-l.mjs → update-MD1Kwq1P.mjs} +4 -4
- package/dist/{update-dashcard-DjT5QOkL.mjs → update-dashcard-DuTjOh14.mjs} +6 -6
- package/dist/{update-D7dG7H-z.mjs → update-hvO4VpfZ.mjs} +7 -7
- package/dist/{update-DV54H3L5.mjs → update-qDZvnwvf.mjs} +7 -7
- package/dist/{update-BB6Go_RX.mjs → update-tltXCUwR.mjs} +4 -4
- package/dist/{upgrade-CuJx9fX4.mjs → upgrade-Ca-Ss5jb.mjs} +4 -4
- package/dist/{upload-DOO94rCQ.mjs → upload-C2fhpKkP.mjs} +2 -2
- package/dist/upload-Dw7mVr9u.mjs +13 -0
- package/dist/{upload-CboARPZm.mjs → upload-t6dkccqn.mjs} +3 -3
- package/dist/{uuid-InwZlrpQ.mjs → uuid-BMlJZT8z.mjs} +2 -2
- package/dist/{validate-D6-Vg_kn.mjs → validate-D7e110oU.mjs} +1 -1
- package/dist/{validate-query-B90KYPQr.mjs → validate-query-BzbZmenf.mjs} +7 -3
- package/dist/{values-CsZLk1Ls.mjs → values-CXN4xTTh.mjs} +5 -5
- package/dist/verify-CPVfwKSu.mjs +38 -0
- package/dist/verify-flags-CMpRkMPa.mjs +58 -0
- package/dist/verify-k-JB-k3D.mjs +38 -0
- package/dist/{verify-DrGjZwBM.mjs → verify-t-CEmvoG.mjs} +3 -3
- package/dist/{wait-BmzdarP9.mjs → wait-KSkq7kKW.mjs} +6 -6
- package/dist/{wait-flags-CiJGrTCT.mjs → wait-flags-KX7NHdj4.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 +24 -23
- package/skill-data/dashboard/SKILL.md +1 -1
- package/skill-data/data-action/SKILL.md +125 -0
- 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/skill-data/native-sql/SKILL.md +1 -1
- package/skill-data/transform/SKILL.md +1 -63
- package/dist/body-CshgcV6U.mjs +0 -17
- package/dist/card-CefVYtF7.mjs +0 -24
- package/dist/collection-Be5AHVWP.mjs +0 -20
- package/dist/create-DiJ8bUb-.mjs +0 -34
- package/dist/dashboard-CMw13KXM.mjs +0 -33
- package/dist/database-JtHTqSpq.mjs +0 -26
- package/dist/delete-Bsdwqh7H.mjs +0 -44
- package/dist/delete-runtime-BKEzJn22.mjs +0 -49
- package/dist/document-BGzVip5_.mjs +0 -19
- package/dist/export-IFZdgYZ2.mjs +0 -63
- package/dist/field-BJ6HoLRd.mjs +0 -18
- package/dist/field-fDtIrY6D.mjs +0 -80
- package/dist/get-i0KInCw9.mjs +0 -32
- package/dist/get-jofVjU6e.mjs +0 -31
- package/dist/git-sync-TjX1r_wF.mjs +0 -136
- package/dist/git-sync-xKC1sqC4.mjs +0 -28
- package/dist/list-Cuhf2lKL.mjs +0 -35
- package/dist/list-D-SyhKFw.mjs +0 -34
- package/dist/parse-id-DtM6q9HU.mjs +0 -10
- package/dist/query-CxESKMve.mjs +0 -114
- package/dist/query-result-E4Q-Gra6.mjs +0 -15
- package/dist/run-FmRruANb.mjs +0 -64
- package/dist/search-CR_xNArA.mjs +0 -97
- package/dist/selectors-C-vgMcGK.mjs +0 -35
- package/dist/snippet-DWHTSo9c.mjs +0 -19
- package/dist/sync-task-BtDnTXCP.mjs +0 -38
- package/dist/table-C6h4tIRw.mjs +0 -37
- package/dist/table-I8NXSdUC.mjs +0 -18
- package/dist/timeline-B_ESH-6W.mjs +0 -21
- package/dist/transform-BNuNiH9d.mjs +0 -28
- package/dist/transform-job-B7yc6dfH.mjs +0 -22
- package/dist/transform-test-BjjCQ2xm.mjs +0 -169
- package/dist/transform-test-C1Oqtfb-.mjs +0 -16
- package/dist/transform-test-gzDcbypy.mjs +0 -25
- package/dist/transport-CyVo29u7.mjs +0 -313
- package/dist/tree-CuyF116R.mjs +0 -26
- package/dist/update-l3PyNQKG.mjs +0 -41
- package/dist/upload-2YFFBSln.mjs +0 -13
- package/skill-data/transform-test-plan/SKILL.md +0 -171
- package/skill-data/transform-test-plan/references/checklist.md +0 -81
- package/skill-data/transform-test-plan/references/checks.md +0 -263
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { tt as parseInteger } from "./runtime-B8RtMb4B.mjs";
|
|
2
|
+
//#region src/commands/parse-id.ts
|
|
3
|
+
function parseId(value, name = "id") {
|
|
4
|
+
return parseInteger(value, {
|
|
5
|
+
name,
|
|
6
|
+
min: 1
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function parseIdCsv(raw, name) {
|
|
10
|
+
return raw.split(",").map((part) => parseId(part, name));
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { parseIdCsv as n, parseId as t };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { S as isBlank, at as ConfigError } from "./cli.mjs";
|
|
2
|
+
//#region src/commands/parse-text.ts
|
|
3
|
+
function parseText(value, name) {
|
|
4
|
+
if (isBlank(value)) throw new ConfigError(`invalid ${name}: must not be blank`);
|
|
5
|
+
return value;
|
|
6
|
+
}
|
|
7
|
+
function parseOptionalText(value, name) {
|
|
8
|
+
return value === void 0 ? void 0 : parseText(value, name);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { parseText as n, parseOptionalText as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as defineMetabaseCommand } from "./runtime-
|
|
3
|
-
import { n as windowList } from "./window-
|
|
4
|
-
import { i as loadVisibleSkills, n as findSkillByName, r as loadAllSkills } from "./skills-
|
|
1
|
+
import { G as listFlags, X as listEnvelopeSchema, d as renderList, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-B8RtMb4B.mjs";
|
|
3
|
+
import { n as windowList } from "./window-CI_QD04s.mjs";
|
|
4
|
+
import { i as loadVisibleSkills, n as findSkillByName, r as loadAllSkills } from "./skills-4qDjKRSk.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/commands/skills/path.ts
|
|
7
7
|
const SkillPath = z.object({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as throwIfAborted, t as combineAborts } from "./signal-
|
|
1
|
+
import { ut as TimeoutError } from "./cli.mjs";
|
|
2
|
+
import { n as throwIfAborted, t as combineAborts } from "./signal-CxWeLszu.mjs";
|
|
3
3
|
import { setTimeout } from "node:timers/promises";
|
|
4
4
|
//#region ../client/src/poll.ts
|
|
5
5
|
const DEFAULT_INTERVAL_MS = 2e3;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./validate-
|
|
1
|
+
import { at as ConfigError, h as writeJson, st as MetabaseError } from "./cli.mjs";
|
|
2
|
+
import { F as chainRequestFailure } from "./runtime-B8RtMb4B.mjs";
|
|
3
|
+
import "./validate-D7e110oU.mjs";
|
|
4
4
|
//#region src/commands/dashboard/preflight.ts
|
|
5
5
|
async function preflightDashcardCardReferences(client, dashcards) {
|
|
6
6
|
const issues = await client.dashboard.checkCardReferences(dashcards);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as defineMetabaseCommand } from "./runtime-
|
|
3
|
-
import { a as CollectionCompact, r as Collection } from "./collection-
|
|
4
|
-
import {
|
|
1
|
+
import { H as connectionFlags, J as profileFlag, k as warn, p as renderSummary, pt as errorMessage, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-B8RtMb4B.mjs";
|
|
3
|
+
import { a as CollectionCompact, r as Collection } from "./collection-D3KXhvnc.mjs";
|
|
4
|
+
import { i as tableSelectorFlags, n as parseTableSelectors } from "./table-selector-flags-BVZvnhUa.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/commands/git-sync/sync-scope.ts
|
|
7
7
|
function isOutsideSyncScope(collection) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { H as
|
|
2
|
-
import {
|
|
3
|
-
import { t as parseId } from "./parse-id-
|
|
4
|
-
import { a as CardQueryResult
|
|
5
|
-
import { t as cardQueryView } from "./card-
|
|
6
|
-
import {
|
|
1
|
+
import { H as connectionFlags, J as profileFlag, p as renderSummary, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { R as parseJson, nt as parseOptionalInteger, t as defineMetabaseCommand } from "./runtime-B8RtMb4B.mjs";
|
|
3
|
+
import { t as parseId } from "./parse-id-7ja3HUdB.mjs";
|
|
4
|
+
import { a as CardQueryResult } from "./card-P5mBknsl.mjs";
|
|
5
|
+
import { t as cardQueryView } from "./card-CQNUT9pm.mjs";
|
|
6
|
+
import { i as formatQueryResult, n as exportFlags, r as readExportRequest, t as assertStreamedOutput } from "./export-flags-BETJHNcw.mjs";
|
|
7
7
|
import { t as pipeToStdout } from "./stream-McixcoUl.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
//#region src/commands/card/query.ts
|
|
@@ -23,27 +23,14 @@ var query_default = defineMetabaseCommand({
|
|
|
23
23
|
description: "Card id",
|
|
24
24
|
required: true
|
|
25
25
|
},
|
|
26
|
-
|
|
27
|
-
type: "string",
|
|
28
|
-
description: `Bypass JSON envelope and stream raw export: ${ExportFormat.options.join(" | ")}`
|
|
29
|
-
},
|
|
26
|
+
...exportFlags,
|
|
30
27
|
parameters: {
|
|
31
28
|
type: "string",
|
|
32
29
|
description: "JSON array of Metabase parameter objects to pass with the query"
|
|
33
30
|
},
|
|
34
31
|
limit: {
|
|
35
32
|
type: "string",
|
|
36
|
-
description: "Cap rows kept in the JSON envelope
|
|
37
|
-
},
|
|
38
|
-
"format-rows": {
|
|
39
|
-
type: "boolean",
|
|
40
|
-
description: "Streamed exports only: apply visualization-settings formatting to values (default false)",
|
|
41
|
-
default: false
|
|
42
|
-
},
|
|
43
|
-
"pivot-results": {
|
|
44
|
-
type: "boolean",
|
|
45
|
-
description: "Streamed exports only: emit the pivoted output for pivot questions (default false)",
|
|
46
|
-
default: false
|
|
33
|
+
description: "Cap rows kept in the JSON envelope; refused with --export-format"
|
|
47
34
|
}
|
|
48
35
|
},
|
|
49
36
|
outputSchema: CardQueryResult,
|
|
@@ -56,17 +43,16 @@ var query_default = defineMetabaseCommand({
|
|
|
56
43
|
async run({ args, ctx, getClient }) {
|
|
57
44
|
const id = parseId(args.id);
|
|
58
45
|
const parameters = parseParameters(args.parameters);
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
await pipeToStdout(await
|
|
46
|
+
const exportRequest = readExportRequest(args);
|
|
47
|
+
if (exportRequest !== null) {
|
|
48
|
+
assertStreamedOutput(ctx);
|
|
49
|
+
await pipeToStdout(await (await getClient()).card.exportQuery(id, exportRequest.format, {
|
|
63
50
|
parameters,
|
|
64
|
-
|
|
65
|
-
pivot_results: args["pivot-results"]
|
|
51
|
+
...exportRequest.params
|
|
66
52
|
}));
|
|
67
53
|
return;
|
|
68
54
|
}
|
|
69
|
-
const limited = applyLimit(await
|
|
55
|
+
const limited = applyLimit(await (await getClient()).card.query(id, { parameters }), parseOptionalInteger(args.limit, {
|
|
70
56
|
name: "--limit",
|
|
71
57
|
min: 1
|
|
72
58
|
}));
|
|
@@ -77,11 +63,6 @@ function parseParameters(raw) {
|
|
|
77
63
|
if (raw === void 0 || raw === "") return [];
|
|
78
64
|
return parseJson(raw, QueryParameters, { source: "--parameters" });
|
|
79
65
|
}
|
|
80
|
-
function parseExportFormat(raw) {
|
|
81
|
-
const result = ExportFormat.safeParse(raw);
|
|
82
|
-
if (!result.success) throw new ConfigError(`invalid --export-format: "${raw}" (expected: ${ExportFormat.options.join(", ")})`);
|
|
83
|
-
return result.data;
|
|
84
|
-
}
|
|
85
66
|
function applyLimit(result, limit) {
|
|
86
67
|
if (limit === null || result.data === void 0 || result.data.rows.length <= limit) return result;
|
|
87
68
|
return {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region ../client/src/domain/query.ts
|
|
3
|
+
const DatasetQuery = z.object({}).loose().refine((value) => "lib/type" in value || "type" in value, { message: "dataset_query must include \"lib/type\" (MBQL 5) or \"type\" (legacy MBQL/native); empty `{}` is rejected" }).describe("MBQL 5, legacy MBQL, or native query");
|
|
4
|
+
const ExportFormat = z.enum([
|
|
5
|
+
"csv",
|
|
6
|
+
"json",
|
|
7
|
+
"xlsx"
|
|
8
|
+
]);
|
|
9
|
+
const PivotExportFormat = ExportFormat.exclude(["json"]);
|
|
10
|
+
const VisualizationSettings = z.record(z.string(), z.unknown());
|
|
11
|
+
const SortDirection = z.enum(["asc", "desc"]);
|
|
12
|
+
//#endregion
|
|
13
|
+
export { VisualizationSettings as a, SortDirection as i, ExportFormat as n, PivotExportFormat as r, DatasetQuery as t };
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import { H as connectionFlags, J as profileFlag, _ as MALFORMED_CELL, at as ConfigError, h as writeJson, m as serializeJson, p as renderSummary, q as outputFlags, u as renderItem } from "./cli.mjs";
|
|
2
|
+
import { F as chainRequestFailure, P as HttpError, R as parseJson, t as defineMetabaseCommand } from "./runtime-B8RtMb4B.mjs";
|
|
3
|
+
import { t as readBody } from "./body-CB2eDFFb.mjs";
|
|
4
|
+
import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
|
|
5
|
+
import { t as Field } from "./field-5nivEfd6.mjs";
|
|
6
|
+
import { a as VisualizationSettings, t as DatasetQuery } from "./query-BKtMP5eH.mjs";
|
|
7
|
+
import { a as CardQueryResult } from "./card-P5mBknsl.mjs";
|
|
8
|
+
import { p as TableQueryMetadata } from "./table-Ci6bhZkb.mjs";
|
|
9
|
+
import { t as Database } from "./database-BT7DVgSr.mjs";
|
|
10
|
+
import { t as Snippet } from "./snippet-CyKAgIZl.mjs";
|
|
11
|
+
import { a as VirtualTable, i as QueryMetadataCompact, n as CompiledQueryCompact, r as QueryMetadata, t as CompiledQuery } from "./dataset-BmvCxGoE.mjs";
|
|
12
|
+
import { t as cardQueryView } from "./card-CQNUT9pm.mjs";
|
|
13
|
+
import { a as validateQuery, i as isMbql5Query, n as assertNotLegacyEnvelopeWrappingMbql5, r as getQuerySchemaBundle, t as ValidationOutcome } from "./validate-D7e110oU.mjs";
|
|
14
|
+
import { s as skipValidateFlag } from "./validate-query-BzbZmenf.mjs";
|
|
15
|
+
import { i as formatQueryResult, n as exportFlags, r as readExportRequest, t as assertStreamedOutput } from "./export-flags-BETJHNcw.mjs";
|
|
16
|
+
import { t as pipeToStdout } from "./stream-McixcoUl.mjs";
|
|
17
|
+
import { z } from "zod";
|
|
18
|
+
//#region src/output/views/dataset.ts
|
|
19
|
+
const DatabaseNames = z.array(Database.pick({ name: true }));
|
|
20
|
+
const TableNames = z.array(z.union([TableQueryMetadata.pick({ display_name: true }), VirtualTable.pick({ display_name: true })]));
|
|
21
|
+
const FieldNames = z.array(Field.pick({ display_name: true }));
|
|
22
|
+
const SnippetNames = z.array(Snippet.pick({ name: true }));
|
|
23
|
+
function joinLabels(schema, label) {
|
|
24
|
+
return (value) => {
|
|
25
|
+
const parsed = schema.safeParse(value);
|
|
26
|
+
return parsed.success ? parsed.data.map(label).join(", ") : MALFORMED_CELL;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const compiledQueryView = {
|
|
30
|
+
compactPick: CompiledQueryCompact,
|
|
31
|
+
tableColumns: [
|
|
32
|
+
{
|
|
33
|
+
key: "query",
|
|
34
|
+
label: "Query"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
key: "params",
|
|
38
|
+
label: "Params"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: "collection",
|
|
42
|
+
label: "Collection"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
};
|
|
46
|
+
const queryMetadataView = {
|
|
47
|
+
compactPick: QueryMetadataCompact,
|
|
48
|
+
tableColumns: [
|
|
49
|
+
{
|
|
50
|
+
key: "databases",
|
|
51
|
+
label: "Databases",
|
|
52
|
+
format: joinLabels(DatabaseNames, (database) => database.name)
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
key: "tables",
|
|
56
|
+
label: "Tables",
|
|
57
|
+
format: joinLabels(TableNames, (table) => table.display_name)
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: "fields",
|
|
61
|
+
label: "Fields",
|
|
62
|
+
format: joinLabels(FieldNames, (field) => field.display_name)
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: "snippets",
|
|
66
|
+
label: "Snippets",
|
|
67
|
+
format: joinLabels(SnippetNames, (snippet) => snippet.name)
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/commands/query-mode.ts
|
|
73
|
+
const queryModeFlags = {
|
|
74
|
+
"dry-run": {
|
|
75
|
+
type: "boolean",
|
|
76
|
+
description: "Check the body and compile it on the server to native SQL without running it; prints {ok, errors, sql}"
|
|
77
|
+
},
|
|
78
|
+
compile: {
|
|
79
|
+
type: "boolean",
|
|
80
|
+
description: "Print the native query the server compiles the body to, instead of running it"
|
|
81
|
+
},
|
|
82
|
+
metadata: {
|
|
83
|
+
type: "boolean",
|
|
84
|
+
description: "Print the databases, tables, fields and snippets the body references, instead of running it"
|
|
85
|
+
},
|
|
86
|
+
pretty: {
|
|
87
|
+
type: "boolean",
|
|
88
|
+
description: "With --compile: format the native query for reading, as the server does by default; --no-pretty compiles to one line"
|
|
89
|
+
},
|
|
90
|
+
...exportFlags,
|
|
91
|
+
"visualization-settings": {
|
|
92
|
+
type: "string",
|
|
93
|
+
description: "With --export-format: JSON object of visualization settings; column settings shape --format-rows, pivot_table.column_split the --pivot-results layout"
|
|
94
|
+
},
|
|
95
|
+
"print-schema": {
|
|
96
|
+
type: "boolean",
|
|
97
|
+
description: "Emit the bundled MBQL 5 query JSON Schema and exit; no body required"
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const COLUMN_SPLIT_KEY = "pivot_table.column_split";
|
|
101
|
+
const PIVOT_NEEDS_SPLIT = `--pivot-results requires --visualization-settings with ${COLUMN_SPLIT_KEY}`;
|
|
102
|
+
function resolveQueryMode(args) {
|
|
103
|
+
const exportRequest = readExportRequest(args);
|
|
104
|
+
const visualizationSettings = readVisualizationSettings(args, exportRequest);
|
|
105
|
+
const selected = [];
|
|
106
|
+
if (args["print-schema"] === true) selected.push({
|
|
107
|
+
flag: "--print-schema",
|
|
108
|
+
mode: { kind: "print-schema" }
|
|
109
|
+
});
|
|
110
|
+
if (args["dry-run"] === true) selected.push({
|
|
111
|
+
flag: "--dry-run",
|
|
112
|
+
mode: { kind: "dry-run" }
|
|
113
|
+
});
|
|
114
|
+
if (args.compile === true) selected.push({
|
|
115
|
+
flag: "--compile",
|
|
116
|
+
mode: {
|
|
117
|
+
kind: "compile",
|
|
118
|
+
pretty: args.pretty
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
if (args.metadata === true) selected.push({
|
|
122
|
+
flag: "--metadata",
|
|
123
|
+
mode: { kind: "metadata" }
|
|
124
|
+
});
|
|
125
|
+
if (exportRequest !== null) {
|
|
126
|
+
const params = {
|
|
127
|
+
...exportRequest.params,
|
|
128
|
+
visualization_settings: visualizationSettings
|
|
129
|
+
};
|
|
130
|
+
selected.push({
|
|
131
|
+
flag: "--export-format",
|
|
132
|
+
mode: {
|
|
133
|
+
kind: "export",
|
|
134
|
+
format: exportRequest.format,
|
|
135
|
+
params
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
const [first, ...rest] = selected;
|
|
140
|
+
if (first === void 0) {
|
|
141
|
+
assertPrettyLeftAlone(args, { kind: "run" });
|
|
142
|
+
return { kind: "run" };
|
|
143
|
+
}
|
|
144
|
+
if (rest.length > 0) {
|
|
145
|
+
const others = rest.map((entry) => entry.flag).join(", ");
|
|
146
|
+
throw new ConfigError(`${first.flag} cannot be combined with ${others}`);
|
|
147
|
+
}
|
|
148
|
+
assertPrettyLeftAlone(args, first.mode);
|
|
149
|
+
return first.mode;
|
|
150
|
+
}
|
|
151
|
+
function assertPrettyLeftAlone(args, mode) {
|
|
152
|
+
if (args.pretty === void 0 || mode.kind === "compile") return;
|
|
153
|
+
throw new ConfigError(`${args.pretty ? "--pretty" : "--no-pretty"} requires --compile`);
|
|
154
|
+
}
|
|
155
|
+
function readVisualizationSettings(args, exportRequest) {
|
|
156
|
+
const raw = args["visualization-settings"];
|
|
157
|
+
const given = raw !== void 0 && raw !== "";
|
|
158
|
+
if (exportRequest === null) {
|
|
159
|
+
if (given) throw new ConfigError("--visualization-settings requires --export-format");
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (!given) {
|
|
163
|
+
if (exportRequest.params.pivot_results) throw new ConfigError(PIVOT_NEEDS_SPLIT);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const settings = parseJson(raw, VisualizationSettings, { source: "--visualization-settings" });
|
|
167
|
+
if (exportRequest.params.pivot_results && !hasColumnSplit(settings)) throw new ConfigError(PIVOT_NEEDS_SPLIT);
|
|
168
|
+
return settings;
|
|
169
|
+
}
|
|
170
|
+
function hasColumnSplit(settings) {
|
|
171
|
+
const split = settings[COLUMN_SPLIT_KEY];
|
|
172
|
+
return typeof split === "object" && split !== null;
|
|
173
|
+
}
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/commands/query.ts
|
|
176
|
+
const QueryBody = z.unknown().describe("The query body: {\"lib/type\": \"mbql/query\", database, stages}; full schema: mb query --print-schema");
|
|
177
|
+
const QueryDryRunOutcome = ValidationOutcome.extend({ sql: z.string().nullable().describe("The compiled native query; null when it did not compile") });
|
|
178
|
+
const QueryOutput = z.union([
|
|
179
|
+
CardQueryResult,
|
|
180
|
+
QueryDryRunOutcome,
|
|
181
|
+
CompiledQuery,
|
|
182
|
+
QueryMetadata
|
|
183
|
+
]);
|
|
184
|
+
const COMPILE_REJECTION_STATUSES = /* @__PURE__ */ new Set([400, 500]);
|
|
185
|
+
const FORBIDDEN_STATUS = 403;
|
|
186
|
+
const WHOLE_QUERY_POINTER = "";
|
|
187
|
+
const VALIDATION_HINT = " — fix them, or pass --skip-validate to send anyway";
|
|
188
|
+
var query_default = defineMetabaseCommand({
|
|
189
|
+
meta: {
|
|
190
|
+
name: "query",
|
|
191
|
+
description: "Run, compile, or inspect an ad-hoc MBQL or native query"
|
|
192
|
+
},
|
|
193
|
+
details: "Reads a JSON query body from --body, --file, or stdin and runs it. MBQL 5 is Metabase's structured query format, shaped {\"lib/type\": \"mbql/query\", \"database\": <database id>, \"stages\": [{\"lib/type\": \"mbql.stage/mbql\", \"source-table\": <table id>, \"aggregation\": [[\"count\", {}]]}]} with ids from `mb database list` and `mb table list`; it is checked against a bundled JSON Schema before sending, and --print-schema prints that schema. --dry-run checks the body without running it: the local schema check, then the server compiles it to native SQL without touching the warehouse. It prints {ok, errors:[{path, message}], sql} and exits 0 when the query compiled, 2 when either check rejected it. Legacy MBQL 4 and legacy native bodies skip the local check. --compile prints the native query the server compiles the body to, --metadata the databases, tables, fields and snippets the body touches, and --export-format streams the rows as csv, json or xlsx; the three are mutually exclusive with each other, with --dry-run and with --print-schema. An export takes its column formatting and pivot layout from --visualization-settings, since an ad-hoc query has no card to read them from: --pivot-results needs their pivot_table.column_split.",
|
|
194
|
+
skills: [{
|
|
195
|
+
skill: "mbql",
|
|
196
|
+
purpose: "body shape, clause rules, and the dry-run loop"
|
|
197
|
+
}],
|
|
198
|
+
requires: [
|
|
199
|
+
"dataset.exportQuery",
|
|
200
|
+
"dataset.native",
|
|
201
|
+
"dataset.query",
|
|
202
|
+
"dataset.queryMetadata"
|
|
203
|
+
],
|
|
204
|
+
args: {
|
|
205
|
+
...outputFlags,
|
|
206
|
+
...profileFlag,
|
|
207
|
+
...connectionFlags,
|
|
208
|
+
...bodyInputFlags,
|
|
209
|
+
...queryModeFlags,
|
|
210
|
+
...skipValidateFlag
|
|
211
|
+
},
|
|
212
|
+
inputSchema: QueryBody,
|
|
213
|
+
outputSchema: QueryOutput,
|
|
214
|
+
examples: [
|
|
215
|
+
"mb query --print-schema",
|
|
216
|
+
"cat q.json | mb query --dry-run",
|
|
217
|
+
"mb query --file q.json",
|
|
218
|
+
"mb query --file q.json --compile",
|
|
219
|
+
"mb query --file q.json --metadata --json",
|
|
220
|
+
"mb query --file q.json --export-format csv > rows.csv",
|
|
221
|
+
"mb query --file q.json --skip-validate"
|
|
222
|
+
],
|
|
223
|
+
async run({ args, ctx, getClient }) {
|
|
224
|
+
const mode = resolveQueryMode(args);
|
|
225
|
+
if (mode.kind === "print-schema") {
|
|
226
|
+
writeJson(getQuerySchemaBundle());
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const skip = args["skip-validate"] === true;
|
|
230
|
+
if (mode.kind === "dry-run" && skip) throw new ConfigError("--skip-validate cannot be combined with --dry-run");
|
|
231
|
+
if (mode.kind === "export") assertStreamedOutput(ctx);
|
|
232
|
+
const sources = {
|
|
233
|
+
flag: args.body,
|
|
234
|
+
file: args.file
|
|
235
|
+
};
|
|
236
|
+
if (mode.kind === "dry-run") {
|
|
237
|
+
const query = await readQuery(sources, {
|
|
238
|
+
skip: false,
|
|
239
|
+
dryRun: true
|
|
240
|
+
});
|
|
241
|
+
const outcome = await (await getClient()).dataset.native(query).then(compiledOutcome, rejectedOutcome);
|
|
242
|
+
writeJson(outcome);
|
|
243
|
+
if (!outcome.ok) throw new ConfigError(`server validation failed: ${outcome.errors.length} error(s)`);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const datasetQuery = await readQuery(sources, {
|
|
247
|
+
skip,
|
|
248
|
+
dryRun: false
|
|
249
|
+
});
|
|
250
|
+
const client = await getClient();
|
|
251
|
+
if (mode.kind === "run") {
|
|
252
|
+
const queryResult = await client.dataset.query(datasetQuery);
|
|
253
|
+
renderSummary(queryResult, cardQueryView, () => formatQueryResult(queryResult), ctx);
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
switch (mode.kind) {
|
|
257
|
+
case "compile": {
|
|
258
|
+
const compiled = await client.dataset.native(datasetQuery, { pretty: mode.pretty }).catch(refusedCompile);
|
|
259
|
+
renderSummary(compiled, compiledQueryView, () => formatCompiledQuery(compiled), ctx);
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
case "metadata":
|
|
263
|
+
renderItem(await client.dataset.queryMetadata(datasetQuery), queryMetadataView, ctx);
|
|
264
|
+
return;
|
|
265
|
+
case "export":
|
|
266
|
+
await pipeToStdout(await client.dataset.exportQuery(mode.format, {
|
|
267
|
+
query: datasetQuery,
|
|
268
|
+
...mode.params
|
|
269
|
+
}));
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
function notCompiled(local) {
|
|
275
|
+
return {
|
|
276
|
+
...local,
|
|
277
|
+
sql: null
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
function compiledOutcome(compiled) {
|
|
281
|
+
return {
|
|
282
|
+
ok: true,
|
|
283
|
+
errors: [],
|
|
284
|
+
sql: formatCompiledQuery(compiled)
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
function rejectedOutcome(error) {
|
|
288
|
+
if (!(error instanceof HttpError)) throw error;
|
|
289
|
+
if (error.status === FORBIDDEN_STATUS) throw compilePermissionFailure(error);
|
|
290
|
+
if (!COMPILE_REJECTION_STATUSES.has(error.status)) throw error;
|
|
291
|
+
return {
|
|
292
|
+
ok: false,
|
|
293
|
+
errors: [{
|
|
294
|
+
path: WHOLE_QUERY_POINTER,
|
|
295
|
+
message: error.message
|
|
296
|
+
}],
|
|
297
|
+
sql: null
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
function refusedCompile(error) {
|
|
301
|
+
if (error instanceof HttpError && error.status === FORBIDDEN_STATUS) throw compilePermissionFailure(error);
|
|
302
|
+
throw error;
|
|
303
|
+
}
|
|
304
|
+
function compilePermissionFailure(error) {
|
|
305
|
+
return chainRequestFailure(error, `the server refused to compile the query; compiling needs native query permission on its database and access to every table and card it reads: ${error.message}`);
|
|
306
|
+
}
|
|
307
|
+
async function readQuery(sources, options) {
|
|
308
|
+
const body = await readBody(sources, QueryBody);
|
|
309
|
+
preflightQuery(body, options);
|
|
310
|
+
return DatasetQuery.parse(body);
|
|
311
|
+
}
|
|
312
|
+
function preflightQuery(body, options) {
|
|
313
|
+
if (options.skip) return;
|
|
314
|
+
assertNotLegacyEnvelopeWrappingMbql5(body, {
|
|
315
|
+
contextLabel: "query",
|
|
316
|
+
bodyNoun: "the body"
|
|
317
|
+
});
|
|
318
|
+
if (!isMbql5Query(body)) return;
|
|
319
|
+
const outcome = validateQuery(body);
|
|
320
|
+
if (outcome.ok) return;
|
|
321
|
+
writeJson(options.dryRun ? notCompiled(outcome) : outcome);
|
|
322
|
+
const hint = options.dryRun ? "" : VALIDATION_HINT;
|
|
323
|
+
throw new ConfigError(`validation failed: ${outcome.errors.length} error(s)${hint}`);
|
|
324
|
+
}
|
|
325
|
+
function formatCompiledQuery(compiled) {
|
|
326
|
+
return typeof compiled.query === "string" ? compiled.query : serializeJson(compiled.query, false);
|
|
327
|
+
}
|
|
328
|
+
//#endregion
|
|
329
|
+
export { query_default as default };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { H as connectionFlags, J as profileFlag, p as renderSummary, q as outputFlags, v as formatScalar } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-B8RtMb4B.mjs";
|
|
3
|
+
import { t as parseId } from "./parse-id-7ja3HUdB.mjs";
|
|
4
|
+
import { n as parseText } from "./parse-text-T0lTXzTZ.mjs";
|
|
5
|
+
import { i as fieldRemappingMissView, r as fieldRemappingMatchView, t as FieldRemappingResult, u as toValueLabel } from "./field-wmN6raOG.mjs";
|
|
6
|
+
//#region src/commands/field/remapping.ts
|
|
7
|
+
var remapping_default = defineMetabaseCommand({
|
|
8
|
+
meta: {
|
|
9
|
+
name: "remapping",
|
|
10
|
+
description: "Look up another field's value on the row where a field equals a value"
|
|
11
|
+
},
|
|
12
|
+
details: "Answers `{ found: true, value, label }` with `label` the value of `<remapped-id>` on the one row where `<id>` equals `<value>`, or `{ found: false }` when no row does. A FK `<id>` is followed to the key it points at, and `<remapped-id>` must be on that key's table: the server answers a pair that is not, and any failure of the warehouse query, as `{ found: false }` rather than an error. When `<id>` is numeric the server reads the leading number of `<value>` and ignores any text after it (`20abc` looks up 20), failing only a value with no leading number; a value starting with `-` goes after `--` (`mb field remapping 100 101 -- -5`). In text mode the label prints bare so the result composes in a shell; an empty line means either no row matched or the matched label is empty, which `--json` tells apart.",
|
|
13
|
+
requires: ["field.remapping"],
|
|
14
|
+
args: {
|
|
15
|
+
...outputFlags,
|
|
16
|
+
...profileFlag,
|
|
17
|
+
...connectionFlags,
|
|
18
|
+
id: {
|
|
19
|
+
type: "positional",
|
|
20
|
+
description: "Field id the value belongs to",
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
"remapped-id": {
|
|
24
|
+
type: "positional",
|
|
25
|
+
description: "Field id whose value on that row is answered",
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
value: {
|
|
29
|
+
type: "positional",
|
|
30
|
+
description: "Value of <id> to look up",
|
|
31
|
+
required: true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
outputSchema: FieldRemappingResult,
|
|
35
|
+
examples: ["mb field remapping 100 101 20", "mb field remapping 100 101 20 --json"],
|
|
36
|
+
async run({ args, ctx, getClient }) {
|
|
37
|
+
const id = parseId(args.id);
|
|
38
|
+
const remappedId = parseId(args["remapped-id"], "remapped-id");
|
|
39
|
+
const value = parseText(args.value, "value");
|
|
40
|
+
const pair = await (await getClient()).field.remapping(id, remappedId, { value });
|
|
41
|
+
if (pair === null) {
|
|
42
|
+
renderSummary({ found: false }, fieldRemappingMissView, "", ctx);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const match = {
|
|
46
|
+
found: true,
|
|
47
|
+
...toValueLabel(pair)
|
|
48
|
+
};
|
|
49
|
+
renderSummary(match, fieldRemappingMatchView, formatScalar(match.label), ctx);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
//#endregion
|
|
53
|
+
export { remapping_default as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { H as
|
|
2
|
-
import { t as defineMetabaseCommand } from "./runtime-
|
|
3
|
-
import { t as parseId } from "./parse-id-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { H as connectionFlags, J as profileFlag, p as renderSummary, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-B8RtMb4B.mjs";
|
|
3
|
+
import { t as parseId } from "./parse-id-7ja3HUdB.mjs";
|
|
4
|
+
import { l as SyncSettingsUpdateResult } from "./git-sync-COokpYgc.mjs";
|
|
5
|
+
import { c as syncSettingsUpdateView } from "./git-sync-DspFahwV.mjs";
|
|
6
6
|
//#region src/commands/git-sync/remove-collection.ts
|
|
7
7
|
var remove_collection_default = defineMetabaseCommand({
|
|
8
8
|
meta: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { gt as KNOWN_RANGE } from "./cli.mjs";
|
|
2
|
+
import { Y as Skew } from "./runtime-B8RtMb4B.mjs";
|
|
3
3
|
//#region src/commands/auth/render.ts
|
|
4
4
|
const SKEW_LABEL = Object.freeze({
|
|
5
5
|
supported: "supported",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { H as
|
|
2
|
-
import { t as defineMetabaseCommand } from "./runtime-
|
|
3
|
-
import { t as parseId } from "./parse-id-
|
|
1
|
+
import { H as connectionFlags, J as profileFlag, p as renderSummary, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-B8RtMb4B.mjs";
|
|
3
|
+
import { t as parseId } from "./parse-id-7ja3HUdB.mjs";
|
|
4
4
|
import { n as UploadUpdateResult } from "./upload-DAtxBBms.mjs";
|
|
5
|
-
import { n as requireUploadFilePath, t as readCsvFile } from "./upload-
|
|
5
|
+
import { n as requireUploadFilePath, t as readCsvFile } from "./upload-C2fhpKkP.mjs";
|
|
6
6
|
import { n as uploadUpdateResultView } from "./upload-C3z5ZaXA.mjs";
|
|
7
7
|
//#region src/commands/upload/replace.ts
|
|
8
8
|
var replace_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { H as connectionFlags, J as profileFlag, p as renderSummary, q as outputFlags } from "./cli.mjs";
|
|
2
|
+
import { t as defineMetabaseCommand } from "./runtime-B8RtMb4B.mjs";
|
|
3
|
+
import { t as parseId } from "./parse-id-7ja3HUdB.mjs";
|
|
4
|
+
import { l as TableFieldValuesResult } from "./table-Ci6bhZkb.mjs";
|
|
5
|
+
import { i as tableFieldValuesResultView } from "./table-CxvaDiIZ.mjs";
|
|
6
|
+
//#region src/commands/table/rescan-values.ts
|
|
7
|
+
var rescan_values_default = defineMetabaseCommand({
|
|
8
|
+
meta: {
|
|
9
|
+
name: "rescan-values",
|
|
10
|
+
description: "Trigger a rescan of cached field values for one table"
|
|
11
|
+
},
|
|
12
|
+
details: "Queues an async rescan of the distinct values behind this table's filter dropdowns and returns immediately with the server's `success` acknowledgement. Only the sets already cached and read in the last 14 days are refreshed; a set never read, discarded, or unread for longer is skipped until a read rebuilds or revives it. To rescan a set of tables use `mb table bulk-rescan-values`.",
|
|
13
|
+
requires: ["table.rescanValues"],
|
|
14
|
+
args: {
|
|
15
|
+
...outputFlags,
|
|
16
|
+
...profileFlag,
|
|
17
|
+
...connectionFlags,
|
|
18
|
+
id: {
|
|
19
|
+
type: "positional",
|
|
20
|
+
description: "Table id",
|
|
21
|
+
required: true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
outputSchema: TableFieldValuesResult,
|
|
25
|
+
examples: ["mb table rescan-values 42", "mb table rescan-values 42 --json"],
|
|
26
|
+
async run({ args, ctx, getClient }) {
|
|
27
|
+
const id = parseId(args.id);
|
|
28
|
+
renderSummary(await (await getClient()).table.rescanValues(id), tableFieldValuesResultView, `Field-values rescan queued for table ${id}.`, ctx);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
export { rescan_values_default as default };
|