@metabase/cli 0.1.7 → 0.1.8-alpha.drop-workspaces.a42f32e
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 +2 -224
- package/dist/{add-collection-DQjTlDNF.mjs → add-collection-CuLyFlrE.mjs} +5 -5
- package/dist/add-collection-DkucDB2N.mjs +10 -0
- package/dist/{archive-BXzghEQX.mjs → archive-C1lk1rR7.mjs} +6 -7
- package/dist/{archive-CBGKzEAl.mjs → archive-C2AfP9G_.mjs} +5 -6
- package/dist/{archive-DTN9tLGT.mjs → archive-COAWrOVp.mjs} +5 -6
- package/dist/{archive-De8jzzq7.mjs → archive-DNVqPMhp.mjs} +6 -7
- package/dist/{archive-CuVk8iwN.mjs → archive-Dt1qDaIF.mjs} +6 -7
- package/dist/{archive-B3qiL-kK.mjs → archive-mdSqCzVw.mjs} +5 -6
- package/dist/auth-WILFa6Xf.mjs +19 -0
- package/dist/{body-tcURGnGh.mjs → body-b76dLVpL.mjs} +2 -2
- package/dist/{branches-CIGkjXIk.mjs → branches-DwV1q-4h.mjs} +5 -6
- package/dist/{cancel-pPsvgJ0Z.mjs → cancel-DDKstWQM.mjs} +4 -5
- package/dist/{cancel-task-BLGE4UlL.mjs → cancel-task-DX_OdGan.mjs} +5 -6
- package/dist/{render-0_GsapXa.mjs → capabilities-Dj3NgPHg.mjs} +28 -2
- package/dist/card-Bd8jLmZW.mjs +20 -0
- package/dist/{card-ezYiriML.mjs → card-BtPiKjbB.mjs} +1 -1
- package/dist/{cards-Dq3nx_9n.mjs → cards-CYKPNOp3.mjs} +5 -6
- package/dist/cli.mjs +23 -24
- package/dist/collection-gz4k8jWl.mjs +20 -0
- package/dist/{create-BrUqxreg.mjs → create-B4aKAWaQ.mjs} +7 -8
- package/dist/{create-9DBTkbMq.mjs → create-BfRIHlHk.mjs} +11 -12
- package/dist/{create-aPaUEGdr.mjs → create-BfseKO3F.mjs} +7 -8
- package/dist/{create-w3mQg9n4.mjs → create-BqiR1kvi.mjs} +7 -8
- package/dist/{create-BcgoukG4.mjs → create-BscN4jFB.mjs} +9 -10
- package/dist/{create-BdPoSk_7.mjs → create-CE1WZ4du.mjs} +9 -10
- package/dist/{create-DHscDhRd.mjs → create-CQxJpVXk.mjs} +9 -10
- package/dist/{create-BIphz0kO.mjs → create-DRhRPfD-.mjs} +10 -11
- package/dist/{create-branch-DGoc9CUU.mjs → create-branch-2yEa7-9x.mjs} +5 -6
- package/dist/{current-task-DZM28rnr.mjs → current-task-5buIatuG.mjs} +5 -6
- package/dist/dashboard-BL8_Ysst.mjs +21 -0
- package/dist/{database-BXiue1in.mjs → database-_Td7rG4o.mjs} +1 -1
- package/dist/db-Bw8m4M2J.mjs +22 -0
- package/dist/{delete-BrJOotpW.mjs → delete-C3i5dE4s.mjs} +6 -7
- package/dist/{delete-BPaFdHZP.mjs → delete-CF8in6gw.mjs} +6 -7
- package/dist/{delete-runtime-uuYbd4k2.mjs → delete-runtime-Bo7v-0au.mjs} +2 -2
- package/dist/{delete-table-CNupWUO0.mjs → delete-table-m-6cOPnX.mjs} +6 -7
- package/dist/{dirty-BCkNOY8c.mjs → dirty-hGWiemB-.mjs} +5 -6
- package/dist/{eid-CLY5X0Uw.mjs → eid-BP0H-LTl.mjs} +6 -7
- package/dist/{error-ZsFeevV2.mjs → error-BLukG0Vf.mjs} +1 -1
- package/dist/{export-CgHgWW3I.mjs → export-wh9l0s7F.mjs} +7 -8
- package/dist/field-GgVH-HUD.mjs +18 -0
- package/dist/{fields-RkRWU-u9.mjs → fields-BD52yx5k.mjs} +6 -7
- package/dist/{get-CTDqioaj.mjs → get-436DayeX.mjs} +5 -6
- package/dist/{get-B8l4t4Pz.mjs → get-B1jyFBkg.mjs} +5 -6
- package/dist/{get-42tJ7BNp.mjs → get-BLUldOxi.mjs} +5 -6
- package/dist/{get-sMpa-X4E.mjs → get-BVMyLnhh.mjs} +6 -7
- package/dist/{get-B9kwSs6U.mjs → get-BhFiIyyH.mjs} +5 -6
- package/dist/{get-CRvbChoX.mjs → get-C5PKCCzj.mjs} +5 -6
- package/dist/{get-y17zJMnU.mjs → get-C_LAPJ7J.mjs} +5 -6
- package/dist/{get-CiZrZJLt.mjs → get-CgdzDOTX.mjs} +7 -8
- package/dist/{get-DmzgSgrl.mjs → get-Cu7Om0g2.mjs} +6 -7
- package/dist/{get-DsqGHNHN.mjs → get-DETcYP1F.mjs} +5 -6
- package/dist/{get-Bo4Cpd_c.mjs → get-DSmnRBrw.mjs} +5 -7
- package/dist/{get-CvmqPN30.mjs → get-EJOWmpkC.mjs} +5 -6
- package/dist/{get-run-CBwcRc8E.mjs → get-run-BEvwTmr7.mjs} +5 -6
- package/dist/{get-C9O_aEGo.mjs → get-z9XIWbVG.mjs} +5 -6
- package/dist/git-sync-oYYp_Z6v.mjs +28 -0
- package/dist/{has-remote-changes-CfRidwXT.mjs → has-remote-changes-BNjTil7k.mjs} +5 -6
- package/dist/{import-BZV0Z2KR.mjs → import-C0iBM0UR.mjs} +7 -8
- package/dist/is-dirty-C_RyVkc1.mjs +9 -0
- package/dist/{is-dirty-hKcB4OH9.mjs → is-dirty-D_e5Xoke.mjs} +4 -4
- package/dist/{items-C94eW2Yd.mjs → items-D6h0ejme.mjs} +7 -8
- package/dist/{list-DfDZr55C.mjs → list-B3CgwSU4.mjs} +6 -7
- package/dist/{list-BS_Bxejg.mjs → list-BJxm0-6m.mjs} +6 -7
- package/dist/{list-DuSoEk_J.mjs → list-BZkOPBmK.mjs} +6 -7
- package/dist/{list-BJXaGk-z.mjs → list-CSX_xieo.mjs} +4 -5
- package/dist/{list-C-oZe1_p.mjs → list-CWItVq2v.mjs} +5 -6
- package/dist/{list-CU6sOfI-.mjs → list-CkCgkJFh.mjs} +5 -6
- package/dist/{list-BmHoYJr7.mjs → list-CmVbbX3f.mjs} +4 -5
- package/dist/{list-DrINpVLM.mjs → list-D0ZVA1e1.mjs} +4 -5
- package/dist/{list-HS15y_WN.mjs → list-DLC82gFo.mjs} +4 -5
- package/dist/{list-BFlzLGlw.mjs → list-DcV2bfg8.mjs} +4 -5
- package/dist/{list-B0V7FeL2.mjs → list-ZX3ooQ9h.mjs} +4 -6
- package/dist/{list-CF1pMN4S.mjs → list-pXgd_HTy.mjs} +4 -5
- package/dist/{list-CqN4gvCk.mjs → list-r3gm10tz.mjs} +5 -6
- package/dist/{login-enh9Yimb.mjs → login-DSS8QywX.mjs} +9 -10
- package/dist/{logout-BWLPLDh8.mjs → logout-B6acbVng.mjs} +4 -5
- package/dist/{manifest-BNh0Lw6p.mjs → manifest-B_OfG-Ss.mjs} +1 -2
- package/dist/measure-DDn0jAB8.mjs +19 -0
- package/dist/{metadata-D2TxboMm.mjs → metadata-C-bcafH-.mjs} +6 -7
- package/dist/{metadata-BTTEBWdS.mjs → metadata-D_wFDaCb.mjs} +7 -8
- package/dist/{parse-id-0_tOPvfI.mjs → parse-id-BapRoz4R.mjs} +1 -1
- package/dist/{path-C8GrBdgT.mjs → path-DmYXSF59.mjs} +4 -6
- package/dist/{poll-4eoh5J0r.mjs → poll-CYFFYOiB.mjs} +1 -1
- package/dist/{poll-task-51WRdugU.mjs → poll-task-Dalt24ov.mjs} +2 -2
- package/dist/{preflight-BhsErYz3.mjs → preflight-G7NUAKod.mjs} +3 -3
- package/dist/{query-BBCAF-tG.mjs → query-COWTai5j.mjs} +11 -12
- package/dist/{query-DYVBnu9d.mjs → query-DRosi9Ha.mjs} +7 -8
- package/dist/{query-result-ABPLz6I4.mjs → query-result-PoQE05Pe.mjs} +1 -1
- package/dist/{remove-collection-CBAHz0Dk.mjs → remove-collection-CLWw-48s.mjs} +7 -8
- package/dist/{rescan-values-cfTSNQZo.mjs → rescan-values-C3L03Crf.mjs} +7 -8
- package/dist/{run-qgdEJv-I.mjs → run-PL8TRDGx.mjs} +7 -8
- package/dist/{runs-BFIIH4GL.mjs → runs-B86YP36a.mjs} +6 -7
- package/dist/{runtime-Duawf5lE.mjs → runtime-C2EDX9E7.mjs} +10 -77
- package/dist/{schema-tables-C2xM3dho.mjs → schema-tables-CZr0QT1g.mjs} +6 -7
- package/dist/{schemas-BP7xiktH.mjs → schemas-DnGJlmQl.mjs} +4 -5
- package/dist/{search-DYP3lOlq.mjs → search-thFe-n3F.mjs} +4 -5
- package/dist/segment-ydERbF0L.mjs +19 -0
- package/dist/{set-DpRQqdo7.mjs → set-CDQE4s8H.mjs} +7 -8
- package/dist/{setting-DUa96KF3.mjs → setting-BTMmbmKB.mjs} +3 -3
- package/dist/{setup-BPlllnim.mjs → setup-mOHveOFI.mjs} +6 -7
- package/dist/{skills-BkregMyb.mjs → skills-BDPVoBWU.mjs} +33 -2
- package/dist/{skills-SqbPo0BI.mjs → skills-d2iLclsk.mjs} +3 -3
- package/dist/snippet-i1Z8-yJQ.mjs +19 -0
- package/dist/{stash-C89zNKxo.mjs → stash-B4RTStPo.mjs} +7 -8
- package/dist/{status-B1EJ_jv0.mjs → status-B7H0JH52.mjs} +6 -7
- package/dist/{status-BNvFPemM.mjs → status-DoVvjifV.mjs} +4 -5
- package/dist/{summary-Cihbx0Qs.mjs → summary-BsdiF7LZ.mjs} +5 -6
- package/dist/{sync-schema-C3odu0ZH.mjs → sync-schema-CvXkT9Rg.mjs} +7 -8
- package/dist/{table-qDD2kApF.mjs → table-CkWja2UH.mjs} +1 -1
- package/dist/table-DoAu2iwB.mjs +19 -0
- package/dist/transform-JzFSQdFi.mjs +24 -0
- package/dist/transform-job-C8q3Fcf7.mjs +19 -0
- package/dist/{tree-mvq9gM9w.mjs → tree-CGBtDXfk.mjs} +4 -5
- package/dist/{update-CbBnHz42.mjs → update-B89kI8l9.mjs} +10 -11
- package/dist/{update-CtOo3LsX.mjs → update-BA48uHRd.mjs} +9 -10
- package/dist/{update-DCrOQ1PW.mjs → update-BHit5RyS.mjs} +11 -12
- package/dist/{update-BoIiuC70.mjs → update-BJhk_A4R.mjs} +10 -11
- package/dist/{update-tRparnUs.mjs → update-BJn9ZitD.mjs} +12 -13
- package/dist/{update-C0jP0AKT.mjs → update-C44bumhM.mjs} +8 -9
- package/dist/{update-Rr4usmCo.mjs → update-DqAKFmkw.mjs} +8 -9
- package/dist/{update-VvKMnwsM.mjs → update-JpO3b8g3.mjs} +10 -11
- package/dist/{update-DwRxdflw.mjs → update-WMzbyUw2.mjs} +8 -9
- package/dist/{update-dashcard-DFvIz8Qj.mjs → update-dashcard-C8BGZtY7.mjs} +8 -9
- package/dist/{upgrade-D-Rl_fH9.mjs → upgrade-DeiR3fjf.mjs} +34 -7
- package/dist/{uuid-BSVUk8u2.mjs → uuid-BWvbC2Z8.mjs} +3 -4
- package/dist/{validate-dPEOnOf8.mjs → validate-CqVB_3_p.mjs} +1 -1
- package/dist/{validate-query-CYvOP8Ld.mjs → validate-query-BUTNK00f.mjs} +2 -2
- package/dist/{values-D1RJE4H6.mjs → values-07BZxAK5.mjs} +5 -6
- package/dist/{verify-A7BWfBPZ.mjs → verify-D2q5RI4i.mjs} +1 -1
- package/dist/{wait-DK5QDZ8n.mjs → wait-DWyuBO_X.mjs} +6 -7
- package/dist/{wait-flags-DlfbIXHw.mjs → wait-flags-Crs-j7Z8.mjs} +2 -2
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +13 -26
- package/skill-data/git-sync/SKILL.md +8 -63
- package/skill-data/transform/SKILL.md +3 -4
- package/skill-data/visualization/SKILL.md +158 -0
- package/skill-data/visualization/references/settings.md +414 -0
- package/skills/metabase-cli/SKILL.md +1 -1
- package/dist/add-collection-C9BdVBs2.mjs +0 -11
- package/dist/auth-D9eAyVoG.mjs +0 -19
- package/dist/capabilities-7e9MgquN.mjs +0 -29
- package/dist/card-DDDrWcDU.mjs +0 -20
- package/dist/collection-DkEvCDar.mjs +0 -20
- package/dist/create-B1dyuL9Y.mjs +0 -54
- package/dist/credentials-qryRLUed.mjs +0 -88
- package/dist/dashboard-BLf1RZlk.mjs +0 -21
- package/dist/database-Ce1gOJF7.mjs +0 -17
- package/dist/db-CWTFe_FZ.mjs +0 -22
- package/dist/delete-FFj1xQWO.mjs +0 -104
- package/dist/deprovision-BNr9fPDY.mjs +0 -67
- package/dist/docker-Ds252Mwc.mjs +0 -515
- package/dist/field-LL6W_c-c.mjs +0 -18
- package/dist/git-sync-CrWTo3YX.mjs +0 -28
- package/dist/is-dirty-CPzOnnH6.mjs +0 -10
- package/dist/license-B37055sr.mjs +0 -17
- package/dist/list-DUXdt0XI.mjs +0 -36
- package/dist/logs-Cu3QtvPs.mjs +0 -60
- package/dist/measure-CDlEPFtB.mjs +0 -19
- package/dist/parse-schemas-D-qVLl4z.mjs +0 -12
- package/dist/process-CM7Uu5q_.mjs +0 -105
- package/dist/provision-Chf86BF0.mjs +0 -83
- package/dist/ps-CEYtsKBj.mjs +0 -80
- package/dist/ps-CIDwaubS.mjs +0 -11
- package/dist/remove-2yInufA6.mjs +0 -64
- package/dist/segment-B6HnNGDs.mjs +0 -19
- package/dist/set-Tt-ioa4L.mjs +0 -68
- package/dist/snippet-dJ68tGsl.mjs +0 -19
- package/dist/start-DJZA67WF.mjs +0 -414
- package/dist/status-D5wSqYV_.mjs +0 -34
- package/dist/stop-5rCLmkCQ.mjs +0 -87
- package/dist/table-J2f0STnB.mjs +0 -19
- package/dist/transform-job-OW4SDhsQ.mjs +0 -19
- package/dist/transform-q1LYWQtW.mjs +0 -24
- package/dist/update-DEZayTb4.mjs +0 -78
- package/dist/url-BB6jeNQj.mjs +0 -56
- package/dist/wait-B17I_pWy.mjs +0 -19
- package/dist/workspace-D8HtUN0y.mjs +0 -72
- package/dist/workspace-credentials-8CBMQJFz.mjs +0 -100
- package/dist/workspace-ri6r3zWo.mjs +0 -25
- package/dist/yaml-Gv6wRFMF.mjs +0 -43
- package/skill-data/viz/SKILL.md +0 -137
- package/skill-data/viz/references/settings.md +0 -312
- package/skill-data/workspace/SKILL.md +0 -390
- /package/dist/{body-flags-D7q87Btw.mjs → body-flags-D78h_-Ua.mjs} +0 -0
- /package/dist/{collection-Bcy8cWYH.mjs → collection-B3sPXRLs.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-C2XG394c.mjs} +0 -0
- /package/dist/{measure-Bt3InQsA.mjs → measure-ClESGxIb.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-WmsIzUOM.mjs} +0 -0
- /package/dist/{segment-DhBmcr_E.mjs → segment-Be2v4ilr.mjs} +0 -0
- /package/dist/{setting-BzCng1Ub.mjs → setting-oL97SNeO.mjs} +0 -0
- /package/dist/{snippet-bi_0XbNT.mjs → snippet-xh42tYly.mjs} +0 -0
- /package/dist/{transform-BKahefz_.mjs → transform-DyJb0bV0.mjs} +0 -0
- /package/dist/{transform-job-DjhoJbiV.mjs → transform-job-DpDGoqQt.mjs} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/measure/index.ts
|
|
4
|
+
var measure_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "measure",
|
|
7
|
+
description: "Manage Metabase measures"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-DLC82gFo.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-C_LAPJ7J.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-CE1WZ4du.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-B89kI8l9.mjs").then((mod) => mod.default),
|
|
14
|
+
archive: () => import("./archive-Dt1qDaIF.mjs").then((mod) => mod.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { measure_default as default };
|
|
@@ -1,11 +1,10 @@
|
|
|
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 { TableQueryMetadata, tableView } from "./table-qDD2kApF.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderItem } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-BapRoz4R.mjs";
|
|
7
|
+
import { TableQueryMetadata, tableView } from "./table-CkWja2UH.mjs";
|
|
9
8
|
|
|
10
9
|
//#region src/commands/table/metadata.ts
|
|
11
10
|
var metadata_default = defineMetabaseCommand({
|
|
@@ -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-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderItem } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-BapRoz4R.mjs";
|
|
7
|
+
import "./table-CkWja2UH.mjs";
|
|
8
|
+
import { Database, databaseView } from "./database-_Td7rG4o.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-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderList } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import { findSkillByName, loadAllSkills, loadVisibleSkills } from "./skills-BDPVoBWU.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-C2EDX9E7.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-C2EDX9E7.mjs";
|
|
2
|
+
import { pollUntil } from "./poll-CYFFYOiB.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-C2EDX9E7.mjs";
|
|
3
|
+
import { writeJson } from "./capabilities-Dj3NgPHg.mjs";
|
|
4
|
+
import { Card } from "./card-BtPiKjbB.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/dashboard/preflight.ts
|
|
@@ -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-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderSummary, writeJson } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import "./field-MGxpNQUH.mjs";
|
|
7
|
+
import { CardQueryResult, cardQueryView } from "./card-BtPiKjbB.mjs";
|
|
8
|
+
import { readBody } from "./body-b76dLVpL.mjs";
|
|
9
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
10
|
+
import { assertNotLegacyEnvelopeWrappingMbql5, getQuerySchemaBundle, isMbql5Query, validateQuery } from "./validate-CqVB_3_p.mjs";
|
|
11
|
+
import { skipValidateFlag } from "./validate-query-BUTNK00f.mjs";
|
|
12
|
+
import { formatQueryResult } from "./query-result-PoQE05Pe.mjs";
|
|
14
13
|
import { z } from "zod";
|
|
15
14
|
|
|
16
15
|
//#region src/commands/query.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-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand, parseJson } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { CardQueryResult, cardQueryView } from "./card-BtPiKjbB.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-BapRoz4R.mjs";
|
|
8
|
+
import { formatQueryResult } from "./query-result-PoQE05Pe.mjs";
|
|
10
9
|
import { z } from "zod";
|
|
11
10
|
import { Writable } from "node:stream";
|
|
12
11
|
|
|
@@ -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-
|
|
8
|
-
import "./
|
|
9
|
-
import { SyncSettingsUpdateResult, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-DQjTlDNF.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-BapRoz4R.mjs";
|
|
6
|
+
import "./poll-task-Dalt24ov.mjs";
|
|
7
|
+
import "./poll-CYFFYOiB.mjs";
|
|
8
|
+
import { SyncSettingsUpdateResult, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-CuLyFlrE.mjs";
|
|
10
9
|
|
|
11
10
|
//#region src/commands/git-sync/remove-collection.ts
|
|
12
11
|
var remove_collection_default = defineMetabaseCommand({
|
|
@@ -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 { DatabaseSyncResult, databaseSyncResultView } from "./database-BXiue1in.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-BapRoz4R.mjs";
|
|
7
|
+
import "./table-CkWja2UH.mjs";
|
|
8
|
+
import { DatabaseSyncResult, databaseSyncResultView } from "./database-_Td7rG4o.mjs";
|
|
10
9
|
import { z } from "zod";
|
|
11
10
|
|
|
12
11
|
//#region src/commands/db/rescan-values.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 {
|
|
8
|
-
import {
|
|
9
|
-
import { TransformRun } from "./transform-BKahefz_.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-BapRoz4R.mjs";
|
|
6
|
+
import { pollUntil } from "./poll-CYFFYOiB.mjs";
|
|
7
|
+
import { parseWaitFlags, waitFlags } from "./wait-flags-Crs-j7Z8.mjs";
|
|
8
|
+
import { TransformRun } from "./transform-DyJb0bV0.mjs";
|
|
10
9
|
import { z } from "zod";
|
|
11
10
|
|
|
12
11
|
//#region src/commands/transform/run.ts
|
|
@@ -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-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderList } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-BapRoz4R.mjs";
|
|
6
|
+
import { collectPaginated } from "./paginate-Dfm9eO9A.mjs";
|
|
7
|
+
import { TransformRun, TransformRunCompact, transformRunView } from "./transform-DyJb0bV0.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-BLukG0Vf.mjs";
|
|
3
|
+
import { BASELINE_CAPABILITIES, isPlainObject, warn } from "./capabilities-Dj3NgPHg.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
|
|
@@ -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-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderList } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-BapRoz4R.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-0_tOPvfI.mjs";
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderList } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-BapRoz4R.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-0_tOPvfI.mjs";
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand, parseEnumCsv } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderList } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-BapRoz4R.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-DcV2bfg8.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-BhFiIyyH.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-CQxJpVXk.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-JpO3b8g3.mjs").then((mod) => mod.default),
|
|
14
|
+
archive: () => import("./archive-C1lk1rR7.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-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { formatScalar, renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { readBody } from "./body-b76dLVpL.mjs";
|
|
7
|
+
import { SettingValue, settingValueView } from "./setting-oL97SNeO.mjs";
|
|
8
|
+
import { parseSettingKey, rethrowSettingError } from "./key-C2XG394c.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-CSX_xieo.mjs").then((m) => m.default),
|
|
11
|
+
get: () => import("./get-B1jyFBkg.mjs").then((m) => m.default),
|
|
12
|
+
set: () => import("./set-CDQE4s8H.mjs").then((m) => m.default)
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
|
|
@@ -1,11 +1,10 @@
|
|
|
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 { bodyInputFlags } from "./body-flags-D7q87Btw.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BLukG0Vf.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C2EDX9E7.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { readBody } from "./body-b76dLVpL.mjs";
|
|
7
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
9
8
|
import { z } from "zod";
|
|
10
9
|
|
|
11
10
|
//#region src/domain/setup.ts
|
|
@@ -1,10 +1,41 @@
|
|
|
1
|
-
import { ConfigError, isNotFoundError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { parseYamlResult } from "./yaml-Gv6wRFMF.mjs";
|
|
1
|
+
import { ConfigError, ValidationError, errorMessage, isNotFoundError } from "./command-augment-BH9qgQ5u.mjs";
|
|
3
2
|
import { z } from "zod";
|
|
4
3
|
import { closeSync, openSync, readFileSync, readSync, readdirSync, statSync } from "node:fs";
|
|
5
4
|
import { dirname, join, resolve } from "node:path";
|
|
6
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { YAMLParseError, parse } from "yaml";
|
|
7
7
|
|
|
8
|
+
//#region src/runtime/yaml.ts
|
|
9
|
+
function parseYamlResult(input, schema, opts = {}) {
|
|
10
|
+
const sourcePrefix = opts.source ? `${opts.source}: ` : "";
|
|
11
|
+
let raw;
|
|
12
|
+
try {
|
|
13
|
+
raw = parse(input);
|
|
14
|
+
} catch (error) {
|
|
15
|
+
if (error instanceof YAMLParseError) return {
|
|
16
|
+
ok: false,
|
|
17
|
+
error: new ConfigError(`${sourcePrefix}invalid YAML: ${error.message}`)
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
ok: false,
|
|
21
|
+
error: new ConfigError(`${sourcePrefix}invalid YAML: ${errorMessage(error)}`)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const parsed = schema.safeParse(raw);
|
|
25
|
+
if (!parsed.success) return {
|
|
26
|
+
ok: false,
|
|
27
|
+
error: new ValidationError(`${sourcePrefix}value did not match expected schema`, {
|
|
28
|
+
source: opts.source ?? "<input>",
|
|
29
|
+
zodIssues: parsed.error.issues
|
|
30
|
+
})
|
|
31
|
+
};
|
|
32
|
+
return {
|
|
33
|
+
ok: true,
|
|
34
|
+
value: parsed.data
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
8
39
|
//#region src/core/skills.ts
|
|
9
40
|
const Frontmatter = z.object({
|
|
10
41
|
name: z.string().min(1),
|
|
@@ -8,9 +8,9 @@ var skills_default = defineCommand({
|
|
|
8
8
|
},
|
|
9
9
|
default: "list",
|
|
10
10
|
subCommands: {
|
|
11
|
-
list: () => import("./list-
|
|
12
|
-
get: () => import("./get-
|
|
13
|
-
path: () => import("./path-
|
|
11
|
+
list: () => import("./list-ZX3ooQ9h.mjs").then((m) => m.default),
|
|
12
|
+
get: () => import("./get-DSmnRBrw.mjs").then((m) => m.default),
|
|
13
|
+
path: () => import("./path-DmYXSF59.mjs").then((m) => m.default)
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
|
|
@@ -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: "Manage Metabase native query snippets"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-D0ZVA1e1.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-DETcYP1F.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-B4aKAWaQ.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-C44bumhM.mjs").then((mod) => mod.default),
|
|
14
|
+
archive: () => import("./archive-C2AfP9G_.mjs").then((mod) => mod.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { snippet_default as default };
|