@metabase/cli 0.1.9 → 0.1.10
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 +63 -0
- package/dist/add-collection-D9wXgmRj.mjs +10 -0
- package/dist/{add-collection-CoP-6FZR.mjs → add-collection-DUqTrC5T.mjs} +4 -4
- package/dist/{archive-BY8nrgnq.mjs → archive-0krZxAXq.mjs} +3 -3
- package/dist/{archive-BxwGVDpd.mjs → archive-44EWiXud.mjs} +3 -3
- package/dist/{archive-Blt0TxxA.mjs → archive-B59Y7ajB.mjs} +5 -5
- package/dist/{archive-CPLXsrzD.mjs → archive-BEIyIsin.mjs} +4 -4
- package/dist/{archive-BeslLaal.mjs → archive-BZfpjMir.mjs} +3 -3
- package/dist/{archive-C17qIvFW.mjs → archive-DtE2H4A6.mjs} +5 -5
- package/dist/archive-_GMNY8wH.mjs +39 -0
- package/dist/auth-cFC5m69m.mjs +19 -0
- package/dist/{body-2jl-YSxT.mjs → body-BdRyuvU4.mjs} +1 -1
- package/dist/{branches-Vlu44J51.mjs → branches-Jpv-FNds.mjs} +4 -4
- package/dist/{cancel-D0aBPUhs.mjs → cancel-ChC4lFd4.mjs} +3 -3
- package/dist/{cancel-task-DoL2bqs1.mjs → cancel-task-DyhIkNaL.mjs} +4 -4
- package/dist/card-ClvGX6dQ.mjs +20 -0
- package/dist/{cards-6MTreYAo.mjs → cards-O-nKkQKP.mjs} +3 -3
- package/dist/cli.mjs +24 -23
- package/dist/collection-DjvowSJC.mjs +20 -0
- package/dist/{collection-namespace-BdqQJb7j.mjs → collection-namespace-7724zUMx.mjs} +1 -1
- package/dist/{create-DcoF52Kx.mjs → create-B4f4Pldw.mjs} +4 -4
- package/dist/{create-BWD8H6yw.mjs → create-BbF9zVFP.mjs} +5 -5
- package/dist/{create-DNYFXAsy.mjs → create-BnFHcnlL.mjs} +4 -4
- package/dist/{create-BZRA7nPu.mjs → create-BuKx7kw6.mjs} +4 -4
- package/dist/{create-C_Z3IDrW.mjs → create-BxRsXQrm.mjs} +4 -4
- package/dist/{create-BsOdn1Q1.mjs → create-CvYKJOcE.mjs} +3 -3
- package/dist/create-D45uFXlo.mjs +44 -0
- package/dist/{create-dVmIemXi.mjs → create-DS52EhPd.mjs} +3 -3
- package/dist/{create-k59K2qf1.mjs → create-DeZ2x2Db.mjs} +4 -4
- package/dist/{create-branch-40Xm4DN7.mjs → create-branch-KOWUIE72.mjs} +4 -4
- package/dist/{current-task-BN_XEFSX.mjs → current-task-ClcWPPMc.mjs} +4 -4
- package/dist/dashboard-BFeURTOw.mjs +21 -0
- package/dist/db-CSH1kwQr.mjs +22 -0
- package/dist/{delete-tPjicYO4.mjs → delete-CX2VUA5R.mjs} +4 -4
- package/dist/{delete-DEFgs5LE.mjs → delete-D68oS73R.mjs} +4 -4
- package/dist/{delete-table-CDj19Qn6.mjs → delete-table-DLvL9mDA.mjs} +4 -4
- package/dist/{dirty-DGCa6W1F.mjs → dirty-1OrXpc7E.mjs} +4 -4
- package/dist/document-CcfiiV3b.mjs +100 -0
- package/dist/document-KdT_Xj6r.mjs +19 -0
- package/dist/{eid-3v5MAKNA.mjs → eid-CzLhHZMW.mjs} +3 -3
- package/dist/{error-BndUmcwS.mjs → error-BWXBhqLW.mjs} +1 -1
- package/dist/{export-BIZ-UR_M.mjs → export-B5z8w-xo.mjs} +6 -6
- package/dist/field-CTFnZI8G.mjs +18 -0
- package/dist/{fields-9lOrO8UH.mjs → fields-sC7pzmPX.mjs} +3 -3
- package/dist/{get-CRa-h69C.mjs → get-4GEDd9YN.mjs} +4 -4
- package/dist/get-BC60bhel.mjs +36 -0
- package/dist/{get-BIH72g0v.mjs → get-BYw3xS0X.mjs} +3 -3
- package/dist/{get-CHaIVT6Y.mjs → get-Bo1FGyFs.mjs} +4 -4
- package/dist/{get-LI2xsRoT.mjs → get-ByZ4HR2T.mjs} +3 -3
- package/dist/{get-DlGlnciR.mjs → get-C6n86-dS.mjs} +4 -4
- package/dist/{get-BYSj7tMP.mjs → get-CHb6J908.mjs} +4 -4
- package/dist/{get-BuM6QPjZ.mjs → get-DLwb_gUh.mjs} +4 -4
- package/dist/{get-BSJN5TwW.mjs → get-DTHLETau.mjs} +3 -3
- package/dist/{get-6Cj360cH.mjs → get-Dl62Fy6Y.mjs} +3 -3
- package/dist/{get-w-WqpjKy.mjs → get-Fn9WkNhS.mjs} +3 -3
- package/dist/{get-BpWjLkKT.mjs → get-ZesERdyk.mjs} +3 -3
- package/dist/{get-DFe2WoJ2.mjs → get-lcX52Skc.mjs} +4 -4
- package/dist/{get-Bk81meka.mjs → get-reSMTfQi.mjs} +2 -2
- package/dist/{get-run-hCZaw8-h.mjs → get-run-CpCbHJad.mjs} +4 -4
- package/dist/git-sync-C2vib8rx.mjs +28 -0
- package/dist/{has-remote-changes-DcpW1_KX.mjs → has-remote-changes-CPz_-uxd.mjs} +4 -4
- package/dist/{import-CTQT1atq.mjs → import-DaWgprK6.mjs} +6 -6
- package/dist/is-dirty-Bb0Rtj7x.mjs +9 -0
- package/dist/{is-dirty-DGrmt1ss.mjs → is-dirty-DZlI7lQx.mjs} +3 -3
- package/dist/{items-Kr0oN2V7.mjs → items-hgbRYsYD.mjs} +3 -3
- package/dist/{list-jcgK0thu.mjs → list-36H-dvJZ.mjs} +2 -2
- package/dist/list-B9J3ujwn.mjs +32 -0
- package/dist/{list-D2D5Mw1E.mjs → list-BGerkRHH.mjs} +3 -3
- package/dist/{list-Bz2ej0Cl.mjs → list-BWv5y307.mjs} +3 -3
- package/dist/{list-CCtYVgPN.mjs → list-BgHESP7b.mjs} +3 -3
- package/dist/{list-DzKKdfCI.mjs → list-CCZnH2-Z.mjs} +3 -3
- package/dist/{list-Cj3v4Lgv.mjs → list-CGdOC9zX.mjs} +2 -2
- package/dist/{list-zRQsvrH6.mjs → list-CKeVS1IZ.mjs} +3 -3
- package/dist/{list-tklIxo38.mjs → list-Cd2nOCAx.mjs} +2 -2
- package/dist/{list-DaESiI72.mjs → list-D9EuxFHO.mjs} +3 -3
- package/dist/{list-Ccj8-vb5.mjs → list-DBlsRSpZ.mjs} +2 -2
- package/dist/{list-Cl_O4_U4.mjs → list-DO8T-nmF.mjs} +3 -3
- package/dist/{list-CLvlEVQo.mjs → list-DOVX3vCb.mjs} +3 -3
- package/dist/{list-DNmekF2B.mjs → list-kath_2cX.mjs} +3 -3
- package/dist/{login-BMKBmgeQ.mjs → login-BzrAGJfu.mjs} +3 -3
- package/dist/{logout-C5pod937.mjs → logout-CKBiltoS.mjs} +2 -2
- package/dist/measure-Dw1QpRZa.mjs +19 -0
- package/dist/{metadata-CG4VZ5NW.mjs → metadata-BcGcUEVJ.mjs} +3 -3
- package/dist/{metadata-DIEbyQeS.mjs → metadata-BjOrKtnv.mjs} +3 -3
- package/dist/{parse-id-Boqc4wn4.mjs → parse-id--iVTCKSo.mjs} +1 -1
- package/dist/{path-ur3NsMFr.mjs → path-LgGU6Bd0.mjs} +3 -3
- package/dist/{poll-BMjCkDaj.mjs → poll-BucRFJT-.mjs} +1 -1
- package/dist/{poll-task-CiRA0ER9.mjs → poll-task-DTzKB3T3.mjs} +2 -2
- package/dist/{preflight-CSqcIlbX.mjs → preflight-CzqVX0PP.mjs} +1 -1
- package/dist/{query-B8JzsQ_I.mjs → query-BVZkK6Qk.mjs} +3 -3
- package/dist/{query-CG0rEMS-.mjs → query-DG_jygDF.mjs} +3 -3
- package/dist/{remove-collection-Clwz3EHQ.mjs → remove-collection-HdeAfLyi.mjs} +6 -6
- package/dist/{rescan-values-DuHBnFjK.mjs → rescan-values-hWubCruZ.mjs} +3 -3
- package/dist/{run-JXRivkfH.mjs → run-C1-lDmQF.mjs} +6 -6
- package/dist/{runs-FxgbXvax.mjs → runs-Q6DYQyqj.mjs} +4 -4
- package/dist/{runtime-Ck8KKQe-.mjs → runtime-colqvhLf.mjs} +1 -1
- package/dist/{schema-tables-izDPI4f5.mjs → schema-tables-BEastV_8.mjs} +3 -3
- package/dist/{schemas-CyzplnXl.mjs → schemas-CgawwI_k.mjs} +3 -3
- package/dist/{search-BeuoOEQV.mjs → search-BWo7xSPP.mjs} +3 -3
- package/dist/segment-DMuYvFjg.mjs +19 -0
- package/dist/{set-ClzB_5Jk.mjs → set-7Nm2ZTb_.mjs} +5 -5
- package/dist/{setting-CBJVEx7_.mjs → setting-DSGXJehQ.mjs} +3 -3
- package/dist/{setup-vKXEUMM7.mjs → setup-aJLGLrIT.mjs} +3 -3
- package/dist/{skills-1Z5Wj7Kp.mjs → skills-Q2AFsYvc.mjs} +3 -3
- package/dist/snippet-Df2TrP7-.mjs +19 -0
- package/dist/{stash-DLtVf4_D.mjs → stash-DPQ0c-Cd.mjs} +6 -6
- package/dist/{status-AnPzI1f7.mjs → status-CvAATvV0.mjs} +2 -2
- package/dist/{status-DHFYn9kO.mjs → status-CvKPrV5X.mjs} +5 -5
- package/dist/{summary-DDed1LOz.mjs → summary-CeOnoOq2.mjs} +3 -3
- package/dist/{sync-schema-BGQVq2JA.mjs → sync-schema-aOPBc3CY.mjs} +5 -5
- package/dist/table-pK4OkVtL.mjs +19 -0
- package/dist/transform-D60veFH8.mjs +24 -0
- package/dist/transform-job-DXt5LsrY.mjs +19 -0
- package/dist/{tree-BlYgJOn9.mjs → tree-MOQOBeAP.mjs} +2 -2
- package/dist/update-57uxZWcR.mjs +52 -0
- package/dist/{update-CdfAogO2.mjs → update-B6mg3AZD.mjs} +4 -4
- package/dist/{update-DBN7yfAk.mjs → update-BD9xkglP.mjs} +4 -4
- package/dist/{update-BHtliIr_.mjs → update-BRrnfG0q.mjs} +5 -5
- package/dist/{update-CgOPxKXK.mjs → update-BWyCK8QV.mjs} +6 -6
- package/dist/{update-CoVvsU-I.mjs → update-Bj9s0ri8.mjs} +5 -5
- package/dist/{update-DykqQLfo.mjs → update-BkMWBzvk.mjs} +4 -4
- package/dist/{update-B0z-2zqC.mjs → update-CitS-QRN.mjs} +5 -5
- package/dist/{update-DqSG5_Ie.mjs → update-DfNKr_vS.mjs} +5 -5
- package/dist/{update-CilTW98H.mjs → update-Dri4Zg2H.mjs} +5 -5
- package/dist/{update-dashcard-DZ8oV8up.mjs → update-dashcard-D_-ura3Y.mjs} +4 -4
- package/dist/{upgrade-B8sEEQdQ.mjs → upgrade-CFkZ4USY.mjs} +2 -2
- package/dist/{uuid-lLVnEoBN.mjs → uuid-DpinhSxA.mjs} +2 -2
- package/dist/{values-oD72EtRq.mjs → values-BSS4DRxk.mjs} +3 -3
- package/dist/{verify-Bg6F0oFN.mjs → verify-B_A7v8TY.mjs} +1 -1
- package/dist/{wait-BtzuqQC3.mjs → wait-D3iSnjMM.mjs} +5 -5
- package/dist/{wait-flags-DyFfZeav.mjs → wait-flags-_LnHOeBA.mjs} +2 -2
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +2 -2
- package/skill-data/document/SKILL.md +162 -0
- package/dist/add-collection-EPp89tcs.mjs +0 -10
- package/dist/auth-CCUDM9Sv.mjs +0 -19
- package/dist/card-UwczcLjq.mjs +0 -20
- package/dist/collection-Cexywhlj.mjs +0 -20
- package/dist/dashboard-B_CuVbMX.mjs +0 -21
- package/dist/db-DULi5MOr.mjs +0 -22
- package/dist/field-CfrrLetM.mjs +0 -18
- package/dist/git-sync-BpRstrZo.mjs +0 -28
- package/dist/is-dirty-DuWCgrz2.mjs +0 -9
- package/dist/measure-BkwFsP44.mjs +0 -19
- package/dist/segment-ChYmSM0p.mjs +0 -19
- package/dist/snippet-De70ayL1.mjs +0 -19
- package/dist/table-C_bP2ao-.mjs +0 -19
- package/dist/transform-B4RZfm6A.mjs +0 -24
- package/dist/transform-job-C4pZcrIF.mjs +0 -19
- /package/dist/{delete-runtime-DVb-Pkzp.mjs → delete-runtime-CjFc69tS.mjs} +0 -0
- /package/dist/{key-C2XG394c.mjs → key-y4TtxKwU.mjs} +0 -0
- /package/dist/{manifest-Cmu--CG5.mjs → manifest-BPHqF5LY.mjs} +0 -0
- /package/dist/{measure-ClESGxIb.mjs → measure-COGAoZpo.mjs} +0 -0
- /package/dist/{revision-message-flag-WmsIzUOM.mjs → revision-message-flag-Bo-Kvv6F.mjs} +0 -0
- /package/dist/{segment-Be2v4ilr.mjs → segment-d-708KKO.mjs} +0 -0
- /package/dist/{setting-oL97SNeO.mjs → setting-CSJvi1-6.mjs} +0 -0
- /package/dist/{skills-BDPVoBWU.mjs → skills-CY_FmaPo.mjs} +0 -0
- /package/dist/{snippet-xh42tYly.mjs → snippet-BZvo05ua.mjs} +0 -0
- /package/dist/{transform-DyWCoiO-.mjs → transform--dviwMA1.mjs} +0 -0
- /package/dist/{transform-job-DpDGoqQt.mjs → transform-job-n8W6tLqF.mjs} +0 -0
package/README.md
CHANGED
|
@@ -874,6 +874,68 @@ mb collection archive 4
|
|
|
874
874
|
mb collection archive 4 --json
|
|
875
875
|
```
|
|
876
876
|
|
|
877
|
+
## Documents
|
|
878
|
+
|
|
879
|
+
CRUD on `/api/document`. A document is a rich-text page that mixes prose with embedded saved questions (`cardEmbed`) and inline links to Metabase entities (`smartLink`). The body is a [TipTap](https://tiptap.dev/) (ProseMirror) JSON tree stored under `content_type: application/json+vnd.prose-mirror`. The agent-facing format reference lives in the bundled `document` skill (`mb skills get document`). It's a baseline OSS feature — no elevated server version or premium token required.
|
|
880
|
+
|
|
881
|
+
### `mb document list`
|
|
882
|
+
|
|
883
|
+
Returns non-archived documents visible to you. The compact item omits the (potentially large) `document` body — pull it with `get --full`.
|
|
884
|
+
|
|
885
|
+
```sh
|
|
886
|
+
mb document list
|
|
887
|
+
mb document list --json
|
|
888
|
+
```
|
|
889
|
+
|
|
890
|
+
### `mb document get <id>`
|
|
891
|
+
|
|
892
|
+
```sh
|
|
893
|
+
mb document get 1
|
|
894
|
+
mb document get 1 --json --full
|
|
895
|
+
```
|
|
896
|
+
|
|
897
|
+
### `mb document create`
|
|
898
|
+
|
|
899
|
+
```sh
|
|
900
|
+
cat document.json | mb document create
|
|
901
|
+
mb document create --file document.json
|
|
902
|
+
mb document create --body '{"name":"Notes","document":{"type":"doc","content":[]}}'
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
| Flag | Description |
|
|
906
|
+
| --------------- | ----------------------- |
|
|
907
|
+
| `--body <json>` | Inline JSON body. |
|
|
908
|
+
| `--file <path>` | Path to JSON body file. |
|
|
909
|
+
|
|
910
|
+
Body fields: `name` (required), `document` (required — the TipTap `doc` tree), `collection_id` (optional positive integer; `null` files it under "Our analytics"), `collection_position` (optional positive integer). New cards can be created inline by referencing them with negative ids in `cardEmbed` nodes and supplying their definitions in a top-level `cards` map — see the `document` skill.
|
|
911
|
+
|
|
912
|
+
For a document to open clean (no spurious "unsaved changes"), each id-bearing node (`paragraph`, `heading`, `codeBlock`, `orderedList`, `bulletList`, `blockquote`, `cardEmbed`, `supportingText`) must carry a unique `_id` — `create`/`update` **validate** this and reject a body where any such node is missing one (mint ids with `mb uuid`). Other node types don't take an `_id`. See the `document` skill (`mb skills get document`) for the full authoring guide.
|
|
913
|
+
|
|
914
|
+
### `mb document update <id>`
|
|
915
|
+
|
|
916
|
+
Patch a document. Body is a partial subset of the create shape plus `archived`. Only the keys you send are touched; replacing `document` replaces the whole body.
|
|
917
|
+
|
|
918
|
+
```sh
|
|
919
|
+
cat patch.json | mb document update 1
|
|
920
|
+
mb document update 1 --file patch.json
|
|
921
|
+
mb document update 1 --body '{"name":"renamed"}'
|
|
922
|
+
mb document update 1 --body '{"archived":false}'
|
|
923
|
+
```
|
|
924
|
+
|
|
925
|
+
| Flag | Description |
|
|
926
|
+
| --------------- | ----------------------- |
|
|
927
|
+
| `--body <json>` | Inline JSON body. |
|
|
928
|
+
| `--file <path>` | Path to JSON body file. |
|
|
929
|
+
|
|
930
|
+
### `mb document archive <id>`
|
|
931
|
+
|
|
932
|
+
Soft-delete a document by setting `archived: true`. To unarchive use `mb document update <id> --body '{"archived":false}'`.
|
|
933
|
+
|
|
934
|
+
```sh
|
|
935
|
+
mb document archive 1
|
|
936
|
+
mb document archive 1 --json
|
|
937
|
+
```
|
|
938
|
+
|
|
877
939
|
## Settings
|
|
878
940
|
|
|
879
941
|
Read and write Metabase instance settings via `/api/setting`. Listing all settings requires admin privileges; per-key reads/writes additionally enforce per-setting access. Setting values are always JSON — `"main"` is the string `main`, `42` is a number, `null` deletes the override and resets the value to its default.
|
|
@@ -1280,6 +1342,7 @@ Bundled skills:
|
|
|
1280
1342
|
| ----------- | -------------------------------------------------------------------------------------- |
|
|
1281
1343
|
| `core` | Top-level guide: auth, flag conventions, output flags, body input, every command group |
|
|
1282
1344
|
| `transform` | Authoring and running transforms (native SQL + MBQL 5), iteration, run inspection |
|
|
1345
|
+
| `document` | Authoring document bodies: the TipTap JSON tree, embedding cards, entity links |
|
|
1283
1346
|
| `git-sync` | Round-tripping Metabase content to/from a git remote |
|
|
1284
1347
|
|
|
1285
1348
|
Discovery surfaces:
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import "./error-BWXBhqLW.mjs";
|
|
3
|
+
import "./runtime-colqvhLf.mjs";
|
|
4
|
+
import "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./parse-id--iVTCKSo.mjs";
|
|
6
|
+
import "./poll-BucRFJT-.mjs";
|
|
7
|
+
import "./poll-task-DTzKB3T3.mjs";
|
|
8
|
+
import { SyncSettingsUpdateResult, add_collection_default, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-DUqTrC5T.mjs";
|
|
9
|
+
|
|
10
|
+
export { add_collection_default as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
2
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
2
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
3
3
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
4
|
-
import { parseId } from "./parse-id
|
|
5
|
-
import { REMOTE_SYNC_PATHS } from "./poll-task-
|
|
4
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
5
|
+
import { REMOTE_SYNC_PATHS } from "./poll-task-DTzKB3T3.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/git-sync/add-collection.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
-
import { parseId } from "./parse-id
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
6
6
|
import { Dashboard, dashboardView } from "./dashboard-FY5UzJ_Z.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/dashboard/archive.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
5
|
import "./field-MGxpNQUH.mjs";
|
|
6
6
|
import { Card, cardView } from "./card-DnIeMmUn.mjs";
|
|
7
|
-
import { parseId } from "./parse-id
|
|
7
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/card/archive.ts
|
|
10
10
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
-
import { parseId } from "./parse-id
|
|
6
|
-
import { Measure, measureView } from "./measure-
|
|
7
|
-
import { revisionMessageFlag } from "./revision-message-flag-
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
6
|
+
import { Measure, measureView } from "./measure-COGAoZpo.mjs";
|
|
7
|
+
import { revisionMessageFlag } from "./revision-message-flag-Bo-Kvv6F.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/measure/archive.ts
|
|
10
10
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
-
import { parseId } from "./parse-id
|
|
6
|
-
import { Snippet, snippetView } from "./snippet-
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
6
|
+
import { Snippet, snippetView } from "./snippet-BZvo05ua.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/snippet/archive.ts
|
|
9
9
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
-
import { parseId } from "./parse-id
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
6
6
|
import { Collection, collectionView } from "./collection-BPTlcFw5.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/collection/archive.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
-
import { parseId } from "./parse-id
|
|
6
|
-
import { revisionMessageFlag } from "./revision-message-flag-
|
|
7
|
-
import { Segment, segmentView } from "./segment-
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
6
|
+
import { revisionMessageFlag } from "./revision-message-flag-Bo-Kvv6F.mjs";
|
|
7
|
+
import { Segment, segmentView } from "./segment-d-708KKO.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/segment/archive.ts
|
|
10
10
|
var archive_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
6
|
+
import { Document, documentView } from "./document-CcfiiV3b.mjs";
|
|
7
|
+
|
|
8
|
+
//#region src/commands/document/archive.ts
|
|
9
|
+
var archive_default = defineMetabaseCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
name: "archive",
|
|
12
|
+
description: "Archive (soft-delete) a document by id"
|
|
13
|
+
},
|
|
14
|
+
capabilities: { minVersion: 58 },
|
|
15
|
+
args: {
|
|
16
|
+
...outputFlags,
|
|
17
|
+
...profileFlag,
|
|
18
|
+
...connectionFlags,
|
|
19
|
+
id: {
|
|
20
|
+
type: "positional",
|
|
21
|
+
description: "Document id",
|
|
22
|
+
required: true
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
outputSchema: Document,
|
|
26
|
+
examples: ["mb document archive 1", "mb document archive 1 --json"],
|
|
27
|
+
async run({ args, ctx, getClient }) {
|
|
28
|
+
const id = parseId(args.id);
|
|
29
|
+
const client = await getClient();
|
|
30
|
+
const updated = await client.requestParsed(Document, `/api/document/${id}`, {
|
|
31
|
+
method: "PUT",
|
|
32
|
+
body: { archived: true }
|
|
33
|
+
});
|
|
34
|
+
renderSummary(updated, documentView, `Archived document ${updated.id} "${updated.name}".`, ctx);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { archive_default as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/auth/index.ts
|
|
4
|
+
var auth_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "auth",
|
|
7
|
+
description: "Authenticate against a Metabase instance"
|
|
8
|
+
},
|
|
9
|
+
default: "login",
|
|
10
|
+
subCommands: {
|
|
11
|
+
login: () => import("./login-BzrAGJfu.mjs").then((m) => m.default),
|
|
12
|
+
status: () => import("./status-CvAATvV0.mjs").then((m) => m.default),
|
|
13
|
+
list: () => import("./list-BGerkRHH.mjs").then((m) => m.default),
|
|
14
|
+
logout: () => import("./logout-CKBiltoS.mjs").then((m) => m.default)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { auth_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { parseJson } from "./runtime-
|
|
2
|
+
import { parseJson } from "./runtime-colqvhLf.mjs";
|
|
3
3
|
import { DEFAULT_FLAG_NAME, readInput } from "./input-xewHccej.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/body.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderList } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
-
import "./poll-
|
|
6
|
-
import { REMOTE_SYNC_PATHS } from "./poll-task-
|
|
5
|
+
import "./poll-BucRFJT-.mjs";
|
|
6
|
+
import { REMOTE_SYNC_PATHS } from "./poll-task-DTzKB3T3.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/git-sync/branches.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
-
import { parseId } from "./parse-id
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/transform/cancel.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
-
import "./poll-
|
|
6
|
-
import { REMOTE_SYNC_PATHS, SyncTask, syncTaskView } from "./poll-task-
|
|
5
|
+
import "./poll-BucRFJT-.mjs";
|
|
6
|
+
import { REMOTE_SYNC_PATHS, SyncTask, syncTaskView } from "./poll-task-DTzKB3T3.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/git-sync/cancel-task.ts
|
|
9
9
|
var cancel_task_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/card/index.ts
|
|
4
|
+
var card_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "card",
|
|
7
|
+
description: "Manage Metabase cards (questions, models, metrics)"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-CGdOC9zX.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-BYw3xS0X.mjs").then((mod) => mod.default),
|
|
12
|
+
query: () => import("./query-BVZkK6Qk.mjs").then((mod) => mod.default),
|
|
13
|
+
create: () => import("./create-CvYKJOcE.mjs").then((mod) => mod.default),
|
|
14
|
+
update: () => import("./update-BkMWBzvk.mjs").then((mod) => mod.default),
|
|
15
|
+
archive: () => import("./archive-44EWiXud.mjs").then((mod) => mod.default)
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { card_default as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, listEnvelopeSchema, outputFlags, profileFlag, wrapList } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderList } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
-
import { parseId } from "./parse-id
|
|
5
|
+
import { parseId } from "./parse-id--iVTCKSo.mjs";
|
|
6
6
|
import { DashboardDetail, DashcardCompact, dashcardView } from "./dashboard-FY5UzJ_Z.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/dashboard/cards.ts
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { ConfigError, flagConsumesValue, getMetabaseAugment, normalizeFlag, resolveCitty, toAliasArray } from "./command-augment-BH9qgQ5u.mjs";
|
|
3
|
-
import { connectionFlags, outputFlags, package_default, profileFlag, reportError } from "./error-
|
|
3
|
+
import { connectionFlags, outputFlags, package_default, profileFlag, reportError } from "./error-BWXBhqLW.mjs";
|
|
4
4
|
import { defineCommand, renderUsage, runMain } from "citty";
|
|
5
5
|
|
|
6
6
|
//#region src/commands/global-flags.ts
|
|
@@ -58,28 +58,29 @@ const main = defineCommand({
|
|
|
58
58
|
description: package_default.description
|
|
59
59
|
},
|
|
60
60
|
subCommands: {
|
|
61
|
-
auth: () => import("./auth-
|
|
62
|
-
db: () => import("./db-
|
|
63
|
-
table: () => import("./table-
|
|
64
|
-
field: () => import("./field-
|
|
65
|
-
card: () => import("./card-
|
|
66
|
-
dashboard: () => import("./dashboard-
|
|
67
|
-
collection: () => import("./collection-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
61
|
+
auth: () => import("./auth-cFC5m69m.mjs").then((mod) => mod.default),
|
|
62
|
+
db: () => import("./db-CSH1kwQr.mjs").then((mod) => mod.default),
|
|
63
|
+
table: () => import("./table-pK4OkVtL.mjs").then((mod) => mod.default),
|
|
64
|
+
field: () => import("./field-CTFnZI8G.mjs").then((mod) => mod.default),
|
|
65
|
+
card: () => import("./card-ClvGX6dQ.mjs").then((mod) => mod.default),
|
|
66
|
+
dashboard: () => import("./dashboard-BFeURTOw.mjs").then((mod) => mod.default),
|
|
67
|
+
collection: () => import("./collection-DjvowSJC.mjs").then((mod) => mod.default),
|
|
68
|
+
document: () => import("./document-KdT_Xj6r.mjs").then((mod) => mod.default),
|
|
69
|
+
transform: () => import("./transform-D60veFH8.mjs").then((mod) => mod.default),
|
|
70
|
+
"transform-job": () => import("./transform-job-DXt5LsrY.mjs").then((mod) => mod.default),
|
|
71
|
+
setting: () => import("./setting-DSGXJehQ.mjs").then((mod) => mod.default),
|
|
72
|
+
search: () => import("./search-BWo7xSPP.mjs").then((mod) => mod.default),
|
|
73
|
+
"git-sync": () => import("./git-sync-C2vib8rx.mjs").then((mod) => mod.default),
|
|
74
|
+
setup: () => import("./setup-aJLGLrIT.mjs").then((mod) => mod.default),
|
|
75
|
+
snippet: () => import("./snippet-Df2TrP7-.mjs").then((mod) => mod.default),
|
|
76
|
+
segment: () => import("./segment-DMuYvFjg.mjs").then((mod) => mod.default),
|
|
77
|
+
measure: () => import("./measure-Dw1QpRZa.mjs").then((mod) => mod.default),
|
|
78
|
+
eid: () => import("./eid-CzLhHZMW.mjs").then((mod) => mod.default),
|
|
79
|
+
query: () => import("./query-DG_jygDF.mjs").then((mod) => mod.default),
|
|
80
|
+
uuid: () => import("./uuid-DpinhSxA.mjs").then((mod) => mod.default),
|
|
81
|
+
upgrade: () => import("./upgrade-CFkZ4USY.mjs").then((mod) => mod.default),
|
|
82
|
+
skills: () => import("./skills-Q2AFsYvc.mjs").then((mod) => mod.default),
|
|
83
|
+
__manifest: () => import("./manifest-BPHqF5LY.mjs").then((mod) => mod.createManifestCommand(main))
|
|
83
84
|
}
|
|
84
85
|
});
|
|
85
86
|
var main_default = main;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/collection/index.ts
|
|
4
|
+
var collection_default = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "collection",
|
|
7
|
+
description: "Manage Metabase collections"
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
list: () => import("./list-36H-dvJZ.mjs").then((mod) => mod.default),
|
|
11
|
+
get: () => import("./get-reSMTfQi.mjs").then((mod) => mod.default),
|
|
12
|
+
items: () => import("./items-hgbRYsYD.mjs").then((mod) => mod.default),
|
|
13
|
+
tree: () => import("./tree-MOQOBeAP.mjs").then((mod) => mod.default),
|
|
14
|
+
create: () => import("./create-DS52EhPd.mjs").then((mod) => mod.default),
|
|
15
|
+
archive: () => import("./archive-BZfpjMir.mjs").then((mod) => mod.default)
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { collection_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigError } from "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { HttpError } from "./runtime-
|
|
2
|
+
import { HttpError } from "./runtime-colqvhLf.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/commands/transform/collection-namespace.ts
|
|
5
5
|
const TRANSFORMS_NAMESPACE_HINT = "transforms can only be filed in a :transforms-namespace collection. Create one with `mb collection create --body '{\"name\":\"…\"}' --namespace transforms` and pass its id as collection_id, or omit collection_id to leave the transform uncollected.";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
5
|
import "./input-xewHccej.mjs";
|
|
6
6
|
import "./field-MGxpNQUH.mjs";
|
|
7
7
|
import "./card-DnIeMmUn.mjs";
|
|
8
|
-
import { readBody } from "./body-
|
|
8
|
+
import { readBody } from "./body-BdRyuvU4.mjs";
|
|
9
9
|
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
10
10
|
import "./validate-B62TRDGV.mjs";
|
|
11
11
|
import { Dashboard, DashboardCreateInput, DashboardDetail, dashboardView } from "./dashboard-FY5UzJ_Z.mjs";
|
|
12
|
-
import { preflightDashcardCardReferences, wrapChainedDashboardWriteError } from "./preflight-
|
|
12
|
+
import { preflightDashcardCardReferences, wrapChainedDashboardWriteError } from "./preflight-CzqVX0PP.mjs";
|
|
13
13
|
|
|
14
14
|
//#region src/commands/dashboard/create.ts
|
|
15
15
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
5
|
import "./input-xewHccej.mjs";
|
|
6
|
-
import { readBody } from "./body-
|
|
6
|
+
import { readBody } from "./body-BdRyuvU4.mjs";
|
|
7
7
|
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
8
8
|
import "./validate-B62TRDGV.mjs";
|
|
9
9
|
import { TRANSFORM_SOURCE_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BpiN1CFu.mjs";
|
|
10
|
-
import { Transform, TransformCreateInput, transformView } from "./transform
|
|
11
|
-
import { enrichTransformCollectionError } from "./collection-namespace-
|
|
10
|
+
import { Transform, TransformCreateInput, transformView } from "./transform--dviwMA1.mjs";
|
|
11
|
+
import { enrichTransformCollectionError } from "./collection-namespace-7724zUMx.mjs";
|
|
12
12
|
|
|
13
13
|
//#region src/commands/transform/create.ts
|
|
14
14
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
5
|
import "./input-xewHccej.mjs";
|
|
6
|
-
import { readBody } from "./body-
|
|
6
|
+
import { readBody } from "./body-BdRyuvU4.mjs";
|
|
7
7
|
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
8
|
-
import { TransformJob, TransformJobCreateInput, transformJobView } from "./transform-job-
|
|
8
|
+
import { TransformJob, TransformJobCreateInput, transformJobView } from "./transform-job-n8W6tLqF.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/transform-job/create.ts
|
|
11
11
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
5
|
import "./input-xewHccej.mjs";
|
|
6
|
-
import { readBody } from "./body-
|
|
6
|
+
import { readBody } from "./body-BdRyuvU4.mjs";
|
|
7
7
|
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
8
|
-
import { Snippet, SnippetCreateInput, snippetView } from "./snippet-
|
|
8
|
+
import { Snippet, SnippetCreateInput, snippetView } from "./snippet-BZvo05ua.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/snippet/create.ts
|
|
11
11
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
5
|
import "./input-xewHccej.mjs";
|
|
6
|
-
import { readBody } from "./body-
|
|
6
|
+
import { readBody } from "./body-BdRyuvU4.mjs";
|
|
7
7
|
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
8
8
|
import "./validate-B62TRDGV.mjs";
|
|
9
9
|
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BpiN1CFu.mjs";
|
|
10
|
-
import { Segment, SegmentCreateInput, segmentView } from "./segment-
|
|
10
|
+
import { Segment, SegmentCreateInput, segmentView } from "./segment-d-708KKO.mjs";
|
|
11
11
|
|
|
12
12
|
//#region src/commands/segment/create.ts
|
|
13
13
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
5
|
import "./input-xewHccej.mjs";
|
|
6
6
|
import "./field-MGxpNQUH.mjs";
|
|
7
7
|
import { Card, CardCreateInput, cardView } from "./card-DnIeMmUn.mjs";
|
|
8
|
-
import { readBody } from "./body-
|
|
8
|
+
import { readBody } from "./body-BdRyuvU4.mjs";
|
|
9
9
|
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
10
10
|
import "./validate-B62TRDGV.mjs";
|
|
11
11
|
import { CARD_DATASET_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BpiN1CFu.mjs";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
|
+
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
|
+
import "./input-xewHccej.mjs";
|
|
6
|
+
import { readBody } from "./body-BdRyuvU4.mjs";
|
|
7
|
+
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
8
|
+
import { Document, DocumentCreateInput, documentView } from "./document-CcfiiV3b.mjs";
|
|
9
|
+
|
|
10
|
+
//#region src/commands/document/create.ts
|
|
11
|
+
var create_default = defineMetabaseCommand({
|
|
12
|
+
meta: {
|
|
13
|
+
name: "create",
|
|
14
|
+
description: "Create a document"
|
|
15
|
+
},
|
|
16
|
+
capabilities: { minVersion: 58 },
|
|
17
|
+
args: {
|
|
18
|
+
...outputFlags,
|
|
19
|
+
...profileFlag,
|
|
20
|
+
...connectionFlags,
|
|
21
|
+
...bodyInputFlags
|
|
22
|
+
},
|
|
23
|
+
outputSchema: Document,
|
|
24
|
+
examples: [
|
|
25
|
+
"cat doc.json | mb document create",
|
|
26
|
+
"mb document create --file doc.json",
|
|
27
|
+
"mb document create --body '{\"name\":\"Notes\",\"document\":{\"type\":\"doc\",\"content\":[]}}'"
|
|
28
|
+
],
|
|
29
|
+
async run({ args, ctx, getClient }) {
|
|
30
|
+
const body = await readBody({
|
|
31
|
+
flag: args.body,
|
|
32
|
+
file: args.file
|
|
33
|
+
}, DocumentCreateInput);
|
|
34
|
+
const client = await getClient();
|
|
35
|
+
const created = await client.requestParsed(Document, "/api/document", {
|
|
36
|
+
method: "POST",
|
|
37
|
+
body
|
|
38
|
+
});
|
|
39
|
+
renderSummary(created, documentView, `Created document ${created.id} "${created.name}".`, ctx);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { create_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
5
|
import "./input-xewHccej.mjs";
|
|
6
|
-
import { readBody } from "./body-
|
|
6
|
+
import { readBody } from "./body-BdRyuvU4.mjs";
|
|
7
7
|
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
8
8
|
import { parseEnumFlag } from "./parse-enum-Dr7ACrTR.mjs";
|
|
9
9
|
import { Collection, CollectionCreateInput, CollectionNamespace, collectionView } from "./collection-BPTlcFw5.mjs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./command-augment-BH9qgQ5u.mjs";
|
|
2
|
-
import { connectionFlags, outputFlags, profileFlag } from "./error-
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
2
|
+
import { connectionFlags, outputFlags, profileFlag } from "./error-BWXBhqLW.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-colqvhLf.mjs";
|
|
4
4
|
import { renderSummary } from "./capabilities-7L9GVMd_.mjs";
|
|
5
5
|
import "./input-xewHccej.mjs";
|
|
6
|
-
import { readBody } from "./body-
|
|
6
|
+
import { readBody } from "./body-BdRyuvU4.mjs";
|
|
7
7
|
import { bodyInputFlags } from "./body-flags-D78h_-Ua.mjs";
|
|
8
8
|
import "./validate-B62TRDGV.mjs";
|
|
9
9
|
import { MEASURE_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-BpiN1CFu.mjs";
|
|
10
|
-
import { Measure, MeasureCreateInput, measureView } from "./measure-
|
|
10
|
+
import { Measure, MeasureCreateInput, measureView } from "./measure-COGAoZpo.mjs";
|
|
11
11
|
|
|
12
12
|
//#region src/commands/measure/create.ts
|
|
13
13
|
var create_default = defineMetabaseCommand({
|