@metabase/cli 0.4.1-alpha.release-65-integration-branch.5cbe297 → 0.5.1

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 (292) hide show
  1. package/dist/{add-collection-hv29px39.mjs → add-collection-BnGPc0Vv.mjs} +4 -4
  2. package/dist/{alert-DnTCjYIu.mjs → alert-DQkF8jYR.mjs} +7 -7
  3. package/dist/{alerts-_ELZ12ye.mjs → alerts-BncG7w1_.mjs} +6 -6
  4. package/dist/{append-B9sLLPYT.mjs → append-D4ekYCuD.mjs} +4 -4
  5. package/dist/{archive-BhIeDoLk.mjs → archive-BQ4OA-R4.mjs} +3 -3
  6. package/dist/{archive-CwBk5vxQ.mjs → archive-BXr9kFNz.mjs} +3 -3
  7. package/dist/{archive-BdX0Uvf2.mjs → archive-BifJXCHF.mjs} +3 -3
  8. package/dist/{archive-DD8C0Krt2.mjs → archive-CxNUeWII2.mjs} +4 -4
  9. package/dist/{archive-BRX5fKPb.mjs → archive-D2WCz3Oe.mjs} +3 -3
  10. package/dist/{archive-DDUSmbjn.mjs → archive-DjHLWUfC.mjs} +5 -5
  11. package/dist/{archive-CdfyB0To.mjs → archive-DnCF-Ecm.mjs} +5 -5
  12. package/dist/{archive-ZnHzMJaM.mjs → archive-DocyUIME.mjs} +5 -5
  13. package/dist/{archive-CKWWyI1i.mjs → archive-DpCP4yR1.mjs} +4 -4
  14. package/dist/{archive-D22VL5Bx.mjs → archive-EhW6blNc.mjs} +3 -3
  15. package/dist/{archive-3MQyc5Ih.mjs → archive-ULXc3xzI.mjs} +3 -3
  16. package/dist/{archive-BAHzxkPR.mjs → archive-v08JESCM.mjs} +5 -5
  17. package/dist/{auth-Ca84a5fv.mjs → auth-BPbsm8yV.mjs} +5 -5
  18. package/dist/{body-BVrHLwJU.mjs → body-BkkQkGJg.mjs} +2 -3
  19. package/dist/{branch-flag-Czh8JT1G.mjs → branch-flag-CTDvbaBa.mjs} +1 -1
  20. package/dist/{branches-frSt4WcS.mjs → branches-lPHtM_xR.mjs} +3 -3
  21. package/dist/{breaking-zlgxxwdd.mjs → breaking-DjMlCD96.mjs} +6 -6
  22. package/dist/{broken-BUAzpKLc.mjs → broken-DUX3GWS5.mjs} +8 -8
  23. package/dist/{bulk-discard-values-DU15VJPb.mjs → bulk-discard-values-Dl8Lzypf.mjs} +5 -5
  24. package/dist/{bulk-edit-TSa4lNkM.mjs → bulk-edit-N2xLVtfG.mjs} +5 -5
  25. package/dist/{bulk-rescan-values-BYJAsPC1.mjs → bulk-rescan-values-BK2rH2Ik.mjs} +5 -5
  26. package/dist/{bulk-sync-schema-DtaOwEtW.mjs → bulk-sync-schema-BKJc9Rzq.mjs} +5 -5
  27. package/dist/{cancel-DCOvSQsq.mjs → cancel-DzkRVGIk.mjs} +3 -3
  28. package/dist/{cancel-task-osQLETJh.mjs → cancel-task-BiTlDY7a.mjs} +3 -3
  29. package/dist/card-BTBDBsu-.mjs +25 -0
  30. package/dist/{cards-B1pyPl77.mjs → cards-CSL8ukS1.mjs} +4 -4
  31. package/dist/cli.mjs +619 -198
  32. package/dist/{client-1UIUBA_V.mjs → client-BBwYPXDW.mjs} +443 -380
  33. package/dist/collection-B19phRNU.mjs +21 -0
  34. package/dist/{collection-BgPYl2c5.mjs → collection-B2wRXyTF.mjs} +11 -3
  35. package/dist/{collection-DPiztU_l.mjs → collection-CTnYZ2Jj.mjs} +1 -1
  36. package/dist/{collection-namespace-Cizv6-94.mjs → collection-namespace-B1OkM7p1.mjs} +1 -2
  37. package/dist/{content-translation-XnHISl5-.mjs → content-translation-DoGTQnvH.mjs} +3 -3
  38. package/dist/{copy-DAKdksBm.mjs → copy-BYukQEtf.mjs} +4 -4
  39. package/dist/{copy-BCVW48Jq.mjs → copy-XlCT3gvG.mjs} +6 -6
  40. package/dist/{copy-flags-D7NTgAz1.mjs → copy-flags-ByB2MicL.mjs} +2 -2
  41. package/dist/{create-qCgnB-oZ.mjs → create-3_oY9KHY.mjs} +3 -3
  42. package/dist/{create-KyeJjhxH2.mjs → create-B3fm5I-l2.mjs} +4 -4
  43. package/dist/{create-CuhQ1Khk.mjs → create-BP39g5Jk.mjs} +5 -5
  44. package/dist/{create-cqbpWaOi.mjs → create-Bl9sS7v7.mjs} +4 -4
  45. package/dist/{create-BzE4q6F_.mjs → create-Bnb1abv_.mjs} +4 -4
  46. package/dist/{create-Br5JxAeE.mjs → create-CLZ7w83R.mjs} +4 -4
  47. package/dist/{create-B5eo9PSN.mjs → create-CYoarNrb.mjs} +4 -4
  48. package/dist/{create-B57D5E-o.mjs → create-CbT4SPHV.mjs} +5 -5
  49. package/dist/{create-BfA1pnmS.mjs → create-Cdt8u1wF.mjs} +6 -6
  50. package/dist/{create-C7fVbQbQ.mjs → create-CqF7vqXC.mjs} +4 -4
  51. package/dist/{create-XnYN2zoc.mjs → create-CrtIqtXN.mjs} +6 -6
  52. package/dist/{create-B1ifNWcE.mjs → create-D5_c5SHo.mjs} +5 -5
  53. package/dist/{create-CW4WF073.mjs → create-DBNxy5rN.mjs} +5 -5
  54. package/dist/{create-g4pZa_Xa.mjs → create-DZJQp3r7.mjs} +3 -3
  55. package/dist/{create-D2iZsTRV.mjs → create-DxMmIHI4.mjs} +5 -5
  56. package/dist/{create-BOvtRwRz.mjs → create-T4PZPVE9.mjs} +4 -4
  57. package/dist/{create-branch-Cli5cXvk.mjs → create-branch-CUNFdKyB.mjs} +3 -3
  58. package/dist/{create-D7zeAm-0.mjs → create-jr4xJgSI.mjs} +4 -4
  59. package/dist/{create--b64pMVM.mjs → create-k1Bo7h7g.mjs} +5 -5
  60. package/dist/{csv-CWIcAm_-.mjs → csv-CcnhKpuj.mjs} +4 -4
  61. package/dist/{current-task-eBjusv2o.mjs → current-task-nl2z8sHI.mjs} +4 -4
  62. package/dist/dashboard-BP0p62fp.mjs +35 -0
  63. package/dist/data-action-Cr17CfgE.mjs +24 -0
  64. package/dist/{database-BT7DVgSr.mjs → database-2HYCdHqK.mjs} +1 -1
  65. package/dist/{database-Kq2AL5jH.mjs → database-BewllGR7.mjs} +1 -1
  66. package/dist/{dataset-BmvCxGoE.mjs → dataset-D-x2Ho2i.mjs} +3 -14
  67. package/dist/{db-_H9HAS6H.mjs → db-m5bQcXdn.mjs} +7 -7
  68. package/dist/{delete-B0O-mf63.mjs → delete-BOma6qIq.mjs} +4 -4
  69. package/dist/{delete-BMvVkW-m.mjs → delete-BUCh72Bq.mjs} +4 -4
  70. package/dist/{delete-CynbfvS2.mjs → delete-BXMc-g3Q.mjs} +4 -4
  71. package/dist/{delete-BW5QXiyJ.mjs → delete-BrbmJ3sn.mjs} +4 -4
  72. package/dist/{delete-C7QmQlp9.mjs → delete-DulVnxD_.mjs} +4 -4
  73. package/dist/{delete-DPU-uQxU.mjs → delete-Oc2GE170.mjs} +4 -4
  74. package/dist/{delete-DOn2uk0u.mjs → delete-QHsiWYay.mjs} +4 -4
  75. package/dist/{delete-runtime-Cc7TASG7.mjs → delete-runtime-CkNvZfFA.mjs} +1 -1
  76. package/dist/{delete-table-DFqm6bAq.mjs → delete-table-LgJ17t6j.mjs} +4 -4
  77. package/dist/{delete-BztmAfPc.mjs → delete-xf2n7SNg.mjs} +4 -4
  78. package/dist/{dependencies-DZ-kMsDa.mjs → dependencies-BE5QW7Lb.mjs} +5 -5
  79. package/dist/{dependency-BHKwKjhO.mjs → dependency-BACk_cVP.mjs} +2 -2
  80. package/dist/dependency-BlTYysYG.mjs +15 -0
  81. package/dist/{dependency-B4J1bwFh.mjs → dependency-qP1hx2YN.mjs} +1 -1
  82. package/dist/{dependents-Ia2fe_KK.mjs → dependents-mbgHQNiv.mjs} +9 -9
  83. package/dist/{dirty-BrXAPows.mjs → dirty-fYlA1N1e.mjs} +4 -4
  84. package/dist/{discard-values-B9mTgFbV.mjs → discard-values-cIRBP5nT.mjs} +5 -5
  85. package/dist/document-BaRQ5fBd.mjs +20 -0
  86. package/dist/{document-BsaKF8UR.mjs → document-DVIu3Vj4.mjs} +1 -1
  87. package/dist/{document-COQzVLjW.mjs → document-UMG6me2P.mjs} +1 -1
  88. package/dist/{download-CZdsDdhG.mjs → download-CokVpeK6.mjs} +2 -2
  89. package/dist/{eid-DsGNJ16z.mjs → eid-CaumGUFD.mjs} +5 -5
  90. package/dist/{eid-translation-zEHtr5Oc.mjs → eid-translation-Ba92VOHe.mjs} +1 -0
  91. package/dist/{entity-BFajNdQp.mjs → entity-BHYJtRxp.mjs} +2 -2
  92. package/dist/{entry-flags-BaZUoxUR.mjs → entry-flags-DjICpQkc.mjs} +4 -4
  93. package/dist/{events-rkMIMpnS.mjs → events-jEo9fytL.mjs} +6 -6
  94. package/dist/{execute-DvBse4aF.mjs → execute-H09Qus4_.mjs} +4 -4
  95. package/dist/{export-BCkzx9zk.mjs → export-YtdZo7LZ.mjs} +7 -7
  96. package/dist/{export-flags-TuwwRhD6.mjs → export-flags-DzW0Ktkh.mjs} +2 -2
  97. package/dist/{export-preflight-p7botJyN.mjs → export-preflight-Db_TChn5.mjs} +5 -5
  98. package/dist/field-DktidTPB.mjs +21 -0
  99. package/dist/{fields-CJVXOLbB.mjs → fields-DUXlosmx.mjs} +4 -4
  100. package/dist/{filter-flags-yY4RM312.mjs → filter-flags-DTDcU7OI.mjs} +3 -3
  101. package/dist/{fks-B6hjrdJP.mjs → fks-Cl2sq-c0.mjs} +6 -6
  102. package/dist/{get-D1p-5ibI.mjs → get-B-WT6ess.mjs} +5 -5
  103. package/dist/{get-DpYTiE4D.mjs → get-BilMWiFq.mjs} +5 -5
  104. package/dist/{get-CWBN0G-4.mjs → get-Bt_zhviQ.mjs} +3 -3
  105. package/dist/{get-DsbDxSpy.mjs → get-CM596pmP.mjs} +3 -3
  106. package/dist/{get-BxUgfEPW.mjs → get-CTtzccwr.mjs} +4 -4
  107. package/dist/{get-oLc5jgid2.mjs → get-CVMWhbA82.mjs} +4 -4
  108. package/dist/{get-Eforof5e.mjs → get-CWyRAHpz.mjs} +5 -5
  109. package/dist/{get-BvUNnNRq.mjs → get-C_rjxpoe.mjs} +3 -3
  110. package/dist/{get-B5L4BUGK.mjs → get-Cg0up9gm.mjs} +3 -3
  111. package/dist/{get-xmhwvAQJ.mjs → get-CqlNUyFY.mjs} +5 -5
  112. package/dist/{get-CXeFg0F2.mjs → get-DPiNYmXo.mjs} +5 -5
  113. package/dist/{get-DyS1mRI6.mjs → get-DTDvlLT3.mjs} +3 -3
  114. package/dist/{get-C6uLL4bJ.mjs → get-DtcChy9h.mjs} +5 -5
  115. package/dist/{get-BYtFVJHT.mjs → get-DyK_bvg6.mjs} +4 -4
  116. package/dist/{get-Do1LC4I52.mjs → get-DySyvotk2.mjs} +5 -5
  117. package/dist/{get-D7HPiBB0.mjs → get-FxCF0rxc.mjs} +4 -4
  118. package/dist/{get-CoJcgFky.mjs → get-GuWW4J24.mjs} +5 -5
  119. package/dist/{get-DPlSzRI0.mjs → get-XS-6R81E.mjs} +3 -3
  120. package/dist/{get-zotSW00n.mjs → get-oQNL6pLY.mjs} +3 -3
  121. package/dist/{get-BwKQw_rR.mjs → get-okEsnkvC.mjs} +3 -3
  122. package/dist/{get-run-bU-d--nM.mjs → get-run-CFGxSm_S.mjs} +4 -4
  123. package/dist/{get-DSjITPED.mjs → get-zPMv3kZE.mjs} +5 -5
  124. package/dist/git-sync-BwkWeJAz.mjs +29 -0
  125. package/dist/{git-sync-DspFahwV.mjs → git-sync-Ch1V1fEK.mjs} +1 -1
  126. package/dist/glossary-BSgRQ2HO.mjs +14 -0
  127. package/dist/{glossary-Del97Jqg.mjs → glossary-BkGmCI4X.mjs} +1 -1
  128. package/dist/{glossary-CdW6RFId.mjs → glossary-QN-hHfOT.mjs} +1 -1
  129. package/dist/{graph-CHXJ6mB7.mjs → graph-Wf4e0XIa.mjs} +6 -6
  130. package/dist/{group-D4w87fXL.mjs → group-81zoQcEP.mjs} +1 -1
  131. package/dist/{has-remote-changes-BXEe8Sv5.mjs → has-remote-changes-BsS3XB0P.mjs} +3 -3
  132. package/dist/{import-DZQb4bUo.mjs → import-CXd5HdB0.mjs} +7 -7
  133. package/dist/{input-DjHsV-kD.mjs → input-AXP2LCOV.mjs} +1 -1
  134. package/dist/{is-dirty-DwQ2_CCB.mjs → is-dirty-TDcfeOde.mjs} +2 -2
  135. package/dist/{items-DNdICQ7M.mjs → items-BxvhoxYm.mjs} +6 -6
  136. package/dist/{key-BTaxFn_7.mjs → key-CUPbYxkk.mjs} +1 -1
  137. package/dist/{library-C4M8TF2N.mjs → library-BKSFtIV9.mjs} +2 -2
  138. package/dist/{library-DmkpcZPb.mjs → library-DuIrR8LS.mjs} +1 -1
  139. package/dist/{library-Cdj_uj1H.mjs → library-DzejNMqX.mjs} +5 -5
  140. package/dist/{list-DoLqxEjq.mjs → list-3Dh5yeq-.mjs} +3 -3
  141. package/dist/{list-__Q79YXk.mjs → list-6nGX0Rqc.mjs} +4 -4
  142. package/dist/{list-hINHmdMT.mjs → list-B3Pngm2j.mjs} +5 -5
  143. package/dist/{list-89ZgbsvW.mjs → list-B5kRBn7k.mjs} +5 -5
  144. package/dist/{list-DsyvHBAv.mjs → list-B8V_OESj.mjs} +3 -3
  145. package/dist/{list-DcHPY1Ti.mjs → list-BUjI5G0_.mjs} +4 -4
  146. package/dist/{list-gqemddWB.mjs → list-Ba7u5Ai9.mjs} +4 -4
  147. package/dist/{list-CzxrdWB8.mjs → list-CCCy6cBI.mjs} +6 -6
  148. package/dist/{list-Owrzgtkc.mjs → list-CRXTfEFk.mjs} +3 -3
  149. package/dist/{list-C7PV9fYj.mjs → list-CUj04tg3.mjs} +6 -6
  150. package/dist/{list-OKHcr76i.mjs → list-Cf6A9Csi.mjs} +3 -3
  151. package/dist/{list-F4ENGV7j.mjs → list-Cr5Hoq-E.mjs} +4 -4
  152. package/dist/{list-C-WGqRqN.mjs → list-D1Q8H3jn.mjs} +6 -6
  153. package/dist/{list-epIn3uFZ.mjs → list-D7yH-64Z.mjs} +5 -5
  154. package/dist/{list-M20foZz2.mjs → list-DA1Fo6S6.mjs} +3 -3
  155. package/dist/{list-CYlPgzD1.mjs → list-D_fsrh8w.mjs} +5 -5
  156. package/dist/{list-03zaydQe.mjs → list-DjlfBd7W.mjs} +3 -3
  157. package/dist/{list-CZoaZc9g.mjs → list-DlgjWr4r.mjs} +5 -5
  158. package/dist/{list-2EWHwbQs.mjs → list-Do-Xnz0I.mjs} +4 -4
  159. package/dist/{list-Be6kDkyT.mjs → list-DpK3ioES.mjs} +6 -6
  160. package/dist/{list-CLJvuPXn.mjs → list-DsR58aMq.mjs} +5 -5
  161. package/dist/{login-BSqGgX8S.mjs → login-CXbCAcuB.mjs} +6 -6
  162. package/dist/{logout-D92O4mQK.mjs → logout-B6IGzkpG.mjs} +2 -2
  163. package/dist/{measure-DhX_mmZK.mjs → measure-CbMgNhlG.mjs} +6 -6
  164. package/dist/{notification-Cuuwoksm.mjs → notification-W2SVssyY.mjs} +1 -1
  165. package/dist/{parameter-values-BY2WA9qg.mjs → parameter-values-IWi_DNhp.mjs} +3 -3
  166. package/dist/{parse-enum-BPKULOSw.mjs → parse-enum-B2rGiC6p.mjs} +1 -1
  167. package/dist/{parse-id-CxHp2akh.mjs → parse-id-Cv5eM7sg.mjs} +1 -1
  168. package/dist/{parse-ref-8bVX_9IN.mjs → parse-ref-DW7ik6ny.mjs} +1 -1
  169. package/dist/{parse-text-Bm6eUa-p.mjs → parse-text-CUCSWOeR.mjs} +1 -1
  170. package/dist/{path-D4Q1ZzCw.mjs → path-C9r9urRK.mjs} +4 -4
  171. package/dist/{poll-DFZRtTA_.mjs → poll-CX3jPtXb.mjs} +2 -2
  172. package/dist/{preflight-BPaonBKy.mjs → preflight-CiTgqNUy.mjs} +2 -3
  173. package/dist/{process-B3Di_HtV.mjs → process-DImdroix.mjs} +1 -1
  174. package/dist/{publish-BhgyrJ6c.mjs → publish-xH1n74gd.mjs} +4 -4
  175. package/dist/{pulse-CIza18rO.mjs → pulse-CFj1WfIC.mjs} +1 -1
  176. package/dist/{query-CsBe-kJn.mjs → query-BOCw0FBK.mjs} +4 -4
  177. package/dist/{query-DvlGWjgG.mjs → query-CN3BW5WB.mjs} +11 -12
  178. package/dist/{remapping-CCEivr42.mjs → remapping-Dggq2Fv0.mjs} +4 -4
  179. package/dist/{remove-collection-LpgGBYCl.mjs → remove-collection-cxSSFxza.mjs} +4 -4
  180. package/dist/{render-D5ehBS-7.mjs → render-Cb8Hct67.mjs} +2 -2
  181. package/dist/{replace-DeWgkbfZ.mjs → replace-wVi_XDut.mjs} +4 -4
  182. package/dist/requirement-check-BE3PuGsC.mjs +60 -0
  183. package/dist/{rescan-values-CDDVS1tl.mjs → rescan-values-C7b1Ghy-.mjs} +5 -5
  184. package/dist/{rescan-values-aF18XAv6.mjs → rescan-values-DAp_avxY.mjs} +5 -5
  185. package/dist/{run-DyGMvbMm.mjs → run-CE6ei7s7.mjs} +4 -4
  186. package/dist/{run-Buf4B8QH.mjs → run-CUGs7mok.mjs} +4 -4
  187. package/dist/{run-DlG3Ykj1.mjs → run-DywhwjNG.mjs} +6 -6
  188. package/dist/{runs-D2CXgW10.mjs → runs--14jim_0.mjs} +5 -5
  189. package/dist/{runtime-X6hVzSMW.mjs → runtime-Ckns6TKK.mjs} +248 -534
  190. package/dist/{schema-tables-FUOIyoUU.mjs → schema-tables-CeW0kpA5.mjs} +6 -6
  191. package/dist/{schemas-CmfNeqzG.mjs → schemas-CHMD0HrY.mjs} +4 -4
  192. package/dist/{search-BAXg-EJw.mjs → search-CXRavT7G.mjs} +1 -0
  193. package/dist/{search-Dl7xzF6Q.mjs → search-DyC54bGf.mjs} +7 -7
  194. package/dist/{search-CLpDqYpY.mjs → search-LmBQu1Jg.mjs} +5 -5
  195. package/dist/{segment-Bx28f38v.mjs → segment-DeT_Yic6.mjs} +6 -6
  196. package/dist/{send-CoGV2zkp.mjs → send-BWSJMrDL.mjs} +3 -3
  197. package/dist/{set-active-CbiJv8Hg.mjs → set-active-C5cLG4_O.mjs} +4 -4
  198. package/dist/{set-CrR9IumN.mjs → set-r2xiXrT_.mjs} +4 -4
  199. package/dist/{set-sensitivity-CTHVxpnU.mjs → set-sensitivity-BMLKazua.mjs} +4 -4
  200. package/dist/{setting-CUxdweNJ.mjs → setting-CDRusiqP.mjs} +4 -4
  201. package/dist/{setup-4uySIB-t.mjs → setup-BZaJVww3.mjs} +3 -3
  202. package/dist/{signal-0Yt8JTMn.mjs → signal-4tpCIkqR.mjs} +1 -1
  203. package/dist/{skill-list-goCqmfFF.mjs → skill-list-D2FhhYS3.mjs} +9 -3
  204. package/dist/{skills-86j411Qz.mjs → skills-9ihLaSmM.mjs} +3 -3
  205. package/dist/{skills-DeWsLMwC.mjs → skills-y2iVfW9k.mjs} +2 -2
  206. package/dist/snippet-Ce0o33Rj.mjs +19 -0
  207. package/dist/{stash-BNKlbxtD.mjs → stash-Dj-mnIa4.mjs} +5 -5
  208. package/dist/{status-B7bwHLkk.mjs → status-B2Xj_q8f.mjs} +3 -3
  209. package/dist/{status-Bul9El-c.mjs → status-BtWz7Pzn.mjs} +16 -7
  210. package/dist/{subscription-DPAGevGU.mjs → subscription-Dh--agqE.mjs} +6 -6
  211. package/dist/{subscriptions-DIRsHcKP.mjs → subscriptions-CJ8Jdp9A.mjs} +6 -6
  212. package/dist/{summary-CeVt80Kb.mjs → summary-ccbkNDbC.mjs} +3 -3
  213. package/dist/{sync-schema-B9fLcZoa.mjs → sync-schema-CewUOkmm.mjs} +6 -6
  214. package/dist/{sync-schema-oDTbhjW1.mjs → sync-schema-HwQectZd.mjs} +5 -5
  215. package/dist/{sync-task-BAMOf6_t.mjs → sync-task-DEzhiaU9.mjs} +3 -3
  216. package/dist/{table-BFIOH6Pb.mjs → table-CFZU-BRg.mjs} +2 -2
  217. package/dist/table-P9ovwcaB.mjs +26 -0
  218. package/dist/{table-selector-flags-BUR0-n6j.mjs → table-selector-flags-p4jun7-v.mjs} +3 -3
  219. package/dist/{table-Ci6bhZkb.mjs → table-zAdW5_3H.mjs} +5 -5
  220. package/dist/{text-CdtEI6l6.mjs → text-C2VwKF9D.mjs} +1 -1
  221. package/dist/{timeline-uDCmwGFT.mjs → timeline-BgWz8DYK.mjs} +1 -1
  222. package/dist/timeline-DLaBypse.mjs +21 -0
  223. package/dist/{timeline-CCSU2qOS.mjs → timeline-DcsCXNUt.mjs} +5 -1
  224. package/dist/{timeline-event-BY2Hj72e.mjs → timeline-event-xAAR6b-v.mjs} +6 -6
  225. package/dist/transform-10YE8j5K.mjs +28 -0
  226. package/dist/{transform-D4z70PIN.mjs → transform-CWGJB8N_.mjs} +1 -1
  227. package/dist/{transform-job-AaMZRxAq.mjs → transform-job-BBZ5L46v.mjs} +1 -1
  228. package/dist/{transform-job-CCguL6LP.mjs → transform-job-ClX8e5iO.mjs} +2 -1
  229. package/dist/transform-job-D97AutnF.mjs +22 -0
  230. package/dist/{transform-tag-CzjLKILh.mjs → transform-tag-BXusFzMX.mjs} +5 -5
  231. package/dist/{transform-test-BjjCQ2xm.mjs → transform-test-Bexa_K89.mjs} +5 -1
  232. package/dist/{transform-test-DHGKeuHa.mjs → transform-test-C49ZTK7M.mjs} +1 -1
  233. package/dist/transform-test-UsH1udc4.mjs +16 -0
  234. package/dist/{transforms-0uhBh0H4.mjs → transforms-CqV01bMM.mjs} +5 -5
  235. package/dist/{transport-BmNrb0Lz.mjs → transport-0qFZhEuP.mjs} +144 -41
  236. package/dist/{tree-oBEw8hDj.mjs → tree-Td6rgyOa.mjs} +3 -3
  237. package/dist/{unpublish-BJ9OKN1N.mjs → unpublish-D4XTZsFW.mjs} +3 -3
  238. package/dist/{unreferenced-D6UyA_Nu.mjs → unreferenced-cR-l4zXN.mjs} +6 -6
  239. package/dist/{update-7zsDGAWa.mjs → update-BJL5975i.mjs} +6 -6
  240. package/dist/{update-DGwGjOnH.mjs → update-BqkqMOVN.mjs} +5 -5
  241. package/dist/{update-CKe2Bwpv.mjs → update-C4iu-vQm.mjs} +6 -6
  242. package/dist/{update-D9eLVWFQ.mjs → update-C7Wmom6x.mjs} +5 -5
  243. package/dist/{update-BK_SpSrG.mjs → update-C7dZLbsf.mjs} +4 -4
  244. package/dist/{update-BZgHTH5P.mjs → update-C8xdeYI2.mjs} +4 -4
  245. package/dist/{update-BqrZ-8IK.mjs → update-CHB4kvz-.mjs} +8 -8
  246. package/dist/{update-M7yDPmJ-.mjs → update-CND9At61.mjs} +5 -5
  247. package/dist/{update-bGDXSnBh.mjs → update-CpwWURTp.mjs} +5 -5
  248. package/dist/{update-CKJ6Das4.mjs → update-D-cTgmb0.mjs} +6 -6
  249. package/dist/{update-DKagaJw0.mjs → update-DFK2iUSP.mjs} +6 -6
  250. package/dist/{update-Cv6IMLyu.mjs → update-DROjGe3Q.mjs} +4 -4
  251. package/dist/{update-Bdi40RG0.mjs → update-DZHgr6Gu.mjs} +5 -5
  252. package/dist/{update-CHA4VWKT.mjs → update-Dk0E66Va.mjs} +5 -5
  253. package/dist/{update-DgmlUn64.mjs → update-DqCZsbLh.mjs} +6 -6
  254. package/dist/{update-CEhub3Wz.mjs → update-DrVc25R8.mjs} +5 -5
  255. package/dist/{update-CYQkWLpZ.mjs → update-Js0IiqCq.mjs} +6 -6
  256. package/dist/{update-DneJLQXe.mjs → update-dQeji6RA.mjs} +7 -7
  257. package/dist/{update-dashcard-DNsf-gJ1.mjs → update-dashcard-BmkfJ7t9.mjs} +4 -4
  258. package/dist/{update-CXfLvhmK.mjs → update-nGURR-y6.mjs} +6 -6
  259. package/dist/{upgrade-BRJH93W0.mjs → upgrade-B6V_1cUh.mjs} +4 -4
  260. package/dist/{upload-DJB7DMA1.mjs → upload-B6zBzMPW.mjs} +2 -2
  261. package/dist/{upload-CGz8u2wG.mjs → upload-CfYmBv51.mjs} +3 -3
  262. package/dist/upload-Dvjfz16M.mjs +13 -0
  263. package/dist/{uuid-3qmLYgrG.mjs → uuid-B8ynbkqG.mjs} +2 -2
  264. package/dist/{validate-D_iikPkc.mjs → validate-C7DGkwb-.mjs} +1 -1
  265. package/dist/{validate-query-DIcK8alR.mjs → validate-query-CYUvRvVM.mjs} +2 -2
  266. package/dist/{values-Bn2Wcz4t.mjs → values-36bzf9cK.mjs} +3 -3
  267. package/dist/{verify-CA4PEHlO.mjs → verify-BdW-GExk.mjs} +3 -3
  268. package/dist/{verify-C2K-zMuQ.mjs → verify-C4Tml4fD.mjs} +3 -3
  269. package/dist/{verify-CCX2N98Q.mjs → verify-Cs9e28YA.mjs} +4 -4
  270. package/dist/{wait-DCgCJBqX.mjs → wait-BV6JOdgi.mjs} +6 -6
  271. package/dist/{wait-flags-aRQHTjwg.mjs → wait-flags-DjyK03cm.mjs} +2 -2
  272. package/dist/{window-2ybHqui2.mjs → window-CfK_j6m1.mjs} +1 -1
  273. package/package.json +1 -1
  274. package/skill-data/core/SKILL.md +11 -5
  275. package/skill-data/dashboard/SKILL.md +6 -0
  276. package/skill-data/git-sync/SKILL.md +64 -14
  277. package/dist/card-P2-4BkXV.mjs +0 -25
  278. package/dist/collection-BI8Fy9vS.mjs +0 -21
  279. package/dist/dashboard-C-YJxDam.mjs +0 -35
  280. package/dist/data-action-DER3EMD7.mjs +0 -24
  281. package/dist/dependency-v9fHJ-N-.mjs +0 -15
  282. package/dist/document-CGvUmD9i.mjs +0 -20
  283. package/dist/field-C9AcBe8x.mjs +0 -21
  284. package/dist/git-sync-D4R0cHvk.mjs +0 -29
  285. package/dist/glossary-C6EnoEXg.mjs +0 -14
  286. package/dist/snippet-C3gamfFK.mjs +0 -19
  287. package/dist/table-C--k-JXA.mjs +0 -26
  288. package/dist/timeline-ClMmTycg.mjs +0 -21
  289. package/dist/transform-BZaNFGeK.mjs +0 -28
  290. package/dist/transform-job-QMI2qWin.mjs +0 -22
  291. package/dist/transform-test-B9le1jKH.mjs +0 -16
  292. package/dist/upload-T5wS1XtL.mjs +0 -13
@@ -1,4 +1,4 @@
1
- import { $ as assertArgv, A as warn, B as setMetabaseAugment, F as ENV_SKIP_PREFLIGHT, H as version, I as ENV_URL, L as consumeLegacyEnvWarnings, M as ENV_DISABLE_KEYRING, R as readEnv, _t as isFileNotFoundError, a as Features, at as ChainedRequestError, c as ruleGap, dt as ResponseShapeError, et as givenFlagKeys, ft as TimeoutError, ht as errorMessage, i as FEATURE_RULES, j as ENV_API_KEY, l as reportError, lt as MetabaseError, mt as ValidationError, n as methodRequirements, o as evaluateFeatures, ot as ConfigError, r as FEATURE_NAMES, t as interruptSignal, tt as parseCsv, ut as NetworkError, vt as KNOWN_RANGE, w as isPlainObject, z as ProfileRefreshedError } from "./cli.mjs";
1
+ import { $ as parseJsonResult, A as ENV_URL, B as Features, C as preflightUncheckedNotice, Ct as NetworkError, E as ENV_DISABLE_KEYRING, Et as TimeoutError, K as isRetryableStatus, M as readEnv, Mt as isNonInterruptFailure, N as ProfileRefreshedError, Nt as KNOWN_RANGE, Ot as ValidationError, S as preflightSkippedNotice, T as ENV_API_KEY, Tt as ResponseShapeError, U as ruleGap, V as evaluateFeatures, W as HttpError, X as JSON_CONTENT_TYPE, et as setMetabaseAugment, ht as parseCsv, i as reportError, j as consumeLegacyEnvWarnings, jt as isFileNotFoundError, kt as errorMessage, mt as givenFlagKeys, nt as version, pt as assertArgv, r as methodRequirements, t as interruptSignal, w as warn, yt as ConfigError, z as FEATURE_RULES } from "./cli.mjs";
2
2
  import { defineCommand } from "citty";
3
3
  import { z } from "zod";
4
4
  import { Entry } from "@napi-rs/keyring";
@@ -22,33 +22,6 @@ function parseOptionalInteger(value, options) {
22
22
  return parseInteger(value, options);
23
23
  }
24
24
  //#endregion
25
- //#region ../client/src/version/preflight-error.ts
26
- const RequirementReason = z.enum(["version-too-old", "missing-token-feature"]);
27
- const RequirementFailure = z.object({
28
- reason: RequirementReason,
29
- detail: z.string(),
30
- feature: z.enum(FEATURE_NAMES),
31
- since: z.number().int(),
32
- tokenFeature: z.string().nullable(),
33
- serverVersion: z.string()
34
- });
35
- function versionTooOldMessage(since, serverVersion) {
36
- return `This operation requires Metabase v${since}+ (this server is ${serverVersion}). Upgrade Metabase to use it.`;
37
- }
38
- function missingTokenFeatureMessage(tokenFeature) {
39
- return `This operation requires the '${tokenFeature}' premium feature (not enabled on this server).`;
40
- }
41
- var CapabilityError = class extends MetabaseError {
42
- category = "capability";
43
- isRetryable = false;
44
- developerDetail;
45
- constructor(failure) {
46
- super(failure.detail);
47
- this.name = "CapabilityError";
48
- this.developerDetail = failure;
49
- }
50
- };
51
- //#endregion
52
25
  //#region ../client/src/domain/session-properties.ts
53
26
  const ServerVersion$1 = z.object({
54
27
  tag: z.string(),
@@ -111,26 +84,6 @@ function describeVersion(version) {
111
84
  }
112
85
  const StoredServerVersion = z.object({ tag: z.string() }).loose().transform(({ tag }) => parseTag(tag));
113
86
  //#endregion
114
- //#region ../client/src/version/probe.ts
115
- const PROBE_PATH = "/api/session/properties";
116
- const PROBE_TIMEOUT_MS = 1e4;
117
- async function probeServer(client, opts = {}) {
118
- return serverInfoFromProperties(await client.requestParsed(SessionProperties, PROBE_PATH, {
119
- timeoutMs: PROBE_TIMEOUT_MS,
120
- retries: opts.retries ?? 0
121
- }));
122
- }
123
- function serverInfoFromProperties(properties) {
124
- const { tag } = properties.version;
125
- return {
126
- version: parseTag(tag),
127
- edition: editionFromTag(tag),
128
- date: properties.version.date ?? null,
129
- hash: properties.version.hash ?? null,
130
- tokenFeatures: properties["token-features"] ?? null
131
- };
132
- }
133
- //#endregion
134
87
  //#region ../client/src/version/profile.ts
135
88
  const Skew = z.enum([
136
89
  "supported",
@@ -189,37 +142,6 @@ function grantsAnyFeature(tokenFeatures) {
189
142
  return tokenFeatures !== null && Object.values(tokenFeatures).some((enabled) => enabled);
190
143
  }
191
144
  //#endregion
192
- //#region ../client/src/version/requirement-check.ts
193
- /** The first of `features` the profile lacks, or `null` when it has every one. */
194
- function checkFeatures(features, profile) {
195
- for (const feature of features) {
196
- const gap = featureGap(profile, feature);
197
- if (gap !== null) return describeGap(gap, feature, profile);
198
- }
199
- return null;
200
- }
201
- function describeGap(gap, feature, profile) {
202
- const rule = FEATURE_RULES[feature];
203
- const serverVersion = profile.version.tag;
204
- const tokenFeature = rule.tokenFeature ?? null;
205
- if (gap.kind === "token") return {
206
- reason: "missing-token-feature",
207
- detail: missingTokenFeatureMessage(gap.tokenFeature),
208
- feature,
209
- since: rule.since,
210
- tokenFeature,
211
- serverVersion
212
- };
213
- return {
214
- reason: "version-too-old",
215
- detail: versionTooOldMessage(rule.since, describeVersion(profile.version)),
216
- feature,
217
- since: rule.since,
218
- tokenFeature,
219
- serverVersion
220
- };
221
- }
222
- //#endregion
223
145
  //#region src/core/auth/server-summary.ts
224
146
  const KnownRange = z.object({
225
147
  min: z.number().int(),
@@ -257,17 +179,32 @@ function skewNotice(profile) {
257
179
  switch (profile.skew) {
258
180
  case "supported":
259
181
  case "development": return null;
260
- case "older-than-known": return `Metabase ${describeVersion(profile.version)} is older than this CLI supports (v${min}+); commands needing a newer feature are refused by name. Upgrade Metabase to v${min} or later.`;
182
+ case "older-than-known": return `Metabase ${describeVersion(profile.version)} is older than this CLI supports (v${min}+); a command relying on a newer feature may fail. Upgrade Metabase to v${min} or later.`;
261
183
  case "newer-than-known": return `Metabase ${describeVersion(profile.version)} is newer than this CLI supports (up to v${max}); commands run as if it were v${max + 1}. Run \`mb upgrade\` for a newer CLI.`;
262
184
  }
263
185
  }
264
- const PROFILE_REFRESHED_REMEDY = "the profile was refreshed — retry the command.";
265
- function serverChangeNote(cached, fresh) {
186
+ const PROFILE_REFRESHED = "the profile was refreshed";
187
+ const PROFILE_STALE = "the profile could not be updated (the warning above says why)";
188
+ const SAFE_METHODS = /* @__PURE__ */ new Set([
189
+ "GET",
190
+ "HEAD",
191
+ "OPTIONS"
192
+ ]);
193
+ /** Whether two probes agree on everything a feature switch reads: the version tag and the premium features. */
194
+ function sameServer(a, b) {
195
+ return describeVersion(a.version) === describeVersion(b.version) && sameTokenFeatures(a.tokenFeatures, b.tokenFeatures);
196
+ }
197
+ function serverChangeNote(cached, fresh, method, profile) {
198
+ if (sameServer(cached, fresh)) return null;
199
+ const remedy = changeRemedy(SAFE_METHODS.has(method), profile);
266
200
  const before = describeVersion(cached.version);
267
201
  const after = describeVersion(fresh.version);
268
- if (before !== after) return `The server's version changed since the last probe (was ${before}, now ${after}); ${PROFILE_REFRESHED_REMEDY}`;
269
- if (!sameTokenFeatures(cached.tokenFeatures, fresh.tokenFeatures)) return `The server's premium features changed since the last probe; ${PROFILE_REFRESHED_REMEDY}`;
270
- return null;
202
+ if (before !== after) return `The server's version changed since the last probe (was ${before}, now ${after}); ${remedy}`;
203
+ return `The server's premium features changed since the last probe; ${remedy}`;
204
+ }
205
+ function changeRemedy(isSafe, profile) {
206
+ if (profile === "current") return isSafe ? `${PROFILE_REFRESHED} — retry the command.` : `${PROFILE_REFRESHED}, but the request may have been applied — check before retrying.`;
207
+ return isSafe ? `${PROFILE_STALE} — retry the command once it can be.` : `${PROFILE_STALE}, and the request may have been applied — check before retrying.`;
271
208
  }
272
209
  function sameTokenFeatures(a, b) {
273
210
  const grantedA = grantedFeatures(a);
@@ -369,296 +306,29 @@ function oauthCredentialFromTokens(tokens, refreshToken, clientId, nowMs) {
369
306
  };
370
307
  }
371
308
  //#endregion
372
- //#region ../client/src/json.ts
373
- const JSON_CONTENT_TYPE = "application/json";
374
- function parseJson(input, schema, opts = {}) {
375
- const result = parseJsonResult(input, schema, opts);
376
- if (!result.ok) throw result.error;
377
- return result.value;
378
- }
379
- function parseJsonResult(input, schema, opts = {}) {
380
- const sourcePrefix = opts.source === void 0 ? "" : `${opts.source}: `;
381
- let raw;
382
- try {
383
- raw = JSON.parse(input);
384
- } catch (error) {
385
- return {
386
- ok: false,
387
- error: new ConfigError(`${sourcePrefix}invalid JSON: ${errorMessage(error)}`)
388
- };
389
- }
390
- const parsed = schema.safeParse(raw);
391
- if (!parsed.success) return {
392
- ok: false,
393
- error: new ValidationError(`${sourcePrefix}value did not match expected schema`, {
394
- source: opts.source ?? "<input>",
395
- zodIssues: parsed.error.issues
396
- })
397
- };
309
+ //#region ../client/src/version/probe.ts
310
+ const PROBE_PATH = "/api/session/properties";
311
+ async function probeServer(client, opts = {}) {
312
+ return serverInfoFromProperties(await client.requestParsed(SessionProperties, PROBE_PATH, probeBudget(opts)));
313
+ }
314
+ function probeBudget(opts) {
398
315
  return {
399
- ok: true,
400
- value: parsed.data
316
+ timeoutMs: opts.timeoutMs ?? 1e4,
317
+ retries: opts.retries ?? 0
401
318
  };
402
319
  }
403
- function parseJsonOrPlain(text, contentType, schema, opts = {}) {
404
- if (!isJsonContentType(contentType)) return parseJson(JSON.stringify(text), schema, opts);
405
- const attempt = parseJsonResult(text, schema, opts);
406
- if (attempt.ok) return attempt.value;
407
- if (attempt.error instanceof ValidationError) throw attempt.error;
408
- return parseJson(JSON.stringify(text), schema, opts);
409
- }
410
- function isJsonContentType(contentType) {
411
- return contentType !== null && contentType.includes("application/json");
412
- }
413
- //#endregion
414
- //#region ../client/src/http/sanitize.ts
415
- const SECRET_HEADER_NAMES = /* @__PURE__ */ new Set([
416
- "authorization",
417
- "x-api-key",
418
- "x-metabase-session",
419
- "cookie",
420
- "set-cookie",
421
- "proxy-authorization"
422
- ]);
423
- const REDACTED = "[REDACTED]";
424
- function redactHeaders(headers) {
425
- const result = {};
426
- const entries = headers instanceof Headers ? headers.entries() : Object.entries(headers);
427
- for (const [key, value] of entries) result[key] = SECRET_HEADER_NAMES.has(key.toLowerCase()) ? REDACTED : value;
428
- return result;
429
- }
430
- function redactBody(body, ctx) {
431
- let result = body;
432
- for (const secret of ctx.knownSecrets) {
433
- if (secret.length === 0) continue;
434
- result = result.replaceAll(secret, REDACTED);
435
- }
436
- return result;
437
- }
438
- //#endregion
439
- //#region ../client/src/http/errors.ts
440
- const NOT_FOUND_STATUS = 404;
441
- const TEXT_CONTENT_TYPE = "text/plain";
442
- const ROUTE_MISSING_LITERAL = "API endpoint does not exist.";
443
- const RESOURCE_MISSING_LITERAL = "Not found.";
444
- const STATUS_CLASSIFICATIONS = {
445
- 401: { retryable: false },
446
- 403: { retryable: false },
447
- 404: { retryable: false },
448
- 408: {
449
- retryable: true,
450
- message: "Metabase timed out responding."
451
- },
452
- 425: { retryable: true },
453
- 429: {
454
- retryable: true,
455
- message: "Metabase rate-limited the request."
456
- },
457
- 500: { retryable: true },
458
- 502: { retryable: true },
459
- 503: { retryable: true },
460
- 504: {
461
- retryable: true,
462
- message: "Metabase timed out responding."
463
- }
464
- };
465
- const ErrorEnvelope = z.object({
466
- message: z.string().optional(),
467
- error: z.string().optional(),
468
- "error-message": z.string().optional(),
469
- via: z.array(z.object({ message: z.string().optional() }).loose()).optional(),
470
- "specific-errors": z.unknown().optional(),
471
- errors: z.unknown().optional(),
472
- "error-code": z.string().optional()
473
- }).loose();
474
- const FieldErrorNodeSchema = z.lazy(() => z.union([
475
- z.string(),
476
- z.array(z.string()),
477
- z.record(z.string(), FieldErrorNodeSchema)
478
- ]));
479
- const FieldErrorTree = z.record(z.string(), FieldErrorNodeSchema);
480
- const FIELD_MESSAGE_SEPARATOR = "; ";
481
- const MAX_EXTRACTED_MESSAGE_LEN = 500;
482
- const ELLIPSIS = "…";
483
- const GOT_VALUE_PATTERN = /got: ((?:[^"\\]|\\.)*)/g;
484
- const MAX_GOT_VALUE_LEN = 60;
485
- var HttpError = class extends MetabaseError {
486
- category = "http";
487
- status;
488
- kind;
489
- developerDetail;
490
- constructor(input) {
491
- const sanitizedBody = sanitizeBody(input.rawBody, input.redactionContext);
492
- const redactedHeaders = redactHeaders(input.responseHeaders);
493
- const kind = classifyKind(input.status, sanitizedBody, redactedHeaders);
494
- super(input.overrideUserMessage ?? buildUserMessage(kind, input, sanitizedBody, redactedHeaders));
495
- const fields = extractEnvelopeViews(sanitizedBody);
496
- this.name = "HttpError";
497
- this.status = input.status;
498
- this.kind = kind;
499
- this.developerDetail = {
500
- status: input.status,
501
- statusText: input.statusText,
502
- method: input.method,
503
- url: input.url,
504
- responseHeaders: redactedHeaders,
505
- body: sanitizedBody,
506
- fieldErrors: fields.fieldErrors,
507
- specificFieldErrors: fields.specificFieldErrors,
508
- errorCode: fields.errorCode
509
- };
510
- }
511
- get isRetryable() {
512
- return isRetryableStatus(this.status);
513
- }
514
- get fieldErrors() {
515
- return this.developerDetail.fieldErrors;
516
- }
517
- get specificFieldErrors() {
518
- return this.developerDetail.specificFieldErrors;
519
- }
520
- get errorCode() {
521
- return this.developerDetail.errorCode;
522
- }
523
- };
524
- function chainRequestFailure(cause, message) {
525
- if (cause instanceof HttpError) return new HttpError({
526
- status: cause.status,
527
- statusText: cause.developerDetail.statusText,
528
- method: cause.developerDetail.method,
529
- url: cause.developerDetail.url,
530
- responseHeaders: cause.developerDetail.responseHeaders,
531
- rawBody: cause.developerDetail.body,
532
- overrideUserMessage: message
533
- });
534
- return new ChainedRequestError(message, cause);
535
- }
536
- function isRetryableStatus(status) {
537
- return STATUS_CLASSIFICATIONS[status]?.retryable === true;
538
- }
539
- function sanitizeBody(rawBody, ctx) {
540
- if (rawBody === null) return null;
541
- if (ctx === void 0) return rawBody;
542
- return redactBody(rawBody, ctx);
543
- }
544
- function classifyKind(status, sanitizedBody, redactedHeaders) {
545
- if (status === 401 || status === 403) return "auth";
546
- if (status === NOT_FOUND_STATUS) return isRouteMissingResponse(sanitizedBody, redactedHeaders) ? "route-missing" : "resource-missing";
547
- if (status === 429) return "rate-limit";
548
- if (status >= 500 && status < 600) return "server-error";
549
- return "generic";
550
- }
551
- function isRouteMissingResponse(sanitizedBody, redactedHeaders) {
552
- if (sanitizedBody?.includes(ROUTE_MISSING_LITERAL)) return true;
553
- if (sanitizedBody?.includes(RESOURCE_MISSING_LITERAL)) return false;
554
- if (redactedHeaders["content-type"]?.includes("application/json")) return false;
555
- if (sanitizedBody === null || sanitizedBody.trim() === "") return true;
556
- return parseEnvelope(sanitizedBody) === null;
557
- }
558
- function buildUserMessage(kind, input, sanitizedBody, redactedHeaders) {
559
- if (kind === "route-missing") return buildRouteMissingMessage(input);
560
- if (kind === "resource-missing") return `Not found: ${input.method} ${pathFromUrl(input.url)}.`;
561
- const fromBody = parseEnvelopeMessage(sanitizedBody);
562
- if (fromBody !== null) return fromBody;
563
- if (kind === "auth") return `Invalid or unauthorized API key (host: ${hostFromUrl(input.url)}).`;
564
- const fromText = plainTextMessage(sanitizedBody, redactedHeaders);
565
- if (fromText !== null) return fromText;
566
- return defaultMessageForStatus(input.status);
567
- }
568
- function plainTextMessage(sanitizedBody, redactedHeaders) {
569
- if (sanitizedBody === null || !redactedHeaders["content-type"]?.includes(TEXT_CONTENT_TYPE)) return null;
570
- const trimmed = sanitizedBody.trim();
571
- return trimmed === "" ? null : condenseMessage(trimmed);
572
- }
573
- function buildRouteMissingMessage(input) {
574
- const path = pathFromUrl(input.url);
575
- if (!input.serverTag) return `This endpoint is not available on the connected Metabase: ${input.method} ${path}.`;
576
- return `This endpoint is not available on Metabase ${input.serverTag}: ${input.method} ${path}. It may require a newer Metabase major version.`;
577
- }
578
- function pathFromUrl(url) {
579
- const parsed = new URL(url);
580
- return parsed.pathname + parsed.search;
581
- }
582
- function hostFromUrl(url) {
583
- return new URL(url).host;
584
- }
585
- function parseEnvelope(sanitizedBody) {
586
- if (!sanitizedBody) return null;
587
- const result = parseJsonResult(sanitizedBody, ErrorEnvelope);
588
- return result.ok ? result.value : null;
589
- }
590
- const NO_ENVELOPE_VIEWS = {
591
- fieldErrors: null,
592
- specificFieldErrors: null,
593
- errorCode: null
594
- };
595
- function extractEnvelopeViews(sanitizedBody) {
596
- const envelope = parseEnvelope(sanitizedBody);
597
- if (envelope === null) return NO_ENVELOPE_VIEWS;
320
+ function serverInfoFromProperties(properties) {
321
+ const { tag } = properties.version;
598
322
  return {
599
- fieldErrors: parseFieldErrors(envelope.errors),
600
- specificFieldErrors: parseFieldErrors(envelope["specific-errors"]),
601
- errorCode: envelope["error-code"] ?? null
323
+ version: parseTag(tag),
324
+ edition: editionFromTag(tag),
325
+ date: properties.version.date ?? null,
326
+ hash: properties.version.hash ?? null,
327
+ tokenFeatures: properties["token-features"] ?? null
602
328
  };
603
329
  }
604
- function parseFieldErrors(value) {
605
- const parsed = FieldErrorTree.safeParse(value);
606
- if (!parsed.success) return null;
607
- const entries = collectLeafEntries(parsed.data, []);
608
- if (entries.length === 0) return null;
609
- return Object.fromEntries(entries.map((entry) => [entry.path, entry.message]));
610
- }
611
- function parseEnvelopeMessage(sanitizedBody) {
612
- const envelope = parseEnvelope(sanitizedBody);
613
- if (envelope === null) return null;
614
- const topLevel = envelope.message ?? envelope.error ?? envelope["error-message"];
615
- if (topLevel) return condenseMessage(topLevel);
616
- const viaMessage = envelope.via?.find((entry) => entry.message)?.message;
617
- if (viaMessage) return condenseMessage(viaMessage);
618
- const specific = formatErrorTree(envelope["specific-errors"]);
619
- if (specific) return condenseMessage(specific);
620
- const generic = formatErrorTree(envelope.errors);
621
- if (generic) return condenseMessage(generic);
622
- return null;
623
- }
624
- function formatErrorTree(value) {
625
- const entries = collectLeafEntries(value, []);
626
- if (entries.length === 0) return null;
627
- return entries.map(formatLeafEntry).join(FIELD_MESSAGE_SEPARATOR);
628
- }
629
- function formatLeafEntry(entry) {
630
- return entry.path === "" ? entry.message : `${entry.path}: ${entry.message}`;
631
- }
632
- function collectLeafEntries(value, path) {
633
- if (typeof value === "string") {
634
- const trimmed = value.trim();
635
- return trimmed === "" ? [] : [{
636
- path: path.join("."),
637
- message: trimmed
638
- }];
639
- }
640
- if (Array.isArray(value)) {
641
- const messages = value.filter((entry) => typeof entry === "string" && entry.trim() !== "");
642
- if (messages.length === 0) return [];
643
- return [{
644
- path: path.join("."),
645
- message: messages.join(FIELD_MESSAGE_SEPARATOR)
646
- }];
647
- }
648
- if (isPlainObject(value)) return Object.entries(value).flatMap(([key, child]) => collectLeafEntries(child, [...path, key]));
649
- return [];
650
- }
651
- function condenseMessage(message) {
652
- const trimmed = message.replace(GOT_VALUE_PATTERN, trimGotValue);
653
- if (trimmed.length <= MAX_EXTRACTED_MESSAGE_LEN) return trimmed;
654
- return trimmed.slice(0, MAX_EXTRACTED_MESSAGE_LEN - 1) + ELLIPSIS;
655
- }
656
- function trimGotValue(match, value) {
657
- if (value.length <= MAX_GOT_VALUE_LEN) return match;
658
- return `got: ${value.slice(0, MAX_GOT_VALUE_LEN)}${ELLIPSIS}`;
659
- }
660
- function defaultMessageForStatus(status) {
661
- return STATUS_CLASSIFICATIONS[status]?.message ?? `Metabase returned ${status}.`;
330
+ function profileFromProperties(properties) {
331
+ return createServerProfile(serverInfoFromProperties(properties));
662
332
  }
663
333
  //#endregion
664
334
  //#region ../client/src/http/network-error.ts
@@ -842,7 +512,7 @@ async function grantsFullAccessScope(metadata, baseUrl, userAgent) {
842
512
  headers: { accept: JSON_CONTENT_TYPE }
843
513
  });
844
514
  if (!response.ok) throw await failure(response, "Server properties", "GET", url);
845
- return createServerProfile(serverInfoFromProperties(await readJson(response, SessionProperties, "Server properties"))).features.oauthFullAccessScope;
515
+ return createServerProfile(serverInfoFromProperties(await readJson(response, SessionProperties, "Server properties"))).features.oauthFullAccessScopeUnadvertised;
846
516
  }
847
517
  async function tryDiscoverMetadata(baseUrl, userAgent) {
848
518
  const metadata = await fetchMetadata(baseUrl, userAgent);
@@ -1095,6 +765,12 @@ async function fileExists(path) {
1095
765
  return false;
1096
766
  }
1097
767
  }
768
+ let profilesFileQueue = Promise.resolve();
769
+ function exclusively(update) {
770
+ const result = profilesFileQueue.then(update);
771
+ profilesFileQueue = result.then(() => void 0, () => void 0);
772
+ return result;
773
+ }
1098
774
  async function writeProfilesFile(file) {
1099
775
  const path = profilesFilePath();
1100
776
  if (file.profiles.length === 0) {
@@ -1199,123 +875,130 @@ async function upsertRecord(file, name, updated) {
1199
875
  });
1200
876
  }
1201
877
  async function writeProfile(profile, name = DEFAULT_PROFILE) {
1202
- const location = persistSecret(account.profileApiKey(name), profile.apiKey);
1203
- const inlineApiKey = location.backend === "file" ? profile.apiKey : null;
1204
- const file = await readProfilesFile();
1205
- const existing = findRecord(file, name);
1206
- flagResidualIfUnconfirmed(existing, "oauth", [removeKeyringEntry(account.profileOAuthAccess(name)), removeKeyringEntry(account.profileOAuthRefresh(name))]);
1207
- await upsertRecord(file, name, existing === null ? {
1208
- name,
1209
- url: profile.url,
1210
- apiKey: inlineApiKey,
1211
- oauth: null,
1212
- lastProbe: null,
1213
- lastFailure: null
1214
- } : {
1215
- ...existing,
1216
- url: profile.url,
1217
- apiKey: inlineApiKey,
1218
- oauth: null
878
+ return exclusively(async () => {
879
+ const location = persistSecret(account.profileApiKey(name), profile.apiKey);
880
+ const inlineApiKey = location.backend === "file" ? profile.apiKey : null;
881
+ const file = await readProfilesFile();
882
+ const existing = findRecord(file, name);
883
+ flagResidualIfUnconfirmed(existing, "oauth", [removeKeyringEntry(account.profileOAuthAccess(name)), removeKeyringEntry(account.profileOAuthRefresh(name))]);
884
+ await upsertRecord(file, name, existing === null ? {
885
+ name,
886
+ url: profile.url,
887
+ apiKey: inlineApiKey,
888
+ oauth: null,
889
+ lastProbe: null,
890
+ lastFailure: null
891
+ } : {
892
+ ...existing,
893
+ url: profile.url,
894
+ apiKey: inlineApiKey,
895
+ oauth: null
896
+ });
897
+ return location;
1219
898
  });
1220
- return location;
1221
899
  }
1222
900
  async function writeOAuthProfile(url, credential, name = DEFAULT_PROFILE) {
1223
- const accessKey = account.profileOAuthAccess(name);
1224
- const refreshKey = account.profileOAuthRefresh(name);
1225
- const accessLocation = persistSecret(accessKey, credential.accessToken);
1226
- const refreshLocation = persistSecret(refreshKey, credential.refreshToken);
1227
- const onFile = accessLocation.backend === "file" || refreshLocation.backend === "file";
1228
- const oauth = {
1229
- accessToken: onFile ? credential.accessToken : null,
1230
- refreshToken: onFile ? credential.refreshToken : null,
1231
- expiresAt: credential.expiresAt,
1232
- clientId: credential.clientId
1233
- };
1234
- const file = await readProfilesFile();
1235
- const existing = findRecord(file, name);
1236
- if (onFile && existing !== null && sideIsKeyringBacked(existing, "oauth")) keyringDowngradeNotice = keyringFallbackWarning(fileLocation(accessKey));
1237
- flagResidualIfUnconfirmed(existing, "apiKey", [removeKeyringEntry(account.profileApiKey(name))]);
1238
- await upsertRecord(file, name, existing === null ? {
1239
- name,
1240
- url,
1241
- apiKey: null,
1242
- oauth,
1243
- lastProbe: null,
1244
- lastFailure: null
1245
- } : {
1246
- ...existing,
1247
- url,
1248
- apiKey: null,
1249
- oauth
901
+ return exclusively(async () => {
902
+ const accessKey = account.profileOAuthAccess(name);
903
+ const refreshKey = account.profileOAuthRefresh(name);
904
+ const accessLocation = persistSecret(accessKey, credential.accessToken);
905
+ const refreshLocation = persistSecret(refreshKey, credential.refreshToken);
906
+ const onFile = accessLocation.backend === "file" || refreshLocation.backend === "file";
907
+ const oauth = {
908
+ accessToken: onFile ? credential.accessToken : null,
909
+ refreshToken: onFile ? credential.refreshToken : null,
910
+ expiresAt: credential.expiresAt,
911
+ clientId: credential.clientId
912
+ };
913
+ const file = await readProfilesFile();
914
+ const existing = findRecord(file, name);
915
+ if (onFile && existing !== null && sideIsKeyringBacked(existing, "oauth")) keyringDowngradeNotice = keyringFallbackWarning(fileLocation(accessKey));
916
+ flagResidualIfUnconfirmed(existing, "apiKey", [removeKeyringEntry(account.profileApiKey(name))]);
917
+ await upsertRecord(file, name, existing === null ? {
918
+ name,
919
+ url,
920
+ apiKey: null,
921
+ oauth,
922
+ lastProbe: null,
923
+ lastFailure: null
924
+ } : {
925
+ ...existing,
926
+ url,
927
+ apiKey: null,
928
+ oauth
929
+ });
930
+ return onFile ? fileLocation(accessKey) : {
931
+ backend: "keyring",
932
+ service: KEYRING_SERVICE,
933
+ account: accessKey
934
+ };
1250
935
  });
1251
- return onFile ? fileLocation(accessKey) : {
1252
- backend: "keyring",
1253
- service: KEYRING_SERVICE,
1254
- account: accessKey
1255
- };
1256
936
  }
1257
937
  async function writeProbeResult(name, input) {
1258
- const probe = ProfileLastProbe.parse({
1259
- at: (/* @__PURE__ */ new Date()).toISOString(),
1260
- version: input.server.version,
1261
- edition: input.server.edition,
1262
- date: input.server.date,
1263
- hash: input.server.hash,
1264
- tokenFeatures: input.server.tokenFeatures,
1265
- user: input.user
1266
- });
1267
- const file = await readProfilesFile();
1268
- if (findRecord(file, name) === null) return null;
1269
- const profiles = file.profiles.map((entry) => entry.name === name ? {
1270
- ...entry,
1271
- lastProbe: probe,
1272
- lastFailure: null
1273
- } : entry);
1274
- await writeProfilesFile({
1275
- ...file,
1276
- profiles
938
+ return exclusively(async () => {
939
+ const probe = ProfileLastProbe.parse({
940
+ at: (/* @__PURE__ */ new Date()).toISOString(),
941
+ version: input.server.version,
942
+ edition: input.server.edition,
943
+ date: input.server.date,
944
+ hash: input.server.hash,
945
+ tokenFeatures: input.server.tokenFeatures,
946
+ user: input.user
947
+ });
948
+ const file = await readProfilesFile();
949
+ if (findRecord(file, name) === null) return null;
950
+ const profiles = file.profiles.map((entry) => entry.name === name ? {
951
+ ...entry,
952
+ lastProbe: probe,
953
+ lastFailure: null
954
+ } : entry);
955
+ await writeProfilesFile({
956
+ ...file,
957
+ profiles
958
+ });
959
+ return probe;
1277
960
  });
1278
- return probe;
1279
961
  }
1280
962
  async function writeProbeFailure(name, input) {
1281
- const failure = ProfileLastFailure.parse({
1282
- at: (/* @__PURE__ */ new Date()).toISOString(),
1283
- kind: input.kind,
1284
- reason: input.reason
1285
- });
1286
- const file = await readProfilesFile();
1287
- if (findRecord(file, name) === null) return null;
1288
- const profiles = file.profiles.map((entry) => entry.name === name ? {
1289
- ...entry,
1290
- lastFailure: failure
1291
- } : entry);
1292
- await writeProfilesFile({
1293
- ...file,
1294
- profiles
963
+ return exclusively(async () => {
964
+ const failure = ProfileLastFailure.parse({
965
+ at: (/* @__PURE__ */ new Date()).toISOString(),
966
+ kind: input.kind,
967
+ reason: input.reason
968
+ });
969
+ const file = await readProfilesFile();
970
+ if (findRecord(file, name) === null) return null;
971
+ const profiles = file.profiles.map((entry) => entry.name === name ? {
972
+ ...entry,
973
+ lastFailure: failure
974
+ } : entry);
975
+ await writeProfilesFile({
976
+ ...file,
977
+ profiles
978
+ });
979
+ return failure;
1295
980
  });
1296
- return failure;
1297
981
  }
1298
982
  async function clearProfile(name = DEFAULT_PROFILE) {
1299
- const file = await readProfilesFile();
1300
- const existing = findRecord(file, name);
1301
- const removals = [
1302
- removeKeyringEntry(account.profileApiKey(name)),
1303
- removeKeyringEntry(account.profileOAuthAccess(name)),
1304
- removeKeyringEntry(account.profileOAuthRefresh(name))
1305
- ];
1306
- if (existing !== null) flagResidualIfUnconfirmed(existing, existing.oauth !== null ? "oauth" : "apiKey", removals);
1307
- if (existing === null) return false;
1308
- await writeProfilesFile({
1309
- ...file,
1310
- profiles: file.profiles.filter((entry) => entry.name !== name)
983
+ return exclusively(async () => {
984
+ const file = await readProfilesFile();
985
+ const existing = findRecord(file, name);
986
+ const removals = [
987
+ removeKeyringEntry(account.profileApiKey(name)),
988
+ removeKeyringEntry(account.profileOAuthAccess(name)),
989
+ removeKeyringEntry(account.profileOAuthRefresh(name))
990
+ ];
991
+ if (existing !== null) flagResidualIfUnconfirmed(existing, existing.oauth !== null ? "oauth" : "apiKey", removals);
992
+ if (existing === null) return false;
993
+ await writeProfilesFile({
994
+ ...file,
995
+ profiles: file.profiles.filter((entry) => entry.name !== name)
996
+ });
997
+ return true;
1311
998
  });
1312
- return true;
1313
999
  }
1314
1000
  //#endregion
1315
1001
  //#region src/core/config.ts
1316
- function isPreflightSkipped() {
1317
- return readEnv(ENV_SKIP_PREFLIGHT) === "1";
1318
- }
1319
1002
  function resolveProfileName(profileFlag) {
1320
1003
  return explicitProfileName(profileFlag) ?? "default";
1321
1004
  }
@@ -1451,7 +1134,8 @@ async function readCachedServerProfile(profileName) {
1451
1134
  if (hit.kind !== "found") return hit;
1452
1135
  return {
1453
1136
  kind: "found",
1454
- profile: createServerProfile(hit.probe)
1137
+ profile: createServerProfile(hit.probe),
1138
+ probedAt: hit.probe.at
1455
1139
  };
1456
1140
  }
1457
1141
  //#endregion
@@ -1487,7 +1171,7 @@ function resolveCommonFlags(args, options = {}) {
1487
1171
  url: args.url,
1488
1172
  apiKey: args.apiKey,
1489
1173
  profile: args.profile,
1490
- skipPreflight: args.skipPreflight === true
1174
+ skipPreflight: args.skipPreflight
1491
1175
  };
1492
1176
  }
1493
1177
  function parseFields(value) {
@@ -1529,45 +1213,42 @@ function defineMetabaseCommand(def) {
1529
1213
  assertArgv(rawArgs, def.args);
1530
1214
  const ctx = resolveCommonFlags(commonArgs);
1531
1215
  let cachedConfig = null;
1532
- let cachedClient = null;
1533
1216
  const getResolvedConfig = async () => {
1534
1217
  if (cachedConfig === null) cachedConfig = await resolveConfig(buildConfigFlags(ctx));
1535
1218
  return cachedConfig;
1536
1219
  };
1537
- const preflightSkipped = ctx.skipPreflight || isPreflightSkipped();
1538
- let cachedServer = null;
1539
- const noticeSkew = createSkewNotifier();
1540
- const rawGetClient = async () => {
1541
- if (cachedClient === null) {
1542
- const resolved = await getResolvedConfig();
1543
- const probe = await readCachedProbe(resolved.profile, resolved.url);
1544
- const server = probe === null ? null : createServerProfile(probe);
1545
- const { createClient } = await import("./client-1UIUBA_V.mjs").then((n) => n.t);
1546
- cachedClient = createClient({
1547
- url: resolved.url,
1548
- credential: resolved.credential
1549
- }, {
1550
- userAgent: USER_AGENT,
1551
- ...server !== null && { server },
1552
- refreshCredential: createCredentialRefresher(resolved.profile),
1553
- signal: interruptSignal,
1554
- enforceRequirements: !preflightSkipped
1555
- });
1556
- if (probe !== null && server !== null) {
1557
- cachedServer = {
1558
- client: cachedClient,
1559
- profileName: resolved.profile,
1560
- probe
1561
- };
1562
- noticeSkew(server);
1563
- }
1564
- }
1565
- return cachedClient;
1220
+ const run = {
1221
+ server: null,
1222
+ profileSave: Promise.resolve("current")
1566
1223
  };
1567
- const enforcePreflight = createPreflightEnforcer(requirements === null ? null : requirements.features, preflightSkipped, noticeSkew);
1224
+ const noticeSkew = createSkewNotifier();
1225
+ const skipPreflight = ctx.skipPreflight ?? readEnv("MB_CLI_SKIP_PREFLIGHT") === "1";
1568
1226
  const getClient = async () => {
1569
- const client = await rawGetClient();
1570
- await enforcePreflight(client);
1227
+ if (run.server !== null) return run.server.client;
1228
+ const resolved = await getResolvedConfig();
1229
+ const probe = await readCachedProbe(resolved.profile, resolved.url);
1230
+ const server = probe === null ? null : createServerProfile(probe);
1231
+ const saveProbe = probe === null ? null : createProbeSaver(resolved.profile, probe);
1232
+ const { createClient } = await import("./client-BBwYPXDW.mjs").then((n) => n.t);
1233
+ const client = createClient({
1234
+ url: resolved.url,
1235
+ credential: resolved.credential
1236
+ }, {
1237
+ userAgent: USER_AGENT,
1238
+ ...server !== null && { server },
1239
+ refreshCredential: createCredentialRefresher(resolved.profile),
1240
+ onServerProbed: (fresh, profile) => {
1241
+ noticeSkew(profile);
1242
+ if (saveProbe !== null) run.profileSave = run.profileSave.then(() => saveProbe(fresh));
1243
+ },
1244
+ ...skipPreflight && { onPreflightSkipped: createPreflightSkipWarner() },
1245
+ signal: interruptSignal
1246
+ });
1247
+ run.server = {
1248
+ client,
1249
+ cachedProbe: probe
1250
+ };
1251
+ if (server !== null) noticeSkew(server);
1571
1252
  return client;
1572
1253
  };
1573
1254
  try {
@@ -1578,8 +1259,9 @@ function defineMetabaseCommand(def) {
1578
1259
  getResolvedConfig
1579
1260
  });
1580
1261
  } catch (error) {
1581
- throw await refreshProfileOnStaleError(error, cachedServer);
1262
+ throw await diagnoseFailure(error, run);
1582
1263
  } finally {
1264
+ await settleRun(run);
1583
1265
  emitPendingWarnings();
1584
1266
  }
1585
1267
  } catch (error) {
@@ -1619,40 +1301,72 @@ function createSkewNotifier() {
1619
1301
  if (notice !== null) warn(notice);
1620
1302
  };
1621
1303
  }
1622
- const NO_OP_ENFORCER = async () => {};
1623
- function createPreflightEnforcer(features, skip, noticeSkew) {
1624
- if (features === null || skip || features.length === 0) return NO_OP_ENFORCER;
1625
- let done = false;
1626
- return async (client) => {
1627
- if (done) return;
1628
- done = true;
1629
- const profile = await client.server();
1630
- noticeSkew(profile);
1631
- const failure = checkFeatures(features, profile);
1632
- if (failure !== null) throw new CapabilityError(failure);
1304
+ function createPreflightSkipWarner() {
1305
+ const warned = /* @__PURE__ */ new Set();
1306
+ return (skipped) => {
1307
+ const notice = skippedPreflightNotice(skipped);
1308
+ const key = skipped.kind === "unverified" ? skipped.kind : notice;
1309
+ if (warned.has(key)) return;
1310
+ warned.add(key);
1311
+ warn(notice);
1312
+ };
1313
+ }
1314
+ function skippedPreflightNotice(skipped) {
1315
+ if (skipped.kind === "refused") return preflightSkippedNotice(skipped.refusal.message);
1316
+ return preflightUncheckedNotice(skipped.failure.message);
1317
+ }
1318
+ function createProbeSaver(profileName, cached) {
1319
+ let current = cached;
1320
+ let state = "current";
1321
+ return async (fresh) => {
1322
+ if (sameServer(current, fresh)) return state;
1323
+ current = fresh;
1324
+ try {
1325
+ await writeProbeResult(profileName, {
1326
+ user: cached.user,
1327
+ server: fresh
1328
+ });
1329
+ state = "current";
1330
+ } catch (error) {
1331
+ warn(`Could not save the server's new probe to profile "${profileName}": ${errorMessage(error)}`);
1332
+ state = "stale";
1333
+ }
1334
+ return state;
1633
1335
  };
1634
1336
  }
1635
- async function refreshProfileOnStaleError(error, cached) {
1636
- if (cached === null) return error;
1637
- if (!(error instanceof ResponseShapeError) && !(error instanceof CapabilityError)) return error;
1638
- const note = await refreshChangedProbe(cached);
1337
+ async function settleRun(run) {
1338
+ let awaited = null;
1339
+ while (awaited !== run.profileSave) {
1340
+ if (run.server !== null) await run.server.client.probesSettled();
1341
+ awaited = run.profileSave;
1342
+ await awaited;
1343
+ }
1344
+ }
1345
+ async function diagnoseFailure(error, run) {
1346
+ if (run.server === null || !isSkewSymptom(error)) return error;
1347
+ const { client, cachedProbe } = run.server;
1348
+ if (cachedProbe === null) {
1349
+ await probeOnTheWayOut(client);
1350
+ return error;
1351
+ }
1352
+ const detail = error instanceof ResponseShapeError ? error.developerDetail : null;
1353
+ if (detail === null || detail.kind !== "zod" || detail.serverTag !== cachedProbe.version.tag) return error;
1354
+ const fresh = await probeOnTheWayOut(client);
1355
+ if (fresh === null) return error;
1356
+ const note = serverChangeNote(cachedProbe, fresh, detail.method, await run.profileSave);
1639
1357
  return note === null ? error : new ProfileRefreshedError(error, note);
1640
1358
  }
1641
- async function refreshChangedProbe(cached) {
1642
- let fresh;
1359
+ function isSkewSymptom(error) {
1360
+ if (error instanceof ResponseShapeError) return true;
1361
+ return error instanceof HttpError && error.kind === "route-missing";
1362
+ }
1363
+ async function probeOnTheWayOut(client) {
1643
1364
  try {
1644
- fresh = await probeServer(cached.client);
1365
+ return await client.verifiedServer();
1645
1366
  } catch (error) {
1646
- if (error instanceof MetabaseError) return null;
1367
+ if (isNonInterruptFailure(error)) return null;
1647
1368
  throw error;
1648
1369
  }
1649
- const note = serverChangeNote(cached.probe, fresh);
1650
- if (note === null) return null;
1651
- await writeProbeResult(cached.profileName, {
1652
- user: cached.probe.user,
1653
- server: fresh
1654
- });
1655
- return note;
1656
1370
  }
1657
1371
  function resolveReportFormat(commonArgs, rawArgs, argsDef) {
1658
1372
  try {
@@ -1685,4 +1399,4 @@ function buildConfigFlags(ctx) {
1685
1399
  return flags;
1686
1400
  }
1687
1401
  //#endregion
1688
- export { CapabilityError as $, registerClient as A, assertCredentialHeaderSafe as B, profileAuthMethod as C, OAUTH_SCOPE as D, revokeOAuthCredential as E, chainRequestFailure as F, normalizeUrl as G, credentialSecrets as H, isRetryableStatus as I, checkFeatures as J, ServerSummary as K, JSON_CONTENT_TYPE as L, buildNetworkError as M, isConnectionClosed as N, discoverLoginMetadata as O, HttpError as P, probeServer as Q, parseJson as R, ProfileLastFailure as S, USER_AGENT as T, oauthCredentialFromTokens as U, credentialAuthHeader as V, displayUrl as W, createServerProfile as X, Skew as Y, PROBE_PATH as Z, writeProbeFailure as _, readEnvCredentials as a, ProbedUser as b, clearProfile as c, keyringFallbackWarning as d, RequirementFailure as et, listProfileRecords as f, writeOAuthProfile as g, resolveRecordCredential as h, explicitProfileName as i, tryDiscoverMetadata as j, exchangeCode as k, consumeKeychainResidualWarning as l, readProfileRecord as m, readCachedServerProfile as n, parseOptionalInteger as nt, resolveProfileName as o, readProfileCredential as p, summarizeServer as q, createCredentialRefresher as r, DEFAULT_PROFILE as s, defineMetabaseCommand as t, parseInteger as tt, consumeKeyringDowngradeWarning as u, writeProbeResult as v, OAUTH_CLIENT_NAME as w, ProfileAuthMethod as x, writeProfile as y, parseJsonOrPlain as z };
1402
+ export { parseOptionalInteger as $, registerClient as A, credentialAuthHeader as B, profileAuthMethod as C, OAUTH_SCOPE as D, revokeOAuthCredential as E, probeBudget as F, ServerSummary as G, oauthCredentialFromTokens as H, probeServer as I, createServerProfile as J, summarizeServer as K, profileFromProperties as L, buildNetworkError as M, isConnectionClosed as N, discoverLoginMetadata as O, PROBE_PATH as P, parseInteger as Q, serverInfoFromProperties as R, ProfileLastFailure as S, USER_AGENT as T, displayUrl as U, credentialSecrets as V, normalizeUrl as W, describeVersion as X, featureGap as Y, SessionProperties as Z, writeProbeFailure as _, readEnvCredentials as a, ProbedUser as b, clearProfile as c, keyringFallbackWarning as d, listProfileRecords as f, writeOAuthProfile as g, resolveRecordCredential as h, explicitProfileName as i, tryDiscoverMetadata as j, exchangeCode as k, consumeKeychainResidualWarning as l, readProfileRecord as m, readCachedServerProfile as n, resolveProfileName as o, readProfileCredential as p, Skew as q, createCredentialRefresher as r, DEFAULT_PROFILE as s, defineMetabaseCommand as t, consumeKeyringDowngradeWarning as u, writeProbeResult as v, OAUTH_CLIENT_NAME as w, ProfileAuthMethod as x, writeProfile as y, assertCredentialHeaderSafe as z };