@metabase/cli 0.1.15 → 0.1.16
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 +48 -32
- package/dist/add-collection-BqfYL4FU.mjs +10 -0
- package/dist/{add-collection-CXhrMjXU.mjs → add-collection-H4LcP-9B.mjs} +4 -4
- package/dist/{archive-Drt-rWvU.mjs → archive-B3cjzOIK.mjs} +5 -5
- package/dist/{archive-BUwiCFnd.mjs → archive-BCXoM1nX.mjs} +3 -3
- package/dist/{archive-BxGSR7El.mjs → archive-C6MDtV1F.mjs} +3 -3
- package/dist/{archive-D-Ovk0-E.mjs → archive-CQQWkC5S.mjs} +4 -4
- package/dist/{archive-yTvDRQUZ.mjs → archive-CdUS-OG9.mjs} +3 -3
- package/dist/{archive-Blc1dz8Z.mjs → archive-D1mfiftv.mjs} +5 -5
- package/dist/{archive-CQiaCBSj.mjs → archive-hN8PfvhX.mjs} +3 -3
- package/dist/auth-BaCMFLTA.mjs +19 -0
- package/dist/{body-B9XTTDEu.mjs → body-DB2upz6a.mjs} +1 -1
- package/dist/{branches-Ct3PK5U3.mjs → branches-B6R60Vr1.mjs} +4 -4
- package/dist/{cancel-tST8Bh0w.mjs → cancel-oPsWomYc.mjs} +3 -3
- package/dist/{cancel-task-BHnzRQKL.mjs → cancel-task-CleJVDNI.mjs} +4 -4
- package/dist/card-DzH3aK0a.mjs +20 -0
- package/dist/{cards-BySIFsLG.mjs → cards-Bw37jizL.mjs} +3 -3
- package/dist/cli.mjs +26 -25
- package/dist/collection-Wagz-ira.mjs +20 -0
- package/dist/{collection-namespace-D8ohM5gD.mjs → collection-namespace-CUDPh2rF.mjs} +1 -1
- package/dist/{create-4mAGsBd0.mjs → create-B-mvVFIl.mjs} +3 -3
- package/dist/{create-DxDD6n1d.mjs → create-B87ZQjNM.mjs} +5 -5
- package/dist/{create-D3cVDtxM.mjs → create-BEkuqChu.mjs} +4 -4
- package/dist/{create-HZ-9GMLx.mjs → create-Bj6PuaAW.mjs} +4 -4
- package/dist/{create-C7FPeJqF.mjs → create-CF2Zn4pT.mjs} +3 -3
- package/dist/create-CZ0_s5ap.mjs +34 -0
- package/dist/{create-fIDFkdox.mjs → create-CfLaBO0V.mjs} +4 -4
- package/dist/{create-DGxZmbxh.mjs → create-Cy2TNnJB.mjs} +4 -4
- package/dist/{create-DnT1Sayk.mjs → create-D-qE3Oq8.mjs} +3 -3
- package/dist/{create-C43RQYgj.mjs → create-DSWjS09p.mjs} +4 -4
- package/dist/{create-BDWthCYq.mjs → create-DwoqFYb9.mjs} +4 -4
- package/dist/{create-branch-jPE7nW-E.mjs → create-branch-BaZ00MIc.mjs} +4 -4
- package/dist/{current-task-rW54KJax.mjs → current-task-Dr5dOD4V.mjs} +4 -4
- package/dist/dashboard-OUgS1Gi-.mjs +21 -0
- package/dist/{database-BmsxuRmO.mjs → database-BJxGUXhA.mjs} +1 -1
- package/dist/db-Btfl5JMZ.mjs +22 -0
- package/dist/{delete-BWO6uB4P.mjs → delete-DHrFA1SZ.mjs} +4 -4
- package/dist/{delete-CBwztF6P.mjs → delete-DJti0TOA.mjs} +4 -4
- package/dist/{delete-CeigtfRI.mjs → delete-evwMw6Hk.mjs} +4 -4
- package/dist/{delete-table-BXzvDEPG.mjs → delete-table-DvuuwVqu.mjs} +4 -4
- package/dist/{dependencies-D2N9eqm1.mjs → dependencies-DrV31Rj5.mjs} +4 -4
- package/dist/{dirty-DoEZRSGB.mjs → dirty-C-rkrnVM.mjs} +4 -4
- package/dist/document-CU28GfFw.mjs +19 -0
- package/dist/{eid-1mROiwJr.mjs → eid-BeXI-eII.mjs} +3 -3
- package/dist/{error-D5bZ5BUX.mjs → error-CIObEXLY.mjs} +1 -1
- package/dist/{export-Bgv5B4_F.mjs → export-CGa-SgEV.mjs} +6 -6
- package/dist/field-BTbzlcyC.mjs +18 -0
- package/dist/{fields-VA7tXHJz.mjs → fields-Recymu7n.mjs} +4 -4
- package/dist/{get-C-UeGtgW.mjs → get-7fWSU6ow.mjs} +3 -3
- package/dist/{get-DvQoDU2m.mjs → get-BAH_M5vj.mjs} +4 -4
- package/dist/{get-BtAD26gc.mjs → get-BD_P_Ejc.mjs} +3 -3
- package/dist/{get-CqnCaosn.mjs → get-BM-d3-zk.mjs} +4 -4
- package/dist/{get-B8etVxWD.mjs → get-BQxLtFE-.mjs} +4 -4
- package/dist/{get-DLRBq8kR.mjs → get-C6g2C4dM.mjs} +4 -4
- package/dist/{get-D9o38nK5.mjs → get-CARdLkmp.mjs} +4 -4
- package/dist/{get-CGkhSY5L.mjs → get-CHi8tU_1.mjs} +5 -5
- package/dist/{get-Wj88mnhn.mjs → get-CXMv-r1p.mjs} +3 -3
- package/dist/{get-RQFSmnpY.mjs → get-CYh2DBsq.mjs} +3 -3
- package/dist/{get-BgIE_YEg.mjs → get-DaixPDU9.mjs} +4 -4
- package/dist/{get-qnGGGRTa.mjs → get-Nc5GOs6-.mjs} +3 -3
- package/dist/{get-eUYDNALt.mjs → get-Q2WZ79q_.mjs} +4 -4
- package/dist/get-b4xbfFbA.mjs +35 -0
- package/dist/{get-DAsaor0n.mjs → get-rFcAVIch.mjs} +2 -2
- package/dist/{get-run-CATz-XMS.mjs → get-run-CfQR6ZNa.mjs} +4 -4
- package/dist/git-sync-CBxS2urR.mjs +28 -0
- package/dist/{has-remote-changes-B6YEMC90.mjs → has-remote-changes-Bvyv4FLP.mjs} +4 -4
- package/dist/{import-Bl2Wj9Xf.mjs → import-c3o3OAx0.mjs} +6 -6
- package/dist/{is-dirty-D9MoFj0T.mjs → is-dirty-BE53XwOC.mjs} +3 -3
- package/dist/is-dirty-Z-pqyVyB.mjs +9 -0
- package/dist/{items-LjtICjvX.mjs → items-1KkBMiO4.mjs} +3 -3
- package/dist/library-BlbH0xyK.mjs +18 -0
- package/dist/{list-DMik04Dh.mjs → list-7rwzxX6t.mjs} +3 -3
- package/dist/{list-B5Q7E2Km.mjs → list-BC2B02IR.mjs} +3 -3
- package/dist/{list-DcjenlTM.mjs → list-BqgbrpQQ.mjs} +3 -3
- package/dist/list-BwdO1_gX.mjs +99 -0
- package/dist/{list-ChK06rJh.mjs → list-C4KnM3Rq.mjs} +2 -2
- package/dist/{list-Dq86BAMG.mjs → list-CO5J3SZU.mjs} +4 -4
- package/dist/{list-cnqPlJgC.mjs → list-CSjFJDls.mjs} +3 -3
- package/dist/{list-C410Ptw_.mjs → list-D52_BozQ.mjs} +2 -2
- package/dist/{list-DfoNv0gb.mjs → list-DHb4vQUM.mjs} +3 -3
- package/dist/{list-DtrfE0sF.mjs → list-DIvOPW1g.mjs} +4 -4
- package/dist/{list-DaJk60dd.mjs → list-DPcPTqFU.mjs} +3 -3
- package/dist/{list-Bjp9nd0o.mjs → list-DUEYX3bX.mjs} +2 -2
- package/dist/{list-CoRX8Ruc.mjs → list-Drr4JiWg.mjs} +3 -3
- package/dist/{list-CfWblVHJ.mjs → list-F0vkE22V.mjs} +2 -2
- package/dist/{list-C6U3Ftg8.mjs → list-FR8Q1SzV.mjs} +3 -3
- package/dist/{login-Cn2UtFUt.mjs → login-C0Rf2hg0.mjs} +3 -3
- package/dist/{logout-_HXgEmqA.mjs → logout-C7_UON-s.mjs} +2 -2
- package/dist/measure-BUedPu4K.mjs +19 -0
- package/dist/{metadata-8yqT8OZI.mjs → metadata-Db3Kpo-z.mjs} +5 -5
- package/dist/{metadata-DHODjg1d.mjs → metadata-FltZq5Ek.mjs} +4 -4
- package/dist/{parse-id-DNPeV0Iu.mjs → parse-id-B5adfBlS.mjs} +1 -1
- package/dist/{path-BflajM08.mjs → path-BojuJkE4.mjs} +3 -3
- package/dist/{poll-CYkX02Bm.mjs → poll-AduuU55-.mjs} +1 -1
- package/dist/{poll-task-oXpl3wzp.mjs → poll-task-B00Qwd87.mjs} +2 -2
- package/dist/{preflight-BdJr2amA.mjs → preflight-QVPvG_Xg.mjs} +1 -1
- package/dist/publish-h5RJh6im.mjs +66 -0
- package/dist/{query-DWQaN7hO.mjs → query-BUkuB4bZ.mjs} +3 -3
- package/dist/{query-CxTjguwp.mjs → query-Dvi-Rksy.mjs} +3 -3
- package/dist/{remove-collection-BwcFi8Fs.mjs → remove-collection-D8ZfB2RN.mjs} +6 -6
- package/dist/{rescan-values-B9Qtsd32.mjs → rescan-values-DOsDLrRG.mjs} +5 -5
- package/dist/resolve-BQ9vjlNJ.mjs +84 -0
- package/dist/{run-C-vftXCu.mjs → run-CeG0KH5W.mjs} +3 -3
- package/dist/{run-3eFtdI2Z.mjs → run-CjhD-Zbr.mjs} +6 -6
- package/dist/{runs-CpRTkn1W.mjs → runs-6k8C6kXF.mjs} +4 -4
- package/dist/{runtime-C1QgWHM7.mjs → runtime-CmAIahm5.mjs} +1 -1
- package/dist/{schema-tables-rdeupgsu.mjs → schema-tables-C45QegaY.mjs} +4 -4
- package/dist/{schemas-Cr7RjYqV.mjs → schemas-EVwEFuTj.mjs} +3 -3
- package/dist/{search-D7Yq2MDu.mjs → search-C_uw_D1U.mjs} +3 -3
- package/dist/segment-CkZUZcWz.mjs +19 -0
- package/dist/{selectors-DPc2ZDdd.mjs → selectors-AktxTEMK.mjs} +3 -3
- package/dist/{set-X2N6x7pe.mjs → set-C3EAuyb8.mjs} +5 -5
- package/dist/{set-active-BoBa3pOw.mjs → set-active-BW6LN6y0.mjs} +2 -2
- package/dist/{setting-zZjcOPyE.mjs → setting-C50HEiGG.mjs} +3 -3
- package/dist/{setup-C47WUieB.mjs → setup-CYrbNrlG.mjs} +3 -3
- package/dist/{skills-Po0YPVU5.mjs → skills-D6xQkmhu.mjs} +3 -3
- package/dist/snippet-BjaWAxCu.mjs +19 -0
- package/dist/{stash-BV4sEp73.mjs → stash-C1V2FvJR.mjs} +6 -6
- package/dist/{status-BKF9rRnk.mjs → status-CxYw6zQM.mjs} +5 -5
- package/dist/{status-Cf8c0NON.mjs → status-DY92F9mn.mjs} +2 -2
- package/dist/{summary-RgLcBcEh.mjs → summary-DOxgqJoA.mjs} +3 -3
- package/dist/{sync-schema-DKEel2Sv.mjs → sync-schema-CQPfffjU.mjs} +7 -7
- package/dist/table-B35ovbcd.mjs +19 -0
- package/dist/{table-qDD2kApF.mjs → table-CDMG0Zi5.mjs} +8 -1
- package/dist/transform-DF79sJ0_.mjs +25 -0
- package/dist/transform-job-PmA_D8gz.mjs +22 -0
- package/dist/transform-tag-CE3cuO1K.mjs +18 -0
- package/dist/{transforms-BOQ9CG0l.mjs → transforms-DzBJDydn.mjs} +4 -4
- package/dist/{tree-CF8mscd9.mjs → tree-B3f5F_dP.mjs} +2 -2
- package/dist/{unpublish-CmaRNjK3.mjs → unpublish-B5RDeN-V.mjs} +17 -16
- package/dist/{update-DR4WkAET.mjs → update-BIZ9XhjS.mjs} +5 -5
- package/dist/{update-nwXgVNQa.mjs → update-C0pFSc1B.mjs} +6 -6
- package/dist/{update-DoQpy9SA.mjs → update-CcvDVqNd.mjs} +4 -4
- package/dist/{update-BuypOaXq.mjs → update-CiWPEqQ-.mjs} +5 -5
- package/dist/{update-CgQOSuZt.mjs → update-D5gioyBa.mjs} +4 -4
- package/dist/{update-B59h7KmS.mjs → update-D698CaeV.mjs} +5 -5
- package/dist/{update-DERsb0eO.mjs → update-DOfL_KPx.mjs} +5 -5
- package/dist/{update-Kz4kyqY_.mjs → update-DSueNZRw.mjs} +5 -5
- package/dist/{update-DQPg0_-d.mjs → update-DudyZ-FP.mjs} +5 -5
- package/dist/{update-rhfPHALN.mjs → update-I3TA2Tem.mjs} +4 -4
- package/dist/{update-BXZBEeUp.mjs → update-PZPNx0Xd.mjs} +5 -5
- package/dist/{update-dashcard-BJVeSGvO.mjs → update-dashcard-BXZ4vS15.mjs} +4 -4
- package/dist/{upgrade-CNrkJF6s.mjs → upgrade-4cWfLu90.mjs} +2 -2
- package/dist/{uuid-Dpl3ALKq.mjs → uuid---pAboNQ.mjs} +2 -2
- package/dist/{values-DMYpkoEH.mjs → values-I503dI7K.mjs} +3 -3
- package/dist/{verify-By9ZYzx4.mjs → verify-BMhTWW9s.mjs} +1 -1
- package/dist/{wait-flags-DQrxnlwv.mjs → wait-flags-HtCL2l1r.mjs} +2 -2
- package/dist/{wait-BzIAj8lJ.mjs → wait-oMSs_IdS.mjs} +5 -5
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +2 -2
- package/skill-data/data-transformation/SKILL.md +35 -28
- package/skill-data/semantic-layer/SKILL.md +5 -0
- package/dist/add-collection-Bnuh0d4j.mjs +0 -10
- package/dist/auth-Bkue4Psy.mjs +0 -19
- package/dist/card-faWo9ZWU.mjs +0 -20
- package/dist/collection-DcRz7fmf.mjs +0 -20
- package/dist/dashboard-pXAxJTTx.mjs +0 -21
- package/dist/db-CmHHj5eI.mjs +0 -22
- package/dist/document-DQIhL75C.mjs +0 -19
- package/dist/field-B-UcqFzm.mjs +0 -18
- package/dist/git-sync-CwOvcUI2.mjs +0 -28
- package/dist/is-dirty-MT0BT4CS.mjs +0 -9
- package/dist/list-Cx8JxS2C.mjs +0 -42
- package/dist/measure-BIAoqgcS.mjs +0 -19
- package/dist/publish-CGUkIqSm.mjs +0 -70
- package/dist/segment-BN8sFunv.mjs +0 -19
- package/dist/snippet-DK0ZA8m5.mjs +0 -19
- package/dist/table-COAKXNuj.mjs +0 -21
- package/dist/transform-Bto4U82j.mjs +0 -25
- package/dist/transform-job-_fW1y2tg.mjs +0 -22
- package/dist/transform-tag-C8n1oTr1.mjs +0 -18
- /package/dist/{delete-runtime-PzLFavb0.mjs → delete-runtime-CZMw_AGX.mjs} +0 -0
- /package/dist/{key-C8q5oIr5.mjs → key-DwiMOWRQ.mjs} +0 -0
- /package/dist/{manifest-DYeLri80.mjs → manifest-B2F8iL7X.mjs} +0 -0
- /package/dist/{measure-JJAdFoqK.mjs → measure-BCv5wDDN.mjs} +0 -0
- /package/dist/{revision-message-flag-C7zBeWEt.mjs → revision-message-flag-CP5NFrWQ.mjs} +0 -0
- /package/dist/{segment-B9SEv9V_.mjs → segment-BAUuELKs.mjs} +0 -0
- /package/dist/{setting-i0pugNHl.mjs → setting-DhMk0TNo.mjs} +0 -0
- /package/dist/{skills-CJ8g8fhQ.mjs → skills-DJsuBguh.mjs} +0 -0
- /package/dist/{snippet-NNzqlksR.mjs → snippet-D4SyVLKB.mjs} +0 -0
- /package/dist/{transform-n376akp8.mjs → transform-MmqHKGU-.mjs} +0 -0
- /package/dist/{transform-job-C8lIS-7Q.mjs → transform-job-CtVziW85.mjs} +0 -0
- /package/dist/{transform-tag-DB46AhAj.mjs → transform-tag-wFiWmiyO.mjs} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
5
|
import "./field-E0IBy4Uw.mjs";
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
7
|
-
import "./table-
|
|
8
|
-
import { DatabaseSyncResult, DatabaseTaskAck, databaseSyncResultView } from "./database-
|
|
6
|
+
import { parseId } from "./parse-id-B5adfBlS.mjs";
|
|
7
|
+
import "./table-CDMG0Zi5.mjs";
|
|
8
|
+
import { DatabaseSyncResult, DatabaseTaskAck, databaseSyncResultView } from "./database-BJxGUXhA.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/db/rescan-values.ts
|
|
11
11
|
var rescan_values_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Collection } from "./collection-Deiziuu2.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/domain/library.ts
|
|
5
|
+
const LibraryChild = Collection.pick({
|
|
6
|
+
id: true,
|
|
7
|
+
name: true,
|
|
8
|
+
type: true,
|
|
9
|
+
description: true
|
|
10
|
+
}).strip();
|
|
11
|
+
const Library = Collection.extend({ effective_children: z.array(LibraryChild) }).loose();
|
|
12
|
+
const LibraryCompact = Library.pick({
|
|
13
|
+
id: true,
|
|
14
|
+
name: true,
|
|
15
|
+
type: true,
|
|
16
|
+
effective_children: true
|
|
17
|
+
}).strip();
|
|
18
|
+
const libraryView = {
|
|
19
|
+
compactPick: LibraryCompact,
|
|
20
|
+
tableColumns: [
|
|
21
|
+
{
|
|
22
|
+
key: "id",
|
|
23
|
+
label: "ID"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
key: "name",
|
|
27
|
+
label: "Name"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: "type",
|
|
31
|
+
label: "Type"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/commands/library/resolve.ts
|
|
38
|
+
const LIBRARY_ROOT_PATH = "/api/ee/library/";
|
|
39
|
+
const COLLECTION_LIST_PATH = "/api/collection";
|
|
40
|
+
const LIBRARY_DATA_TYPE = "library-data";
|
|
41
|
+
const AbsentLibrary = z.object({ data: z.null() });
|
|
42
|
+
const LibraryOrAbsent = z.union([Library, AbsentLibrary]);
|
|
43
|
+
const LibraryCollectionEntry = Collection.pick({
|
|
44
|
+
id: true,
|
|
45
|
+
type: true
|
|
46
|
+
}).strip();
|
|
47
|
+
const LibraryCollections = z.array(LibraryCollectionEntry);
|
|
48
|
+
async function fetchLibrary(client) {
|
|
49
|
+
const result = await client.requestParsed(LibraryOrAbsent, LIBRARY_ROOT_PATH);
|
|
50
|
+
if (!("effective_children" in result)) return null;
|
|
51
|
+
const typeById = await fetchLibraryCollectionTypes(client);
|
|
52
|
+
const effective_children = result.effective_children.map((child) => typeof child.id === "number" ? {
|
|
53
|
+
...child,
|
|
54
|
+
type: typeById.get(child.id) ?? child.type
|
|
55
|
+
} : child);
|
|
56
|
+
return {
|
|
57
|
+
...result,
|
|
58
|
+
effective_children
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
async function fetchLibraryCollectionTypes(client) {
|
|
62
|
+
const collections = await client.requestParsed(LibraryCollections, COLLECTION_LIST_PATH, { query: { "include-library": true } });
|
|
63
|
+
const typeById = new Map();
|
|
64
|
+
for (const collection of collections) if (typeof collection.id === "number" && collection.type != null) typeById.set(collection.id, collection.type);
|
|
65
|
+
return typeById;
|
|
66
|
+
}
|
|
67
|
+
async function createLibrary(client) {
|
|
68
|
+
const existing = await fetchLibrary(client);
|
|
69
|
+
if (existing !== null) return existing;
|
|
70
|
+
await client.requestRaw(LIBRARY_ROOT_PATH, { method: "POST" });
|
|
71
|
+
const created = await fetchLibrary(client);
|
|
72
|
+
if (created === null) throw new Error(`Library was not created after POST ${LIBRARY_ROOT_PATH}`);
|
|
73
|
+
return created;
|
|
74
|
+
}
|
|
75
|
+
async function ensureLibraryDataCollectionId(client) {
|
|
76
|
+
const library = await createLibrary(client);
|
|
77
|
+
const data = library.effective_children.find((child) => child.type === LIBRARY_DATA_TYPE);
|
|
78
|
+
if (data === void 0) throw new Error("Library has no Data collection to publish into");
|
|
79
|
+
if (typeof data.id !== "number") throw new Error(`Library Data collection has a non-numeric id ${String(data.id)}`);
|
|
80
|
+
return data.id;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
export { Library, createLibrary, ensureLibraryDataCollectionId, fetchLibrary, libraryView };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
-
import { parseId } from "./parse-id-
|
|
5
|
+
import { parseId } from "./parse-id-B5adfBlS.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/transform-job/run.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TimeoutError } from "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
-
import { parseId } from "./parse-id-
|
|
6
|
-
import { pollUntil } from "./poll-
|
|
7
|
-
import { parseWaitFlags, waitFlags } from "./wait-flags-
|
|
8
|
-
import { Transform, TransformRun } from "./transform-
|
|
5
|
+
import { parseId } from "./parse-id-B5adfBlS.mjs";
|
|
6
|
+
import { pollUntil } from "./poll-AduuU55-.mjs";
|
|
7
|
+
import { parseWaitFlags, waitFlags } from "./wait-flags-HtCL2l1r.mjs";
|
|
8
|
+
import { Transform, TransformRun } from "./transform-MmqHKGU-.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/transform/run.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderList } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
-
import { parseId } from "./parse-id-
|
|
5
|
+
import { parseId } from "./parse-id-B5adfBlS.mjs";
|
|
6
6
|
import { collectPaginated } from "./paginate-BexjkjbY.mjs";
|
|
7
|
-
import { TransformRun, TransformRunCompact, transformRunView } from "./transform-
|
|
7
|
+
import { TransformRun, TransformRunCompact, transformRunView } from "./transform-MmqHKGU-.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/transform/runs.ts
|
|
10
10
|
const TransformRunListEnvelope = listEnvelopeSchema(TransformRunCompact);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AbortError, ConfigError, MetabaseError, NetworkError, ResponseShapeError, TimeoutError, ValidationError, errorMessage, flagConsumesValue, isNotFoundError, normalizeFlag, setMetabaseAugment, toAliasArray, warn } from "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { DEFAULT_MAX_BYTES, ENV_API_KEY, ENV_DISABLE_KEYRING, ENV_PROFILE, ENV_SKIP_PREFLIGHT, ENV_URL, consumeLegacyEnvWarnings, package_default, readEnv, reportError } from "./error-
|
|
2
|
+
import { DEFAULT_MAX_BYTES, ENV_API_KEY, ENV_DISABLE_KEYRING, ENV_PROFILE, ENV_SKIP_PREFLIGHT, ENV_URL, consumeLegacyEnvWarnings, package_default, readEnv, reportError } from "./error-CIObEXLY.mjs";
|
|
3
3
|
import { BASELINE_CAPABILITIES, isPlainObject } from "./capabilities-BX1rnVuH.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderList } from "./capabilities-BX1rnVuH.mjs";
|
|
5
5
|
import "./field-E0IBy4Uw.mjs";
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
7
|
-
import { Table, TableCompact, tableView } from "./table-
|
|
6
|
+
import { parseId } from "./parse-id-B5adfBlS.mjs";
|
|
7
|
+
import { Table, TableCompact, tableView } from "./table-CDMG0Zi5.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/db/schema-tables.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderList } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
-
import { parseId } from "./parse-id-
|
|
5
|
+
import { parseId } from "./parse-id-B5adfBlS.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/db/schemas.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand, parseEnumCsv } from "./runtime-
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand, parseEnumCsv } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderList } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
-
import { parseId } from "./parse-id-
|
|
5
|
+
import { parseId } from "./parse-id-B5adfBlS.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
//#region src/domain/search.ts
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/segment/index.ts
|
|
4
|
+
var segment_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "segment",
|
|
7
|
+
description: "Manage Metabase segments"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-BqgbrpQQ.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-BM-d3-zk.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-CfLaBO0V.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-BIZ9XhjS.mjs").then((mod) => mod.default),
|
|
14
|
+
archive: () => import("./archive-D1mfiftv.mjs").then((mod) => mod.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { segment_default as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ConfigError } from "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { parseCsv } from "./runtime-
|
|
3
|
-
import { parseId } from "./parse-id-
|
|
2
|
+
import { parseCsv } from "./runtime-CmAIahm5.mjs";
|
|
3
|
+
import { parseId } from "./parse-id-B5adfBlS.mjs";
|
|
4
4
|
|
|
5
|
-
//#region src/commands/
|
|
5
|
+
//#region src/commands/library/selectors.ts
|
|
6
6
|
const tableSelectorFlags = {
|
|
7
7
|
"table-ids": {
|
|
8
8
|
type: "string",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { formatScalar, renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
5
|
import "./input-BXWgdKiS.mjs";
|
|
6
|
-
import { readBody } from "./body-
|
|
7
|
-
import { SettingValue, settingValueView } from "./setting-
|
|
8
|
-
import { parseSettingKey, rethrowSettingError } from "./key-
|
|
6
|
+
import { readBody } from "./body-DB2upz6a.mjs";
|
|
7
|
+
import { SettingValue, settingValueView } from "./setting-DhMk0TNo.mjs";
|
|
8
|
+
import { parseSettingKey, rethrowSettingError } from "./key-DwiMOWRQ.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/setting/set.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
5
|
import { parseEnumFlag } from "./parse-enum-BatHQ-Gs.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -7,9 +7,9 @@ var setting_default = defineCommand({
|
|
|
7
7
|
description: "Inspect and update Metabase settings"
|
|
8
8
|
},
|
|
9
9
|
subCommands: {
|
|
10
|
-
list: () => import("./list-
|
|
11
|
-
get: () => import("./get-
|
|
12
|
-
set: () => import("./set-
|
|
10
|
+
list: () => import("./list-Drr4JiWg.mjs").then((m) => m.default),
|
|
11
|
+
get: () => import("./get-CARdLkmp.mjs").then((m) => m.default),
|
|
12
|
+
set: () => import("./set-C3EAuyb8.mjs").then((m) => m.default)
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
5
|
import "./input-BXWgdKiS.mjs";
|
|
6
|
-
import { readBody } from "./body-
|
|
6
|
+
import { readBody } from "./body-DB2upz6a.mjs";
|
|
7
7
|
import { bodyInputFlags } from "./body-flags-D7q87Btw.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
|
|
@@ -8,9 +8,9 @@ var skills_default = defineCommand({
|
|
|
8
8
|
},
|
|
9
9
|
default: "list",
|
|
10
10
|
subCommands: {
|
|
11
|
-
list: () => import("./list-
|
|
12
|
-
get: () => import("./get-
|
|
13
|
-
path: () => import("./path-
|
|
11
|
+
list: () => import("./list-BwdO1_gX.mjs").then((m) => m.default),
|
|
12
|
+
get: () => import("./get-7fWSU6ow.mjs").then((m) => m.default),
|
|
13
|
+
path: () => import("./path-BojuJkE4.mjs").then((m) => m.default)
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/snippet/index.ts
|
|
4
|
+
var snippet_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "snippet",
|
|
7
|
+
description: "Manage Metabase native query snippets"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-CSjFJDls.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-BQxLtFE-.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-DwoqFYb9.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-CiWPEqQ-.mjs").then((mod) => mod.default),
|
|
14
|
+
archive: () => import("./archive-CQQWkC5S.mjs").then((mod) => mod.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { snippet_default as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ConfigError } from "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
-
import "./parse-id-
|
|
6
|
-
import "./poll-
|
|
7
|
-
import { gitSyncWaitFlags, parseWaitFlags } from "./wait-flags-
|
|
8
|
-
import { REMOTE_SYNC_PATHS, SyncTask, formatSyncTask, pollSyncTask, throwIfFailedTask } from "./poll-task-
|
|
5
|
+
import "./parse-id-B5adfBlS.mjs";
|
|
6
|
+
import "./poll-AduuU55-.mjs";
|
|
7
|
+
import { gitSyncWaitFlags, parseWaitFlags } from "./wait-flags-HtCL2l1r.mjs";
|
|
8
|
+
import { REMOTE_SYNC_PATHS, SyncTask, formatSyncTask, pollSyncTask, throwIfFailedTask } from "./poll-task-B00Qwd87.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/git-sync/stash.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
-
import "./poll-
|
|
6
|
-
import { REMOTE_SYNC_PATHS, SyncTask, fetchCurrentTask, fetchOptionalParsed, formatSyncTask } from "./poll-task-
|
|
7
|
-
import { IsDirtyResult } from "./is-dirty-
|
|
5
|
+
import "./poll-AduuU55-.mjs";
|
|
6
|
+
import { REMOTE_SYNC_PATHS, SyncTask, fetchCurrentTask, fetchOptionalParsed, formatSyncTask } from "./poll-task-B00Qwd87.mjs";
|
|
7
|
+
import { IsDirtyResult } from "./is-dirty-BE53XwOC.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/git-sync/status.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { ParsedVersionSchema, ProbedUser, ProfileAuthMethod, ProfileLastFailure, TokenFeatures, defineMetabaseCommand, displayUrl, profileAuthMethod, readProfileRecord, resolveProfileName } from "./runtime-
|
|
2
|
+
import { outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { ParsedVersionSchema, ProbedUser, ProfileAuthMethod, ProfileLastFailure, TokenFeatures, defineMetabaseCommand, displayUrl, profileAuthMethod, readProfileRecord, resolveProfileName } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderItem } from "./capabilities-BX1rnVuH.mjs";
|
|
5
5
|
import { renderAuthMethod, renderTimestamp, renderUserName, renderUserRole, renderVersionTag } from "./render-CkuFkWlQ.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderItem } from "./capabilities-BX1rnVuH.mjs";
|
|
5
5
|
import { FieldSummary, FieldSummaryRaw, fieldSummaryView } from "./field-E0IBy4Uw.mjs";
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
6
|
+
import { parseId } from "./parse-id-B5adfBlS.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/field/summary.ts
|
|
9
9
|
var summary_default = defineMetabaseCommand({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
5
|
import "./field-E0IBy4Uw.mjs";
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
7
|
-
import "./table-
|
|
8
|
-
import { Database, DatabaseSyncResult, DatabaseTaskAck, databaseSyncResultView } from "./database-
|
|
9
|
-
import { pollUntil } from "./poll-
|
|
10
|
-
import { parseWaitFlags, waitFlags } from "./wait-flags-
|
|
6
|
+
import { parseId } from "./parse-id-B5adfBlS.mjs";
|
|
7
|
+
import "./table-CDMG0Zi5.mjs";
|
|
8
|
+
import { Database, DatabaseSyncResult, DatabaseTaskAck, databaseSyncResultView } from "./database-BJxGUXhA.mjs";
|
|
9
|
+
import { pollUntil } from "./poll-AduuU55-.mjs";
|
|
10
|
+
import { parseWaitFlags, waitFlags } from "./wait-flags-HtCL2l1r.mjs";
|
|
11
11
|
|
|
12
12
|
//#region src/commands/db/sync-schema.ts
|
|
13
13
|
var sync_schema_default = defineMetabaseCommand({
|
|
@@ -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-DIvOPW1g.mjs").then((m) => m.default),
|
|
11
|
+
get: () => import("./get-Q2WZ79q_.mjs").then((m) => m.default),
|
|
12
|
+
metadata: () => import("./metadata-FltZq5Ek.mjs").then((m) => m.default),
|
|
13
|
+
fields: () => import("./fields-Recymu7n.mjs").then((m) => m.default),
|
|
14
|
+
update: () => import("./update-DudyZ-FP.mjs").then((m) => m.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { table_default as default };
|
|
@@ -32,6 +32,8 @@ const Table = z.object({
|
|
|
32
32
|
entity_type: TableEntityType.nullable(),
|
|
33
33
|
visibility_type: TableVisibilityType.nullable().optional(),
|
|
34
34
|
active: z.boolean().optional(),
|
|
35
|
+
is_published: z.boolean().optional(),
|
|
36
|
+
collection_id: z.number().int().nullable().optional(),
|
|
35
37
|
fields: z.array(Field).optional()
|
|
36
38
|
}).loose();
|
|
37
39
|
const TableQueryMetadata = Table.extend({ fields: z.array(Field) });
|
|
@@ -42,7 +44,8 @@ const TableCompact = Table.pick({
|
|
|
42
44
|
description: true,
|
|
43
45
|
db_id: true,
|
|
44
46
|
schema: true,
|
|
45
|
-
entity_type: true
|
|
47
|
+
entity_type: true,
|
|
48
|
+
is_published: true
|
|
46
49
|
}).strip().extend({ fields: z.array(FieldCompact).optional() });
|
|
47
50
|
const tableView = {
|
|
48
51
|
compactPick: TableCompact,
|
|
@@ -70,6 +73,10 @@ const tableView = {
|
|
|
70
73
|
{
|
|
71
74
|
key: "description",
|
|
72
75
|
label: "Description"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
key: "is_published",
|
|
79
|
+
label: "Published"
|
|
73
80
|
}
|
|
74
81
|
]
|
|
75
82
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
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-7rwzxX6t.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-DaixPDU9.mjs").then((mod) => mod.default),
|
|
12
|
+
dependencies: () => import("./dependencies-DrV31Rj5.mjs").then((mod) => mod.default),
|
|
13
|
+
create: () => import("./create-B87ZQjNM.mjs").then((mod) => mod.default),
|
|
14
|
+
update: () => import("./update-C0pFSc1B.mjs").then((mod) => mod.default),
|
|
15
|
+
delete: () => import("./delete-DHrFA1SZ.mjs").then((mod) => mod.default),
|
|
16
|
+
"delete-table": () => import("./delete-table-DvuuwVqu.mjs").then((mod) => mod.default),
|
|
17
|
+
run: () => import("./run-CjhD-Zbr.mjs").then((mod) => mod.default),
|
|
18
|
+
cancel: () => import("./cancel-oPsWomYc.mjs").then((mod) => mod.default),
|
|
19
|
+
"get-run": () => import("./get-run-CfQR6ZNa.mjs").then((mod) => mod.default),
|
|
20
|
+
runs: () => import("./runs-6k8C6kXF.mjs").then((mod) => mod.default)
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { transform_default as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
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-BC2B02IR.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-BAH_M5vj.mjs").then((mod) => mod.default),
|
|
12
|
+
create: () => import("./create-Cy2TNnJB.mjs").then((mod) => mod.default),
|
|
13
|
+
update: () => import("./update-D698CaeV.mjs").then((mod) => mod.default),
|
|
14
|
+
delete: () => import("./delete-evwMw6Hk.mjs").then((mod) => mod.default),
|
|
15
|
+
run: () => import("./run-CeG0KH5W.mjs").then((mod) => mod.default),
|
|
16
|
+
transforms: () => import("./transforms-DzBJDydn.mjs").then((mod) => mod.default),
|
|
17
|
+
"set-active": () => import("./set-active-BW6LN6y0.mjs").then((mod) => mod.default)
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { transform_job_default as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/transform-tag/index.ts
|
|
4
|
+
var transform_tag_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "transform-tag",
|
|
7
|
+
description: "Manage Metabase transform tags"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-DPcPTqFU.mjs").then((mod) => mod.default),
|
|
11
|
+
create: () => import("./create-Bj6PuaAW.mjs").then((mod) => mod.default),
|
|
12
|
+
update: () => import("./update-DSueNZRw.mjs").then((mod) => mod.default),
|
|
13
|
+
delete: () => import("./delete-DJti0TOA.mjs").then((mod) => mod.default)
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { transform_tag_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderList } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
-
import { parseId } from "./parse-id-
|
|
6
|
-
import { Transform, TransformCompact, transformView } from "./transform-
|
|
5
|
+
import { parseId } from "./parse-id-B5adfBlS.mjs";
|
|
6
|
+
import { Transform, TransformCompact, transformView } from "./transform-MmqHKGU-.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/transform-job/transforms.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConfigError } from "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { writeJson } from "./capabilities-BX1rnVuH.mjs";
|
|
5
5
|
import { CollectionTreeNode } from "./collection-Deiziuu2.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-CIObEXLY.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CmAIahm5.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
-
import "./parse-id-
|
|
6
|
-
import { parseTableSelectors, tableSelectorFlags } from "./selectors-
|
|
5
|
+
import "./parse-id-B5adfBlS.mjs";
|
|
6
|
+
import { parseTableSelectors, tableSelectorFlags } from "./selectors-AktxTEMK.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
|
|
9
|
-
//#region src/commands/
|
|
10
|
-
const
|
|
9
|
+
//#region src/commands/library/unpublish.ts
|
|
10
|
+
const UNPUBLISH_TABLES_PATH = "/api/ee/data-studio/table/unpublish-tables";
|
|
11
|
+
const LibraryUnpublishResult = z.object({
|
|
11
12
|
unpublished: z.literal(true),
|
|
12
13
|
table_ids: z.array(z.number().int()).optional(),
|
|
13
14
|
database_ids: z.array(z.number().int()).optional(),
|
|
14
15
|
schema_ids: z.array(z.string()).optional()
|
|
15
16
|
});
|
|
16
|
-
const
|
|
17
|
-
compactPick:
|
|
17
|
+
const libraryUnpublishResultView = {
|
|
18
|
+
compactPick: LibraryUnpublishResult,
|
|
18
19
|
tableColumns: [
|
|
19
20
|
{
|
|
20
21
|
key: "unpublished",
|
|
@@ -37,9 +38,9 @@ const tableUnpublishResultView = {
|
|
|
37
38
|
var unpublish_default = defineMetabaseCommand({
|
|
38
39
|
meta: {
|
|
39
40
|
name: "unpublish",
|
|
40
|
-
description: "Unpublish tables (and their downstream dependents) from the
|
|
41
|
+
description: "Unpublish tables (and their downstream dependents) from the Library"
|
|
41
42
|
},
|
|
42
|
-
details: "Clears the
|
|
43
|
+
details: "Clears the Library collection for each selected table and recursively for every downstream table that depends on it. Select with --table-ids, --db-ids, or --schemas (each schema id is \"<db-id>:<schema>\", e.g. 1:public); the filters are combined.",
|
|
43
44
|
capabilities: {
|
|
44
45
|
minVersion: 59,
|
|
45
46
|
tokenFeature: "library"
|
|
@@ -50,16 +51,16 @@ var unpublish_default = defineMetabaseCommand({
|
|
|
50
51
|
...connectionFlags,
|
|
51
52
|
...tableSelectorFlags
|
|
52
53
|
},
|
|
53
|
-
outputSchema:
|
|
54
|
+
outputSchema: LibraryUnpublishResult,
|
|
54
55
|
examples: [
|
|
55
|
-
"mb
|
|
56
|
-
"mb
|
|
57
|
-
"mb
|
|
56
|
+
"mb library unpublish --table-ids 1,2,3",
|
|
57
|
+
"mb library unpublish --db-ids 1 --json",
|
|
58
|
+
"mb library unpublish --schemas 1:public,1:analytics"
|
|
58
59
|
],
|
|
59
60
|
async run({ args, ctx, getClient }) {
|
|
60
61
|
const selectors = parseTableSelectors(args);
|
|
61
62
|
const client = await getClient();
|
|
62
|
-
await client.requestRaw(
|
|
63
|
+
await client.requestRaw(UNPUBLISH_TABLES_PATH, {
|
|
63
64
|
method: "POST",
|
|
64
65
|
body: selectors,
|
|
65
66
|
expectContentType: "binary"
|
|
@@ -68,7 +69,7 @@ var unpublish_default = defineMetabaseCommand({
|
|
|
68
69
|
unpublished: true,
|
|
69
70
|
...selectors
|
|
70
71
|
};
|
|
71
|
-
renderSummary(result,
|
|
72
|
+
renderSummary(result, libraryUnpublishResultView, "Unpublished tables from the Library.", ctx);
|
|
72
73
|
}
|
|
73
74
|
});
|
|
74
75
|
|