@metabase/cli 0.1.7 → 0.1.8-alpha.cleanup-workspaces.75fe1d5

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 (205) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +2 -224
  3. package/dist/add-collection-BGifL-7Y.mjs +10 -0
  4. package/dist/{add-collection-DQjTlDNF.mjs → add-collection-C5ijC4e-.mjs} +5 -5
  5. package/dist/{archive-De8jzzq7.mjs → archive-2GZVq0n2.mjs} +6 -7
  6. package/dist/{archive-DTN9tLGT.mjs → archive-C5pXDf6a.mjs} +5 -6
  7. package/dist/{archive-CBGKzEAl.mjs → archive-CTEybKPq.mjs} +5 -6
  8. package/dist/{archive-BXzghEQX.mjs → archive-DEtOH_jf.mjs} +6 -7
  9. package/dist/{archive-B3qiL-kK.mjs → archive-DTrn90If.mjs} +5 -6
  10. package/dist/{archive-CuVk8iwN.mjs → archive-nqKJOyOt.mjs} +6 -7
  11. package/dist/auth-Divr9vkY.mjs +19 -0
  12. package/dist/{body-tcURGnGh.mjs → body-BMyDvOjf.mjs} +2 -2
  13. package/dist/{branches-CIGkjXIk.mjs → branches-B7Zf-nxr.mjs} +5 -6
  14. package/dist/{cancel-pPsvgJ0Z.mjs → cancel-WwjcCE2R.mjs} +4 -5
  15. package/dist/{cancel-task-BLGE4UlL.mjs → cancel-task-E4cCeJTc.mjs} +5 -6
  16. package/dist/{render-0_GsapXa.mjs → capabilities-Dj3NgPHg.mjs} +28 -2
  17. package/dist/card-BHAcovSB.mjs +20 -0
  18. package/dist/{card-ezYiriML.mjs → card-BtPiKjbB.mjs} +1 -1
  19. package/dist/{cards-Dq3nx_9n.mjs → cards-BW0Spirk.mjs} +5 -6
  20. package/dist/cli.mjs +23 -24
  21. package/dist/collection-DZx-vWb2.mjs +20 -0
  22. package/dist/{create-BIphz0kO.mjs → create-BV_VpyyI.mjs} +10 -11
  23. package/dist/{create-w3mQg9n4.mjs → create-B_Ysb6Ex.mjs} +7 -8
  24. package/dist/{create-BcgoukG4.mjs → create-BgeD2GMZ.mjs} +9 -10
  25. package/dist/{create-DHscDhRd.mjs → create-Bxkik5Fs.mjs} +9 -10
  26. package/dist/{create-aPaUEGdr.mjs → create-CZfHpi_I.mjs} +7 -8
  27. package/dist/{create-BrUqxreg.mjs → create-CbwFOL9h.mjs} +7 -8
  28. package/dist/{create-9DBTkbMq.mjs → create-CbyY4xTG.mjs} +11 -12
  29. package/dist/{create-BdPoSk_7.mjs → create-HCCdsuZR.mjs} +9 -10
  30. package/dist/{create-branch-DGoc9CUU.mjs → create-branch-BNRq3tO2.mjs} +5 -6
  31. package/dist/{current-task-DZM28rnr.mjs → current-task-ZvTjL4hP.mjs} +5 -6
  32. package/dist/dashboard-DCWGcx3e.mjs +21 -0
  33. package/dist/{database-BXiue1in.mjs → database-_Td7rG4o.mjs} +1 -1
  34. package/dist/db-bD6fwLwc.mjs +22 -0
  35. package/dist/{delete-BPaFdHZP.mjs → delete-D5-ITH10.mjs} +6 -7
  36. package/dist/{delete-BrJOotpW.mjs → delete-DvmHTMwf.mjs} +6 -7
  37. package/dist/{delete-runtime-uuYbd4k2.mjs → delete-runtime-Bo7v-0au.mjs} +2 -2
  38. package/dist/{delete-table-CNupWUO0.mjs → delete-table-DjmO5Qe4.mjs} +6 -7
  39. package/dist/{dirty-BCkNOY8c.mjs → dirty-BJgU1SGQ.mjs} +5 -6
  40. package/dist/{eid-CLY5X0Uw.mjs → eid-pqSVgO2g.mjs} +6 -7
  41. package/dist/{error-ZsFeevV2.mjs → error-Br6irjpM.mjs} +1 -1
  42. package/dist/{export-CgHgWW3I.mjs → export-gVXTOxC2.mjs} +7 -8
  43. package/dist/field-BFWc8q2W.mjs +18 -0
  44. package/dist/{fields-RkRWU-u9.mjs → fields-DK2TYRK2.mjs} +6 -7
  45. package/dist/{get-y17zJMnU.mjs → get-BjArD6Er.mjs} +5 -6
  46. package/dist/{get-42tJ7BNp.mjs → get-C1RSXOhf.mjs} +5 -6
  47. package/dist/{get-C9O_aEGo.mjs → get-C3RI_hKG.mjs} +5 -6
  48. package/dist/{get-DmzgSgrl.mjs → get-C7UEEICF.mjs} +6 -7
  49. package/dist/{get-B9kwSs6U.mjs → get-D-3tOuWQ.mjs} +5 -6
  50. package/dist/{get-CvmqPN30.mjs → get-DDF7_apz.mjs} +5 -6
  51. package/dist/{get-B8l4t4Pz.mjs → get-DYgLtHb8.mjs} +5 -6
  52. package/dist/{get-sMpa-X4E.mjs → get-DnK3WGDH.mjs} +6 -7
  53. package/dist/{get-CTDqioaj.mjs → get-DnyZMx-0.mjs} +5 -6
  54. package/dist/{get-Bo4Cpd_c.mjs → get-DtG5ytvs.mjs} +5 -7
  55. package/dist/{get-CiZrZJLt.mjs → get-Dy4NedW5.mjs} +7 -8
  56. package/dist/{get-DsqGHNHN.mjs → get-_JI4GiPa.mjs} +5 -6
  57. package/dist/{get-run-CBwcRc8E.mjs → get-run-CZwIo5QR.mjs} +5 -6
  58. package/dist/{get-CRvbChoX.mjs → get-xo5_PD1n.mjs} +5 -6
  59. package/dist/git-sync-Ch00miSa.mjs +28 -0
  60. package/dist/{has-remote-changes-CfRidwXT.mjs → has-remote-changes-tuuoPdHV.mjs} +5 -6
  61. package/dist/{import-BZV0Z2KR.mjs → import-BOzyRPTk.mjs} +7 -8
  62. package/dist/{is-dirty-hKcB4OH9.mjs → is-dirty-BXN1F9yR.mjs} +4 -4
  63. package/dist/is-dirty-Bc1UHnBU.mjs +9 -0
  64. package/dist/{items-C94eW2Yd.mjs → items-CC4sSWv7.mjs} +7 -8
  65. package/dist/{list-BFlzLGlw.mjs → list-BUpOvQsd.mjs} +4 -5
  66. package/dist/{list-B0V7FeL2.mjs → list-BlMpI88r.mjs} +4 -6
  67. package/dist/{list-BJXaGk-z.mjs → list-BqTdYtOW.mjs} +4 -5
  68. package/dist/{list-CF1pMN4S.mjs → list-BvTuDJZp.mjs} +4 -5
  69. package/dist/{list-BS_Bxejg.mjs → list-C48ZZLM5.mjs} +6 -7
  70. package/dist/{list-DfDZr55C.mjs → list-CJe45jFT.mjs} +6 -7
  71. package/dist/{list-C-oZe1_p.mjs → list-CMoG5_mh.mjs} +5 -6
  72. package/dist/{list-BmHoYJr7.mjs → list-CkI3hESA.mjs} +4 -5
  73. package/dist/{list-DuSoEk_J.mjs → list-CybLzPZw.mjs} +6 -7
  74. package/dist/{list-HS15y_WN.mjs → list-DLhU81LP.mjs} +4 -5
  75. package/dist/{list-CU6sOfI-.mjs → list-Ddyb5T-7.mjs} +5 -6
  76. package/dist/{list-CqN4gvCk.mjs → list-tveV3LKh.mjs} +5 -6
  77. package/dist/{list-DrINpVLM.mjs → list-u7cmunGG.mjs} +4 -5
  78. package/dist/{login-enh9Yimb.mjs → login-Bfsf6jLq.mjs} +9 -10
  79. package/dist/{logout-BWLPLDh8.mjs → logout-BCsE_1Yg.mjs} +4 -5
  80. package/dist/{manifest-BNh0Lw6p.mjs → manifest-B_OfG-Ss.mjs} +1 -2
  81. package/dist/measure-D_eiCKq9.mjs +19 -0
  82. package/dist/{metadata-BTTEBWdS.mjs → metadata-Cbqx1-yW.mjs} +7 -8
  83. package/dist/{metadata-D2TxboMm.mjs → metadata-CzbGy4b-.mjs} +6 -7
  84. package/dist/{parse-id-0_tOPvfI.mjs → parse-id-DBwNYb4Y.mjs} +1 -1
  85. package/dist/{path-C8GrBdgT.mjs → path-DJ-DfUGC.mjs} +4 -6
  86. package/dist/{poll-4eoh5J0r.mjs → poll-DWkVceIk.mjs} +1 -1
  87. package/dist/{poll-task-51WRdugU.mjs → poll-task-DOvUDrgL.mjs} +2 -2
  88. package/dist/{preflight-BhsErYz3.mjs → preflight-D-l6sLCX.mjs} +3 -3
  89. package/dist/{query-DYVBnu9d.mjs → query--05TZxmk.mjs} +7 -8
  90. package/dist/{query-BBCAF-tG.mjs → query-BbbDpt3u.mjs} +11 -12
  91. package/dist/{query-result-ABPLz6I4.mjs → query-result-PoQE05Pe.mjs} +1 -1
  92. package/dist/{remove-collection-CBAHz0Dk.mjs → remove-collection-Dco3yXa-.mjs} +7 -8
  93. package/dist/{rescan-values-cfTSNQZo.mjs → rescan-values-B1vE6I62.mjs} +7 -8
  94. package/dist/{run-qgdEJv-I.mjs → run-CWb_yZbK.mjs} +7 -8
  95. package/dist/{runs-BFIIH4GL.mjs → runs-BLwEO5sW.mjs} +6 -7
  96. package/dist/{runtime-Duawf5lE.mjs → runtime-DKLBPRhd.mjs} +10 -77
  97. package/dist/{schema-tables-C2xM3dho.mjs → schema-tables-D1qE25GS.mjs} +6 -7
  98. package/dist/{schemas-BP7xiktH.mjs → schemas-CFuYnQDg.mjs} +4 -5
  99. package/dist/{search-DYP3lOlq.mjs → search-CF4A051Z.mjs} +4 -5
  100. package/dist/segment-BP_vDpYM.mjs +19 -0
  101. package/dist/{set-DpRQqdo7.mjs → set-BJ8Rs-vI.mjs} +7 -8
  102. package/dist/{setting-DUa96KF3.mjs → setting-EYI0HqTq.mjs} +3 -3
  103. package/dist/{setup-BPlllnim.mjs → setup-DI6EGOdH.mjs} +6 -7
  104. package/dist/{skills-BkregMyb.mjs → skills-BDPVoBWU.mjs} +33 -2
  105. package/dist/{skills-SqbPo0BI.mjs → skills-CRECMGAo.mjs} +3 -3
  106. package/dist/snippet-BwK58D1F.mjs +19 -0
  107. package/dist/{stash-C89zNKxo.mjs → stash-BpPS0uG8.mjs} +7 -8
  108. package/dist/{status-B1EJ_jv0.mjs → status-BqFA7Tqr.mjs} +6 -7
  109. package/dist/{status-BNvFPemM.mjs → status-CU5LYX0i.mjs} +4 -5
  110. package/dist/{summary-Cihbx0Qs.mjs → summary-CraRyIM_.mjs} +5 -6
  111. package/dist/{sync-schema-C3odu0ZH.mjs → sync-schema-DkfwPESH.mjs} +7 -8
  112. package/dist/table-CJMN6ql8.mjs +19 -0
  113. package/dist/{table-qDD2kApF.mjs → table-CkWja2UH.mjs} +1 -1
  114. package/dist/transform-BqV5ssDN.mjs +24 -0
  115. package/dist/transform-job-DvdOLV9b.mjs +19 -0
  116. package/dist/{tree-mvq9gM9w.mjs → tree-Bd1i-Y4U.mjs} +4 -5
  117. package/dist/{update-CbBnHz42.mjs → update-BLZHmA0X.mjs} +10 -11
  118. package/dist/{update-Rr4usmCo.mjs → update-BncGqeWt.mjs} +8 -9
  119. package/dist/{update-DwRxdflw.mjs → update-C4f-8fsU.mjs} +8 -9
  120. package/dist/{update-VvKMnwsM.mjs → update-CgpgyDjd.mjs} +10 -11
  121. package/dist/{update-DCrOQ1PW.mjs → update-CsYa--Eb.mjs} +11 -12
  122. package/dist/{update-BoIiuC70.mjs → update-DA9aPhRr.mjs} +10 -11
  123. package/dist/{update-CtOo3LsX.mjs → update-DtO-1_tj.mjs} +9 -10
  124. package/dist/{update-tRparnUs.mjs → update-IPsv9Pj0.mjs} +12 -13
  125. package/dist/{update-C0jP0AKT.mjs → update-OZoOTnlY.mjs} +8 -9
  126. package/dist/{update-dashcard-DFvIz8Qj.mjs → update-dashcard-D0VAwfNO.mjs} +8 -9
  127. package/dist/{upgrade-D-Rl_fH9.mjs → upgrade-Bb_q7hJ7.mjs} +34 -7
  128. package/dist/{uuid-BSVUk8u2.mjs → uuid-DTdRruiz.mjs} +3 -4
  129. package/dist/{validate-dPEOnOf8.mjs → validate-CqVB_3_p.mjs} +1 -1
  130. package/dist/{validate-query-CYvOP8Ld.mjs → validate-query-BUTNK00f.mjs} +2 -2
  131. package/dist/{values-D1RJE4H6.mjs → values-Bpt6obVW.mjs} +5 -6
  132. package/dist/{verify-A7BWfBPZ.mjs → verify-COt2q73-.mjs} +1 -1
  133. package/dist/{wait-DK5QDZ8n.mjs → wait-DoKPlspq.mjs} +6 -7
  134. package/dist/{wait-flags-DlfbIXHw.mjs → wait-flags-D1jNm0JK.mjs} +2 -2
  135. package/package.json +1 -1
  136. package/skill-data/core/SKILL.md +15 -28
  137. package/skill-data/git-sync/SKILL.md +8 -63
  138. package/skill-data/mbql/SKILL.md +2 -0
  139. package/skill-data/transform/SKILL.md +16 -6
  140. package/skill-data/visualization/SKILL.md +158 -0
  141. package/skill-data/visualization/references/settings.md +414 -0
  142. package/skills/metabase-cli/SKILL.md +1 -1
  143. package/dist/add-collection-C9BdVBs2.mjs +0 -11
  144. package/dist/auth-D9eAyVoG.mjs +0 -19
  145. package/dist/capabilities-7e9MgquN.mjs +0 -29
  146. package/dist/card-DDDrWcDU.mjs +0 -20
  147. package/dist/collection-DkEvCDar.mjs +0 -20
  148. package/dist/create-B1dyuL9Y.mjs +0 -54
  149. package/dist/credentials-qryRLUed.mjs +0 -88
  150. package/dist/dashboard-BLf1RZlk.mjs +0 -21
  151. package/dist/database-Ce1gOJF7.mjs +0 -17
  152. package/dist/db-CWTFe_FZ.mjs +0 -22
  153. package/dist/delete-FFj1xQWO.mjs +0 -104
  154. package/dist/deprovision-BNr9fPDY.mjs +0 -67
  155. package/dist/docker-Ds252Mwc.mjs +0 -515
  156. package/dist/field-LL6W_c-c.mjs +0 -18
  157. package/dist/git-sync-CrWTo3YX.mjs +0 -28
  158. package/dist/is-dirty-CPzOnnH6.mjs +0 -10
  159. package/dist/license-B37055sr.mjs +0 -17
  160. package/dist/list-DUXdt0XI.mjs +0 -36
  161. package/dist/logs-Cu3QtvPs.mjs +0 -60
  162. package/dist/measure-CDlEPFtB.mjs +0 -19
  163. package/dist/parse-schemas-D-qVLl4z.mjs +0 -12
  164. package/dist/process-CM7Uu5q_.mjs +0 -105
  165. package/dist/provision-Chf86BF0.mjs +0 -83
  166. package/dist/ps-CEYtsKBj.mjs +0 -80
  167. package/dist/ps-CIDwaubS.mjs +0 -11
  168. package/dist/remove-2yInufA6.mjs +0 -64
  169. package/dist/segment-B6HnNGDs.mjs +0 -19
  170. package/dist/set-Tt-ioa4L.mjs +0 -68
  171. package/dist/snippet-dJ68tGsl.mjs +0 -19
  172. package/dist/start-DJZA67WF.mjs +0 -414
  173. package/dist/status-D5wSqYV_.mjs +0 -34
  174. package/dist/stop-5rCLmkCQ.mjs +0 -87
  175. package/dist/table-J2f0STnB.mjs +0 -19
  176. package/dist/transform-job-OW4SDhsQ.mjs +0 -19
  177. package/dist/transform-q1LYWQtW.mjs +0 -24
  178. package/dist/update-DEZayTb4.mjs +0 -78
  179. package/dist/url-BB6jeNQj.mjs +0 -56
  180. package/dist/wait-B17I_pWy.mjs +0 -19
  181. package/dist/workspace-D8HtUN0y.mjs +0 -72
  182. package/dist/workspace-credentials-8CBMQJFz.mjs +0 -100
  183. package/dist/workspace-ri6r3zWo.mjs +0 -25
  184. package/dist/yaml-Gv6wRFMF.mjs +0 -43
  185. package/skill-data/viz/SKILL.md +0 -137
  186. package/skill-data/viz/references/settings.md +0 -312
  187. package/skill-data/workspace/SKILL.md +0 -390
  188. /package/dist/{body-flags-D7q87Btw.mjs → body-flags-D78h_-Ua.mjs} +0 -0
  189. /package/dist/{collection-Bcy8cWYH.mjs → collection-B3sPXRLs.mjs} +0 -0
  190. /package/dist/{dashboard-B4bn3z6t.mjs → dashboard-FY5UzJ_Z.mjs} +0 -0
  191. /package/dist/{field-E0IBy4Uw.mjs → field-MGxpNQUH.mjs} +0 -0
  192. /package/dist/{input-cMSEqISy.mjs → input-xewHccej.mjs} +0 -0
  193. /package/dist/{key-vkNkH82H.mjs → key-C2XG394c.mjs} +0 -0
  194. /package/dist/{measure-Bt3InQsA.mjs → measure-ClESGxIb.mjs} +0 -0
  195. /package/dist/{paginate-BexjkjbY.mjs → paginate-Dfm9eO9A.mjs} +0 -0
  196. /package/dist/{parse-enum-CrEWOhuY.mjs → parse-enum-Dr7ACrTR.mjs} +0 -0
  197. /package/dist/{parse-ref-DKag6a6I.mjs → parse-ref-BiETXmvm.mjs} +0 -0
  198. /package/dist/{prompt-CFKoys7k.mjs → prompt-u4WhE4T5.mjs} +0 -0
  199. /package/dist/{render-khznBlla.mjs → render-BQHJhSP1.mjs} +0 -0
  200. /package/dist/{revision-message-flag-DY29-cgz.mjs → revision-message-flag-WmsIzUOM.mjs} +0 -0
  201. /package/dist/{segment-DhBmcr_E.mjs → segment-Be2v4ilr.mjs} +0 -0
  202. /package/dist/{setting-BzCng1Ub.mjs → setting-oL97SNeO.mjs} +0 -0
  203. /package/dist/{snippet-bi_0XbNT.mjs → snippet-xh42tYly.mjs} +0 -0
  204. /package/dist/{transform-BKahefz_.mjs → transform-DyJb0bV0.mjs} +0 -0
  205. /package/dist/{transform-job-DjhoJbiV.mjs → transform-job-DpDGoqQt.mjs} +0 -0
@@ -0,0 +1,19 @@
1
+ import { defineCommand } from "citty";
2
+
3
+ //#region src/commands/measure/index.ts
4
+ var measure_default = defineCommand({
5
+ meta: {
6
+ name: "measure",
7
+ description: "Manage Metabase measures"
8
+ },
9
+ subCommands: {
10
+ list: () => import("./list-DLhU81LP.mjs").then((mod) => mod.default),
11
+ get: () => import("./get-BjArD6Er.mjs").then((mod) => mod.default),
12
+ create: () => import("./create-HCCdsuZR.mjs").then((mod) => mod.default),
13
+ update: () => import("./update-BLZHmA0X.mjs").then((mod) => mod.default),
14
+ archive: () => import("./archive-nqKJOyOt.mjs").then((mod) => mod.default)
15
+ }
16
+ });
17
+
18
+ //#endregion
19
+ export { measure_default as default };
@@ -1,12 +1,11 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderItem } from "./render-0_GsapXa.mjs";
6
- import "./field-E0IBy4Uw.mjs";
7
- import { parseId } from "./parse-id-0_tOPvfI.mjs";
8
- import "./table-qDD2kApF.mjs";
9
- import { Database, databaseView } from "./database-BXiue1in.mjs";
2
+ import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderItem } from "./capabilities-Dj3NgPHg.mjs";
5
+ import "./field-MGxpNQUH.mjs";
6
+ import { parseId } from "./parse-id-DBwNYb4Y.mjs";
7
+ import "./table-CkWja2UH.mjs";
8
+ import { Database, databaseView } from "./database-_Td7rG4o.mjs";
10
9
 
11
10
  //#region src/commands/db/metadata.ts
12
11
  var metadata_default = defineMetabaseCommand({
@@ -1,11 +1,10 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderItem } from "./render-0_GsapXa.mjs";
6
- import "./field-E0IBy4Uw.mjs";
7
- import { parseId } from "./parse-id-0_tOPvfI.mjs";
8
- import { TableQueryMetadata, tableView } from "./table-qDD2kApF.mjs";
2
+ import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderItem } from "./capabilities-Dj3NgPHg.mjs";
5
+ import "./field-MGxpNQUH.mjs";
6
+ import { parseId } from "./parse-id-DBwNYb4Y.mjs";
7
+ import { TableQueryMetadata, tableView } from "./table-CkWja2UH.mjs";
9
8
 
10
9
  //#region src/commands/table/metadata.ts
11
10
  var metadata_default = defineMetabaseCommand({
@@ -1,4 +1,4 @@
1
- import { parseInteger } from "./runtime-Duawf5lE.mjs";
1
+ import { parseInteger } from "./runtime-DKLBPRhd.mjs";
2
2
 
3
3
  //#region src/commands/parse-id.ts
4
4
  function parseId(value, name = "id") {
@@ -1,10 +1,8 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { listEnvelopeSchema, outputFlags, wrapList } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderList } from "./render-0_GsapXa.mjs";
6
- import "./yaml-Gv6wRFMF.mjs";
7
- import { findSkillByName, loadAllSkills, loadVisibleSkills } from "./skills-BkregMyb.mjs";
2
+ import { listEnvelopeSchema, outputFlags, wrapList } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderList } from "./capabilities-Dj3NgPHg.mjs";
5
+ import { findSkillByName, loadAllSkills, loadVisibleSkills } from "./skills-BDPVoBWU.mjs";
8
6
  import { z } from "zod";
9
7
 
10
8
  //#region src/commands/skills/path.ts
@@ -1,5 +1,5 @@
1
1
  import { TimeoutError } from "./command-augment-BH9qgQ5u.mjs";
2
- import { combineAborts, throwIfAborted } from "./runtime-Duawf5lE.mjs";
2
+ import { combineAborts, throwIfAborted } from "./runtime-DKLBPRhd.mjs";
3
3
  import { setTimeout } from "node:timers/promises";
4
4
 
5
5
  //#region src/runtime/poll.ts
@@ -1,5 +1,5 @@
1
- import { parseJsonOrPlain } from "./runtime-Duawf5lE.mjs";
2
- import { pollUntil } from "./poll-4eoh5J0r.mjs";
1
+ import { parseJsonOrPlain } from "./runtime-DKLBPRhd.mjs";
2
+ import { pollUntil } from "./poll-DWkVceIk.mjs";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/domain/git-sync.ts
@@ -1,7 +1,7 @@
1
1
  import { ChainedRequestError, ConfigError, MetabaseError } from "./command-augment-BH9qgQ5u.mjs";
2
- import { HttpError } from "./runtime-Duawf5lE.mjs";
3
- import { writeJson } from "./render-0_GsapXa.mjs";
4
- import { Card } from "./card-ezYiriML.mjs";
2
+ import { HttpError } from "./runtime-DKLBPRhd.mjs";
3
+ import { writeJson } from "./capabilities-Dj3NgPHg.mjs";
4
+ import { Card } from "./card-BtPiKjbB.mjs";
5
5
  import { z } from "zod";
6
6
 
7
7
  //#region src/commands/dashboard/preflight.ts
@@ -1,12 +1,11 @@
1
1
  import { ConfigError } from "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand, parseJson } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderSummary } from "./render-0_GsapXa.mjs";
6
- import "./field-E0IBy4Uw.mjs";
7
- import { CardQueryResult, cardQueryView } from "./card-ezYiriML.mjs";
8
- import { parseId } from "./parse-id-0_tOPvfI.mjs";
9
- import { formatQueryResult } from "./query-result-ABPLz6I4.mjs";
2
+ import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand, parseJson } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
5
+ import "./field-MGxpNQUH.mjs";
6
+ import { CardQueryResult, cardQueryView } from "./card-BtPiKjbB.mjs";
7
+ import { parseId } from "./parse-id-DBwNYb4Y.mjs";
8
+ import { formatQueryResult } from "./query-result-PoQE05Pe.mjs";
10
9
  import { z } from "zod";
11
10
  import { Writable } from "node:stream";
12
11
 
@@ -1,16 +1,15 @@
1
1
  import { ConfigError } from "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderSummary, writeJson } from "./render-0_GsapXa.mjs";
6
- import "./input-cMSEqISy.mjs";
7
- import "./field-E0IBy4Uw.mjs";
8
- import { CardQueryResult, cardQueryView } from "./card-ezYiriML.mjs";
9
- import { readBody } from "./body-tcURGnGh.mjs";
10
- import { bodyInputFlags } from "./body-flags-D7q87Btw.mjs";
11
- import { assertNotLegacyEnvelopeWrappingMbql5, getQuerySchemaBundle, isMbql5Query, validateQuery } from "./validate-dPEOnOf8.mjs";
12
- import { skipValidateFlag } from "./validate-query-CYvOP8Ld.mjs";
13
- import { formatQueryResult } from "./query-result-ABPLz6I4.mjs";
2
+ import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderSummary, writeJson } from "./capabilities-Dj3NgPHg.mjs";
5
+ import "./input-xewHccej.mjs";
6
+ import "./field-MGxpNQUH.mjs";
7
+ import { CardQueryResult, cardQueryView } from "./card-BtPiKjbB.mjs";
8
+ import { readBody } from "./body-BMyDvOjf.mjs";
9
+ import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
10
+ import { assertNotLegacyEnvelopeWrappingMbql5, getQuerySchemaBundle, isMbql5Query, validateQuery } from "./validate-CqVB_3_p.mjs";
11
+ import { skipValidateFlag } from "./validate-query-BUTNK00f.mjs";
12
+ import { formatQueryResult } from "./query-result-PoQE05Pe.mjs";
14
13
  import { z } from "zod";
15
14
 
16
15
  //#region src/commands/query.ts
@@ -1,4 +1,4 @@
1
- import { formatScalar, renderRows } from "./render-0_GsapXa.mjs";
1
+ import { formatScalar, renderRows } from "./capabilities-Dj3NgPHg.mjs";
2
2
 
3
3
  //#region src/output/query-result.ts
4
4
  function formatQueryResult(result) {
@@ -1,12 +1,11 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderSummary } from "./render-0_GsapXa.mjs";
6
- import { parseId } from "./parse-id-0_tOPvfI.mjs";
7
- import "./poll-task-51WRdugU.mjs";
8
- import "./poll-4eoh5J0r.mjs";
9
- import { SyncSettingsUpdateResult, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-DQjTlDNF.mjs";
2
+ import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
5
+ import { parseId } from "./parse-id-DBwNYb4Y.mjs";
6
+ import "./poll-task-DOvUDrgL.mjs";
7
+ import "./poll-DWkVceIk.mjs";
8
+ import { SyncSettingsUpdateResult, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-C5ijC4e-.mjs";
10
9
 
11
10
  //#region src/commands/git-sync/remove-collection.ts
12
11
  var remove_collection_default = defineMetabaseCommand({
@@ -1,12 +1,11 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderSummary } from "./render-0_GsapXa.mjs";
6
- import "./field-E0IBy4Uw.mjs";
7
- import { parseId } from "./parse-id-0_tOPvfI.mjs";
8
- import "./table-qDD2kApF.mjs";
9
- import { DatabaseSyncResult, databaseSyncResultView } from "./database-BXiue1in.mjs";
2
+ import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
5
+ import "./field-MGxpNQUH.mjs";
6
+ import { parseId } from "./parse-id-DBwNYb4Y.mjs";
7
+ import "./table-CkWja2UH.mjs";
8
+ import { DatabaseSyncResult, databaseSyncResultView } from "./database-_Td7rG4o.mjs";
10
9
  import { z } from "zod";
11
10
 
12
11
  //#region src/commands/db/rescan-values.ts
@@ -1,12 +1,11 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderSummary } from "./render-0_GsapXa.mjs";
6
- import { parseId } from "./parse-id-0_tOPvfI.mjs";
7
- import { pollUntil } from "./poll-4eoh5J0r.mjs";
8
- import { parseWaitFlags, waitFlags } from "./wait-flags-DlfbIXHw.mjs";
9
- import { TransformRun } from "./transform-BKahefz_.mjs";
2
+ import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
5
+ import { parseId } from "./parse-id-DBwNYb4Y.mjs";
6
+ import { pollUntil } from "./poll-DWkVceIk.mjs";
7
+ import { parseWaitFlags, waitFlags } from "./wait-flags-D1jNm0JK.mjs";
8
+ import { TransformRun } from "./transform-DyJb0bV0.mjs";
10
9
  import { z } from "zod";
11
10
 
12
11
  //#region src/commands/transform/run.ts
@@ -1,11 +1,10 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderList } from "./render-0_GsapXa.mjs";
6
- import { parseId } from "./parse-id-0_tOPvfI.mjs";
7
- import { collectPaginated } from "./paginate-BexjkjbY.mjs";
8
- import { TransformRun, TransformRunCompact, transformRunView } from "./transform-BKahefz_.mjs";
2
+ import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderList } from "./capabilities-Dj3NgPHg.mjs";
5
+ import { parseId } from "./parse-id-DBwNYb4Y.mjs";
6
+ import { collectPaginated } from "./paginate-Dfm9eO9A.mjs";
7
+ import { TransformRun, TransformRunCompact, transformRunView } from "./transform-DyJb0bV0.mjs";
9
8
 
10
9
  //#region src/commands/transform/runs.ts
11
10
  const TransformRunListEnvelope = listEnvelopeSchema(TransformRunCompact);
@@ -1,6 +1,6 @@
1
1
  import { AbortError, ConfigError, MetabaseError, NetworkError, ResponseShapeError, TimeoutError, ValidationError, errorMessage, flagConsumesValue, isNotFoundError, normalizeFlag, setMetabaseAugment, toAliasArray } from "./command-augment-BH9qgQ5u.mjs";
2
- import { DEFAULT_MAX_BYTES, package_default, reportError } from "./error-ZsFeevV2.mjs";
3
- import { BASELINE_CAPABILITIES, isPlainObject, warn } from "./capabilities-7e9MgquN.mjs";
2
+ import { DEFAULT_MAX_BYTES, package_default, reportError } from "./error-Br6irjpM.mjs";
3
+ import { BASELINE_CAPABILITIES, isPlainObject, warn } from "./capabilities-Dj3NgPHg.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  import { z } from "zod";
6
6
  import { promises } from "node:fs";
@@ -124,10 +124,7 @@ const ProfileRecord = z.object({
124
124
  lastProbe: ProfileLastProbe.nullable(),
125
125
  lastFailure: ProfileLastFailure.nullable()
126
126
  });
127
- const ProfilesFile = z.object({
128
- profiles: z.array(ProfileRecord),
129
- license: z.string().nullable()
130
- });
127
+ const ProfilesFile = z.object({ profiles: z.array(ProfileRecord) });
131
128
 
132
129
  //#endregion
133
130
  //#region src/core/auth/storage.ts
@@ -139,10 +136,7 @@ const PROFILES_FILE_MODE = 384;
139
136
  const PROFILES_DIR_MODE = 448;
140
137
  const DEFAULT_PROFILE = "default";
141
138
  const LEGACY_STORAGE_NOTICE = "Old profile storage detected and ignored; re-run `mb auth login` for each profile.";
142
- const account = {
143
- profileApiKey: (profile) => `profile:${profile}:apiKey`,
144
- license: "license"
145
- };
139
+ const account = { profileApiKey: (profile) => `profile:${profile}:apiKey` };
146
140
  let legacyWarningPending = false;
147
141
  function profilesFilePath() {
148
142
  return join(configDir(), PROFILES_FILE);
@@ -188,10 +182,7 @@ async function readProfilesFile() {
188
182
  } catch (error) {
189
183
  if (isNotFoundError(error)) {
190
184
  await detectLegacyArtifacts();
191
- return {
192
- profiles: [],
193
- license: null
194
- };
185
+ return { profiles: [] };
195
186
  }
196
187
  throw error;
197
188
  }
@@ -199,10 +190,7 @@ async function readProfilesFile() {
199
190
  if (parsed.ok) return parsed.value;
200
191
  if (parsed.error instanceof ValidationError) {
201
192
  legacyWarningPending = true;
202
- return {
203
- profiles: [],
204
- license: null
205
- };
193
+ return { profiles: [] };
206
194
  }
207
195
  throw parsed.error;
208
196
  }
@@ -222,7 +210,7 @@ async function fileExists(path) {
222
210
  }
223
211
  async function writeProfilesFile(file) {
224
212
  const path = profilesFilePath();
225
- if (file.profiles.length === 0 && file.license === null) {
213
+ if (file.profiles.length === 0) {
226
214
  await promises.unlink(path).catch(() => void 0);
227
215
  await cleanupLegacyFiles();
228
216
  return;
@@ -249,9 +237,9 @@ function fileLocation(key) {
249
237
  reason: keyringEnabled() ? "unavailable" : "disabled"
250
238
  };
251
239
  }
252
- function keyringFallbackWarning(location, subject) {
240
+ function keyringFallbackWarning(location) {
253
241
  const cause = location.reason === "disabled" ? "OS keychain disabled via METABASE_CLI_DISABLE_KEYRING" : "OS keychain unavailable";
254
- return `warning: ${cause}; ${subject} stored as plaintext at ${location.path}`;
242
+ return `warning: ${cause}; credentials stored as plaintext at ${location.path}`;
255
243
  }
256
244
  async function persistApiKey(name, apiKey) {
257
245
  const key = account.profileApiKey(name);
@@ -360,42 +348,6 @@ async function clearProfile(name = DEFAULT_PROFILE) {
360
348
  });
361
349
  return true;
362
350
  }
363
- async function readLicense() {
364
- const fromKeyring = tryReadKeyring(account.license);
365
- if (typeof fromKeyring === "string") return fromKeyring;
366
- const file = await readProfilesFile();
367
- return file.license;
368
- }
369
- async function writeLicense(token) {
370
- const key = account.license;
371
- const file = await readProfilesFile();
372
- if (trySetKeyring(key, token)) {
373
- if (file.license !== null) await writeProfilesFile({
374
- ...file,
375
- license: null
376
- });
377
- return {
378
- backend: "keyring",
379
- service: KEYRING_SERVICE,
380
- account: key
381
- };
382
- }
383
- await writeProfilesFile({
384
- ...file,
385
- license: token
386
- });
387
- return fileLocation(key);
388
- }
389
- async function clearLicense() {
390
- const removedFromKeyring = tryRemoveKeyring(account.license);
391
- const file = await readProfilesFile();
392
- const hadInline = file.license !== null;
393
- if (hadInline) await writeProfilesFile({
394
- ...file,
395
- license: null
396
- });
397
- return removedFromKeyring === true || hadInline;
398
- }
399
351
 
400
352
  //#endregion
401
353
  //#region src/runtime/signal.ts
@@ -910,16 +862,12 @@ function originOnly(input) {
910
862
  parsed.password = "";
911
863
  return parsed.origin;
912
864
  }
913
- function localUrl(port) {
914
- return `http://localhost:${port}`;
915
- }
916
865
 
917
866
  //#endregion
918
867
  //#region src/core/config.ts
919
868
  const ENV_URL = "METABASE_URL";
920
869
  const ENV_API_KEY = "METABASE_API_KEY";
921
870
  const ENV_PROFILE = "METABASE_PROFILE";
922
- const ENV_LICENSE_TOKEN = "METABASE_LICENSE_TOKEN";
923
871
  const ENV_SKIP_PREFLIGHT = "METABASE_CLI_SKIP_PREFLIGHT";
924
872
  function isPreflightSkipped() {
925
873
  return process.env[ENV_SKIP_PREFLIGHT] === "1";
@@ -936,9 +884,6 @@ function readEnvCredentials() {
936
884
  apiKey: process.env[ENV_API_KEY] ?? null
937
885
  };
938
886
  }
939
- function readEnvLicenseToken() {
940
- return process.env[ENV_LICENSE_TOKEN] ?? null;
941
- }
942
887
  async function resolveConfig(flags) {
943
888
  const profile = resolveProfileName(flags.profile);
944
889
  const env = readEnvCredentials();
@@ -959,14 +904,6 @@ async function resolveConfig(flags) {
959
904
  source: urlField.source === keyField.source ? urlField.source : "mixed"
960
905
  };
961
906
  }
962
- async function resolveLicenseToken(flags) {
963
- const flag = flags.token;
964
- const env = readEnvLicenseToken();
965
- const stored = !flag && !env ? await readLicense() : null;
966
- const value = flag ?? env ?? stored;
967
- if (!value) throw new ConfigError(`No license token. Pass --token, set ${ENV_LICENSE_TOKEN}, or store one with \`mb workspace license set\`.`);
968
- return value;
969
- }
970
907
  async function failureHintForProfile(profile) {
971
908
  const record = await readProfileRecord(profile);
972
909
  if (record === null || record.lastFailure === null) return "";
@@ -1084,10 +1021,6 @@ function parseInteger(value, options) {
1084
1021
  if (parsed < options.min) throw new ConfigError(`invalid ${options.name}: ${parsed} (must be ≥ ${options.min})`);
1085
1022
  return parsed;
1086
1023
  }
1087
- function parseOptionalInteger(value, options) {
1088
- if (value === void 0 || value === "") return null;
1089
- return parseInteger(value, options);
1090
- }
1091
1024
 
1092
1025
  //#endregion
1093
1026
  //#region src/commands/context.ts
@@ -1290,4 +1223,4 @@ function buildConfigFlags(ctx) {
1290
1223
  }
1291
1224
 
1292
1225
  //#endregion
1293
- export { DEFAULT_PROFILE, HttpError, ParsedVersionSchema, ProbedUser, ProfileLastFailure, TokenFeatures, USER_AGENT, clearLicense, clearProfile, combineAborts, createClient, defineMetabaseCommand, explicitProfileName, keyringFallbackWarning, listProfileRecords, localUrl, normalizeUrl, originOnly, parseCsv, parseEnum, parseEnumCsv, parseInteger, parseJson, parseJsonOrPlain, parseOptionalInteger, probeServer, readEnvCredentials, readEnvLicenseToken, readLicense, readProfile, readProfileRecord, resolveLicenseToken, resolveProfileName, throwIfAborted, writeLicense, writeProbeFailure, writeProbeResult, writeProfile };
1226
+ export { DEFAULT_PROFILE, HttpError, ParsedVersionSchema, ProbedUser, ProfileLastFailure, TokenFeatures, USER_AGENT, clearProfile, combineAborts, createClient, defineMetabaseCommand, explicitProfileName, keyringFallbackWarning, listProfileRecords, normalizeUrl, originOnly, parseCsv, parseEnum, parseEnumCsv, parseInteger, parseJson, parseJsonOrPlain, probeServer, readEnvCredentials, readProfile, readProfileRecord, resolveProfileName, throwIfAborted, writeProbeFailure, writeProbeResult, writeProfile };
@@ -1,11 +1,10 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderList } from "./render-0_GsapXa.mjs";
6
- import "./field-E0IBy4Uw.mjs";
7
- import { parseId } from "./parse-id-0_tOPvfI.mjs";
8
- import { Table, TableCompact, tableView } from "./table-qDD2kApF.mjs";
2
+ import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderList } from "./capabilities-Dj3NgPHg.mjs";
5
+ import "./field-MGxpNQUH.mjs";
6
+ import { parseId } from "./parse-id-DBwNYb4Y.mjs";
7
+ import { Table, TableCompact, tableView } from "./table-CkWja2UH.mjs";
9
8
  import { z } from "zod";
10
9
 
11
10
  //#region src/commands/db/schema-tables.ts
@@ -1,9 +1,8 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderList } from "./render-0_GsapXa.mjs";
6
- import { parseId } from "./parse-id-0_tOPvfI.mjs";
2
+ import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderList } from "./capabilities-Dj3NgPHg.mjs";
5
+ import { parseId } from "./parse-id-DBwNYb4Y.mjs";
7
6
  import { z } from "zod";
8
7
 
9
8
  //#region src/commands/db/schemas.ts
@@ -1,9 +1,8 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand, parseEnumCsv } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderList } from "./render-0_GsapXa.mjs";
6
- import { parseId } from "./parse-id-0_tOPvfI.mjs";
2
+ import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand, parseEnumCsv } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderList } from "./capabilities-Dj3NgPHg.mjs";
5
+ import { parseId } from "./parse-id-DBwNYb4Y.mjs";
7
6
  import { z } from "zod";
8
7
 
9
8
  //#region src/domain/search.ts
@@ -0,0 +1,19 @@
1
+ import { defineCommand } from "citty";
2
+
3
+ //#region src/commands/segment/index.ts
4
+ var segment_default = defineCommand({
5
+ meta: {
6
+ name: "segment",
7
+ description: "Manage Metabase segments"
8
+ },
9
+ subCommands: {
10
+ list: () => import("./list-BUpOvQsd.mjs").then((mod) => mod.default),
11
+ get: () => import("./get-D-3tOuWQ.mjs").then((mod) => mod.default),
12
+ create: () => import("./create-Bxkik5Fs.mjs").then((mod) => mod.default),
13
+ update: () => import("./update-CgpgyDjd.mjs").then((mod) => mod.default),
14
+ archive: () => import("./archive-DEtOH_jf.mjs").then((mod) => mod.default)
15
+ }
16
+ });
17
+
18
+ //#endregion
19
+ export { segment_default as default };
@@ -1,12 +1,11 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { formatScalar, renderSummary } from "./render-0_GsapXa.mjs";
6
- import "./input-cMSEqISy.mjs";
7
- import { readBody } from "./body-tcURGnGh.mjs";
8
- import { SettingValue, settingValueView } from "./setting-BzCng1Ub.mjs";
9
- import { parseSettingKey, rethrowSettingError } from "./key-vkNkH82H.mjs";
2
+ import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { formatScalar, renderSummary } from "./capabilities-Dj3NgPHg.mjs";
5
+ import "./input-xewHccej.mjs";
6
+ import { readBody } from "./body-BMyDvOjf.mjs";
7
+ import { SettingValue, settingValueView } from "./setting-oL97SNeO.mjs";
8
+ import { parseSettingKey, rethrowSettingError } from "./key-C2XG394c.mjs";
10
9
  import { z } from "zod";
11
10
 
12
11
  //#region src/commands/setting/set.ts
@@ -7,9 +7,9 @@ var setting_default = defineCommand({
7
7
  description: "Inspect and update Metabase settings"
8
8
  },
9
9
  subCommands: {
10
- list: () => import("./list-BJXaGk-z.mjs").then((m) => m.default),
11
- get: () => import("./get-B8l4t4Pz.mjs").then((m) => m.default),
12
- set: () => import("./set-DpRQqdo7.mjs").then((m) => m.default)
10
+ list: () => import("./list-BqTdYtOW.mjs").then((m) => m.default),
11
+ get: () => import("./get-DYgLtHb8.mjs").then((m) => m.default),
12
+ set: () => import("./set-BJ8Rs-vI.mjs").then((m) => m.default)
13
13
  }
14
14
  });
15
15
 
@@ -1,11 +1,10 @@
1
1
  import "./command-augment-BH9qgQ5u.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
3
- import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
4
- import "./capabilities-7e9MgquN.mjs";
5
- import { renderSummary } from "./render-0_GsapXa.mjs";
6
- import "./input-cMSEqISy.mjs";
7
- import { readBody } from "./body-tcURGnGh.mjs";
8
- import { bodyInputFlags } from "./body-flags-D7q87Btw.mjs";
2
+ import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
3
+ import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
4
+ import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
5
+ import "./input-xewHccej.mjs";
6
+ import { readBody } from "./body-BMyDvOjf.mjs";
7
+ import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
9
8
  import { z } from "zod";
10
9
 
11
10
  //#region src/domain/setup.ts
@@ -1,10 +1,41 @@
1
- import { ConfigError, isNotFoundError } from "./command-augment-BH9qgQ5u.mjs";
2
- import { parseYamlResult } from "./yaml-Gv6wRFMF.mjs";
1
+ import { ConfigError, ValidationError, errorMessage, isNotFoundError } from "./command-augment-BH9qgQ5u.mjs";
3
2
  import { z } from "zod";
4
3
  import { closeSync, openSync, readFileSync, readSync, readdirSync, statSync } from "node:fs";
5
4
  import { dirname, join, resolve } from "node:path";
6
5
  import { fileURLToPath } from "node:url";
6
+ import { YAMLParseError, parse } from "yaml";
7
7
 
8
+ //#region src/runtime/yaml.ts
9
+ function parseYamlResult(input, schema, opts = {}) {
10
+ const sourcePrefix = opts.source ? `${opts.source}: ` : "";
11
+ let raw;
12
+ try {
13
+ raw = parse(input);
14
+ } catch (error) {
15
+ if (error instanceof YAMLParseError) return {
16
+ ok: false,
17
+ error: new ConfigError(`${sourcePrefix}invalid YAML: ${error.message}`)
18
+ };
19
+ return {
20
+ ok: false,
21
+ error: new ConfigError(`${sourcePrefix}invalid YAML: ${errorMessage(error)}`)
22
+ };
23
+ }
24
+ const parsed = schema.safeParse(raw);
25
+ if (!parsed.success) return {
26
+ ok: false,
27
+ error: new ValidationError(`${sourcePrefix}value did not match expected schema`, {
28
+ source: opts.source ?? "<input>",
29
+ zodIssues: parsed.error.issues
30
+ })
31
+ };
32
+ return {
33
+ ok: true,
34
+ value: parsed.data
35
+ };
36
+ }
37
+
38
+ //#endregion
8
39
  //#region src/core/skills.ts
9
40
  const Frontmatter = z.object({
10
41
  name: z.string().min(1),
@@ -8,9 +8,9 @@ var skills_default = defineCommand({
8
8
  },
9
9
  default: "list",
10
10
  subCommands: {
11
- list: () => import("./list-B0V7FeL2.mjs").then((m) => m.default),
12
- get: () => import("./get-Bo4Cpd_c.mjs").then((m) => m.default),
13
- path: () => import("./path-C8GrBdgT.mjs").then((m) => m.default)
11
+ list: () => import("./list-BlMpI88r.mjs").then((m) => m.default),
12
+ get: () => import("./get-DtG5ytvs.mjs").then((m) => m.default),
13
+ path: () => import("./path-DJ-DfUGC.mjs").then((m) => m.default)
14
14
  }
15
15
  });
16
16
 
@@ -0,0 +1,19 @@
1
+ import { defineCommand } from "citty";
2
+
3
+ //#region src/commands/snippet/index.ts
4
+ var snippet_default = defineCommand({
5
+ meta: {
6
+ name: "snippet",
7
+ description: "Manage Metabase native query snippets"
8
+ },
9
+ subCommands: {
10
+ list: () => import("./list-u7cmunGG.mjs").then((mod) => mod.default),
11
+ get: () => import("./get-_JI4GiPa.mjs").then((mod) => mod.default),
12
+ create: () => import("./create-CbwFOL9h.mjs").then((mod) => mod.default),
13
+ update: () => import("./update-OZoOTnlY.mjs").then((mod) => mod.default),
14
+ archive: () => import("./archive-CTEybKPq.mjs").then((mod) => mod.default)
15
+ }
16
+ });
17
+
18
+ //#endregion
19
+ export { snippet_default as default };