@metabase/cli 0.3.2-alpha.fix-transform-test-ee-path.041c793 → 0.3.2-alpha.fix-transform-test-ee-path.8ac2a7a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/dist/{add-collection-73X1DmCM.mjs → add-collection-B_-eMU_k.mjs} +2 -2
  2. package/dist/{alert-BB38lWSL.mjs → alert-Dalin_DD.mjs} +6 -6
  3. package/dist/{alerts-DxyzqLSU.mjs → alerts-DpBgrjPI.mjs} +3 -3
  4. package/dist/{append-CHme1Enm.mjs → append-C1JNVALm.mjs} +3 -3
  5. package/dist/{archive-Cq3fnc0v2.mjs → archive-52ZHbFDm2.mjs} +2 -2
  6. package/dist/{archive-eS-XA74p.mjs → archive-B51prFgS.mjs} +2 -2
  7. package/dist/{archive-CP5Hlqjw.mjs → archive-BkITQyWW.mjs} +2 -2
  8. package/dist/{archive-DPL1qOuL.mjs → archive-CISXgZAI.mjs} +2 -2
  9. package/dist/{archive-BMyvyf62.mjs → archive-CdKf_Eqq.mjs} +2 -2
  10. package/dist/{archive-CqKqNdUh.mjs → archive-CicPYX27.mjs} +2 -2
  11. package/dist/{archive-DKFPJ9j3.mjs → archive-CwITzj_j.mjs} +2 -2
  12. package/dist/{archive-BGiDxu8O.mjs → archive-DA3OiLEE.mjs} +2 -2
  13. package/dist/{archive-DBcxZwLd.mjs → archive-DVHxeDKS.mjs} +2 -2
  14. package/dist/{archive-C4Y2B58q.mjs → archive-DckxlWBt.mjs} +2 -2
  15. package/dist/{archive-Czo5T0Lp.mjs → archive-cAdUa1-2.mjs} +2 -2
  16. package/dist/{auth-6YyB0HNB.mjs → auth-A96JOCQx.mjs} +4 -4
  17. package/dist/{body-OjAWKVaU.mjs → body-CshgcV6U.mjs} +2 -2
  18. package/dist/{branches-D5YLVFDK.mjs → branches-CbcwWYL9.mjs} +1 -1
  19. package/dist/{cancel-DeRIq1YJ.mjs → cancel-DpDcVY7M.mjs} +2 -2
  20. package/dist/{cancel-task-CqExODVm.mjs → cancel-task-B4RDvIYb.mjs} +1 -1
  21. package/dist/{card-BMSqofd7.mjs → card-CefVYtF7.mjs} +7 -7
  22. package/dist/{cards-B813G9I5.mjs → cards-BC0JX8Yg.mjs} +2 -2
  23. package/dist/cli.mjs +43 -33
  24. package/dist/{client-cJ7aw0Gt.mjs → client-ClL6gf7G.mjs} +4 -313
  25. package/dist/{collection-BfNg7tEg.mjs → collection-Be5AHVWP.mjs} +6 -6
  26. package/dist/{collection-namespace-CVzDgJV0.mjs → collection-namespace-Dv0l-V9K.mjs} +1 -1
  27. package/dist/{content-translation-QKWt9l76.mjs → content-translation-BXIXL4eW.mjs} +2 -2
  28. package/dist/{create-CWGsiFvU.mjs → create--fiwuTWc.mjs} +2 -2
  29. package/dist/{create-DEBgYRlM.mjs → create-B9qXQ_wV.mjs} +2 -2
  30. package/dist/{create-CvIeb1NU.mjs → create-BVNhtAgF.mjs} +3 -3
  31. package/dist/{create-BWp6L_dW.mjs → create-BbjSOTN-.mjs} +3 -3
  32. package/dist/{create-DmKwDQCY2.mjs → create-BcsVwXgS2.mjs} +2 -2
  33. package/dist/{create-BLiB2xqo.mjs → create-Bryrkb9g.mjs} +2 -2
  34. package/dist/{create-DJm0YuLW.mjs → create-CHr8MPPq.mjs} +2 -2
  35. package/dist/{create-BJad6MR82.mjs → create-D--Z1S3p2.mjs} +4 -4
  36. package/dist/{create-CMV3qlzJ.mjs → create-DWFJdyIr.mjs} +2 -2
  37. package/dist/{create-CvpeAcFc.mjs → create-Dhai9zAt.mjs} +2 -2
  38. package/dist/{create-uanpKsPo.mjs → create-DiJ8bUb-.mjs} +3 -3
  39. package/dist/{create-Bef5eBCA.mjs → create-DmN2gFc4.mjs} +2 -2
  40. package/dist/{create-D50TxVTk.mjs → create-NCKHHdov.mjs} +1 -1
  41. package/dist/{create-CoFg1p6m.mjs → create-YetX69Re.mjs} +2 -2
  42. package/dist/{create-4UnoQvsy.mjs → create-Za1EskpV.mjs} +3 -3
  43. package/dist/{create-branch-BN5iH-GM.mjs → create-branch-CseVn3lp.mjs} +1 -1
  44. package/dist/{create-bvpl6Fn5.mjs → create-kZIIEN2Y.mjs} +3 -3
  45. package/dist/{csv-BhuX9fwh.mjs → csv-DNzesu8y.mjs} +3 -3
  46. package/dist/{current-task-BMt2NeqV.mjs → current-task-DRTKZcP9.mjs} +2 -2
  47. package/dist/{dashboard-Ct_ajSYI.mjs → dashboard-CMw13KXM.mjs} +9 -9
  48. package/dist/{db-B_LW2VE-.mjs → db-BDijt81U.mjs} +6 -6
  49. package/dist/{delete-CowGO4rh.mjs → delete--15it-A8.mjs} +2 -2
  50. package/dist/{delete-DZ_ICQug.mjs → delete-Bsdwqh7H.mjs} +2 -2
  51. package/dist/{delete-BOcPK_H9.mjs → delete-BudvZkvK.mjs} +2 -2
  52. package/dist/{delete-D2bUV6uo.mjs → delete-BxjJ66BS.mjs} +2 -2
  53. package/dist/{delete-Ur7b11no.mjs → delete-Dc8E5YwZ.mjs} +2 -2
  54. package/dist/{delete-table-Dd8X573t.mjs → delete-table-5AQpn8OB.mjs} +2 -2
  55. package/dist/{delete-D0f7VatX.mjs → delete-wFsy80db.mjs} +2 -2
  56. package/dist/{dependencies-XDVLBwko.mjs → dependencies-C1ogC3BV.mjs} +2 -2
  57. package/dist/{dirty-k-JmGLsS.mjs → dirty-CSLDYO-K.mjs} +1 -1
  58. package/dist/{document-BW9iow8R.mjs → document-BGzVip5_.mjs} +5 -5
  59. package/dist/{download-CQjPIYDO.mjs → download-Ddap1OAo.mjs} +1 -1
  60. package/dist/{eid-CNTKDgwj.mjs → eid-HnrWhPoe.mjs} +2 -2
  61. package/dist/{events-BshWlkDp.mjs → events-CXqetjcS.mjs} +2 -2
  62. package/dist/{export-Dq6ecU8h.mjs → export-IFZdgYZ2.mjs} +3 -3
  63. package/dist/{field-Bo2ISMO4.mjs → field-BJ6HoLRd.mjs} +4 -4
  64. package/dist/{fields-CVctqn5G.mjs → fields-DxHxuxwO.mjs} +2 -2
  65. package/dist/{get-Bl3OmlBP.mjs → get-B2pj2q3X.mjs} +2 -2
  66. package/dist/{get-BD81MHl_.mjs → get-BF2vdF3W.mjs} +2 -2
  67. package/dist/{get-Dw7jAno3.mjs → get-BGLvyOO3.mjs} +2 -2
  68. package/dist/{get-CrpwxWOV.mjs → get-BcoJ9Aha.mjs} +2 -2
  69. package/dist/{get-Df6cGHCM.mjs → get-BiPclcIP.mjs} +2 -2
  70. package/dist/{get-wjIgUlNl.mjs → get-C3cuZNeW.mjs} +2 -2
  71. package/dist/{get-RslzBaXx.mjs → get-CDnmpfHQ.mjs} +1 -1
  72. package/dist/{get-PWhOdz1z.mjs → get-CE9_4Q7E.mjs} +1 -1
  73. package/dist/{get-Dr-U321T2.mjs → get-C_tdSMwW2.mjs} +2 -2
  74. package/dist/{get-B4RgW-VT.mjs → get-CxUQyhte.mjs} +2 -2
  75. package/dist/{get-CTPvdcud.mjs → get-DW7mCaGe.mjs} +2 -2
  76. package/dist/{get-C5sWciaE.mjs → get-D_x-ENFe.mjs} +2 -2
  77. package/dist/{get-D4oGhZWX.mjs → get-DjlQhgD4.mjs} +2 -2
  78. package/dist/{get-BvgEF--n.mjs → get-DmKtPNOy.mjs} +2 -2
  79. package/dist/{get-DfMVlz64.mjs → get-Dtre5jzh.mjs} +1 -1
  80. package/dist/{get-CO6X4nZH.mjs → get-H6kInHIx.mjs} +3 -3
  81. package/dist/{get-7xTeNGAo.mjs → get-b0CoPz5B.mjs} +2 -2
  82. package/dist/{get-8b5Sh50q.mjs → get-eJilYnHk.mjs} +2 -2
  83. package/dist/{get-BtTetWzm.mjs → get-i0KInCw9.mjs} +3 -3
  84. package/dist/{get-BvSA_mmf.mjs → get-jofVjU6e.mjs} +2 -2
  85. package/dist/{get-run-CZdDqfUj.mjs → get-run-BE1HtJDW.mjs} +2 -2
  86. package/dist/git-sync-xKC1sqC4.mjs +28 -0
  87. package/dist/{has-remote-changes-i-3MVxat.mjs → has-remote-changes-Cj1KhBOT.mjs} +1 -1
  88. package/dist/{import-DWEKejya.mjs → import-DLb9VN4l.mjs} +3 -3
  89. package/dist/{input-DEvkIjGr.mjs → input-D5tQEfqN.mjs} +1 -1
  90. package/dist/{is-dirty-C5ipqd4v.mjs → is-dirty-BxtgV2xF.mjs} +1 -1
  91. package/dist/{items-hKJ2ZDwy.mjs → items-DLUYc5-z.mjs} +1 -1
  92. package/dist/{library-B7_04UVK.mjs → library-BNSxXOpc.mjs} +4 -4
  93. package/dist/{list-DKZnQ4Ts.mjs → list-B1soS8QW.mjs} +1 -1
  94. package/dist/{list-D6tTvYUP.mjs → list-BQnOEB3W.mjs} +1 -1
  95. package/dist/{list-CjNXskB4.mjs → list-BUz6KOfw.mjs} +1 -1
  96. package/dist/{list-CmFh1GQ_.mjs → list-BcP1DTJH.mjs} +1 -1
  97. package/dist/{list-eKDT1XXk.mjs → list-C5mS_ehX.mjs} +3 -3
  98. package/dist/{list-DfRqNH1N.mjs → list-CBLxhaNZ.mjs} +1 -1
  99. package/dist/{list-Bs7_Rysg.mjs → list-CERbeLbQ.mjs} +1 -1
  100. package/dist/{list-Cen-7uTo.mjs → list-COLpwXW4.mjs} +1 -1
  101. package/dist/{list-VNC-_E59.mjs → list-CQbiSx26.mjs} +1 -1
  102. package/dist/{list-DKcC4cm0.mjs → list-CX9qZ-bx.mjs} +1 -1
  103. package/dist/{list-B-9QOX9Y.mjs → list-CehE6KBV.mjs} +1 -1
  104. package/dist/{list-CHuhMXet.mjs → list-Cuhf2lKL.mjs} +2 -2
  105. package/dist/{list-CgH-H-O6.mjs → list-CzRzCbCY.mjs} +1 -1
  106. package/dist/{list-6myofqMv.mjs → list-D-SyhKFw.mjs} +2 -2
  107. package/dist/{list-CLZU_EOf.mjs → list-Dat8QNcf.mjs} +1 -1
  108. package/dist/{list-DI820W6w.mjs → list-M8J10Ozk.mjs} +1 -1
  109. package/dist/{list-oX2SMzxZ.mjs → list-Sd7jGZoX.mjs} +1 -1
  110. package/dist/{list-DjwnsyXM.mjs → list-cIMww2Me.mjs} +3 -3
  111. package/dist/{list-1vdClKSE.mjs → list-jhQSgh6i.mjs} +1 -1
  112. package/dist/{login-DumZaWXK.mjs → login-BfLqBfCd.mjs} +6 -6
  113. package/dist/{logout-BsXPRc-3.mjs → logout-BpRXB3Ze.mjs} +2 -2
  114. package/dist/{measure-BFxkbAoa.mjs → measure-Ds8O5Evr.mjs} +5 -5
  115. package/dist/{parameter-values-CoF9Hx1p.mjs → parameter-values-DhrkLXoN.mjs} +2 -2
  116. package/dist/{parse-id-DmFJgpY6.mjs → parse-id-DtM6q9HU.mjs} +1 -1
  117. package/dist/{path-BQ4lRDyN.mjs → path-_GHFrTLx.mjs} +2 -2
  118. package/dist/{poll-CZeXepUQ.mjs → poll-KLl4Eq8Y.mjs} +2 -2
  119. package/dist/{preflight-BTQe4swo.mjs → preflight-BpYtF0IU.mjs} +3 -3
  120. package/dist/{process-CTrfxxaC.mjs → process-CLtOWKBn.mjs} +1 -1
  121. package/dist/{publish-CFB2Cc5A.mjs → publish-D-7Zlmuk.mjs} +3 -3
  122. package/dist/{query-BJbUnAHf.mjs → query-B1CZztxs.mjs} +2 -2
  123. package/dist/{query-CV2KCS5O.mjs → query-CxESKMve.mjs} +4 -4
  124. package/dist/{remove-collection-D3yvKH3e.mjs → remove-collection-C4saCFxz.mjs} +2 -2
  125. package/dist/{render-BJRCs7rA.mjs → render-6O_eF-P1.mjs} +2 -2
  126. package/dist/{replace-uj4WTqx_.mjs → replace-BuR4f2Ai.mjs} +3 -3
  127. package/dist/{rescan-values-CzxQU318.mjs → rescan-values-CNOiiWQ5.mjs} +2 -2
  128. package/dist/{run-B2f_omHu.mjs → run-DijA_BXt.mjs} +2 -2
  129. package/dist/{run-DlO1J1Sx.mjs → run-FmRruANb.mjs} +21 -7
  130. package/dist/{run-yX2dtmE5.mjs → run-QEUbWNm7.mjs} +7 -7
  131. package/dist/{runs-DzUO45wU.mjs → runs-BSlhVeDO.mjs} +2 -2
  132. package/dist/{runtime-arKqJqIT.mjs → runtime-Dtb93zKy.mjs} +2 -2
  133. package/dist/{schema-tables-DZCNzuQ6.mjs → schema-tables-BE3rEb6I.mjs} +2 -2
  134. package/dist/{schemas-2ejqaVsG.mjs → schemas-yDjBiwlH.mjs} +2 -2
  135. package/dist/{search-DcihauDZ.mjs → search-CR_xNArA.mjs} +2 -2
  136. package/dist/{segment-BQT2poPG.mjs → segment-Cm6zQjJW.mjs} +5 -5
  137. package/dist/{selectors-BzestDld.mjs → selectors-C-vgMcGK.mjs} +2 -2
  138. package/dist/{send-DMxoLFo7.mjs → send-kC8oerkT.mjs} +2 -2
  139. package/dist/{set-active-RrvWR9NY.mjs → set-active-lDKhAlij.mjs} +1 -1
  140. package/dist/{set-CDmiD0vv.mjs → set-tFhPkxrL.mjs} +2 -2
  141. package/dist/{setting-BiBLCcxz.mjs → setting-DrJXCaFE.mjs} +3 -3
  142. package/dist/{setup-DYsTzkWO.mjs → setup-BWY9M0iR.mjs} +2 -2
  143. package/dist/{signal-k7cm5N6h.mjs → signal-Csom0mt5.mjs} +1 -1
  144. package/dist/{skill-list-D9_1Pmt7.mjs → skill-list-CCes8pKe.mjs} +1 -1
  145. package/dist/{skills-BPHXUfeL.mjs → skills-DE9ej5Rg.mjs} +2 -2
  146. package/dist/{skills-C3bxxC6a.mjs → skills-DPRN2384.mjs} +3 -3
  147. package/dist/{snippet-BtfxE60H.mjs → snippet-DWHTSo9c.mjs} +5 -5
  148. package/dist/{stash-DdheS0Ad.mjs → stash-C9oDvQ9P.mjs} +3 -3
  149. package/dist/{status-CXouQJ31.mjs → status-CkpujA26.mjs} +2 -2
  150. package/dist/{status-BuIzXRX1.mjs → status-DSdXmNC3.mjs} +2 -2
  151. package/dist/{subscription-CJ8Igs1U.mjs → subscription-DKOKoHRG.mjs} +5 -5
  152. package/dist/{subscriptions-D0NpGvCQ.mjs → subscriptions-C5SyJL4B.mjs} +3 -3
  153. package/dist/{summary-D04S8gGj.mjs → summary-DTPgXsc0.mjs} +2 -2
  154. package/dist/{sync-schema-DrA5zkdl.mjs → sync-schema-DKKkNSR7.mjs} +3 -3
  155. package/dist/{sync-task-BXeWuARG.mjs → sync-task-BtDnTXCP.mjs} +2 -1
  156. package/dist/{table-Dntbz7Q2.mjs → table-I8NXSdUC.mjs} +4 -4
  157. package/dist/{timeline-8jwsldo3.mjs → timeline-B_ESH-6W.mjs} +7 -7
  158. package/dist/{timeline-event-BbB1xEdI.mjs → timeline-event-n4Lzet7l.mjs} +5 -5
  159. package/dist/transform-BNuNiH9d.mjs +28 -0
  160. package/dist/transform-job-B7yc6dfH.mjs +22 -0
  161. package/dist/{transform-tag-PjryheLF.mjs → transform-tag-D6NXqWaX.mjs} +4 -4
  162. package/dist/{transform-test-DSTkKKNC.mjs → transform-test-C1Oqtfb-.mjs} +6 -6
  163. package/dist/{transforms-CijX3VE7.mjs → transforms-O4NtXqFz.mjs} +2 -2
  164. package/dist/transport-CyVo29u7.mjs +313 -0
  165. package/dist/{tree-Cmb3O6rH.mjs → tree-CuyF116R.mjs} +1 -1
  166. package/dist/{unpublish-DkP_AcK5.mjs → unpublish-DvWefKJi.mjs} +2 -2
  167. package/dist/{update-FCP5Lop2.mjs → update-2KIpYgyj.mjs} +3 -3
  168. package/dist/{update-8UmD1prT.mjs → update-76nzOc71.mjs} +3 -3
  169. package/dist/{update-D9kOTr0n.mjs → update-7oKvP1HC.mjs} +4 -4
  170. package/dist/{update-D6Zzvc7F.mjs → update-AJ2JmwDl.mjs} +3 -3
  171. package/dist/{update-CtLbFCd_.mjs → update-BB6Go_RX.mjs} +3 -3
  172. package/dist/{update-C91m9YAR.mjs → update-Bah7N8QX.mjs} +4 -4
  173. package/dist/{update-D8htjzNJ.mjs → update-CGJvIS-l.mjs} +3 -3
  174. package/dist/{update-BrXGg3QO.mjs → update-D7dG7H-z.mjs} +4 -4
  175. package/dist/{update-BFyRBc-H.mjs → update-DOdcflLH.mjs} +4 -4
  176. package/dist/{update-KSHnb6vB.mjs → update-DV54H3L5.mjs} +5 -5
  177. package/dist/{update-DPTio6i1.mjs → update-DXmZuJho.mjs} +3 -3
  178. package/dist/{update-Dz47cKBk.mjs → update-DmgRIp7o.mjs} +3 -3
  179. package/dist/{update-DlWB9s0v.mjs → update-H_fdjugs.mjs} +3 -3
  180. package/dist/{update-DubrpPbz.mjs → update-To6A1Ugu.mjs} +3 -3
  181. package/dist/{update-dashcard-BlibHa5o.mjs → update-dashcard-DjT5QOkL.mjs} +3 -3
  182. package/dist/{update-Ci8YL4_2.mjs → update-l3PyNQKG.mjs} +4 -4
  183. package/dist/{update-COcx61Ur.mjs → update-xEegxIyH.mjs} +3 -3
  184. package/dist/{upgrade-EwL6wPSY.mjs → upgrade-CuJx9fX4.mjs} +4 -4
  185. package/dist/{upload-BZshRJIM.mjs → upload-2YFFBSln.mjs} +3 -3
  186. package/dist/{upload-D0KaTqUE.mjs → upload-CboARPZm.mjs} +2 -2
  187. package/dist/{upload-Do2PBSeH.mjs → upload-DOO94rCQ.mjs} +2 -2
  188. package/dist/{uuid-DjKLDIVE.mjs → uuid-InwZlrpQ.mjs} +1 -1
  189. package/dist/{validate-xR_MHBNR.mjs → validate-D6-Vg_kn.mjs} +1 -1
  190. package/dist/{validate-query-D6_ad-Gi.mjs → validate-query-B90KYPQr.mjs} +1 -1
  191. package/dist/{values-Dc9612_L.mjs → values-CsZLk1Ls.mjs} +2 -2
  192. package/dist/{verify-DVN1eqXZ.mjs → verify-DrGjZwBM.mjs} +3 -3
  193. package/dist/{wait-C-ovOTAZ.mjs → wait-BmzdarP9.mjs} +4 -4
  194. package/dist/{wait-flags-BQNmuvIj.mjs → wait-flags-CiJGrTCT.mjs} +2 -2
  195. package/package.json +1 -1
  196. package/skill-data/core/SKILL.md +1 -1
  197. package/skill-data/transform/SKILL.md +5 -5
  198. package/skill-data/transform-test-plan/references/checks.md +3 -0
  199. package/dist/git-sync-BmoRk0UV.mjs +0 -28
  200. package/dist/transform-job-B-1YAbvy.mjs +0 -22
  201. package/dist/transform-m6s4kkWU.mjs +0 -28
@@ -8,11 +8,11 @@ var snippet_default = defineCommandGroup({
8
8
  purpose: "native-SQL snippets and body input"
9
9
  }],
10
10
  subCommands: {
11
- list: () => import("./list-CmFh1GQ_.mjs").then((mod) => mod.default),
12
- get: () => import("./get-Df6cGHCM.mjs").then((mod) => mod.default),
13
- create: () => import("./create-CvpeAcFc.mjs").then((mod) => mod.default),
14
- update: () => import("./update-D8htjzNJ.mjs").then((mod) => mod.default),
15
- archive: () => import("./archive-BMyvyf62.mjs").then((mod) => mod.default)
11
+ list: () => import("./list-BcP1DTJH.mjs").then((mod) => mod.default),
12
+ get: () => import("./get-BiPclcIP.mjs").then((mod) => mod.default),
13
+ create: () => import("./create-Dhai9zAt.mjs").then((mod) => mod.default),
14
+ update: () => import("./update-CGJvIS-l.mjs").then((mod) => mod.default),
15
+ archive: () => import("./archive-CdKf_Eqq.mjs").then((mod) => mod.default)
16
16
  }
17
17
  });
18
18
  //#endregion
@@ -1,9 +1,9 @@
1
1
  import { H as outputFlags, Q as ConfigError, U as profileFlag, p as renderSummary, z as connectionFlags } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-arKqJqIT.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-Dtb93zKy.mjs";
3
3
  import { l as SyncStashResult } from "./git-sync-BwBRmEhE.mjs";
4
- import { n as parseWaitFlags, t as gitSyncWaitFlags } from "./wait-flags-BQNmuvIj.mjs";
4
+ import { n as parseWaitFlags, t as gitSyncWaitFlags } from "./wait-flags-CiJGrTCT.mjs";
5
5
  import { s as syncStashView } from "./git-sync-TjX1r_wF.mjs";
6
- import { a as throwIfFailedTask, i as taskPollOptions, n as formatSyncTask } from "./sync-task-BXeWuARG.mjs";
6
+ import { a as throwIfFailedTask, i as taskPollOptions, n as formatSyncTask } from "./sync-task-BtDnTXCP.mjs";
7
7
  //#region src/commands/git-sync/stash.ts
8
8
  const DEFAULT_STASH_MESSAGE = "Stashed from mb CLI";
9
9
  var stash_default = defineMetabaseCommand({
@@ -1,8 +1,8 @@
1
1
  import { H as outputFlags, U as profileFlag, p as renderSummary, z as connectionFlags } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-arKqJqIT.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-Dtb93zKy.mjs";
3
3
  import { r as Collection } from "./collection-BxdPxD38.mjs";
4
4
  import { u as SyncTask } from "./git-sync-BwBRmEhE.mjs";
5
- import { n as formatSyncTask } from "./sync-task-BXeWuARG.mjs";
5
+ import { n as formatSyncTask } from "./sync-task-BtDnTXCP.mjs";
6
6
  import { z } from "zod";
7
7
  //#region src/commands/git-sync/status.ts
8
8
  const SyncedCollection = Collection.pick({
@@ -1,6 +1,6 @@
1
1
  import { H as outputFlags, U as profileFlag, u as renderItem } from "./cli.mjs";
2
- import { C as ProbedUser, E as profileAuthMethod, T as ProfileLastFailure, X as summarizeServer, Y as ServerSummary, _ as readProfileRecord, l as resolveProfileName, q as displayUrl, t as defineMetabaseCommand, w as ProfileAuthMethod } from "./runtime-arKqJqIT.mjs";
3
- import { a as renderUserRole, i as renderUserName, n as renderSkew, o as renderVersionTag, r as renderTimestamp, t as renderAuthMethod } from "./render-BJRCs7rA.mjs";
2
+ import { C as ProbedUser, E as profileAuthMethod, T as ProfileLastFailure, X as summarizeServer, Y as ServerSummary, _ as readProfileRecord, l as resolveProfileName, q as displayUrl, t as defineMetabaseCommand, w as ProfileAuthMethod } from "./runtime-Dtb93zKy.mjs";
3
+ import { a as renderUserRole, i as renderUserName, n as renderSkew, o as renderVersionTag, r as renderTimestamp, t as renderAuthMethod } from "./render-6O_eF-P1.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/commands/auth/status.ts
6
6
  const AuthStatus = z.object({
@@ -11,11 +11,11 @@ var subscription_default = defineCommandGroup({
11
11
  purpose: "the dashboard and dashcards a subscription delivers"
12
12
  }],
13
13
  subCommands: {
14
- list: () => import("./list-DKcC4cm0.mjs").then((mod) => mod.default),
15
- get: () => import("./get-Dr-U321T2.mjs").then((mod) => mod.default),
16
- create: () => import("./create-DmKwDQCY2.mjs").then((mod) => mod.default),
17
- update: () => import("./update-D6Zzvc7F.mjs").then((mod) => mod.default),
18
- archive: () => import("./archive-Cq3fnc0v2.mjs").then((mod) => mod.default)
14
+ list: () => import("./list-CX9qZ-bx.mjs").then((mod) => mod.default),
15
+ get: () => import("./get-C_tdSMwW2.mjs").then((mod) => mod.default),
16
+ create: () => import("./create-BcsVwXgS2.mjs").then((mod) => mod.default),
17
+ update: () => import("./update-AJ2JmwDl.mjs").then((mod) => mod.default),
18
+ archive: () => import("./archive-52ZHbFDm2.mjs").then((mod) => mod.default)
19
19
  }
20
20
  });
21
21
  //#endregion
@@ -1,9 +1,9 @@
1
1
  import { B as listFlags, H as outputFlags, U as profileFlag, d as renderList, z as connectionFlags } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-arKqJqIT.mjs";
3
- import { t as parseId } from "./parse-id-DmFJgpY6.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-Dtb93zKy.mjs";
3
+ import { t as parseId } from "./parse-id-DtM6q9HU.mjs";
4
4
  import { n as windowList } from "./window-DSb1tqSe.mjs";
5
5
  import { t as pulseView } from "./pulse-x0gFxWfG.mjs";
6
- import { SubscriptionListEnvelope } from "./list-DKcC4cm0.mjs";
6
+ import { SubscriptionListEnvelope } from "./list-CX9qZ-bx.mjs";
7
7
  //#region src/commands/dashboard/subscriptions.ts
8
8
  var subscriptions_default = defineMetabaseCommand({
9
9
  meta: {
@@ -1,6 +1,6 @@
1
1
  import { H as outputFlags, U as profileFlag, u as renderItem, z as connectionFlags } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-arKqJqIT.mjs";
3
- import { t as parseId } from "./parse-id-DmFJgpY6.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-Dtb93zKy.mjs";
3
+ import { t as parseId } from "./parse-id-DtM6q9HU.mjs";
4
4
  import { s as FieldSummary } from "./field-CcN4oZy6.mjs";
5
5
  import { t as fieldSummaryView } from "./field-fDtIrY6D.mjs";
6
6
  //#region src/commands/field/summary.ts
@@ -1,9 +1,9 @@
1
1
  import { H as outputFlags, U as profileFlag, p as renderSummary, z as connectionFlags } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-arKqJqIT.mjs";
3
- import { t as parseId } from "./parse-id-DmFJgpY6.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-Dtb93zKy.mjs";
3
+ import { t as parseId } from "./parse-id-DtM6q9HU.mjs";
4
4
  import { a as DatabaseSyncResult } from "./database-JtHTqSpq.mjs";
5
5
  import { t as databaseSyncResultView } from "./database-C3E9PZSx.mjs";
6
- import { i as waitFlags, n as parseWaitFlags } from "./wait-flags-BQNmuvIj.mjs";
6
+ import { i as waitFlags, n as parseWaitFlags } from "./wait-flags-CiJGrTCT.mjs";
7
7
  //#region src/commands/db/sync-schema.ts
8
8
  var sync_schema_default = defineMetabaseCommand({
9
9
  meta: {
@@ -1,3 +1,4 @@
1
+ import { $ as FailedResultError } from "./cli.mjs";
1
2
  import { f as isSyncTaskFailed, u as SyncTask } from "./git-sync-BwBRmEhE.mjs";
2
3
  import { z } from "zod";
3
4
  //#region src/commands/git-sync/sync-task.ts
@@ -19,7 +20,7 @@ function taskPollOptions(schedule) {
19
20
  function throwIfFailedTask(final, verb) {
20
21
  if (final === null || !isSyncTaskFailed(final.status)) return;
21
22
  const detail = final.error_message ? `: ${final.error_message}` : "";
22
- throw new Error(`git-sync ${verb} ${final.status}${detail}`);
23
+ throw new FailedResultError(`git-sync ${verb} ${final.status}${detail}`);
23
24
  }
24
25
  function formatSyncTask(task) {
25
26
  const label = `${task.sync_task_type === "export" ? "Export" : "Import"} task #${task.id}`;
@@ -8,10 +8,10 @@ var table_default = defineCommandGroup({
8
8
  purpose: "table and column metadata, semantic types, visibility"
9
9
  }],
10
10
  subCommands: {
11
- list: () => import("./list-6myofqMv.mjs").then((m) => m.default),
12
- get: () => import("./get-C5sWciaE.mjs").then((m) => m.default),
13
- fields: () => import("./fields-CVctqn5G.mjs").then((m) => m.default),
14
- update: () => import("./update-DPTio6i1.mjs").then((m) => m.default)
11
+ list: () => import("./list-D-SyhKFw.mjs").then((m) => m.default),
12
+ get: () => import("./get-D_x-ENFe.mjs").then((m) => m.default),
13
+ fields: () => import("./fields-DxHxuxwO.mjs").then((m) => m.default),
14
+ update: () => import("./update-DXmZuJho.mjs").then((m) => m.default)
15
15
  }
16
16
  });
17
17
  //#endregion
@@ -8,13 +8,13 @@ var timeline_default = defineCommandGroup({
8
8
  purpose: "collection scoping — events render only on questions in the timeline's collection"
9
9
  }],
10
10
  subCommands: {
11
- list: () => import("./list-1vdClKSE.mjs").then((mod) => mod.default),
12
- get: () => import("./get-wjIgUlNl.mjs").then((mod) => mod.default),
13
- events: () => import("./events-BshWlkDp.mjs").then((mod) => mod.default),
14
- create: () => import("./create-CoFg1p6m.mjs").then((mod) => mod.default),
15
- update: () => import("./update-DlWB9s0v.mjs").then((mod) => mod.default),
16
- archive: () => import("./archive-Czo5T0Lp.mjs").then((mod) => mod.default),
17
- delete: () => import("./delete-D0f7VatX.mjs").then((mod) => mod.default)
11
+ list: () => import("./list-jhQSgh6i.mjs").then((mod) => mod.default),
12
+ get: () => import("./get-C3cuZNeW.mjs").then((mod) => mod.default),
13
+ events: () => import("./events-CXqetjcS.mjs").then((mod) => mod.default),
14
+ create: () => import("./create-YetX69Re.mjs").then((mod) => mod.default),
15
+ update: () => import("./update-H_fdjugs.mjs").then((mod) => mod.default),
16
+ archive: () => import("./archive-cAdUa1-2.mjs").then((mod) => mod.default),
17
+ delete: () => import("./delete-wFsy80db.mjs").then((mod) => mod.default)
18
18
  }
19
19
  });
20
20
  //#endregion
@@ -8,11 +8,11 @@ var timeline_event_default = defineCommandGroup({
8
8
  purpose: "required event fields and timeline collection scoping"
9
9
  }],
10
10
  subCommands: {
11
- get: () => import("./get-BD81MHl_.mjs").then((mod) => mod.default),
12
- create: () => import("./create-CMV3qlzJ.mjs").then((mod) => mod.default),
13
- update: () => import("./update-DubrpPbz.mjs").then((mod) => mod.default),
14
- archive: () => import("./archive-eS-XA74p.mjs").then((mod) => mod.default),
15
- delete: () => import("./delete-CowGO4rh.mjs").then((mod) => mod.default)
11
+ get: () => import("./get-BF2vdF3W.mjs").then((mod) => mod.default),
12
+ create: () => import("./create-DWFJdyIr.mjs").then((mod) => mod.default),
13
+ update: () => import("./update-To6A1Ugu.mjs").then((mod) => mod.default),
14
+ archive: () => import("./archive-B51prFgS.mjs").then((mod) => mod.default),
15
+ delete: () => import("./delete--15it-A8.mjs").then((mod) => mod.default)
16
16
  }
17
17
  });
18
18
  //#endregion
@@ -0,0 +1,28 @@
1
+ import { t as defineCommandGroup } from "./group-YQQ5GIcP.mjs";
2
+ //#region src/commands/transform/index.ts
3
+ var transform_default = defineCommandGroup({
4
+ name: "transform",
5
+ description: "Manage Metabase transforms",
6
+ skills: [{
7
+ skill: "transform",
8
+ purpose: "body shape, run-with-wait, iterate"
9
+ }, {
10
+ skill: "mbql",
11
+ purpose: "MBQL source.query bodies"
12
+ }],
13
+ subCommands: {
14
+ list: () => import("./list-M8J10Ozk.mjs").then((mod) => mod.default),
15
+ get: () => import("./get-b0CoPz5B.mjs").then((mod) => mod.default),
16
+ dependencies: () => import("./dependencies-C1ogC3BV.mjs").then((mod) => mod.default),
17
+ create: () => import("./create-D--Z1S3p2.mjs").then((mod) => mod.default),
18
+ update: () => import("./update-DV54H3L5.mjs").then((mod) => mod.default),
19
+ delete: () => import("./delete-BxjJ66BS.mjs").then((mod) => mod.default),
20
+ "delete-table": () => import("./delete-table-5AQpn8OB.mjs").then((mod) => mod.default),
21
+ run: () => import("./run-QEUbWNm7.mjs").then((mod) => mod.default),
22
+ cancel: () => import("./cancel-DpDcVY7M.mjs").then((mod) => mod.default),
23
+ "get-run": () => import("./get-run-BE1HtJDW.mjs").then((mod) => mod.default),
24
+ runs: () => import("./runs-BSlhVeDO.mjs").then((mod) => mod.default)
25
+ }
26
+ });
27
+ //#endregion
28
+ export { transform_default as default };
@@ -0,0 +1,22 @@
1
+ import { t as defineCommandGroup } from "./group-YQQ5GIcP.mjs";
2
+ //#region src/commands/transform-job/index.ts
3
+ var transform_job_default = defineCommandGroup({
4
+ name: "transform-job",
5
+ description: "Manage Metabase transform jobs",
6
+ skills: [{
7
+ skill: "transform",
8
+ purpose: "tag-driven job schedules"
9
+ }],
10
+ subCommands: {
11
+ list: () => import("./list-CzRzCbCY.mjs").then((mod) => mod.default),
12
+ get: () => import("./get-DjlQhgD4.mjs").then((mod) => mod.default),
13
+ create: () => import("./create-CHr8MPPq.mjs").then((mod) => mod.default),
14
+ update: () => import("./update-DmgRIp7o.mjs").then((mod) => mod.default),
15
+ delete: () => import("./delete-Dc8E5YwZ.mjs").then((mod) => mod.default),
16
+ run: () => import("./run-DijA_BXt.mjs").then((mod) => mod.default),
17
+ transforms: () => import("./transforms-O4NtXqFz.mjs").then((mod) => mod.default),
18
+ "set-active": () => import("./set-active-lDKhAlij.mjs").then((mod) => mod.default)
19
+ }
20
+ });
21
+ //#endregion
22
+ export { transform_job_default as default };
@@ -8,10 +8,10 @@ var transform_tag_default = defineCommandGroup({
8
8
  purpose: "tags that drive job schedules"
9
9
  }],
10
10
  subCommands: {
11
- list: () => import("./list-CLZU_EOf.mjs").then((mod) => mod.default),
12
- create: () => import("./create-CWGsiFvU.mjs").then((mod) => mod.default),
13
- update: () => import("./update-CtLbFCd_.mjs").then((mod) => mod.default),
14
- delete: () => import("./delete-BOcPK_H9.mjs").then((mod) => mod.default)
11
+ list: () => import("./list-Dat8QNcf.mjs").then((mod) => mod.default),
12
+ create: () => import("./create--fiwuTWc.mjs").then((mod) => mod.default),
13
+ update: () => import("./update-BB6Go_RX.mjs").then((mod) => mod.default),
14
+ delete: () => import("./delete-BudvZkvK.mjs").then((mod) => mod.default)
15
15
  }
16
16
  });
17
17
  //#endregion
@@ -4,12 +4,12 @@ var transform_test_default = defineCommandGroup({
4
4
  name: "transform-test",
5
5
  description: "Manage transform tests — fixtures and expectations run against temp tables",
6
6
  subCommands: {
7
- list: () => import("./list-CHuhMXet.mjs").then((mod) => mod.default),
8
- get: () => import("./get-BtTetWzm.mjs").then((mod) => mod.default),
9
- create: () => import("./create-uanpKsPo.mjs").then((mod) => mod.default),
10
- update: () => import("./update-Ci8YL4_2.mjs").then((mod) => mod.default),
11
- delete: () => import("./delete-DZ_ICQug.mjs").then((mod) => mod.default),
12
- run: () => import("./run-DlO1J1Sx.mjs").then((mod) => mod.default)
7
+ list: () => import("./list-Cuhf2lKL.mjs").then((mod) => mod.default),
8
+ get: () => import("./get-i0KInCw9.mjs").then((mod) => mod.default),
9
+ create: () => import("./create-DiJ8bUb-.mjs").then((mod) => mod.default),
10
+ update: () => import("./update-l3PyNQKG.mjs").then((mod) => mod.default),
11
+ delete: () => import("./delete-Bsdwqh7H.mjs").then((mod) => mod.default),
12
+ run: () => import("./run-FmRruANb.mjs").then((mod) => mod.default)
13
13
  }
14
14
  });
15
15
  //#endregion
@@ -1,6 +1,6 @@
1
1
  import { B as listFlags, G as listEnvelopeSchema, H as outputFlags, U as profileFlag, d as renderList, z as connectionFlags } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-arKqJqIT.mjs";
3
- import { t as parseId } from "./parse-id-DmFJgpY6.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-Dtb93zKy.mjs";
3
+ import { t as parseId } from "./parse-id-DtM6q9HU.mjs";
4
4
  import { n as windowList } from "./window-DSb1tqSe.mjs";
5
5
  import { n as TransformCompact } from "./transform-DiW7bREn.mjs";
6
6
  import { n as transformView } from "./transform-CtqB1WYo.mjs";
@@ -0,0 +1,313 @@
1
+ import { it as TimeoutError, n as methodRequirements, nt as NetworkError, ot as ValidationError, rt as ResponseShapeError, st as errorMessage } from "./cli.mjs";
2
+ import { $ as createServerProfile, B as JSON_CONTENT_TYPE, F as buildNetworkError, G as credentialSecrets, I as isConnectionClosed, J as normalizeUrl, L as HttpError, U as assertCredentialHeaderSafe, V as parseJson, W as credentialAuthHeader, Z as checkFeatures, et as probeServer, tt as CapabilityError, z as isRetryableStatus } from "./runtime-Dtb93zKy.mjs";
3
+ import { n as throwIfAborted, r as untilAborted, t as combineAborts } from "./signal-Csom0mt5.mjs";
4
+ import { setTimeout } from "node:timers/promises";
5
+ //#region ../client/src/http/response-shape.ts
6
+ async function parseJsonResponse(text, schema, context) {
7
+ try {
8
+ return parseJson(text, schema, { source: context.url });
9
+ } catch (error) {
10
+ if (error instanceof ValidationError) throw ResponseShapeError.fromZodIssues({
11
+ kind: "zod",
12
+ method: context.method,
13
+ url: context.url,
14
+ status: context.status,
15
+ zodIssues: error.developerDetail.zodIssues,
16
+ serverTag: await context.getServerTag(),
17
+ serverSkew: context.serverSkew
18
+ });
19
+ throw error;
20
+ }
21
+ }
22
+ //#endregion
23
+ //#region ../client/src/http/retry.ts
24
+ const BASE_DELAY_MS = 250;
25
+ const MAX_DELAY_MS = 8e3;
26
+ const MS_PER_SECOND = 1e3;
27
+ function backoffDelay({ attempt, retryAfterHeader }) {
28
+ const fromHeader = parseRetryAfter(retryAfterHeader);
29
+ if (fromHeader !== null) return fromHeader;
30
+ return Math.min(MAX_DELAY_MS, BASE_DELAY_MS * 2 ** attempt);
31
+ }
32
+ function parseRetryAfter(header) {
33
+ if (!header) return null;
34
+ const numeric = Number(header);
35
+ if (Number.isFinite(numeric) && numeric >= 0) return Math.round(numeric * MS_PER_SECOND);
36
+ const dateMs = Date.parse(header);
37
+ if (Number.isFinite(dateMs)) return Math.max(0, dateMs - Date.now());
38
+ return null;
39
+ }
40
+ function sleep(ms, signal) {
41
+ return setTimeout(ms, void 0, { signal });
42
+ }
43
+ async function runWithRetries(attempt, signal) {
44
+ let attemptIndex = 0;
45
+ while (true) {
46
+ const outcome = await attempt(attemptIndex);
47
+ if (outcome.kind === "success") return outcome.response;
48
+ await sleep(outcome.delayMs, signal);
49
+ attemptIndex += 1;
50
+ }
51
+ }
52
+ //#endregion
53
+ //#region ../client/src/http/transport.ts
54
+ const UNAUTHORIZED_STATUS = 401;
55
+ const DEFAULT_TIMEOUT_MS = 3e4;
56
+ const OCTET_STREAM_CONTENT_TYPE = "application/octet-stream";
57
+ const TEXT_CONTENT_TYPE_PREFIX = "text/";
58
+ const ERROR_BODY_BYTE_CAP = 64 * 1024;
59
+ const IDEMPOTENT_METHODS = /* @__PURE__ */ new Set([
60
+ "GET",
61
+ "HEAD",
62
+ "OPTIONS"
63
+ ]);
64
+ function createTransport(config, options) {
65
+ const baseUrl = normalizeUrl(config.url);
66
+ assertCredentialHeaderSafe(config.credential);
67
+ const fetchImpl = options.fetchImpl ?? globalThis.fetch.bind(globalThis);
68
+ let settledProfile = options.server ?? null;
69
+ const getServerTag = options.getServerTag ?? (async () => tagOf(settledProfile));
70
+ const serverSkew = () => settledProfile === null ? null : settledProfile.skew;
71
+ const refreshCredential = options.refreshCredential;
72
+ let credential = config.credential;
73
+ const knownSecrets = new Set(credentialSecrets(credential));
74
+ const redactionContext = { knownSecrets };
75
+ let refreshInFlight = null;
76
+ function tryRefreshCredential() {
77
+ const refresh = refreshCredential;
78
+ if (credential.kind !== "oauth" || refresh === void 0) return Promise.resolve(false);
79
+ refreshInFlight ??= refreshOnce(refresh).finally(() => {
80
+ refreshInFlight = null;
81
+ });
82
+ return refreshInFlight;
83
+ }
84
+ async function refreshOnce(refresh) {
85
+ const next = await refresh();
86
+ if (next === null) return false;
87
+ credential = next;
88
+ for (const secret of credentialSecrets(next)) knownSecrets.add(secret);
89
+ return true;
90
+ }
91
+ async function attemptOnce(prepared, attempt) {
92
+ const hasRetriesLeft = attempt < prepared.retries;
93
+ const timeoutSignal = AbortSignal.timeout(prepared.timeoutMs);
94
+ const combined = combineAborts(timeoutSignal, prepared.cancelSignal);
95
+ let response;
96
+ try {
97
+ response = await fetchImpl(prepared.url, {
98
+ method: prepared.method,
99
+ headers: prepared.headers,
100
+ body: prepared.body,
101
+ signal: combined
102
+ });
103
+ } catch (error) {
104
+ throwIfAborted(prepared.cancelSignal);
105
+ const isStaleSocketFirstTry = attempt === 0 && isConnectionClosed(error);
106
+ if (prepared.idempotent && (hasRetriesLeft || isStaleSocketFirstTry)) return {
107
+ kind: "retry",
108
+ delayMs: backoffDelay({ attempt })
109
+ };
110
+ if (timeoutSignal.aborted) throw new TimeoutError(`Request timed out after ${prepared.timeoutMs}ms`, {
111
+ kind: "http",
112
+ method: prepared.method,
113
+ url: prepared.url,
114
+ timeoutMs: prepared.timeoutMs
115
+ });
116
+ throw buildNetworkError(error, prepared.method, prepared.url);
117
+ }
118
+ const canRetryStatus = hasRetriesLeft && prepared.idempotent;
119
+ if (!response.ok && isRetryableStatus(response.status) && canRetryStatus) {
120
+ const retryAfter = response.headers.get("Retry-After");
121
+ response.body?.cancel().catch(() => void 0);
122
+ return {
123
+ kind: "retry",
124
+ delayMs: backoffDelay({
125
+ attempt,
126
+ retryAfterHeader: retryAfter
127
+ })
128
+ };
129
+ }
130
+ if (!response.ok) {
131
+ const rawBody = await readBodyForError(response);
132
+ const serverTag = await getServerTag();
133
+ throw new HttpError({
134
+ status: response.status,
135
+ statusText: response.statusText,
136
+ method: prepared.method,
137
+ url: prepared.url,
138
+ responseHeaders: response.headers,
139
+ rawBody,
140
+ serverTag,
141
+ redactionContext
142
+ });
143
+ }
144
+ assertContentType(response, prepared);
145
+ return {
146
+ kind: "success",
147
+ response
148
+ };
149
+ }
150
+ async function executeRaw(prepared) {
151
+ try {
152
+ return await runWithRetries((attempt) => attemptOnce(prepared, attempt), prepared.cancelSignal);
153
+ } catch (error) {
154
+ throwIfAborted(prepared.cancelSignal);
155
+ throw error;
156
+ }
157
+ }
158
+ async function executeWithAuthRefresh(path, opts) {
159
+ const prepared = prepare(path, opts);
160
+ try {
161
+ return {
162
+ response: await executeRaw(prepared),
163
+ prepared
164
+ };
165
+ } catch (error) {
166
+ if (error instanceof HttpError && error.status === UNAUTHORIZED_STATUS) {
167
+ if (await tryRefreshCredential()) {
168
+ const retried = prepare(path, opts);
169
+ return {
170
+ response: await executeRaw(retried),
171
+ prepared: retried
172
+ };
173
+ }
174
+ }
175
+ throw error;
176
+ }
177
+ }
178
+ function prepare(path, opts = {}) {
179
+ const method = opts.method ?? "GET";
180
+ const expectContentType = opts.expectContentType ?? "json";
181
+ const url = buildUrl(baseUrl, path, opts.query);
182
+ const headers = new Headers();
183
+ const auth = credentialAuthHeader(credential);
184
+ headers.set(auth.name, auth.value);
185
+ headers.set("accept", acceptHeader(expectContentType));
186
+ headers.set("user-agent", options.userAgent);
187
+ let body = null;
188
+ if (opts.body !== void 0 && opts.body !== null) if (typeof opts.body === "string" || opts.body instanceof URLSearchParams) body = opts.body;
189
+ else if (opts.body instanceof FormData || opts.body instanceof ReadableStream) body = opts.body;
190
+ else if (opts.body instanceof Uint8Array) {
191
+ body = opts.body;
192
+ headers.set("content-type", OCTET_STREAM_CONTENT_TYPE);
193
+ } else {
194
+ body = JSON.stringify(opts.body);
195
+ headers.set("content-type", JSON_CONTENT_TYPE);
196
+ }
197
+ return {
198
+ url,
199
+ method,
200
+ headers,
201
+ body,
202
+ expectContentType,
203
+ retries: opts.retries ?? 3,
204
+ idempotent: opts.idempotent ?? IDEMPOTENT_METHODS.has(method),
205
+ timeoutMs: opts.timeoutMs ?? 3e4,
206
+ cancelSignal: combineAborts(opts.signal, options.signal)
207
+ };
208
+ }
209
+ let serverProfile = options.server === void 0 ? null : Promise.resolve(options.server);
210
+ async function server(wait = {}) {
211
+ throwIfAborted(wait.signal);
212
+ if (serverProfile === null) {
213
+ const probe = probeServer(transport).then((info) => {
214
+ settledProfile = createServerProfile(info);
215
+ return settledProfile;
216
+ });
217
+ probe.catch(() => {
218
+ serverProfile = null;
219
+ });
220
+ serverProfile = probe;
221
+ }
222
+ return untilAborted(serverProfile, wait.signal);
223
+ }
224
+ const enforceRequirements = options.enforceRequirements ?? true;
225
+ async function requireFeatures(features, wait = {}) {
226
+ if (!enforceRequirements || features.length === 0) return;
227
+ const failure = checkFeatures(features, await server(wait));
228
+ if (failure !== null) throw new CapabilityError(failure);
229
+ }
230
+ async function requireMethod(key, wait = {}) {
231
+ return requireFeatures(methodRequirements(key), wait);
232
+ }
233
+ const transport = {
234
+ server,
235
+ require: requireMethod,
236
+ requireFeatures,
237
+ async requestRaw(path, opts) {
238
+ return (await executeWithAuthRefresh(path, opts ?? {})).response;
239
+ },
240
+ async requestParsed(schema, path, opts) {
241
+ const { response, prepared } = await executeWithAuthRefresh(path, {
242
+ ...opts,
243
+ expectContentType: "json"
244
+ });
245
+ return parseJsonResponse(await response.text(), schema, {
246
+ method: prepared.method,
247
+ url: prepared.url,
248
+ status: response.status,
249
+ getServerTag,
250
+ serverSkew: serverSkew()
251
+ });
252
+ },
253
+ async requestStream(path, opts) {
254
+ const { response, prepared } = await executeWithAuthRefresh(path, {
255
+ ...opts,
256
+ expectContentType: opts?.expectContentType ?? "binary"
257
+ });
258
+ if (!response.body) throw new NetworkError("Response had no body to stream", {
259
+ method: prepared.method,
260
+ url: prepared.url,
261
+ cause: "missing body"
262
+ });
263
+ return response.body;
264
+ }
265
+ };
266
+ return transport;
267
+ }
268
+ function tagOf(profile) {
269
+ return profile === null ? null : profile.version.tag;
270
+ }
271
+ function buildUrl(baseUrl, path, query) {
272
+ const normalizedPath = path.startsWith("/") ? path : `/${path}`;
273
+ const target = new URL(baseUrl + normalizedPath);
274
+ if (query) for (const [key, value] of Object.entries(query)) {
275
+ if (value === void 0) continue;
276
+ if (Array.isArray(value)) for (const entry of value) target.searchParams.append(key, String(entry));
277
+ else target.searchParams.append(key, String(value));
278
+ }
279
+ return target.toString();
280
+ }
281
+ function acceptHeader(expected) {
282
+ if (expected === "json") return JSON_CONTENT_TYPE;
283
+ if (expected === "text") return "text/*";
284
+ return "*/*";
285
+ }
286
+ function assertContentType(response, prepared) {
287
+ if (prepared.expectContentType === "binary") return;
288
+ const contentType = response.headers.get("content-type");
289
+ if (contentType === null) throwContentTypeMismatch(response, prepared, prepared.expectContentType);
290
+ if (prepared.expectContentType === "json" && !contentType.includes("application/json")) throwContentTypeMismatch(response, prepared, "json");
291
+ if (prepared.expectContentType === "text" && !contentType.startsWith(TEXT_CONTENT_TYPE_PREFIX)) throwContentTypeMismatch(response, prepared, "text");
292
+ }
293
+ function throwContentTypeMismatch(response, prepared, expected) {
294
+ const actual = response.headers.get("content-type") ?? "no content-type";
295
+ throw new HttpError({
296
+ status: response.status,
297
+ statusText: response.statusText,
298
+ method: prepared.method,
299
+ url: prepared.url,
300
+ responseHeaders: response.headers,
301
+ rawBody: null,
302
+ overrideUserMessage: `Expected ${expected} response but got ${actual}`
303
+ });
304
+ }
305
+ async function readBodyForError(response) {
306
+ try {
307
+ return Buffer.from(await response.arrayBuffer()).subarray(0, ERROR_BODY_BYTE_CAP).toString("utf8");
308
+ } catch (error) {
309
+ return `[body read failed: ${errorMessage(error)}]`;
310
+ }
311
+ }
312
+ //#endregion
313
+ export { createTransport as n, DEFAULT_TIMEOUT_MS as t };
@@ -1,5 +1,5 @@
1
1
  import { H as outputFlags, Q as ConfigError, U as profileFlag, m as writeJson, z as connectionFlags } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-arKqJqIT.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-Dtb93zKy.mjs";
3
3
  import { m as CollectionTreeNode } from "./collection-BxdPxD38.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/commands/collection/tree.ts
@@ -1,6 +1,6 @@
1
1
  import { H as outputFlags, U as profileFlag, p as renderSummary, z as connectionFlags } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-arKqJqIT.mjs";
3
- import { n as tableSelectorFlags, t as parseTableSelectors } from "./selectors-BzestDld.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-Dtb93zKy.mjs";
3
+ import { n as tableSelectorFlags, t as parseTableSelectors } from "./selectors-C-vgMcGK.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/commands/library/unpublish.ts
6
6
  const LibraryUnpublishResult = z.object({
@@ -1,7 +1,7 @@
1
1
  import { H as outputFlags, U as profileFlag, p as renderSummary, z as connectionFlags } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-arKqJqIT.mjs";
3
- import { t as parseId } from "./parse-id-DmFJgpY6.mjs";
4
- import { t as readBody } from "./body-OjAWKVaU.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-Dtb93zKy.mjs";
3
+ import { t as parseId } from "./parse-id-DtM6q9HU.mjs";
4
+ import { t as readBody } from "./body-CshgcV6U.mjs";
5
5
  import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
6
6
  import { i as DocumentUpdateInput, t as Document } from "./document-BHpLJbKU.mjs";
7
7
  import { t as documentView } from "./document-CA0Q6lqu.mjs";
@@ -1,7 +1,7 @@
1
1
  import { H as outputFlags, U as profileFlag, p as renderSummary, z as connectionFlags } from "./cli.mjs";
2
- import { t as defineMetabaseCommand } from "./runtime-arKqJqIT.mjs";
3
- import { t as parseId } from "./parse-id-DmFJgpY6.mjs";
4
- import { t as readBody } from "./body-OjAWKVaU.mjs";
2
+ import { t as defineMetabaseCommand } from "./runtime-Dtb93zKy.mjs";
3
+ import { t as parseId } from "./parse-id-DtM6q9HU.mjs";
4
+ import { t as readBody } from "./body-CshgcV6U.mjs";
5
5
  import { t as bodyInputFlags } from "./body-flags-AqKpN01Y.mjs";
6
6
  import { c as FieldUpdateInput, t as Field } from "./field-CcN4oZy6.mjs";
7
7
  import { r as fieldView } from "./field-fDtIrY6D.mjs";