@metabase/cli 0.1.2 → 0.1.4
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 +427 -381
- package/dist/add-collection-CPL1njYZ.mjs +11 -0
- package/dist/{add-collection-DwxQDXzL.mjs → add-collection-CffaBB-Y.mjs} +5 -5
- package/dist/{api-key-BktzvPb7.mjs → api-key-9p1UPnXn.mjs} +1 -1
- package/dist/{archive-Cq4WKmJt.mjs → archive-BAcEXbT9.mjs} +7 -7
- package/dist/{archive-CLWtbvvH.mjs → archive-B_B3MQp0.mjs} +7 -7
- package/dist/{archive-kYoy5LK5.mjs → archive-GdGm7l2e.mjs} +6 -6
- package/dist/{archive-C1mF-9Kj.mjs → archive-uJrslh9r.mjs} +6 -6
- package/dist/auth-N4w5xtwW.mjs +19 -0
- package/dist/{body-rDrR-C1c.mjs → body-D6dHGjMT.mjs} +3 -3
- package/dist/{branches-CH2UcCpX.mjs → branches-Bpe40fEd.mjs} +7 -7
- package/dist/{cancel-CgLZcItQ.mjs → cancel-BWTY6oYI.mjs} +6 -6
- package/dist/{cancel-task-DcYrFsM6.mjs → cancel-task--BfiAXfS.mjs} +7 -7
- package/dist/card-4rZRb5bc.mjs +20 -0
- package/dist/{cards-C4NIaERo.mjs → cards-CVlFJxYh.mjs} +6 -6
- package/dist/cli.mjs +27 -26
- package/dist/collection-Cp_B02I4.mjs +19 -0
- package/dist/{create-Dh0p-c2Y.mjs → create-Bu-YhIDL.mjs} +9 -9
- package/dist/{create-BUCLNqiN.mjs → create-BykvNpSA.mjs} +12 -12
- package/dist/{create-CzfNOhOF.mjs → create-BzElku2l.mjs} +12 -12
- package/dist/{create-Cbh1cGj9.mjs → create-Cz3_Wxdt.mjs} +12 -12
- package/dist/{create-bqc_rmix.mjs → create-DP8RrLDi.mjs} +9 -9
- package/dist/{create-CB0Yp__0.mjs → create-DQVdMT2Y.mjs} +12 -12
- package/dist/{create-CNvd5T8h.mjs → create-DYoc9IXW.mjs} +10 -10
- package/dist/{create-branch-BJFH9Hda.mjs → create-branch-B49UQyCK.mjs} +7 -7
- package/dist/{create-QgN369N5.mjs → create-doyv3SxU.mjs} +13 -13
- package/dist/{create-DU0ZhnZu.mjs → create-izE3EKCt.mjs} +9 -9
- package/dist/{create-DvrVZ2hS.mjs → create-ov-De5dO.mjs} +11 -11
- package/dist/{credentials-DTP1xuKz.mjs → credentials-xKSoP6eh.mjs} +10 -9
- package/dist/{current-task-z_TiJ0kt.mjs → current-task-DweHmjlk.mjs} +7 -7
- package/dist/dashboard-BYBiA-IG.mjs +20 -0
- package/dist/{database-DQkUxTLd.mjs → database-BNlvldUL.mjs} +3 -3
- package/dist/db-CObVU22j.mjs +22 -0
- package/dist/{delete-CVYII8mq.mjs → delete-DIz9Tgz5.mjs} +8 -8
- package/dist/{delete-DeZQ1r9w.mjs → delete-DojHmKeM.mjs} +8 -8
- package/dist/{delete-runtime-BMzvfj_B.mjs → delete-runtime-BkAdygbs.mjs} +2 -2
- package/dist/{delete-table-ZiR9-ndv.mjs → delete-table-DjN8E3sd.mjs} +8 -8
- package/dist/{deprovision-BhD3J-Am.mjs → deprovision-_HDcBApz.mjs} +12 -12
- package/dist/{dirty-D9agt7Os.mjs → dirty-Co8V0SZ3.mjs} +7 -7
- package/dist/{docker-CHpV8PRz.mjs → docker-D9sC_37H.mjs} +6 -103
- package/dist/{eid-B5wawMmO.mjs → eid-Cr5r-t9B.mjs} +1 -1
- package/dist/{export-Bfk7JAlR.mjs → export-CVMFxoo1.mjs} +10 -10
- package/dist/field-CbljasCH.mjs +18 -0
- package/dist/{fields-7ByLsxLg.mjs → fields-Coha7vKv.mjs} +6 -6
- package/dist/{flag-pair-DtR1AiBQ.mjs → flag-pair-Fmcdkrfx.mjs} +1 -1
- package/dist/{get-DKy3DAJX.mjs → get-AOvWo48B.mjs} +6 -6
- package/dist/{get-cuHp9-6U.mjs → get-BOtKerj8.mjs} +6 -6
- package/dist/{get-D2m4jhwT.mjs → get-BSKoL8ek.mjs} +8 -8
- package/dist/{get-DUSR5i99.mjs → get-BVTz9B_H.mjs} +6 -6
- package/dist/{get-C3CcAJGg.mjs → get-Be6EFh94.mjs} +8 -8
- package/dist/{get-CQGeF-eP.mjs → get-Br6WayZv.mjs} +6 -6
- package/dist/{get-BE6Izpus.mjs → get-BxzCKVC6.mjs} +6 -6
- package/dist/{get-StkjKuh0.mjs → get-CJwzbVjc.mjs} +8 -8
- package/dist/{get-tISo-cmg.mjs → get-C_6K7MSW.mjs} +9 -9
- package/dist/{get-DikegGzi.mjs → get-DXv2FkA7.mjs} +6 -6
- package/dist/{get-bYc7eGYe.mjs → get-DZrV7v9d.mjs} +6 -6
- package/dist/{get-gOT_RarI.mjs → get-bNtA7vWe.mjs} +6 -6
- package/dist/{get-run-D59Yqaoh.mjs → get-run-CSrXHDGS.mjs} +6 -6
- package/dist/git-sync-BGkS8o5b.mjs +28 -0
- package/dist/{has-remote-changes-B1TciDVD.mjs → has-remote-changes-D6xgsuUr.mjs} +7 -7
- package/dist/{import-DnnmmJbp.mjs → import-Dv0ORSNw.mjs} +10 -10
- package/dist/{input-ikCiip6x.mjs → input-BQ-BZA8h.mjs} +1 -1
- package/dist/is-dirty-BOZ4xz92.mjs +10 -0
- package/dist/{is-dirty-DlfX7e39.mjs → is-dirty-WNi8a6O9.mjs} +4 -4
- package/dist/{items-DQFQSpjF.mjs → items-CTcAMknV.mjs} +10 -10
- package/dist/{key-NDEARu2L.mjs → key-CCJdVWKc.mjs} +1 -1
- package/dist/{license-DBh13sc8.mjs → license-DLLTpFvP.mjs} +3 -3
- package/dist/{list-BwjqQ6pp.mjs → list-8oVMvlLV.mjs} +5 -5
- package/dist/{list-Di529OJD.mjs → list-BNzdnE1c.mjs} +5 -5
- package/dist/{list-D067ZSE5.mjs → list-BxdXvGTK.mjs} +7 -7
- package/dist/{list-4kYCGv01.mjs → list-CbJeP0Z6.mjs} +6 -6
- package/dist/{list-9AOWhxqp.mjs → list-CocYwmnI.mjs} +8 -8
- package/dist/{list-Cy0VhXQs.mjs → list-DI7K3K6k.mjs} +5 -5
- package/dist/{list-iFVEdi2J.mjs → list-DSs0Q78i.mjs} +5 -5
- package/dist/{list-DJN-OvTZ.mjs → list-DhWG5jiW.mjs} +7 -7
- package/dist/{list-GFfR9SuT.mjs → list-DjhZU-FY.mjs} +5 -5
- package/dist/{list-DAZP-IM5.mjs → list-DvUjMQze.mjs} +5 -5
- package/dist/{list-DQj-QJAs.mjs → list-FXuSCYpa.mjs} +7 -7
- package/dist/{list-CP5RNjO6.mjs → list-NiwCL_1X.mjs} +6 -6
- package/dist/{list-DlKzgnqo.mjs → list-xQmtQPSl.mjs} +7 -7
- package/dist/{login-DxgkosGx.mjs → login-SXsSH0I1.mjs} +9 -9
- package/dist/{logout-BlVwqBog.mjs → logout-bgOXjxbN.mjs} +6 -6
- package/dist/{logs-CudNEkT4.mjs → logs-BnwVbFuD.mjs} +11 -10
- package/dist/{manifest-Dv5B9Blc.mjs → manifest-CGM7XNLC.mjs} +2 -2
- package/dist/measure-B54VtKym.mjs +19 -0
- package/dist/{metadata-BTJAFVvZ.mjs → metadata-B0WZT3Yb.mjs} +6 -6
- package/dist/{metadata-B2Td415K.mjs → metadata-Bu2HOmuX.mjs} +6 -6
- package/dist/{package-DV6Asqim.mjs → package-D-aVYFKM.mjs} +4 -2
- package/dist/{parse-id-B38zTlYs.mjs → parse-id-B3B-0hUA.mjs} +1 -1
- package/dist/{parse-ref-DGvh4aDn.mjs → parse-ref-D1yeDOn8.mjs} +1 -1
- package/dist/{parse-schemas-Ds-cVE-O.mjs → parse-schemas-DgtVLikM.mjs} +2 -2
- package/dist/{poll-Bh6oAifO.mjs → poll-BCnrcUVf.mjs} +2 -2
- package/dist/{poll-task-vPwV31Fs.mjs → poll-task-0b1V6G-8.mjs} +2 -2
- package/dist/{predicates-DiIiS3k7.mjs → predicates-CGO17Q15.mjs} +1 -1
- package/dist/{preflight-DxJb-hUV.mjs → preflight-5ACaYnDp.mjs} +3 -3
- package/dist/process-FjsqDwKo.mjs +105 -0
- package/dist/{prompt-Bf3DQ-qE.mjs → prompt-DgDNy_Pc.mjs} +1 -1
- package/dist/{provision-B-I0zuDe.mjs → provision-29Zt62Ft.mjs} +15 -15
- package/dist/{ps-CaiOFCv2.mjs → ps-BMFiRCi4.mjs} +4 -4
- package/dist/ps-C5FOLwL2.mjs +11 -0
- package/dist/{query-jmfqaXRP.mjs → query-DxA353Hy.mjs} +9 -9
- package/dist/{query-BtF1yWZZ.mjs → query-aba8MEe_.mjs} +13 -13
- package/dist/{remove-C2iv0g03.mjs → remove-B3ZEqBF7.mjs} +10 -9
- package/dist/{remove-xskleeru.mjs → remove-BfgU_CQi.mjs} +6 -6
- package/dist/{remove-collection-DhZghaZy.mjs → remove-collection-Brv72xUe.mjs} +9 -9
- package/dist/{render-DXv-D6fU.mjs → render-DuoDUTVL.mjs} +1 -1
- package/dist/{rescan-values-DW6u90ep.mjs → rescan-values-DIAdjoq7.mjs} +6 -6
- package/dist/{revision-message-flag-CWQbKhdl.mjs → revision-message-flag-oyq2xrDU.mjs} +1 -1
- package/dist/{run-DxVzhcF3.mjs → run-CgXRo0hD.mjs} +8 -8
- package/dist/{runs-BOHk1XnM.mjs → runs-DtLRw6xg.mjs} +8 -8
- package/dist/{runtime-cwBS8wwK.mjs → runtime-Br8L4NPm.mjs} +6 -6
- package/dist/{schema-tables-CcFbY_jN.mjs → schema-tables-DiKMY6lx.mjs} +6 -6
- package/dist/{schemas-DZmv_V62.mjs → schemas-Bvr8cOzo.mjs} +6 -6
- package/dist/{search-CYMuc7Fg.mjs → search-BT_TCcTd.mjs} +8 -8
- package/dist/segment-C2ui5dSd.mjs +19 -0
- package/dist/{set-CbGfQ7Ye.mjs → set-CAIkXlPy.mjs} +12 -12
- package/dist/{set-B_rrVwU4.mjs → set-DtG0KH6P.mjs} +9 -9
- package/dist/{setting-DqZY9NXP.mjs → setting-BDOi5fk_.mjs} +3 -3
- package/dist/{setup-DxmcAorA.mjs → setup-LjTvvlJy.mjs} +9 -9
- package/dist/snippet-BcgVYsoR.mjs +19 -0
- package/dist/{start-Cn0epTks.mjs → start-CXKt0Q7A.mjs} +18 -17
- package/dist/{stash-BFZIl9F4.mjs → stash-dRw1UEwg.mjs} +9 -9
- package/dist/{status-UALK3OJl.mjs → status-BEONmJWv.mjs} +5 -5
- package/dist/{status-FDIDmqvM.mjs → status-BWep0PFe.mjs} +5 -5
- package/dist/{status-BjCeJNLp.mjs → status-C2niMfrQ.mjs} +8 -8
- package/dist/{stop-DUwrDWw8.mjs → stop-BdedYfwU.mjs} +10 -9
- package/dist/{summary-CS4UGiFJ.mjs → summary-BPDA4K99.mjs} +6 -6
- package/dist/{sync-schema-IrHdJxmX.mjs → sync-schema-D95LLRpf.mjs} +6 -6
- package/dist/table-lCNGbvej.mjs +19 -0
- package/dist/transform-BGAm1s4f.mjs +24 -0
- package/dist/transform-job-cNTJ30pm.mjs +19 -0
- package/dist/{translate-B__zbDKm.mjs → translate-CG_Ka0dO.mjs} +10 -10
- package/dist/{tree-Mh0uQ_Wy.mjs → tree-DazZT7dR.mjs} +5 -5
- package/dist/{update-BfBsM_y1.mjs → update-659eQR1L.mjs} +14 -14
- package/dist/{update-B5_pp6Jj.mjs → update-9kVyE3BJ.mjs} +14 -14
- package/dist/{update-Masp5WeT.mjs → update-BBfvArCx.mjs} +10 -10
- package/dist/{update-Bw0WZix_.mjs → update-CJSDB6S8.mjs} +15 -15
- package/dist/{update-D2VI_5cy.mjs → update-DE6kjV-f.mjs} +13 -13
- package/dist/{update-1Di9hbPo.mjs → update-DSWZSfpw.mjs} +14 -14
- package/dist/{update-Cp1789qq.mjs → update-DTIWJxob.mjs} +10 -10
- package/dist/{update-B9DBMo30.mjs → update-WyRKlQPh.mjs} +11 -11
- package/dist/{update-j9vgemKR.mjs → update-bW-i6gjZ.mjs} +10 -10
- package/dist/{update-dashcard-CNiQw1MD.mjs → update-dashcard-BhD5x__K.mjs} +10 -10
- package/dist/{update-D8GwQTcL.mjs → update-djgvzO3K.mjs} +16 -16
- package/dist/upgrade-D58rvXHM.mjs +432 -0
- package/dist/{url-GFM76VIK.mjs → url-DKkSu2D8.mjs} +9 -8
- package/dist/{uuid-Uif0lNk8.mjs → uuid-BF20B59s.mjs} +7 -7
- package/dist/{validate-DCYx6jdL.mjs → validate-CB0bu50i.mjs} +3 -3
- package/dist/{validate-query-B07oGG4K.mjs → validate-query-CavIA0Q2.mjs} +3 -3
- package/dist/{values-DrwNHUAI.mjs → values-DyjmpcbT.mjs} +6 -6
- package/dist/{wait-DO7tS7NI.mjs → wait-CeUPCgdc.mjs} +2 -2
- package/dist/{wait-BoKk8CJy.mjs → wait-DhkTaV6E.mjs} +8 -8
- package/dist/{wait-flags-CjX2sEGm.mjs → wait-flags-BR-yqe7y.mjs} +2 -2
- package/dist/workspace-DtcBldk0.mjs +24 -0
- package/dist/{workspace-credentials-B6BL-X0d.mjs → workspace-credentials-Cctumbru.mjs} +1 -1
- package/package.json +4 -2
- package/dist/add-collection-SL08iMub.mjs +0 -11
- package/dist/auth-DfYkakP3.mjs +0 -19
- package/dist/card-ZCGU2JEh.mjs +0 -20
- package/dist/collection-D_uFLIAS.mjs +0 -19
- package/dist/dashboard-G1-dGLUR.mjs +0 -20
- package/dist/db-CBaEfumR.mjs +0 -22
- package/dist/field-BDJ1pEgr.mjs +0 -18
- package/dist/git-sync-BiTWfLgY.mjs +0 -28
- package/dist/is-dirty-DClGFOGV.mjs +0 -10
- package/dist/measure-C7SbdYQk.mjs +0 -19
- package/dist/ps-BmYQYC7t.mjs +0 -10
- package/dist/segment-Df4pfjco.mjs +0 -19
- package/dist/snippet-CwSHjQyn.mjs +0 -19
- package/dist/table-Cdr5bKp1.mjs +0 -19
- package/dist/transform-CeZusR_w.mjs +0 -24
- package/dist/transform-job-BOn9-CGa.mjs +0 -19
- package/dist/workspace-CyEX40D-.mjs +0 -24
- /package/dist/{workspace-DVuqKJGG.mjs → workspace-C5q4nbpY.mjs} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem, warn } from "./render-
|
|
4
|
-
import { ConfigError } from "./predicates-
|
|
5
|
-
import { readInput } from "./input-
|
|
6
|
-
import { defineMetabaseCommand, outputFlags, readEnvLicenseToken, writeLicense } from "./runtime-
|
|
7
|
-
import { promptPassword } from "./prompt-
|
|
3
|
+
import { renderItem, warn } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import { ConfigError } from "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { readInput } from "./input-BQ-BZA8h.mjs";
|
|
6
|
+
import { defineMetabaseCommand, outputFlags, readEnvLicenseToken, writeLicense } from "./runtime-Br8L4NPm.mjs";
|
|
7
|
+
import { promptPassword } from "./prompt-DgDNy_Pc.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/license/set.ts
|
|
@@ -31,9 +31,9 @@ var set_default = defineMetabaseCommand({
|
|
|
31
31
|
},
|
|
32
32
|
outputSchema: LicenseSetResult,
|
|
33
33
|
examples: [
|
|
34
|
-
"echo $METABASE_LICENSE_TOKEN |
|
|
35
|
-
"
|
|
36
|
-
"
|
|
34
|
+
"echo $METABASE_LICENSE_TOKEN | mb license set",
|
|
35
|
+
"mb license set < token.txt",
|
|
36
|
+
"mb license set $METABASE_LICENSE_TOKEN"
|
|
37
37
|
],
|
|
38
38
|
async run({ args, ctx }) {
|
|
39
39
|
const token = await resolveToken(args.token);
|
|
@@ -8,9 +8,9 @@ var setting_default = defineCommand({
|
|
|
8
8
|
alias: "settings"
|
|
9
9
|
},
|
|
10
10
|
subCommands: {
|
|
11
|
-
list: () => import("./list-
|
|
12
|
-
get: () => import("./get-
|
|
13
|
-
set: () => import("./set-
|
|
11
|
+
list: () => import("./list-8oVMvlLV.mjs").then((m) => m.default),
|
|
12
|
+
get: () => import("./get-BVTz9B_H.mjs").then((m) => m.default),
|
|
13
|
+
set: () => import("./set-CAIkXlPy.mjs").then((m) => m.default)
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import "./input-
|
|
6
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
7
|
-
import { readBody } from "./body-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import "./input-BQ-BZA8h.mjs";
|
|
6
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-Br8L4NPm.mjs";
|
|
7
|
+
import { readBody } from "./body-D6dHGjMT.mjs";
|
|
8
8
|
import { bodyInputFlags } from "./body-flags-BK7J6Daz.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
|
|
@@ -49,9 +49,9 @@ var setup_default = defineMetabaseCommand({
|
|
|
49
49
|
},
|
|
50
50
|
outputSchema: SetupResult,
|
|
51
51
|
examples: [
|
|
52
|
-
"cat setup.json |
|
|
53
|
-
"
|
|
54
|
-
"
|
|
52
|
+
"cat setup.json | mb setup",
|
|
53
|
+
"mb setup --file setup.json",
|
|
54
|
+
"mb setup --body '{\"token\":\"...\",\"user\":{\"email\":\"a@b.c\",\"password\":\"...\"}}'"
|
|
55
55
|
],
|
|
56
56
|
async run({ args, ctx, getClient }) {
|
|
57
57
|
const body = await readBody({
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/snippet/index.ts
|
|
4
|
+
var snippet_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "snippet",
|
|
7
|
+
description: "Inspect Metabase native query snippets"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-FXuSCYpa.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-BxzCKVC6.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-Bu-YhIDL.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-WyRKlQPh.mjs").then((mod) => mod.default),
|
|
14
|
+
archive: () => import("./archive-GdGm7l2e.mjs").then((mod) => mod.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { snippet_default as default };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem, warn } from "./render-
|
|
4
|
-
import { ConfigError, errorMessage } from "./predicates-
|
|
5
|
-
import { connectionFlags, createClient, defineMetabaseCommand, localUrl, outputFlags, parseInteger, parseOptionalInteger, profileFlag, resolveLicenseToken } from "./runtime-
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
7
|
-
import { pollUntil } from "./poll-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { renderItem, warn } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import { ConfigError, errorMessage } from "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, createClient, defineMetabaseCommand, localUrl, outputFlags, parseInteger, parseOptionalInteger, profileFlag, resolveLicenseToken } from "./runtime-Br8L4NPm.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-B3B-0hUA.mjs";
|
|
7
|
+
import { pollUntil } from "./poll-BCnrcUVf.mjs";
|
|
8
|
+
import { runProcess } from "./process-FjsqDwKo.mjs";
|
|
9
|
+
import { Workspace } from "./workspace-C5q4nbpY.mjs";
|
|
10
|
+
import { CONTAINER_REPO_DIR, checkDockerReady, containerLifecycleStatus, containerNameFor, pullImage, removeContainer, runWorkspaceContainer, scrubContainerConfig, waitForConfigConsumed } from "./docker-D9sC_37H.mjs";
|
|
11
|
+
import { REPO_SYNC_MODES, RepoSyncMode, buildCredentialsJson, generateWorkspaceCredentials, injectCredentialsIntoConfig, injectRepoSettingsIntoConfig } from "./workspace-credentials-Cctumbru.mjs";
|
|
11
12
|
import { z } from "zod";
|
|
12
13
|
import { stat } from "node:fs/promises";
|
|
13
14
|
import { resolve } from "node:path";
|
|
@@ -179,13 +180,13 @@ var start_default = defineMetabaseCommand({
|
|
|
179
180
|
},
|
|
180
181
|
outputSchema: StartResult,
|
|
181
182
|
examples: [
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
"
|
|
188
|
-
"
|
|
183
|
+
"mb workspace start 1",
|
|
184
|
+
"mb workspace start 1 --wait",
|
|
185
|
+
"mb workspace start 1 --port 3100",
|
|
186
|
+
"mb workspace start 1 --image metabase/metabase-dev:feature-workspaces-v2 --no-pull",
|
|
187
|
+
"mb workspace start 1 --force",
|
|
188
|
+
"mb workspace start 1 --repo /path/to/sync-repo --wait",
|
|
189
|
+
"mb workspace start 1 --repo /path/to/sync-repo --repo-branch dev --repo-mode read-only"
|
|
189
190
|
],
|
|
190
191
|
async run({ args, ctx, getClient, getResolvedConfig }) {
|
|
191
192
|
const workspaceId = parseId(args.id);
|
|
@@ -274,7 +275,7 @@ async function ensureNoExistingContainer(workspaceId, containerName, force) {
|
|
|
274
275
|
await removeContainer(containerName);
|
|
275
276
|
return;
|
|
276
277
|
}
|
|
277
|
-
throw new ConfigError(`container ${containerName} is currently ${status}. Run \`
|
|
278
|
+
throw new ConfigError(`container ${containerName} is currently ${status}. Run \`mb workspace stop ${workspaceId}\` first, or use --force to recreate it.`);
|
|
278
279
|
}
|
|
279
280
|
async function resolveHostPort(requested) {
|
|
280
281
|
if (requested !== null) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import { ConfigError } from "./predicates-
|
|
5
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
7
|
-
import { REMOTE_SYNC_PATHS, SyncTask, pollFlags, pollSyncTask, throwIfFailedTask } from "./poll-task-
|
|
8
|
-
import "./poll-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import { ConfigError } from "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-Br8L4NPm.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-B3B-0hUA.mjs";
|
|
7
|
+
import { REMOTE_SYNC_PATHS, SyncTask, pollFlags, pollSyncTask, throwIfFailedTask } from "./poll-task-0b1V6G-8.mjs";
|
|
8
|
+
import "./poll-BCnrcUVf.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/git-sync/stash.ts
|
|
@@ -37,7 +37,7 @@ const syncStashView = {
|
|
|
37
37
|
}
|
|
38
38
|
]
|
|
39
39
|
};
|
|
40
|
-
const DEFAULT_STASH_MESSAGE = "Stashed from
|
|
40
|
+
const DEFAULT_STASH_MESSAGE = "Stashed from mb CLI";
|
|
41
41
|
var stash_default = defineMetabaseCommand({
|
|
42
42
|
meta: {
|
|
43
43
|
name: "stash",
|
|
@@ -62,7 +62,7 @@ var stash_default = defineMetabaseCommand({
|
|
|
62
62
|
...pollFlags
|
|
63
63
|
},
|
|
64
64
|
outputSchema: SyncStashResult,
|
|
65
|
-
examples: ["
|
|
65
|
+
examples: ["mb git-sync stash --new-branch wip", "mb git-sync stash --new-branch wip -m \"work in progress\" --json"],
|
|
66
66
|
async run({ args, ctx, getClient }) {
|
|
67
67
|
const newBranch = args.newBranch.trim();
|
|
68
68
|
if (newBranch === "") throw new ConfigError("invalid new-branch: must not be blank");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { account, credentials, defineMetabaseCommand, outputFlags } from "./runtime-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { account, credentials, defineMetabaseCommand, outputFlags } from "./runtime-Br8L4NPm.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/license/status.ts
|
|
@@ -21,7 +21,7 @@ var status_default = defineMetabaseCommand({
|
|
|
21
21
|
},
|
|
22
22
|
args: { ...outputFlags },
|
|
23
23
|
outputSchema: LicenseStatus,
|
|
24
|
-
examples: ["
|
|
24
|
+
examples: ["mb license status", "mb license status --json"],
|
|
25
25
|
async run({ ctx }) {
|
|
26
26
|
const present = await credentials.has(account.license);
|
|
27
27
|
renderItem({ present }, licenseStatusView, ctx);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { account, credentials, defineMetabaseCommand, originOnly, outputFlags, profileFlag, resolveProfileName } from "./runtime-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { account, credentials, defineMetabaseCommand, originOnly, outputFlags, profileFlag, resolveProfileName } from "./runtime-Br8L4NPm.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/auth/status.ts
|
|
@@ -38,7 +38,7 @@ var status_default = defineMetabaseCommand({
|
|
|
38
38
|
...profileFlag
|
|
39
39
|
},
|
|
40
40
|
outputSchema: AuthStatus,
|
|
41
|
-
examples: ["
|
|
41
|
+
examples: ["mb auth status --json", "mb auth status --profile staging"],
|
|
42
42
|
async run({ args, ctx }) {
|
|
43
43
|
const profileName = resolveProfileName(args.profile);
|
|
44
44
|
const [url, apiKey] = await Promise.all([credentials.read(account.profileUrl(profileName)), credentials.read(account.profileApiKey(profileName))]);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
6
|
-
import { REMOTE_SYNC_PATHS, SyncTask, fetchCurrentTask, fetchOptionalParsed } from "./poll-task-
|
|
7
|
-
import "./poll-
|
|
8
|
-
import { IsDirtyResult } from "./is-dirty-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-Br8L4NPm.mjs";
|
|
6
|
+
import { REMOTE_SYNC_PATHS, SyncTask, fetchCurrentTask, fetchOptionalParsed } from "./poll-task-0b1V6G-8.mjs";
|
|
7
|
+
import "./poll-BCnrcUVf.mjs";
|
|
8
|
+
import { IsDirtyResult } from "./is-dirty-WNi8a6O9.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/git-sync/status.ts
|
|
@@ -43,7 +43,7 @@ var status_default = defineMetabaseCommand({
|
|
|
43
43
|
...connectionFlags
|
|
44
44
|
},
|
|
45
45
|
outputSchema: SyncStatus,
|
|
46
|
-
examples: ["
|
|
46
|
+
examples: ["mb git-sync status", "mb git-sync status --json"],
|
|
47
47
|
async run({ ctx, getClient }) {
|
|
48
48
|
const client = await getClient();
|
|
49
49
|
const [branch, isDirty, currentTask] = await Promise.all([
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { defineMetabaseCommand, outputFlags } from "./runtime-
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
7
|
-
import "./poll-
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { defineMetabaseCommand, outputFlags } from "./runtime-Br8L4NPm.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-B3B-0hUA.mjs";
|
|
7
|
+
import "./poll-BCnrcUVf.mjs";
|
|
8
|
+
import "./process-FjsqDwKo.mjs";
|
|
9
|
+
import { checkDockerReady, containerLifecycleStatus, containerNameFor, stopContainer } from "./docker-D9sC_37H.mjs";
|
|
10
|
+
import { LocalWorkspaceState } from "./ps-BMFiRCi4.mjs";
|
|
10
11
|
import { z } from "zod";
|
|
11
12
|
|
|
12
13
|
//#region src/commands/workspace/stop.ts
|
|
@@ -55,7 +56,7 @@ var stop_default = defineMetabaseCommand({
|
|
|
55
56
|
}
|
|
56
57
|
},
|
|
57
58
|
outputSchema: StopResult,
|
|
58
|
-
examples: ["
|
|
59
|
+
examples: ["mb workspace stop 1", "mb workspace stop 1 --json"],
|
|
59
60
|
async run({ args, ctx }) {
|
|
60
61
|
const workspaceId = parseId(args.id);
|
|
61
62
|
const containerName = containerNameFor(workspaceId);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-Br8L4NPm.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-B3B-0hUA.mjs";
|
|
7
7
|
import { FieldSummary, FieldSummaryRaw, fieldSummaryView } from "./field-B3gvaqpK.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/field/summary.ts
|
|
@@ -23,7 +23,7 @@ var summary_default = defineMetabaseCommand({
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
outputSchema: FieldSummary,
|
|
26
|
-
examples: ["
|
|
26
|
+
examples: ["mb field summary 100", "mb field summary 100 --json"],
|
|
27
27
|
async run({ args, ctx, getClient }) {
|
|
28
28
|
const id = parseId(args.id);
|
|
29
29
|
const client = await getClient();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-Br8L4NPm.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-B3B-0hUA.mjs";
|
|
7
7
|
import "./field-B3gvaqpK.mjs";
|
|
8
8
|
import "./table-B-PYcgGb.mjs";
|
|
9
9
|
import { DatabaseSyncResult, databaseSyncResultView } from "./database-vvig8k4x.mjs";
|
|
@@ -27,7 +27,7 @@ var sync_schema_default = defineMetabaseCommand({
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
outputSchema: DatabaseSyncResult,
|
|
30
|
-
examples: ["
|
|
30
|
+
examples: ["mb db sync-schema 1", "mb db sync-schema 1 --json"],
|
|
31
31
|
async run({ args, ctx, getClient }) {
|
|
32
32
|
const id = parseId(args.id);
|
|
33
33
|
const client = await getClient();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/table/index.ts
|
|
4
|
+
var table_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "table",
|
|
7
|
+
description: "Inspect Metabase tables"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-NiwCL_1X.mjs").then((m) => m.default),
|
|
11
|
+
get: () => import("./get-BSKoL8ek.mjs").then((m) => m.default),
|
|
12
|
+
metadata: () => import("./metadata-B0WZT3Yb.mjs").then((m) => m.default),
|
|
13
|
+
fields: () => import("./fields-Coha7vKv.mjs").then((m) => m.default),
|
|
14
|
+
update: () => import("./update-DTIWJxob.mjs").then((m) => m.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { table_default as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/transform/index.ts
|
|
4
|
+
var transform_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "transform",
|
|
7
|
+
description: "Manage Metabase transforms"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-DSs0Q78i.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-bNtA7vWe.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-BykvNpSA.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-9kVyE3BJ.mjs").then((mod) => mod.default),
|
|
14
|
+
delete: () => import("./delete-DIz9Tgz5.mjs").then((mod) => mod.default),
|
|
15
|
+
"delete-table": () => import("./delete-table-DjN8E3sd.mjs").then((mod) => mod.default),
|
|
16
|
+
run: () => import("./run-CgXRo0hD.mjs").then((mod) => mod.default),
|
|
17
|
+
cancel: () => import("./cancel-BWTY6oYI.mjs").then((mod) => mod.default),
|
|
18
|
+
"get-run": () => import("./get-run-CSrXHDGS.mjs").then((mod) => mod.default),
|
|
19
|
+
runs: () => import("./runs-DtLRw6xg.mjs").then((mod) => mod.default)
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { transform_default as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/transform-job/index.ts
|
|
4
|
+
var transform_job_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "transform-job",
|
|
7
|
+
description: "Manage Metabase transform jobs"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-DI7K3K6k.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-AOvWo48B.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-DP8RrLDi.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-BBfvArCx.mjs").then((mod) => mod.default),
|
|
14
|
+
delete: () => import("./delete-DojHmKeM.mjs").then((mod) => mod.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { transform_job_default as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import { ConfigError } from "./predicates-
|
|
5
|
-
import "./input-
|
|
6
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, parseCsv, profileFlag } from "./runtime-
|
|
7
|
-
import { readBody } from "./body-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import { ConfigError } from "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import "./input-BQ-BZA8h.mjs";
|
|
6
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, parseCsv, profileFlag } from "./runtime-Br8L4NPm.mjs";
|
|
7
|
+
import { readBody } from "./body-D6dHGjMT.mjs";
|
|
8
8
|
import { bodyInputFlags } from "./body-flags-BK7J6Daz.mjs";
|
|
9
|
-
import { requireBothOrNeither } from "./flag-pair-
|
|
9
|
+
import { requireBothOrNeither } from "./flag-pair-Fmcdkrfx.mjs";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
|
|
12
12
|
//#region src/domain/eid-translation.ts
|
|
@@ -72,9 +72,9 @@ var translate_default = defineMetabaseCommand({
|
|
|
72
72
|
},
|
|
73
73
|
outputSchema: EidTranslateResult,
|
|
74
74
|
examples: [
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
75
|
+
"mb eid translate --model card --eids abc123XYZ,def456ABC",
|
|
76
|
+
"mb eid translate --file translate.json",
|
|
77
|
+
"mb eid translate --body '{\"entity_ids\":{\"card\":[\"abc123XYZ\"]}}'"
|
|
78
78
|
],
|
|
79
79
|
async run({ args, ctx, getClient }) {
|
|
80
80
|
const pair = requireBothOrNeither({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { writeJson } from "./render-
|
|
4
|
-
import { ConfigError } from "./predicates-
|
|
5
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
3
|
+
import { writeJson } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import { ConfigError } from "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-Br8L4NPm.mjs";
|
|
6
6
|
import { CollectionTreeNode } from "./collection-B3sPXRLs.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ var tree_default = defineMetabaseCommand({
|
|
|
19
19
|
...connectionFlags
|
|
20
20
|
},
|
|
21
21
|
outputSchema: CollectionTreeResponse,
|
|
22
|
-
examples: ["
|
|
22
|
+
examples: ["mb collection tree", "mb collection tree --json"],
|
|
23
23
|
async run({ ctx, getClient }) {
|
|
24
24
|
if (ctx.format === "text") throw new ConfigError("collection tree output is JSON-only; --format text is not supported");
|
|
25
25
|
const client = await getClient();
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import "./input-
|
|
6
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
7
|
-
import { readBody } from "./body-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import "./input-BQ-BZA8h.mjs";
|
|
6
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-Br8L4NPm.mjs";
|
|
7
|
+
import { readBody } from "./body-D6dHGjMT.mjs";
|
|
8
8
|
import { bodyInputFlags } from "./body-flags-BK7J6Daz.mjs";
|
|
9
|
-
import { parseId } from "./parse-id-
|
|
10
|
-
import "./validate-
|
|
11
|
-
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-
|
|
9
|
+
import { parseId } from "./parse-id-B3B-0hUA.mjs";
|
|
10
|
+
import "./validate-CB0bu50i.mjs";
|
|
11
|
+
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-CavIA0Q2.mjs";
|
|
12
12
|
import { Segment, SegmentUpdateInput, segmentView } from "./segment-BMrUBz94.mjs";
|
|
13
13
|
|
|
14
14
|
//#region src/commands/segment/update.ts
|
|
15
15
|
var update_default = defineMetabaseCommand({
|
|
16
16
|
meta: {
|
|
17
17
|
name: "update",
|
|
18
|
-
description: "Update a segment by id; body must include revision_message (audit-logged with the change). If definition is MBQL 5 (lib/type: mbql/query) it is pre-flight-validated against the same schema as `
|
|
18
|
+
description: "Update a segment by id; body must include revision_message (audit-logged with the change). If definition is MBQL 5 (lib/type: mbql/query) it is pre-flight-validated against the same schema as `mb query` (see `mb query --print-schema`)"
|
|
19
19
|
},
|
|
20
20
|
args: {
|
|
21
21
|
...outputFlags,
|
|
@@ -31,10 +31,10 @@ var update_default = defineMetabaseCommand({
|
|
|
31
31
|
},
|
|
32
32
|
outputSchema: Segment,
|
|
33
33
|
examples: [
|
|
34
|
-
"cat patch.json |
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
34
|
+
"cat patch.json | mb segment update 1",
|
|
35
|
+
"mb segment update 1 --file patch.json",
|
|
36
|
+
"mb segment update 1 --body '{\"name\":\"renamed\",\"revision_message\":\"rename\"}'",
|
|
37
|
+
"mb segment update 1 --file patch.json --skip-validate"
|
|
38
38
|
],
|
|
39
39
|
async run({ args, ctx, getClient }) {
|
|
40
40
|
const id = parseId(args.id);
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import "./input-
|
|
6
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
7
|
-
import { readBody } from "./body-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import "./input-BQ-BZA8h.mjs";
|
|
6
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-Br8L4NPm.mjs";
|
|
7
|
+
import { readBody } from "./body-D6dHGjMT.mjs";
|
|
8
8
|
import { bodyInputFlags } from "./body-flags-BK7J6Daz.mjs";
|
|
9
|
-
import { parseId } from "./parse-id-
|
|
10
|
-
import "./validate-
|
|
11
|
-
import { TRANSFORM_SOURCE_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-
|
|
9
|
+
import { parseId } from "./parse-id-B3B-0hUA.mjs";
|
|
10
|
+
import "./validate-CB0bu50i.mjs";
|
|
11
|
+
import { TRANSFORM_SOURCE_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-CavIA0Q2.mjs";
|
|
12
12
|
import { Transform, TransformUpdateInput, transformView } from "./transform-IEX4Mx3X.mjs";
|
|
13
13
|
|
|
14
14
|
//#region src/commands/transform/update.ts
|
|
15
15
|
var update_default = defineMetabaseCommand({
|
|
16
16
|
meta: {
|
|
17
17
|
name: "update",
|
|
18
|
-
description: "Update a transform by id; if source is provided with type `query` and source.query is MBQL 5 (lib/type: mbql/query) it is pre-flight-validated against the same schema as `
|
|
18
|
+
description: "Update a transform by id; if source is provided with type `query` and source.query is MBQL 5 (lib/type: mbql/query) it is pre-flight-validated against the same schema as `mb query` (see `mb query --print-schema`)"
|
|
19
19
|
},
|
|
20
20
|
args: {
|
|
21
21
|
...outputFlags,
|
|
@@ -31,10 +31,10 @@ var update_default = defineMetabaseCommand({
|
|
|
31
31
|
},
|
|
32
32
|
outputSchema: Transform,
|
|
33
33
|
examples: [
|
|
34
|
-
"cat patch.json |
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
34
|
+
"cat patch.json | mb transform update 1",
|
|
35
|
+
"mb transform update 1 --file patch.json",
|
|
36
|
+
"mb transform update 1 --body '{\"name\":\"renamed\"}'",
|
|
37
|
+
"mb transform update 1 --file patch.json --skip-validate"
|
|
38
38
|
],
|
|
39
39
|
async run({ args, ctx, getClient }) {
|
|
40
40
|
const id = parseId(args.id);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-D-aVYFKM.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import "./input-
|
|
6
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
7
|
-
import { readBody } from "./body-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import "./input-BQ-BZA8h.mjs";
|
|
6
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-Br8L4NPm.mjs";
|
|
7
|
+
import { readBody } from "./body-D6dHGjMT.mjs";
|
|
8
8
|
import { bodyInputFlags } from "./body-flags-BK7J6Daz.mjs";
|
|
9
|
-
import { parseId } from "./parse-id-
|
|
9
|
+
import { parseId } from "./parse-id-B3B-0hUA.mjs";
|
|
10
10
|
import { TransformJob, TransformJobUpdateInput, transformJobView } from "./transform-job-Csr86muI.mjs";
|
|
11
11
|
|
|
12
12
|
//#region src/commands/transform-job/update.ts
|
|
@@ -28,9 +28,9 @@ var update_default = defineMetabaseCommand({
|
|
|
28
28
|
},
|
|
29
29
|
outputSchema: TransformJob,
|
|
30
30
|
examples: [
|
|
31
|
-
"cat patch.json |
|
|
32
|
-
"
|
|
33
|
-
"
|
|
31
|
+
"cat patch.json | mb transform-job update 1",
|
|
32
|
+
"mb transform-job update 1 --file patch.json",
|
|
33
|
+
"mb transform-job update 1 --body '{\"schedule\":\"0 0 6 * * ?\"}'"
|
|
34
34
|
],
|
|
35
35
|
async run({ args, ctx, getClient }) {
|
|
36
36
|
const id = parseId(args.id);
|