@metabase/cli 0.3.0 → 0.3.1-alpha.support-worktrees.b634907
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-B3Ty8SzB.mjs → add-collection-CxzzDG4z.mjs} +6 -5
- package/dist/{alert-DT-ee7yf.mjs → alert-CQ7Az16h.mjs} +7 -7
- package/dist/{alerts-Bf2RH_p_.mjs → alerts-DmwyyBfW.mjs} +7 -6
- package/dist/{append-DFzQRPMd.mjs → append-B0avMkvW.mjs} +6 -4
- package/dist/{archive-Cd29QC0c.mjs → archive-BPSNe0Ul.mjs} +4 -3
- package/dist/{archive-Dr9Xnx_Z.mjs → archive-BQ50OZ7y.mjs} +6 -5
- package/dist/{archive-B6eXiyER.mjs → archive-BVblae-p.mjs} +4 -3
- package/dist/{archive-C7w49Grr.mjs → archive-BZEu6UfT.mjs} +6 -5
- package/dist/{archive-lQqs13Uz.mjs → archive-CMTHh4-w.mjs} +4 -3
- package/dist/archive-CqOKKrb2.mjs +38 -0
- package/dist/{archive-CwAdlv63.mjs → archive-Cvrkz8F8.mjs} +5 -4
- package/dist/archive-DCjdICg7.mjs +38 -0
- package/dist/{archive-4tmm946K.mjs → archive-DCyeRNfV.mjs} +4 -3
- package/dist/{archive-gid9Y09v.mjs → archive-DFofUIEC.mjs} +4 -3
- package/dist/{archive-ByvA49Kz.mjs → archive-THcEfy9B.mjs} +5 -4
- package/dist/{auth-Dltxua89.mjs → auth-BEEkuu4J.mjs} +5 -5
- package/dist/{body-Cur4NJt9.mjs → body-DxRSAMNC.mjs} +1 -1
- package/dist/branch-BSeGrtP7.mjs +28 -0
- package/dist/{branches-DchlyU0i.mjs → branches-CmWc8NyL.mjs} +4 -3
- package/dist/{cancel-BMQa5R1Z.mjs → cancel-DrQqmxvn.mjs} +4 -3
- package/dist/cancel-task-BMQXtjW5.mjs +34 -0
- package/dist/{card-zyUkr2nS.mjs → card-BEeafd4Y.mjs} +1 -1
- package/dist/{card-DZxRmver.mjs → card-CrBGUkGQ.mjs} +1 -0
- package/dist/card-RlzLDB2z.mjs +24 -0
- package/dist/{cards-SccWvRQD.mjs → cards-M_6X8wCI.mjs} +7 -6
- package/dist/cli.mjs +142 -46
- package/dist/{client-BqhzKdLM.mjs → client-DYD8WZYy.mjs} +241 -75
- package/dist/collection-Bhe20ckt.mjs +20 -0
- package/dist/{collection-CfulNRBG.mjs → collection-BxE7OzcQ.mjs} +6 -3
- package/dist/{collection-CGoVLvcD.mjs → collection-CJHqsFKP.mjs} +1 -1
- package/dist/{collection-namespace-GwydWBF3.mjs → collection-namespace-CEoQ7G08.mjs} +1 -1
- package/dist/content-translation-BrHOrmj9.mjs +5 -0
- package/dist/content-translation-C8MlXPOF.mjs +12 -0
- package/dist/{create-BOLwWt8Q.mjs → create-BA_tTDEk.mjs} +5 -4
- package/dist/{create-DF4QtgDL.mjs → create-BLWwN0uw.mjs} +5 -4
- package/dist/{create-DV-Ln5Mo.mjs → create-BqpkCjx4.mjs} +4 -3
- package/dist/{create-BNQ_DytP.mjs → create-BupBEwR2.mjs} +12 -7
- package/dist/{create-C79vErX0.mjs → create-ByuJ6T4k.mjs} +7 -6
- package/dist/{create-Beh-2uoN.mjs → create-C2XFfbjx.mjs} +4 -3
- package/dist/{create-CCh_LyW9.mjs → create-C7iooS6W.mjs} +14 -8
- package/dist/{create-CAWytBE5.mjs → create-CJ7Am4Gc.mjs} +5 -4
- package/dist/{create-DJmXXQoq.mjs → create-CY-SzM66.mjs} +16 -11
- package/dist/{create-CD008jdE.mjs → create-CoubLR5o.mjs} +8 -7
- package/dist/{create-CAQV2g6V.mjs → create-D0anrINz.mjs} +14 -9
- package/dist/create-DwrhcI8r2.mjs +144 -0
- package/dist/create-branch-B3BMpF1g.mjs +49 -0
- package/dist/{create-i14Wv3Tj.mjs → create-hTc131aX.mjs} +4 -3
- package/dist/{create-tQbnuz-I.mjs → create-ldrghMd1.mjs} +4 -3
- package/dist/{create-CHQx7jq4.mjs → create-myI6doga.mjs} +5 -4
- package/dist/{create-zeveFdnd.mjs → create-z-oMrlfT.mjs} +5 -4
- package/dist/{csv-B2Jgb1GM.mjs → csv-DBNzJiWK.mjs} +6 -4
- package/dist/{current-task-MpBFGttd.mjs → current-task-YzemU0Ic.mjs} +12 -7
- package/dist/{dashboard-BHJBoaG7.mjs → dashboard-B1mpfCq_.mjs} +10 -10
- package/dist/{dashboard-CsIFFpzK.mjs → dashboard-BlbNszi8.mjs} +1 -1
- package/dist/{dashboard-BCpSq_G-.mjs → dashboard-CKUR8ZpQ.mjs} +1 -0
- package/dist/{db-DsfojyeH.mjs → db-1tLH3nYI.mjs} +7 -7
- package/dist/{delete-DFmX7jTp.mjs → delete-CD_-B4Kq.mjs} +5 -4
- package/dist/{delete-BApOjQvl.mjs → delete-CpKH5ia4.mjs} +5 -4
- package/dist/delete-D_OgiI4v.mjs +86 -0
- package/dist/{delete-Ob06PPie.mjs → delete-DjAUp9mk.mjs} +5 -4
- package/dist/{delete-Ck0q4Dzp.mjs → delete-QNgBV6eS.mjs} +10 -5
- package/dist/{delete-B8e01xAG.mjs → delete-eAUB7p-f.mjs} +10 -5
- package/dist/{delete-runtime-D74s6vhu.mjs → delete-runtime-b2_ZMSjj.mjs} +1 -1
- package/dist/{delete-table-DuyhGrvA.mjs → delete-table-DamlxnSO.mjs} +10 -5
- package/dist/dependencies-DEx0BsZ3.mjs +41 -0
- package/dist/dirty-dC1-Ud0G.mjs +40 -0
- package/dist/document-DOJbBWLF.mjs +19 -0
- package/dist/download-C4v7u-AV.mjs +29 -0
- package/dist/{eid-WTZmDdsr.mjs → eid-CP35PdEF.mjs} +4 -3
- package/dist/{events-Bn7jh5lP.mjs → events-DmbzKIh_.mjs} +5 -4
- package/dist/{export-BjfoZRDJ.mjs → export-i8D6laBG.mjs} +25 -12
- package/dist/export-preflight-B5MvYhm3.mjs +67 -0
- package/dist/{field-Zau6Hc6X.mjs → field-BKn9bt7I.mjs} +5 -5
- package/dist/{fields-CBBa-Prp.mjs → fields-8_p81BqN.mjs} +5 -4
- package/dist/{get-DdsoHaKH.mjs → get-B0g6VMBC.mjs} +4 -3
- package/dist/{get-DRvsATp-.mjs → get-BBOfshz1.mjs} +4 -3
- package/dist/{get-CDMGbgrh.mjs → get-BHGgXqUq.mjs} +4 -3
- package/dist/{get-Dn9ZiSZr.mjs → get-BbHPFNqr.mjs} +4 -3
- package/dist/{get-CnbUCzDM.mjs → get-Bds6Izxk.mjs} +4 -3
- package/dist/{get-B7sMgsFs.mjs → get-BvW21ujw.mjs} +4 -3
- package/dist/{get-Dmj9Ygz1.mjs → get-CAzSP-7o.mjs} +4 -3
- package/dist/{get-CvI--9S_.mjs → get-CNEQK0-9.mjs} +5 -4
- package/dist/{get-D_h-G9bn.mjs → get-CPTbySa7.mjs} +4 -3
- package/dist/{get-B_xdF1kq.mjs → get-CWf46UFu.mjs} +6 -5
- package/dist/get-Cfagmy1i.mjs +42 -0
- package/dist/{get-CDJFVvhj.mjs → get-DFkbi5L3.mjs} +3 -2
- package/dist/{get-DYO1kywc.mjs → get-DnCE7K0y.mjs} +5 -4
- package/dist/{get-DY03Azx9.mjs → get-DvLuY5Xu.mjs} +17 -9
- package/dist/get-DwdMvWXU.mjs +44 -0
- package/dist/{get-DmpB6J9g.mjs → get-N4dOaTsp.mjs} +5 -4
- package/dist/get-jV8G90Zy.mjs +42 -0
- package/dist/get-mGEv-kag.mjs +33 -0
- package/dist/{get-run-Cnux9ln0.mjs → get-run-4Ng8_awa.mjs} +6 -5
- package/dist/{get-Bz99dAxK.mjs → get-vrccOMBk.mjs} +6 -5
- package/dist/{get-00lyLv6R.mjs → get-vvs0qzzM.mjs} +4 -3
- package/dist/{git-sync-BDnxPrqU.mjs → git-sync-DLzJrdMi.mjs} +22 -3
- package/dist/git-sync-DjoaNmRM.mjs +29 -0
- package/dist/{git-sync-DxD_ng48.mjs → git-sync-LQIVMNxO.mjs} +31 -2
- package/dist/{group-DBM87IgC.mjs → group-YN6jj2AN.mjs} +3 -2
- package/dist/{has-remote-changes-C684Redh.mjs → has-remote-changes-BXPGI9xG.mjs} +14 -6
- package/dist/{import-Rmmttboo.mjs → import-BoxOkA-G.mjs} +28 -11
- package/dist/{is-dirty-DYeJYhBz.mjs → is-dirty-Cwxq4_gd.mjs} +15 -6
- package/dist/{items-CQlPXBXE.mjs → items-Cv6iAzrI.mjs} +17 -9
- package/dist/{library-Bsm5KsFF.mjs → library-CRaOhJnj.mjs} +5 -5
- package/dist/{library-ClLgrAXy.mjs → library-Cfw6eF35.mjs} +1 -1
- package/dist/{library-DfYAT2Ep.mjs → library-fhVn1KDC.mjs} +1 -1
- package/dist/{list-CMpoc2TN.mjs → list--2T-GUEF.mjs} +5 -4
- package/dist/list-5Iojbr_p.mjs +37 -0
- package/dist/{list-CNUiF8Z7.mjs → list-9uvk9dIA.mjs} +4 -3
- package/dist/{list-CQwOgIlj.mjs → list-BBp9XjYs.mjs} +4 -3
- package/dist/list-BD4onDqO.mjs +37 -0
- package/dist/{list-BpFp9Wre.mjs → list-BLJkJp5a.mjs} +4 -3
- package/dist/{list-BtmsNOEn.mjs → list-BwkfWtP2.mjs} +4 -3
- package/dist/list-C2yL7-CH.mjs +45 -0
- package/dist/{list-BP3MPq-M.mjs → list-C8J3n8B8.mjs} +4 -3
- package/dist/list-CbbKip6U.mjs +32 -0
- package/dist/{list-UhpKG6_m.mjs → list-CtZAu4im.mjs} +5 -4
- package/dist/{list-BtkWNtvY.mjs → list-DOZNpX4b.mjs} +5 -4
- package/dist/{list-DF2rvoO1.mjs → list-DOaWCx8S.mjs} +18 -9
- package/dist/list-Dg2XeDON.mjs +47 -0
- package/dist/{list-CQDprvW0.mjs → list-DhrapAcy.mjs} +6 -5
- package/dist/{list-BzVTHOoH.mjs → list-L2U1l6R4.mjs} +4 -3
- package/dist/{list-DE9FM957.mjs → list-WSJLnunb.mjs} +4 -3
- package/dist/{list-B4hJuMhA.mjs → list-oAAgU5uE.mjs} +16 -9
- package/dist/{list-B8nAGwP4.mjs → list-tutXEQRW.mjs} +5 -4
- package/dist/{login-CGHeSjlP.mjs → login-DqWRF3Og.mjs} +6 -5
- package/dist/{logout-DAxOlbv4.mjs → logout-ChCz1bkf.mjs} +3 -2
- package/dist/{measure-BsYv0p26.mjs → measure-C5dIdFj1.mjs} +6 -6
- package/dist/{network-error-CEb9ymDW.mjs → network-error-D6CiOEBw.mjs} +10 -2
- package/dist/{notification-Fcq1fIPw.mjs → notification-DVrLkjFT.mjs} +1 -1
- package/dist/{parameter-values-CJTdqd8c.mjs → parameter-values-Dy4cBs5y.mjs} +4 -3
- package/dist/{parse-id-C_jmKFaa.mjs → parse-id-DDCn3VXx.mjs} +1 -1
- package/dist/{parse-ref-ibKVB0J4.mjs → parse-ref-Wv21Roup.mjs} +6 -2
- package/dist/{path-B5gHvrYL.mjs → path-IYhuzjQV.mjs} +5 -4
- package/dist/pin-BuZ_kg-u.mjs +62 -0
- package/dist/{preflight-YpPQo-sa.mjs → preflight-HLUVr2Yf.mjs} +2 -2
- package/dist/{publish-DijrxaCW.mjs → publish-CMkCSt8i.mjs} +5 -4
- package/dist/{pulse-DhG6I9mI.mjs → pulse-a-83M4DV.mjs} +1 -1
- package/dist/{query-BbqECzmF.mjs → query-Bka77J62.mjs} +9 -13
- package/dist/{query-result-DBDwk8TS.mjs → query-result-E4Q-Gra6.mjs} +1 -1
- package/dist/{query-Dc__-KJH.mjs → query-tWQAV9pb.mjs} +8 -7
- package/dist/{remove-collection-BOnxYvhj.mjs → remove-collection-BV9wRQZD.mjs} +6 -5
- package/dist/{render-CI93iP0I.mjs → render-DHjCcUXn.mjs} +7 -1
- package/dist/{replace-Cq4CxVa-.mjs → replace-mt47dlRV.mjs} +6 -4
- package/dist/{rescan-values-Dr_j416g.mjs → rescan-values-6cRjcpTs.mjs} +4 -3
- package/dist/{run-DdGJ544X.mjs → run-BmGmC-GQ.mjs} +4 -3
- package/dist/{run-C3DkS6NP.mjs → run-DI_pDxji.mjs} +6 -5
- package/dist/{runs-CUNWiidL.mjs → runs-9Fu0mug5.mjs} +7 -6
- package/dist/{runtime-DiKyBxOw.mjs → runtime-CNAZ_FuR.mjs} +104 -9
- package/dist/{schema-tables-CV386fnC.mjs → schema-tables-CLG0mtQb.mjs} +5 -4
- package/dist/{schemas-DM-UqZBQ.mjs → schemas-Cm5NWy59.mjs} +5 -4
- package/dist/scope-DsGuWG5w.mjs +11 -0
- package/dist/{search-DmGScXs8.mjs → search-CljYyf2F.mjs} +14 -8
- package/dist/{segment-BzUGM2Fr.mjs → segment-IRzlQggt.mjs} +6 -6
- package/dist/{selectors-DGDn0Hto.mjs → selectors-D4iOP5uB.mjs} +2 -2
- package/dist/{send-CVxxEpDB.mjs → send-D7DBnQbu.mjs} +4 -3
- package/dist/{set-DFolTjbd.mjs → set-DKN8fuC6.mjs} +4 -3
- package/dist/{set-active-BD8L1lPX.mjs → set-active-CkE0Eiqh.mjs} +3 -2
- package/dist/{setting-DyhaeICs.mjs → setting-CN4l8N-b.mjs} +4 -4
- package/dist/{setup-BbDQN8fe.mjs → setup-BpTptmdO.mjs} +4 -3
- package/dist/{skills--vK6J-e4.mjs → skills-BSAiLI3Z.mjs} +3 -3
- package/dist/{skills-DTCrMcix.mjs → skills-hVKSOCUf.mjs} +1 -1
- package/dist/{snippet-CyKAgIZl.mjs → snippet-BxgvQ09J.mjs} +5 -2
- package/dist/{snippet-oJLaYW9V.mjs → snippet-DecHB4Dn.mjs} +1 -1
- package/dist/snippet-LlHz3FdJ.mjs +19 -0
- package/dist/{stash-D0S4JmAz.mjs → stash-DJs6A6BA.mjs} +7 -6
- package/dist/{status-BhswxJL1.mjs → status-DtwBDRtc.mjs} +44 -16
- package/dist/{status-hL1am-HV.mjs → status-N_2EaWb7.mjs} +16 -7
- package/dist/stream-McixcoUl.mjs +7 -0
- package/dist/{subscription-_d5fB45F.mjs → subscription-BnGDp1oy.mjs} +6 -6
- package/dist/{subscriptions-s4TF6Ax3.mjs → subscriptions-BfFwV__x.mjs} +7 -6
- package/dist/{summary-CsPvcUwW.mjs → summary-CHiq-4mz.mjs} +4 -3
- package/dist/{sync-schema-DaZ_MV-u.mjs → sync-schema-DhnM-rpm.mjs} +5 -4
- package/dist/{sync-task-BACcrs0i.mjs → sync-task-G1K47Nvn.mjs} +1 -1
- package/dist/{table-DYoC1kPn.mjs → table-BQaiCSNS.mjs} +5 -5
- package/dist/timeline-C2VW0Ph6.mjs +21 -0
- package/dist/{timeline-event-CNQdCTDg.mjs → timeline-event-B7H1y8s8.mjs} +6 -6
- package/dist/{transform-D3QX0jxA.mjs → transform-BvOEn41C.mjs} +4 -1
- package/dist/{transform-DoTyyXAu.mjs → transform-CiDOJGBW.mjs} +2 -2
- package/dist/transform-DAf0Y02t.mjs +28 -0
- package/dist/transform-job-ntiT5Rrh.mjs +22 -0
- package/dist/{transform-tag-Dmb4u3-Q.mjs → transform-tag-DiXWRCQG.mjs} +1 -1
- package/dist/{transform-tag-_tgwlsdB.mjs → transform-tag-Dip51YBa.mjs} +5 -5
- package/dist/{transform-tag-CcElGp3C.mjs → transform-tag-jBVd6wXd.mjs} +9 -4
- package/dist/{transforms-oU4zizbO.mjs → transforms-C-jYgS6z.mjs} +7 -6
- package/dist/tree-DtyJhD54.mjs +36 -0
- package/dist/unpin-DxbXmLtW.mjs +45 -0
- package/dist/{unpublish-BUl9RU5C.mjs → unpublish-BokbnLng.mjs} +4 -3
- package/dist/{update-BiFDBcEH.mjs → update-AZSXMJqu.mjs} +14 -8
- package/dist/{update-BCS5FxKr.mjs → update-B9DcRSBQ.mjs} +18 -12
- package/dist/{update-bD_Jh5-s.mjs → update-BBQInyiJ.mjs} +6 -5
- package/dist/{update-BzMDeZiU.mjs → update-BCGE5UYC.mjs} +6 -5
- package/dist/{update-tX9mKBN_.mjs → update-BErxnZrj.mjs} +9 -8
- package/dist/{update-C4YJQFDS.mjs → update-BRXKLeJH.mjs} +5 -4
- package/dist/{update-cYkvbqK8.mjs → update-Bc8s1TL1.mjs} +5 -4
- package/dist/{update-BZPllQoR.mjs → update-C4PbAYgW.mjs} +5 -4
- package/dist/{update-CVPAwJaH.mjs → update-CKL2FtoX.mjs} +6 -5
- package/dist/{update-Nfi44RrE.mjs → update-CPEU8ZEu.mjs} +6 -5
- package/dist/{update-CmDTljK-.mjs → update-CfQoYVTc.mjs} +5 -4
- package/dist/{update-CO4m4wH3.mjs → update-CpLEEbiJ.mjs} +8 -7
- package/dist/{update-D-NE60AV.mjs → update-D9OTkZhw.mjs} +5 -4
- package/dist/{update-dashcard-C3TuYO_k.mjs → update-dashcard-St-dGcE3.mjs} +7 -6
- package/dist/{update-CHNSUHK4.mjs → update-e7lyQPxq.mjs} +14 -8
- package/dist/{update-CvOO8TED.mjs → update-rkbpH0lF.mjs} +5 -4
- package/dist/{upgrade-DXMV4AyP.mjs → upgrade-CUoRHfVg.mjs} +4 -3
- package/dist/upload-BPd1Uzxc.mjs +43 -0
- package/dist/upload-C3z5ZaXA.mjs +24 -0
- package/dist/{upload-CH632qW6.mjs → upload-CD555ui1.mjs} +1 -24
- package/dist/upload-Dc3QLhZw.mjs +13 -0
- package/dist/{uuid-BJkDWj9p.mjs → uuid-CFN8LIkP.mjs} +3 -2
- package/dist/{validate-query-DaGYSmpQ.mjs → validate-query-Chc43ezW.mjs} +1 -1
- package/dist/{values-Dxf1JEoA.mjs → values-BL_U-Zdw.mjs} +4 -3
- package/dist/{verify-K96rItG5.mjs → verify-DnBaRmkI.mjs} +3 -3
- package/dist/{wait-flags-DWEF9tX4.mjs → wait-flags-DzytMEG8.mjs} +2 -2
- package/dist/{wait-DoMDH226.mjs → wait-mPoOZxrw.mjs} +12 -7
- package/dist/{window-BkvrP0gB.mjs → window-DSb1tqSe.mjs} +1 -1
- package/dist/worktree-ChdDlG3Q.mjs +25 -0
- package/dist/worktree-DC0kTxxQ.mjs +20 -0
- package/dist/worktree-xAro1xAB.mjs +24 -0
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +17 -14
- package/skill-data/dashboard/SKILL.md +2 -2
- package/skill-data/git-sync/SKILL.md +91 -1
- package/skill-data/transform/SKILL.md +9 -1
- package/dist/archive-BxNPHxOY.mjs +0 -32
- package/dist/archive-ChORH5JH.mjs +0 -32
- package/dist/cancel-task-C5CU1pxU.mjs +0 -28
- package/dist/card-CHI2bmds.mjs +0 -24
- package/dist/collection-CY0AB99E.mjs +0 -20
- package/dist/create-branch-CYo6jZth.mjs +0 -35
- package/dist/dependencies-Bj3QrGIm.mjs +0 -36
- package/dist/dirty-DNYoM6Bp.mjs +0 -31
- package/dist/document-BbskZPTT.mjs +0 -19
- package/dist/get-ByBOq30r.mjs +0 -31
- package/dist/get-C2-Q3iQ5.mjs +0 -31
- package/dist/get-DkWO0EI0.mjs +0 -36
- package/dist/git-sync-MQQYRYLg.mjs +0 -28
- package/dist/list-BOET6zhP.mjs +0 -36
- package/dist/list-C5Zs8nrb.mjs +0 -28
- package/dist/list-CKK-s3Ty.mjs +0 -28
- package/dist/list-DMKDsBRd.mjs +0 -38
- package/dist/snippet-DRwKb2x7.mjs +0 -19
- package/dist/timeline-xlDbEKWg.mjs +0 -21
- package/dist/transform-Bs0EWijQ.mjs +0 -28
- package/dist/transform-job-BcLChRup.mjs +0 -22
- package/dist/tree-CH-f3bjP.mjs +0 -27
- package/dist/upload-Dey_8rLf.mjs +0 -13
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import { a as InternalError, c as ResponseShapeError, d as ValidationError, f as errorMessage, i as ConfigError, l as TimeoutError, s as NetworkError } from "./predicates-Bkm2IoeX.mjs";
|
|
2
2
|
import { n as Notification, r as NotificationCardPayload, t as CARD_PAYLOAD_TYPE } from "./notification-DaA4bBHW.mjs";
|
|
3
|
-
import { a as isRetryableStatus, c as normalizeUrl, d as credentialSecrets, g as parseJsonOrPlain, h as parseJson, l as assertCredentialHeaderSafe, m as JSON_CONTENT_TYPE, n as isConnectionClosed, r as HttpError, t as buildNetworkError, u as credentialAuthHeader } from "./network-error-
|
|
3
|
+
import { a as isRetryableStatus, c as normalizeUrl, d as credentialSecrets, g as parseJsonOrPlain, h as parseJson, l as assertCredentialHeaderSafe, m as JSON_CONTENT_TYPE, n as isConnectionClosed, r as HttpError, t as buildNetworkError, u as credentialAuthHeader } from "./network-error-D6CiOEBw.mjs";
|
|
4
4
|
import { n as throwIfAborted, t as combineAborts } from "./signal-CMd0EFUa.mjs";
|
|
5
5
|
import { s as FieldValues, t as Field } from "./field-Cr2DPUG9.mjs";
|
|
6
6
|
import { r as ParameterValues } from "./parameter-DUKR8NXo.mjs";
|
|
7
|
-
import { o as CardQueryResult, t as Card } from "./card-
|
|
8
|
-
import { f as CollectionTreeNode, o as CollectionItem, r as Collection } from "./collection-
|
|
9
|
-
import {
|
|
7
|
+
import { o as CardQueryResult, t as Card } from "./card-CrBGUkGQ.mjs";
|
|
8
|
+
import { f as CollectionTreeNode, o as CollectionItem, r as Collection } from "./collection-BxE7OzcQ.mjs";
|
|
9
|
+
import { t as ContentTranslationUploadResult } from "./content-translation-BrHOrmj9.mjs";
|
|
10
|
+
import { i as DashboardDetail, s as Dashcard, t as Dashboard } from "./dashboard-CKUR8ZpQ.mjs";
|
|
10
11
|
import { i as TableQueryMetadata, t as Table } from "./table-CeeTJgQb.mjs";
|
|
11
12
|
import { t as Database } from "./database-C8G6ZKG0.mjs";
|
|
12
13
|
import { r as pollUntil } from "./poll-75SvT7Zv.mjs";
|
|
13
14
|
import { t as Document } from "./document-Cd2mmqCp.mjs";
|
|
14
15
|
import { i as EidTranslateResult } from "./eid-translation-zEHtr5Oc.mjs";
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
16
|
+
import { c as SyncSettingsUpdateResult, i as SyncExportPreflight, n as SyncDirtyItem, p as isSyncTaskTerminal, s as SyncRemoteChanges, t as SyncBranchCreated, u as SyncTask } from "./git-sync-DLzJrdMi.mjs";
|
|
17
|
+
import { t as Worktree } from "./worktree-xAro1xAB.mjs";
|
|
18
|
+
import { t as Library } from "./library-Cfw6eF35.mjs";
|
|
17
19
|
import { t as Measure } from "./measure-CtfjqJFP.mjs";
|
|
18
20
|
import { t as Pulse } from "./pulse-BmsDenXm.mjs";
|
|
19
21
|
import { r as SearchResult } from "./search-DFBwUc6d.mjs";
|
|
20
22
|
import { t as Segment } from "./segment-OsrbUDzw.mjs";
|
|
21
23
|
import { t as Setting } from "./setting-DTiLCW8g.mjs";
|
|
22
24
|
import { n as SetupResult } from "./setup-CO7QV-ao.mjs";
|
|
23
|
-
import { t as Snippet } from "./snippet-
|
|
25
|
+
import { t as Snippet } from "./snippet-BxgvQ09J.mjs";
|
|
24
26
|
import { i as TimelineEvent, t as Timeline } from "./timeline-CCSU2qOS.mjs";
|
|
25
|
-
import { i as TransformRun, l as isTransformRunFailed, t as Transform, u as isTransformRunTerminal } from "./transform-
|
|
27
|
+
import { i as TransformRun, l as isTransformRunFailed, t as Transform, u as isTransformRunTerminal } from "./transform-BvOEn41C.mjs";
|
|
26
28
|
import { a as TransformJobRunResult, n as TransformJobActiveResult, t as TransformJob } from "./transform-job-DRrK28IH.mjs";
|
|
27
|
-
import { t as TransformTag } from "./transform-tag-
|
|
29
|
+
import { t as TransformTag } from "./transform-tag-jBVd6wXd.mjs";
|
|
28
30
|
import { t as UploadResult } from "./upload-DAtxBBms.mjs";
|
|
29
31
|
import { z } from "zod";
|
|
30
32
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -317,14 +319,18 @@ async function readBodyForError(response) {
|
|
|
317
319
|
//#region ../client/src/resources/card.ts
|
|
318
320
|
const CardApiList = z.array(Card);
|
|
319
321
|
function cardResource(transport) {
|
|
320
|
-
/**
|
|
322
|
+
/**
|
|
323
|
+
* List cards. `f` picks a server-side preset, `model_id` scopes the presets that need an id, and
|
|
324
|
+
* `worktree-id` lists only the cards checked out into that remote-sync worktree.
|
|
325
|
+
*/
|
|
321
326
|
async function list(params = {}, options = {}) {
|
|
322
327
|
return {
|
|
323
328
|
data: await transport.requestParsed(CardApiList, "/api/card", {
|
|
324
329
|
...options,
|
|
325
330
|
query: {
|
|
326
331
|
f: params.f,
|
|
327
|
-
model_id: params.model_id
|
|
332
|
+
model_id: params.model_id,
|
|
333
|
+
"worktree-id": params["worktree-id"]
|
|
328
334
|
}
|
|
329
335
|
}),
|
|
330
336
|
total: null
|
|
@@ -458,12 +464,19 @@ async function listCollectionsWithLibrary(transport, schema, options = {}) {
|
|
|
458
464
|
});
|
|
459
465
|
}
|
|
460
466
|
function collectionResource(transport) {
|
|
461
|
-
/**
|
|
467
|
+
/**
|
|
468
|
+
* List collections. `filter` picks a server-side preset — everything, archived, or personal — and
|
|
469
|
+
* `worktree-id` lists only the collections checked out into that remote-sync worktree.
|
|
470
|
+
*/
|
|
462
471
|
async function list(params = {}, options = {}) {
|
|
472
|
+
const preset = COLLECTION_LIST_QUERY[params.filter ?? DEFAULT_LIST_FILTER];
|
|
463
473
|
return {
|
|
464
474
|
data: await transport.requestParsed(CollectionApiList, "/api/collection", {
|
|
465
475
|
...options,
|
|
466
|
-
query:
|
|
476
|
+
query: {
|
|
477
|
+
...preset,
|
|
478
|
+
"worktree-id": params["worktree-id"]
|
|
479
|
+
}
|
|
467
480
|
}),
|
|
468
481
|
total: null
|
|
469
482
|
};
|
|
@@ -505,14 +518,16 @@ function collectionResource(transport) {
|
|
|
505
518
|
}
|
|
506
519
|
/**
|
|
507
520
|
* Walk the items inside a collection one page at a time. This endpoint pages on the server, so
|
|
508
|
-
* the caller consumes pages rather than a single list and decides how far to pull.
|
|
521
|
+
* the caller consumes pages rather than a single list and decides how far to pull. `worktree-id`
|
|
522
|
+
* walks the `root` alias inside a remote-sync worktree rather than the main app.
|
|
509
523
|
*/
|
|
510
524
|
function itemPages(ref, params = {}, options = {}) {
|
|
511
525
|
return paginatePages(transport, `/api/collection/${refPath(ref)}/items`, CollectionItem, {
|
|
512
526
|
query: {
|
|
513
527
|
models: params.models,
|
|
514
528
|
archived: params.archived,
|
|
515
|
-
pinned_state: params.pinned_state
|
|
529
|
+
pinned_state: params.pinned_state,
|
|
530
|
+
"worktree-id": params["worktree-id"]
|
|
516
531
|
},
|
|
517
532
|
...options.offset !== void 0 && { offset: options.offset },
|
|
518
533
|
...options.max !== void 0 && { max: options.max },
|
|
@@ -520,10 +535,16 @@ function collectionResource(transport) {
|
|
|
520
535
|
...options.signal !== void 0 && { signal: options.signal }
|
|
521
536
|
});
|
|
522
537
|
}
|
|
523
|
-
/**
|
|
524
|
-
|
|
538
|
+
/**
|
|
539
|
+
* Fetch the collection hierarchy as a forest of nested nodes. `worktree-id` fetches the hierarchy
|
|
540
|
+
* a remote-sync worktree checked out rather than the main app's.
|
|
541
|
+
*/
|
|
542
|
+
async function tree(params = {}, options = {}) {
|
|
525
543
|
return {
|
|
526
|
-
data: await transport.requestParsed(CollectionTreeApiList, "/api/collection/tree", {
|
|
544
|
+
data: await transport.requestParsed(CollectionTreeApiList, "/api/collection/tree", {
|
|
545
|
+
...options,
|
|
546
|
+
query: { "worktree-id": params["worktree-id"] }
|
|
547
|
+
}),
|
|
527
548
|
total: null
|
|
528
549
|
};
|
|
529
550
|
}
|
|
@@ -539,6 +560,36 @@ function collectionResource(transport) {
|
|
|
539
560
|
};
|
|
540
561
|
}
|
|
541
562
|
//#endregion
|
|
563
|
+
//#region ../client/src/resources/csv-upload.ts
|
|
564
|
+
const CSV_CONTENT_TYPE = "text/csv";
|
|
565
|
+
function buildCsvFormData(file) {
|
|
566
|
+
const form = new FormData();
|
|
567
|
+
form.append("file", new Blob([file.bytes], { type: CSV_CONTENT_TYPE }), file.filename);
|
|
568
|
+
return form;
|
|
569
|
+
}
|
|
570
|
+
//#endregion
|
|
571
|
+
//#region ../client/src/resources/content-translation.ts
|
|
572
|
+
const CONTENT_TRANSLATION_PATH = "/api/ee/content-translation";
|
|
573
|
+
function contentTranslationResource(transport) {
|
|
574
|
+
/** Download the complete content translation dictionary as CSV. */
|
|
575
|
+
async function download(options = {}) {
|
|
576
|
+
return transport.requestStream(`${CONTENT_TRANSLATION_PATH}/csv`, options);
|
|
577
|
+
}
|
|
578
|
+
/** Replace the complete content translation dictionary with the attached CSV. */
|
|
579
|
+
async function upload(file, options = {}) {
|
|
580
|
+
const form = buildCsvFormData(file);
|
|
581
|
+
return transport.requestParsed(ContentTranslationUploadResult, `${CONTENT_TRANSLATION_PATH}/upload-dictionary`, {
|
|
582
|
+
...options,
|
|
583
|
+
method: "POST",
|
|
584
|
+
body: form
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
return {
|
|
588
|
+
download,
|
|
589
|
+
upload
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
//#endregion
|
|
542
593
|
//#region ../client/src/resources/dashboard.ts
|
|
543
594
|
const DashboardApiList = z.array(Dashboard);
|
|
544
595
|
const PreflightDashcard = z.looseObject({ card_id: z.number().int().nullable().optional() });
|
|
@@ -939,6 +990,7 @@ const SyncStashStarted = z.object({
|
|
|
939
990
|
message: z.string(),
|
|
940
991
|
task_id: z.number().int().positive()
|
|
941
992
|
});
|
|
993
|
+
const WorktreeApiList = z.array(Worktree);
|
|
942
994
|
const RemoteSyncSetting = z.string().nullable();
|
|
943
995
|
const FORBIDDEN_STATUS = 403;
|
|
944
996
|
const UNREGISTERED_STATUS = 404;
|
|
@@ -946,51 +998,99 @@ function isRemoteUnreadable(error) {
|
|
|
946
998
|
if (!(error instanceof HttpError)) return false;
|
|
947
999
|
return error.status === FORBIDDEN_STATUS || error.status === UNREGISTERED_STATUS;
|
|
948
1000
|
}
|
|
1001
|
+
function scopeOf(worktreeId) {
|
|
1002
|
+
return { "worktree-id": worktreeId };
|
|
1003
|
+
}
|
|
949
1004
|
function gitSyncResource(transport) {
|
|
950
|
-
/**
|
|
951
|
-
|
|
952
|
-
|
|
1005
|
+
/**
|
|
1006
|
+
* Get the running or most recently finished sync task in the scope, or null when the server has
|
|
1007
|
+
* none. `worktree-id` asks about a worktree's tasks instead of the main app's.
|
|
1008
|
+
*/
|
|
1009
|
+
async function currentTask(params = {}, options = {}) {
|
|
1010
|
+
return fetchOptionalParsed(transport, "/api/ee/remote-sync/current-task", SyncTask, {
|
|
1011
|
+
...options,
|
|
1012
|
+
query: { "worktree-id": params["worktree-id"] }
|
|
1013
|
+
});
|
|
953
1014
|
}
|
|
954
|
-
/**
|
|
955
|
-
|
|
1015
|
+
/**
|
|
1016
|
+
* Request cancellation of the running sync task, and answer it in the state that left it.
|
|
1017
|
+
* `worktree_id` cancels a worktree's task instead of the main app's.
|
|
1018
|
+
*/
|
|
1019
|
+
async function cancelTask(params = {}, options = {}) {
|
|
956
1020
|
return transport.requestParsed(SyncTask, "/api/ee/remote-sync/current-task/cancel", {
|
|
957
1021
|
...options,
|
|
958
|
-
method: "POST"
|
|
1022
|
+
method: "POST",
|
|
1023
|
+
body: { worktree_id: params.worktree_id }
|
|
959
1024
|
});
|
|
960
1025
|
}
|
|
961
|
-
/**
|
|
962
|
-
|
|
963
|
-
|
|
1026
|
+
/**
|
|
1027
|
+
* Whether the scope holds content changes the remote has not been told about. `worktree-id` asks
|
|
1028
|
+
* about a worktree instead of the main app.
|
|
1029
|
+
*/
|
|
1030
|
+
async function isDirty(params = {}, options = {}) {
|
|
1031
|
+
return (await transport.requestParsed(SyncDirtyFlag, "/api/ee/remote-sync/is-dirty", {
|
|
1032
|
+
...options,
|
|
1033
|
+
query: { "worktree-id": params["worktree-id"] }
|
|
1034
|
+
})).is_dirty;
|
|
964
1035
|
}
|
|
965
|
-
/**
|
|
966
|
-
|
|
1036
|
+
/**
|
|
1037
|
+
* List the objects whose local state differs from the remote. `worktree-id` asks about a worktree
|
|
1038
|
+
* instead of the main app.
|
|
1039
|
+
*/
|
|
1040
|
+
async function dirty(params = {}, options = {}) {
|
|
967
1041
|
return {
|
|
968
|
-
data: (await transport.requestParsed(SyncDirtyList, "/api/ee/remote-sync/dirty", {
|
|
1042
|
+
data: (await transport.requestParsed(SyncDirtyList, "/api/ee/remote-sync/dirty", {
|
|
1043
|
+
...options,
|
|
1044
|
+
query: { "worktree-id": params["worktree-id"] }
|
|
1045
|
+
})).dirty,
|
|
969
1046
|
total: null
|
|
970
1047
|
};
|
|
971
1048
|
}
|
|
972
1049
|
/**
|
|
973
|
-
* Compare the
|
|
974
|
-
* comparison; `force-refresh` re-reads the remote instead
|
|
1050
|
+
* Compare the branch the scope tracks against what Metabase last imported. The server caches the
|
|
1051
|
+
* comparison; `force-refresh` re-reads the remote instead, and `worktree-id` checks a worktree's
|
|
1052
|
+
* own branch rather than the main app's.
|
|
975
1053
|
*/
|
|
976
1054
|
async function hasRemoteChanges(params = {}, options = {}) {
|
|
977
1055
|
return transport.requestParsed(SyncRemoteChanges, "/api/ee/remote-sync/has-remote-changes", {
|
|
978
1056
|
...options,
|
|
979
|
-
query: {
|
|
1057
|
+
query: {
|
|
1058
|
+
"force-refresh": params["force-refresh"],
|
|
1059
|
+
"worktree-id": params["worktree-id"]
|
|
1060
|
+
}
|
|
980
1061
|
});
|
|
981
1062
|
}
|
|
982
1063
|
/**
|
|
983
|
-
*
|
|
1064
|
+
* Dry-run preview of what pushing the scope's current state would do against the live remote
|
|
1065
|
+
* branch, writing nothing: whether the remote has advanced, whether a three-way merge would
|
|
1066
|
+
* apply cleanly, the entities that conflict, the counts a merge would fold in, and the remote
|
|
1067
|
+
* content a force push would discard instead.
|
|
1068
|
+
*/
|
|
1069
|
+
async function exportPreflight(params, options = {}) {
|
|
1070
|
+
return transport.requestParsed(SyncExportPreflight, "/api/ee/remote-sync/export-preflight", {
|
|
1071
|
+
...options,
|
|
1072
|
+
query: {
|
|
1073
|
+
branch: params.branch,
|
|
1074
|
+
"worktree-id": params["worktree-id"]
|
|
1075
|
+
}
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
/**
|
|
1079
|
+
* Import content from the remote into the scope. The endpoint queues a task and returns at once;
|
|
984
1080
|
* pass `wait` to poll that task until it reaches a terminal status. A server already up to date
|
|
985
|
-
* answers no task id, and there is then nothing to poll.
|
|
1081
|
+
* answers no task id, and there is then nothing to poll. Inside a worktree the worktree's own
|
|
1082
|
+
* branch is the target and `branch` is ignored.
|
|
986
1083
|
*/
|
|
987
|
-
async function importFromRemote(params
|
|
1084
|
+
async function importFromRemote(params, options = {}) {
|
|
988
1085
|
const started = await transport.requestParsed(SyncImportStarted, "/api/ee/remote-sync/import", {
|
|
989
1086
|
...options,
|
|
990
1087
|
method: "POST",
|
|
991
1088
|
body: {
|
|
992
1089
|
branch: params.branch,
|
|
993
|
-
|
|
1090
|
+
expected_branch: params.expected_branch,
|
|
1091
|
+
force: params.force,
|
|
1092
|
+
merge: params.merge,
|
|
1093
|
+
worktree_id: params.worktree_id
|
|
994
1094
|
}
|
|
995
1095
|
});
|
|
996
1096
|
const message = started.message ?? null;
|
|
@@ -998,34 +1098,39 @@ function gitSyncResource(transport) {
|
|
|
998
1098
|
message,
|
|
999
1099
|
task_id: started.task_id
|
|
1000
1100
|
};
|
|
1101
|
+
const scope = scopeOf(params.worktree_id);
|
|
1001
1102
|
return {
|
|
1002
1103
|
message,
|
|
1003
1104
|
task_id: started.task_id,
|
|
1004
|
-
final: await settle(params.wait, options)
|
|
1105
|
+
final: await settle(params.wait, scope, options)
|
|
1005
1106
|
};
|
|
1006
1107
|
}
|
|
1007
1108
|
/**
|
|
1008
|
-
* Export
|
|
1009
|
-
* `wait` to poll that task until it reaches a terminal status.
|
|
1109
|
+
* Export the scope's content to the remote. The endpoint queues a task and returns at once; pass
|
|
1110
|
+
* `wait` to poll that task until it reaches a terminal status. `branch` must be the branch the
|
|
1111
|
+
* scope is already on — the worktree's own inside a worktree, the tracked one in the main app.
|
|
1010
1112
|
*/
|
|
1011
|
-
async function exportToRemote(params
|
|
1113
|
+
async function exportToRemote(params, options = {}) {
|
|
1012
1114
|
const started = await transport.requestParsed(SyncExportStarted, "/api/ee/remote-sync/export", {
|
|
1013
1115
|
...options,
|
|
1014
1116
|
method: "POST",
|
|
1015
1117
|
body: {
|
|
1016
1118
|
branch: params.branch,
|
|
1017
1119
|
message: params.message,
|
|
1018
|
-
force: params.force
|
|
1120
|
+
force: params.force,
|
|
1121
|
+
merge: params.merge,
|
|
1122
|
+
worktree_id: params.worktree_id
|
|
1019
1123
|
}
|
|
1020
1124
|
});
|
|
1021
1125
|
if (params.wait === void 0) return {
|
|
1022
1126
|
message: started.message,
|
|
1023
1127
|
task_id: started.task_id
|
|
1024
1128
|
};
|
|
1129
|
+
const scope = scopeOf(params.worktree_id);
|
|
1025
1130
|
return {
|
|
1026
1131
|
message: started.message,
|
|
1027
1132
|
task_id: started.task_id,
|
|
1028
|
-
final: await settle(params.wait, options)
|
|
1133
|
+
final: await settle(params.wait, scope, options)
|
|
1029
1134
|
};
|
|
1030
1135
|
}
|
|
1031
1136
|
/**
|
|
@@ -1050,7 +1155,7 @@ function gitSyncResource(transport) {
|
|
|
1050
1155
|
status: started.status,
|
|
1051
1156
|
message: started.message,
|
|
1052
1157
|
task_id: started.task_id,
|
|
1053
|
-
final: await settle(params.wait, options)
|
|
1158
|
+
final: await settle(params.wait, {}, options)
|
|
1054
1159
|
};
|
|
1055
1160
|
}
|
|
1056
1161
|
/** List the branches the configured remote carries. */
|
|
@@ -1060,12 +1165,49 @@ function gitSyncResource(transport) {
|
|
|
1060
1165
|
total: null
|
|
1061
1166
|
};
|
|
1062
1167
|
}
|
|
1063
|
-
/**
|
|
1168
|
+
/**
|
|
1169
|
+
* Create a branch on the remote from the branch git-sync is on. The instance checks the new
|
|
1170
|
+
* branch out by default; `checkout: false` creates it and leaves the instance where it is, which
|
|
1171
|
+
* is what checking a branch out into a worktree wants.
|
|
1172
|
+
*/
|
|
1064
1173
|
async function createBranch(params, options = {}) {
|
|
1065
1174
|
return transport.requestParsed(SyncBranchCreated, "/api/ee/remote-sync/create-branch", {
|
|
1066
1175
|
...options,
|
|
1067
1176
|
method: "POST",
|
|
1068
|
-
body: {
|
|
1177
|
+
body: {
|
|
1178
|
+
name: params.name,
|
|
1179
|
+
checkout: params.checkout
|
|
1180
|
+
}
|
|
1181
|
+
});
|
|
1182
|
+
}
|
|
1183
|
+
/** List the remote-sync worktrees the caller can read. Worktrees are superuser-only. */
|
|
1184
|
+
async function worktrees(options = {}) {
|
|
1185
|
+
return {
|
|
1186
|
+
data: await transport.requestParsed(WorktreeApiList, "/api/ee/remote-sync/worktree", { ...options }),
|
|
1187
|
+
total: null
|
|
1188
|
+
};
|
|
1189
|
+
}
|
|
1190
|
+
/** Get a single remote-sync worktree by id. */
|
|
1191
|
+
async function getWorktree(id, options = {}) {
|
|
1192
|
+
return transport.requestParsed(Worktree, `/api/ee/remote-sync/worktree/${id}`, { ...options });
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Create a remote-sync worktree for a branch. The branch is not created here — it is expected to
|
|
1196
|
+
* already exist on the remote — and its content is materialized by a subsequent import.
|
|
1197
|
+
*/
|
|
1198
|
+
async function createWorktree(params, options = {}) {
|
|
1199
|
+
return transport.requestParsed(Worktree, "/api/ee/remote-sync/worktree", {
|
|
1200
|
+
...options,
|
|
1201
|
+
method: "POST",
|
|
1202
|
+
body: { branch: params.branch }
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
/** Delete a remote-sync worktree along with every piece of content it checked out. */
|
|
1206
|
+
async function deleteWorktree(id, options = {}) {
|
|
1207
|
+
await transport.requestRaw(`/api/ee/remote-sync/worktree/${id}`, {
|
|
1208
|
+
...options,
|
|
1209
|
+
method: "DELETE",
|
|
1210
|
+
expectContentType: "binary"
|
|
1069
1211
|
});
|
|
1070
1212
|
}
|
|
1071
1213
|
/**
|
|
@@ -1101,14 +1243,14 @@ function gitSyncResource(transport) {
|
|
|
1101
1243
|
return fetchOptionalParsed(transport, "/api/setting/remote-sync-branch", RemoteSyncSetting, options);
|
|
1102
1244
|
}
|
|
1103
1245
|
/**
|
|
1104
|
-
* Poll the current task until it reaches a terminal status. A server with no task at all
|
|
1246
|
+
* Poll the scope's current task until it reaches a terminal status. A server with no task at all
|
|
1105
1247
|
* answers null, which is terminal in the same sense: nothing further will happen.
|
|
1106
1248
|
*/
|
|
1107
|
-
async function waitForTask(wait, options = {}) {
|
|
1108
|
-
return settle(wait, options);
|
|
1249
|
+
async function waitForTask(wait, params = {}, options = {}) {
|
|
1250
|
+
return settle(wait, params, options);
|
|
1109
1251
|
}
|
|
1110
|
-
async function settle(wait, options) {
|
|
1111
|
-
return pollUntil(async (signal) => currentTask({
|
|
1252
|
+
async function settle(wait, scope, options) {
|
|
1253
|
+
return pollUntil(async (signal) => currentTask(scope, {
|
|
1112
1254
|
...options,
|
|
1113
1255
|
signal
|
|
1114
1256
|
}), (task) => task === null || isSyncTaskTerminal(task.status), wait);
|
|
@@ -1124,6 +1266,11 @@ function gitSyncResource(transport) {
|
|
|
1124
1266
|
stash,
|
|
1125
1267
|
branches,
|
|
1126
1268
|
createBranch,
|
|
1269
|
+
exportPreflight,
|
|
1270
|
+
worktrees,
|
|
1271
|
+
getWorktree,
|
|
1272
|
+
createWorktree,
|
|
1273
|
+
deleteWorktree,
|
|
1127
1274
|
setCollectionSynced,
|
|
1128
1275
|
syncedCollections,
|
|
1129
1276
|
remoteUrl,
|
|
@@ -1146,9 +1293,15 @@ const LibraryCollectionInfo = Collection.pick({
|
|
|
1146
1293
|
is_remote_synced: true
|
|
1147
1294
|
}).strip();
|
|
1148
1295
|
function libraryResource(transport) {
|
|
1149
|
-
/**
|
|
1150
|
-
|
|
1151
|
-
|
|
1296
|
+
/**
|
|
1297
|
+
* Get the Library root and its child collections, or `null` on an instance that has none.
|
|
1298
|
+
* `worktree-id` gets the Library a remote-sync worktree checked out rather than the main app's.
|
|
1299
|
+
*/
|
|
1300
|
+
async function get(params = {}, options = {}) {
|
|
1301
|
+
const result = await transport.requestParsed(LibraryOrAbsent, LIBRARY_ROOT_PATH, {
|
|
1302
|
+
...options,
|
|
1303
|
+
query: { "worktree-id": params["worktree-id"] }
|
|
1304
|
+
});
|
|
1152
1305
|
if (!("effective_children" in result)) return null;
|
|
1153
1306
|
const infoById = await libraryCollectionsById(options);
|
|
1154
1307
|
const effective_children = result.effective_children.map((child) => {
|
|
@@ -1179,13 +1332,13 @@ function libraryResource(transport) {
|
|
|
1179
1332
|
* back from a refetch, which together make this idempotent.
|
|
1180
1333
|
*/
|
|
1181
1334
|
async function create(options = {}) {
|
|
1182
|
-
const existing = await get(options);
|
|
1335
|
+
const existing = await get({}, options);
|
|
1183
1336
|
if (existing !== null) return existing;
|
|
1184
1337
|
await transport.requestRaw(LIBRARY_ROOT_PATH, {
|
|
1185
1338
|
...options,
|
|
1186
1339
|
method: "POST"
|
|
1187
1340
|
});
|
|
1188
|
-
const created = await get(options);
|
|
1341
|
+
const created = await get({}, options);
|
|
1189
1342
|
if (created === null) throw new Error(`Library was not created after POST ${LIBRARY_ROOT_PATH}`);
|
|
1190
1343
|
return created;
|
|
1191
1344
|
}
|
|
@@ -1438,8 +1591,9 @@ function searchResource(transport) {
|
|
|
1438
1591
|
/**
|
|
1439
1592
|
* Search over the instance's content, ranked against `q`. `models` narrows which kinds of entity
|
|
1440
1593
|
* may match, `archived` swaps the active set for the archived one, `table_db_id` restricts to
|
|
1441
|
-
* items on one database, `verified` to verified content,
|
|
1442
|
-
*
|
|
1594
|
+
* items on one database, `verified` to verified content, `worktree-id` searches inside one
|
|
1595
|
+
* remote-sync worktree rather than the main app, and `limit`/`offset` are the window the server
|
|
1596
|
+
* applies before ranking hydration.
|
|
1443
1597
|
*/
|
|
1444
1598
|
async function query(params = {}, options = {}) {
|
|
1445
1599
|
const response = await transport.requestParsed(SearchApiResponse, "/api/search", {
|
|
@@ -1451,7 +1605,8 @@ function searchResource(transport) {
|
|
|
1451
1605
|
limit: params.limit,
|
|
1452
1606
|
offset: params.offset,
|
|
1453
1607
|
table_db_id: params.table_db_id,
|
|
1454
|
-
verified: params.verified
|
|
1608
|
+
verified: params.verified,
|
|
1609
|
+
"worktree-id": params["worktree-id"]
|
|
1455
1610
|
}
|
|
1456
1611
|
});
|
|
1457
1612
|
return {
|
|
@@ -1571,12 +1726,18 @@ function setupResource(transport) {
|
|
|
1571
1726
|
//#region ../client/src/resources/snippet.ts
|
|
1572
1727
|
const SnippetApiList = z.array(Snippet);
|
|
1573
1728
|
function snippetResource(transport) {
|
|
1574
|
-
/**
|
|
1729
|
+
/**
|
|
1730
|
+
* List native query snippets. `archived` swaps the listing to archived snippets, and
|
|
1731
|
+
* `worktree-id` lists only the snippets checked out into that remote-sync worktree.
|
|
1732
|
+
*/
|
|
1575
1733
|
async function list(params = {}, options = {}) {
|
|
1576
1734
|
return {
|
|
1577
1735
|
data: await transport.requestParsed(SnippetApiList, "/api/native-query-snippet", {
|
|
1578
1736
|
...options,
|
|
1579
|
-
query: {
|
|
1737
|
+
query: {
|
|
1738
|
+
archived: params.archived,
|
|
1739
|
+
"worktree-id": params["worktree-id"]
|
|
1740
|
+
}
|
|
1580
1741
|
}),
|
|
1581
1742
|
total: null
|
|
1582
1743
|
};
|
|
@@ -1617,14 +1778,6 @@ function snippetResource(transport) {
|
|
|
1617
1778
|
};
|
|
1618
1779
|
}
|
|
1619
1780
|
//#endregion
|
|
1620
|
-
//#region ../client/src/resources/csv-upload.ts
|
|
1621
|
-
const CSV_CONTENT_TYPE = "text/csv";
|
|
1622
|
-
function buildCsvFormData(file) {
|
|
1623
|
-
const form = new FormData();
|
|
1624
|
-
form.append("file", new Blob([file.bytes], { type: CSV_CONTENT_TYPE }), file.filename);
|
|
1625
|
-
return form;
|
|
1626
|
-
}
|
|
1627
|
-
//#endregion
|
|
1628
1781
|
//#region ../client/src/resources/table.ts
|
|
1629
1782
|
const TableApiList = z.array(Table);
|
|
1630
1783
|
const UPLOAD_UPDATE_PATHS = {
|
|
@@ -1910,10 +2063,16 @@ const TransformRunKickoff = z.object({
|
|
|
1910
2063
|
run_id: z.number().int().positive().nullable()
|
|
1911
2064
|
});
|
|
1912
2065
|
function transformResource(transport) {
|
|
1913
|
-
/**
|
|
1914
|
-
|
|
2066
|
+
/**
|
|
2067
|
+
* List every transform the caller can see. `worktree-id` lists only the transforms checked out
|
|
2068
|
+
* into that remote-sync worktree; without it the listing is the main app's.
|
|
2069
|
+
*/
|
|
2070
|
+
async function list(params = {}, options = {}) {
|
|
1915
2071
|
return {
|
|
1916
|
-
data: await transport.requestParsed(TransformApiList, "/api/transform", {
|
|
2072
|
+
data: await transport.requestParsed(TransformApiList, "/api/transform", {
|
|
2073
|
+
...options,
|
|
2074
|
+
query: { "worktree-id": params["worktree-id"] }
|
|
2075
|
+
}),
|
|
1917
2076
|
total: null
|
|
1918
2077
|
};
|
|
1919
2078
|
}
|
|
@@ -2048,10 +2207,16 @@ function linkedTableId(transform) {
|
|
|
2048
2207
|
//#region ../client/src/resources/transform-tag.ts
|
|
2049
2208
|
const TransformTagApiList = z.array(TransformTag);
|
|
2050
2209
|
function transformTagResource(transport) {
|
|
2051
|
-
/**
|
|
2052
|
-
|
|
2210
|
+
/**
|
|
2211
|
+
* List every transform tag the caller can see, built-in tags included. `worktree-id` lists only
|
|
2212
|
+
* the tags checked out into that remote-sync worktree; without it the listing is the main app's.
|
|
2213
|
+
*/
|
|
2214
|
+
async function list(params = {}, options = {}) {
|
|
2053
2215
|
return {
|
|
2054
|
-
data: await transport.requestParsed(TransformTagApiList, "/api/transform-tag", {
|
|
2216
|
+
data: await transport.requestParsed(TransformTagApiList, "/api/transform-tag", {
|
|
2217
|
+
...options,
|
|
2218
|
+
query: { "worktree-id": params["worktree-id"] }
|
|
2219
|
+
}),
|
|
2055
2220
|
total: null
|
|
2056
2221
|
};
|
|
2057
2222
|
}
|
|
@@ -2161,6 +2326,7 @@ function createClient(config, options) {
|
|
|
2161
2326
|
return {
|
|
2162
2327
|
card: cardResource(transport),
|
|
2163
2328
|
collection: collectionResource(transport),
|
|
2329
|
+
contentTranslation: contentTranslationResource(transport),
|
|
2164
2330
|
dashboard: dashboardResource(transport),
|
|
2165
2331
|
database: databaseResource(transport),
|
|
2166
2332
|
dataset: datasetResource(transport),
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { t as defineCommandGroup } from "./group-YN6jj2AN.mjs";
|
|
2
|
+
//#region src/commands/collection/index.ts
|
|
3
|
+
var collection_default = defineCommandGroup({
|
|
4
|
+
name: "collection",
|
|
5
|
+
description: "Manage Metabase collections",
|
|
6
|
+
skills: [{
|
|
7
|
+
skill: "core",
|
|
8
|
+
purpose: "collection ref forms and the transforms namespace"
|
|
9
|
+
}],
|
|
10
|
+
subCommands: {
|
|
11
|
+
list: () => import("./list-Dg2XeDON.mjs").then((mod) => mod.default),
|
|
12
|
+
get: () => import("./get-DwdMvWXU.mjs").then((mod) => mod.default),
|
|
13
|
+
items: () => import("./items-Cv6iAzrI.mjs").then((mod) => mod.default),
|
|
14
|
+
tree: () => import("./tree-DtyJhD54.mjs").then((mod) => mod.default),
|
|
15
|
+
create: () => import("./create-D0anrINz.mjs").then((mod) => mod.default),
|
|
16
|
+
archive: () => import("./archive-DCjdICg7.mjs").then((mod) => mod.default)
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
//#endregion
|
|
20
|
+
export { collection_default as default };
|
|
@@ -61,7 +61,8 @@ const Collection = z.object({
|
|
|
61
61
|
entity_id: z.string().nullable().optional(),
|
|
62
62
|
slug: z.string().optional(),
|
|
63
63
|
can_write: z.boolean().optional(),
|
|
64
|
-
is_remote_synced: z.boolean().nullable().optional()
|
|
64
|
+
is_remote_synced: z.boolean().nullable().optional(),
|
|
65
|
+
worktree_id: z.number().int().positive().nullable().optional()
|
|
65
66
|
}).loose();
|
|
66
67
|
const CollectionCompact = Collection.pick({
|
|
67
68
|
id: true,
|
|
@@ -73,7 +74,8 @@ const CollectionCompact = Collection.pick({
|
|
|
73
74
|
type: true,
|
|
74
75
|
authority_level: true,
|
|
75
76
|
is_personal: true,
|
|
76
|
-
is_remote_synced: true
|
|
77
|
+
is_remote_synced: true,
|
|
78
|
+
worktree_id: true
|
|
77
79
|
}).strip();
|
|
78
80
|
const CollectionItem = z.object({
|
|
79
81
|
id: z.number().int(),
|
|
@@ -113,7 +115,8 @@ const CollectionCreateInput = z.object({
|
|
|
113
115
|
description: z.string().min(1).nullable().optional(),
|
|
114
116
|
parent_id: z.number().int().positive().nullable().optional(),
|
|
115
117
|
namespace: CollectionNamespace.nullable().optional(),
|
|
116
|
-
authority_level: CollectionAuthorityLevel.nullable().optional()
|
|
118
|
+
authority_level: CollectionAuthorityLevel.nullable().optional(),
|
|
119
|
+
worktree_id: z.number().int().positive().nullable().optional()
|
|
117
120
|
}).loose();
|
|
118
121
|
z.object({
|
|
119
122
|
name: z.string().min(1).optional(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as CollectionCompact, s as CollectionItemCompact } from "./collection-
|
|
1
|
+
import { i as CollectionCompact, s as CollectionItemCompact } from "./collection-BxE7OzcQ.mjs";
|
|
2
2
|
//#region src/output/views/collection.ts
|
|
3
3
|
const collectionView = {
|
|
4
4
|
compactPick: CollectionCompact,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as ConfigError } from "./predicates-Bkm2IoeX.mjs";
|
|
2
|
-
import { r as HttpError } from "./network-error-
|
|
2
|
+
import { r as HttpError } from "./network-error-D6CiOEBw.mjs";
|
|
3
3
|
//#region src/commands/transform/collection-namespace.ts
|
|
4
4
|
const TRANSFORMS_NAMESPACE_HINT = "transforms can only be filed in a :transforms-namespace collection. Create one with `mb collection create --body '{\"name\":\"…\"}' --namespace transforms` and pass its id as collection_id, or omit collection_id to leave the transform uncollected.";
|
|
5
5
|
function enrichTransformCollectionError(error) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t as defineCommandGroup } from "./group-YN6jj2AN.mjs";
|
|
2
|
+
//#region src/commands/content-translation/index.ts
|
|
3
|
+
var content_translation_default = defineCommandGroup({
|
|
4
|
+
name: "content-translation",
|
|
5
|
+
description: "Download or replace the content translation dictionary",
|
|
6
|
+
subCommands: {
|
|
7
|
+
download: () => import("./download-C4v7u-AV.mjs").then((mod) => mod.default),
|
|
8
|
+
upload: () => import("./upload-BPd1Uzxc.mjs").then((mod) => mod.default)
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { content_translation_default as default };
|