@metabase/cli 0.1.8 → 0.1.10
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 +1 -1
- package/README.md +89 -236
- package/dist/add-collection-D9wXgmRj.mjs +10 -0
- package/dist/{add-collection-CwrbKmC1.mjs → add-collection-DUqTrC5T.mjs} +5 -5
- package/dist/{archive-DqUtqRut.mjs → archive-0krZxAXq.mjs} +5 -6
- package/dist/{archive-ZnnJc2iT.mjs → archive-44EWiXud.mjs} +6 -7
- package/dist/{archive-BpKZsGAm.mjs → archive-B59Y7ajB.mjs} +6 -7
- package/dist/{archive-BO3DOWI4.mjs → archive-BEIyIsin.mjs} +5 -6
- package/dist/{archive-BzvqQd34.mjs → archive-BZfpjMir.mjs} +5 -6
- package/dist/{archive-BAjGIzhn.mjs → archive-DtE2H4A6.mjs} +6 -7
- package/dist/archive-_GMNY8wH.mjs +39 -0
- package/dist/auth-cFC5m69m.mjs +19 -0
- package/dist/{body-DDYKoyMt.mjs → body-BdRyuvU4.mjs} +2 -2
- package/dist/{branches-DjiGsjAz.mjs → branches-Jpv-FNds.mjs} +5 -6
- package/dist/{cancel-BwtDQ2MR.mjs → cancel-ChC4lFd4.mjs} +4 -5
- package/dist/{cancel-task-uJp18RvR.mjs → cancel-task-DyhIkNaL.mjs} +5 -6
- package/dist/{render-0_GsapXa.mjs → capabilities-7L9GVMd_.mjs} +45 -4
- package/dist/card-ClvGX6dQ.mjs +20 -0
- package/dist/{card-ezYiriML.mjs → card-DnIeMmUn.mjs} +18 -2
- package/dist/{cards-z68PANDD.mjs → cards-O-nKkQKP.mjs} +5 -6
- package/dist/cli.mjs +24 -34
- package/dist/{collection-Bcy8cWYH.mjs → collection-BPTlcFw5.mjs} +8 -2
- package/dist/collection-DjvowSJC.mjs +20 -0
- package/dist/collection-namespace-7724zUMx.mjs +12 -0
- package/dist/{create-BzK59YlR.mjs → create-B4f4Pldw.mjs} +11 -12
- package/dist/{create-4EAGYVyp.mjs → create-BbF9zVFP.mjs} +12 -10
- package/dist/{create-Dd_Gyg_F.mjs → create-BnFHcnlL.mjs} +7 -8
- package/dist/{create-GVfCQU3B.mjs → create-BuKx7kw6.mjs} +7 -8
- package/dist/{create-CQ4Vg4Ge.mjs → create-BxRsXQrm.mjs} +9 -10
- package/dist/{create-7JOWFxqu.mjs → create-CvYKJOcE.mjs} +10 -11
- package/dist/create-D45uFXlo.mjs +44 -0
- package/dist/create-DS52EhPd.mjs +52 -0
- package/dist/{create-DHWfmO2L.mjs → create-DeZ2x2Db.mjs} +9 -10
- package/dist/{create-branch-CdWGiREu.mjs → create-branch-KOWUIE72.mjs} +5 -6
- package/dist/{current-task-nPs-iCLi.mjs → current-task-ClcWPPMc.mjs} +5 -6
- package/dist/dashboard-BFeURTOw.mjs +21 -0
- package/dist/{database-BXiue1in.mjs → database-Dsv4QBs0.mjs} +20 -10
- package/dist/db-CSH1kwQr.mjs +22 -0
- package/dist/{delete-CJqLgr6w.mjs → delete-CX2VUA5R.mjs} +6 -7
- package/dist/{delete-Do1agSiL.mjs → delete-D68oS73R.mjs} +6 -7
- package/dist/{delete-runtime-uuYbd4k2.mjs → delete-runtime-CjFc69tS.mjs} +2 -2
- package/dist/{delete-table-ZiJDpMFT.mjs → delete-table-DLvL9mDA.mjs} +6 -7
- package/dist/{dirty-BnTG7w7v.mjs → dirty-1OrXpc7E.mjs} +5 -6
- package/dist/document-CcfiiV3b.mjs +100 -0
- package/dist/document-KdT_Xj6r.mjs +19 -0
- package/dist/{eid-CwQ_smOD.mjs → eid-CzLhHZMW.mjs} +6 -7
- package/dist/{error-CTVL5CdB.mjs → error-BWXBhqLW.mjs} +1 -1
- package/dist/{export-DR2cC4rL.mjs → export-B5z8w-xo.mjs} +7 -8
- package/dist/field-CTFnZI8G.mjs +18 -0
- package/dist/{fields-Ck31lDz9.mjs → fields-sC7pzmPX.mjs} +6 -7
- package/dist/{get-pO0wiy1e.mjs → get-4GEDd9YN.mjs} +5 -6
- package/dist/get-BC60bhel.mjs +36 -0
- package/dist/{get-CyG_P55z.mjs → get-BYw3xS0X.mjs} +6 -7
- package/dist/{get-C71ypFQk.mjs → get-Bo1FGyFs.mjs} +5 -6
- package/dist/{get-BNKsNCcx.mjs → get-ByZ4HR2T.mjs} +5 -6
- package/dist/{get-DxqzDKKK.mjs → get-C6n86-dS.mjs} +5 -6
- package/dist/{get-DyArILlF.mjs → get-CHb6J908.mjs} +5 -6
- package/dist/{get-F338MOK-.mjs → get-DLwb_gUh.mjs} +5 -6
- package/dist/{get-CICzGFSW.mjs → get-DTHLETau.mjs} +6 -7
- package/dist/{get-BFJ3VBPa.mjs → get-Dl62Fy6Y.mjs} +5 -6
- package/dist/{get-BZiu-u-9.mjs → get-Fn9WkNhS.mjs} +7 -8
- package/dist/{get-GWRprk7k.mjs → get-ZesERdyk.mjs} +5 -7
- package/dist/{get-BPOd0Rm8.mjs → get-lcX52Skc.mjs} +5 -6
- package/dist/{get-DauAF3sm.mjs → get-reSMTfQi.mjs} +5 -6
- package/dist/{get-run-DhM_PyVy.mjs → get-run-CpCbHJad.mjs} +5 -6
- package/dist/git-sync-C2vib8rx.mjs +28 -0
- package/dist/{has-remote-changes-Ca0exJmb.mjs → has-remote-changes-CPz_-uxd.mjs} +5 -6
- package/dist/{import-DjclIzGP.mjs → import-DaWgprK6.mjs} +7 -8
- package/dist/is-dirty-Bb0Rtj7x.mjs +9 -0
- package/dist/{is-dirty-Cke0a1ie.mjs → is-dirty-DZlI7lQx.mjs} +4 -4
- package/dist/{items-BSpapmCU.mjs → items-hgbRYsYD.mjs} +7 -8
- package/dist/{list-BI1PfPjn.mjs → list-36H-dvJZ.mjs} +5 -6
- package/dist/list-B9J3ujwn.mjs +32 -0
- package/dist/{list-BRXGDSMo.mjs → list-BGerkRHH.mjs} +5 -6
- package/dist/{list-CEE9yKNp.mjs → list-BWv5y307.mjs} +4 -5
- package/dist/{list-V5IuMr_5.mjs → list-BgHESP7b.mjs} +4 -5
- package/dist/{list-DWWGcUTg.mjs → list-CCZnH2-Z.mjs} +5 -7
- package/dist/{list-Fjjtpghb.mjs → list-CGdOC9zX.mjs} +6 -7
- package/dist/{list-DmO4ADQq.mjs → list-CKeVS1IZ.mjs} +4 -5
- package/dist/{list-D1qhCQn0.mjs → list-Cd2nOCAx.mjs} +6 -7
- package/dist/{list-fIV-P6wP.mjs → list-D9EuxFHO.mjs} +4 -5
- package/dist/{list-Br77Mw6U.mjs → list-DBlsRSpZ.mjs} +5 -6
- package/dist/{list-bVlCwg8g.mjs → list-DO8T-nmF.mjs} +4 -5
- package/dist/{list-Brt4oKO7.mjs → list-DOVX3vCb.mjs} +6 -7
- package/dist/{list-DUyWON1F.mjs → list-kath_2cX.mjs} +4 -5
- package/dist/{login-BJGhZLgZ.mjs → login-BzrAGJfu.mjs} +9 -10
- package/dist/{logout-BAGLqtnV.mjs → logout-CKBiltoS.mjs} +4 -5
- package/dist/{manifest-BNh0Lw6p.mjs → manifest-BPHqF5LY.mjs} +1 -2
- package/dist/measure-Dw1QpRZa.mjs +19 -0
- package/dist/{metadata-B-GOcWqL.mjs → metadata-BcGcUEVJ.mjs} +6 -7
- package/dist/{metadata-DJAdsOoh.mjs → metadata-BjOrKtnv.mjs} +7 -8
- package/dist/{parse-id-D1LTTt9L.mjs → parse-id--iVTCKSo.mjs} +1 -1
- package/dist/{path-D5kX-msX.mjs → path-LgGU6Bd0.mjs} +4 -6
- package/dist/{poll-DxpnK1wW.mjs → poll-BucRFJT-.mjs} +1 -1
- package/dist/{poll-task-D8mG49IN.mjs → poll-task-DTzKB3T3.mjs} +2 -2
- package/dist/{preflight-Df_FqJ6o.mjs → preflight-CzqVX0PP.mjs} +3 -3
- package/dist/{query-zWFRDH3T.mjs → query-BVZkK6Qk.mjs} +7 -8
- package/dist/{query-OIuumiXN.mjs → query-DG_jygDF.mjs} +11 -12
- package/dist/{query-result-ABPLz6I4.mjs → query-result-B4kTRid7.mjs} +1 -1
- package/dist/{remove-collection-BxmiXWKz.mjs → remove-collection-HdeAfLyi.mjs} +7 -8
- package/dist/{rescan-values-M7g81KIl.mjs → rescan-values-hWubCruZ.mjs} +8 -11
- package/dist/run-C1-lDmQF.mjs +136 -0
- package/dist/{runs-CqfJIuh_.mjs → runs-Q6DYQyqj.mjs} +6 -7
- package/dist/{runtime-B40L_bj8.mjs → runtime-colqvhLf.mjs} +11 -78
- package/dist/{schema-tables-CjBRF0_0.mjs → schema-tables-BEastV_8.mjs} +6 -7
- package/dist/{schemas-GIIbek2O.mjs → schemas-CgawwI_k.mjs} +4 -5
- package/dist/{search-h78uOYec.mjs → search-BWo7xSPP.mjs} +4 -5
- package/dist/segment-DMuYvFjg.mjs +19 -0
- package/dist/{set-BRDxcLcQ.mjs → set-7Nm2ZTb_.mjs} +7 -8
- package/dist/{setting-mKzZJpQY.mjs → setting-DSGXJehQ.mjs} +3 -3
- package/dist/{setup-WTIT2WbM.mjs → setup-aJLGLrIT.mjs} +6 -7
- package/dist/{skills-BkregMyb.mjs → skills-CY_FmaPo.mjs} +33 -2
- package/dist/skills-Q2AFsYvc.mjs +18 -0
- package/dist/snippet-Df2TrP7-.mjs +19 -0
- package/dist/{stash-DxoAJzcK.mjs → stash-DPQ0c-Cd.mjs} +7 -8
- package/dist/{status-B1dc3bbQ.mjs → status-CvAATvV0.mjs} +4 -5
- package/dist/{status-D0Ukfodl.mjs → status-CvKPrV5X.mjs} +6 -7
- package/dist/{summary-3qOMUcEX.mjs → summary-CeOnoOq2.mjs} +5 -6
- package/dist/sync-schema-aOPBc3CY.mjs +55 -0
- package/dist/{table-qDD2kApF.mjs → table-CkWja2UH.mjs} +1 -1
- package/dist/table-pK4OkVtL.mjs +19 -0
- package/dist/{transform-BKahefz_.mjs → transform--dviwMA1.mjs} +1 -0
- package/dist/transform-D60veFH8.mjs +24 -0
- package/dist/transform-job-DXt5LsrY.mjs +19 -0
- package/dist/{tree-DsnIPFyE.mjs → tree-MOQOBeAP.mjs} +4 -5
- package/dist/update-57uxZWcR.mjs +52 -0
- package/dist/{update-CLsqoEJ8.mjs → update-B6mg3AZD.mjs} +8 -9
- package/dist/{update-CZEd_Eej.mjs → update-BD9xkglP.mjs} +9 -10
- package/dist/{update-BEtl9LpG.mjs → update-BRrnfG0q.mjs} +8 -9
- package/dist/{update-DPouQi4U.mjs → update-BWyCK8QV.mjs} +13 -11
- package/dist/{update-DWn-nLPo.mjs → update-Bj9s0ri8.mjs} +8 -9
- package/dist/{update-BsgHRoZ8.mjs → update-BkMWBzvk.mjs} +11 -12
- package/dist/{update-Baya6OkO.mjs → update-CitS-QRN.mjs} +12 -13
- package/dist/{update-BRLcnSwK.mjs → update-DfNKr_vS.mjs} +10 -11
- package/dist/{update-UaPqSfPN.mjs → update-Dri4Zg2H.mjs} +10 -11
- package/dist/{update-dashcard-DK9X91ha.mjs → update-dashcard-D_-ura3Y.mjs} +8 -9
- package/dist/{upgrade-UqdvTikR.mjs → upgrade-CFkZ4USY.mjs} +34 -7
- package/dist/{uuid-BWCaWG4O.mjs → uuid-DpinhSxA.mjs} +3 -4
- package/dist/{validate-dPEOnOf8.mjs → validate-B62TRDGV.mjs} +1 -1
- package/dist/{validate-query-CYvOP8Ld.mjs → validate-query-BpiN1CFu.mjs} +2 -2
- package/dist/{values-D_wycrcr.mjs → values-BSS4DRxk.mjs} +5 -6
- package/dist/{verify-D7hb6VMy.mjs → verify-B_A7v8TY.mjs} +1 -1
- package/dist/{wait-B5IpNFCG.mjs → wait-D3iSnjMM.mjs} +6 -7
- package/dist/{wait-flags-CNIeSq0_.mjs → wait-flags-_LnHOeBA.mjs} +2 -2
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +19 -32
- package/skill-data/document/SKILL.md +162 -0
- package/skill-data/git-sync/SKILL.md +8 -63
- package/skill-data/mbql/SKILL.md +95 -28
- package/skill-data/mbql/references/operators.md +13 -13
- package/skill-data/transform/SKILL.md +18 -7
- package/skills/metabase-cli/SKILL.md +1 -1
- package/dist/add-collection-DxtuNxeP.mjs +0 -11
- package/dist/auth-B9B4pUaH.mjs +0 -19
- package/dist/capabilities-7e9MgquN.mjs +0 -29
- package/dist/card-D54unw6r.mjs +0 -20
- package/dist/collection-B5kIKRTL.mjs +0 -20
- package/dist/create-6XE7GYxk.mjs +0 -45
- package/dist/create-C8gA-XP2.mjs +0 -54
- package/dist/credentials-CFA9iGZG.mjs +0 -88
- package/dist/dashboard-lw6IFfOs.mjs +0 -21
- package/dist/database-BPT6BrmF.mjs +0 -17
- package/dist/db-CBCj8sBg.mjs +0 -22
- package/dist/delete-CiV6f69N.mjs +0 -104
- package/dist/deprovision-C-qEnh-P.mjs +0 -67
- package/dist/docker-B-QQWThD.mjs +0 -515
- package/dist/field-DJmQ2pul.mjs +0 -18
- package/dist/git-sync-rmjYOGFK.mjs +0 -28
- package/dist/is-dirty-DFGgGLDi.mjs +0 -10
- package/dist/license-j0tDQLKI.mjs +0 -17
- package/dist/list-evetBTcH.mjs +0 -36
- package/dist/logs-jx5b_YDk.mjs +0 -60
- package/dist/measure-BfgxqewH.mjs +0 -19
- package/dist/parse-schemas-DDK9nXuh.mjs +0 -12
- package/dist/process-CM7Uu5q_.mjs +0 -105
- package/dist/provision-BJd6zO1D.mjs +0 -83
- package/dist/ps-CpyHEvv7.mjs +0 -11
- package/dist/ps-dEqRGeB3.mjs +0 -80
- package/dist/remove-BNQ1c6hB.mjs +0 -64
- package/dist/run-DTsx8bLb.mjs +0 -96
- package/dist/segment-CoElN2b-.mjs +0 -19
- package/dist/set-Dclba9xF.mjs +0 -68
- package/dist/skills-tMYd5d9v.mjs +0 -18
- package/dist/snippet-B84H3tfp.mjs +0 -19
- package/dist/start-B7ByBicB.mjs +0 -414
- package/dist/status-DAzD1Cn_.mjs +0 -34
- package/dist/stop-Cvexagxh.mjs +0 -87
- package/dist/sync-schema-CrmVX1cy.mjs +0 -44
- package/dist/table-B0fRQv91.mjs +0 -19
- package/dist/transform-K_kp6Rdm.mjs +0 -24
- package/dist/transform-job-CuNN8zgv.mjs +0 -19
- package/dist/update-hiJdbbsb.mjs +0 -78
- package/dist/url-LMJZRDv4.mjs +0 -56
- package/dist/wait-DHjXk3jD.mjs +0 -19
- package/dist/workspace-Bt8n3ojY.mjs +0 -25
- package/dist/workspace-D8HtUN0y.mjs +0 -72
- package/dist/workspace-credentials-8CBMQJFz.mjs +0 -100
- package/dist/yaml-Gv6wRFMF.mjs +0 -43
- package/skill-data/workspace/SKILL.md +0 -390
- /package/dist/{body-flags-D7q87Btw.mjs → body-flags-D78h_-Ua.mjs} +0 -0
- /package/dist/{dashboard-B4bn3z6t.mjs → dashboard-FY5UzJ_Z.mjs} +0 -0
- /package/dist/{field-E0IBy4Uw.mjs → field-MGxpNQUH.mjs} +0 -0
- /package/dist/{input-cMSEqISy.mjs → input-xewHccej.mjs} +0 -0
- /package/dist/{key-vkNkH82H.mjs → key-y4TtxKwU.mjs} +0 -0
- /package/dist/{measure-Bt3InQsA.mjs → measure-COGAoZpo.mjs} +0 -0
- /package/dist/{paginate-BexjkjbY.mjs → paginate-Dfm9eO9A.mjs} +0 -0
- /package/dist/{parse-enum-CrEWOhuY.mjs → parse-enum-Dr7ACrTR.mjs} +0 -0
- /package/dist/{parse-ref-DKag6a6I.mjs → parse-ref-BiETXmvm.mjs} +0 -0
- /package/dist/{prompt-CFKoys7k.mjs → prompt-u4WhE4T5.mjs} +0 -0
- /package/dist/{render-khznBlla.mjs → render-BQHJhSP1.mjs} +0 -0
- /package/dist/{revision-message-flag-DY29-cgz.mjs → revision-message-flag-Bo-Kvv6F.mjs} +0 -0
- /package/dist/{segment-DhBmcr_E.mjs → segment-d-708KKO.mjs} +0 -0
- /package/dist/{setting-BzCng1Ub.mjs → setting-CSJvi1-6.mjs} +0 -0
- /package/dist/{snippet-bi_0XbNT.mjs → snippet-BZvo05ua.mjs} +0 -0
- /package/dist/{transform-job-DjhoJbiV.mjs → transform-job-n8W6tLqF.mjs} +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import "./
|
|
9
|
-
import { Database, databaseView } from "./database-BXiue1in.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderItem } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
7
|
+
import "./table-CkWja2UH.mjs";
|
|
8
|
+
import { Database, databaseView } from "./database-Dsv4QBs0.mjs";
|
|
10
9
|
|
|
11
10
|
//#region src/commands/db/metadata.ts
|
|
12
11
|
var metadata_default = defineMetabaseCommand({
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { listEnvelopeSchema, outputFlags, wrapList } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import {
|
|
6
|
-
import "./yaml-Gv6wRFMF.mjs";
|
|
7
|
-
import { findSkillByName, loadAllSkills, loadVisibleSkills } from "./skills-BkregMyb.mjs";
|
|
2
|
+
import { listEnvelopeSchema, outputFlags, wrapList } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderList } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import { findSkillByName, loadAllSkills, loadVisibleSkills } from "./skills-CY_FmaPo.mjs";
|
|
8
6
|
import { z } from "zod";
|
|
9
7
|
|
|
10
8
|
//#region src/commands/skills/path.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimeoutError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { combineAborts, throwIfAborted } from "./runtime-
|
|
2
|
+
import { combineAborts, throwIfAborted } from "./runtime-colqvhLf.mjs";
|
|
3
3
|
import { setTimeout } from "node:timers/promises";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/poll.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parseJsonOrPlain } from "./runtime-
|
|
2
|
-
import { pollUntil } from "./poll-
|
|
1
|
+
import { parseJsonOrPlain } from "./runtime-colqvhLf.mjs";
|
|
2
|
+
import { pollUntil } from "./poll-BucRFJT-.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/domain/git-sync.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChainedRequestError, ConfigError, MetabaseError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { HttpError } from "./runtime-
|
|
3
|
-
import { writeJson } from "./
|
|
4
|
-
import { Card } from "./card-
|
|
2
|
+
import { HttpError } from "./runtime-colqvhLf.mjs";
|
|
3
|
+
import { writeJson } from "./capabilities-7L9GVMd_.mjs";
|
|
4
|
+
import { Card } from "./card-DnIeMmUn.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/dashboard/preflight.ts
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ConfigError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand, parseJson } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { formatQueryResult } from "./query-result-ABPLz6I4.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand, parseJson } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { CardQueryResult, cardQueryView } from "./card-DnIeMmUn.mjs";
|
|
7
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
8
|
+
import { formatQueryResult } from "./query-result-B4kTRid7.mjs";
|
|
10
9
|
import { z } from "zod";
|
|
11
10
|
import { Writable } from "node:stream";
|
|
12
11
|
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { ConfigError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { formatQueryResult } from "./query-result-ABPLz6I4.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderSummary, writeJson } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import "./field-MGxpNQUH.mjs";
|
|
7
|
+
import { CardQueryResult, cardQueryView } from "./card-DnIeMmUn.mjs";
|
|
8
|
+
import { readBody } from "./body-BdRyuvU4.mjs";
|
|
9
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
10
|
+
import { assertNotLegacyEnvelopeWrappingMbql5, getQuerySchemaBundle, isMbql5Query, validateQuery } from "./validate-B62TRDGV.mjs";
|
|
11
|
+
import { skipValidateFlag } from "./validate-query-BpiN1CFu.mjs";
|
|
12
|
+
import { formatQueryResult } from "./query-result-B4kTRid7.mjs";
|
|
14
13
|
import { z } from "zod";
|
|
15
14
|
|
|
16
15
|
//#region src/commands/query.ts
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import "./poll-task-
|
|
8
|
-
import "./
|
|
9
|
-
import { SyncSettingsUpdateResult, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-CwrbKmC1.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
6
|
+
import "./poll-BucRFJT-.mjs";
|
|
7
|
+
import "./poll-task-DTzKB3T3.mjs";
|
|
8
|
+
import { SyncSettingsUpdateResult, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-DUqTrC5T.mjs";
|
|
10
9
|
|
|
11
10
|
//#region src/commands/git-sync/remove-collection.ts
|
|
12
11
|
var remove_collection_default = defineMetabaseCommand({
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import "./
|
|
9
|
-
import { DatabaseSyncResult, databaseSyncResultView } from "./database-BXiue1in.mjs";
|
|
10
|
-
import { z } from "zod";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
7
|
+
import "./table-CkWja2UH.mjs";
|
|
8
|
+
import { DatabaseSyncResult, DatabaseTaskAck, databaseSyncResultView } from "./database-Dsv4QBs0.mjs";
|
|
11
9
|
|
|
12
10
|
//#region src/commands/db/rescan-values.ts
|
|
13
|
-
const RescanValuesApiResponse = z.object({ status: z.literal("ok") });
|
|
14
11
|
var rescan_values_default = defineMetabaseCommand({
|
|
15
12
|
meta: {
|
|
16
13
|
name: "rescan-values",
|
|
@@ -32,7 +29,7 @@ var rescan_values_default = defineMetabaseCommand({
|
|
|
32
29
|
async run({ args, ctx, getClient }) {
|
|
33
30
|
const id = parseId(args.id);
|
|
34
31
|
const client = await getClient();
|
|
35
|
-
const response = await client.requestParsed(
|
|
32
|
+
const response = await client.requestParsed(DatabaseTaskAck, `/api/database/${id}/rescan_values`, { method: "POST" });
|
|
36
33
|
renderSummary({
|
|
37
34
|
id,
|
|
38
35
|
status: response.status
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { TimeoutError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
6
|
+
import { pollUntil } from "./poll-BucRFJT-.mjs";
|
|
7
|
+
import { parseWaitFlags, waitFlags } from "./wait-flags-_LnHOeBA.mjs";
|
|
8
|
+
import { Transform, TransformRun } from "./transform--dviwMA1.mjs";
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
|
|
11
|
+
//#region src/commands/transform/run.ts
|
|
12
|
+
const RUN_TERMINAL_STATUSES = new Set([
|
|
13
|
+
"succeeded",
|
|
14
|
+
"failed",
|
|
15
|
+
"timeout",
|
|
16
|
+
"canceled"
|
|
17
|
+
]);
|
|
18
|
+
const RUN_FAILURE_STATUSES = new Set([
|
|
19
|
+
"failed",
|
|
20
|
+
"timeout",
|
|
21
|
+
"canceled"
|
|
22
|
+
]);
|
|
23
|
+
const TransformRunKickoff = z.object({
|
|
24
|
+
message: z.string(),
|
|
25
|
+
run_id: z.number().int().positive().nullable()
|
|
26
|
+
});
|
|
27
|
+
const TransformRunResult = z.object({
|
|
28
|
+
message: z.string(),
|
|
29
|
+
run_id: z.number().int().positive().nullable(),
|
|
30
|
+
final: TransformRun.nullable(),
|
|
31
|
+
target_table_id: z.number().int().nullable().optional()
|
|
32
|
+
});
|
|
33
|
+
const transformRunResultView = {
|
|
34
|
+
compactPick: TransformRunResult,
|
|
35
|
+
tableColumns: [
|
|
36
|
+
{
|
|
37
|
+
key: "run_id",
|
|
38
|
+
label: "Run ID"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: "message",
|
|
42
|
+
label: "Message"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: "target_table_id",
|
|
46
|
+
label: "Target table"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
};
|
|
50
|
+
var run_default = defineMetabaseCommand({
|
|
51
|
+
meta: {
|
|
52
|
+
name: "run",
|
|
53
|
+
description: "Trigger a transform run by id"
|
|
54
|
+
},
|
|
55
|
+
details: "Starts a run and returns immediately. --wait polls the run to a terminal status. --sync additionally waits until the run's output table is registered and returns its `target_table_id`, so you can build MBQL cards against it — the run registers the table itself, so no separate `db sync-schema` is needed; --sync implies waiting for the run.",
|
|
56
|
+
capabilities: { minVersion: 59 },
|
|
57
|
+
args: {
|
|
58
|
+
...outputFlags,
|
|
59
|
+
...profileFlag,
|
|
60
|
+
...connectionFlags,
|
|
61
|
+
...waitFlags,
|
|
62
|
+
sync: {
|
|
63
|
+
type: "boolean",
|
|
64
|
+
description: "After a successful run, wait until the output table is registered and return its id (implies --wait)",
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
id: {
|
|
68
|
+
type: "positional",
|
|
69
|
+
description: "Transform id",
|
|
70
|
+
required: true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
outputSchema: TransformRunResult,
|
|
74
|
+
examples: [
|
|
75
|
+
"mb transform run 1",
|
|
76
|
+
"mb transform run 1 --wait --json",
|
|
77
|
+
"mb transform run 1 --sync --json"
|
|
78
|
+
],
|
|
79
|
+
async run({ args, ctx, getClient }) {
|
|
80
|
+
const id = parseId(args.id);
|
|
81
|
+
const syncTarget = args.sync === true;
|
|
82
|
+
const wait = parseWaitFlags(args);
|
|
83
|
+
const waitForRun = wait.enabled || syncTarget;
|
|
84
|
+
const client = await getClient();
|
|
85
|
+
const kickoff = await client.requestParsed(TransformRunKickoff, `/api/transform/${id}/run`, { method: "POST" });
|
|
86
|
+
if (!waitForRun) {
|
|
87
|
+
const started = kickoff.run_id === null ? kickoff.message : `Started run ${kickoff.run_id} for transform ${id}.`;
|
|
88
|
+
renderSummary({
|
|
89
|
+
message: kickoff.message,
|
|
90
|
+
run_id: kickoff.run_id,
|
|
91
|
+
final: null
|
|
92
|
+
}, transformRunResultView, started, ctx);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (kickoff.run_id === null) {
|
|
96
|
+
renderSummary({
|
|
97
|
+
message: kickoff.message,
|
|
98
|
+
run_id: null,
|
|
99
|
+
final: null
|
|
100
|
+
}, transformRunResultView, kickoff.message, ctx);
|
|
101
|
+
throw new Error(`transform run did not start: ${kickoff.message}`);
|
|
102
|
+
}
|
|
103
|
+
const runId = kickoff.run_id;
|
|
104
|
+
const final = await pollUntil(async () => client.requestParsed(TransformRun, `/api/transform/run/${runId}`), (run) => RUN_TERMINAL_STATUSES.has(run.status), wait.schedule);
|
|
105
|
+
const failed = RUN_FAILURE_STATUSES.has(final.status);
|
|
106
|
+
const targetTableId = syncTarget && !failed ? await awaitTargetTableId(client, id, wait.schedule) : void 0;
|
|
107
|
+
const result = {
|
|
108
|
+
message: kickoff.message,
|
|
109
|
+
run_id: runId,
|
|
110
|
+
final
|
|
111
|
+
};
|
|
112
|
+
if (syncTarget) result.target_table_id = targetTableId ?? null;
|
|
113
|
+
renderSummary(result, transformRunResultView, summaryLine(id, runId, final.status, syncTarget, targetTableId), ctx);
|
|
114
|
+
if (failed) throw new Error(`transform run ${runId} ${final.status}`);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
async function awaitTargetTableId(client, transformId, schedule) {
|
|
118
|
+
try {
|
|
119
|
+
const linked = await pollUntil(async () => client.requestParsed(Transform, `/api/transform/${transformId}`), (transform) => linkedTableId(transform) !== null, schedule);
|
|
120
|
+
return linkedTableId(linked);
|
|
121
|
+
} catch (error) {
|
|
122
|
+
if (error instanceof TimeoutError) return null;
|
|
123
|
+
throw error;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function linkedTableId(transform) {
|
|
127
|
+
return transform.target_table_id ?? transform.table?.id ?? null;
|
|
128
|
+
}
|
|
129
|
+
function summaryLine(transformId, runId, status, syncTarget, targetTableId) {
|
|
130
|
+
const base = `Run ${runId} of transform ${transformId} ${status}.`;
|
|
131
|
+
if (!syncTarget) return base;
|
|
132
|
+
return targetTableId === null || targetTableId === void 0 ? `${base} Output table not registered before the wait timeout (it may still be syncing).` : `${base} Output table ${targetTableId} registered.`;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
//#endregion
|
|
136
|
+
export { run_default as default };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { TransformRun, TransformRunCompact, transformRunView } from "./transform-BKahefz_.mjs";
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderList } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
6
|
+
import { collectPaginated } from "./paginate-Dfm9eO9A.mjs";
|
|
7
|
+
import { TransformRun, TransformRunCompact, transformRunView } from "./transform--dviwMA1.mjs";
|
|
9
8
|
|
|
10
9
|
//#region src/commands/transform/runs.ts
|
|
11
10
|
const TransformRunListEnvelope = listEnvelopeSchema(TransformRunCompact);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbortError, ConfigError, MetabaseError, NetworkError, ResponseShapeError, TimeoutError, ValidationError, errorMessage, flagConsumesValue, isNotFoundError, normalizeFlag, setMetabaseAugment, toAliasArray } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { DEFAULT_MAX_BYTES, package_default, reportError } from "./error-
|
|
3
|
-
import { BASELINE_CAPABILITIES, isPlainObject, warn } from "./capabilities-
|
|
2
|
+
import { DEFAULT_MAX_BYTES, package_default, reportError } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { BASELINE_CAPABILITIES, isPlainObject, warn } from "./capabilities-7L9GVMd_.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { promises } from "node:fs";
|
|
@@ -124,10 +124,7 @@ const ProfileRecord = z.object({
|
|
|
124
124
|
lastProbe: ProfileLastProbe.nullable(),
|
|
125
125
|
lastFailure: ProfileLastFailure.nullable()
|
|
126
126
|
});
|
|
127
|
-
const ProfilesFile = z.object({
|
|
128
|
-
profiles: z.array(ProfileRecord),
|
|
129
|
-
license: z.string().nullable()
|
|
130
|
-
});
|
|
127
|
+
const ProfilesFile = z.object({ profiles: z.array(ProfileRecord) });
|
|
131
128
|
|
|
132
129
|
//#endregion
|
|
133
130
|
//#region src/core/auth/storage.ts
|
|
@@ -139,10 +136,7 @@ const PROFILES_FILE_MODE = 384;
|
|
|
139
136
|
const PROFILES_DIR_MODE = 448;
|
|
140
137
|
const DEFAULT_PROFILE = "default";
|
|
141
138
|
const LEGACY_STORAGE_NOTICE = "Old profile storage detected and ignored; re-run `mb auth login` for each profile.";
|
|
142
|
-
const account = {
|
|
143
|
-
profileApiKey: (profile) => `profile:${profile}:apiKey`,
|
|
144
|
-
license: "license"
|
|
145
|
-
};
|
|
139
|
+
const account = { profileApiKey: (profile) => `profile:${profile}:apiKey` };
|
|
146
140
|
let legacyWarningPending = false;
|
|
147
141
|
function profilesFilePath() {
|
|
148
142
|
return join(configDir(), PROFILES_FILE);
|
|
@@ -188,10 +182,7 @@ async function readProfilesFile() {
|
|
|
188
182
|
} catch (error) {
|
|
189
183
|
if (isNotFoundError(error)) {
|
|
190
184
|
await detectLegacyArtifacts();
|
|
191
|
-
return {
|
|
192
|
-
profiles: [],
|
|
193
|
-
license: null
|
|
194
|
-
};
|
|
185
|
+
return { profiles: [] };
|
|
195
186
|
}
|
|
196
187
|
throw error;
|
|
197
188
|
}
|
|
@@ -199,10 +190,7 @@ async function readProfilesFile() {
|
|
|
199
190
|
if (parsed.ok) return parsed.value;
|
|
200
191
|
if (parsed.error instanceof ValidationError) {
|
|
201
192
|
legacyWarningPending = true;
|
|
202
|
-
return {
|
|
203
|
-
profiles: [],
|
|
204
|
-
license: null
|
|
205
|
-
};
|
|
193
|
+
return { profiles: [] };
|
|
206
194
|
}
|
|
207
195
|
throw parsed.error;
|
|
208
196
|
}
|
|
@@ -222,7 +210,7 @@ async function fileExists(path) {
|
|
|
222
210
|
}
|
|
223
211
|
async function writeProfilesFile(file) {
|
|
224
212
|
const path = profilesFilePath();
|
|
225
|
-
if (file.profiles.length === 0
|
|
213
|
+
if (file.profiles.length === 0) {
|
|
226
214
|
await promises.unlink(path).catch(() => void 0);
|
|
227
215
|
await cleanupLegacyFiles();
|
|
228
216
|
return;
|
|
@@ -249,9 +237,9 @@ function fileLocation(key) {
|
|
|
249
237
|
reason: keyringEnabled() ? "unavailable" : "disabled"
|
|
250
238
|
};
|
|
251
239
|
}
|
|
252
|
-
function keyringFallbackWarning(location
|
|
240
|
+
function keyringFallbackWarning(location) {
|
|
253
241
|
const cause = location.reason === "disabled" ? "OS keychain disabled via METABASE_CLI_DISABLE_KEYRING" : "OS keychain unavailable";
|
|
254
|
-
return `warning: ${cause};
|
|
242
|
+
return `warning: ${cause}; credentials stored as plaintext at ${location.path}`;
|
|
255
243
|
}
|
|
256
244
|
async function persistApiKey(name, apiKey) {
|
|
257
245
|
const key = account.profileApiKey(name);
|
|
@@ -360,42 +348,6 @@ async function clearProfile(name = DEFAULT_PROFILE) {
|
|
|
360
348
|
});
|
|
361
349
|
return true;
|
|
362
350
|
}
|
|
363
|
-
async function readLicense() {
|
|
364
|
-
const fromKeyring = tryReadKeyring(account.license);
|
|
365
|
-
if (typeof fromKeyring === "string") return fromKeyring;
|
|
366
|
-
const file = await readProfilesFile();
|
|
367
|
-
return file.license;
|
|
368
|
-
}
|
|
369
|
-
async function writeLicense(token) {
|
|
370
|
-
const key = account.license;
|
|
371
|
-
const file = await readProfilesFile();
|
|
372
|
-
if (trySetKeyring(key, token)) {
|
|
373
|
-
if (file.license !== null) await writeProfilesFile({
|
|
374
|
-
...file,
|
|
375
|
-
license: null
|
|
376
|
-
});
|
|
377
|
-
return {
|
|
378
|
-
backend: "keyring",
|
|
379
|
-
service: KEYRING_SERVICE,
|
|
380
|
-
account: key
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
await writeProfilesFile({
|
|
384
|
-
...file,
|
|
385
|
-
license: token
|
|
386
|
-
});
|
|
387
|
-
return fileLocation(key);
|
|
388
|
-
}
|
|
389
|
-
async function clearLicense() {
|
|
390
|
-
const removedFromKeyring = tryRemoveKeyring(account.license);
|
|
391
|
-
const file = await readProfilesFile();
|
|
392
|
-
const hadInline = file.license !== null;
|
|
393
|
-
if (hadInline) await writeProfilesFile({
|
|
394
|
-
...file,
|
|
395
|
-
license: null
|
|
396
|
-
});
|
|
397
|
-
return removedFromKeyring === true || hadInline;
|
|
398
|
-
}
|
|
399
351
|
|
|
400
352
|
//#endregion
|
|
401
353
|
//#region src/runtime/signal.ts
|
|
@@ -556,7 +508,7 @@ function buildUserMessage(kind, input, sanitizedBody) {
|
|
|
556
508
|
function buildRouteMissingMessage(input) {
|
|
557
509
|
const path = pathFromUrl(input.url);
|
|
558
510
|
if (!input.serverTag) return `This endpoint is not available on the connected Metabase: ${input.method} ${path}.`;
|
|
559
|
-
return `This endpoint is not available on Metabase ${input.serverTag}: ${input.method} ${path}. The command may require a newer Metabase major version. Run 'mb auth list' to see this server's version
|
|
511
|
+
return `This endpoint is not available on Metabase ${input.serverTag}: ${input.method} ${path}. The command may require a newer Metabase major version. Run 'mb auth list' to see this server's version.`;
|
|
560
512
|
}
|
|
561
513
|
function pathFromUrl(url) {
|
|
562
514
|
const parsed = new URL(url);
|
|
@@ -910,16 +862,12 @@ function originOnly(input) {
|
|
|
910
862
|
parsed.password = "";
|
|
911
863
|
return parsed.origin;
|
|
912
864
|
}
|
|
913
|
-
function localUrl(port) {
|
|
914
|
-
return `http://localhost:${port}`;
|
|
915
|
-
}
|
|
916
865
|
|
|
917
866
|
//#endregion
|
|
918
867
|
//#region src/core/config.ts
|
|
919
868
|
const ENV_URL = "METABASE_URL";
|
|
920
869
|
const ENV_API_KEY = "METABASE_API_KEY";
|
|
921
870
|
const ENV_PROFILE = "METABASE_PROFILE";
|
|
922
|
-
const ENV_LICENSE_TOKEN = "METABASE_LICENSE_TOKEN";
|
|
923
871
|
const ENV_SKIP_PREFLIGHT = "METABASE_CLI_SKIP_PREFLIGHT";
|
|
924
872
|
function isPreflightSkipped() {
|
|
925
873
|
return process.env[ENV_SKIP_PREFLIGHT] === "1";
|
|
@@ -936,9 +884,6 @@ function readEnvCredentials() {
|
|
|
936
884
|
apiKey: process.env[ENV_API_KEY] ?? null
|
|
937
885
|
};
|
|
938
886
|
}
|
|
939
|
-
function readEnvLicenseToken() {
|
|
940
|
-
return process.env[ENV_LICENSE_TOKEN] ?? null;
|
|
941
|
-
}
|
|
942
887
|
async function resolveConfig(flags) {
|
|
943
888
|
const profile = resolveProfileName(flags.profile);
|
|
944
889
|
const env = readEnvCredentials();
|
|
@@ -959,14 +904,6 @@ async function resolveConfig(flags) {
|
|
|
959
904
|
source: urlField.source === keyField.source ? urlField.source : "mixed"
|
|
960
905
|
};
|
|
961
906
|
}
|
|
962
|
-
async function resolveLicenseToken(flags) {
|
|
963
|
-
const flag = flags.token;
|
|
964
|
-
const env = readEnvLicenseToken();
|
|
965
|
-
const stored = !flag && !env ? await readLicense() : null;
|
|
966
|
-
const value = flag ?? env ?? stored;
|
|
967
|
-
if (!value) throw new ConfigError(`No license token. Pass --token, set ${ENV_LICENSE_TOKEN}, or store one with \`mb workspace license set\`.`);
|
|
968
|
-
return value;
|
|
969
|
-
}
|
|
970
907
|
async function failureHintForProfile(profile) {
|
|
971
908
|
const record = await readProfileRecord(profile);
|
|
972
909
|
if (record === null || record.lastFailure === null) return "";
|
|
@@ -1084,10 +1021,6 @@ function parseInteger(value, options) {
|
|
|
1084
1021
|
if (parsed < options.min) throw new ConfigError(`invalid ${options.name}: ${parsed} (must be ≥ ${options.min})`);
|
|
1085
1022
|
return parsed;
|
|
1086
1023
|
}
|
|
1087
|
-
function parseOptionalInteger(value, options) {
|
|
1088
|
-
if (value === void 0 || value === "") return null;
|
|
1089
|
-
return parseInteger(value, options);
|
|
1090
|
-
}
|
|
1091
1024
|
|
|
1092
1025
|
//#endregion
|
|
1093
1026
|
//#region src/commands/context.ts
|
|
@@ -1290,4 +1223,4 @@ function buildConfigFlags(ctx) {
|
|
|
1290
1223
|
}
|
|
1291
1224
|
|
|
1292
1225
|
//#endregion
|
|
1293
|
-
export { DEFAULT_PROFILE, HttpError, ParsedVersionSchema, ProbedUser, ProfileLastFailure, TokenFeatures, USER_AGENT,
|
|
1226
|
+
export { DEFAULT_PROFILE, HttpError, ParsedVersionSchema, ProbedUser, ProfileLastFailure, TokenFeatures, USER_AGENT, clearProfile, combineAborts, createClient, defineMetabaseCommand, explicitProfileName, keyringFallbackWarning, listProfileRecords, normalizeUrl, originOnly, parseCsv, parseEnum, parseEnumCsv, parseInteger, parseJson, parseJsonOrPlain, probeServer, readEnvCredentials, readProfile, readProfileRecord, resolveProfileName, throwIfAborted, writeProbeFailure, writeProbeResult, writeProfile };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
8
|
-
import { Table, TableCompact, tableView } from "./table-qDD2kApF.mjs";
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderList } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
7
|
+
import { Table, TableCompact, tableView } from "./table-CkWja2UH.mjs";
|
|
9
8
|
import { z } from "zod";
|
|
10
9
|
|
|
11
10
|
//#region src/commands/db/schema-tables.ts
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import {
|
|
6
|
-
import { parseId } from "./parse-id-D1LTTt9L.mjs";
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderList } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
7
6
|
import { z } from "zod";
|
|
8
7
|
|
|
9
8
|
//#region src/commands/db/schemas.ts
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand, parseEnumCsv } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import {
|
|
6
|
-
import { parseId } from "./parse-id-D1LTTt9L.mjs";
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand, parseEnumCsv } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderList } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
7
6
|
import { z } from "zod";
|
|
8
7
|
|
|
9
8
|
//#region src/domain/search.ts
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/segment/index.ts
|
|
4
|
+
var segment_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "segment",
|
|
7
|
+
description: "Manage Metabase segments"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-kath_2cX.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-Bo1FGyFs.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-BxRsXQrm.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-DfNKr_vS.mjs").then((mod) => mod.default),
|
|
14
|
+
archive: () => import("./archive-DtE2H4A6.mjs").then((mod) => mod.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { segment_default as default };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { parseSettingKey, rethrowSettingError } from "./key-vkNkH82H.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { formatScalar, renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { readBody } from "./body-BdRyuvU4.mjs";
|
|
7
|
+
import { SettingValue, settingValueView } from "./setting-CSJvi1-6.mjs";
|
|
8
|
+
import { parseSettingKey, rethrowSettingError } from "./key-y4TtxKwU.mjs";
|
|
10
9
|
import { z } from "zod";
|
|
11
10
|
|
|
12
11
|
//#region src/commands/setting/set.ts
|
|
@@ -7,9 +7,9 @@ var setting_default = defineCommand({
|
|
|
7
7
|
description: "Inspect and update Metabase settings"
|
|
8
8
|
},
|
|
9
9
|
subCommands: {
|
|
10
|
-
list: () => import("./list-
|
|
11
|
-
get: () => import("./get-
|
|
12
|
-
set: () => import("./set-
|
|
10
|
+
list: () => import("./list-BgHESP7b.mjs").then((m) => m.default),
|
|
11
|
+
get: () => import("./get-CHb6J908.mjs").then((m) => m.default),
|
|
12
|
+
set: () => import("./set-7Nm2ZTb_.mjs").then((m) => m.default)
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
|