@metabase/cli 0.1.12 → 0.1.13
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 +34 -22
- package/dist/{add-collection-DEME4IOy.mjs → add-collection-BQsx2Q-S.mjs} +5 -5
- package/dist/add-collection-BiBKEHwz.mjs +10 -0
- package/dist/{archive-BtDvBsr8.mjs → archive-BP53zrzs.mjs} +6 -6
- package/dist/{archive-Dc-FwNZm.mjs → archive-BS4U2_gi.mjs} +7 -7
- package/dist/{archive-DUlrUlok.mjs → archive-BrYMa87Z.mjs} +6 -6
- package/dist/{archive-CMeTr8jv.mjs → archive-D7qtYihp.mjs} +6 -6
- package/dist/{archive-BFk-oupo.mjs → archive-Dt5zuiwu.mjs} +6 -6
- package/dist/{archive-BNioNJtG.mjs → archive-FLrOqODN.mjs} +7 -7
- package/dist/{archive-MTTQv3wR.mjs → archive-H8wBIt8q.mjs} +7 -7
- package/dist/auth-DWA7DSo9.mjs +19 -0
- package/dist/{body-89w3r7In.mjs → body-3vzTm8Jj.mjs} +3 -3
- package/dist/{branches-DuVKH8Ye.mjs → branches-Lr1cCUdg.mjs} +6 -6
- package/dist/{cancel-BEMQKVuR.mjs → cancel-Br3FHyDR.mjs} +5 -5
- package/dist/{cancel-task-D2mSPFXO.mjs → cancel-task-BXgeq3MH.mjs} +6 -6
- package/dist/{capabilities-7L9GVMd_.mjs → capabilities-BX1rnVuH.mjs} +2 -14
- package/dist/card-DQV8WOIa.mjs +20 -0
- package/dist/{card-DnIeMmUn.mjs → card-wCPcuKSi.mjs} +1 -1
- package/dist/{cards-L9jksUMD.mjs → cards-D-AkjCxr.mjs} +6 -6
- package/dist/cli.mjs +25 -25
- package/dist/collection-DIUWkVFY.mjs +20 -0
- package/dist/{collection-namespace-w26SavJH.mjs → collection-namespace-BQ_ebqOP.mjs} +2 -2
- package/dist/{command-augment-BH9qgQ5u.mjs → command-augment-CAur0XOQ.mjs} +13 -2
- package/dist/{create-D6QqOX6u.mjs → create-BpAak62U.mjs} +9 -9
- package/dist/{create-Dew3rKsR.mjs → create-C1xYECl-.mjs} +8 -8
- package/dist/{create-Cxg_h8Kf.mjs → create-CDL9WHiR.mjs} +10 -10
- package/dist/{create-8hMjPz7j.mjs → create-CcZEV9xx.mjs} +8 -8
- package/dist/{create-DoeqRVmx.mjs → create-DHUhRzcV.mjs} +11 -11
- package/dist/{create-Bu9Jayck.mjs → create-DUdkitlQ.mjs} +12 -12
- package/dist/{create-zEq4ZJAT.mjs → create-Dx1SDXyQ.mjs} +8 -8
- package/dist/{create-branch-C5P2y8U5.mjs → create-branch-BvZKizC4.mjs} +6 -6
- package/dist/{create-C3b3MoIN.mjs → create-ux0yPpq1.mjs} +10 -10
- package/dist/{create-DCYc032c.mjs → create-y4j2I1aH.mjs} +11 -11
- package/dist/{current-task-uD4QO5bM.mjs → current-task-DaWn0DYt.mjs} +6 -6
- package/dist/dashboard-CohHWhkV.mjs +21 -0
- package/dist/{database-Dsv4QBs0.mjs → database-BmsxuRmO.mjs} +1 -1
- package/dist/db-BD8JZUDw.mjs +22 -0
- package/dist/{delete-DGaNAFdQ.mjs → delete-CW3cEHlr.mjs} +7 -7
- package/dist/{delete-Bftif2R3.mjs → delete-DFWjBpzl.mjs} +7 -7
- package/dist/{delete-runtime-CjFc69tS.mjs → delete-runtime-BhZAAvjc.mjs} +3 -3
- package/dist/{delete-table-C0qxP6FE.mjs → delete-table-Wa0yRsnM.mjs} +7 -7
- package/dist/{dirty-CZZLpWt1.mjs → dirty-CKcGYIpv.mjs} +6 -6
- package/dist/document-CRuag6F5.mjs +19 -0
- package/dist/{eid-C8xTmR8e.mjs → eid-m44hs7Ul.mjs} +7 -7
- package/dist/{error-BGH4gxGN.mjs → error-DR_i1hxJ.mjs} +40 -5
- package/dist/{export-DWdjnBKo.mjs → export-8C4F9pYn.mjs} +8 -8
- package/dist/field-CuabjsR7.mjs +18 -0
- package/dist/{fields-Cq08PQec.mjs → fields-hXrRjf7e.mjs} +7 -7
- package/dist/{get-8nAjRL2H.mjs → get-3zFOkcl_.mjs} +7 -7
- package/dist/{get-BaKKF50e.mjs → get-8r-_QuSr.mjs} +6 -6
- package/dist/{get-ug26gcOI.mjs → get-9MCrsgTf.mjs} +8 -8
- package/dist/{get-Bbij6RjC.mjs → get-BjCQctuS.mjs} +6 -6
- package/dist/{get-Bcr_5fAb.mjs → get-BlNLGR-F.mjs} +6 -6
- package/dist/{get-Rqz7UHv1.mjs → get-BxgSKzca.mjs} +6 -6
- package/dist/{get-f5ENeUNw.mjs → get-C7EKJGTP.mjs} +6 -6
- package/dist/{get-DHPN1716.mjs → get-Cit5liJv.mjs} +7 -7
- package/dist/{get-DzLAmSKd.mjs → get-CqU4xVSg.mjs} +5 -5
- package/dist/{get-B2vGW7Aw.mjs → get-CvLECgtm.mjs} +6 -6
- package/dist/{get-DtKv-gl3.mjs → get-D7WUNQYY.mjs} +6 -6
- package/dist/{get-7IhxPyE_.mjs → get-DWg3riaY.mjs} +6 -6
- package/dist/{get-Cr8oz_jr.mjs → get-cjqlMKF5.mjs} +6 -6
- package/dist/{get-run-DhbHXaZE.mjs → get-run-CTDPEDcU.mjs} +6 -6
- package/dist/{get-B_BJ10pV.mjs → get-xVPjvf7O.mjs} +6 -6
- package/dist/git-sync-CKsGGVOm.mjs +28 -0
- package/dist/{has-remote-changes-CTLh3WjZ.mjs → has-remote-changes-DYo4PQfC.mjs} +6 -6
- package/dist/{import-XakIQfRp.mjs → import-Cwd-_wYv.mjs} +8 -8
- package/dist/{input-BZwm4yby.mjs → input-BXWgdKiS.mjs} +1 -1
- package/dist/{is-dirty-DkOOyjsZ.mjs → is-dirty-HynZex-f.mjs} +4 -4
- package/dist/is-dirty-Mkgi21bq.mjs +9 -0
- package/dist/{items-DC985V8K.mjs → items-D4pSBGxR.mjs} +8 -8
- package/dist/{key-y4TtxKwU.mjs → key-C8q5oIr5.mjs} +1 -1
- package/dist/{list-CEbMS6g3.mjs → list-B2QX8BZ3.mjs} +5 -5
- package/dist/{list-CIEI8XK_.mjs → list-Bqy3rN6k.mjs} +5 -5
- package/dist/{list-Df4MhR2A.mjs → list-CI1WQ8U3.mjs} +7 -7
- package/dist/{list-xfmTxHNu.mjs → list-Ctze3nfU.mjs} +5 -5
- package/dist/{list-Cnb9mQdd.mjs → list-D-Ms9fhd.mjs} +7 -7
- package/dist/{list-gy64AAWO.mjs → list-D3BBrpoQ.mjs} +5 -5
- package/dist/{list-STlBcPs8.mjs → list-D7o0DOZe.mjs} +5 -5
- package/dist/{list-CyIgwqFB.mjs → list-DBjOFesD.mjs} +6 -6
- package/dist/{list-B83-hnq5.mjs → list-DMZumpNv.mjs} +5 -5
- package/dist/{list-PYNFVJGM.mjs → list-De2qX1w8.mjs} +7 -7
- package/dist/{list-CtAFlkLe.mjs → list-ET066OdN.mjs} +5 -5
- package/dist/{list-BtNboYpZ.mjs → list-F0BQNbaZ.mjs} +25 -18
- package/dist/{list-OGkVAG6b.mjs → list-XgdM17ix.mjs} +6 -6
- package/dist/{list-DfPwBQrZ.mjs → list-_xdr1WKh.mjs} +5 -5
- package/dist/login-BHDdLJzw.mjs +453 -0
- package/dist/{logout-BUgUTFol.mjs → logout-ClizU0OL.mjs} +15 -6
- package/dist/{manifest-BPHqF5LY.mjs → manifest-DYeLri80.mjs} +2 -2
- package/dist/measure-SmyQt9Lg.mjs +19 -0
- package/dist/{metadata-Dwkcsa1c.mjs → metadata-D23RdbEZ.mjs} +8 -8
- package/dist/{metadata-B1EmV1l5.mjs → metadata-a_N6Sx30.mjs} +7 -7
- package/dist/{parse-enum-Dr7ACrTR.mjs → parse-enum-BatHQ-Gs.mjs} +1 -1
- package/dist/{parse-id-sKNP6yu5.mjs → parse-id-B1BlAunl.mjs} +1 -1
- package/dist/{parse-ref-BiETXmvm.mjs → parse-ref-CZr1bYIl.mjs} +1 -1
- package/dist/{path-BZJR7YLR.mjs → path-FSfPscAQ.mjs} +5 -5
- package/dist/{poll-Cyw-dQi4.mjs → poll-Dl5Zv4Ed.mjs} +2 -2
- package/dist/{poll-task-BG0oVnfZ.mjs → poll-task-BoRK94WQ.mjs} +2 -2
- package/dist/{preflight-BjR63JnX.mjs → preflight-CVlo39xa.mjs} +4 -4
- package/dist/process-DsGf7Mg5.mjs +73 -0
- package/dist/{prompt-u4WhE4T5.mjs → prompt-Bc_bHSD0.mjs} +13 -3
- package/dist/{query-C2xqnz24.mjs → query-CSvpJssD.mjs} +8 -8
- package/dist/{query-result-B4kTRid7.mjs → query-result-L5_NrwQR.mjs} +1 -1
- package/dist/{query-Dk55Wp2p.mjs → query-yZ9HeaGp.mjs} +12 -12
- package/dist/{remove-collection-DbVNWGyb.mjs → remove-collection-CV7ssevw.mjs} +8 -8
- package/dist/{render-BQHJhSP1.mjs → render-CkuFkWlQ.mjs} +6 -1
- package/dist/{rescan-values-CuLQ9UHP.mjs → rescan-values-CMeOv6yx.mjs} +8 -8
- package/dist/{run-PDN33QjN.mjs → run-CIJOYXor.mjs} +8 -8
- package/dist/{runs-B9T-7lei.mjs → runs--CzbmfPg.mjs} +7 -7
- package/dist/{runtime-DgHh4T6t.mjs → runtime-DJTGfiKO.mjs} +591 -123
- package/dist/{schema-tables-DjmNwrlT.mjs → schema-tables-BII9pHR8.mjs} +7 -7
- package/dist/{schemas-CWL8gv1C.mjs → schemas-BzxVz71I.mjs} +5 -5
- package/dist/{search-D7JzmvfR.mjs → search-CjJZdaM0.mjs} +5 -5
- package/dist/segment-dkO4Ualw.mjs +19 -0
- package/dist/{set-C0dCLnUA.mjs → set-Ds_brNWu.mjs} +8 -8
- package/dist/{setting-Licy7ZSs.mjs → setting-YDJRWd1m.mjs} +3 -3
- package/dist/{setup-BL4fqxoU.mjs → setup-DJb-NgSM.mjs} +7 -7
- package/dist/{skills-CY_FmaPo.mjs → skills-CJ8g8fhQ.mjs} +1 -1
- package/dist/{skills-Cn8FMCxG.mjs → skills-Dn-kn8Wj.mjs} +3 -3
- package/dist/snippet-DqTiC73e.mjs +19 -0
- package/dist/{stash-SGod4B8-.mjs → stash-DGujowmx.mjs} +8 -8
- package/dist/{status-CvUuZVvC.mjs → status-3-Tl07gu.mjs} +14 -6
- package/dist/{status-BCb5iCsQ.mjs → status-Cx0TIn1I.mjs} +7 -7
- package/dist/{summary-qaTPTLWs.mjs → summary-CT-xFvnX.mjs} +6 -6
- package/dist/{sync-schema-CjjAYTbO.mjs → sync-schema-BTF7O3FM.mjs} +10 -10
- package/dist/table-DNGPtV4P.mjs +19 -0
- package/dist/{table-CkWja2UH.mjs → table-qDD2kApF.mjs} +1 -1
- package/dist/transform-DEbvouxo.mjs +24 -0
- package/dist/transform-job-Du8npb7F.mjs +19 -0
- package/dist/{tree-C0MFcweC.mjs → tree-CLUxXw-Z.mjs} +5 -5
- package/dist/{update-DCR0wFNl.mjs → update-6IuvkFCk.mjs} +11 -11
- package/dist/{update-CHUUY-IB.mjs → update-BeH_S7h9.mjs} +9 -9
- package/dist/{update-BqsGGrzx.mjs → update-BfNmqvuN.mjs} +13 -13
- package/dist/{update-BImaz9vj.mjs → update-C_Ui5qPU.mjs} +12 -12
- package/dist/{update-CJASCsG4.mjs → update-DD5Q37bz.mjs} +9 -9
- package/dist/{update-Dty6LvU2.mjs → update-DdqzxPIr.mjs} +12 -12
- package/dist/{update-BTzsE8GU.mjs → update-DpCv5Mdo.mjs} +9 -9
- package/dist/{update-BUoWwmQV.mjs → update-I0t_6Mni.mjs} +9 -9
- package/dist/{update-vk_M0eOR.mjs → update-Z_LMzsiz.mjs} +11 -11
- package/dist/{update-dashcard-BkJaVVvf.mjs → update-dashcard-Bl3wbB8-.mjs} +9 -9
- package/dist/{update-qoP7hZTg.mjs → update-tQvEYuzD.mjs} +10 -10
- package/dist/{upgrade-TdaiAYbH.mjs → upgrade-r2ZlfstE.mjs} +6 -34
- package/dist/{uuid-BeUz8VpP.mjs → uuid-BduDonqb.mjs} +4 -4
- package/dist/{validate-B62TRDGV.mjs → validate-VawhJ5Sc.mjs} +2 -2
- package/dist/{validate-query-BpiN1CFu.mjs → validate-query-CSV-TTnd.mjs} +3 -3
- package/dist/{values-DR-3HcK6.mjs → values-DuNE6Jxc.mjs} +6 -6
- package/dist/{verify-D2uBlvmt.mjs → verify-D_yq68-R.mjs} +5 -5
- package/dist/{wait-FAnqO-LT.mjs → wait-CoDzO37B.mjs} +7 -7
- package/dist/{wait-flags-B5BI_xob.mjs → wait-flags-BxUfF5zy.mjs} +2 -2
- package/package.json +1 -1
- package/dist/add-collection-BPtBMh8Y.mjs +0 -10
- package/dist/auth-CjFnuPe9.mjs +0 -19
- package/dist/card-DoDpwR4t.mjs +0 -20
- package/dist/collection-CF-1RIPY.mjs +0 -20
- package/dist/dashboard-C5zTX345.mjs +0 -21
- package/dist/db-4y5Z1CQw.mjs +0 -22
- package/dist/document-97l9Non_.mjs +0 -19
- package/dist/field-BwUTrelF.mjs +0 -18
- package/dist/git-sync-JIMEYW-E.mjs +0 -28
- package/dist/is-dirty-4gf8ujws.mjs +0 -9
- package/dist/login-C0VFlX8y.mjs +0 -180
- package/dist/measure-BmcmxRQ3.mjs +0 -19
- package/dist/segment-DrZNuxsM.mjs +0 -19
- package/dist/snippet-C5_4nPGj.mjs +0 -19
- package/dist/table-DK1B8Hzq.mjs +0 -19
- package/dist/transform-Dh5746zH.mjs +0 -24
- package/dist/transform-job-D0nRGPYN.mjs +0 -19
- /package/dist/{body-flags-D78h_-Ua.mjs → body-flags-D7q87Btw.mjs} +0 -0
- /package/dist/{collection-BPTlcFw5.mjs → collection-Deiziuu2.mjs} +0 -0
- /package/dist/{dashboard-FY5UzJ_Z.mjs → dashboard-B4bn3z6t.mjs} +0 -0
- /package/dist/{document-CcfiiV3b.mjs → document-qfwR0r63.mjs} +0 -0
- /package/dist/{field-MGxpNQUH.mjs → field-E0IBy4Uw.mjs} +0 -0
- /package/dist/{measure-COGAoZpo.mjs → measure-JJAdFoqK.mjs} +0 -0
- /package/dist/{paginate-Dfm9eO9A.mjs → paginate-BexjkjbY.mjs} +0 -0
- /package/dist/{revision-message-flag-Bo-Kvv6F.mjs → revision-message-flag-C7zBeWEt.mjs} +0 -0
- /package/dist/{segment-d-708KKO.mjs → segment-B9SEv9V_.mjs} +0 -0
- /package/dist/{setting-CSJvi1-6.mjs → setting-i0pugNHl.mjs} +0 -0
- /package/dist/{snippet-BZvo05ua.mjs → snippet-NNzqlksR.mjs} +0 -0
- /package/dist/{transform-job-n8W6tLqF.mjs → transform-job-B9pXBOwr.mjs} +0 -0
- /package/dist/{transform--dviwMA1.mjs → transform-qczxOAzn.mjs} +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { isNotFoundError } from "./command-augment-CAur0XOQ.mjs";
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
|
|
4
|
+
//#region src/runtime/process.ts
|
|
5
|
+
var ProcessNotFoundError = class extends Error {
|
|
6
|
+
command;
|
|
7
|
+
constructor(command) {
|
|
8
|
+
super(`command not found: ${command}`);
|
|
9
|
+
this.name = "ProcessNotFoundError";
|
|
10
|
+
this.command = command;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const stdoutDecoder = new TextDecoder("utf-8");
|
|
14
|
+
function streamProcess(command, args, options = {}) {
|
|
15
|
+
return new Promise((resolve, reject) => {
|
|
16
|
+
const child = spawn(command, args, {
|
|
17
|
+
stdio: "inherit",
|
|
18
|
+
...options.shell === true ? { shell: true } : {}
|
|
19
|
+
});
|
|
20
|
+
child.on("error", (error) => {
|
|
21
|
+
if (isNotFoundError(error)) {
|
|
22
|
+
reject(new ProcessNotFoundError(command));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
reject(error);
|
|
26
|
+
});
|
|
27
|
+
child.on("close", (code) => resolve(code));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
const CMD_METACHARACTERS = /[&|<>^()"%!]/g;
|
|
31
|
+
function escapeForCmd(value) {
|
|
32
|
+
return value.replace(CMD_METACHARACTERS, (char) => `^${char}`);
|
|
33
|
+
}
|
|
34
|
+
function browserOpener(platform, url) {
|
|
35
|
+
if (platform === "darwin") return {
|
|
36
|
+
command: "open",
|
|
37
|
+
args: [url],
|
|
38
|
+
windowsVerbatim: false
|
|
39
|
+
};
|
|
40
|
+
if (platform === "win32") return {
|
|
41
|
+
command: "cmd",
|
|
42
|
+
args: [
|
|
43
|
+
"/c",
|
|
44
|
+
"start",
|
|
45
|
+
"\"\"",
|
|
46
|
+
escapeForCmd(url)
|
|
47
|
+
],
|
|
48
|
+
windowsVerbatim: true
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
command: "xdg-open",
|
|
52
|
+
args: [url],
|
|
53
|
+
windowsVerbatim: false
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function openBrowser(url) {
|
|
57
|
+
const opener = browserOpener(process.platform, url);
|
|
58
|
+
return new Promise((resolve) => {
|
|
59
|
+
const child = spawn(opener.command, opener.args, {
|
|
60
|
+
stdio: "ignore",
|
|
61
|
+
detached: true,
|
|
62
|
+
...opener.windowsVerbatim ? { windowsVerbatimArguments: true } : {}
|
|
63
|
+
});
|
|
64
|
+
child.on("error", () => resolve(false));
|
|
65
|
+
child.on("spawn", () => {
|
|
66
|
+
child.unref();
|
|
67
|
+
resolve(true);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
export { openBrowser, streamProcess };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbortError, ConfigError } from "./command-augment-
|
|
2
|
-
import { confirm, isCancel, password, text } from "@clack/prompts";
|
|
1
|
+
import { AbortError, ConfigError } from "./command-augment-CAur0XOQ.mjs";
|
|
2
|
+
import { confirm, isCancel, password, select, text } from "@clack/prompts";
|
|
3
3
|
|
|
4
4
|
//#region src/output/prompt.ts
|
|
5
5
|
async function promptText(opts) {
|
|
@@ -34,9 +34,19 @@ async function promptConfirm(opts) {
|
|
|
34
34
|
if (isCancel(value)) throw new AbortError();
|
|
35
35
|
return value;
|
|
36
36
|
}
|
|
37
|
+
async function promptSelect(opts) {
|
|
38
|
+
requireTty(opts.message);
|
|
39
|
+
const value = await select({
|
|
40
|
+
message: opts.message,
|
|
41
|
+
options: opts.choices,
|
|
42
|
+
...opts.initialValue !== void 0 && { initialValue: opts.initialValue }
|
|
43
|
+
});
|
|
44
|
+
if (isCancel(value)) throw new AbortError();
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
37
47
|
function requireTty(prompt) {
|
|
38
48
|
if (!process.stdin.isTTY) throw new ConfigError(`cannot prompt "${prompt}" — stdin is not a TTY`);
|
|
39
49
|
}
|
|
40
50
|
|
|
41
51
|
//#endregion
|
|
42
|
-
export { promptConfirm, promptPassword, promptText };
|
|
52
|
+
export { promptConfirm, promptPassword, promptSelect, promptText };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ConfigError } from "./command-augment-
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand, parseJson } from "./runtime-
|
|
4
|
-
import { renderSummary } from "./capabilities-
|
|
5
|
-
import "./field-
|
|
6
|
-
import { CardQueryResult, cardQueryView } from "./card-
|
|
7
|
-
import { parseId } from "./parse-id-
|
|
8
|
-
import { formatQueryResult } from "./query-result-
|
|
1
|
+
import { ConfigError } from "./command-augment-CAur0XOQ.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-DR_i1hxJ.mjs";
|
|
3
|
+
import { defineMetabaseCommand, parseJson } from "./runtime-DJTGfiKO.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
+
import "./field-E0IBy4Uw.mjs";
|
|
6
|
+
import { CardQueryResult, cardQueryView } from "./card-wCPcuKSi.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-B1BlAunl.mjs";
|
|
8
|
+
import { formatQueryResult } from "./query-result-L5_NrwQR.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { Writable } from "node:stream";
|
|
11
11
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ConfigError } from "./command-augment-
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import { renderSummary, writeJson } from "./capabilities-
|
|
5
|
-
import "./input-
|
|
6
|
-
import "./field-
|
|
7
|
-
import { CardQueryResult, cardQueryView } from "./card-
|
|
8
|
-
import { readBody } from "./body-
|
|
9
|
-
import { bodyInputFlags } from "./body-flags-
|
|
10
|
-
import { assertNotLegacyEnvelopeWrappingMbql5, getQuerySchemaBundle, isMbql5Query, validateQuery } from "./validate-
|
|
11
|
-
import { skipValidateFlag } from "./validate-query-
|
|
12
|
-
import { formatQueryResult } from "./query-result-
|
|
1
|
+
import { ConfigError } from "./command-augment-CAur0XOQ.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-DR_i1hxJ.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DJTGfiKO.mjs";
|
|
4
|
+
import { renderSummary, writeJson } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
+
import "./input-BXWgdKiS.mjs";
|
|
6
|
+
import "./field-E0IBy4Uw.mjs";
|
|
7
|
+
import { CardQueryResult, cardQueryView } from "./card-wCPcuKSi.mjs";
|
|
8
|
+
import { readBody } from "./body-3vzTm8Jj.mjs";
|
|
9
|
+
import { bodyInputFlags } from "./body-flags-D7q87Btw.mjs";
|
|
10
|
+
import { assertNotLegacyEnvelopeWrappingMbql5, getQuerySchemaBundle, isMbql5Query, validateQuery } from "./validate-VawhJ5Sc.mjs";
|
|
11
|
+
import { skipValidateFlag } from "./validate-query-CSV-TTnd.mjs";
|
|
12
|
+
import { formatQueryResult } from "./query-result-L5_NrwQR.mjs";
|
|
13
13
|
import { z } from "zod";
|
|
14
14
|
|
|
15
15
|
//#region src/commands/query.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./command-augment-
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import { renderSummary } from "./capabilities-
|
|
5
|
-
import { parseId } from "./parse-id-
|
|
6
|
-
import "./poll-
|
|
7
|
-
import "./poll-task-
|
|
8
|
-
import { SyncSettingsUpdateResult, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-
|
|
1
|
+
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-DR_i1hxJ.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DJTGfiKO.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-B1BlAunl.mjs";
|
|
6
|
+
import "./poll-Dl5Zv4Ed.mjs";
|
|
7
|
+
import "./poll-task-BoRK94WQ.mjs";
|
|
8
|
+
import { SyncSettingsUpdateResult, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-BQsx2Q-S.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/git-sync/remove-collection.ts
|
|
11
11
|
var remove_collection_default = defineMetabaseCommand({
|
|
@@ -21,6 +21,11 @@ function renderUserRole(value) {
|
|
|
21
21
|
if (isAdmin === null) return EMPTY_CELL;
|
|
22
22
|
return isAdmin ? "Admin" : "User";
|
|
23
23
|
}
|
|
24
|
+
function renderAuthMethod(value) {
|
|
25
|
+
if (value === "oauth") return "OAuth";
|
|
26
|
+
if (value === "apiKey") return "API key";
|
|
27
|
+
return EMPTY_CELL;
|
|
28
|
+
}
|
|
24
29
|
function renderVersionTag(value) {
|
|
25
30
|
return pickString(value, "tag") ?? EMPTY_CELL;
|
|
26
31
|
}
|
|
@@ -29,4 +34,4 @@ function renderTimestamp(value) {
|
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
//#endregion
|
|
32
|
-
export { EMPTY_CELL, renderTimestamp, renderUserName, renderUserRole, renderVersionTag };
|
|
37
|
+
export { EMPTY_CELL, renderAuthMethod, renderTimestamp, renderUserName, renderUserRole, renderVersionTag };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./command-augment-
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import { renderSummary } from "./capabilities-
|
|
5
|
-
import "./field-
|
|
6
|
-
import { parseId } from "./parse-id-
|
|
7
|
-
import "./table-
|
|
8
|
-
import { DatabaseSyncResult, DatabaseTaskAck, databaseSyncResultView } from "./database-
|
|
1
|
+
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-DR_i1hxJ.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DJTGfiKO.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
+
import "./field-E0IBy4Uw.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-B1BlAunl.mjs";
|
|
7
|
+
import "./table-qDD2kApF.mjs";
|
|
8
|
+
import { DatabaseSyncResult, DatabaseTaskAck, databaseSyncResultView } from "./database-BmsxuRmO.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/db/rescan-values.ts
|
|
11
11
|
var rescan_values_default = defineMetabaseCommand({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { TimeoutError } from "./command-augment-
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import { renderSummary } from "./capabilities-
|
|
5
|
-
import { parseId } from "./parse-id-
|
|
6
|
-
import { pollUntil } from "./poll-
|
|
7
|
-
import { parseWaitFlags, waitFlags } from "./wait-flags-
|
|
8
|
-
import { Transform, TransformRun } from "./transform
|
|
1
|
+
import { TimeoutError } from "./command-augment-CAur0XOQ.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-DR_i1hxJ.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DJTGfiKO.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-B1BlAunl.mjs";
|
|
6
|
+
import { pollUntil } from "./poll-Dl5Zv4Ed.mjs";
|
|
7
|
+
import { parseWaitFlags, waitFlags } from "./wait-flags-BxUfF5zy.mjs";
|
|
8
|
+
import { Transform, TransformRun } from "./transform-qczxOAzn.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/transform/run.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./command-augment-
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import { renderList } from "./capabilities-
|
|
5
|
-
import { parseId } from "./parse-id-
|
|
6
|
-
import { collectPaginated } from "./paginate-
|
|
7
|
-
import { TransformRun, TransformRunCompact, transformRunView } from "./transform
|
|
1
|
+
import "./command-augment-CAur0XOQ.mjs";
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag } from "./error-DR_i1hxJ.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-DJTGfiKO.mjs";
|
|
4
|
+
import { renderList } from "./capabilities-BX1rnVuH.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-B1BlAunl.mjs";
|
|
6
|
+
import { collectPaginated } from "./paginate-BexjkjbY.mjs";
|
|
7
|
+
import { TransformRun, TransformRunCompact, transformRunView } from "./transform-qczxOAzn.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/transform/runs.ts
|
|
10
10
|
const TransformRunListEnvelope = listEnvelopeSchema(TransformRunCompact);
|