@metabase/cli 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/{add-collection-H4LcP-9B.mjs → add-collection-CRZAFCZy.mjs} +5 -5
- package/dist/add-collection-DbalcC3_.mjs +11 -0
- package/dist/{archive-D1mfiftv.mjs → archive-3mEhK9_H.mjs} +8 -7
- package/dist/{archive-C6MDtV1F.mjs → archive-C3RWdM-2.mjs} +8 -6
- package/dist/{archive-CQQWkC5S.mjs → archive-CFHYRF65.mjs} +7 -6
- package/dist/{archive-hN8PfvhX.mjs → archive-De4yVEV8.mjs} +7 -6
- package/dist/{archive-BCXoM1nX.mjs → archive-Z8ZM-ilB.mjs} +9 -7
- package/dist/{archive-CdUS-OG9.mjs → archive-d74nDcp4.mjs} +7 -6
- package/dist/{archive-B3cjzOIK.mjs → archive-errg-EKw.mjs} +8 -7
- package/dist/auth--PWX0oj5.mjs +22 -0
- package/dist/{body-DB2upz6a.mjs → body-BS2s2zDl.mjs} +3 -3
- package/dist/{branches-B6R60Vr1.mjs → branches-mcyT7wI-.mjs} +7 -6
- package/dist/{cancel-oPsWomYc.mjs → cancel-B2l-i2NS.mjs} +6 -5
- package/dist/{cancel-task-CleJVDNI.mjs → cancel-task-CugcIeIi.mjs} +7 -6
- package/dist/{capabilities-BX1rnVuH.mjs → capabilities-N0jo5U7S.mjs} +1 -1
- package/dist/card-D07WYCQY.mjs +26 -0
- package/dist/{card-wCPcuKSi.mjs → card-DEmcRlNO.mjs} +6 -5
- package/dist/{cards-Bw37jizL.mjs → cards-BGkz5BeZ.mjs} +8 -6
- package/dist/cli.mjs +54 -27
- package/dist/collection-Dss2qSEF.mjs +23 -0
- package/dist/{collection-namespace-CUDPh2rF.mjs → collection-namespace-BP_LJrAD.mjs} +2 -2
- package/dist/command-augment-DdZIfx1V.mjs +11 -0
- package/dist/{create-Bj6PuaAW.mjs → create-B4HAEEE0.mjs} +9 -8
- package/dist/{create-BEkuqChu.mjs → create-BOmmMSjF.mjs} +16 -11
- package/dist/{create-DSWjS09p.mjs → create-CD9Rp8qs.mjs} +21 -12
- package/dist/{create-DwoqFYb9.mjs → create-CkRFKtFG.mjs} +9 -8
- package/dist/{create-CZ0_s5ap.mjs → create-Cztp5kES.mjs} +7 -6
- package/dist/{create-CF2Zn4pT.mjs → create-D8KA4zJA.mjs} +10 -9
- package/dist/{create-B-mvVFIl.mjs → create-DhrftYre.mjs} +28 -12
- package/dist/{create-D-qE3Oq8.mjs → create-DzyMvAVy.mjs} +9 -8
- package/dist/{create-Cy2TNnJB.mjs → create-YfGzANNB.mjs} +9 -8
- package/dist/{create-branch-BaZ00MIc.mjs → create-branch-DsoMfx_2.mjs} +7 -6
- package/dist/{create-CfLaBO0V.mjs → create-kWzqvTGR.mjs} +16 -11
- package/dist/{create-B87ZQjNM.mjs → create-wpvDXSSY.mjs} +17 -12
- package/dist/{current-task-Dr5dOD4V.mjs → current-task-WuKPZpZ6.mjs} +7 -6
- package/dist/dashboard-Crh4v6Fq.mjs +35 -0
- package/dist/{dashboard-B4bn3z6t.mjs → dashboard-DOplbKyQ.mjs} +7 -5
- package/dist/{database-BJxGUXhA.mjs → database-D9fftP-i.mjs} +1 -1
- package/dist/db-BCAURQei.mjs +28 -0
- package/dist/{delete-DHrFA1SZ.mjs → delete-BCitmugk.mjs} +8 -7
- package/dist/{delete-DJti0TOA.mjs → delete-Buai0_e_.mjs} +8 -7
- package/dist/{delete-evwMw6Hk.mjs → delete-CmGh0jo1.mjs} +8 -7
- package/dist/{delete-runtime-CZMw_AGX.mjs → delete-runtime-B0ha5QR4.mjs} +3 -3
- package/dist/{delete-table-DvuuwVqu.mjs → delete-table-BOkYxdjA.mjs} +8 -7
- package/dist/{dependencies-DrV31Rj5.mjs → dependencies-XZrEvHUA.mjs} +7 -6
- package/dist/{dirty-C-rkrnVM.mjs → dirty-B-5NDbG9.mjs} +7 -6
- package/dist/document-upxL2nKH.mjs +22 -0
- package/dist/{eid-BeXI-eII.mjs → eid-BCuJRv7a.mjs} +13 -7
- package/dist/{error-CIObEXLY.mjs → error-BaBm-UrT.mjs} +2 -2
- package/dist/{export-CGa-SgEV.mjs → export-Dod2gdyE.mjs} +9 -8
- package/dist/field-CloFa1oe.mjs +21 -0
- package/dist/{fields-Recymu7n.mjs → fields-B0yttrzR.mjs} +8 -7
- package/dist/{get-C6g2C4dM.mjs → get-9p0Gt1c7.mjs} +7 -6
- package/dist/{get-CYh2DBsq.mjs → get-B0OsW6jk.mjs} +7 -6
- package/dist/{get-CHi8tU_1.mjs → get-B8tugTku.mjs} +9 -8
- package/dist/{get-BD_P_Ejc.mjs → get-BkGh9BPd.mjs} +7 -6
- package/dist/{get-BM-d3-zk.mjs → get-BpZ81hX8.mjs} +7 -6
- package/dist/{get-CARdLkmp.mjs → get-CbpHt4Hs.mjs} +7 -6
- package/dist/{get-b4xbfFbA.mjs → get-CfeYa0v5.mjs} +7 -6
- package/dist/{get-DaixPDU9.mjs → get-D-pNrQGA.mjs} +7 -6
- package/dist/{get-rFcAVIch.mjs → get-D7QMqPOK.mjs} +7 -6
- package/dist/{get-BAH_M5vj.mjs → get-DBY5esTW.mjs} +7 -6
- package/dist/{get-Q2WZ79q_.mjs → get-DISgP66L.mjs} +8 -7
- package/dist/{get-Nc5GOs6-.mjs → get-DJ8huA8y.mjs} +8 -6
- package/dist/{get-CXMv-r1p.mjs → get-Dz7fcqoG.mjs} +9 -7
- package/dist/{get-BQxLtFE-.mjs → get-k6M5nGMC.mjs} +7 -6
- package/dist/{get-run-CfQR6ZNa.mjs → get-run-DQJVpDw1.mjs} +7 -6
- package/dist/{get-7fWSU6ow.mjs → get-u5Uq9vms.mjs} +6 -5
- package/dist/git-sync-C9m-OHac.mjs +31 -0
- package/dist/group-BNE_RiH5.mjs +28 -0
- package/dist/{has-remote-changes-Bvyv4FLP.mjs → has-remote-changes-DvQBXudi.mjs} +7 -6
- package/dist/{import-c3o3OAx0.mjs → import-PGS8-DwE.mjs} +9 -8
- package/dist/{input-BXWgdKiS.mjs → input-7Sj85_K7.mjs} +1 -1
- package/dist/is-dirty-DpyKeGAJ.mjs +10 -0
- package/dist/{is-dirty-BE53XwOC.mjs → is-dirty-DyEVFQVJ.mjs} +4 -4
- package/dist/{items-1KkBMiO4.mjs → items-CkFEy2Du.mjs} +9 -8
- package/dist/{key-DwiMOWRQ.mjs → key-bltP32Pm.mjs} +1 -1
- package/dist/library-1AAVbk-K.mjs +24 -0
- package/dist/{list-C4KnM3Rq.mjs → list-82NkvRpI.mjs} +8 -6
- package/dist/{list-Drr4JiWg.mjs → list-B9wXg3qi.mjs} +6 -5
- package/dist/{list-BwdO1_gX.mjs → list-BBxRjuMn.mjs} +6 -5
- package/dist/{list-CSjFJDls.mjs → list-BCYTTCFD.mjs} +6 -5
- package/dist/{list-BqgbrpQQ.mjs → list-BVzu2RIZ.mjs} +6 -5
- package/dist/{list-DUEYX3bX.mjs → list-BWAYDSbQ.mjs} +6 -5
- package/dist/{list-BC2B02IR.mjs → list-BY4S32Lg.mjs} +6 -5
- package/dist/{list-7rwzxX6t.mjs → list-Bb8YRON_.mjs} +6 -5
- package/dist/{list-DIvOPW1g.mjs → list-CJx5q-Yn.mjs} +8 -7
- package/dist/{list-F0vkE22V.mjs → list-CK0p7vvK.mjs} +7 -6
- package/dist/{list-CO5J3SZU.mjs → list-CKzpoTgP.mjs} +8 -7
- package/dist/{list-FR8Q1SzV.mjs → list-CjF12k1G.mjs} +7 -6
- package/dist/{list-D52_BozQ.mjs → list-D-rgDFa5.mjs} +9 -7
- package/dist/{list-DPcPTqFU.mjs → list-Sgo3RfDY.mjs} +6 -5
- package/dist/{list-DHb4vQUM.mjs → list-pQ22nXhQ.mjs} +6 -5
- package/dist/{login-C0Rf2hg0.mjs → login-C6ZAnGHz.mjs} +10 -9
- package/dist/{logout-C7_UON-s.mjs → logout-CWjyY3Y8.mjs} +6 -5
- package/dist/{manifest-B2F8iL7X.mjs → manifest-BVf8P4bl.mjs} +9 -2
- package/dist/measure-Cbly1r0E.mjs +25 -0
- package/dist/{metadata-Db3Kpo-z.mjs → metadata-CW5Lfw5d.mjs} +9 -8
- package/dist/{metadata-FltZq5Ek.mjs → metadata-aQAqseCm.mjs} +8 -7
- package/dist/{command-augment-CAur0XOQ.mjs → notice-DyVl5aYB.mjs} +1 -11
- package/dist/parameter-CiJ4CwWE.mjs +118 -0
- package/dist/parameter-values-DmDOuE-j.mjs +56 -0
- package/dist/{parse-enum-BatHQ-Gs.mjs → parse-enum-BL9i_brN.mjs} +1 -1
- package/dist/{parse-id-B5adfBlS.mjs → parse-id-DlXnOcmP.mjs} +1 -1
- package/dist/{parse-ref-CZr1bYIl.mjs → parse-ref-CB_KvF9h.mjs} +1 -1
- package/dist/{path-BojuJkE4.mjs → path-D8IJ4YrW.mjs} +6 -5
- package/dist/{poll-AduuU55-.mjs → poll-hgnrHBoh.mjs} +2 -2
- package/dist/{poll-task-B00Qwd87.mjs → poll-task-NQNLT_aA.mjs} +2 -2
- package/dist/{preflight-QVPvG_Xg.mjs → preflight-DvaPQHHf.mjs} +4 -4
- package/dist/{process-DsGf7Mg5.mjs → process-j8UHMHc2.mjs} +1 -1
- package/dist/{prompt-Bc_bHSD0.mjs → prompt-C85xd9HR.mjs} +1 -1
- package/dist/{publish-h5RJh6im.mjs → publish-BntmFR6g.mjs} +9 -8
- package/dist/{query-BUkuB4bZ.mjs → query-BQfgKV68.mjs} +10 -8
- package/dist/{query-Dvi-Rksy.mjs → query-DSKQZu91.mjs} +19 -13
- package/dist/{query-result-L5_NrwQR.mjs → query-result-D6mfoVfQ.mjs} +1 -1
- package/dist/{remove-collection-D8ZfB2RN.mjs → remove-collection-BguaI3-6.mjs} +9 -8
- package/dist/{rescan-values-DOsDLrRG.mjs → rescan-values-DjD6IW3J.mjs} +9 -8
- package/dist/{resolve-BQ9vjlNJ.mjs → resolve-Dj2MTBkn.mjs} +1 -1
- package/dist/{run-CeG0KH5W.mjs → run-Bp1yxkBN.mjs} +6 -5
- package/dist/{run-CjhD-Zbr.mjs → run-RQfQj7Rk.mjs} +9 -8
- package/dist/{runs-6k8C6kXF.mjs → runs-CSsatfWb.mjs} +8 -7
- package/dist/{runtime-CmAIahm5.mjs → runtime-oxjmrYoP.mjs} +5 -3
- package/dist/{schema-tables-C45QegaY.mjs → schema-tables-5I5pCxHl.mjs} +8 -7
- package/dist/{schemas-EVwEFuTj.mjs → schemas-CfzFCfBt.mjs} +6 -5
- package/dist/{search-C_uw_D1U.mjs → search-Vo-BqliA.mjs} +11 -5
- package/dist/segment-BuN_IoM8.mjs +25 -0
- package/dist/{selectors-AktxTEMK.mjs → selectors-DBnJsKlW.mjs} +3 -3
- package/dist/{set-C3EAuyb8.mjs → set-1Vh0AF-T.mjs} +9 -8
- package/dist/{set-active-BW6LN6y0.mjs → set-active-C0mUZlNN.mjs} +6 -5
- package/dist/setting-BbdKR-lO.mjs +20 -0
- package/dist/{setup-CYrbNrlG.mjs → setup-CzYFvFK5.mjs} +8 -7
- package/dist/{skills-DJsuBguh.mjs → skills-B6gfH0iR.mjs} +1 -1
- package/dist/{skills-D6xQkmhu.mjs → skills-CR2xyV33.mjs} +3 -3
- package/dist/snippet-Bzo2U9Fv.mjs +22 -0
- package/dist/{stash-C1V2FvJR.mjs → stash-CQHXwBu_.mjs} +9 -8
- package/dist/{status-DY92F9mn.mjs → status-C_7aqTvB.mjs} +6 -5
- package/dist/{status-CxYw6zQM.mjs → status-DXQkM18v.mjs} +8 -7
- package/dist/{summary-DOxgqJoA.mjs → summary-1aNpQc8j.mjs} +7 -6
- package/dist/{sync-schema-CQPfffjU.mjs → sync-schema-BqLp5uTS.mjs} +11 -10
- package/dist/table-BwGOz97O.mjs +22 -0
- package/dist/{table-CDMG0Zi5.mjs → table-DE3i82T_.mjs} +1 -1
- package/dist/transform-B65ZD9-e.mjs +31 -0
- package/dist/transform-job-BWVKXSV6.mjs +25 -0
- package/dist/transform-tag-C4qvmicL.mjs +21 -0
- package/dist/{transforms-DzBJDydn.mjs → transforms-BelyllUL.mjs} +7 -6
- package/dist/{tree-B3f5F_dP.mjs → tree-YvmwGql7.mjs} +6 -5
- package/dist/{unpublish-B5RDeN-V.mjs → unpublish-CHjGLMu9.mjs} +7 -6
- package/dist/{update-CcvDVqNd.mjs → update-BACl_bJS.mjs} +10 -9
- package/dist/{update-PZPNx0Xd.mjs → update-BGMJTpA6.mjs} +17 -12
- package/dist/{update-DOfL_KPx.mjs → update-BKhekuqr.mjs} +22 -13
- package/dist/{update-DSueNZRw.mjs → update-BWlN3QDo.mjs} +10 -9
- package/dist/{update-C0pFSc1B.mjs → update-BnHYSu96.mjs} +18 -13
- package/dist/{update-D698CaeV.mjs → update-C9fndCqb.mjs} +10 -9
- package/dist/{update-I3TA2Tem.mjs → update-CrRz47aj.mjs} +22 -13
- package/dist/{update-BIZ9XhjS.mjs → update-D7vc8GBF.mjs} +17 -12
- package/dist/{update-DudyZ-FP.mjs → update-K-jjQ0Aw.mjs} +11 -10
- package/dist/{update-CiWPEqQ-.mjs → update-Zz01Woxj.mjs} +10 -9
- package/dist/{update-dashcard-BXZ4vS15.mjs → update-dashcard-Dvth-yLC.mjs} +11 -9
- package/dist/{update-D5gioyBa.mjs → update-txUfAJxy.mjs} +10 -9
- package/dist/{upgrade-4cWfLu90.mjs → upgrade-DsXlfPef.mjs} +7 -6
- package/dist/{uuid---pAboNQ.mjs → uuid-ByJmWV7b.mjs} +10 -5
- package/dist/{validate-VawhJ5Sc.mjs → validate-BqNW4Sk1.mjs} +2 -2
- package/dist/{validate-query-CSV-TTnd.mjs → validate-query-CcZVKYPV.mjs} +3 -3
- package/dist/{values-I503dI7K.mjs → values-CIjJI4sz.mjs} +7 -6
- package/dist/{verify-BMhTWW9s.mjs → verify-Jsuc2dat.mjs} +2 -2
- package/dist/{wait-oMSs_IdS.mjs → wait-5ltTFvSa.mjs} +8 -7
- package/dist/{wait-flags-HtCL2l1r.mjs → wait-flags-D6kd_G7c.mjs} +2 -2
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +47 -56
- package/skill-data/dashboard/SKILL.md +107 -0
- package/skill-data/data-workflow/SKILL.md +116 -0
- package/skill-data/{data-analysis/SKILL.md → data-workflow/references/answering-questions.md} +7 -13
- package/skill-data/{data-transformation/SKILL.md → data-workflow/references/building-clean-tables.md} +23 -32
- package/skill-data/{semantic-layer/SKILL.md → data-workflow/references/reusable-definitions.md} +26 -56
- package/skill-data/document/SKILL.md +11 -21
- package/skill-data/git-sync/SKILL.md +39 -39
- package/skill-data/mbql/SKILL.md +19 -31
- package/skill-data/mbql/references/operators.md +13 -3
- package/skill-data/metadata/SKILL.md +78 -0
- package/skill-data/metadata/references/semantic-types.md +83 -0
- package/skill-data/native-sql/SKILL.md +118 -0
- package/skill-data/native-sql/references/template-tags.md +178 -0
- package/skill-data/transform/SKILL.md +30 -46
- package/skill-data/visualization/SKILL.md +8 -8
- package/skill-data/visualization/references/settings.md +14 -0
- package/skills/metabase-cli/SKILL.md +2 -2
- package/dist/add-collection-BqfYL4FU.mjs +0 -10
- package/dist/auth-BaCMFLTA.mjs +0 -19
- package/dist/card-DzH3aK0a.mjs +0 -20
- package/dist/collection-Wagz-ira.mjs +0 -20
- package/dist/dashboard-OUgS1Gi-.mjs +0 -21
- package/dist/db-Btfl5JMZ.mjs +0 -22
- package/dist/document-CU28GfFw.mjs +0 -19
- package/dist/field-BTbzlcyC.mjs +0 -18
- package/dist/git-sync-CBxS2urR.mjs +0 -28
- package/dist/is-dirty-Z-pqyVyB.mjs +0 -9
- package/dist/library-BlbH0xyK.mjs +0 -18
- package/dist/measure-BUedPu4K.mjs +0 -19
- package/dist/segment-CkZUZcWz.mjs +0 -19
- package/dist/setting-C50HEiGG.mjs +0 -17
- package/dist/snippet-BjaWAxCu.mjs +0 -19
- package/dist/table-B35ovbcd.mjs +0 -19
- package/dist/transform-DF79sJ0_.mjs +0 -25
- package/dist/transform-job-PmA_D8gz.mjs +0 -22
- package/dist/transform-tag-CE3cuO1K.mjs +0 -18
- package/skill-data/robot-data-engineer/SKILL.md +0 -142
- /package/dist/{body-flags-D7q87Btw.mjs → body-flags-DWTTxJpP.mjs} +0 -0
- /package/dist/{collection-Deiziuu2.mjs → collection-DrLpA1SO.mjs} +0 -0
- /package/dist/{document-qfwR0r63.mjs → document-1W7NRaO_.mjs} +0 -0
- /package/dist/{field-E0IBy4Uw.mjs → field-CMY_LWUe.mjs} +0 -0
- /package/dist/{measure-BCv5wDDN.mjs → measure-DoJvtCaA.mjs} +0 -0
- /package/dist/{paginate-BexjkjbY.mjs → paginate-FVZUxL4J.mjs} +0 -0
- /package/dist/{render-CkuFkWlQ.mjs → render-BTKnWL0d.mjs} +0 -0
- /package/dist/{revision-message-flag-CP5NFrWQ.mjs → revision-message-flag-CHrJgFFx.mjs} +0 -0
- /package/dist/{segment-BAUuELKs.mjs → segment-TXktTCfU.mjs} +0 -0
- /package/dist/{setting-DhMk0TNo.mjs → setting-m46MUtW5.mjs} +0 -0
- /package/dist/{snippet-D4SyVLKB.mjs → snippet-CtA2Pkoa.mjs} +0 -0
- /package/dist/{transform-MmqHKGU-.mjs → transform-DEF38FWe.mjs} +0 -0
- /package/dist/{transform-job-CtVziW85.mjs → transform-job-CtixL4An.mjs} +0 -0
- /package/dist/{transform-tag-wFiWmiyO.mjs → transform-tag-rsIrckCM.mjs} +0 -0
package/README.md
CHANGED
|
@@ -629,6 +629,27 @@ mb dashboard cards 1
|
|
|
629
629
|
mb dashboard cards 1 --json
|
|
630
630
|
```
|
|
631
631
|
|
|
632
|
+
#### Dashboard parameters (filters)
|
|
633
|
+
|
|
634
|
+
A dashboard's `parameters` are its filter widgets. They're typed (`Parameter` schema): an invalid `type` is rejected at the CLI boundary with a message that echoes the full allowed enum (`string/=`, `string/contains`, `number/between`, `date/range`, `category`, `id`, `temporal-unit`, …).
|
|
635
|
+
|
|
636
|
+
Read them off the dashboard with `mb dashboard get <id> --fields parameters --json` (or `--full` for the whole record). There is no separate read verb — they're part of the dashboard.
|
|
637
|
+
|
|
638
|
+
Editing replaces the **whole** `parameters` array, so it's a read-modify-write loop: read the current set, modify it, and send it all back via `mb dashboard create`/`mb dashboard update --body '{"parameters":[…]}'`; omitting a parameter deletes it. Each parameter's `id` is a descriptive string you choose (reuse the `slug`, e.g. `order_status`), unique within the dashboard — Metabase stores any non-blank string as-is, so there is no need to generate a random id (use `mb uuid` only if you genuinely want an opaque one). Bind a parameter to a card column through a dashcard's `parameter_mappings`, whose `parameter_id` must match a parameter `id` exactly.
|
|
639
|
+
|
|
640
|
+
### `mb dashboard parameter-values <dashboard-id> <parameter-id>`
|
|
641
|
+
|
|
642
|
+
Fetch the selectable values for one dashboard parameter (`{values, has_more_values}`). Values come from the parameter's static list, its source card, or — for a parameter mapped to a field — the field's live distinct values (chain-filtered).
|
|
643
|
+
|
|
644
|
+
```sh
|
|
645
|
+
mb dashboard parameter-values 1 order_status --json
|
|
646
|
+
mb dashboard parameter-values 1 order_status --query Cam --json
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
| Flag | Description |
|
|
650
|
+
| ------------------ | -------------------------------------------------------------------------------------- |
|
|
651
|
+
| `--query <substr>` | Case-insensitive substring search (first 1000 matches) instead of the full value list. |
|
|
652
|
+
|
|
632
653
|
### `mb dashboard create`
|
|
633
654
|
|
|
634
655
|
The body accepts the same dashboard-level fields as the underlying `POST /api/dashboard` (`name`, `description`, `parameters`, `cache_ttl`, `collection_id`, `collection_position`). It also accepts optional `dashcards` and `tabs`: when either is present, the CLI chains a `PUT /api/dashboard/:id` after the create and returns the updated dashboard with its dashcards/tabs applied. Use a negative `id` on a dashcard to indicate one the server should newly create.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
2
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
3
|
-
import { renderSummary } from "./capabilities-
|
|
4
|
-
import { parseId } from "./parse-id-
|
|
5
|
-
import { REMOTE_SYNC_PATHS } from "./poll-task-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
2
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
3
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
5
|
+
import { REMOTE_SYNC_PATHS } from "./poll-task-NQNLT_aA.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/git-sync/add-collection.ts
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import "./parse-id-DlXnOcmP.mjs";
|
|
7
|
+
import "./poll-hgnrHBoh.mjs";
|
|
8
|
+
import "./poll-task-NQNLT_aA.mjs";
|
|
9
|
+
import { SyncSettingsUpdateResult, add_collection_default, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-CRZAFCZy.mjs";
|
|
10
|
+
|
|
11
|
+
export { add_collection_default as default };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
7
|
+
import { revisionMessageFlag } from "./revision-message-flag-CHrJgFFx.mjs";
|
|
8
|
+
import { Segment, segmentView } from "./segment-TXktTCfU.mjs";
|
|
8
9
|
|
|
9
10
|
//#region src/commands/segment/archive.ts
|
|
10
11
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import "./parameter-CiJ4CwWE.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
8
|
+
import { Dashboard, dashboardView } from "./dashboard-DOplbKyQ.mjs";
|
|
7
9
|
|
|
8
10
|
//#region src/commands/dashboard/archive.ts
|
|
9
11
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
7
|
+
import { Snippet, snippetView } from "./snippet-CtA2Pkoa.mjs";
|
|
7
8
|
|
|
8
9
|
//#region src/commands/snippet/archive.ts
|
|
9
10
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
7
|
+
import { Collection, collectionView } from "./collection-DrLpA1SO.mjs";
|
|
7
8
|
|
|
8
9
|
//#region src/commands/collection/archive.ts
|
|
9
10
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import "./field-CMY_LWUe.mjs";
|
|
7
|
+
import "./parameter-CiJ4CwWE.mjs";
|
|
8
|
+
import { Card, cardView } from "./card-DEmcRlNO.mjs";
|
|
9
|
+
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
8
10
|
|
|
9
11
|
//#region src/commands/card/archive.ts
|
|
10
12
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
7
|
+
import { Document, documentView } from "./document-1W7NRaO_.mjs";
|
|
7
8
|
|
|
8
9
|
//#region src/commands/document/archive.ts
|
|
9
10
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
7
|
+
import { Measure, measureView } from "./measure-DoJvtCaA.mjs";
|
|
8
|
+
import { revisionMessageFlag } from "./revision-message-flag-CHrJgFFx.mjs";
|
|
8
9
|
|
|
9
10
|
//#region src/commands/measure/archive.ts
|
|
10
11
|
var archive_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
2
|
+
import { defineCommandGroup } from "./group-BNE_RiH5.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/commands/auth/index.ts
|
|
5
|
+
var auth_default = defineCommandGroup({
|
|
6
|
+
name: "auth",
|
|
7
|
+
description: "Authenticate against a Metabase instance",
|
|
8
|
+
defaultCommand: "login",
|
|
9
|
+
skills: [{
|
|
10
|
+
skill: "core",
|
|
11
|
+
purpose: "authentication and named profiles"
|
|
12
|
+
}],
|
|
13
|
+
subCommands: {
|
|
14
|
+
login: () => import("./login-C6ZAnGHz.mjs").then((m) => m.default),
|
|
15
|
+
status: () => import("./status-C_7aqTvB.mjs").then((m) => m.default),
|
|
16
|
+
list: () => import("./list-CjF12k1G.mjs").then((m) => m.default),
|
|
17
|
+
logout: () => import("./logout-CWjyY3Y8.mjs").then((m) => m.default)
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { auth_default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ConfigError } from "./
|
|
2
|
-
import { parseJson } from "./runtime-
|
|
3
|
-
import { DEFAULT_FLAG_NAME, readInput } from "./input-
|
|
1
|
+
import { ConfigError } from "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { parseJson } from "./runtime-oxjmrYoP.mjs";
|
|
3
|
+
import { DEFAULT_FLAG_NAME, readInput } from "./input-7Sj85_K7.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/body.ts
|
|
6
6
|
async function readBody(sources, schema) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderList } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import "./poll-hgnrHBoh.mjs";
|
|
7
|
+
import { REMOTE_SYNC_PATHS } from "./poll-task-NQNLT_aA.mjs";
|
|
7
8
|
import { z } from "zod";
|
|
8
9
|
|
|
9
10
|
//#region src/commands/git-sync/branches.ts
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
6
7
|
import { z } from "zod";
|
|
7
8
|
|
|
8
9
|
//#region src/commands/transform/cancel.ts
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import "./poll-hgnrHBoh.mjs";
|
|
7
|
+
import { REMOTE_SYNC_PATHS, SyncTask, syncTaskView } from "./poll-task-NQNLT_aA.mjs";
|
|
7
8
|
|
|
8
9
|
//#region src/commands/git-sync/cancel-task.ts
|
|
9
10
|
var cancel_task_default = defineMetabaseCommand({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigError, itemOversizeMessage, listTruncationNotice, warn } from "./
|
|
1
|
+
import { ConfigError, itemOversizeMessage, listTruncationNotice, warn } from "./notice-DyVl5aYB.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import Table from "cli-table3";
|
|
4
4
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
2
|
+
import { defineCommandGroup } from "./group-BNE_RiH5.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/commands/card/index.ts
|
|
5
|
+
var card_default = defineCommandGroup({
|
|
6
|
+
name: "card",
|
|
7
|
+
description: "Manage Metabase cards (questions, models, metrics)",
|
|
8
|
+
skills: [{
|
|
9
|
+
skill: "mbql",
|
|
10
|
+
purpose: "author the dataset_query"
|
|
11
|
+
}, {
|
|
12
|
+
skill: "visualization",
|
|
13
|
+
purpose: "choose display and visualization_settings"
|
|
14
|
+
}],
|
|
15
|
+
subCommands: {
|
|
16
|
+
list: () => import("./list-D-rgDFa5.mjs").then((mod) => mod.default),
|
|
17
|
+
get: () => import("./get-Dz7fcqoG.mjs").then((mod) => mod.default),
|
|
18
|
+
query: () => import("./query-BQfgKV68.mjs").then((mod) => mod.default),
|
|
19
|
+
create: () => import("./create-DhrftYre.mjs").then((mod) => mod.default),
|
|
20
|
+
update: () => import("./update-CrRz47aj.mjs").then((mod) => mod.default),
|
|
21
|
+
archive: () => import("./archive-Z8ZM-ilB.mjs").then((mod) => mod.default)
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { card_default as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FieldBaseType, FieldSemanticType } from "./field-
|
|
1
|
+
import { FieldBaseType, FieldSemanticType } from "./field-CMY_LWUe.mjs";
|
|
2
|
+
import { Parameter, ParameterMapping } from "./parameter-CiJ4CwWE.mjs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
|
|
4
5
|
//#region src/domain/card.ts
|
|
@@ -79,8 +80,8 @@ const CardCreateInput = z.object({
|
|
|
79
80
|
collection_id: z.number().int().positive().nullable().optional(),
|
|
80
81
|
collection_position: z.number().int().positive().nullable().optional(),
|
|
81
82
|
dashboard_id: z.number().int().positive().nullable().optional(),
|
|
82
|
-
parameters: z.array(
|
|
83
|
-
parameter_mappings: z.array(
|
|
83
|
+
parameters: z.array(Parameter).optional(),
|
|
84
|
+
parameter_mappings: z.array(ParameterMapping).optional()
|
|
84
85
|
}).loose();
|
|
85
86
|
const CardUpdateInput = z.object({
|
|
86
87
|
name: z.string().min(1).optional(),
|
|
@@ -99,8 +100,8 @@ const CardUpdateInput = z.object({
|
|
|
99
100
|
cache_ttl: z.number().int().positive().nullable().optional(),
|
|
100
101
|
dashboard_id: z.number().int().positive().nullable().optional(),
|
|
101
102
|
dashboard_tab_id: z.number().int().positive().nullable().optional(),
|
|
102
|
-
parameters: z.array(
|
|
103
|
-
parameter_mappings: z.array(
|
|
103
|
+
parameters: z.array(Parameter).optional(),
|
|
104
|
+
parameter_mappings: z.array(ParameterMapping).optional(),
|
|
104
105
|
result_metadata: z.array(z.unknown()).nullable().optional()
|
|
105
106
|
}).loose();
|
|
106
107
|
const QueryColumn = z.object({
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderList } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import "./parameter-CiJ4CwWE.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
8
|
+
import { DashboardDetail, DashcardCompact, dashcardView } from "./dashboard-DOplbKyQ.mjs";
|
|
7
9
|
|
|
8
10
|
//#region src/commands/dashboard/cards.ts
|
|
9
11
|
const DashcardListEnvelope = listEnvelopeSchema(DashcardCompact);
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { ConfigError, flagConsumesValue,
|
|
3
|
-
import { connectionFlags, outputFlags, package_default, profileFlag, reportError } from "./error-
|
|
2
|
+
import { ConfigError, flagConsumesValue, normalizeFlag, resolveCitty, toAliasArray } from "./notice-DyVl5aYB.mjs";
|
|
3
|
+
import { connectionFlags, outputFlags, package_default, profileFlag, reportError } from "./error-BaBm-UrT.mjs";
|
|
4
|
+
import { getMetabaseAugment, setMetabaseAugment } from "./command-augment-DdZIfx1V.mjs";
|
|
4
5
|
import { defineCommand, renderUsage, runMain } from "citty";
|
|
5
6
|
|
|
6
7
|
//#region src/commands/global-flags.ts
|
|
@@ -58,33 +59,46 @@ const main = defineCommand({
|
|
|
58
59
|
description: package_default.description
|
|
59
60
|
},
|
|
60
61
|
subCommands: {
|
|
61
|
-
auth: () => import("./auth
|
|
62
|
-
db: () => import("./db-
|
|
63
|
-
table: () => import("./table-
|
|
64
|
-
field: () => import("./field-
|
|
65
|
-
card: () => import("./card-
|
|
66
|
-
dashboard: () => import("./dashboard-
|
|
67
|
-
collection: () => import("./collection-
|
|
68
|
-
library: () => import("./library-
|
|
69
|
-
document: () => import("./document-
|
|
70
|
-
transform: () => import("./transform-
|
|
71
|
-
"transform-job": () => import("./transform-job-
|
|
72
|
-
"transform-tag": () => import("./transform-tag-
|
|
73
|
-
setting: () => import("./setting-
|
|
74
|
-
search: () => import("./search-
|
|
75
|
-
"git-sync": () => import("./git-sync-
|
|
76
|
-
setup: () => import("./setup-
|
|
77
|
-
snippet: () => import("./snippet-
|
|
78
|
-
segment: () => import("./segment-
|
|
79
|
-
measure: () => import("./measure-
|
|
80
|
-
eid: () => import("./eid-
|
|
81
|
-
query: () => import("./query-
|
|
82
|
-
uuid: () => import("./uuid
|
|
83
|
-
upgrade: () => import("./upgrade-
|
|
84
|
-
skills: () => import("./skills-
|
|
85
|
-
__manifest: () => import("./manifest-
|
|
62
|
+
auth: () => import("./auth--PWX0oj5.mjs").then((mod) => mod.default),
|
|
63
|
+
db: () => import("./db-BCAURQei.mjs").then((mod) => mod.default),
|
|
64
|
+
table: () => import("./table-BwGOz97O.mjs").then((mod) => mod.default),
|
|
65
|
+
field: () => import("./field-CloFa1oe.mjs").then((mod) => mod.default),
|
|
66
|
+
card: () => import("./card-D07WYCQY.mjs").then((mod) => mod.default),
|
|
67
|
+
dashboard: () => import("./dashboard-Crh4v6Fq.mjs").then((mod) => mod.default),
|
|
68
|
+
collection: () => import("./collection-Dss2qSEF.mjs").then((mod) => mod.default),
|
|
69
|
+
library: () => import("./library-1AAVbk-K.mjs").then((mod) => mod.default),
|
|
70
|
+
document: () => import("./document-upxL2nKH.mjs").then((mod) => mod.default),
|
|
71
|
+
transform: () => import("./transform-B65ZD9-e.mjs").then((mod) => mod.default),
|
|
72
|
+
"transform-job": () => import("./transform-job-BWVKXSV6.mjs").then((mod) => mod.default),
|
|
73
|
+
"transform-tag": () => import("./transform-tag-C4qvmicL.mjs").then((mod) => mod.default),
|
|
74
|
+
setting: () => import("./setting-BbdKR-lO.mjs").then((mod) => mod.default),
|
|
75
|
+
search: () => import("./search-Vo-BqliA.mjs").then((mod) => mod.default),
|
|
76
|
+
"git-sync": () => import("./git-sync-C9m-OHac.mjs").then((mod) => mod.default),
|
|
77
|
+
setup: () => import("./setup-CzYFvFK5.mjs").then((mod) => mod.default),
|
|
78
|
+
snippet: () => import("./snippet-Bzo2U9Fv.mjs").then((mod) => mod.default),
|
|
79
|
+
segment: () => import("./segment-BuN_IoM8.mjs").then((mod) => mod.default),
|
|
80
|
+
measure: () => import("./measure-Cbly1r0E.mjs").then((mod) => mod.default),
|
|
81
|
+
eid: () => import("./eid-BCuJRv7a.mjs").then((mod) => mod.default),
|
|
82
|
+
query: () => import("./query-DSKQZu91.mjs").then((mod) => mod.default),
|
|
83
|
+
uuid: () => import("./uuid-ByJmWV7b.mjs").then((mod) => mod.default),
|
|
84
|
+
upgrade: () => import("./upgrade-DsXlfPef.mjs").then((mod) => mod.default),
|
|
85
|
+
skills: () => import("./skills-CR2xyV33.mjs").then((mod) => mod.default),
|
|
86
|
+
__manifest: () => import("./manifest-BVf8P4bl.mjs").then((mod) => mod.createManifestCommand(main))
|
|
86
87
|
}
|
|
87
88
|
});
|
|
89
|
+
setMetabaseAugment(main, {
|
|
90
|
+
examples: [],
|
|
91
|
+
details: null,
|
|
92
|
+
skills: [{
|
|
93
|
+
skill: "core",
|
|
94
|
+
purpose: "auth, conventions, and per-resource footguns"
|
|
95
|
+
}, {
|
|
96
|
+
skill: "data-workflow",
|
|
97
|
+
purpose: "guided end-to-end: raw data → clean tables → metrics → answers → dashboards"
|
|
98
|
+
}],
|
|
99
|
+
outputSchema: null,
|
|
100
|
+
capabilities: null
|
|
101
|
+
});
|
|
88
102
|
var main_default = main;
|
|
89
103
|
|
|
90
104
|
//#endregion
|
|
@@ -103,6 +117,8 @@ const CLI_NAME = "mb";
|
|
|
103
117
|
const HELP_FLAG_SPEC = "-h, --help";
|
|
104
118
|
const HELP_FLAG_DESCRIPTION = "Show help for this command";
|
|
105
119
|
const GETTING_STARTED_HINT = `First time? Run \`${CLI_NAME} auth login\` to connect to a Metabase instance.`;
|
|
120
|
+
const SKILLS_HEADER = "AGENT SKILLS";
|
|
121
|
+
const SKILLS_LIST_ITEM = `${CLI_NAME} skills list — every bundled skill`;
|
|
106
122
|
async function showUsage(cmd, parent, breadcrumb) {
|
|
107
123
|
const raw = (await renderUsage(cmd, parent)).replace(ANSI_PATTERN, "");
|
|
108
124
|
const lines = raw.split("\n").map((line) => line.replace(TRAILING_WHITESPACE, ""));
|
|
@@ -115,6 +131,7 @@ async function showUsage(cmd, parent, breadcrumb) {
|
|
|
115
131
|
const augment = getMetabaseAugment(cmd);
|
|
116
132
|
const details = augment?.details ?? null;
|
|
117
133
|
const examples = augment?.examples ?? [];
|
|
134
|
+
const skills = augment?.skills ?? [];
|
|
118
135
|
const transformed = transformBody(lines, {
|
|
119
136
|
cittyName,
|
|
120
137
|
breadcrumb: breadcrumb ?? cittyName,
|
|
@@ -123,6 +140,7 @@ async function showUsage(cmd, parent, breadcrumb) {
|
|
|
123
140
|
const body = withDetails(transformed, details).join("\n").trimEnd();
|
|
124
141
|
const sections = [body];
|
|
125
142
|
if (examples.length > 0) sections.push(renderExamples(examples));
|
|
143
|
+
if (skills.length > 0) sections.push(renderSkillsSection(skills, isRoot));
|
|
126
144
|
if (isRoot) sections.push(GETTING_STARTED_HINT);
|
|
127
145
|
process.stdout.write(sections.join("\n\n") + "\n");
|
|
128
146
|
}
|
|
@@ -174,6 +192,15 @@ function optionLayout(row) {
|
|
|
174
192
|
descStart: flagEnd + gapRemainder
|
|
175
193
|
};
|
|
176
194
|
}
|
|
195
|
+
function renderSkillsSection(skills, includeListPointer) {
|
|
196
|
+
const items = skills.map((p) => `${LINE_PREFIX}mb skills get ${p.skill} — ${p.purpose}`);
|
|
197
|
+
if (includeListPointer) items.push(`${LINE_PREFIX}${SKILLS_LIST_ITEM}`);
|
|
198
|
+
return [
|
|
199
|
+
SKILLS_HEADER,
|
|
200
|
+
"",
|
|
201
|
+
...items
|
|
202
|
+
].join("\n");
|
|
203
|
+
}
|
|
177
204
|
function withDetails(lines, details) {
|
|
178
205
|
if (details === null) return lines;
|
|
179
206
|
const [first, ...rest] = lines;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
2
|
+
import { defineCommandGroup } from "./group-BNE_RiH5.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/commands/collection/index.ts
|
|
5
|
+
var collection_default = defineCommandGroup({
|
|
6
|
+
name: "collection",
|
|
7
|
+
description: "Manage Metabase collections",
|
|
8
|
+
skills: [{
|
|
9
|
+
skill: "core",
|
|
10
|
+
purpose: "collection ref forms and the transforms namespace"
|
|
11
|
+
}],
|
|
12
|
+
subCommands: {
|
|
13
|
+
list: () => import("./list-CK0p7vvK.mjs").then((mod) => mod.default),
|
|
14
|
+
get: () => import("./get-D7QMqPOK.mjs").then((mod) => mod.default),
|
|
15
|
+
items: () => import("./items-CkFEy2Du.mjs").then((mod) => mod.default),
|
|
16
|
+
tree: () => import("./tree-YvmwGql7.mjs").then((mod) => mod.default),
|
|
17
|
+
create: () => import("./create-D8KA4zJA.mjs").then((mod) => mod.default),
|
|
18
|
+
archive: () => import("./archive-De4yVEV8.mjs").then((mod) => mod.default)
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { collection_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConfigError } from "./
|
|
2
|
-
import { HttpError } from "./runtime-
|
|
1
|
+
import { ConfigError } from "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { HttpError } from "./runtime-oxjmrYoP.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/commands/transform/collection-namespace.ts
|
|
5
5
|
const TRANSFORMS_NAMESPACE_HINT = "transforms can only be filed in a :transforms-namespace collection. Create one with `mb collection create --body '{\"name\":\"…\"}' --namespace transforms` and pass its id as collection_id, or omit collection_id to leave the transform uncollected.";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/runtime/command-augment.ts
|
|
2
|
+
const augments = new WeakMap();
|
|
3
|
+
function setMetabaseAugment(cmd, augment) {
|
|
4
|
+
augments.set(cmd, augment);
|
|
5
|
+
}
|
|
6
|
+
function getMetabaseAugment(cmd) {
|
|
7
|
+
return augments.get(cmd) ?? null;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { getMetabaseAugment, setMetabaseAugment };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import "./input-7Sj85_K7.mjs";
|
|
7
|
+
import { readBody } from "./body-BS2s2zDl.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-DWTTxJpP.mjs";
|
|
9
|
+
import { TransformTag, TransformTagCreateInput, transformTagView } from "./transform-tag-rsIrckCM.mjs";
|
|
9
10
|
|
|
10
11
|
//#region src/commands/transform-tag/create.ts
|
|
11
12
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
1
|
+
import "./notice-DyVl5aYB.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BaBm-UrT.mjs";
|
|
3
|
+
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
+
import { defineMetabaseCommand } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
+
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
+
import "./input-7Sj85_K7.mjs";
|
|
7
|
+
import { readBody } from "./body-BS2s2zDl.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-DWTTxJpP.mjs";
|
|
9
|
+
import "./validate-BqNW4Sk1.mjs";
|
|
10
|
+
import { MEASURE_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-CcZVKYPV.mjs";
|
|
11
|
+
import { Measure, MeasureCreateInput, measureView } from "./measure-DoJvtCaA.mjs";
|
|
11
12
|
|
|
12
13
|
//#region src/commands/measure/create.ts
|
|
13
14
|
var create_default = defineMetabaseCommand({
|
|
@@ -15,7 +16,11 @@ var create_default = defineMetabaseCommand({
|
|
|
15
16
|
name: "create",
|
|
16
17
|
description: "Create a measure (saved aggregation) from JSON"
|
|
17
18
|
},
|
|
18
|
-
details: "A measure is a reusable, saved aggregation tied to a table. The JSON body needs `name`, `table_id`, and a `definition` (an MBQL query holding exactly one aggregation). An MBQL 5 `definition` is checked against a bundled JSON Schema before sending; pass --skip-validate to bypass.
|
|
19
|
+
details: "A measure is a reusable, saved aggregation tied to a table. The JSON body needs `name`, `table_id`, and a `definition` (an MBQL query holding exactly one aggregation). An MBQL 5 `definition` is checked against a bundled JSON Schema before sending; pass --skip-validate to bypass.",
|
|
20
|
+
skills: [{
|
|
21
|
+
skill: "mbql",
|
|
22
|
+
purpose: "the definition aggregation"
|
|
23
|
+
}],
|
|
19
24
|
capabilities: { minVersion: 59 },
|
|
20
25
|
args: {
|
|
21
26
|
...outputFlags,
|