@metabase/cli 0.1.8 → 0.1.9
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 +26 -236
- package/dist/{add-collection-CwrbKmC1.mjs → add-collection-CoP-6FZR.mjs} +5 -5
- package/dist/add-collection-EPp89tcs.mjs +10 -0
- package/dist/{archive-DqUtqRut.mjs → archive-BY8nrgnq.mjs} +5 -6
- package/dist/{archive-BzvqQd34.mjs → archive-BeslLaal.mjs} +5 -6
- package/dist/{archive-BpKZsGAm.mjs → archive-Blt0TxxA.mjs} +6 -7
- package/dist/{archive-ZnnJc2iT.mjs → archive-BxwGVDpd.mjs} +6 -7
- package/dist/{archive-BAjGIzhn.mjs → archive-C17qIvFW.mjs} +6 -7
- package/dist/{archive-BO3DOWI4.mjs → archive-CPLXsrzD.mjs} +5 -6
- package/dist/auth-CCUDM9Sv.mjs +19 -0
- package/dist/{body-DDYKoyMt.mjs → body-2jl-YSxT.mjs} +2 -2
- package/dist/{branches-DjiGsjAz.mjs → branches-Vlu44J51.mjs} +5 -6
- package/dist/{cancel-BwtDQ2MR.mjs → cancel-D0aBPUhs.mjs} +4 -5
- package/dist/{cancel-task-uJp18RvR.mjs → cancel-task-DoL2bqs1.mjs} +5 -6
- package/dist/{render-0_GsapXa.mjs → capabilities-7L9GVMd_.mjs} +45 -4
- package/dist/{card-ezYiriML.mjs → card-DnIeMmUn.mjs} +18 -2
- package/dist/card-UwczcLjq.mjs +20 -0
- package/dist/{cards-z68PANDD.mjs → cards-6MTreYAo.mjs} +5 -6
- package/dist/cli.mjs +23 -34
- package/dist/{collection-Bcy8cWYH.mjs → collection-BPTlcFw5.mjs} +8 -2
- package/dist/collection-Cexywhlj.mjs +20 -0
- package/dist/collection-namespace-BdqQJb7j.mjs +12 -0
- package/dist/{create-4EAGYVyp.mjs → create-BWD8H6yw.mjs} +12 -10
- package/dist/{create-GVfCQU3B.mjs → create-BZRA7nPu.mjs} +7 -8
- package/dist/{create-7JOWFxqu.mjs → create-BsOdn1Q1.mjs} +10 -11
- package/dist/{create-CQ4Vg4Ge.mjs → create-C_Z3IDrW.mjs} +9 -10
- package/dist/{create-Dd_Gyg_F.mjs → create-DNYFXAsy.mjs} +7 -8
- package/dist/{create-BzK59YlR.mjs → create-DcoF52Kx.mjs} +11 -12
- package/dist/{create-branch-CdWGiREu.mjs → create-branch-40Xm4DN7.mjs} +5 -6
- package/dist/create-dVmIemXi.mjs +52 -0
- package/dist/{create-DHWfmO2L.mjs → create-k59K2qf1.mjs} +9 -10
- package/dist/{current-task-nPs-iCLi.mjs → current-task-BN_XEFSX.mjs} +5 -6
- package/dist/dashboard-B_CuVbMX.mjs +21 -0
- package/dist/{database-BXiue1in.mjs → database-Dsv4QBs0.mjs} +20 -10
- package/dist/db-DULi5MOr.mjs +22 -0
- package/dist/{delete-Do1agSiL.mjs → delete-DEFgs5LE.mjs} +6 -7
- package/dist/{delete-runtime-uuYbd4k2.mjs → delete-runtime-DVb-Pkzp.mjs} +2 -2
- package/dist/{delete-CJqLgr6w.mjs → delete-tPjicYO4.mjs} +6 -7
- package/dist/{delete-table-ZiJDpMFT.mjs → delete-table-CDj19Qn6.mjs} +6 -7
- package/dist/{dirty-BnTG7w7v.mjs → dirty-DGCa6W1F.mjs} +5 -6
- package/dist/{eid-CwQ_smOD.mjs → eid-3v5MAKNA.mjs} +6 -7
- package/dist/{error-CTVL5CdB.mjs → error-BndUmcwS.mjs} +1 -1
- package/dist/{export-DR2cC4rL.mjs → export-BIZ-UR_M.mjs} +7 -8
- package/dist/field-CfrrLetM.mjs +18 -0
- package/dist/{fields-Ck31lDz9.mjs → fields-9lOrO8UH.mjs} +6 -7
- package/dist/{get-BFJ3VBPa.mjs → get-6Cj360cH.mjs} +5 -6
- package/dist/{get-CyG_P55z.mjs → get-BIH72g0v.mjs} +6 -7
- package/dist/{get-CICzGFSW.mjs → get-BSJN5TwW.mjs} +6 -7
- package/dist/{get-DyArILlF.mjs → get-BYSj7tMP.mjs} +5 -6
- package/dist/{get-DauAF3sm.mjs → get-Bk81meka.mjs} +5 -6
- package/dist/{get-GWRprk7k.mjs → get-BpWjLkKT.mjs} +5 -7
- package/dist/{get-F338MOK-.mjs → get-BuM6QPjZ.mjs} +5 -6
- package/dist/{get-C71ypFQk.mjs → get-CHaIVT6Y.mjs} +5 -6
- package/dist/{get-pO0wiy1e.mjs → get-CRa-h69C.mjs} +5 -6
- package/dist/{get-BPOd0Rm8.mjs → get-DFe2WoJ2.mjs} +5 -6
- package/dist/{get-DxqzDKKK.mjs → get-DlGlnciR.mjs} +5 -6
- package/dist/{get-BNKsNCcx.mjs → get-LI2xsRoT.mjs} +5 -6
- package/dist/{get-run-DhM_PyVy.mjs → get-run-hCZaw8-h.mjs} +5 -6
- package/dist/{get-BZiu-u-9.mjs → get-w-WqpjKy.mjs} +7 -8
- package/dist/git-sync-BpRstrZo.mjs +28 -0
- package/dist/{has-remote-changes-Ca0exJmb.mjs → has-remote-changes-DcpW1_KX.mjs} +5 -6
- package/dist/{import-DjclIzGP.mjs → import-CTQT1atq.mjs} +7 -8
- package/dist/{is-dirty-Cke0a1ie.mjs → is-dirty-DGrmt1ss.mjs} +4 -4
- package/dist/is-dirty-DuWCgrz2.mjs +9 -0
- package/dist/{items-BSpapmCU.mjs → items-Kr0oN2V7.mjs} +7 -8
- package/dist/{list-CEE9yKNp.mjs → list-Bz2ej0Cl.mjs} +4 -5
- package/dist/{list-V5IuMr_5.mjs → list-CCtYVgPN.mjs} +4 -5
- package/dist/{list-Brt4oKO7.mjs → list-CLvlEVQo.mjs} +6 -7
- package/dist/{list-Br77Mw6U.mjs → list-Ccj8-vb5.mjs} +5 -6
- package/dist/{list-Fjjtpghb.mjs → list-Cj3v4Lgv.mjs} +6 -7
- package/dist/{list-bVlCwg8g.mjs → list-Cl_O4_U4.mjs} +4 -5
- package/dist/{list-BRXGDSMo.mjs → list-D2D5Mw1E.mjs} +5 -6
- package/dist/{list-DUyWON1F.mjs → list-DNmekF2B.mjs} +4 -5
- package/dist/{list-fIV-P6wP.mjs → list-DaESiI72.mjs} +4 -5
- package/dist/{list-DWWGcUTg.mjs → list-DzKKdfCI.mjs} +5 -7
- package/dist/{list-BI1PfPjn.mjs → list-jcgK0thu.mjs} +5 -6
- package/dist/{list-D1qhCQn0.mjs → list-tklIxo38.mjs} +6 -7
- package/dist/{list-DmO4ADQq.mjs → list-zRQsvrH6.mjs} +4 -5
- package/dist/{login-BJGhZLgZ.mjs → login-BMKBmgeQ.mjs} +9 -10
- package/dist/{logout-BAGLqtnV.mjs → logout-C5pod937.mjs} +4 -5
- package/dist/{manifest-BNh0Lw6p.mjs → manifest-Cmu--CG5.mjs} +1 -2
- package/dist/measure-BkwFsP44.mjs +19 -0
- package/dist/{metadata-B-GOcWqL.mjs → metadata-CG4VZ5NW.mjs} +6 -7
- package/dist/{metadata-DJAdsOoh.mjs → metadata-DIEbyQeS.mjs} +7 -8
- package/dist/{parse-id-D1LTTt9L.mjs → parse-id-Boqc4wn4.mjs} +1 -1
- package/dist/{path-D5kX-msX.mjs → path-ur3NsMFr.mjs} +4 -6
- package/dist/{poll-DxpnK1wW.mjs → poll-BMjCkDaj.mjs} +1 -1
- package/dist/{poll-task-D8mG49IN.mjs → poll-task-CiRA0ER9.mjs} +2 -2
- package/dist/{preflight-Df_FqJ6o.mjs → preflight-CSqcIlbX.mjs} +3 -3
- package/dist/{query-zWFRDH3T.mjs → query-B8JzsQ_I.mjs} +7 -8
- package/dist/{query-OIuumiXN.mjs → query-CG0rEMS-.mjs} +11 -12
- package/dist/{query-result-ABPLz6I4.mjs → query-result-B4kTRid7.mjs} +1 -1
- package/dist/{remove-collection-BxmiXWKz.mjs → remove-collection-Clwz3EHQ.mjs} +7 -8
- package/dist/{rescan-values-M7g81KIl.mjs → rescan-values-DuHBnFjK.mjs} +8 -11
- package/dist/run-JXRivkfH.mjs +136 -0
- package/dist/{runs-CqfJIuh_.mjs → runs-FxgbXvax.mjs} +6 -7
- package/dist/{runtime-B40L_bj8.mjs → runtime-Ck8KKQe-.mjs} +11 -78
- package/dist/{schema-tables-CjBRF0_0.mjs → schema-tables-izDPI4f5.mjs} +6 -7
- package/dist/{schemas-GIIbek2O.mjs → schemas-CyzplnXl.mjs} +4 -5
- package/dist/{search-h78uOYec.mjs → search-BeuoOEQV.mjs} +4 -5
- package/dist/segment-ChYmSM0p.mjs +19 -0
- package/dist/{set-BRDxcLcQ.mjs → set-ClzB_5Jk.mjs} +7 -8
- package/dist/{setting-mKzZJpQY.mjs → setting-CBJVEx7_.mjs} +3 -3
- package/dist/{setup-WTIT2WbM.mjs → setup-vKXEUMM7.mjs} +6 -7
- package/dist/skills-1Z5Wj7Kp.mjs +18 -0
- package/dist/{skills-BkregMyb.mjs → skills-BDPVoBWU.mjs} +33 -2
- package/dist/snippet-De70ayL1.mjs +19 -0
- package/dist/{stash-DxoAJzcK.mjs → stash-DLtVf4_D.mjs} +7 -8
- package/dist/{status-B1dc3bbQ.mjs → status-AnPzI1f7.mjs} +4 -5
- package/dist/{status-D0Ukfodl.mjs → status-DHFYn9kO.mjs} +6 -7
- package/dist/{summary-3qOMUcEX.mjs → summary-DDed1LOz.mjs} +5 -6
- package/dist/sync-schema-BGQVq2JA.mjs +55 -0
- package/dist/table-C_bP2ao-.mjs +19 -0
- package/dist/{table-qDD2kApF.mjs → table-CkWja2UH.mjs} +1 -1
- package/dist/transform-B4RZfm6A.mjs +24 -0
- package/dist/{transform-BKahefz_.mjs → transform-DyWCoiO-.mjs} +1 -0
- package/dist/transform-job-C4pZcrIF.mjs +19 -0
- package/dist/{tree-DsnIPFyE.mjs → tree-BlYgJOn9.mjs} +4 -5
- package/dist/{update-Baya6OkO.mjs → update-B0z-2zqC.mjs} +12 -13
- package/dist/{update-BEtl9LpG.mjs → update-BHtliIr_.mjs} +8 -9
- package/dist/{update-CLsqoEJ8.mjs → update-CdfAogO2.mjs} +8 -9
- package/dist/{update-DPouQi4U.mjs → update-CgOPxKXK.mjs} +13 -11
- package/dist/{update-UaPqSfPN.mjs → update-CilTW98H.mjs} +10 -11
- package/dist/{update-DWn-nLPo.mjs → update-CoVvsU-I.mjs} +8 -9
- package/dist/{update-CZEd_Eej.mjs → update-DBN7yfAk.mjs} +9 -10
- package/dist/{update-BRLcnSwK.mjs → update-DqSG5_Ie.mjs} +10 -11
- package/dist/{update-BsgHRoZ8.mjs → update-DykqQLfo.mjs} +11 -12
- package/dist/{update-dashcard-DK9X91ha.mjs → update-dashcard-DZ8oV8up.mjs} +8 -9
- package/dist/{upgrade-UqdvTikR.mjs → upgrade-B8sEEQdQ.mjs} +34 -7
- package/dist/{uuid-BWCaWG4O.mjs → uuid-lLVnEoBN.mjs} +3 -4
- package/dist/{validate-dPEOnOf8.mjs → validate-B62TRDGV.mjs} +1 -1
- package/dist/{validate-query-CYvOP8Ld.mjs → validate-query-BpiN1CFu.mjs} +2 -2
- package/dist/{values-D_wycrcr.mjs → values-oD72EtRq.mjs} +5 -6
- package/dist/{verify-D7hb6VMy.mjs → verify-Bg6F0oFN.mjs} +1 -1
- package/dist/{wait-B5IpNFCG.mjs → wait-BtzuqQC3.mjs} +6 -7
- package/dist/{wait-flags-CNIeSq0_.mjs → wait-flags-DyFfZeav.mjs} +2 -2
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +19 -32
- package/skill-data/git-sync/SKILL.md +8 -63
- package/skill-data/mbql/SKILL.md +95 -28
- package/skill-data/mbql/references/operators.md +13 -13
- package/skill-data/transform/SKILL.md +18 -7
- package/skills/metabase-cli/SKILL.md +1 -1
- package/dist/add-collection-DxtuNxeP.mjs +0 -11
- package/dist/auth-B9B4pUaH.mjs +0 -19
- package/dist/capabilities-7e9MgquN.mjs +0 -29
- package/dist/card-D54unw6r.mjs +0 -20
- package/dist/collection-B5kIKRTL.mjs +0 -20
- package/dist/create-6XE7GYxk.mjs +0 -45
- package/dist/create-C8gA-XP2.mjs +0 -54
- package/dist/credentials-CFA9iGZG.mjs +0 -88
- package/dist/dashboard-lw6IFfOs.mjs +0 -21
- package/dist/database-BPT6BrmF.mjs +0 -17
- package/dist/db-CBCj8sBg.mjs +0 -22
- package/dist/delete-CiV6f69N.mjs +0 -104
- package/dist/deprovision-C-qEnh-P.mjs +0 -67
- package/dist/docker-B-QQWThD.mjs +0 -515
- package/dist/field-DJmQ2pul.mjs +0 -18
- package/dist/git-sync-rmjYOGFK.mjs +0 -28
- package/dist/is-dirty-DFGgGLDi.mjs +0 -10
- package/dist/license-j0tDQLKI.mjs +0 -17
- package/dist/list-evetBTcH.mjs +0 -36
- package/dist/logs-jx5b_YDk.mjs +0 -60
- package/dist/measure-BfgxqewH.mjs +0 -19
- package/dist/parse-schemas-DDK9nXuh.mjs +0 -12
- package/dist/process-CM7Uu5q_.mjs +0 -105
- package/dist/provision-BJd6zO1D.mjs +0 -83
- package/dist/ps-CpyHEvv7.mjs +0 -11
- package/dist/ps-dEqRGeB3.mjs +0 -80
- package/dist/remove-BNQ1c6hB.mjs +0 -64
- package/dist/run-DTsx8bLb.mjs +0 -96
- package/dist/segment-CoElN2b-.mjs +0 -19
- package/dist/set-Dclba9xF.mjs +0 -68
- package/dist/skills-tMYd5d9v.mjs +0 -18
- package/dist/snippet-B84H3tfp.mjs +0 -19
- package/dist/start-B7ByBicB.mjs +0 -414
- package/dist/status-DAzD1Cn_.mjs +0 -34
- package/dist/stop-Cvexagxh.mjs +0 -87
- package/dist/sync-schema-CrmVX1cy.mjs +0 -44
- package/dist/table-B0fRQv91.mjs +0 -19
- package/dist/transform-K_kp6Rdm.mjs +0 -24
- package/dist/transform-job-CuNN8zgv.mjs +0 -19
- package/dist/update-hiJdbbsb.mjs +0 -78
- package/dist/url-LMJZRDv4.mjs +0 -56
- package/dist/wait-DHjXk3jD.mjs +0 -19
- package/dist/workspace-Bt8n3ojY.mjs +0 -25
- package/dist/workspace-D8HtUN0y.mjs +0 -72
- package/dist/workspace-credentials-8CBMQJFz.mjs +0 -100
- package/dist/yaml-Gv6wRFMF.mjs +0 -43
- package/skill-data/workspace/SKILL.md +0 -390
- /package/dist/{body-flags-D7q87Btw.mjs → body-flags-D78h_-Ua.mjs} +0 -0
- /package/dist/{dashboard-B4bn3z6t.mjs → dashboard-FY5UzJ_Z.mjs} +0 -0
- /package/dist/{field-E0IBy4Uw.mjs → field-MGxpNQUH.mjs} +0 -0
- /package/dist/{input-cMSEqISy.mjs → input-xewHccej.mjs} +0 -0
- /package/dist/{key-vkNkH82H.mjs → key-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-job-DjhoJbiV.mjs → transform-job-DpDGoqQt.mjs} +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
7
|
+
import "./table-CkWja2UH.mjs";
|
|
8
|
+
import { Database, DatabaseSyncResult, DatabaseTaskAck, databaseSyncResultView } from "./database-Dsv4QBs0.mjs";
|
|
9
|
+
import { pollUntil } from "./poll-BMjCkDaj.mjs";
|
|
10
|
+
import { parseWaitFlags, waitFlags } from "./wait-flags-DyFfZeav.mjs";
|
|
11
|
+
|
|
12
|
+
//#region src/commands/db/sync-schema.ts
|
|
13
|
+
var sync_schema_default = defineMetabaseCommand({
|
|
14
|
+
meta: {
|
|
15
|
+
name: "sync-schema",
|
|
16
|
+
description: "Trigger a manual schema sync for a database"
|
|
17
|
+
},
|
|
18
|
+
details: "Queues an async schema sync and returns immediately. Pass --wait to poll the database until its initial_sync_status reports `complete` (a database that has already finished its initial sync returns at once). To wait for a specific newly-materialized transform table to register, prefer `mb transform run <id> --sync`.",
|
|
19
|
+
capabilities: { minVersion: 58 },
|
|
20
|
+
args: {
|
|
21
|
+
...outputFlags,
|
|
22
|
+
...profileFlag,
|
|
23
|
+
...connectionFlags,
|
|
24
|
+
...waitFlags,
|
|
25
|
+
id: {
|
|
26
|
+
type: "positional",
|
|
27
|
+
description: "Database id",
|
|
28
|
+
required: true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
outputSchema: DatabaseSyncResult,
|
|
32
|
+
examples: ["mb db sync-schema 1", "mb db sync-schema 1 --wait --json"],
|
|
33
|
+
async run({ args, ctx, getClient }) {
|
|
34
|
+
const id = parseId(args.id);
|
|
35
|
+
const wait = parseWaitFlags(args);
|
|
36
|
+
const client = await getClient();
|
|
37
|
+
const response = await client.requestParsed(DatabaseTaskAck, `/api/database/${id}/sync_schema`, { method: "POST" });
|
|
38
|
+
if (!wait.enabled) {
|
|
39
|
+
renderSummary({
|
|
40
|
+
id,
|
|
41
|
+
status: response.status
|
|
42
|
+
}, databaseSyncResultView, `Schema sync queued for database ${id}.`, ctx);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const database = await pollUntil(async () => client.requestParsed(Database, `/api/database/${id}`), (db) => db.initial_sync_status === "complete", wait.schedule);
|
|
46
|
+
renderSummary({
|
|
47
|
+
id,
|
|
48
|
+
status: response.status,
|
|
49
|
+
initial_sync_status: database.initial_sync_status ?? null
|
|
50
|
+
}, databaseSyncResultView, `Schema sync for database ${id} complete.`, ctx);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
export { sync_schema_default as default };
|
|
@@ -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-CLvlEVQo.mjs").then((m) => m.default),
|
|
11
|
+
get: () => import("./get-BSJN5TwW.mjs").then((m) => m.default),
|
|
12
|
+
metadata: () => import("./metadata-CG4VZ5NW.mjs").then((m) => m.default),
|
|
13
|
+
fields: () => import("./fields-9lOrO8UH.mjs").then((m) => m.default),
|
|
14
|
+
update: () => import("./update-DBN7yfAk.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-Cl_O4_U4.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-DFe2WoJ2.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-BWD8H6yw.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-CgOPxKXK.mjs").then((mod) => mod.default),
|
|
14
|
+
delete: () => import("./delete-tPjicYO4.mjs").then((mod) => mod.default),
|
|
15
|
+
"delete-table": () => import("./delete-table-CDj19Qn6.mjs").then((mod) => mod.default),
|
|
16
|
+
run: () => import("./run-JXRivkfH.mjs").then((mod) => mod.default),
|
|
17
|
+
cancel: () => import("./cancel-D0aBPUhs.mjs").then((mod) => mod.default),
|
|
18
|
+
"get-run": () => import("./get-run-hCZaw8-h.mjs").then((mod) => mod.default),
|
|
19
|
+
runs: () => import("./runs-FxgbXvax.mjs").then((mod) => mod.default)
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { transform_default as default };
|
|
@@ -112,6 +112,7 @@ const Transform = z.object({
|
|
|
112
112
|
source_database_id: z.number().int().nullable().optional(),
|
|
113
113
|
target_db_id: z.number().int().nullable().optional(),
|
|
114
114
|
target_table_id: z.number().int().nullable().optional(),
|
|
115
|
+
table: z.object({ id: z.number().int() }).loose().nullable().optional(),
|
|
115
116
|
entity_id: z.string().nullable(),
|
|
116
117
|
created_at: z.string(),
|
|
117
118
|
updated_at: z.string(),
|
|
@@ -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-DaESiI72.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-CRa-h69C.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-DNYFXAsy.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-CoVvsU-I.mjs").then((mod) => mod.default),
|
|
14
|
+
delete: () => import("./delete-DEFgs5LE.mjs").then((mod) => mod.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { transform_job_default as default };
|
|
@@ -1,9 +1,8 @@
|
|
|
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 { CollectionTreeNode } from "./collection-Bcy8cWYH.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { writeJson } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import { CollectionTreeNode } from "./collection-BPTlcFw5.mjs";
|
|
7
6
|
import { z } from "zod";
|
|
8
7
|
|
|
9
8
|
//#region src/commands/collection/tree.ts
|
|
@@ -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 "./
|
|
13
|
-
import {
|
|
14
|
-
import { preflightDashcardCardReferences } from "./preflight-Df_FqJ6o.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import "./field-MGxpNQUH.mjs";
|
|
7
|
+
import "./card-DnIeMmUn.mjs";
|
|
8
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
9
|
+
import { readBody } from "./body-2jl-YSxT.mjs";
|
|
10
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
11
|
+
import "./validate-B62TRDGV.mjs";
|
|
12
|
+
import { DashboardDetail, DashboardUpdateInput, dashboardView } from "./dashboard-FY5UzJ_Z.mjs";
|
|
13
|
+
import { preflightDashcardCardReferences } from "./preflight-CSqcIlbX.mjs";
|
|
15
14
|
|
|
16
15
|
//#region src/commands/dashboard/update.ts
|
|
17
16
|
var update_default = defineMetabaseCommand({
|
|
@@ -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-bi_0XbNT.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
7
|
+
import { readBody } from "./body-2jl-YSxT.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({
|
|
@@ -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-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { Field, FieldUpdateInput, fieldView } from "./field-MGxpNQUH.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
8
|
+
import { readBody } from "./body-2jl-YSxT.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({
|
|
@@ -1,15 +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 "./validate-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
7
|
+
import { readBody } from "./body-2jl-YSxT.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
9
|
+
import "./validate-B62TRDGV.mjs";
|
|
10
|
+
import { TRANSFORM_SOURCE_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BpiN1CFu.mjs";
|
|
11
|
+
import { Transform, TransformUpdateInput, transformView } from "./transform-DyWCoiO-.mjs";
|
|
12
|
+
import { enrichTransformCollectionError } from "./collection-namespace-BdqQJb7j.mjs";
|
|
13
13
|
|
|
14
14
|
//#region src/commands/transform/update.ts
|
|
15
15
|
var update_default = defineMetabaseCommand({
|
|
@@ -49,6 +49,8 @@ var update_default = defineMetabaseCommand({
|
|
|
49
49
|
const updated = await client.requestParsed(Transform, `/api/transform/${id}`, {
|
|
50
50
|
method: "PUT",
|
|
51
51
|
body
|
|
52
|
+
}).catch((error) => {
|
|
53
|
+
throw enrichTransformCollectionError(error);
|
|
52
54
|
});
|
|
53
55
|
renderSummary(updated, transformView, `Updated transform ${updated.id} "${updated.name}".`, ctx);
|
|
54
56
|
}
|
|
@@ -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 { Measure, MeasureUpdateInput, measureView } from "./measure-Bt3InQsA.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
7
|
+
import { readBody } from "./body-2jl-YSxT.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
9
|
+
import "./validate-B62TRDGV.mjs";
|
|
10
|
+
import { MEASURE_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BpiN1CFu.mjs";
|
|
11
|
+
import { Measure, MeasureUpdateInput, measureView } from "./measure-ClESGxIb.mjs";
|
|
13
12
|
|
|
14
13
|
//#region src/commands/measure/update.ts
|
|
15
14
|
var update_default = defineMetabaseCommand({
|
|
@@ -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-DjhoJbiV.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
7
|
+
import { readBody } from "./body-2jl-YSxT.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({
|
|
@@ -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-qDD2kApF.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import "./field-MGxpNQUH.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
8
|
+
import { readBody } from "./body-2jl-YSxT.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({
|
|
@@ -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 { Segment, SegmentUpdateInput, segmentView } from "./segment-DhBmcr_E.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
7
|
+
import { readBody } from "./body-2jl-YSxT.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
9
|
+
import "./validate-B62TRDGV.mjs";
|
|
10
|
+
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BpiN1CFu.mjs";
|
|
11
|
+
import { Segment, SegmentUpdateInput, segmentView } from "./segment-Be2v4ilr.mjs";
|
|
13
12
|
|
|
14
13
|
//#region src/commands/segment/update.ts
|
|
15
14
|
var update_default = defineMetabaseCommand({
|
|
@@ -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-CYvOP8Ld.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import "./field-MGxpNQUH.mjs";
|
|
7
|
+
import { Card, CardUpdateInput, cardView } from "./card-DnIeMmUn.mjs";
|
|
8
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
9
|
+
import { readBody } from "./body-2jl-YSxT.mjs";
|
|
10
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
11
|
+
import "./validate-B62TRDGV.mjs";
|
|
12
|
+
import { CARD_DATASET_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BpiN1CFu.mjs";
|
|
14
13
|
|
|
15
14
|
//#region src/commands/card/update.ts
|
|
16
15
|
var update_default = defineMetabaseCommand({
|
|
@@ -1,13 +1,12 @@
|
|
|
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 { DashboardDetail, Dashcard, DashcardPatchInput, dashcardView } from "./dashboard-B4bn3z6t.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
7
|
+
import { readBody } from "./body-2jl-YSxT.mjs";
|
|
8
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
9
|
+
import { DashboardDetail, Dashcard, DashcardPatchInput, dashcardView } from "./dashboard-FY5UzJ_Z.mjs";
|
|
11
10
|
|
|
12
11
|
//#region src/commands/dashboard/update-dashcard.ts
|
|
13
12
|
var update_dashcard_default = defineMetabaseCommand({
|
|
@@ -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-CM7Uu5q_.mjs";
|
|
1
|
+
import { AbortError, NetworkError, TimeoutError, UnknownError, errorMessage, isNotFoundError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { outputFlags, package_default } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { HttpError, USER_AGENT, combineAborts, defineMetabaseCommand, parseJson, throwIfAborted } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderItem, writeText } from "./capabilities-7L9GVMd_.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({
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ConfigError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { outputFlags } from "./error-
|
|
3
|
-
import { defineMetabaseCommand, parseInteger } from "./runtime-
|
|
4
|
-
import "./capabilities-
|
|
5
|
-
import { writeJson, writeText } from "./render-0_GsapXa.mjs";
|
|
2
|
+
import { outputFlags } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand, parseInteger } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { writeJson, writeText } from "./capabilities-7L9GVMd_.mjs";
|
|
6
5
|
import { z } from "zod";
|
|
7
6
|
import { randomUUID } from "node:crypto";
|
|
8
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigError, escapeJsonPointerSegment } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { isPlainObject } from "./capabilities-
|
|
2
|
+
import { isPlainObject } from "./capabilities-7L9GVMd_.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import Ajv2020 from "ajv/dist/2020.js";
|
|
5
5
|
import addFormats from "ajv-formats";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConfigError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { writeJson } from "./
|
|
3
|
-
import { assertNotLegacyEnvelopeWrappingMbql5, isMbql5Query, validateQuery } from "./validate-
|
|
2
|
+
import { writeJson } from "./capabilities-7L9GVMd_.mjs";
|
|
3
|
+
import { assertNotLegacyEnvelopeWrappingMbql5, isMbql5Query, validateQuery } from "./validate-B62TRDGV.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/commands/validate-query.ts
|
|
6
6
|
const skipValidateFlag = { "skip-validate": {
|
|
@@ -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-D1LTTt9L.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { formatScalar, renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import { FieldValues, fieldValuesView } from "./field-MGxpNQUH.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
8
7
|
|
|
9
8
|
//#region src/commands/field/values.ts
|
|
10
9
|
var values_default = defineMetabaseCommand({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MetabaseError, NetworkError, TimeoutError, errorMessage } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { HttpError, createClient, probeServer } from "./runtime-
|
|
2
|
+
import { HttpError, createClient, probeServer } from "./runtime-Ck8KKQe-.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/domain/user.ts
|
|
@@ -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 { SyncTaskOrIdle, formatSyncTask, pollSyncTask, syncTaskIdleView, syncTaskView, throwIfFailedTask } from "./poll-task-
|
|
8
|
-
import { DEFAULT_INTERVAL_MS, DEFAULT_TIMEOUT_MS } from "./poll-DxpnK1wW.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BndUmcwS.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ck8KKQe-.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
6
|
+
import { DEFAULT_INTERVAL_MS, DEFAULT_TIMEOUT_MS } from "./poll-BMjCkDaj.mjs";
|
|
7
|
+
import { SyncTaskOrIdle, formatSyncTask, pollSyncTask, syncTaskIdleView, syncTaskView, throwIfFailedTask } from "./poll-task-CiRA0ER9.mjs";
|
|
9
8
|
|
|
10
9
|
//#region src/commands/git-sync/wait.ts
|
|
11
10
|
const WaitResult = SyncTaskOrIdle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parseId } from "./parse-id-
|
|
2
|
-
import { DEFAULT_INTERVAL_MS, DEFAULT_TIMEOUT_MS } from "./poll-
|
|
1
|
+
import { parseId } from "./parse-id-Boqc4wn4.mjs";
|
|
2
|
+
import { DEFAULT_INTERVAL_MS, DEFAULT_TIMEOUT_MS } from "./poll-BMjCkDaj.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/commands/wait-flags.ts
|
|
5
5
|
const waitScheduleFlags = {
|