@metabase/cli 0.1.2 → 0.1.4-alpha.skill-packaging.1c8ec40
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/.claude-plugin/marketplace.json +19 -0
- package/README.md +467 -388
- package/dist/add-collection-B3NhkLRT.mjs +11 -0
- package/dist/{add-collection-DwxQDXzL.mjs → add-collection-CEvZTea_.mjs} +5 -5
- package/dist/{api-key-BktzvPb7.mjs → api-key-BpmnzLLb.mjs} +1 -1
- package/dist/{archive-CLWtbvvH.mjs → archive-BPLLOdfL.mjs} +7 -7
- package/dist/{archive-C1mF-9Kj.mjs → archive-CazAWIrV.mjs} +6 -6
- package/dist/{archive-kYoy5LK5.mjs → archive-D596Cq7R.mjs} +7 -7
- package/dist/{archive-Cq4WKmJt.mjs → archive-DqPqXMZm.mjs} +7 -7
- package/dist/auth-DJp4QoWI.mjs +19 -0
- package/dist/{body-rDrR-C1c.mjs → body-CVSMGqZk.mjs} +3 -3
- package/dist/{branches-CH2UcCpX.mjs → branches--TavvEK1.mjs} +7 -7
- package/dist/{cancel-CgLZcItQ.mjs → cancel-BUitag4_.mjs} +6 -6
- package/dist/{cancel-task-DcYrFsM6.mjs → cancel-task-BHcWJUMu.mjs} +7 -7
- package/dist/card-DtUIadDM.mjs +20 -0
- package/dist/{cards-C4NIaERo.mjs → cards-Bir6wRS_.mjs} +6 -6
- package/dist/cli.mjs +31 -27
- package/dist/collection-4-gZeCWg.mjs +19 -0
- package/dist/{create-CNvd5T8h.mjs → create-4OjxTGAe.mjs} +10 -10
- package/dist/{create-bqc_rmix.mjs → create-BISpvrml.mjs} +10 -10
- package/dist/{create-BUCLNqiN.mjs → create-Bi8sqzL-.mjs} +13 -13
- package/dist/{create-Cbh1cGj9.mjs → create-C1cdoSw5.mjs} +12 -12
- package/dist/{create-Dh0p-c2Y.mjs → create-C3TiMJhQ.mjs} +10 -10
- package/dist/{create-QgN369N5.mjs → create-CZZc1KM8.mjs} +13 -13
- package/dist/{create-DU0ZhnZu.mjs → create-CxMpPsRO.mjs} +9 -9
- package/dist/{create-CB0Yp__0.mjs → create-Dj-fO-nV.mjs} +12 -12
- package/dist/{create-DvrVZ2hS.mjs → create-DuyWlx-S.mjs} +11 -11
- package/dist/{create-branch-BJFH9Hda.mjs → create-branch-CH1FmnxS.mjs} +7 -7
- package/dist/{create-CzfNOhOF.mjs → create-hYdLOyw_.mjs} +12 -12
- package/dist/{credentials-DTP1xuKz.mjs → credentials-BARfQeBr.mjs} +11 -9
- package/dist/{current-task-z_TiJ0kt.mjs → current-task-TX7rJmon.mjs} +7 -7
- package/dist/dashboard-C-azCGk-.mjs +20 -0
- package/dist/{database-DQkUxTLd.mjs → database-BKfGtTmB.mjs} +3 -3
- package/dist/db-D--IArxI.mjs +22 -0
- package/dist/{delete-DeZQ1r9w.mjs → delete-BxUaF8kW.mjs} +8 -8
- package/dist/{delete-CVYII8mq.mjs → delete-DzTd5w_y.mjs} +8 -8
- package/dist/{delete-runtime-BMzvfj_B.mjs → delete-runtime-DfFMWJJ6.mjs} +2 -2
- package/dist/{delete-table-ZiR9-ndv.mjs → delete-table-DWfA7uVn.mjs} +8 -8
- package/dist/{deprovision-BhD3J-Am.mjs → deprovision-CadXjs_7.mjs} +12 -12
- package/dist/{dirty-D9agt7Os.mjs → dirty-an-DQtBG.mjs} +7 -7
- package/dist/{docker-CHpV8PRz.mjs → docker-C9WQCjkt.mjs} +6 -103
- package/dist/{eid-B5wawMmO.mjs → eid-Cz9r5RX5.mjs} +1 -1
- package/dist/{export-Bfk7JAlR.mjs → export-BHq8ztFL.mjs} +10 -10
- package/dist/field-Do1HcUfq.mjs +18 -0
- package/dist/{fields-7ByLsxLg.mjs → fields-B21DeL2I.mjs} +6 -6
- package/dist/{flag-pair-DtR1AiBQ.mjs → flag-pair-Fmcdkrfx.mjs} +1 -1
- package/dist/{get-DikegGzi.mjs → get-BAqeeIQ-.mjs} +6 -6
- package/dist/{get-tISo-cmg.mjs → get-BHCgwPPT.mjs} +9 -9
- package/dist/{get-CQGeF-eP.mjs → get-BPah4iYM.mjs} +6 -6
- package/dist/{get-DKy3DAJX.mjs → get-C4_7ZrIS.mjs} +7 -7
- package/dist/{get-cuHp9-6U.mjs → get-CAYnc9sd.mjs} +6 -6
- package/dist/{get-BE6Izpus.mjs → get-ChEFd1sT.mjs} +7 -7
- package/dist/{get-gOT_RarI.mjs → get-ChxcxY2D.mjs} +7 -7
- package/dist/{get-DUSR5i99.mjs → get-Cy9YIesM.mjs} +6 -6
- package/dist/{get-bYc7eGYe.mjs → get-D-zU7VmK.mjs} +6 -6
- package/dist/{get-D2m4jhwT.mjs → get-DFm7pR7F.mjs} +8 -8
- package/dist/get-DWttywn_.mjs +79 -0
- package/dist/{get-StkjKuh0.mjs → get-RPL4h0It.mjs} +8 -8
- package/dist/{get-C3CcAJGg.mjs → get-dqrzLuwA.mjs} +8 -8
- package/dist/{get-run-D59Yqaoh.mjs → get-run-CG3QFs9T.mjs} +7 -7
- package/dist/git-sync-COKsdLkS.mjs +28 -0
- package/dist/{has-remote-changes-B1TciDVD.mjs → has-remote-changes-ecra9BFO.mjs} +7 -7
- package/dist/{import-DnnmmJbp.mjs → import-BzOKkYnp.mjs} +10 -10
- package/dist/{input-ikCiip6x.mjs → input-BQ-BZA8h.mjs} +1 -1
- package/dist/{is-dirty-DlfX7e39.mjs → is-dirty-7afLBOtn.mjs} +4 -4
- package/dist/is-dirty-Dnw0AHFw.mjs +10 -0
- package/dist/{items-DQFQSpjF.mjs → items-BEWSuEfe.mjs} +10 -10
- package/dist/{key-NDEARu2L.mjs → key-CCJdVWKc.mjs} +1 -1
- package/dist/{license-DBh13sc8.mjs → license-D3mFdxAq.mjs} +3 -3
- package/dist/{list-DQj-QJAs.mjs → list-B5E7LFDb.mjs} +8 -8
- package/dist/{list-BwjqQ6pp.mjs → list-B9mEqMZ5.mjs} +5 -5
- package/dist/{list-D067ZSE5.mjs → list-BJAC356Q.mjs} +7 -7
- package/dist/{list-Di529OJD.mjs → list-BOQWvb8b.mjs} +5 -5
- package/dist/{list-Cy0VhXQs.mjs → list-BZFTuiBr.mjs} +6 -6
- package/dist/{list-DJN-OvTZ.mjs → list-By3t67Y8.mjs} +7 -7
- package/dist/{list-GFfR9SuT.mjs → list-ByPzCM2G.mjs} +5 -5
- package/dist/{list-9AOWhxqp.mjs → list-C8b-KxY6.mjs} +8 -8
- package/dist/{list-iFVEdi2J.mjs → list-CiHlWufc.mjs} +6 -6
- package/dist/{list-DlKzgnqo.mjs → list-D_exD3LP.mjs} +7 -7
- package/dist/{list-4kYCGv01.mjs → list-DiAyv9l3.mjs} +6 -6
- package/dist/{list-CP5RNjO6.mjs → list-DtSOfMZ2.mjs} +6 -6
- package/dist/list-DwF6on6O.mjs +44 -0
- package/dist/{list-DAZP-IM5.mjs → list-nIxzXqr-.mjs} +5 -5
- package/dist/{login-DxgkosGx.mjs → login-Cka2HZWz.mjs} +9 -9
- package/dist/{logout-BlVwqBog.mjs → logout-rA25M-oa.mjs} +6 -6
- package/dist/{logs-CudNEkT4.mjs → logs-B5cGXoDi.mjs} +11 -10
- package/dist/{manifest-Dv5B9Blc.mjs → manifest-CGM7XNLC.mjs} +2 -2
- package/dist/measure-CwJ2o89T.mjs +19 -0
- package/dist/{metadata-BTJAFVvZ.mjs → metadata-BEd6s_Qf.mjs} +6 -6
- package/dist/{metadata-B2Td415K.mjs → metadata-DirWO0cS.mjs} +6 -6
- package/dist/{package-DV6Asqim.mjs → package-VV3qWWIQ.mjs} +10 -3
- package/dist/{parse-id-B38zTlYs.mjs → parse-id-DbSjfzoU.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-BXTlpoaf.mjs} +2 -2
- package/dist/path-DarsuSkB.mjs +58 -0
- package/dist/{poll-Bh6oAifO.mjs → poll-Cd8bRMmZ.mjs} +2 -2
- package/dist/{poll-task-vPwV31Fs.mjs → poll-task-BwKuhZ9P.mjs} +2 -2
- package/dist/{predicates-DiIiS3k7.mjs → predicates-CGO17Q15.mjs} +1 -1
- package/dist/{preflight-DxJb-hUV.mjs → preflight-RkDLqtNm.mjs} +3 -3
- package/dist/process-zJeVJZTM.mjs +105 -0
- package/dist/{prompt-Bf3DQ-qE.mjs → prompt-DgDNy_Pc.mjs} +1 -1
- package/dist/{provision-B-I0zuDe.mjs → provision-DBqPA-De.mjs} +15 -15
- package/dist/{ps-CaiOFCv2.mjs → ps-Cn3lzak-.mjs} +4 -4
- package/dist/ps-DIm7IScc.mjs +11 -0
- package/dist/{query-BtF1yWZZ.mjs → query-BoOismbH.mjs} +13 -13
- package/dist/{query-jmfqaXRP.mjs → query-CkNa5Nam.mjs} +9 -9
- package/dist/{remove-xskleeru.mjs → remove-B7NUBOqF.mjs} +6 -6
- package/dist/{remove-C2iv0g03.mjs → remove-C08c3vne.mjs} +10 -9
- package/dist/{remove-collection-DhZghaZy.mjs → remove-collection-cFO9M-qV.mjs} +9 -9
- package/dist/{render-DXv-D6fU.mjs → render-DuoDUTVL.mjs} +1 -1
- package/dist/{rescan-values-DW6u90ep.mjs → rescan-values-D1-IyyU7.mjs} +6 -6
- package/dist/{revision-message-flag-CWQbKhdl.mjs → revision-message-flag-oyq2xrDU.mjs} +1 -1
- package/dist/{run-DxVzhcF3.mjs → run-BCzKf_TV.mjs} +9 -9
- package/dist/{runs-BOHk1XnM.mjs → runs-pVgTv7cK.mjs} +9 -9
- package/dist/{runtime-cwBS8wwK.mjs → runtime-DPdP0sl1.mjs} +6 -6
- package/dist/{schema-tables-CcFbY_jN.mjs → schema-tables-c6K9AkS-.mjs} +6 -6
- package/dist/{schemas-DZmv_V62.mjs → schemas-s3PRMTwc.mjs} +6 -6
- package/dist/{search-CYMuc7Fg.mjs → search-DsF08cm9.mjs} +8 -8
- package/dist/segment-CvPF5gLG.mjs +19 -0
- package/dist/{set-CbGfQ7Ye.mjs → set-BNQjt8S1.mjs} +12 -12
- package/dist/{set-B_rrVwU4.mjs → set-DlfevPxG.mjs} +9 -9
- package/dist/{setting-DqZY9NXP.mjs → setting-Cc5FWSNN.mjs} +3 -3
- package/dist/{setup-DxmcAorA.mjs → setup-CIsvZgEA.mjs} +9 -9
- package/dist/skills-CHU7uuDU.mjs +191 -0
- package/dist/skills-Dws-azxD.mjs +18 -0
- package/dist/snippet-W-TaXdio.mjs +19 -0
- package/dist/{start-Cn0epTks.mjs → start-xREv6hev.mjs} +19 -17
- package/dist/{stash-BFZIl9F4.mjs → stash-ZLbOejYk.mjs} +9 -9
- package/dist/{status-UALK3OJl.mjs → status-CYWbB67d.mjs} +5 -5
- package/dist/{status-FDIDmqvM.mjs → status-DiXaGNmb.mjs} +5 -5
- package/dist/{status-BjCeJNLp.mjs → status-DjRAgzXl.mjs} +8 -8
- package/dist/{stop-DUwrDWw8.mjs → stop-CWKn_jI8.mjs} +10 -9
- package/dist/{summary-CS4UGiFJ.mjs → summary-CIFwiame.mjs} +6 -6
- package/dist/{sync-schema-IrHdJxmX.mjs → sync-schema-_SRMfBSQ.mjs} +6 -6
- package/dist/table-uhBlfNYj.mjs +19 -0
- package/dist/transform-UJ7T_BSb.mjs +24 -0
- package/dist/transform-job-DXs5apQ1.mjs +19 -0
- package/dist/{translate-B__zbDKm.mjs → translate-DVN_sIVb.mjs} +10 -10
- package/dist/{tree-Mh0uQ_Wy.mjs → tree-BTZfgldu.mjs} +5 -5
- package/dist/{update-D2VI_5cy.mjs → update-Bjd7YRyh.mjs} +13 -13
- package/dist/{update-Bw0WZix_.mjs → update-CCFegz4q.mjs} +15 -15
- package/dist/{update-BfBsM_y1.mjs → update-CDdML0mE.mjs} +14 -14
- package/dist/{update-B9DBMo30.mjs → update-CGYM_wWQ.mjs} +12 -12
- package/dist/{update-Cp1789qq.mjs → update-CYMsVUQX.mjs} +10 -10
- package/dist/{update-j9vgemKR.mjs → update-D48EYMKn.mjs} +10 -10
- package/dist/{update-1Di9hbPo.mjs → update-D6jptFDw.mjs} +14 -14
- package/dist/{update-B5_pp6Jj.mjs → update-DSjj9UQb.mjs} +15 -15
- package/dist/{update-Masp5WeT.mjs → update-DjfNbEgo.mjs} +11 -11
- package/dist/{update-D8GwQTcL.mjs → update-ZRF-sYqN.mjs} +16 -16
- package/dist/{update-dashcard-CNiQw1MD.mjs → update-dashcard-BfcB6pFx.mjs} +10 -10
- package/dist/upgrade-Cw_mP31_.mjs +432 -0
- package/dist/{url-GFM76VIK.mjs → url-DsDSVEnK.mjs} +9 -8
- package/dist/{uuid-Uif0lNk8.mjs → uuid-DbtHyH33.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-C1JRC3O2.mjs} +6 -6
- package/dist/{wait-DO7tS7NI.mjs → wait-Ed4Q7ccW.mjs} +2 -2
- package/dist/{wait-BoKk8CJy.mjs → wait-LRmiGepb.mjs} +8 -8
- package/dist/{wait-flags-CjX2sEGm.mjs → wait-flags-pItBfuzi.mjs} +2 -2
- package/dist/workspace-BozpZKez.mjs +24 -0
- package/dist/{workspace-credentials-B6BL-X0d.mjs → workspace-credentials-4lIxxz4g.mjs} +2 -41
- package/dist/yaml-ECiog374.mjs +43 -0
- package/package.json +8 -3
- package/skill-data/core/SKILL.md +575 -0
- package/skill-data/git-sync/SKILL.md +196 -0
- package/skill-data/transform/SKILL.md +235 -0
- package/skill-data/workspace/SKILL.md +408 -0
- package/skills/metabase-cli/SKILL.md +42 -0
- 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/{snippet-Dw0Sjzkr.mjs → snippet-CSWqkslB.mjs} +0 -0
- /package/dist/{transform-IEX4Mx3X.mjs → transform-DR4ejuPM.mjs} +0 -0
- /package/dist/{transform-job-Csr86muI.mjs → transform-job-BrhOLO4M.mjs} +0 -0
- /package/dist/{workspace-DVuqKJGG.mjs → workspace-DUfqhPm5.mjs} +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.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-DPdP0sl1.mjs";
|
|
7
|
+
import { readBody } from "./body-CVSMGqZk.mjs";
|
|
8
8
|
import { bodyInputFlags } from "./body-flags-BK7J6Daz.mjs";
|
|
9
9
|
import "./field-B3gvaqpK.mjs";
|
|
10
10
|
import { Card, CardCreateInput, cardView } from "./card-CQxvHeyP.mjs";
|
|
11
|
-
import "./validate-
|
|
12
|
-
import { CARD_DATASET_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-
|
|
11
|
+
import "./validate-CB0bu50i.mjs";
|
|
12
|
+
import { CARD_DATASET_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-CavIA0Q2.mjs";
|
|
13
13
|
|
|
14
14
|
//#region src/commands/card/create.ts
|
|
15
15
|
var create_default = defineMetabaseCommand({
|
|
16
16
|
meta: {
|
|
17
17
|
name: "create",
|
|
18
|
-
description: "Create a card from a JSON spec; if dataset_query is MBQL 5 (lib/type: mbql/query) it is pre-flight-validated against the same schema as `
|
|
18
|
+
description: "Create a card from a JSON spec; if dataset_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,
|
|
@@ -26,10 +26,10 @@ var create_default = defineMetabaseCommand({
|
|
|
26
26
|
},
|
|
27
27
|
outputSchema: Card,
|
|
28
28
|
examples: [
|
|
29
|
-
"cat card.json |
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
29
|
+
"cat card.json | mb card create",
|
|
30
|
+
"mb card create --file card.json",
|
|
31
|
+
"mb card create --body '{\"name\":\"x\",\"display\":\"table\",\"dataset_query\":{...},\"visualization_settings\":{}}'",
|
|
32
|
+
"mb card create --file card.json --skip-validate"
|
|
33
33
|
],
|
|
34
34
|
async run({ args, ctx, getClient }) {
|
|
35
35
|
const body = await readBody({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.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-DPdP0sl1.mjs";
|
|
7
|
+
import { readBody } from "./body-CVSMGqZk.mjs";
|
|
8
8
|
import { bodyInputFlags } from "./body-flags-BK7J6Daz.mjs";
|
|
9
9
|
import { Collection, CollectionCreateInput, collectionView } from "./collection-B3sPXRLs.mjs";
|
|
10
10
|
|
|
@@ -22,9 +22,9 @@ var create_default = defineMetabaseCommand({
|
|
|
22
22
|
},
|
|
23
23
|
outputSchema: Collection,
|
|
24
24
|
examples: [
|
|
25
|
-
"cat collection.json |
|
|
26
|
-
"
|
|
27
|
-
"
|
|
25
|
+
"cat collection.json | mb collection create",
|
|
26
|
+
"mb collection create --file collection.json",
|
|
27
|
+
"mb collection create --body '{\"name\":\"My Collection\",\"parent_id\":4}'"
|
|
28
28
|
],
|
|
29
29
|
async run({ args, ctx, getClient }) {
|
|
30
30
|
const body = await readBody({
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.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-DPdP0sl1.mjs";
|
|
7
|
+
import { readBody } from "./body-CVSMGqZk.mjs";
|
|
8
8
|
import { bodyInputFlags } from "./body-flags-BK7J6Daz.mjs";
|
|
9
9
|
import "./field-B3gvaqpK.mjs";
|
|
10
10
|
import "./card-CQxvHeyP.mjs";
|
|
11
|
-
import "./validate-
|
|
11
|
+
import "./validate-CB0bu50i.mjs";
|
|
12
12
|
import { Dashboard, DashboardCreateInput, DashboardDetail, dashboardView } from "./dashboard-CnMD04PQ.mjs";
|
|
13
|
-
import { preflightDashcardCardReferences, wrapChainedDashboardWriteError } from "./preflight-
|
|
13
|
+
import { preflightDashcardCardReferences, wrapChainedDashboardWriteError } from "./preflight-RkDLqtNm.mjs";
|
|
14
14
|
|
|
15
15
|
//#region src/commands/dashboard/create.ts
|
|
16
16
|
var create_default = defineMetabaseCommand({
|
|
@@ -26,10 +26,10 @@ var create_default = defineMetabaseCommand({
|
|
|
26
26
|
},
|
|
27
27
|
outputSchema: Dashboard,
|
|
28
28
|
examples: [
|
|
29
|
-
"cat dashboard.json |
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
29
|
+
"cat dashboard.json | mb dashboard create",
|
|
30
|
+
"mb dashboard create --file dashboard.json",
|
|
31
|
+
"mb dashboard create --body '{\"name\":\"My Dashboard\",\"collection_id\":4}'",
|
|
32
|
+
"mb dashboard create --body '{\"name\":\"D\",\"dashcards\":[{\"id\":-1,\"card_id\":42,\"row\":0,\"col\":0,\"size_x\":12,\"size_y\":6}]}'"
|
|
33
33
|
],
|
|
34
34
|
async run({ args, ctx, getClient }) {
|
|
35
35
|
const body = await readBody({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.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-DPdP0sl1.mjs";
|
|
7
|
+
import { readBody } from "./body-CVSMGqZk.mjs";
|
|
8
8
|
import { bodyInputFlags } from "./body-flags-BK7J6Daz.mjs";
|
|
9
|
-
import { requireBothOrNeither } from "./flag-pair-
|
|
10
|
-
import { parseId } from "./parse-id-
|
|
9
|
+
import { requireBothOrNeither } from "./flag-pair-Fmcdkrfx.mjs";
|
|
10
|
+
import { parseId } from "./parse-id-DbSjfzoU.mjs";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
|
|
13
13
|
//#region src/domain/api-key.ts
|
|
@@ -93,9 +93,9 @@ var create_default = defineMetabaseCommand({
|
|
|
93
93
|
},
|
|
94
94
|
outputSchema: ApiKey,
|
|
95
95
|
examples: [
|
|
96
|
-
"
|
|
97
|
-
"echo '{\"name\":\"k\",\"group_id\":2}' |
|
|
98
|
-
"
|
|
96
|
+
"mb api-key create --name \"deploy-bot\" --group-id 2",
|
|
97
|
+
"echo '{\"name\":\"k\",\"group_id\":2}' | mb api-key create",
|
|
98
|
+
"mb api-key create --file key.json"
|
|
99
99
|
],
|
|
100
100
|
async run({ args, ctx, getClient }) {
|
|
101
101
|
const pair = requireBothOrNeither({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.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 { REMOTE_SYNC_PATHS } from "./poll-task-
|
|
7
|
-
import "./poll-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import { ConfigError } from "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-DPdP0sl1.mjs";
|
|
6
|
+
import { REMOTE_SYNC_PATHS } from "./poll-task-BwKuhZ9P.mjs";
|
|
7
|
+
import "./poll-Cd8bRMmZ.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/git-sync/create-branch.ts
|
|
@@ -38,7 +38,7 @@ var create_branch_default = defineMetabaseCommand({
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
outputSchema: CreateBranchResult,
|
|
41
|
-
examples: ["
|
|
41
|
+
examples: ["mb git-sync create-branch feat/dashboards", "mb git-sync create-branch feat/x --json"],
|
|
42
42
|
async run({ args, ctx, getClient }) {
|
|
43
43
|
const name = args.name.trim();
|
|
44
44
|
if (name === "") throw new ConfigError("invalid name: branch name must not be blank");
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.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-DPdP0sl1.mjs";
|
|
7
|
+
import { readBody } from "./body-CVSMGqZk.mjs";
|
|
8
8
|
import { bodyInputFlags } from "./body-flags-BK7J6Daz.mjs";
|
|
9
|
-
import "./validate-
|
|
10
|
-
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-
|
|
9
|
+
import "./validate-CB0bu50i.mjs";
|
|
10
|
+
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-CavIA0Q2.mjs";
|
|
11
11
|
import { Segment, SegmentCreateInput, segmentView } from "./segment-BMrUBz94.mjs";
|
|
12
12
|
|
|
13
13
|
//#region src/commands/segment/create.ts
|
|
14
14
|
var create_default = defineMetabaseCommand({
|
|
15
15
|
meta: {
|
|
16
16
|
name: "create",
|
|
17
|
-
description: "Create a segment from a JSON spec; if definition is MBQL 5 (lib/type: mbql/query) it is pre-flight-validated against the same schema as `
|
|
17
|
+
description: "Create a segment from a JSON spec; 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`)"
|
|
18
18
|
},
|
|
19
19
|
args: {
|
|
20
20
|
...outputFlags,
|
|
@@ -25,9 +25,9 @@ var create_default = defineMetabaseCommand({
|
|
|
25
25
|
},
|
|
26
26
|
outputSchema: Segment,
|
|
27
27
|
examples: [
|
|
28
|
-
"cat segment.json |
|
|
29
|
-
"
|
|
30
|
-
"
|
|
28
|
+
"cat segment.json | mb segment create",
|
|
29
|
+
"mb segment create --file segment.json",
|
|
30
|
+
"mb segment create --file segment.json --skip-validate"
|
|
31
31
|
],
|
|
32
32
|
async run({ args, ctx, getClient }) {
|
|
33
33
|
const body = await readBody({
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderItem } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { defineMetabaseCommand, localUrl, outputFlags, parseJson } 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, localUrl, outputFlags, parseJson } from "./runtime-DPdP0sl1.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DbSjfzoU.mjs";
|
|
7
|
+
import "./poll-Cd8bRMmZ.mjs";
|
|
8
|
+
import "./yaml-ECiog374.mjs";
|
|
9
|
+
import "./process-zJeVJZTM.mjs";
|
|
10
|
+
import { checkDockerReady, readContainerCredentialsFile, requireWorkspaceContainerLocation } from "./docker-C9WQCjkt.mjs";
|
|
11
|
+
import { WorkspaceCredentials } from "./workspace-credentials-4lIxxz4g.mjs";
|
|
10
12
|
import { z } from "zod";
|
|
11
13
|
|
|
12
14
|
//#region src/commands/workspace/credentials.ts
|
|
@@ -62,7 +64,7 @@ var credentials_default = defineMetabaseCommand({
|
|
|
62
64
|
}
|
|
63
65
|
},
|
|
64
66
|
outputSchema: WorkspaceCredentialsResult,
|
|
65
|
-
examples: ["
|
|
67
|
+
examples: ["mb workspace credentials 1", "mb workspace credentials 1 --json"],
|
|
66
68
|
async run({ args, ctx }) {
|
|
67
69
|
const workspaceId = parseId(args.id);
|
|
68
70
|
await checkDockerReady();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.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 { SyncTaskOrIdle, fetchCurrentTask, syncTaskIdleView, syncTaskView } from "./poll-task-
|
|
7
|
-
import "./poll-
|
|
3
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-DPdP0sl1.mjs";
|
|
6
|
+
import { SyncTaskOrIdle, fetchCurrentTask, syncTaskIdleView, syncTaskView } from "./poll-task-BwKuhZ9P.mjs";
|
|
7
|
+
import "./poll-Cd8bRMmZ.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/git-sync/current-task.ts
|
|
10
10
|
const CurrentTaskResult = SyncTaskOrIdle;
|
|
@@ -19,7 +19,7 @@ var current_task_default = defineMetabaseCommand({
|
|
|
19
19
|
...connectionFlags
|
|
20
20
|
},
|
|
21
21
|
outputSchema: CurrentTaskResult,
|
|
22
|
-
examples: ["
|
|
22
|
+
examples: ["mb git-sync current-task", "mb git-sync current-task --json"],
|
|
23
23
|
async run({ ctx, getClient }) {
|
|
24
24
|
const client = await getClient();
|
|
25
25
|
const task = await fetchCurrentTask(client);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/dashboard/index.ts
|
|
4
|
+
var dashboard_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "dashboard",
|
|
7
|
+
description: "Manage Metabase dashboards"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-BJAC356Q.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-RPL4h0It.mjs").then((mod) => mod.default),
|
|
12
|
+
cards: () => import("./cards-Bir6wRS_.mjs").then((mod) => mod.default),
|
|
13
|
+
create: () => import("./create-Dj-fO-nV.mjs").then((mod) => mod.default),
|
|
14
|
+
update: () => import("./update-Bjd7YRyh.mjs").then((mod) => mod.default),
|
|
15
|
+
"update-dashcard": () => import("./update-dashcard-BfcB6pFx.mjs").then((mod) => mod.default)
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { dashboard_default as default };
|
|
@@ -7,9 +7,9 @@ var database_default = defineCommand({
|
|
|
7
7
|
description: "Manage databases provisioned to a workspace"
|
|
8
8
|
},
|
|
9
9
|
subCommands: {
|
|
10
|
-
provision: () => import("./provision-
|
|
11
|
-
update: () => import("./update-
|
|
12
|
-
deprovision: () => import("./deprovision-
|
|
10
|
+
provision: () => import("./provision-DBqPA-De.mjs").then((mod) => mod.default),
|
|
11
|
+
update: () => import("./update-CCFegz4q.mjs").then((mod) => mod.default),
|
|
12
|
+
deprovision: () => import("./deprovision-CadXjs_7.mjs").then((mod) => mod.default)
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/db/index.ts
|
|
4
|
+
var db_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "db",
|
|
7
|
+
description: "Inspect Metabase databases",
|
|
8
|
+
alias: "database"
|
|
9
|
+
},
|
|
10
|
+
subCommands: {
|
|
11
|
+
list: () => import("./list-C8b-KxY6.mjs").then((m) => m.default),
|
|
12
|
+
get: () => import("./get-dqrzLuwA.mjs").then((m) => m.default),
|
|
13
|
+
metadata: () => import("./metadata-DirWO0cS.mjs").then((m) => m.default),
|
|
14
|
+
schemas: () => import("./schemas-s3PRMTwc.mjs").then((m) => m.default),
|
|
15
|
+
"schema-tables": () => import("./schema-tables-c6K9AkS-.mjs").then((m) => m.default),
|
|
16
|
+
"sync-schema": () => import("./sync-schema-_SRMfBSQ.mjs").then((m) => m.default),
|
|
17
|
+
"rescan-values": () => import("./rescan-values-D1-IyyU7.mjs").then((m) => m.default)
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { db_default as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
7
|
-
import "./prompt-
|
|
8
|
-
import { DeleteResult, confirmAndDelete } from "./delete-runtime-
|
|
3
|
+
import "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-DPdP0sl1.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DbSjfzoU.mjs";
|
|
7
|
+
import "./prompt-DgDNy_Pc.mjs";
|
|
8
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-DfFMWJJ6.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/transform-job/delete.ts
|
|
11
11
|
var delete_default = defineMetabaseCommand({
|
|
@@ -29,7 +29,7 @@ var delete_default = defineMetabaseCommand({
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
outputSchema: DeleteResult,
|
|
32
|
-
examples: ["
|
|
32
|
+
examples: ["mb transform-job delete 1 --yes", "mb transform-job delete 1"],
|
|
33
33
|
async run({ args, ctx, getClient }) {
|
|
34
34
|
const id = parseId(args.id);
|
|
35
35
|
const client = await getClient();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
7
|
-
import "./prompt-
|
|
8
|
-
import { DeleteResult, confirmAndDelete } from "./delete-runtime-
|
|
3
|
+
import "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-DPdP0sl1.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DbSjfzoU.mjs";
|
|
7
|
+
import "./prompt-DgDNy_Pc.mjs";
|
|
8
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-DfFMWJJ6.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/transform/delete.ts
|
|
11
11
|
var delete_default = defineMetabaseCommand({
|
|
@@ -29,7 +29,7 @@ var delete_default = defineMetabaseCommand({
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
outputSchema: DeleteResult,
|
|
32
|
-
examples: ["
|
|
32
|
+
examples: ["mb transform delete 1 --yes", "mb transform delete 1"],
|
|
33
33
|
async run({ args, ctx, getClient }) {
|
|
34
34
|
const id = parseId(args.id);
|
|
35
35
|
const client = await getClient();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { renderItem } from "./render-
|
|
2
|
-
import { promptConfirm } from "./prompt-
|
|
1
|
+
import { renderItem } from "./render-DuoDUTVL.mjs";
|
|
2
|
+
import { promptConfirm } from "./prompt-DgDNy_Pc.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/commands/delete-runtime.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
7
|
-
import "./prompt-
|
|
8
|
-
import { DeleteResult, confirmAndDelete } from "./delete-runtime-
|
|
3
|
+
import "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-DPdP0sl1.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DbSjfzoU.mjs";
|
|
7
|
+
import "./prompt-DgDNy_Pc.mjs";
|
|
8
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-DfFMWJJ6.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/transform/delete-table.ts
|
|
11
11
|
var delete_table_default = defineMetabaseCommand({
|
|
@@ -29,7 +29,7 @@ var delete_table_default = defineMetabaseCommand({
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
outputSchema: DeleteResult,
|
|
32
|
-
examples: ["
|
|
32
|
+
examples: ["mb transform delete-table 1 --yes", "mb transform delete-table 1"],
|
|
33
33
|
async run({ args, ctx, getClient }) {
|
|
34
34
|
const id = parseId(args.id);
|
|
35
35
|
const client = await getClient();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
7
|
-
import "./prompt-
|
|
8
|
-
import "./poll-
|
|
9
|
-
import { DeleteResult, confirmAndDelete } from "./delete-runtime-
|
|
10
|
-
import { parseWaitFlags, waitFlags } from "./wait-flags-
|
|
11
|
-
import "./workspace-
|
|
12
|
-
import { waitForDatabaseGone } from "./wait-
|
|
3
|
+
import "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, outputFlags, profileFlag } from "./runtime-DPdP0sl1.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DbSjfzoU.mjs";
|
|
7
|
+
import "./prompt-DgDNy_Pc.mjs";
|
|
8
|
+
import "./poll-Cd8bRMmZ.mjs";
|
|
9
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-DfFMWJJ6.mjs";
|
|
10
|
+
import { parseWaitFlags, waitFlags } from "./wait-flags-pItBfuzi.mjs";
|
|
11
|
+
import "./workspace-DUfqhPm5.mjs";
|
|
12
|
+
import { waitForDatabaseGone } from "./wait-Ed4Q7ccW.mjs";
|
|
13
13
|
|
|
14
14
|
//#region src/commands/workspace/database/deprovision.ts
|
|
15
15
|
var deprovision_default = defineMetabaseCommand({
|
|
@@ -39,7 +39,7 @@ var deprovision_default = defineMetabaseCommand({
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
outputSchema: DeleteResult,
|
|
42
|
-
examples: ["
|
|
42
|
+
examples: ["mb workspace database deprovision 1 5 --yes", "mb workspace database deprovision 1 5 --yes --wait"],
|
|
43
43
|
async run({ args, ctx, getClient }) {
|
|
44
44
|
const workspaceId = parseId(args.id);
|
|
45
45
|
const databaseId = parseId(args["db-id"], "db-id");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./package-
|
|
1
|
+
import "./package-VV3qWWIQ.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { renderList } from "./render-
|
|
4
|
-
import "./predicates-
|
|
5
|
-
import { connectionFlags, defineMetabaseCommand, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./runtime-
|
|
6
|
-
import { REMOTE_SYNC_PATHS, SyncDirtyItem, SyncDirtyItemCompact, syncDirtyItemView } from "./poll-task-
|
|
7
|
-
import "./poll-
|
|
3
|
+
import { renderList } from "./render-DuoDUTVL.mjs";
|
|
4
|
+
import "./predicates-CGO17Q15.mjs";
|
|
5
|
+
import { connectionFlags, defineMetabaseCommand, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./runtime-DPdP0sl1.mjs";
|
|
6
|
+
import { REMOTE_SYNC_PATHS, SyncDirtyItem, SyncDirtyItemCompact, syncDirtyItemView } from "./poll-task-BwKuhZ9P.mjs";
|
|
7
|
+
import "./poll-Cd8bRMmZ.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/git-sync/dirty.ts
|
|
@@ -21,7 +21,7 @@ var dirty_default = defineMetabaseCommand({
|
|
|
21
21
|
...connectionFlags
|
|
22
22
|
},
|
|
23
23
|
outputSchema: SyncDirtyListEnvelope,
|
|
24
|
-
examples: ["
|
|
24
|
+
examples: ["mb git-sync dirty", "mb git-sync dirty --json"],
|
|
25
25
|
async run({ ctx, getClient }) {
|
|
26
26
|
const client = await getClient();
|
|
27
27
|
const response = await client.requestParsed(SyncDirtyApiResponse, REMOTE_SYNC_PATHS.dirty);
|
|
@@ -1,106 +1,9 @@
|
|
|
1
|
-
import { ConfigError, MetabaseError, errorMessage
|
|
2
|
-
import { parseJson } from "./runtime-
|
|
3
|
-
import { pollUntil } from "./poll-
|
|
1
|
+
import { ConfigError, MetabaseError, errorMessage } from "./predicates-CGO17Q15.mjs";
|
|
2
|
+
import { parseJson } from "./runtime-DPdP0sl1.mjs";
|
|
3
|
+
import { pollUntil } from "./poll-Cd8bRMmZ.mjs";
|
|
4
|
+
import { ProcessNotFoundError, runProcess, runProcessBinary, streamProcess } from "./process-zJeVJZTM.mjs";
|
|
4
5
|
import { z } from "zod";
|
|
5
|
-
import { spawn } from "node:child_process";
|
|
6
6
|
|
|
7
|
-
//#region src/runtime/process.ts
|
|
8
|
-
var ProcessNotFoundError = class extends Error {
|
|
9
|
-
command;
|
|
10
|
-
constructor(command) {
|
|
11
|
-
super(`command not found: ${command}`);
|
|
12
|
-
this.name = "ProcessNotFoundError";
|
|
13
|
-
this.command = command;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
var ProcessTimeoutError = class extends Error {
|
|
17
|
-
command;
|
|
18
|
-
timeoutMs;
|
|
19
|
-
constructor(command, timeoutMs) {
|
|
20
|
-
super(`command timed out after ${timeoutMs}ms: ${command}`);
|
|
21
|
-
this.name = "ProcessTimeoutError";
|
|
22
|
-
this.command = command;
|
|
23
|
-
this.timeoutMs = timeoutMs;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
function spawnAndCollect(command, args, options) {
|
|
27
|
-
const timeoutSignal = options.timeoutMs !== void 0 && options.timeoutMs > 0 ? AbortSignal.timeout(options.timeoutMs) : void 0;
|
|
28
|
-
return new Promise((resolve, reject) => {
|
|
29
|
-
const child = spawn(command, args, {
|
|
30
|
-
stdio: [
|
|
31
|
-
"pipe",
|
|
32
|
-
"pipe",
|
|
33
|
-
"pipe"
|
|
34
|
-
],
|
|
35
|
-
env: options.env ?? process.env,
|
|
36
|
-
...options.cwd !== void 0 ? { cwd: options.cwd } : {},
|
|
37
|
-
...timeoutSignal !== void 0 ? {
|
|
38
|
-
signal: timeoutSignal,
|
|
39
|
-
killSignal: "SIGKILL"
|
|
40
|
-
} : {}
|
|
41
|
-
});
|
|
42
|
-
const stdoutChunks = [];
|
|
43
|
-
let stderr = "";
|
|
44
|
-
child.stdout.on("data", (chunk) => {
|
|
45
|
-
stdoutChunks.push(chunk);
|
|
46
|
-
});
|
|
47
|
-
child.stderr.on("data", (chunk) => {
|
|
48
|
-
stderr += chunk.toString("utf8");
|
|
49
|
-
});
|
|
50
|
-
child.on("error", (error) => {
|
|
51
|
-
if (isNotFoundError(error)) {
|
|
52
|
-
reject(new ProcessNotFoundError(command));
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
if (timeoutSignal?.aborted) {
|
|
56
|
-
reject(new ProcessTimeoutError(command, options.timeoutMs ?? 0));
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
reject(error);
|
|
60
|
-
});
|
|
61
|
-
child.on("close", (code) => {
|
|
62
|
-
if (timeoutSignal?.aborted) {
|
|
63
|
-
reject(new ProcessTimeoutError(command, options.timeoutMs ?? 0));
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const stdoutBuffer = Buffer.concat(stdoutChunks);
|
|
67
|
-
resolve({
|
|
68
|
-
stdout: new Uint8Array(stdoutBuffer.buffer, stdoutBuffer.byteOffset, stdoutBuffer.length),
|
|
69
|
-
stderr,
|
|
70
|
-
exitCode: code
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
if (options.stdin === void 0) child.stdin.end();
|
|
74
|
-
else child.stdin.end(options.stdin);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
const stdoutDecoder = new TextDecoder("utf-8");
|
|
78
|
-
async function runProcess(command, args, options = {}) {
|
|
79
|
-
const result = await spawnAndCollect(command, args, options);
|
|
80
|
-
return {
|
|
81
|
-
stdout: stdoutDecoder.decode(result.stdout),
|
|
82
|
-
stderr: result.stderr,
|
|
83
|
-
exitCode: result.exitCode
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function runProcessBinary(command, args, options = {}) {
|
|
87
|
-
return spawnAndCollect(command, args, options);
|
|
88
|
-
}
|
|
89
|
-
function streamProcess(command, args) {
|
|
90
|
-
return new Promise((resolve, reject) => {
|
|
91
|
-
const child = spawn(command, args, { stdio: "inherit" });
|
|
92
|
-
child.on("error", (error) => {
|
|
93
|
-
if (isNotFoundError(error)) {
|
|
94
|
-
reject(new ProcessNotFoundError(command));
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
reject(error);
|
|
98
|
-
});
|
|
99
|
-
child.on("close", (code) => resolve(code));
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
//#endregion
|
|
104
7
|
//#region src/runtime/tar.ts
|
|
105
8
|
const BLOCK_SIZE = 512;
|
|
106
9
|
const REGULAR_FILE_MODE = 420;
|
|
@@ -540,7 +443,7 @@ async function inspectWorkspaceContainer(containerName) {
|
|
|
540
443
|
async function requireWorkspaceContainerLocation(workspaceId) {
|
|
541
444
|
const containerName = containerNameFor(workspaceId);
|
|
542
445
|
const summary = await inspectWorkspaceContainer(containerName);
|
|
543
|
-
if (summary === null) throw new ConfigError(`no container for workspace ${workspaceId} — run \`
|
|
446
|
+
if (summary === null) throw new ConfigError(`no container for workspace ${workspaceId} — run \`mb workspace start ${workspaceId}\` first`);
|
|
544
447
|
if (summary.hostPort === null) throw new ConfigError(`container ${containerName} is missing the host-port label — likely created by a different tool`);
|
|
545
448
|
return {
|
|
546
449
|
containerName,
|
|
@@ -609,4 +512,4 @@ function parseLabels(raw) {
|
|
|
609
512
|
}
|
|
610
513
|
|
|
611
514
|
//#endregion
|
|
612
|
-
export { CONTAINER_REPO_DIR, CONTAINER_STATES, checkDockerReady, containerLifecycleStatus, containerNameFor, listWorkspaceContainers, pullImage, readContainerCredentialsFile, removeContainer, removeVolume, requireWorkspaceContainerLocation,
|
|
515
|
+
export { CONTAINER_REPO_DIR, CONTAINER_STATES, checkDockerReady, containerLifecycleStatus, containerNameFor, listWorkspaceContainers, pullImage, readContainerCredentialsFile, removeContainer, removeVolume, requireWorkspaceContainerLocation, runWorkspaceContainer, scrubContainerConfig, stopContainer, streamLogs, volumeNameFor, waitForConfigConsumed };
|
|
@@ -6,7 +6,7 @@ var eid_default = defineCommand({
|
|
|
6
6
|
name: "eid",
|
|
7
7
|
description: "Translate Metabase entity ids (string EIDs) to numeric ids"
|
|
8
8
|
},
|
|
9
|
-
subCommands: { translate: () => import("./translate-
|
|
9
|
+
subCommands: { translate: () => import("./translate-DVN_sIVb.mjs").then((mod) => mod.default) }
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
//#endregion
|