@metabase/cli 0.2.0 → 0.2.1-alpha.bcm-ghy-4075-spawn-default-profile.eb120d1
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 +222 -10
- package/dist/add-collection-CCpC-GUz.mjs +9 -0
- package/dist/{add-collection-BTSGp4f9.mjs → add-collection-CLXfrgp4.mjs} +4 -4
- package/dist/{append-DY1-O789.mjs → append-DMcxP1LM.mjs} +5 -5
- package/dist/archive-4WqMsPWB.mjs +38 -0
- package/dist/{archive-CWtUzlHO.mjs → archive-5inmbMDL.mjs} +4 -4
- package/dist/{archive-CJ9rElKn.mjs → archive-BggM_AuL.mjs} +5 -5
- package/dist/{archive-pHsa4dL0.mjs → archive-BmhehbS0.mjs} +3 -3
- package/dist/{archive-DCPw3df6.mjs → archive-BwIZzWGe.mjs} +4 -4
- package/dist/{archive-DOa1u1aJ.mjs → archive-DErhQn8A.mjs} +4 -4
- package/dist/archive-DTnz1suV.mjs +38 -0
- package/dist/{archive-w6TX-zEk.mjs → archive-Q1387APe.mjs} +4 -4
- package/dist/{archive-BOEEMrYL.mjs → archive-h-3H5b4K.mjs} +5 -5
- package/dist/{auth-BrQtY0pO.mjs → auth-DzCAiArV.mjs} +4 -4
- package/dist/{body-C1_AaTS4.mjs → body-5snfmiwR.mjs} +3 -3
- package/dist/{branches-BsBzaGIf.mjs → branches-PL170CYS.mjs} +4 -4
- package/dist/{cancel-BNM0yyx-.mjs → cancel-EFKcF5J_.mjs} +3 -3
- package/dist/{cancel-task-Bggzn4JL.mjs → cancel-task-mFFx0d5m.mjs} +4 -4
- package/dist/{capabilities-DrDJo_ng.mjs → capabilities-CiaAfUgX.mjs} +1 -1
- package/dist/{card-DHCcmpgr.mjs → card-BsfdXK0O.mjs} +6 -6
- package/dist/{cards-D0hvA13L.mjs → cards-BI7zKb9M.mjs} +4 -4
- package/dist/cli.mjs +29 -26
- package/dist/{collection-D0O9gp3S.mjs → collection-2h_by9Ue.mjs} +6 -6
- package/dist/{collection-CFoLPrY5.mjs → collection-C52Ndi_O.mjs} +4 -2
- package/dist/{collection-namespace-DqPNrCdQ.mjs → collection-namespace-uNA5WhLB.mjs} +2 -2
- package/dist/{create-Cii_utzV.mjs → create-BLD0YniB.mjs} +5 -4
- package/dist/create-BP8EIWrP.mjs +161 -0
- package/dist/{create-Cyv7vHV_.mjs → create-BpizGzgQ.mjs} +5 -5
- package/dist/create-BxCsAdqc.mjs +45 -0
- package/dist/{create-CZ9KFnbi.mjs → create-CBKT7SE_.mjs} +5 -5
- package/dist/{create-C17Fh1_X.mjs → create-CQ32FwVe.mjs} +8 -7
- package/dist/{create-DKuixGJ2.mjs → create-CU3bYpsT.mjs} +5 -5
- package/dist/create-DAH24ltu.mjs +45 -0
- package/dist/{create-a3s1S2Dw.mjs → create-DutkaD7P.mjs} +7 -7
- package/dist/{create-E6L3WMqV.mjs → create-FuZa4j1N.mjs} +5 -5
- package/dist/{create-BR7x66KW.mjs → create-KveE3j3p.mjs} +8 -8
- package/dist/{create-C8ndg3g4.mjs → create-VrSowEbj.mjs} +6 -6
- package/dist/{create-oLb0E-ZP.mjs → create-acWKw4Y1.mjs} +7 -7
- package/dist/{create-branch-Dxn6UnV_.mjs → create-branch-CP1Y4_El.mjs} +4 -4
- package/dist/{create-05rX4oL-.mjs → create-xPfmI1Tu.mjs} +7 -7
- package/dist/{csv-T6_vlLJS.mjs → csv-CZyYi0vi.mjs} +5 -5
- package/dist/{current-task-DxWbw-bU.mjs → current-task-BR4koo9z.mjs} +4 -4
- package/dist/{dashboard-BpSPoeAn.mjs → dashboard-ARgJfamb.mjs} +8 -8
- package/dist/{database-CIbVSfua.mjs → database-BOqzcexD.mjs} +1 -1
- package/dist/{db-DBRijnh4.mjs → db-dbnxMPSR.mjs} +6 -6
- package/dist/{delete--P1xFX37.mjs → delete-BpL3vaaT.mjs} +5 -5
- package/dist/{delete-Ce2EBQYA.mjs → delete-C5DqDwev.mjs} +5 -5
- package/dist/delete-DCDFLHFa.mjs +49 -0
- package/dist/delete-P2Qlsr_s.mjs +49 -0
- package/dist/{delete-BBOIUl0D.mjs → delete-ea_ns1uM.mjs} +5 -5
- package/dist/{delete-runtime-B-8I9V1g.mjs → delete-runtime-DdBn6poA.mjs} +2 -2
- package/dist/{delete-table-Bj32NsXn.mjs → delete-table-tM048btr.mjs} +5 -5
- package/dist/{dependencies-ixzjVjUz.mjs → dependencies-DdOTClO2.mjs} +4 -4
- package/dist/destroy-B51EPvOJ.mjs +168 -0
- package/dist/{dirty-CH70h5m5.mjs → dirty-CEQYmhNF.mjs} +4 -4
- package/dist/{document-dZpuFu3I.mjs → document-DR1FLOn9.mjs} +5 -5
- package/dist/{eid-XjkBbyb_.mjs → eid-CtKGjAkz.mjs} +4 -4
- package/dist/events-C26DZ6yZ.mjs +44 -0
- package/dist/{export-CChMg-mL.mjs → export-CippuWZJ.mjs} +5 -8
- package/dist/export-Cy2DFtR2.mjs +10 -0
- package/dist/{field-B1heFeCz.mjs → field-CXDndCbB.mjs} +4 -4
- package/dist/{fields-C7h2QwUp.mjs → fields-Xm_HVNcX.mjs} +4 -4
- package/dist/{get-RlP_xiUd.mjs → get-3O7hv4zv.mjs} +5 -5
- package/dist/{get-Cj90oyxG.mjs → get-B0cq1uGy.mjs} +4 -4
- package/dist/{get-BWHJDa0B.mjs → get-B90bXbpw.mjs} +4 -4
- package/dist/{get-DWWmpQ87.mjs → get-BQBu2c94.mjs} +4 -4
- package/dist/{get-BsyccuCH.mjs → get-BQz45IBF.mjs} +5 -4
- package/dist/get-BSfKWZNJ.mjs +35 -0
- package/dist/get-BdNC8WM8.mjs +38 -0
- package/dist/{get-D9r2znrn.mjs → get-Bj66bcuU.mjs} +4 -4
- package/dist/{get-DRZENkCj.mjs → get-BrKqMM1d.mjs} +4 -4
- package/dist/{get-cyR67Lmq.mjs → get-CjZWjRa5.mjs} +4 -4
- package/dist/{get-kqY2lwhO.mjs → get-CwGqARAf.mjs} +4 -4
- package/dist/{get-B6ZJCJ8H.mjs → get-D5crrFSf.mjs} +4 -4
- package/dist/{get-AvGH_oph.mjs → get-DTkvGu_J.mjs} +3 -3
- package/dist/{get-KVN9ANVh.mjs → get-DX2fp6BB.mjs} +3 -3
- package/dist/get-DYuJVlP-.mjs +35 -0
- package/dist/{get-DrWYvefc.mjs → get-FIE88hj9.mjs} +4 -4
- package/dist/{get-C98IFgFi.mjs → get-Ihx_XaaI.mjs} +3 -3
- package/dist/{get-run-C4C_QQqO.mjs → get-run-lVwhQVFx.mjs} +4 -4
- package/dist/{get-Dg1J0wxb.mjs → get-z0BKkiRX.mjs} +4 -4
- package/dist/git-sync-CmB4YBmS.mjs +31 -0
- package/dist/{has-remote-changes-dLUGr0MD.mjs → has-remote-changes-DHrYSnTg.mjs} +4 -4
- package/dist/{import-Byull6jF.mjs → import-BU40xXSF.mjs} +6 -6
- package/dist/{input-m9ctfLxZ.mjs → input-BGyHn0Kr.mjs} +1 -1
- package/dist/{is-dirty-CU3ovgdG.mjs → is-dirty-BPluqPPP.mjs} +3 -3
- package/dist/is-dirty-DOy1TRcf.mjs +8 -0
- package/dist/{items-CEGDYWuF.mjs → items-BZpYkImP.mjs} +6 -6
- package/dist/{key-Ge4VwWvS.mjs → key-B8UAsQmB.mjs} +1 -1
- package/dist/{library-DHWWa4Tt.mjs → library-BGWDIfEM.mjs} +4 -4
- package/dist/list-B037kJtH.mjs +39 -0
- package/dist/{list-BuyRG3GB.mjs → list-B7Ihu6XI.mjs} +4 -4
- package/dist/{list-BtcpNl4-.mjs → list-BCeZlfpQ.mjs} +3 -3
- package/dist/{list-Bpv06V24.mjs → list-Bct00qku.mjs} +4 -4
- package/dist/{list-D9FY30xH.mjs → list-Be8xMtS3.mjs} +3 -3
- package/dist/{list-3z1ZChTG.mjs → list-CjBPVJqd.mjs} +3 -3
- package/dist/{list-CmCJwaGT.mjs → list-CoqHnusK.mjs} +3 -3
- package/dist/{list-O2w5xd1q.mjs → list-CvaoHnl-.mjs} +3 -3
- package/dist/{list-BliCJAjt.mjs → list-DamRE5Ds.mjs} +3 -3
- package/dist/{list-Br48kL09.mjs → list-DmopauvJ.mjs} +3 -3
- package/dist/{list-th_Ym6Cv.mjs → list-M_1sdYNH.mjs} +4 -4
- package/dist/{list-Cur_72xZ.mjs → list-Ov6bYzT9.mjs} +6 -5
- package/dist/{list-BFm4iEBt.mjs → list-SfpASSFx.mjs} +3 -3
- package/dist/{list-DEkPxVZu.mjs → list-fPfgG0PY.mjs} +3 -3
- package/dist/list-lsPeumLP.mjs +34 -0
- package/dist/{list-B9TyELob.mjs → list-sn9M7QQX.mjs} +3 -3
- package/dist/{list-CMb03cv3.mjs → list-wxIVl45_.mjs} +3 -3
- package/dist/listing-wFZuS5li.mjs +10 -0
- package/dist/{login-hKlYsAa1.mjs → login-CRlmR4op.mjs} +59 -19
- package/dist/{logout-DO8GVC6b.mjs → logout-DSZEUxSQ.mjs} +4 -4
- package/dist/{measure-R3T20wnB.mjs → measure-Ka0n3426.mjs} +5 -5
- package/dist/{parameter-values-BJb2GuLz.mjs → parameter-values-CwW8Xes7.mjs} +3 -3
- package/dist/{parse-enum-Cfne2suT.mjs → parse-enum-ooCsJWn6.mjs} +1 -1
- package/dist/parse-id-xS1tWJAq.mjs +18 -0
- package/dist/{parse-ref-C_MsXYI6.mjs → parse-ref-j4lxaQmd.mjs} +1 -1
- package/dist/{path-DzhQVCH8.mjs → path-CVmg-bmf.mjs} +3 -3
- package/dist/{poll-D1Yg78c3.mjs → poll-CuTlWBwI.mjs} +2 -2
- package/dist/{poll-task-DLUZaglY.mjs → poll-task-DhsYs8Hx.mjs} +2 -2
- package/dist/{preflight-Cy2jUSca.mjs → preflight-D3VgjEg7.mjs} +2 -2
- package/dist/{process-D5HN1wpT.mjs → process-7c8BcQEi.mjs} +1 -1
- package/dist/profile-name-CZ1-Vtrh.mjs +7 -0
- package/dist/{prompt-ZG9Drin_.mjs → prompt-jQnNKtlx.mjs} +1 -1
- package/dist/{publish-3hmHoaX-.mjs → publish-DFTCsjHU.mjs} +12 -7
- package/dist/{query-DkZViD_3.mjs → query-CPq-dhFV.mjs} +7 -7
- package/dist/{query-DTASj9Zu.mjs → query-Dfx69iJ4.mjs} +4 -4
- package/dist/{query-result-CbTFdlSf.mjs → query-result-Cg7odyR_.mjs} +1 -1
- package/dist/{remove-collection-D3wH9H6R.mjs → remove-collection-DUAMhx5L.mjs} +6 -6
- package/dist/{replace-CFzqkZXs.mjs → replace-DZWd6avZ.mjs} +5 -5
- package/dist/{requests-KBiY9UYy.mjs → requests-DYrDe-D0.mjs} +2 -2
- package/dist/{rescan-values-B1WycObS.mjs → rescan-values-DZSnEFA0.mjs} +5 -5
- package/dist/{resolve-Ct084wx3.mjs → resolve-BTZuO3Yq.mjs} +22 -15
- package/dist/{run-B8qEEdC8.mjs → run-B2b3Bjmv.mjs} +3 -3
- package/dist/{run-cw0qTEQ7.mjs → run-ryZ4sXK5.mjs} +6 -6
- package/dist/{runs-BOA4kK_X.mjs → runs-F82HVSie.mjs} +5 -5
- package/dist/{runtime-B-c-Fc2i.mjs → runtime-C6ASrgVA.mjs} +942 -906
- package/dist/{schema-tables-DRYzSVcW.mjs → schema-tables-CCOKb715.mjs} +4 -4
- package/dist/{schemas-BiMjD25L.mjs → schemas-LtVrNECH.mjs} +3 -3
- package/dist/{search-DjKxRXO5.mjs → search-9GSZHgJQ.mjs} +3 -3
- package/dist/{segment-CZkk0g79.mjs → segment-C40bORNZ.mjs} +5 -5
- package/dist/{selectors-B7MJUn3I.mjs → selectors-B2nDmrIV.mjs} +3 -3
- package/dist/{set-kyoORFG3.mjs → set-C57KDMGM.mjs} +6 -6
- package/dist/{set-active-CF868qdW.mjs → set-active-BDHGHtj2.mjs} +3 -3
- package/dist/{setting-BZgjURQ_.mjs → setting-zrJwy48C.mjs} +3 -3
- package/dist/{setup-D9joJYPb.mjs → setup-Doq8atTG.mjs} +4 -4
- package/dist/{skills-BqI05u72.mjs → skills-y-KsUqT9.mjs} +1 -1
- package/dist/{skills-D8NrJxjp.mjs → skills-yuzH_o8s.mjs} +3 -3
- package/dist/{snippet-y_FzKxaQ.mjs → snippet-ScFM8re8.mjs} +5 -5
- package/dist/{stash-BVMerTaF.mjs → stash-D_u6z4q6.mjs} +6 -6
- package/dist/{status-C-0jFjFn.mjs → status--Dm2Jv6k.mjs} +3 -3
- package/dist/{status-x8bDOa1i.mjs → status-CDPhDX5I.mjs} +26 -10
- package/dist/{summary-B-R9SdMF.mjs → summary-C9a2cBTE.mjs} +3 -3
- package/dist/{sync-schema-wne2KXIW.mjs → sync-schema-CDIWNCGI.mjs} +7 -7
- package/dist/sync-scope-DW2QpGwv.mjs +55 -0
- package/dist/{table-CS2-2INi.mjs → table-BKehBm_E.mjs} +4 -4
- package/dist/timeline-DEaiuB5V.mjs +157 -0
- package/dist/timeline-event-CLWMxvE0.mjs +22 -0
- package/dist/timeline-n3Nw9Egt.mjs +24 -0
- package/dist/transform-CrOOqKen.mjs +31 -0
- package/dist/transform-job-J-E0Mec7.mjs +25 -0
- package/dist/{transform-tag-DaNKreDj.mjs → transform-tag-Bkyasy_s.mjs} +4 -4
- package/dist/{transforms-DB2WNP2R.mjs → transforms-w2a5qsjJ.mjs} +4 -4
- package/dist/{tree-BIOphGVs.mjs → tree-JZC6vD9q.mjs} +3 -3
- package/dist/{unpublish-BWM36ZTg.mjs → unpublish-BsfIH46y.mjs} +4 -4
- package/dist/{update-BCbv880u.mjs → update-B8hn6VxO.mjs} +8 -8
- package/dist/{update-BlzcZwRQ.mjs → update-BSNK36fk.mjs} +8 -8
- package/dist/update-BTFj6WHo.mjs +52 -0
- package/dist/{update-6umfSz5t.mjs → update-BfIGjAVA.mjs} +5 -5
- package/dist/{update-HxYcvpSq.mjs → update-C1_aIL6X.mjs} +7 -7
- package/dist/{update-BchtHlbH.mjs → update-CXKWHOIN.mjs} +6 -6
- package/dist/{update-CTZg2Lia.mjs → update-Cg09lBb5.mjs} +9 -9
- package/dist/update-D01S8hnw.mjs +52 -0
- package/dist/{update-7Ts7KrB8.mjs → update-DKQjMsuE.mjs} +6 -6
- package/dist/{update-Sz0QRGWB.mjs → update-DSlSr7Ky.mjs} +6 -6
- package/dist/{update-DJDuIhYG.mjs → update-QaBVvlz9.mjs} +6 -6
- package/dist/{update-BiUeEGU-.mjs → update-WLb9099y.mjs} +8 -8
- package/dist/{update-zfLbmC-H.mjs → update-bFNKpay8.mjs} +6 -6
- package/dist/{update-dashcard-CfDpy7Lz.mjs → update-dashcard-CKZC7scy.mjs} +6 -6
- package/dist/{upgrade-BWl0VjMK.mjs → upgrade-DkK1ZbEY.mjs} +4 -4
- package/dist/{upload-CPzOhGeX.mjs → upload-DOMoaR9f.mjs} +3 -3
- package/dist/{uuid-D_YeqDui.mjs → uuid-DDbLKnbe.mjs} +2 -2
- package/dist/{validate-clAWO3X-.mjs → validate-DqQ7DQnP.mjs} +1 -1
- package/dist/{validate-query-CsK2_2_u.mjs → validate-query-BYG7lyaY.mjs} +2 -2
- package/dist/{values-DSk8ZJ3B.mjs → values-Bc99Kkuv.mjs} +3 -3
- package/dist/{verify-DkQdLjf3.mjs → verify-WvMbaT8W.mjs} +2 -2
- package/dist/{wait-DvSsMjea.mjs → wait-DmgEPnHW.mjs} +5 -5
- package/dist/{wait-flags-dXGThljd.mjs → wait-flags-BpzyrpAL.mjs} +2 -2
- package/dist/workspace-BgH_4xFO.mjs +75 -0
- package/dist/workspace-LFtHxcw9.mjs +19 -0
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +5 -3
- package/skill-data/git-sync/SKILL.md +20 -5
- package/skill-data/visualization/SKILL.md +1 -0
- package/dist/add-collection-DlAwt2Z3.mjs +0 -9
- package/dist/git-sync-JHa7bIyY.mjs +0 -31
- package/dist/is-dirty-Bb2dfEYs.mjs +0 -8
- package/dist/parse-id-DfY0Lugw.mjs +0 -12
- package/dist/transform-6hqM1DXA.mjs +0 -31
- package/dist/transform-job-DuERhLaj.mjs +0 -25
- /package/dist/{dashboard-B-MTpfeS.mjs → dashboard-BLihjDXg.mjs} +0 -0
- /package/dist/{document-CL4ML5FN.mjs → document-D4zB-5a0.mjs} +0 -0
- /package/dist/{measure-S9WszHre.mjs → measure-C3G1srWb.mjs} +0 -0
- /package/dist/{paginate-CMqbqhMC.mjs → paginate-FVZUxL4J.mjs} +0 -0
- /package/dist/{revision-message-flag-CHzX0cqV.mjs → revision-message-flag-CHrJgFFx.mjs} +0 -0
- /package/dist/{segment-BPb1H6DW.mjs → segment-CxRYEXeO.mjs} +0 -0
- /package/dist/{setting-Cko6bE_w.mjs → setting-m46MUtW5.mjs} +0 -0
- /package/dist/{snippet-DWiXNy4T.mjs → snippet-C8PVaPY9.mjs} +0 -0
- /package/dist/{table-C3RIKiYM.mjs → table-3onHpwcb.mjs} +0 -0
- /package/dist/{transform-JQel7e5H.mjs → transform-DP6J2ber.mjs} +0 -0
- /package/dist/{transform-job-CtVziW85.mjs → transform-job-B5x8aYfV.mjs} +0 -0
- /package/dist/{transform-tag-wFiWmiyO.mjs → transform-tag-BRwfWeHf.mjs} +0 -0
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Capabilities, ConfigError, connectionFlags, flagConsumesValue, jsonLine, normalizeFlag, outputFlags, package_default, profileFlag, reportError, resolveCitty, toAliasArray } from "./capabilities-
|
|
2
|
+
import { Capabilities, ConfigError, connectionFlags, flagConsumesValue, jsonLine, normalizeFlag, outputFlags, package_default, profileFlag, reportError, resolveCitty, toAliasArray } from "./capabilities-CiaAfUgX.mjs";
|
|
3
3
|
import { getMetabaseAugment, setMetabaseAugment } from "./command-augment-D9pI9Vbh.mjs";
|
|
4
4
|
import { defineCommand, renderUsage, runMain } from "citty";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -59,31 +59,34 @@ const main = defineCommand({
|
|
|
59
59
|
description: package_default.description
|
|
60
60
|
},
|
|
61
61
|
subCommands: {
|
|
62
|
-
auth: () => import("./auth-
|
|
63
|
-
db: () => import("./db-
|
|
64
|
-
table: () => import("./table-
|
|
65
|
-
field: () => import("./field-
|
|
66
|
-
upload: () => import("./upload-
|
|
67
|
-
card: () => import("./card-
|
|
68
|
-
dashboard: () => import("./dashboard-
|
|
69
|
-
collection: () => import("./collection-
|
|
70
|
-
library: () => import("./library-
|
|
71
|
-
document: () => import("./document-
|
|
72
|
-
transform: () => import("./transform-
|
|
73
|
-
"transform-job": () => import("./transform-job-
|
|
74
|
-
"transform-tag": () => import("./transform-tag-
|
|
75
|
-
setting: () => import("./setting-
|
|
76
|
-
search: () => import("./search-
|
|
77
|
-
"git-sync": () => import("./git-sync-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
62
|
+
auth: () => import("./auth-DzCAiArV.mjs").then((mod) => mod.default),
|
|
63
|
+
db: () => import("./db-dbnxMPSR.mjs").then((mod) => mod.default),
|
|
64
|
+
table: () => import("./table-BKehBm_E.mjs").then((mod) => mod.default),
|
|
65
|
+
field: () => import("./field-CXDndCbB.mjs").then((mod) => mod.default),
|
|
66
|
+
upload: () => import("./upload-DOMoaR9f.mjs").then((mod) => mod.default),
|
|
67
|
+
card: () => import("./card-BsfdXK0O.mjs").then((mod) => mod.default),
|
|
68
|
+
dashboard: () => import("./dashboard-ARgJfamb.mjs").then((mod) => mod.default),
|
|
69
|
+
collection: () => import("./collection-2h_by9Ue.mjs").then((mod) => mod.default),
|
|
70
|
+
library: () => import("./library-BGWDIfEM.mjs").then((mod) => mod.default),
|
|
71
|
+
document: () => import("./document-DR1FLOn9.mjs").then((mod) => mod.default),
|
|
72
|
+
transform: () => import("./transform-CrOOqKen.mjs").then((mod) => mod.default),
|
|
73
|
+
"transform-job": () => import("./transform-job-J-E0Mec7.mjs").then((mod) => mod.default),
|
|
74
|
+
"transform-tag": () => import("./transform-tag-Bkyasy_s.mjs").then((mod) => mod.default),
|
|
75
|
+
setting: () => import("./setting-zrJwy48C.mjs").then((mod) => mod.default),
|
|
76
|
+
search: () => import("./search-9GSZHgJQ.mjs").then((mod) => mod.default),
|
|
77
|
+
"git-sync": () => import("./git-sync-CmB4YBmS.mjs").then((mod) => mod.default),
|
|
78
|
+
workspace: () => import("./workspace-LFtHxcw9.mjs").then((mod) => mod.default),
|
|
79
|
+
setup: () => import("./setup-Doq8atTG.mjs").then((mod) => mod.default),
|
|
80
|
+
snippet: () => import("./snippet-ScFM8re8.mjs").then((mod) => mod.default),
|
|
81
|
+
segment: () => import("./segment-C40bORNZ.mjs").then((mod) => mod.default),
|
|
82
|
+
measure: () => import("./measure-Ka0n3426.mjs").then((mod) => mod.default),
|
|
83
|
+
timeline: () => import("./timeline-n3Nw9Egt.mjs").then((mod) => mod.default),
|
|
84
|
+
"timeline-event": () => import("./timeline-event-CLWMxvE0.mjs").then((mod) => mod.default),
|
|
85
|
+
eid: () => import("./eid-CtKGjAkz.mjs").then((mod) => mod.default),
|
|
86
|
+
query: () => import("./query-CPq-dhFV.mjs").then((mod) => mod.default),
|
|
87
|
+
uuid: () => import("./uuid-DDbLKnbe.mjs").then((mod) => mod.default),
|
|
88
|
+
upgrade: () => import("./upgrade-DkK1ZbEY.mjs").then((mod) => mod.default),
|
|
89
|
+
skills: () => import("./skills-yuzH_o8s.mjs").then((mod) => mod.default)
|
|
87
90
|
}
|
|
88
91
|
});
|
|
89
92
|
setMetabaseAugment(main, {
|
|
@@ -10,12 +10,12 @@ var collection_default = defineCommandGroup({
|
|
|
10
10
|
purpose: "collection ref forms and the transforms namespace"
|
|
11
11
|
}],
|
|
12
12
|
subCommands: {
|
|
13
|
-
list: () => import("./list-
|
|
14
|
-
get: () => import("./get-
|
|
15
|
-
items: () => import("./items-
|
|
16
|
-
tree: () => import("./tree-
|
|
17
|
-
create: () => import("./create-
|
|
18
|
-
archive: () => import("./archive-
|
|
13
|
+
list: () => import("./list-Ov6bYzT9.mjs").then((mod) => mod.default),
|
|
14
|
+
get: () => import("./get-BQBu2c94.mjs").then((mod) => mod.default),
|
|
15
|
+
items: () => import("./items-BZpYkImP.mjs").then((mod) => mod.default),
|
|
16
|
+
tree: () => import("./tree-JZC6vD9q.mjs").then((mod) => mod.default),
|
|
17
|
+
create: () => import("./create-CQ32FwVe.mjs").then((mod) => mod.default),
|
|
18
|
+
archive: () => import("./archive-5inmbMDL.mjs").then((mod) => mod.default)
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
|
|
@@ -56,7 +56,8 @@ const Collection = z.object({
|
|
|
56
56
|
namespace: CollectionNamespace.nullable().optional(),
|
|
57
57
|
entity_id: z.string().nullable().optional(),
|
|
58
58
|
slug: z.string().optional(),
|
|
59
|
-
can_write: z.boolean().optional()
|
|
59
|
+
can_write: z.boolean().optional(),
|
|
60
|
+
is_remote_synced: z.boolean().nullable().optional()
|
|
60
61
|
}).loose();
|
|
61
62
|
const CollectionCompact = Collection.pick({
|
|
62
63
|
id: true,
|
|
@@ -67,7 +68,8 @@ const CollectionCompact = Collection.pick({
|
|
|
67
68
|
parent_id: true,
|
|
68
69
|
type: true,
|
|
69
70
|
authority_level: true,
|
|
70
|
-
is_personal: true
|
|
71
|
+
is_personal: true,
|
|
72
|
+
is_remote_synced: true
|
|
71
73
|
}).strip();
|
|
72
74
|
const collectionView = {
|
|
73
75
|
compactPick: CollectionCompact,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConfigError } from "./capabilities-
|
|
2
|
-
import { HttpError } from "./runtime-
|
|
1
|
+
import { ConfigError } from "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import { HttpError } from "./runtime-C6ASrgVA.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.";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./collection-
|
|
5
|
-
import
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./collection-C52Ndi_O.mjs";
|
|
5
|
+
import "./listing-wFZuS5li.mjs";
|
|
6
|
+
import { Library, createLibrary, libraryView } from "./resolve-BTZuO3Yq.mjs";
|
|
6
7
|
|
|
7
8
|
//#region src/commands/library/create.ts
|
|
8
9
|
var create_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { ConfigError, ENV_API_KEY, connectionFlags, errorMessage, outputFlags, profileFlag, renderSummary, warn } from "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { WORKSPACE_MANAGER_SCOPE, clearProfile, defineMetabaseCommand, keyringFallbackWarning, listProfileRecords, normalizeUrl, readEnvCredentials, readProfileCredential, resolveRecordCredential, revokeOAuthCredential, setDefaultProfile, writeProfile } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import { promptConfirm } from "./prompt-jQnNKtlx.mjs";
|
|
5
|
+
import { parseIdCsv } from "./parse-id-xS1tWJAq.mjs";
|
|
6
|
+
import { Workspace, workspaceView } from "./workspace-BgH_4xFO.mjs";
|
|
7
|
+
import { workspaceProfileName } from "./profile-name-CZ1-Vtrh.mjs";
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
|
|
10
|
+
//#region src/core/auth/stale-credentials.ts
|
|
11
|
+
function findStaleParentCredentials(records, targetUrl, currentProfile) {
|
|
12
|
+
const target = normalizeUrl(targetUrl);
|
|
13
|
+
const stale = [];
|
|
14
|
+
for (const record of records) {
|
|
15
|
+
if (record.name === currentProfile || normalizeUrl(record.url) !== target) continue;
|
|
16
|
+
const resolved = resolveRecordCredential(record);
|
|
17
|
+
if (resolved === null) continue;
|
|
18
|
+
if (resolved.credential.kind === "apiKey") stale.push({
|
|
19
|
+
profile: record.name,
|
|
20
|
+
kind: "apiKey"
|
|
21
|
+
});
|
|
22
|
+
else if (resolved.credential.scope !== WORKSPACE_MANAGER_SCOPE) stale.push({
|
|
23
|
+
profile: record.name,
|
|
24
|
+
kind: "oauth",
|
|
25
|
+
scope: resolved.credential.scope
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return stale;
|
|
29
|
+
}
|
|
30
|
+
function describeStaleCredential(credential) {
|
|
31
|
+
const detail = credential.kind === "apiKey" ? "api key" : credential.scope;
|
|
32
|
+
return `${credential.profile} (${detail})`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/commands/workspace/credential-sweep.ts
|
|
37
|
+
const keepExistingAuthFlag = { keepExistingAuth: {
|
|
38
|
+
type: "boolean",
|
|
39
|
+
description: "Proceed despite broader same-server credentials in the profile store (interactive only)",
|
|
40
|
+
alias: "keep-existing-auth",
|
|
41
|
+
default: false
|
|
42
|
+
} };
|
|
43
|
+
async function enforceCredentialSweep(input) {
|
|
44
|
+
const records = await listProfileRecords();
|
|
45
|
+
const stale = findStaleParentCredentials(records, input.url, input.profile);
|
|
46
|
+
if (stale.length === 0) return;
|
|
47
|
+
const listing = stale.map(describeStaleCredential).join(", ");
|
|
48
|
+
const interactive = process.stdin.isTTY === true;
|
|
49
|
+
if (input.keepExistingAuth) {
|
|
50
|
+
if (!interactive) throw new ConfigError("--keep-existing-auth requires an interactive terminal; refusing to proceed with broader credentials in a non-interactive context");
|
|
51
|
+
warn(`proceeding with broader credentials left in the profile store: ${listing}`);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (!interactive) throw new ConfigError(`refusing to ${input.action}: broader credentials for this server exist in the profile store (${listing}) — revoke them with \`mb auth logout --profile <name>\` first; a human can override with --keep-existing-auth`);
|
|
55
|
+
const ok = await promptConfirm({
|
|
56
|
+
message: `Broader credentials for this server exist (${listing}). Revoke them before continuing?`,
|
|
57
|
+
initialValue: true
|
|
58
|
+
});
|
|
59
|
+
if (!ok) throw new ConfigError(`aborted: revoke the broader credentials (${listing}) with \`mb auth logout --profile <name>\` or pass --keep-existing-auth`);
|
|
60
|
+
for (const credential of stale) await revokeStaleCredential(credential);
|
|
61
|
+
}
|
|
62
|
+
async function revokeStaleCredential(stale) {
|
|
63
|
+
const resolved = await readProfileCredential(stale.profile);
|
|
64
|
+
await clearProfile(stale.profile);
|
|
65
|
+
if (resolved === null || resolved.credential.kind !== "oauth") {
|
|
66
|
+
warn(`cleared profile "${stale.profile}"; its API key is still active server-side — delete it in Admin settings → Authentication → API keys`);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
try {
|
|
70
|
+
const revoked = await revokeOAuthCredential(resolved.url, resolved.credential);
|
|
71
|
+
if (!revoked) warn(`cleared profile "${stale.profile}", but the server advertises no revocation endpoint; its tokens remain valid until they expire`);
|
|
72
|
+
} catch (error) {
|
|
73
|
+
warn(`cleared profile "${stale.profile}", but revoking server-side failed: ${errorMessage(error)}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/commands/workspace/create.ts
|
|
79
|
+
const SpawnedWorkspace = Workspace.extend({
|
|
80
|
+
url: z.string().optional(),
|
|
81
|
+
api_key: z.string().optional()
|
|
82
|
+
});
|
|
83
|
+
var create_default = defineMetabaseCommand({
|
|
84
|
+
meta: {
|
|
85
|
+
name: "create",
|
|
86
|
+
description: "Create and provision a workspace"
|
|
87
|
+
},
|
|
88
|
+
details: "Attaches the given databases and provisions warehouse isolation (a temporary schema + user per database) before returning. Each database must be eligible for workspaces; provisioning is blocking, so the response carries the final per-database status. Before creating, the profile store is swept for broader same-server credentials (any API key, any OAuth grant wider than mb:workspace-manager): interactive runs offer to revoke them, non-interactive runs refuse — --keep-existing-auth is the human-only override. With --spawn the parent also asks its instance manager to spawn a workspace Metabase; the returned credential is saved to the ws-<id> profile (never printed) and made the default, so bare `mb` targets the new workspace.",
|
|
89
|
+
capabilities: {
|
|
90
|
+
minVersion: 62,
|
|
91
|
+
tokenFeature: "workspaces"
|
|
92
|
+
},
|
|
93
|
+
args: {
|
|
94
|
+
...outputFlags,
|
|
95
|
+
...profileFlag,
|
|
96
|
+
...connectionFlags,
|
|
97
|
+
...keepExistingAuthFlag,
|
|
98
|
+
name: {
|
|
99
|
+
type: "string",
|
|
100
|
+
description: "Workspace name",
|
|
101
|
+
required: true
|
|
102
|
+
},
|
|
103
|
+
"database-ids": {
|
|
104
|
+
type: "string",
|
|
105
|
+
description: "Database ids to attach, comma separated",
|
|
106
|
+
required: true
|
|
107
|
+
},
|
|
108
|
+
spawn: {
|
|
109
|
+
type: "boolean",
|
|
110
|
+
description: "Spawn a workspace instance and save its credential as the default profile (key is never printed)",
|
|
111
|
+
default: false
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
outputSchema: Workspace,
|
|
115
|
+
examples: [
|
|
116
|
+
"mb workspace create --name ws-reports --database-ids 1",
|
|
117
|
+
"mb workspace create --name ws-etl --database-ids 1,2 --json",
|
|
118
|
+
"mb workspace create --name transform-work --database-ids 1 --spawn"
|
|
119
|
+
],
|
|
120
|
+
async run({ args, ctx, getClient, getResolvedConfig }) {
|
|
121
|
+
const databaseIds = parseIdCsv(args["database-ids"], "database id");
|
|
122
|
+
if (args.spawn) assertNoApiKeyEnvShadow();
|
|
123
|
+
const resolved = await getResolvedConfig();
|
|
124
|
+
await enforceCredentialSweep({
|
|
125
|
+
url: resolved.url,
|
|
126
|
+
profile: resolved.profile,
|
|
127
|
+
keepExistingAuth: args.keepExistingAuth === true,
|
|
128
|
+
action: "create a workspace"
|
|
129
|
+
});
|
|
130
|
+
const client = await getClient();
|
|
131
|
+
const created = await client.requestParsed(SpawnedWorkspace, "/api/ee/workspace-manager/", {
|
|
132
|
+
method: "POST",
|
|
133
|
+
body: {
|
|
134
|
+
name: args.name,
|
|
135
|
+
database_ids: databaseIds,
|
|
136
|
+
spawn_instance: args.spawn ? true : void 0
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
if (args.spawn) await saveSpawnedCredential(created);
|
|
140
|
+
const workspace = { ...created };
|
|
141
|
+
delete workspace.api_key;
|
|
142
|
+
renderSummary(workspace, workspaceView, `Created workspace ${created.id} "${created.name}".`, ctx);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
function assertNoApiKeyEnvShadow() {
|
|
146
|
+
if (readEnvCredentials().apiKey !== null) throw new ConfigError(`--spawn saves the workspace credential as the default profile, but ${ENV_API_KEY} is set and would shadow it — unset ${ENV_API_KEY} first`);
|
|
147
|
+
}
|
|
148
|
+
async function saveSpawnedCredential(created) {
|
|
149
|
+
if (created.url === void 0 || created.api_key === void 0) throw new Error("the server did not return a spawned instance (no url/api_key in the create response) — this Metabase may not support spawn_instance");
|
|
150
|
+
const profileName = workspaceProfileName(created.id);
|
|
151
|
+
const location = await writeProfile({
|
|
152
|
+
url: normalizeUrl(created.url),
|
|
153
|
+
apiKey: created.api_key
|
|
154
|
+
}, profileName);
|
|
155
|
+
if (location.backend === "file") warn(keyringFallbackWarning(location));
|
|
156
|
+
await setDefaultProfile(profileName);
|
|
157
|
+
warn(`saved workspace credential to profile "${profileName}" and made it the default — bare \`mb\` now targets ${created.url}`);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
//#endregion
|
|
161
|
+
export { create_default as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./input-
|
|
5
|
-
import { readBody } from "./body-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
6
6
|
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
-
import { Snippet, SnippetCreateInput, snippetView } from "./snippet-
|
|
7
|
+
import { Snippet, SnippetCreateInput, snippetView } from "./snippet-C8PVaPY9.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/snippet/create.ts
|
|
10
10
|
var create_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
6
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
+
import { Timeline, TimelineCreateInput, timelineView } from "./timeline-DEaiuB5V.mjs";
|
|
8
|
+
|
|
9
|
+
//#region src/commands/timeline/create.ts
|
|
10
|
+
var create_default = defineMetabaseCommand({
|
|
11
|
+
meta: {
|
|
12
|
+
name: "create",
|
|
13
|
+
description: "Create a timeline from JSON"
|
|
14
|
+
},
|
|
15
|
+
details: "The JSON body needs `name`; optional fields: `description`, `icon` (star|cake|mail|warning|bell|cloud, default star), `collection_id` (null = root collection), `default`.",
|
|
16
|
+
capabilities: { minVersion: 58 },
|
|
17
|
+
args: {
|
|
18
|
+
...outputFlags,
|
|
19
|
+
...profileFlag,
|
|
20
|
+
...connectionFlags,
|
|
21
|
+
...bodyInputFlags
|
|
22
|
+
},
|
|
23
|
+
inputSchema: TimelineCreateInput,
|
|
24
|
+
outputSchema: Timeline,
|
|
25
|
+
examples: [
|
|
26
|
+
"mb timeline create --body '{\"name\":\"Releases\"}'",
|
|
27
|
+
"cat timeline.json | mb timeline create",
|
|
28
|
+
"mb timeline create --file timeline.json"
|
|
29
|
+
],
|
|
30
|
+
async run({ args, ctx, getClient }) {
|
|
31
|
+
const body = await readBody({
|
|
32
|
+
flag: args.body,
|
|
33
|
+
file: args.file
|
|
34
|
+
}, TimelineCreateInput);
|
|
35
|
+
const client = await getClient();
|
|
36
|
+
const created = await client.requestParsed(Timeline, "/api/timeline", {
|
|
37
|
+
method: "POST",
|
|
38
|
+
body
|
|
39
|
+
});
|
|
40
|
+
renderSummary(created, timelineView, `Created timeline ${created.id} "${created.name}".`, ctx);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { create_default as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./input-
|
|
5
|
-
import { readBody } from "./body-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
6
6
|
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
-
import { Document, DocumentCreateInput, documentView } from "./document-
|
|
7
|
+
import { Document, DocumentCreateInput, documentView } from "./document-D4zB-5a0.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/document/create.ts
|
|
10
10
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./input-
|
|
5
|
-
import { readBody } from "./body-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
6
6
|
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
-
import { parseEnumFlag } from "./parse-enum-
|
|
8
|
-
import { Collection, CollectionCreateInput, CollectionNamespace, collectionView } from "./collection-
|
|
7
|
+
import { parseEnumFlag } from "./parse-enum-ooCsJWn6.mjs";
|
|
8
|
+
import { Collection, CollectionCreateInput, CollectionNamespace, collectionView } from "./collection-C52Ndi_O.mjs";
|
|
9
|
+
import { COLLECTIONS_PATH } from "./listing-wFZuS5li.mjs";
|
|
9
10
|
|
|
10
11
|
//#region src/commands/collection/create.ts
|
|
11
12
|
var create_default = defineMetabaseCommand({
|
|
@@ -40,7 +41,7 @@ var create_default = defineMetabaseCommand({
|
|
|
40
41
|
}, CollectionCreateInput);
|
|
41
42
|
if (typeof args.namespace === "string" && args.namespace !== "") body.namespace = parseEnumFlag(args.namespace, CollectionNamespace, "namespace");
|
|
42
43
|
const client = await getClient();
|
|
43
|
-
const created = await client.requestParsed(Collection,
|
|
44
|
+
const created = await client.requestParsed(Collection, COLLECTIONS_PATH, {
|
|
44
45
|
method: "POST",
|
|
45
46
|
body
|
|
46
47
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./input-
|
|
5
|
-
import { readBody } from "./body-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
6
6
|
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
-
import { TransformJob, TransformJobCreateInput, transformJobView } from "./transform-job-
|
|
7
|
+
import { TransformJob, TransformJobCreateInput, transformJobView } from "./transform-job-B5x8aYfV.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/transform-job/create.ts
|
|
10
10
|
var create_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
6
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
+
import { TimelineEvent, TimelineEventCreateInput, timelineEventView } from "./timeline-DEaiuB5V.mjs";
|
|
8
|
+
|
|
9
|
+
//#region src/commands/timeline-event/create.ts
|
|
10
|
+
var create_default = defineMetabaseCommand({
|
|
11
|
+
meta: {
|
|
12
|
+
name: "create",
|
|
13
|
+
description: "Create a timeline event from JSON"
|
|
14
|
+
},
|
|
15
|
+
details: "The JSON body needs `name`, `timestamp` (ISO 8601), `timezone` (IANA name like UTC or America/New_York), `time_matters` (true when the time of day is significant, false when only the date is), and `timeline_id`; optional fields: `description`, `icon` (star|cake|mail|warning|bell|cloud, default: the timeline's icon).",
|
|
16
|
+
capabilities: { minVersion: 58 },
|
|
17
|
+
args: {
|
|
18
|
+
...outputFlags,
|
|
19
|
+
...profileFlag,
|
|
20
|
+
...connectionFlags,
|
|
21
|
+
...bodyInputFlags
|
|
22
|
+
},
|
|
23
|
+
inputSchema: TimelineEventCreateInput,
|
|
24
|
+
outputSchema: TimelineEvent,
|
|
25
|
+
examples: [
|
|
26
|
+
"mb timeline-event create --body '{\"name\":\"v2 launch\",\"timestamp\":\"2026-07-01T00:00:00Z\",\"timezone\":\"UTC\",\"time_matters\":false,\"timeline_id\":1}'",
|
|
27
|
+
"cat event.json | mb timeline-event create",
|
|
28
|
+
"mb timeline-event create --file event.json"
|
|
29
|
+
],
|
|
30
|
+
async run({ args, ctx, getClient }) {
|
|
31
|
+
const body = await readBody({
|
|
32
|
+
flag: args.body,
|
|
33
|
+
file: args.file
|
|
34
|
+
}, TimelineEventCreateInput);
|
|
35
|
+
const client = await getClient();
|
|
36
|
+
const created = await client.requestParsed(TimelineEvent, "/api/timeline-event", {
|
|
37
|
+
method: "POST",
|
|
38
|
+
body
|
|
39
|
+
});
|
|
40
|
+
renderSummary(created, timelineEventView, `Created timeline event ${created.id} "${created.name}".`, ctx);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { create_default as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./input-
|
|
5
|
-
import { readBody } from "./body-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
6
6
|
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
-
import "./validate-
|
|
8
|
-
import { MEASURE_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-
|
|
9
|
-
import { Measure, MeasureCreateInput, measureView } from "./measure-
|
|
7
|
+
import "./validate-DqQ7DQnP.mjs";
|
|
8
|
+
import { MEASURE_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BYG7lyaY.mjs";
|
|
9
|
+
import { Measure, MeasureCreateInput, measureView } from "./measure-C3G1srWb.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/measure/create.ts
|
|
12
12
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./input-
|
|
5
|
-
import { readBody } from "./body-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
6
6
|
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
-
import { TransformTag, TransformTagCreateInput, transformTagView } from "./transform-tag-
|
|
7
|
+
import { TransformTag, TransformTagCreateInput, transformTagView } from "./transform-tag-BRwfWeHf.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/transform-tag/create.ts
|
|
10
10
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./input-
|
|
5
|
-
import { readBody } from "./body-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
6
6
|
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
-
import "./validate-
|
|
8
|
-
import { TRANSFORM_SOURCE_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-
|
|
9
|
-
import { Transform, TransformCreateInput, transformView } from "./transform-
|
|
10
|
-
import { enrichTransformCollectionError } from "./collection-namespace-
|
|
7
|
+
import "./validate-DqQ7DQnP.mjs";
|
|
8
|
+
import { TRANSFORM_SOURCE_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BYG7lyaY.mjs";
|
|
9
|
+
import { Transform, TransformCreateInput, transformView } from "./transform-DP6J2ber.mjs";
|
|
10
|
+
import { enrichTransformCollectionError } from "./collection-namespace-uNA5WhLB.mjs";
|
|
11
11
|
|
|
12
12
|
//#region src/commands/transform/create.ts
|
|
13
13
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./input-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
5
|
import "./embedding-CKdw8q7p.mjs";
|
|
6
6
|
import "./field-DsXTeqBy.mjs";
|
|
7
7
|
import "./parameter-BZ6y-Gfs.mjs";
|
|
8
8
|
import { Card, CardCreateInput, cardView } from "./card-B8G5jQQT.mjs";
|
|
9
|
-
import { readBody } from "./body-
|
|
9
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
10
10
|
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
11
|
-
import "./validate-
|
|
12
|
-
import { CARD_DATASET_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-
|
|
11
|
+
import "./validate-DqQ7DQnP.mjs";
|
|
12
|
+
import { CARD_DATASET_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BYG7lyaY.mjs";
|
|
13
13
|
|
|
14
14
|
//#region src/commands/card/create.ts
|
|
15
15
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./input-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
5
|
import "./embedding-CKdw8q7p.mjs";
|
|
6
6
|
import "./field-DsXTeqBy.mjs";
|
|
7
7
|
import "./parameter-BZ6y-Gfs.mjs";
|
|
8
8
|
import "./card-B8G5jQQT.mjs";
|
|
9
|
-
import { readBody } from "./body-
|
|
9
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
10
10
|
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
11
|
-
import "./validate-
|
|
12
|
-
import { Dashboard, DashboardCreateInput, DashboardDetail, dashboardView } from "./dashboard-
|
|
13
|
-
import { preflightDashcardCardReferences, wrapChainedDashboardWriteError } from "./preflight-
|
|
11
|
+
import "./validate-DqQ7DQnP.mjs";
|
|
12
|
+
import { Dashboard, DashboardCreateInput, DashboardDetail, dashboardView } from "./dashboard-BLihjDXg.mjs";
|
|
13
|
+
import { preflightDashcardCardReferences, wrapChainedDashboardWriteError } from "./preflight-D3VgjEg7.mjs";
|
|
14
14
|
|
|
15
15
|
//#region src/commands/dashboard/create.ts
|
|
16
16
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ConfigError, connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { ConfigError, connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./poll-
|
|
5
|
-
import { REMOTE_SYNC_PATHS } from "./poll-task-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./poll-CuTlWBwI.mjs";
|
|
5
|
+
import { REMOTE_SYNC_PATHS } from "./poll-task-DhsYs8Hx.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/git-sync/create-branch.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./input-
|
|
5
|
-
import { readBody } from "./body-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { readBody } from "./body-5snfmiwR.mjs";
|
|
6
6
|
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
-
import "./validate-
|
|
8
|
-
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-
|
|
9
|
-
import { Segment, SegmentCreateInput, segmentView } from "./segment-
|
|
7
|
+
import "./validate-DqQ7DQnP.mjs";
|
|
8
|
+
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BYG7lyaY.mjs";
|
|
9
|
+
import { Segment, SegmentCreateInput, segmentView } from "./segment-CxRYEXeO.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/segment/create.ts
|
|
12
12
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./input-
|
|
5
|
-
import { parseId } from "./parse-id-
|
|
6
|
-
import { UploadResult, buildCsvFormData, parseCreateUploadResult, readCsvFile, requireUploadFilePath, uploadResultView } from "./requests-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-xS1tWJAq.mjs";
|
|
6
|
+
import { UploadResult, buildCsvFormData, parseCreateUploadResult, readCsvFile, requireUploadFilePath, uploadResultView } from "./requests-DYrDe-D0.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/upload/csv.ts
|
|
9
9
|
const UPLOAD_CSV_PATH = "/api/upload/csv";
|