@metabase/cli 0.1.6 → 0.1.8-alpha.cleanup-workspaces.75fe1d5
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 +16 -238
- package/dist/add-collection-BGifL-7Y.mjs +10 -0
- package/dist/{add-collection-BU8r3r2M.mjs → add-collection-C5ijC4e-.mjs} +8 -6
- package/dist/{archive-BNinrUak.mjs → archive-2GZVq0n2.mjs} +7 -8
- package/dist/{archive-lWgqiFAt.mjs → archive-C5pXDf6a.mjs} +5 -6
- package/dist/{archive-C1enZgKV.mjs → archive-CTEybKPq.mjs} +6 -7
- package/dist/{archive-DMPS8Kih.mjs → archive-DEtOH_jf.mjs} +5 -6
- package/dist/{archive-CDA0KxL8.mjs → archive-DTrn90If.mjs} +5 -6
- package/dist/{archive-CRhiBpPJ.mjs → archive-nqKJOyOt.mjs} +5 -6
- package/dist/auth-Divr9vkY.mjs +19 -0
- package/dist/{body-DjdFxjpg.mjs → body-BMyDvOjf.mjs} +2 -2
- package/dist/{branches-B1WRfG7-.mjs → branches-B7Zf-nxr.mjs} +5 -6
- package/dist/{cancel-Dl_Ho056.mjs → cancel-WwjcCE2R.mjs} +6 -7
- package/dist/{cancel-task-CdigdCaO.mjs → cancel-task-E4cCeJTc.mjs} +6 -7
- package/dist/{render-CfznwleY.mjs → capabilities-Dj3NgPHg.mjs} +66 -10
- package/dist/card-BHAcovSB.mjs +20 -0
- package/dist/{card-DlCAaAPq.mjs → card-BtPiKjbB.mjs} +1 -1
- package/dist/{cards-BGiJS675.mjs → cards-BW0Spirk.mjs} +4 -5
- package/dist/cli.mjs +23 -24
- package/dist/collection-DZx-vWb2.mjs +20 -0
- package/dist/{create-BNiva__H.mjs → create-BV_VpyyI.mjs} +11 -12
- package/dist/{create-BTcpaop_.mjs → create-B_Ysb6Ex.mjs} +7 -8
- package/dist/{create-BYlIju0b.mjs → create-BgeD2GMZ.mjs} +10 -11
- package/dist/{create-DGth_uOp.mjs → create-Bxkik5Fs.mjs} +9 -10
- package/dist/{create-CzzrbL0u.mjs → create-CZfHpi_I.mjs} +8 -9
- package/dist/{create-Be_0Vier.mjs → create-CbwFOL9h.mjs} +8 -9
- package/dist/{create-dhxPxfF3.mjs → create-CbyY4xTG.mjs} +12 -13
- package/dist/{create-CwGtmwqm.mjs → create-HCCdsuZR.mjs} +9 -10
- package/dist/{create-branch-DKZkoQ64.mjs → create-branch-BNRq3tO2.mjs} +6 -7
- package/dist/{current-task-CCRzm0_7.mjs → current-task-ZvTjL4hP.mjs} +7 -8
- package/dist/dashboard-DCWGcx3e.mjs +21 -0
- package/dist/{database-lH-B3G1I.mjs → database-_Td7rG4o.mjs} +1 -1
- package/dist/db-bD6fwLwc.mjs +22 -0
- package/dist/{delete-ZjnV35OJ.mjs → delete-D5-ITH10.mjs} +8 -7
- package/dist/{delete-Dimc-2y8.mjs → delete-DvmHTMwf.mjs} +8 -7
- package/dist/{delete-runtime-B6RQo_pw.mjs → delete-runtime-Bo7v-0au.mjs} +6 -6
- package/dist/{delete-table-agZJpivt.mjs → delete-table-DjmO5Qe4.mjs} +8 -7
- package/dist/{dirty-D4d0yHqj.mjs → dirty-BJgU1SGQ.mjs} +5 -6
- package/dist/{eid-BXzaQh0o.mjs → eid-pqSVgO2g.mjs} +12 -8
- package/dist/{error-C9S6PN3-.mjs → error-Br6irjpM.mjs} +3 -2
- package/dist/{export-DTygoXBP.mjs → export-gVXTOxC2.mjs} +10 -10
- package/dist/field-BFWc8q2W.mjs +18 -0
- package/dist/{field-yomXlkvl.mjs → field-MGxpNQUH.mjs} +12 -3
- package/dist/{fields-CoQi99gv.mjs → fields-DK2TYRK2.mjs} +6 -7
- package/dist/{get-DQTZG_NP.mjs → get-BjArD6Er.mjs} +4 -5
- package/dist/{get-C3HdQ91a.mjs → get-C1RSXOhf.mjs} +5 -6
- package/dist/{get-DSWFjy7O.mjs → get-C3RI_hKG.mjs} +4 -5
- package/dist/{get-C_w1kvN3.mjs → get-C7UEEICF.mjs} +6 -7
- package/dist/{get-Bzys7vgp.mjs → get-D-3tOuWQ.mjs} +4 -5
- package/dist/{get-Hc93A0Yz.mjs → get-DDF7_apz.mjs} +5 -6
- package/dist/{get-D3SbEQSE.mjs → get-DYgLtHb8.mjs} +4 -5
- package/dist/{get-CP3Z3NiH.mjs → get-DnK3WGDH.mjs} +6 -7
- package/dist/{get-C2p383Qc.mjs → get-DnyZMx-0.mjs} +5 -6
- package/dist/{get-DFxZXaKz.mjs → get-DtG5ytvs.mjs} +5 -7
- package/dist/{get-CzuzeKSe.mjs → get-Dy4NedW5.mjs} +7 -8
- package/dist/{get-Ddr0XLh7.mjs → get-_JI4GiPa.mjs} +5 -6
- package/dist/{get-run-B7sKdaDU.mjs → get-run-CZwIo5QR.mjs} +5 -6
- package/dist/{get-lb7q3JYs.mjs → get-xo5_PD1n.mjs} +3 -4
- package/dist/git-sync-Ch00miSa.mjs +28 -0
- package/dist/{has-remote-changes-BY10-nnE.mjs → has-remote-changes-tuuoPdHV.mjs} +7 -7
- package/dist/{import-CiMz4Wz-.mjs → import-BOzyRPTk.mjs} +11 -10
- package/dist/{is-dirty-BZOaryxT.mjs → is-dirty-BXN1F9yR.mjs} +5 -5
- package/dist/is-dirty-Bc1UHnBU.mjs +9 -0
- package/dist/{items-BWfvkY-J.mjs → items-CC4sSWv7.mjs} +4 -5
- package/dist/{list-SOG0whQ-.mjs → list-BUpOvQsd.mjs} +3 -4
- package/dist/{list-Clz5igWg.mjs → list-BlMpI88r.mjs} +4 -6
- package/dist/{list-2j7GsXsl.mjs → list-BqTdYtOW.mjs} +3 -4
- package/dist/{list-C3hfovHv.mjs → list-BvTuDJZp.mjs} +4 -5
- package/dist/{list-DZ8fNUoQ.mjs → list-C48ZZLM5.mjs} +6 -7
- package/dist/{list-BI4zr8LW.mjs → list-CJe45jFT.mjs} +6 -7
- package/dist/{list-D4sFiqX8.mjs → list-CMoG5_mh.mjs} +5 -6
- package/dist/{list-d58BprgJ.mjs → list-CkI3hESA.mjs} +4 -5
- package/dist/{list-sD5N3fGk.mjs → list-CybLzPZw.mjs} +6 -7
- package/dist/{list-CL7eCOQE.mjs → list-DLhU81LP.mjs} +3 -4
- package/dist/{list-Brgh-Z2v.mjs → list-Ddyb5T-7.mjs} +4 -5
- package/dist/{list-DXH7TlkU.mjs → list-tveV3LKh.mjs} +4 -5
- package/dist/{list--OYdUTtu.mjs → list-u7cmunGG.mjs} +4 -5
- package/dist/{login-Bm2AnCez.mjs → login-Bfsf6jLq.mjs} +17 -14
- package/dist/{logout-BlyRJODO.mjs → logout-BCsE_1Yg.mjs} +9 -9
- package/dist/{manifest-BBR46KFM.mjs → manifest-B_OfG-Ss.mjs} +1 -2
- package/dist/measure-D_eiCKq9.mjs +19 -0
- package/dist/{metadata-B8ZSF9LA.mjs → metadata-Cbqx1-yW.mjs} +7 -8
- package/dist/{metadata-DqiI2q9q.mjs → metadata-CzbGy4b-.mjs} +6 -7
- package/dist/{parse-id-lk_K-CEF.mjs → parse-id-DBwNYb4Y.mjs} +1 -1
- package/dist/{path-AEtZ3mBq.mjs → path-DJ-DfUGC.mjs} +4 -6
- package/dist/{poll-DHKDpCiq.mjs → poll-DWkVceIk.mjs} +1 -1
- package/dist/{poll-task-Cooi0lQV.mjs → poll-task-DOvUDrgL.mjs} +19 -3
- package/dist/{preflight-aXV5LyDs.mjs → preflight-D-l6sLCX.mjs} +3 -3
- package/dist/{query-AaKzYnTY.mjs → query--05TZxmk.mjs} +9 -8
- package/dist/{query-BlsVNZpD.mjs → query-BbbDpt3u.mjs} +12 -12
- package/dist/query-result-PoQE05Pe.mjs +19 -0
- package/dist/{remove-collection-CoCmrrQs.mjs → remove-collection-Dco3yXa-.mjs} +10 -9
- package/dist/{render-OQn3iRsI.mjs → render-BQHJhSP1.mjs} +1 -1
- package/dist/{rescan-values-C0FDsjT7.mjs → rescan-values-B1vE6I62.mjs} +9 -10
- package/dist/{run-B4Wn43zm.mjs → run-CWb_yZbK.mjs} +14 -14
- package/dist/{runs-Bbaszr18.mjs → runs-BLwEO5sW.mjs} +5 -6
- package/dist/{runtime-Dmv5VtUK.mjs → runtime-DKLBPRhd.mjs} +16 -87
- package/dist/{schema-tables-CaWinbuK.mjs → schema-tables-D1qE25GS.mjs} +6 -7
- package/dist/{schemas-DUgGpAyB.mjs → schemas-CFuYnQDg.mjs} +4 -5
- package/dist/{search-BLrBXLUk.mjs → search-CF4A051Z.mjs} +4 -5
- package/dist/segment-BP_vDpYM.mjs +19 -0
- package/dist/{set-DfGsta5O.mjs → set-BJ8Rs-vI.mjs} +7 -7
- package/dist/setting-EYI0HqTq.mjs +17 -0
- package/dist/{setup-C9ikBRw_.mjs → setup-DI6EGOdH.mjs} +7 -8
- package/dist/{skills-CiN1OQ8W.mjs → skills-BDPVoBWU.mjs} +33 -2
- package/dist/{skills-CUHIcQS6.mjs → skills-CRECMGAo.mjs} +3 -3
- package/dist/snippet-BwK58D1F.mjs +19 -0
- package/dist/{stash-EIDcSvpF.mjs → stash-BpPS0uG8.mjs} +11 -10
- package/dist/{status-95ElRAu9.mjs → status-BqFA7Tqr.mjs} +10 -8
- package/dist/{status-B0_MiZEf.mjs → status-CU5LYX0i.mjs} +4 -5
- package/dist/{summary-C12LiEuJ.mjs → summary-CraRyIM_.mjs} +5 -6
- package/dist/{sync-schema-Ba8M3DiX.mjs → sync-schema-DkfwPESH.mjs} +9 -10
- package/dist/table-CJMN6ql8.mjs +19 -0
- package/dist/{table-C7a5V6Zn.mjs → table-CkWja2UH.mjs} +1 -1
- package/dist/transform-BqV5ssDN.mjs +24 -0
- package/dist/transform-job-DvdOLV9b.mjs +19 -0
- package/dist/{tree-Des2ZG9d.mjs → tree-Bd1i-Y4U.mjs} +3 -4
- package/dist/{update-DzAN4SPj.mjs → update-BLZHmA0X.mjs} +10 -11
- package/dist/{update-CyIZdbIQ.mjs → update-BncGqeWt.mjs} +9 -10
- package/dist/{update-DSgceARZ.mjs → update-C4f-8fsU.mjs} +9 -10
- package/dist/{update-njHe3j-s.mjs → update-CgpgyDjd.mjs} +10 -11
- package/dist/{update-DBi5U8zb.mjs → update-CsYa--Eb.mjs} +12 -13
- package/dist/{update-mYVnoYNV.mjs → update-DA9aPhRr.mjs} +11 -12
- package/dist/{update-_QfgNa53.mjs → update-DtO-1_tj.mjs} +10 -11
- package/dist/{update-Bx54nWEI.mjs → update-IPsv9Pj0.mjs} +12 -13
- package/dist/{update-F6DmZncY.mjs → update-OZoOTnlY.mjs} +9 -10
- package/dist/{update-dashcard-wpSjv4M7.mjs → update-dashcard-D0VAwfNO.mjs} +8 -9
- package/dist/{upgrade-iAuvhX-W.mjs → upgrade-Bb_q7hJ7.mjs} +41 -28
- package/dist/{uuid-CMKnS8-z.mjs → uuid-DTdRruiz.mjs} +3 -4
- package/dist/{validate-dPEOnOf8.mjs → validate-CqVB_3_p.mjs} +1 -1
- package/dist/{validate-query-Cw6WE5Y8.mjs → validate-query-BUTNK00f.mjs} +2 -2
- package/dist/values-Bpt6obVW.mjs +44 -0
- package/dist/{verify-D5YtTqqp.mjs → verify-COt2q73-.mjs} +1 -1
- package/dist/{wait-Bv3Tsnv4.mjs → wait-DoKPlspq.mjs} +8 -9
- package/dist/{wait-flags-Dzq9BGQY.mjs → wait-flags-D1jNm0JK.mjs} +2 -2
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +15 -28
- package/skill-data/git-sync/SKILL.md +8 -63
- package/skill-data/mbql/SKILL.md +2 -0
- package/skill-data/transform/SKILL.md +16 -6
- 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-C0w6ACQF.mjs +0 -11
- package/dist/auth-CzXb_zB2.mjs +0 -19
- package/dist/capabilities-7e9MgquN.mjs +0 -29
- package/dist/card-DP4rfoOi.mjs +0 -21
- package/dist/collection-tY18ezvn.mjs +0 -21
- package/dist/create-CHF313Qg.mjs +0 -52
- package/dist/credentials-dzeq7ckm.mjs +0 -88
- package/dist/dashboard-ChM_Tu0l.mjs +0 -22
- package/dist/database-CIXwHKjK.mjs +0 -17
- package/dist/db-DrQn_i3W.mjs +0 -22
- package/dist/delete-CM3jnAeQ.mjs +0 -100
- package/dist/deprovision-CwxcIT3k.mjs +0 -65
- package/dist/docker-Oq80q3tu.mjs +0 -515
- package/dist/field-Z6Pcxf4n.mjs +0 -19
- package/dist/git-sync-CiGAad76.mjs +0 -28
- package/dist/is-dirty-Ume4oV0j.mjs +0 -10
- package/dist/license-Dxarh-gG.mjs +0 -17
- package/dist/list-zSO0DMw-.mjs +0 -36
- package/dist/logs-CywPikkL.mjs +0 -60
- package/dist/measure-C44EK_xt.mjs +0 -20
- package/dist/parse-schemas-BqUdWUwq.mjs +0 -12
- package/dist/process-C7V8LJ-j.mjs +0 -105
- package/dist/provision-UWcNDoDe.mjs +0 -82
- package/dist/ps-CJU0EbrC.mjs +0 -80
- package/dist/ps-DEroLgbI.mjs +0 -11
- package/dist/remove-BFWun0e8.mjs +0 -63
- package/dist/segment-B3Uwwcsm.mjs +0 -20
- package/dist/set-B8cUbRLD.mjs +0 -68
- package/dist/setting-D2p2MA7f.mjs +0 -18
- package/dist/snippet-B7D0uWlz.mjs +0 -20
- package/dist/start-3PX3ahjT.mjs +0 -413
- package/dist/status-CEplmC44.mjs +0 -34
- package/dist/stop-CQ0XGrN8.mjs +0 -83
- package/dist/table-e6h8SLVX.mjs +0 -20
- package/dist/transform-BMYh1lsC.mjs +0 -25
- package/dist/transform-job-Cm7z5TfH.mjs +0 -20
- package/dist/update-DHZubok3.mjs +0 -77
- package/dist/url-DWaT6WIZ.mjs +0 -56
- package/dist/values-BfSTAbzc.mjs +0 -37
- package/dist/wait-8yV9_WIo.mjs +0 -19
- package/dist/workspace-BBXJczJK.mjs +0 -72
- package/dist/workspace-CKLZrR7l.mjs +0 -26
- package/dist/workspace-credentials-BXpABsNZ.mjs +0 -100
- package/dist/yaml-YTQiYJ9s.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/{input-cMSEqISy.mjs → input-xewHccej.mjs} +0 -0
- /package/dist/{parse-enum-CrEWOhuY.mjs → parse-enum-Dr7ACrTR.mjs} +0 -0
- /package/dist/{prompt-CFKoys7k.mjs → prompt-u4WhE4T5.mjs} +0 -0
- /package/dist/{snippet-COggaWxx.mjs → snippet-xh42tYly.mjs} +0 -0
- /package/dist/{transform-GTW3G-01.mjs → transform-DyJb0bV0.mjs} +0 -0
- /package/dist/{transform-job-DeTDPMxt.mjs → transform-job-DpDGoqQt.mjs} +0 -0
|
@@ -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 { IsDirtyResult } from "./is-dirty-BZOaryxT.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import { REMOTE_SYNC_PATHS, SyncTask, fetchCurrentTask, fetchOptionalParsed, formatSyncTask } from "./poll-task-DOvUDrgL.mjs";
|
|
6
|
+
import "./poll-DWkVceIk.mjs";
|
|
7
|
+
import { IsDirtyResult } from "./is-dirty-BXN1F9yR.mjs";
|
|
9
8
|
import { z } from "zod";
|
|
10
9
|
|
|
11
10
|
//#region src/commands/git-sync/status.ts
|
|
@@ -60,7 +59,10 @@ var status_default = defineMetabaseCommand({
|
|
|
60
59
|
is_dirty: isDirty.is_dirty,
|
|
61
60
|
current_task: currentTask
|
|
62
61
|
};
|
|
63
|
-
|
|
62
|
+
const branchPart = branch === null ? "git-sync branch not set" : `Branch ${branch}`;
|
|
63
|
+
const dirtyPart = isDirty.is_dirty ? "Metabase has unsynced local changes" : "in sync with the remote";
|
|
64
|
+
const taskPart = currentTask === null ? "No task running." : formatSyncTask(currentTask);
|
|
65
|
+
renderSummary(summary, syncStatusView, `${branchPart} — ${dirtyPart}. ${taskPart}`, ctx);
|
|
64
66
|
}
|
|
65
67
|
});
|
|
66
68
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { ParsedVersionSchema, ProbedUser, ProfileLastFailure, TokenFeatures, defineMetabaseCommand, originOnly, readProfileRecord, resolveProfileName } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import {
|
|
6
|
-
import { renderTimestamp, renderUserName, renderUserRole, renderVersionTag } from "./render-OQn3iRsI.mjs";
|
|
2
|
+
import { outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { ParsedVersionSchema, ProbedUser, ProfileLastFailure, TokenFeatures, defineMetabaseCommand, originOnly, readProfileRecord, resolveProfileName } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderItem } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import { renderTimestamp, renderUserName, renderUserRole, renderVersionTag } from "./render-BQHJhSP1.mjs";
|
|
7
6
|
import { z } from "zod";
|
|
8
7
|
|
|
9
8
|
//#region src/commands/auth/status.ts
|
|
@@ -1,10 +1,9 @@
|
|
|
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 { parseId } from "./parse-id-lk_K-CEF.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderItem } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import { FieldSummary, FieldSummaryRaw, fieldSummaryView } from "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DBwNYb4Y.mjs";
|
|
8
7
|
|
|
9
8
|
//#region src/commands/field/summary.ts
|
|
10
9
|
var summary_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-lH-B3G1I.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DBwNYb4Y.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/sync-schema.ts
|
|
@@ -33,10 +32,10 @@ var sync_schema_default = defineMetabaseCommand({
|
|
|
33
32
|
const id = parseId(args.id);
|
|
34
33
|
const client = await getClient();
|
|
35
34
|
const response = await client.requestParsed(SyncSchemaApiResponse, `/api/database/${id}/sync_schema`, { method: "POST" });
|
|
36
|
-
|
|
35
|
+
renderSummary({
|
|
37
36
|
id,
|
|
38
37
|
status: response.status
|
|
39
|
-
}, databaseSyncResultView, ctx);
|
|
38
|
+
}, databaseSyncResultView, `Schema sync queued for database ${id}.`, ctx);
|
|
40
39
|
}
|
|
41
40
|
});
|
|
42
41
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/table/index.ts
|
|
4
|
+
var table_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "table",
|
|
7
|
+
description: "Manage Metabase tables"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-CybLzPZw.mjs").then((m) => m.default),
|
|
11
|
+
get: () => import("./get-C7UEEICF.mjs").then((m) => m.default),
|
|
12
|
+
metadata: () => import("./metadata-CzbGy4b-.mjs").then((m) => m.default),
|
|
13
|
+
fields: () => import("./fields-DK2TYRK2.mjs").then((m) => m.default),
|
|
14
|
+
update: () => import("./update-DtO-1_tj.mjs").then((m) => m.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { table_default as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/transform/index.ts
|
|
4
|
+
var transform_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "transform",
|
|
7
|
+
description: "Manage Metabase transforms"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-BvTuDJZp.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-DnyZMx-0.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-BgeD2GMZ.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-DA9aPhRr.mjs").then((mod) => mod.default),
|
|
14
|
+
delete: () => import("./delete-D5-ITH10.mjs").then((mod) => mod.default),
|
|
15
|
+
"delete-table": () => import("./delete-table-DjmO5Qe4.mjs").then((mod) => mod.default),
|
|
16
|
+
run: () => import("./run-CWb_yZbK.mjs").then((mod) => mod.default),
|
|
17
|
+
cancel: () => import("./cancel-WwjcCE2R.mjs").then((mod) => mod.default),
|
|
18
|
+
"get-run": () => import("./get-run-CZwIo5QR.mjs").then((mod) => mod.default),
|
|
19
|
+
runs: () => import("./runs-BLwEO5sW.mjs").then((mod) => mod.default)
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { transform_default as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/transform-job/index.ts
|
|
4
|
+
var transform_job_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "transform-job",
|
|
7
|
+
description: "Manage Metabase transform jobs"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-CkI3hESA.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-DDF7_apz.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-CZfHpi_I.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-C4f-8fsU.mjs").then((mod) => mod.default),
|
|
14
|
+
delete: () => import("./delete-DvmHTMwf.mjs").then((mod) => mod.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { transform_job_default as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
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 { writeJson } from "./render-CfznwleY.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { writeJson } from "./capabilities-Dj3NgPHg.mjs";
|
|
6
5
|
import { CollectionTreeNode } from "./collection-B3sPXRLs.mjs";
|
|
7
6
|
import { z } from "zod";
|
|
8
7
|
|
|
@@ -1,14 +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
|
|
10
|
-
import "./validate-
|
|
11
|
-
import { MEASURE_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-Cw6WE5Y8.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DBwNYb4Y.mjs";
|
|
7
|
+
import { readBody } from "./body-BMyDvOjf.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
9
|
+
import "./validate-CqVB_3_p.mjs";
|
|
10
|
+
import { MEASURE_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BUTNK00f.mjs";
|
|
12
11
|
import { Measure, MeasureUpdateInput, measureView } from "./measure-ClESGxIb.mjs";
|
|
13
12
|
|
|
14
13
|
//#region src/commands/measure/update.ts
|
|
@@ -50,7 +49,7 @@ var update_default = defineMetabaseCommand({
|
|
|
50
49
|
method: "PUT",
|
|
51
50
|
body
|
|
52
51
|
});
|
|
53
|
-
|
|
52
|
+
renderSummary(updated, measureView, `Updated measure ${updated.id} "${updated.name}".`, ctx);
|
|
54
53
|
}
|
|
55
54
|
});
|
|
56
55
|
|
|
@@ -1,13 +1,12 @@
|
|
|
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 {
|
|
10
|
-
import { bodyInputFlags } from "./body-flags-D7q87Btw.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { Field, FieldUpdateInput, fieldView } from "./field-MGxpNQUH.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-DBwNYb4Y.mjs";
|
|
8
|
+
import { readBody } from "./body-BMyDvOjf.mjs";
|
|
9
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
11
10
|
|
|
12
11
|
//#region src/commands/field/update.ts
|
|
13
12
|
var update_default = defineMetabaseCommand({
|
|
@@ -44,7 +43,7 @@ var update_default = defineMetabaseCommand({
|
|
|
44
43
|
method: "PUT",
|
|
45
44
|
body
|
|
46
45
|
});
|
|
47
|
-
|
|
46
|
+
renderSummary(updated, fieldView, `Updated field ${updated.id} "${updated.display_name}".`, ctx);
|
|
48
47
|
}
|
|
49
48
|
});
|
|
50
49
|
|
|
@@ -1,13 +1,12 @@
|
|
|
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 {
|
|
10
|
-
import { TransformJob, TransformJobUpdateInput, transformJobView } from "./transform-job-DeTDPMxt.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DBwNYb4Y.mjs";
|
|
7
|
+
import { readBody } from "./body-BMyDvOjf.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
9
|
+
import { TransformJob, TransformJobUpdateInput, transformJobView } from "./transform-job-DpDGoqQt.mjs";
|
|
11
10
|
|
|
12
11
|
//#region src/commands/transform-job/update.ts
|
|
13
12
|
var update_default = defineMetabaseCommand({
|
|
@@ -44,7 +43,7 @@ var update_default = defineMetabaseCommand({
|
|
|
44
43
|
method: "PUT",
|
|
45
44
|
body
|
|
46
45
|
});
|
|
47
|
-
|
|
46
|
+
renderSummary(updated, transformJobView, `Updated transform job ${updated.id} "${updated.name}".`, ctx);
|
|
48
47
|
}
|
|
49
48
|
});
|
|
50
49
|
|
|
@@ -1,14 +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
|
|
10
|
-
import "./validate-
|
|
11
|
-
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-Cw6WE5Y8.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DBwNYb4Y.mjs";
|
|
7
|
+
import { readBody } from "./body-BMyDvOjf.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
9
|
+
import "./validate-CqVB_3_p.mjs";
|
|
10
|
+
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BUTNK00f.mjs";
|
|
12
11
|
import { Segment, SegmentUpdateInput, segmentView } from "./segment-Be2v4ilr.mjs";
|
|
13
12
|
|
|
14
13
|
//#region src/commands/segment/update.ts
|
|
@@ -50,7 +49,7 @@ var update_default = defineMetabaseCommand({
|
|
|
50
49
|
method: "PUT",
|
|
51
50
|
body
|
|
52
51
|
});
|
|
53
|
-
|
|
52
|
+
renderSummary(updated, segmentView, `Updated segment ${updated.id} "${updated.name}".`, ctx);
|
|
54
53
|
}
|
|
55
54
|
});
|
|
56
55
|
|
|
@@ -1,16 +1,15 @@
|
|
|
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 {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import "./validate-
|
|
13
|
-
import { CARD_DATASET_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-Cw6WE5Y8.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import "./field-MGxpNQUH.mjs";
|
|
7
|
+
import { Card, CardUpdateInput, cardView } from "./card-BtPiKjbB.mjs";
|
|
8
|
+
import { parseId } from "./parse-id-DBwNYb4Y.mjs";
|
|
9
|
+
import { readBody } from "./body-BMyDvOjf.mjs";
|
|
10
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
11
|
+
import "./validate-CqVB_3_p.mjs";
|
|
12
|
+
import { CARD_DATASET_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BUTNK00f.mjs";
|
|
14
13
|
|
|
15
14
|
//#region src/commands/card/update.ts
|
|
16
15
|
var update_default = defineMetabaseCommand({
|
|
@@ -53,7 +52,7 @@ var update_default = defineMetabaseCommand({
|
|
|
53
52
|
method: "PUT",
|
|
54
53
|
body
|
|
55
54
|
});
|
|
56
|
-
|
|
55
|
+
renderSummary(updated, cardView, `Updated card ${updated.id} "${updated.name}".`, ctx);
|
|
57
56
|
}
|
|
58
57
|
});
|
|
59
58
|
|
|
@@ -1,15 +1,14 @@
|
|
|
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
|
|
10
|
-
import "./validate-
|
|
11
|
-
import {
|
|
12
|
-
import { Transform, TransformUpdateInput, transformView } from "./transform-GTW3G-01.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DBwNYb4Y.mjs";
|
|
7
|
+
import { readBody } from "./body-BMyDvOjf.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
9
|
+
import "./validate-CqVB_3_p.mjs";
|
|
10
|
+
import { TRANSFORM_SOURCE_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BUTNK00f.mjs";
|
|
11
|
+
import { Transform, TransformUpdateInput, transformView } from "./transform-DyJb0bV0.mjs";
|
|
13
12
|
|
|
14
13
|
//#region src/commands/transform/update.ts
|
|
15
14
|
var update_default = defineMetabaseCommand({
|
|
@@ -50,7 +49,7 @@ var update_default = defineMetabaseCommand({
|
|
|
50
49
|
method: "PUT",
|
|
51
50
|
body
|
|
52
51
|
});
|
|
53
|
-
|
|
52
|
+
renderSummary(updated, transformView, `Updated transform ${updated.id} "${updated.name}".`, ctx);
|
|
54
53
|
}
|
|
55
54
|
});
|
|
56
55
|
|
|
@@ -1,14 +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 {
|
|
10
|
-
import {
|
|
11
|
-
import { Table, TableUpdateInput, tableView } from "./table-C7a5V6Zn.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import "./field-MGxpNQUH.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-DBwNYb4Y.mjs";
|
|
8
|
+
import { readBody } from "./body-BMyDvOjf.mjs";
|
|
9
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
10
|
+
import { Table, TableUpdateInput, tableView } from "./table-CkWja2UH.mjs";
|
|
12
11
|
|
|
13
12
|
//#region src/commands/table/update.ts
|
|
14
13
|
var update_default = defineMetabaseCommand({
|
|
@@ -45,7 +44,7 @@ var update_default = defineMetabaseCommand({
|
|
|
45
44
|
method: "PUT",
|
|
46
45
|
body
|
|
47
46
|
});
|
|
48
|
-
|
|
47
|
+
renderSummary(updated, tableView, `Updated table ${updated.id} "${updated.display_name}".`, ctx);
|
|
49
48
|
}
|
|
50
49
|
});
|
|
51
50
|
|
|
@@ -1,17 +1,16 @@
|
|
|
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 {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import "./validate-dPEOnOf8.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import "./field-MGxpNQUH.mjs";
|
|
7
|
+
import "./card-BtPiKjbB.mjs";
|
|
8
|
+
import { parseId } from "./parse-id-DBwNYb4Y.mjs";
|
|
9
|
+
import { readBody } from "./body-BMyDvOjf.mjs";
|
|
10
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
11
|
+
import "./validate-CqVB_3_p.mjs";
|
|
13
12
|
import { DashboardDetail, DashboardUpdateInput, dashboardView } from "./dashboard-FY5UzJ_Z.mjs";
|
|
14
|
-
import { preflightDashcardCardReferences } from "./preflight-
|
|
13
|
+
import { preflightDashcardCardReferences } from "./preflight-D-l6sLCX.mjs";
|
|
15
14
|
|
|
16
15
|
//#region src/commands/dashboard/update.ts
|
|
17
16
|
var update_default = defineMetabaseCommand({
|
|
@@ -51,7 +50,7 @@ var update_default = defineMetabaseCommand({
|
|
|
51
50
|
method: "PUT",
|
|
52
51
|
body
|
|
53
52
|
});
|
|
54
|
-
|
|
53
|
+
renderSummary(updated, dashboardView, `Updated dashboard ${updated.id} "${updated.name}".`, ctx);
|
|
55
54
|
}
|
|
56
55
|
});
|
|
57
56
|
|
|
@@ -1,13 +1,12 @@
|
|
|
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 {
|
|
10
|
-
import { Snippet, SnippetUpdateInput, snippetView } from "./snippet-COggaWxx.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DBwNYb4Y.mjs";
|
|
7
|
+
import { readBody } from "./body-BMyDvOjf.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
9
|
+
import { Snippet, SnippetUpdateInput, snippetView } from "./snippet-xh42tYly.mjs";
|
|
11
10
|
|
|
12
11
|
//#region src/commands/snippet/update.ts
|
|
13
12
|
var update_default = defineMetabaseCommand({
|
|
@@ -45,7 +44,7 @@ var update_default = defineMetabaseCommand({
|
|
|
45
44
|
method: "PUT",
|
|
46
45
|
body
|
|
47
46
|
});
|
|
48
|
-
|
|
47
|
+
renderSummary(updated, snippetView, `Updated snippet ${updated.id} "${updated.name}".`, ctx);
|
|
49
48
|
}
|
|
50
49
|
});
|
|
51
50
|
|
|
@@ -1,12 +1,11 @@
|
|
|
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 { bodyInputFlags } from "./body-flags-D7q87Btw.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-DBwNYb4Y.mjs";
|
|
7
|
+
import { readBody } from "./body-BMyDvOjf.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
10
9
|
import { DashboardDetail, Dashcard, DashcardPatchInput, dashcardView } from "./dashboard-FY5UzJ_Z.mjs";
|
|
11
10
|
|
|
12
11
|
//#region src/commands/dashboard/update-dashcard.ts
|
|
@@ -60,7 +59,7 @@ var update_dashcard_default = defineMetabaseCommand({
|
|
|
60
59
|
});
|
|
61
60
|
const refreshed = result.dashcards.find((dashcard) => dashcard.id === dashcardId);
|
|
62
61
|
if (refreshed === void 0) throw new Error(`PUT /api/dashboard/${dashboardId}: dashcard ${dashcardId} missing from response`);
|
|
63
|
-
|
|
62
|
+
renderSummary(refreshed, dashcardView, `Updated dashcard ${dashcardId} on dashboard ${dashboardId} (row ${refreshed.row}, col ${refreshed.col}, ${refreshed.size_x}x${refreshed.size_y}).`, ctx);
|
|
64
63
|
}
|
|
65
64
|
});
|
|
66
65
|
function stripEntityId(dashcard) {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { AbortError, NetworkError, TimeoutError, UnknownError, errorMessage } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { outputFlags, package_default } from "./error-
|
|
3
|
-
import { HttpError, USER_AGENT, combineAborts, defineMetabaseCommand, parseJson, throwIfAborted } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import {
|
|
6
|
-
import { promptConfirm } from "./prompt-CFKoys7k.mjs";
|
|
7
|
-
import { streamProcess } from "./process-C7V8LJ-j.mjs";
|
|
1
|
+
import { AbortError, NetworkError, TimeoutError, UnknownError, errorMessage, isNotFoundError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { outputFlags, package_default } from "./error-Br6irjpM.mjs";
|
|
3
|
+
import { HttpError, USER_AGENT, combineAborts, defineMetabaseCommand, parseJson, throwIfAborted } from "./runtime-DKLBPRhd.mjs";
|
|
4
|
+
import { renderItem, writeText } from "./capabilities-Dj3NgPHg.mjs";
|
|
5
|
+
import { promptConfirm } from "./prompt-u4WhE4T5.mjs";
|
|
8
6
|
import { z } from "zod";
|
|
9
7
|
import { realpathSync } from "node:fs";
|
|
10
8
|
import { compare, valid } from "semver";
|
|
9
|
+
import { spawn } from "node:child_process";
|
|
11
10
|
|
|
12
11
|
//#region src/core/http/npm-registry.ts
|
|
13
12
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org";
|
|
@@ -250,6 +249,34 @@ function compareSemver(a, b) {
|
|
|
250
249
|
return compare(a, b);
|
|
251
250
|
}
|
|
252
251
|
|
|
252
|
+
//#endregion
|
|
253
|
+
//#region src/runtime/process.ts
|
|
254
|
+
var ProcessNotFoundError = class extends Error {
|
|
255
|
+
command;
|
|
256
|
+
constructor(command) {
|
|
257
|
+
super(`command not found: ${command}`);
|
|
258
|
+
this.name = "ProcessNotFoundError";
|
|
259
|
+
this.command = command;
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
const stdoutDecoder = new TextDecoder("utf-8");
|
|
263
|
+
function streamProcess(command, args, options = {}) {
|
|
264
|
+
return new Promise((resolve, reject) => {
|
|
265
|
+
const child = spawn(command, args, {
|
|
266
|
+
stdio: "inherit",
|
|
267
|
+
...options.shell === true ? { shell: true } : {}
|
|
268
|
+
});
|
|
269
|
+
child.on("error", (error) => {
|
|
270
|
+
if (isNotFoundError(error)) {
|
|
271
|
+
reject(new ProcessNotFoundError(command));
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
reject(error);
|
|
275
|
+
});
|
|
276
|
+
child.on("close", (code) => resolve(code));
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
|
|
253
280
|
//#endregion
|
|
254
281
|
//#region src/commands/upgrade.ts
|
|
255
282
|
const UpgradeCommandSchema = z.object({
|
|
@@ -397,30 +424,16 @@ function emitStatus(status, install, command, ctx) {
|
|
|
397
424
|
}
|
|
398
425
|
function buildHumanText(status, install, command) {
|
|
399
426
|
if (!status.changeRequired) return `Up to date (${status.currentVersion}).`;
|
|
400
|
-
const
|
|
401
|
-
|
|
402
|
-
const tail = buildHumanTail(install, command);
|
|
403
|
-
return [
|
|
404
|
-
...header,
|
|
405
|
-
"",
|
|
406
|
-
...tail
|
|
407
|
-
].join("\n");
|
|
427
|
+
const headline = status.targetVersion === status.latestVersion ? `Update available: ${status.currentVersion} → ${status.latestVersion}` : `Target ${status.targetVersion} (current ${status.currentVersion}, latest ${status.latestVersion}).`;
|
|
428
|
+
return [headline, ...buildHumanTail(install, command)].join("\n");
|
|
408
429
|
}
|
|
409
430
|
function buildHumanTail(install, command) {
|
|
410
431
|
switch (install.kind) {
|
|
411
|
-
case "npm-global": return [
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
];
|
|
416
|
-
case "npm-local": return [
|
|
417
|
-
`Installed via: ${install.packageManager} (local install)`,
|
|
418
|
-
`Binary path: ${install.realPath}`,
|
|
419
|
-
...command === null ? [] : [`Run in that project: ${command.display}`]
|
|
420
|
-
];
|
|
421
|
-
case "npx": return [`Running via npx — no upgrade needed.`, `npx fetches the latest version on each invocation.`];
|
|
422
|
-
case "dev": return [`Running from source at ${install.realPath}.`, `Pull the latest changes from git and rebuild to upgrade.`];
|
|
423
|
-
case "unknown": return [`Could not detect how the CLI was installed${install.realPath === "" ? "" : ` (${install.realPath})`}.`, `Reinstall with your package manager — for example: npm install -g @metabase/cli@latest`];
|
|
432
|
+
case "npm-global": return command === null ? [] : [`Run: ${command.display}`];
|
|
433
|
+
case "npm-local": return command === null ? [] : [`Run in that project: ${command.display}`];
|
|
434
|
+
case "npx": return ["Running via npx — it fetches the latest version on each run, no upgrade needed."];
|
|
435
|
+
case "dev": return [`Running from source at ${install.realPath}. Pull the latest changes and rebuild.`];
|
|
436
|
+
case "unknown": return ["Reinstall with your package manager, e.g. npm install -g @metabase/cli@latest"];
|
|
424
437
|
}
|
|
425
438
|
}
|
|
426
439
|
function formatCommandCell(value) {
|