@metabase/cli 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +128 -115
- package/dist/add-collection-C9BdVBs2.mjs +11 -0
- package/dist/{add-collection-C_iovi9i.mjs → add-collection-DQjTlDNF.mjs} +12 -5
- package/dist/archive-B3qiL-kK.mjs +40 -0
- package/dist/{archive-DdaP94H3.mjs → archive-BXzghEQX.mjs} +10 -9
- package/dist/{archive-WaEW85NB.mjs → archive-CBGKzEAl.mjs} +9 -8
- package/dist/{archive-BKPO8lEO.mjs → archive-CuVk8iwN.mjs} +10 -9
- package/dist/archive-DTN9tLGT.mjs +40 -0
- package/dist/{archive-Dvzrmdbk.mjs → archive-De8jzzq7.mjs} +10 -9
- package/dist/auth-D9eAyVoG.mjs +19 -0
- package/dist/{body-XtR7-uCO.mjs → body-tcURGnGh.mjs} +4 -4
- package/dist/{branches-XUY4JY-X.mjs → branches-CIGkjXIk.mjs} +11 -7
- package/dist/{cancel-BrUVO_ax.mjs → cancel-pPsvgJ0Z.mjs} +9 -8
- package/dist/{cancel-task-oXheTOB6.mjs → cancel-task-BLGE4UlL.mjs} +12 -8
- package/dist/capabilities-7e9MgquN.mjs +29 -0
- package/dist/card-DDDrWcDU.mjs +20 -0
- package/dist/{card-CQxvHeyP.mjs → card-ezYiriML.mjs} +1 -1
- package/dist/{cards-CONTTAG9.mjs → cards-Dq3nx_9n.mjs} +8 -7
- package/dist/cli.mjs +264 -44
- package/dist/collection-DkEvCDar.mjs +20 -0
- package/dist/{predicates-CGO17Q15.mjs → command-augment-BH9qgQ5u.mjs} +66 -14
- package/dist/{create-Cs2xntFG.mjs → create-9DBTkbMq.mjs} +18 -16
- package/dist/{create-kYpjobrq.mjs → create-B1dyuL9Y.mjs} +16 -10
- package/dist/create-BIphz0kO.mjs +52 -0
- package/dist/create-BcgoukG4.mjs +50 -0
- package/dist/create-BdPoSk_7.mjs +50 -0
- package/dist/{create-DZxUeqdf.mjs → create-BrUqxreg.mjs} +11 -10
- package/dist/create-DHscDhRd.mjs +50 -0
- package/dist/{create-Dq25vsMu.mjs → create-aPaUEGdr.mjs} +11 -10
- package/dist/{create-branch-D5u14AxL.mjs → create-branch-DGoc9CUU.mjs} +12 -8
- package/dist/{create-Ca9lIDwP.mjs → create-w3mQg9n4.mjs} +11 -10
- package/dist/{credentials-BIQ1cEzM.mjs → credentials-qryRLUed.mjs} +12 -11
- package/dist/current-task-DZM28rnr.mjs +40 -0
- package/dist/{dashboard-CnMD04PQ.mjs → dashboard-B4bn3z6t.mjs} +2 -1
- package/dist/dashboard-BLf1RZlk.mjs +21 -0
- package/dist/{database-vvig8k4x.mjs → database-BXiue1in.mjs} +1 -1
- package/dist/{database-BSvzYlRe.mjs → database-Ce1gOJF7.mjs} +3 -3
- package/dist/db-CWTFe_FZ.mjs +22 -0
- package/dist/{delete-VTAS9EUt.mjs → delete-BPaFdHZP.mjs} +11 -8
- package/dist/{delete-CUx6RT9e.mjs → delete-BrJOotpW.mjs} +11 -8
- package/dist/{remove-C6bS0Z6w.mjs → delete-FFj1xQWO.mjs} +25 -20
- package/dist/{delete-runtime-DfFMWJJ6.mjs → delete-runtime-uuYbd4k2.mjs} +9 -7
- package/dist/{delete-table-DzUneMKe.mjs → delete-table-CNupWUO0.mjs} +11 -8
- package/dist/{deprovision-CpJfGgCt.mjs → deprovision-BNr9fPDY.mjs} +18 -12
- package/dist/{dirty-nkAOXxgC.mjs → dirty-BCkNOY8c.mjs} +11 -7
- package/dist/{docker-D5FTIoD0.mjs → docker-Ds252Mwc.mjs} +4 -4
- package/dist/{translate-Cqsd0Px5.mjs → eid-CLY5X0Uw.mjs} +43 -23
- package/dist/error-ZsFeevV2.mjs +191 -0
- package/dist/{export-BWvY7X_G.mjs → export-CgHgWW3I.mjs} +20 -18
- package/dist/{field-B3gvaqpK.mjs → field-E0IBy4Uw.mjs} +12 -3
- package/dist/field-LL6W_c-c.mjs +18 -0
- package/dist/{fields-dH16G5UV.mjs → fields-RkRWU-u9.mjs} +9 -8
- package/dist/{get-D96QEU49.mjs → get-42tJ7BNp.mjs} +8 -7
- package/dist/{get-C6SR3A9t.mjs → get-B8l4t4Pz.mjs} +10 -9
- package/dist/{get-BnBRKHr7.mjs → get-B9kwSs6U.mjs} +8 -7
- package/dist/{get-7macOPAI.mjs → get-Bo4Cpd_c.mjs} +7 -7
- package/dist/{get-BcqxMVC1.mjs → get-C9O_aEGo.mjs} +8 -7
- package/dist/{get-CKxlhMy1.mjs → get-CRvbChoX.mjs} +8 -7
- package/dist/{get-B7i_nYJB.mjs → get-CTDqioaj.mjs} +8 -7
- package/dist/{get-D8e_RzZ0.mjs → get-CiZrZJLt.mjs} +10 -9
- package/dist/{get-B08K82JV.mjs → get-CvmqPN30.mjs} +8 -7
- package/dist/{get-CACaBFLt.mjs → get-DmzgSgrl.mjs} +9 -8
- package/dist/{get-R7OaVL_t.mjs → get-DsqGHNHN.mjs} +8 -7
- package/dist/get-run-CBwcRc8E.mjs +38 -0
- package/dist/{get-DNN1X2gN.mjs → get-sMpa-X4E.mjs} +9 -8
- package/dist/{get-DAWofnzK.mjs → get-y17zJMnU.mjs} +8 -7
- package/dist/git-sync-CrWTo3YX.mjs +28 -0
- package/dist/{has-remote-changes-BAnIXQXU.mjs → has-remote-changes-CfRidwXT.mjs} +13 -8
- package/dist/{import-CfdPEMng.mjs → import-BZV0Z2KR.mjs} +21 -18
- package/dist/{input-BQ-BZA8h.mjs → input-cMSEqISy.mjs} +7 -4
- package/dist/is-dirty-CPzOnnH6.mjs +10 -0
- package/dist/{is-dirty-CZWcG0vj.mjs → is-dirty-hKcB4OH9.mjs} +9 -4
- package/dist/{items-DqwahOKf.mjs → items-C94eW2Yd.mjs} +10 -9
- package/dist/key-vkNkH82H.mjs +17 -0
- package/dist/license-B37055sr.mjs +17 -0
- package/dist/{list-L63TpX1t.mjs → list-B0V7FeL2.mjs} +7 -7
- package/dist/{list-Bkd7Nbds.mjs → list-BFlzLGlw.mjs} +7 -6
- package/dist/{list-yxVAE1S7.mjs → list-BJXaGk-z.mjs} +7 -6
- package/dist/{list-BqNMpIXy.mjs → list-BS_Bxejg.mjs} +9 -8
- package/dist/{list-J277Qtki.mjs → list-BmHoYJr7.mjs} +7 -6
- package/dist/list-C-oZe1_p.mjs +173 -0
- package/dist/{list-ViT2KWhv.mjs → list-CF1pMN4S.mjs} +7 -6
- package/dist/{list-BpNU1neq.mjs → list-CU6sOfI-.mjs} +9 -7
- package/dist/{list-oftHLFbE.mjs → list-CqN4gvCk.mjs} +9 -7
- package/dist/{list-DBOYoJtA.mjs → list-DUXdt0XI.mjs} +10 -6
- package/dist/{list-D41gfkKb.mjs → list-DfDZr55C.mjs} +10 -8
- package/dist/{list-vF4EneaE.mjs → list-DrINpVLM.mjs} +7 -6
- package/dist/{list-DJcGwJ4W.mjs → list-DuSoEk_J.mjs} +9 -8
- package/dist/{list-CQkDqphl.mjs → list-HS15y_WN.mjs} +7 -6
- package/dist/login-enh9Yimb.mjs +181 -0
- package/dist/{logout-DD4q5whi.mjs → logout-BWLPLDh8.mjs} +13 -11
- package/dist/{logs-Ci3mJE2z.mjs → logs-Cu3QtvPs.mjs} +9 -8
- package/dist/{manifest-CGM7XNLC.mjs → manifest-BNh0Lw6p.mjs} +15 -15
- package/dist/{measure-BEQfnLdN.mjs → measure-Bt3InQsA.mjs} +2 -2
- package/dist/measure-CDlEPFtB.mjs +19 -0
- package/dist/{metadata-BDat-jN9.mjs → metadata-BTTEBWdS.mjs} +10 -9
- package/dist/{metadata-29_qlqbz.mjs → metadata-D2TxboMm.mjs} +9 -8
- package/dist/parse-enum-CrEWOhuY.mjs +11 -0
- package/dist/{parse-id-CysSaCbf.mjs → parse-id-0_tOPvfI.mjs} +1 -1
- package/dist/{parse-ref-D1yeDOn8.mjs → parse-ref-DKag6a6I.mjs} +1 -1
- package/dist/{parse-schemas-B10n01ez.mjs → parse-schemas-D-qVLl4z.mjs} +2 -2
- package/dist/{path-DLByFMMA.mjs → path-C8GrBdgT.mjs} +7 -7
- package/dist/{poll-p9Y7-JEQ.mjs → poll-4eoh5J0r.mjs} +2 -2
- package/dist/{poll-task-BQe0NvJZ.mjs → poll-task-51WRdugU.mjs} +19 -20
- package/dist/{preflight-CvFu0Cct.mjs → preflight-BhsErYz3.mjs} +4 -4
- package/dist/{process-zJeVJZTM.mjs → process-CM7Uu5q_.mjs} +1 -1
- package/dist/{prompt-DgDNy_Pc.mjs → prompt-CFKoys7k.mjs} +3 -1
- package/dist/provision-Chf86BF0.mjs +83 -0
- package/dist/{ps-BxQdpkr5.mjs → ps-CEYtsKBj.mjs} +5 -3
- package/dist/ps-CIDwaubS.mjs +11 -0
- package/dist/{query-C7zTlFJA.mjs → query-BBCAF-tG.mjs} +17 -14
- package/dist/{query-CFH4nBlK.mjs → query-DYVBnu9d.mjs} +12 -9
- package/dist/query-result-ABPLz6I4.mjs +19 -0
- package/dist/{remove-BuWxx3hY.mjs → remove-2yInufA6.mjs} +14 -12
- package/dist/remove-collection-CBAHz0Dk.mjs +44 -0
- package/dist/{render-DuoDUTVL.mjs → render-0_GsapXa.mjs} +51 -23
- package/dist/render-khznBlla.mjs +32 -0
- package/dist/{rescan-values-DabyRYQ_.mjs → rescan-values-cfTSNQZo.mjs} +12 -11
- package/dist/{run-Cl-9RtC4.mjs → run-qgdEJv-I.mjs} +17 -15
- package/dist/{runs-BH6s1Zao.mjs → runs-BFIIH4GL.mjs} +9 -8
- package/dist/{runtime-CDu6fykq.mjs → runtime-Duawf5lE.mjs} +653 -428
- package/dist/{schema-tables-i58wp_p3.mjs → schema-tables-C2xM3dho.mjs} +9 -8
- package/dist/{schemas-_m8RYRl9.mjs → schemas-BP7xiktH.mjs} +7 -6
- package/dist/{search-DObOsjbP.mjs → search-DYP3lOlq.mjs} +12 -16
- package/dist/segment-B6HnNGDs.mjs +19 -0
- package/dist/{set-CwVWeAsi.mjs → set-DpRQqdo7.mjs} +13 -11
- package/dist/{set-CJA9dpK6.mjs → set-Tt-ioa4L.mjs} +14 -13
- package/dist/setting-DUa96KF3.mjs +17 -0
- package/dist/{setup-DqBOe3HZ.mjs → setup-BPlllnim.mjs} +10 -9
- package/dist/{skills-CHU7uuDU.mjs → skills-BkregMyb.mjs} +2 -2
- package/dist/{skills-C2rTVj0n.mjs → skills-SqbPo0BI.mjs} +3 -3
- package/dist/snippet-dJ68tGsl.mjs +19 -0
- package/dist/{start-CfruN4wF.mjs → start-DJZA67WF.mjs} +70 -38
- package/dist/{stash-CWuXKSZq.mjs → stash-C89zNKxo.mjs} +21 -18
- package/dist/{status-D-RYZB9G.mjs → status-B1EJ_jv0.mjs} +16 -9
- package/dist/status-BNvFPemM.mjs +100 -0
- package/dist/status-D5wSqYV_.mjs +34 -0
- package/dist/{stop-D8Hr4cKX.mjs → stop-5rCLmkCQ.mjs} +16 -11
- package/dist/{summary-Lt2XLBK9.mjs → summary-Cihbx0Qs.mjs} +8 -7
- package/dist/{sync-schema-BDElSynU.mjs → sync-schema-C3odu0ZH.mjs} +12 -11
- package/dist/table-J2f0STnB.mjs +19 -0
- package/dist/{table-B-PYcgGb.mjs → table-qDD2kApF.mjs} +1 -1
- package/dist/{transform-job-BrhOLO4M.mjs → transform-job-DjhoJbiV.mjs} +1 -1
- package/dist/transform-job-OW4SDhsQ.mjs +19 -0
- package/dist/transform-q1LYWQtW.mjs +24 -0
- package/dist/{tree-DfvjDjmk.mjs → tree-mvq9gM9w.mjs} +7 -6
- package/dist/{update-DzgXF082.mjs → update-BoIiuC70.mjs} +16 -14
- package/dist/{update-qnFY5IuC.mjs → update-C0jP0AKT.mjs} +12 -11
- package/dist/{update-zp7pCBZH.mjs → update-CbBnHz42.mjs} +16 -14
- package/dist/{update-B0bjPqKC.mjs → update-CtOo3LsX.mjs} +13 -12
- package/dist/{update-CVxOxmt6.mjs → update-DCrOQ1PW.mjs} +17 -15
- package/dist/{update-BYduslhn.mjs → update-DEZayTb4.mjs} +20 -15
- package/dist/{update-BgcroYkF.mjs → update-DwRxdflw.mjs} +12 -11
- package/dist/{update-D9Z8cL7h.mjs → update-Rr4usmCo.mjs} +12 -11
- package/dist/{update-DuA8-cCq.mjs → update-VvKMnwsM.mjs} +16 -14
- package/dist/{update-dashcard-CQ3kmmss.mjs → update-dashcard-DFvIz8Qj.mjs} +12 -11
- package/dist/{update-CqnDMNtZ.mjs → update-tRparnUs.mjs} +18 -16
- package/dist/{upgrade-CIgTr2CG.mjs → upgrade-D-Rl_fH9.mjs} +16 -29
- package/dist/{url-B5MgZXzg.mjs → url-BB6jeNQj.mjs} +11 -10
- package/dist/{uuid-CJz9TmHI.mjs → uuid-BSVUk8u2.mjs} +8 -6
- package/dist/{validate-CB0bu50i.mjs → validate-dPEOnOf8.mjs} +2 -1
- package/dist/{validate-query-CavIA0Q2.mjs → validate-query-CYvOP8Ld.mjs} +3 -3
- package/dist/values-D1RJE4H6.mjs +45 -0
- package/dist/verify-A7BWfBPZ.mjs +79 -0
- package/dist/{wait-BFqBlg0y.mjs → wait-B17I_pWy.mjs} +2 -2
- package/dist/{wait-tDp9ZOou.mjs → wait-DK5QDZ8n.mjs} +14 -10
- package/dist/{wait-flags-CN-e9zNq.mjs → wait-flags-DlfbIXHw.mjs} +20 -9
- package/dist/{workspace-credentials-4lIxxz4g.mjs → workspace-credentials-8CBMQJFz.mjs} +2 -2
- package/dist/workspace-ri6r3zWo.mjs +25 -0
- package/dist/{yaml-ECiog374.mjs → yaml-Gv6wRFMF.mjs} +1 -1
- package/package.json +2 -1
- package/skill-data/core/SKILL.md +55 -453
- package/skill-data/git-sync/SKILL.md +1 -1
- package/skill-data/mbql/SKILL.md +156 -0
- package/skill-data/mbql/references/operators.md +253 -0
- package/skill-data/transform/SKILL.md +2 -40
- package/skill-data/viz/SKILL.md +137 -0
- package/skill-data/viz/references/settings.md +312 -0
- package/skill-data/workspace/SKILL.md +45 -63
- package/skills/metabase-cli/SKILL.md +5 -26
- package/dist/add-collection-ucsyAMkV.mjs +0 -11
- package/dist/api-key-BENHbTbV.mjs +0 -13
- package/dist/auth-DICRtJDy.mjs +0 -19
- package/dist/card-l-UmrUIo.mjs +0 -20
- package/dist/collection-oV0olVY-.mjs +0 -19
- package/dist/command-augment-D9pI9Vbh.mjs +0 -11
- package/dist/create-CrUq6sib.mjs +0 -125
- package/dist/create-D3Z878yr.mjs +0 -50
- package/dist/create-Le3Bqn7b.mjs +0 -48
- package/dist/create-V-q2rU0T.mjs +0 -48
- package/dist/create-swbIXdo5.mjs +0 -48
- package/dist/current-task-DCq7rk9V.mjs +0 -36
- package/dist/dashboard-hbKDd36X.mjs +0 -20
- package/dist/db-qVK6NsdB.mjs +0 -22
- package/dist/eid-CDFXX_6H.mjs +0 -13
- package/dist/field-C0LE7RQI.mjs +0 -18
- package/dist/flag-pair-Fmcdkrfx.mjs +0 -17
- package/dist/get-run-CwFuR4Uw.mjs +0 -36
- package/dist/git-sync-DV7YjniX.mjs +0 -28
- package/dist/is-dirty-LxVbm2C5.mjs +0 -10
- package/dist/key-CCJdVWKc.mjs +0 -12
- package/dist/license-Cb6ewEJO.mjs +0 -17
- package/dist/list-DV6CONhp.mjs +0 -55
- package/dist/login-D1nZwgKv.mjs +0 -192
- package/dist/measure-XhJuL77y.mjs +0 -19
- package/dist/package-DFUprkSZ.mjs +0 -85
- package/dist/provision-BP-b4Are.mjs +0 -77
- package/dist/ps-Bk6unzaX.mjs +0 -11
- package/dist/remove-collection-Bc4roCq0.mjs +0 -38
- package/dist/segment-DfxZdJmR.mjs +0 -19
- package/dist/setting-Czy4ws6h.mjs +0 -18
- package/dist/snippet-BCY4KHBU.mjs +0 -19
- package/dist/status-1oUnw803.mjs +0 -56
- package/dist/status-J9HIDcA5.mjs +0 -32
- package/dist/table-BwX3Ib5f.mjs +0 -19
- package/dist/transform-iaAi37V0.mjs +0 -24
- package/dist/transform-job-Bemonf82.mjs +0 -19
- package/dist/values-BXN6tx1i.mjs +0 -36
- package/dist/workspace-BBsT0H0g.mjs +0 -24
- /package/dist/{body-flags-BK7J6Daz.mjs → body-flags-D7q87Btw.mjs} +0 -0
- /package/dist/{collection-B3sPXRLs.mjs → collection-Bcy8cWYH.mjs} +0 -0
- /package/dist/{paginate-CTSfuYiF.mjs → paginate-BexjkjbY.mjs} +0 -0
- /package/dist/{revision-message-flag-oyq2xrDU.mjs → revision-message-flag-DY29-cgz.mjs} +0 -0
- /package/dist/{segment-BMrUBz94.mjs → segment-DhBmcr_E.mjs} +0 -0
- /package/dist/{setting-CTaAeMci.mjs → setting-BzCng1Ub.mjs} +0 -0
- /package/dist/{snippet-CSWqkslB.mjs → snippet-bi_0XbNT.mjs} +0 -0
- /package/dist/{transform-DR4ejuPM.mjs → transform-BKahefz_.mjs} +0 -0
- /package/dist/{workspace-DUfqhPm5.mjs → workspace-D8HtUN0y.mjs} +0 -0
|
@@ -156,7 +156,8 @@ const DashcardPatchInput = z.object({
|
|
|
156
156
|
dashboard_tab_id: z.number().int().nullable().optional(),
|
|
157
157
|
parameter_mappings: z.array(z.unknown()).optional(),
|
|
158
158
|
inline_parameters: z.array(z.string()).optional(),
|
|
159
|
-
visualization_settings: z.unknown().optional()
|
|
159
|
+
visualization_settings: z.unknown().optional(),
|
|
160
|
+
series: z.array(z.unknown()).optional()
|
|
160
161
|
}).strict().refine((value) => Object.keys(value).length > 0, { message: "patch must contain at least one field" });
|
|
161
162
|
|
|
162
163
|
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
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-CqN4gvCk.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-C9O_aEGo.mjs").then((mod) => mod.default),
|
|
12
|
+
cards: () => import("./cards-Dq3nx_9n.mjs").then((mod) => mod.default),
|
|
13
|
+
create: () => import("./create-9DBTkbMq.mjs").then((mod) => mod.default),
|
|
14
|
+
update: () => import("./update-tRparnUs.mjs").then((mod) => mod.default),
|
|
15
|
+
"update-dashcard": () => import("./update-dashcard-DFvIz8Qj.mjs").then((mod) => mod.default),
|
|
16
|
+
archive: () => import("./archive-B3qiL-kK.mjs").then((mod) => mod.default)
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
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-Chf86BF0.mjs").then((mod) => mod.default),
|
|
11
|
+
update: () => import("./update-DEZayTb4.mjs").then((mod) => mod.default),
|
|
12
|
+
deprovision: () => import("./deprovision-BNr9fPDY.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 and sync Metabase databases",
|
|
8
|
+
alias: "database"
|
|
9
|
+
},
|
|
10
|
+
subCommands: {
|
|
11
|
+
list: () => import("./list-BS_Bxejg.mjs").then((m) => m.default),
|
|
12
|
+
get: () => import("./get-CiZrZJLt.mjs").then((m) => m.default),
|
|
13
|
+
metadata: () => import("./metadata-BTTEBWdS.mjs").then((m) => m.default),
|
|
14
|
+
schemas: () => import("./schemas-BP7xiktH.mjs").then((m) => m.default),
|
|
15
|
+
"schema-tables": () => import("./schema-tables-C2xM3dho.mjs").then((m) => m.default),
|
|
16
|
+
"sync-schema": () => import("./sync-schema-C3odu0ZH.mjs").then((m) => m.default),
|
|
17
|
+
"rescan-values": () => import("./rescan-values-cfTSNQZo.mjs").then((m) => m.default)
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { db_default as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import "./
|
|
8
|
-
import { DeleteResult, confirmAndDelete } from "./delete-runtime-
|
|
1
|
+
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
|
|
4
|
+
import "./capabilities-7e9MgquN.mjs";
|
|
5
|
+
import "./render-0_GsapXa.mjs";
|
|
6
|
+
import "./prompt-CFKoys7k.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-0_tOPvfI.mjs";
|
|
8
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-uuYbd4k2.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/transform/delete.ts
|
|
11
11
|
var delete_default = defineMetabaseCommand({
|
|
@@ -13,6 +13,7 @@ var delete_default = defineMetabaseCommand({
|
|
|
13
13
|
name: "delete",
|
|
14
14
|
description: "Delete a transform by id"
|
|
15
15
|
},
|
|
16
|
+
capabilities: { minVersion: 59 },
|
|
16
17
|
args: {
|
|
17
18
|
...outputFlags,
|
|
18
19
|
...profileFlag,
|
|
@@ -38,6 +39,8 @@ var delete_default = defineMetabaseCommand({
|
|
|
38
39
|
path: `/api/transform/${id}`,
|
|
39
40
|
yes: args.yes,
|
|
40
41
|
promptMessage: `Delete transform ${id}?`,
|
|
42
|
+
successMessage: `Deleted transform ${id}.`,
|
|
43
|
+
abortMessage: `Aborted; transform ${id} was not deleted.`,
|
|
41
44
|
client,
|
|
42
45
|
ctx
|
|
43
46
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import "./
|
|
8
|
-
import { DeleteResult, confirmAndDelete } from "./delete-runtime-
|
|
1
|
+
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
|
|
4
|
+
import "./capabilities-7e9MgquN.mjs";
|
|
5
|
+
import "./render-0_GsapXa.mjs";
|
|
6
|
+
import "./prompt-CFKoys7k.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-0_tOPvfI.mjs";
|
|
8
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-uuYbd4k2.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/transform-job/delete.ts
|
|
11
11
|
var delete_default = defineMetabaseCommand({
|
|
@@ -13,6 +13,7 @@ var delete_default = defineMetabaseCommand({
|
|
|
13
13
|
name: "delete",
|
|
14
14
|
description: "Delete a transform job by id"
|
|
15
15
|
},
|
|
16
|
+
capabilities: { minVersion: 59 },
|
|
16
17
|
args: {
|
|
17
18
|
...outputFlags,
|
|
18
19
|
...profileFlag,
|
|
@@ -38,6 +39,8 @@ var delete_default = defineMetabaseCommand({
|
|
|
38
39
|
path: `/api/transform-job/${id}`,
|
|
39
40
|
yes: args.yes,
|
|
40
41
|
promptMessage: `Delete transform job ${id}?`,
|
|
42
|
+
successMessage: `Deleted transform job ${id}.`,
|
|
43
|
+
abortMessage: `Aborted; transform job ${id} was not deleted.`,
|
|
41
44
|
client,
|
|
42
45
|
ctx
|
|
43
46
|
});
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "./poll-
|
|
9
|
-
import "./process-
|
|
10
|
-
import { checkDockerReady, containerNameFor, removeContainer, removeVolume, volumeNameFor } from "./docker-
|
|
1
|
+
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { outputFlags } from "./error-ZsFeevV2.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
|
|
4
|
+
import "./capabilities-7e9MgquN.mjs";
|
|
5
|
+
import { renderSummary } from "./render-0_GsapXa.mjs";
|
|
6
|
+
import { promptConfirm } from "./prompt-CFKoys7k.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-0_tOPvfI.mjs";
|
|
8
|
+
import "./poll-4eoh5J0r.mjs";
|
|
9
|
+
import "./process-CM7Uu5q_.mjs";
|
|
10
|
+
import { checkDockerReady, containerNameFor, removeContainer, removeVolume, volumeNameFor } from "./docker-Ds252Mwc.mjs";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
|
|
13
|
-
//#region src/commands/workspace/
|
|
14
|
-
const
|
|
13
|
+
//#region src/commands/workspace/delete.ts
|
|
14
|
+
const DeleteResult = z.object({
|
|
15
15
|
workspace_id: z.number().int().positive(),
|
|
16
16
|
container_name: z.string(),
|
|
17
17
|
volume_name: z.string(),
|
|
18
18
|
removed_container: z.boolean(),
|
|
19
19
|
removed_volume: z.boolean()
|
|
20
20
|
});
|
|
21
|
-
const
|
|
22
|
-
compactPick:
|
|
21
|
+
const deleteResultView = {
|
|
22
|
+
compactPick: DeleteResult.pick({
|
|
23
23
|
workspace_id: true,
|
|
24
24
|
removed_container: true,
|
|
25
25
|
removed_volume: true
|
|
@@ -47,11 +47,12 @@ const removeResultView = {
|
|
|
47
47
|
}
|
|
48
48
|
]
|
|
49
49
|
};
|
|
50
|
-
var
|
|
50
|
+
var delete_default = defineMetabaseCommand({
|
|
51
51
|
meta: {
|
|
52
|
-
name: "
|
|
52
|
+
name: "delete",
|
|
53
53
|
description: "Stop and remove the local container + app-db volume (does not affect remote)"
|
|
54
54
|
},
|
|
55
|
+
capabilities: null,
|
|
55
56
|
args: {
|
|
56
57
|
...outputFlags,
|
|
57
58
|
id: {
|
|
@@ -70,8 +71,8 @@ var remove_default = defineMetabaseCommand({
|
|
|
70
71
|
default: false
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
|
-
outputSchema:
|
|
74
|
-
examples: ["mb workspace
|
|
74
|
+
outputSchema: DeleteResult,
|
|
75
|
+
examples: ["mb workspace delete 1 --yes", "mb workspace delete 1 --keep-volume --yes"],
|
|
75
76
|
async run({ args, ctx }) {
|
|
76
77
|
const workspaceId = parseId(args.id);
|
|
77
78
|
const containerName = containerNameFor(workspaceId);
|
|
@@ -91,9 +92,13 @@ var remove_default = defineMetabaseCommand({
|
|
|
91
92
|
removed_container: removedContainer,
|
|
92
93
|
removed_volume: removedVolume
|
|
93
94
|
};
|
|
94
|
-
|
|
95
|
+
let message;
|
|
96
|
+
if (!result.removed_container) message = `No container found for workspace ${workspaceId} — nothing to remove.`;
|
|
97
|
+
else if (result.removed_volume) message = `Removed workspace ${workspaceId}: container ${containerName} and app-db volume ${volumeName}.`;
|
|
98
|
+
else message = `Removed workspace ${workspaceId}: container ${containerName} (volume ${volumeName} kept).`;
|
|
99
|
+
renderSummary(result, deleteResultView, message, ctx);
|
|
95
100
|
}
|
|
96
101
|
});
|
|
97
102
|
|
|
98
103
|
//#endregion
|
|
99
|
-
export {
|
|
104
|
+
export { delete_default as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ConfigError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { renderSummary } from "./render-0_GsapXa.mjs";
|
|
3
|
+
import { promptConfirm } from "./prompt-CFKoys7k.mjs";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
|
|
5
6
|
//#region src/commands/delete-runtime.ts
|
|
@@ -26,17 +27,18 @@ const deleteResultView = {
|
|
|
26
27
|
]
|
|
27
28
|
};
|
|
28
29
|
async function confirmAndDelete(args) {
|
|
29
|
-
if (!args.yes
|
|
30
|
+
if (!args.yes) {
|
|
31
|
+
if (process.stdin.isTTY !== true) throw new ConfigError(`refusing to delete ${args.id} without confirmation — pass --yes to proceed non-interactively`);
|
|
30
32
|
const ok = await promptConfirm({
|
|
31
33
|
message: args.promptMessage,
|
|
32
34
|
initialValue: false
|
|
33
35
|
});
|
|
34
36
|
if (!ok) {
|
|
35
|
-
|
|
37
|
+
renderSummary({
|
|
36
38
|
deleted: false,
|
|
37
39
|
aborted: true,
|
|
38
40
|
id: args.id
|
|
39
|
-
}, deleteResultView, args.ctx);
|
|
41
|
+
}, deleteResultView, args.abortMessage, args.ctx);
|
|
40
42
|
return;
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -45,11 +47,11 @@ async function confirmAndDelete(args) {
|
|
|
45
47
|
expectContentType: "binary"
|
|
46
48
|
});
|
|
47
49
|
if (args.afterDelete) await args.afterDelete();
|
|
48
|
-
|
|
50
|
+
renderSummary({
|
|
49
51
|
deleted: true,
|
|
50
52
|
aborted: false,
|
|
51
53
|
id: args.id
|
|
52
|
-
}, deleteResultView, args.ctx);
|
|
54
|
+
}, deleteResultView, args.successMessage, args.ctx);
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
//#endregion
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import "./
|
|
8
|
-
import { DeleteResult, confirmAndDelete } from "./delete-runtime-
|
|
1
|
+
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
|
|
4
|
+
import "./capabilities-7e9MgquN.mjs";
|
|
5
|
+
import "./render-0_GsapXa.mjs";
|
|
6
|
+
import "./prompt-CFKoys7k.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-0_tOPvfI.mjs";
|
|
8
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-uuYbd4k2.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/transform/delete-table.ts
|
|
11
11
|
var delete_table_default = defineMetabaseCommand({
|
|
@@ -13,6 +13,7 @@ var delete_table_default = defineMetabaseCommand({
|
|
|
13
13
|
name: "delete-table",
|
|
14
14
|
description: "Drop a transform's materialized output table (keeps the transform definition)"
|
|
15
15
|
},
|
|
16
|
+
capabilities: { minVersion: 59 },
|
|
16
17
|
args: {
|
|
17
18
|
...outputFlags,
|
|
18
19
|
...profileFlag,
|
|
@@ -38,6 +39,8 @@ var delete_table_default = defineMetabaseCommand({
|
|
|
38
39
|
path: `/api/transform/${id}/table`,
|
|
39
40
|
yes: args.yes,
|
|
40
41
|
promptMessage: `Drop transform ${id}'s output table?`,
|
|
42
|
+
successMessage: `Dropped transform ${id}'s output table.`,
|
|
43
|
+
abortMessage: `Aborted; transform ${id}'s output table was not dropped.`,
|
|
41
44
|
client,
|
|
42
45
|
ctx
|
|
43
46
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import "./
|
|
8
|
-
import "./poll-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import "./workspace-
|
|
12
|
-
import { waitForDatabaseGone } from "./wait-
|
|
1
|
+
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
|
|
4
|
+
import "./capabilities-7e9MgquN.mjs";
|
|
5
|
+
import "./render-0_GsapXa.mjs";
|
|
6
|
+
import "./prompt-CFKoys7k.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-0_tOPvfI.mjs";
|
|
8
|
+
import "./poll-4eoh5J0r.mjs";
|
|
9
|
+
import { parseWaitFlags, waitFlags } from "./wait-flags-DlfbIXHw.mjs";
|
|
10
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-uuYbd4k2.mjs";
|
|
11
|
+
import "./workspace-D8HtUN0y.mjs";
|
|
12
|
+
import { waitForDatabaseGone } from "./wait-B17I_pWy.mjs";
|
|
13
13
|
|
|
14
14
|
//#region src/commands/workspace/database/deprovision.ts
|
|
15
15
|
var deprovision_default = defineMetabaseCommand({
|
|
@@ -17,6 +17,10 @@ var deprovision_default = defineMetabaseCommand({
|
|
|
17
17
|
name: "deprovision",
|
|
18
18
|
description: "Deprovision a database from a workspace"
|
|
19
19
|
},
|
|
20
|
+
capabilities: {
|
|
21
|
+
minVersion: 62,
|
|
22
|
+
tokenFeature: "workspaces"
|
|
23
|
+
},
|
|
20
24
|
args: {
|
|
21
25
|
...outputFlags,
|
|
22
26
|
...profileFlag,
|
|
@@ -50,6 +54,8 @@ var deprovision_default = defineMetabaseCommand({
|
|
|
50
54
|
path: `/api/ee/workspace-manager/${workspaceId}/database/${databaseId}`,
|
|
51
55
|
yes: args.yes,
|
|
52
56
|
promptMessage: `Deprovision database ${databaseId} from workspace ${workspaceId}?`,
|
|
57
|
+
successMessage: `Deprovisioned database ${databaseId} from workspace ${workspaceId}.`,
|
|
58
|
+
abortMessage: `Aborted; database ${databaseId} was not deprovisioned.`,
|
|
53
59
|
client,
|
|
54
60
|
ctx,
|
|
55
61
|
...wait.enabled ? { afterDelete: () => waitForDatabaseGone(client, workspaceId, databaseId, wait.schedule) } : {}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import {
|
|
6
|
-
import { REMOTE_SYNC_PATHS, SyncDirtyItem, SyncDirtyItemCompact, syncDirtyItemView } from "./poll-task-
|
|
7
|
-
import "./poll-
|
|
1
|
+
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-ZsFeevV2.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Duawf5lE.mjs";
|
|
4
|
+
import "./capabilities-7e9MgquN.mjs";
|
|
5
|
+
import { renderList } from "./render-0_GsapXa.mjs";
|
|
6
|
+
import { REMOTE_SYNC_PATHS, SyncDirtyItem, SyncDirtyItemCompact, syncDirtyItemView } from "./poll-task-51WRdugU.mjs";
|
|
7
|
+
import "./poll-4eoh5J0r.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/git-sync/dirty.ts
|
|
@@ -15,6 +15,10 @@ var dirty_default = defineMetabaseCommand({
|
|
|
15
15
|
name: "dirty",
|
|
16
16
|
description: "List objects with unsynced local changes"
|
|
17
17
|
},
|
|
18
|
+
capabilities: {
|
|
19
|
+
minVersion: 60,
|
|
20
|
+
tokenFeature: "remote_sync"
|
|
21
|
+
},
|
|
18
22
|
args: {
|
|
19
23
|
...outputFlags,
|
|
20
24
|
...profileFlag,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ConfigError, MetabaseError, errorMessage } from "./
|
|
2
|
-
import { parseJson } from "./runtime-
|
|
3
|
-
import { pollUntil } from "./poll-
|
|
4
|
-
import { ProcessNotFoundError, runProcess, runProcessBinary, streamProcess } from "./process-
|
|
1
|
+
import { ConfigError, MetabaseError, errorMessage } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { parseJson } from "./runtime-Duawf5lE.mjs";
|
|
3
|
+
import { pollUntil } from "./poll-4eoh5J0r.mjs";
|
|
4
|
+
import { ProcessNotFoundError, runProcess, runProcessBinary, streamProcess } from "./process-CM7Uu5q_.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/runtime/tar.ts
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
7
|
-
import { readBody } from "./body-
|
|
8
|
-
import { bodyInputFlags } from "./body-flags-
|
|
9
|
-
import { requireBothOrNeither } from "./flag-pair-Fmcdkrfx.mjs";
|
|
1
|
+
import { ConfigError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-ZsFeevV2.mjs";
|
|
3
|
+
import { defineMetabaseCommand, parseCsv } from "./runtime-Duawf5lE.mjs";
|
|
4
|
+
import "./capabilities-7e9MgquN.mjs";
|
|
5
|
+
import { renderSummary } from "./render-0_GsapXa.mjs";
|
|
6
|
+
import "./input-cMSEqISy.mjs";
|
|
7
|
+
import { readBody } from "./body-tcURGnGh.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-D7q87Btw.mjs";
|
|
10
9
|
import { z } from "zod";
|
|
11
10
|
|
|
12
11
|
//#region src/domain/eid-translation.ts
|
|
@@ -50,12 +49,27 @@ const eidTranslateView = {
|
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
//#endregion
|
|
53
|
-
//#region src/commands/
|
|
54
|
-
|
|
52
|
+
//#region src/commands/flag-pair.ts
|
|
53
|
+
function requireBothOrNeither(first, second) {
|
|
54
|
+
const firstSet = first.value !== void 0 && first.value !== "";
|
|
55
|
+
const secondSet = second.value !== void 0 && second.value !== "";
|
|
56
|
+
if (!firstSet && !secondSet) return null;
|
|
57
|
+
if (!firstSet) throw new ConfigError(`${first.name} is required when using ${second.name}`);
|
|
58
|
+
if (!secondSet) throw new ConfigError(`${second.name} is required when using ${first.name}`);
|
|
59
|
+
return {
|
|
60
|
+
first: first.value,
|
|
61
|
+
second: second.value
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/commands/eid.ts
|
|
67
|
+
var eid_default = defineMetabaseCommand({
|
|
55
68
|
meta: {
|
|
56
|
-
name: "
|
|
57
|
-
description: "Translate entity ids (EIDs) to numeric ids"
|
|
69
|
+
name: "eid",
|
|
70
|
+
description: "Translate Metabase entity ids (string EIDs) to numeric ids"
|
|
58
71
|
},
|
|
72
|
+
capabilities: { minVersion: 58 },
|
|
59
73
|
args: {
|
|
60
74
|
...outputFlags,
|
|
61
75
|
...profileFlag,
|
|
@@ -63,25 +77,26 @@ var translate_default = defineMetabaseCommand({
|
|
|
63
77
|
...bodyInputFlags,
|
|
64
78
|
model: {
|
|
65
79
|
type: "string",
|
|
66
|
-
description: `Entity model for
|
|
80
|
+
description: `Entity model for the positional EIDs: ${EID_MODELS.join(" | ")}`
|
|
67
81
|
},
|
|
68
82
|
eids: {
|
|
69
|
-
type: "
|
|
70
|
-
|
|
83
|
+
type: "positional",
|
|
84
|
+
required: false,
|
|
85
|
+
description: "Comma-separated EIDs to translate (used with --model)"
|
|
71
86
|
}
|
|
72
87
|
},
|
|
73
88
|
outputSchema: EidTranslateResult,
|
|
74
89
|
examples: [
|
|
75
|
-
"mb eid
|
|
76
|
-
"mb eid
|
|
77
|
-
"mb eid
|
|
90
|
+
"mb eid --model card abc123XYZ,def456ABC",
|
|
91
|
+
"mb eid --file translate.json",
|
|
92
|
+
"mb eid --body '{\"entity_ids\":{\"card\":[\"abc123XYZ\"]}}'"
|
|
78
93
|
],
|
|
79
94
|
async run({ args, ctx, getClient }) {
|
|
80
95
|
const pair = requireBothOrNeither({
|
|
81
96
|
name: "--model",
|
|
82
97
|
value: args.model
|
|
83
98
|
}, {
|
|
84
|
-
name: "
|
|
99
|
+
name: "<eids>",
|
|
85
100
|
value: args.eids
|
|
86
101
|
});
|
|
87
102
|
const body = pair ? EidTranslateInput.parse({ entity_ids: { [parseModel(pair.first)]: parseEids(pair.second) } }) : await readBody({
|
|
@@ -93,7 +108,12 @@ var translate_default = defineMetabaseCommand({
|
|
|
93
108
|
method: "POST",
|
|
94
109
|
body
|
|
95
110
|
});
|
|
96
|
-
|
|
111
|
+
const lines = Object.entries(result.entity_ids).map(([eid, entry]) => {
|
|
112
|
+
const resolved = entry.status === "ok" && entry.id !== void 0;
|
|
113
|
+
const target = resolved ? String(entry.id) : "not found";
|
|
114
|
+
return `${entry.type} ${eid} → ${target}`;
|
|
115
|
+
});
|
|
116
|
+
renderSummary(result, eidTranslateView, lines.join("\n"), ctx);
|
|
97
117
|
}
|
|
98
118
|
});
|
|
99
119
|
function parseModel(raw) {
|
|
@@ -103,9 +123,9 @@ function parseModel(raw) {
|
|
|
103
123
|
}
|
|
104
124
|
function parseEids(raw) {
|
|
105
125
|
const parts = parseCsv(raw);
|
|
106
|
-
if (parts.length === 0) throw new ConfigError("
|
|
126
|
+
if (parts.length === 0) throw new ConfigError("provide at least one EID");
|
|
107
127
|
return parts;
|
|
108
128
|
}
|
|
109
129
|
|
|
110
130
|
//#endregion
|
|
111
|
-
export {
|
|
131
|
+
export { eid_default as default };
|