@metabase/cli 0.2.1-alpha.trust-system-ca.541e4e0 → 0.2.2
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 +196 -9
- package/dist/{add-collection-BZAVH5Wk.mjs → add-collection-B-Pf12HY.mjs} +4 -4
- package/dist/add-collection-B2PdVMRy.mjs +9 -0
- package/dist/alert-DGcECcDb.mjs +26 -0
- package/dist/alerts-CRGMX4eB.mjs +49 -0
- package/dist/{append-Cak5jykn.mjs → append-lL0IaI6U.mjs} +5 -5
- package/dist/{archive-BMbx6lt8.mjs → archive-3rLXY0nS.mjs} +4 -4
- package/dist/{archive-CjnCAM61.mjs → archive-BUFc1me2.mjs} +5 -5
- package/dist/{archive-CPgWNCG3.mjs → archive-Baz4OVDd.mjs} +4 -4
- package/dist/{archive-CytCvQpn.mjs → archive-C9mJGN6J.mjs} +4 -4
- package/dist/{archive-BIEnBoE8.mjs → archive-CUGRnyRV.mjs} +4 -4
- package/dist/{archive-op9pJRpg.mjs → archive-D3DErepm.mjs} +4 -4
- package/dist/{archive-CaKhG58H.mjs → archive-D8YrImIU.mjs} +6 -6
- package/dist/{archive-BVY_jD_g.mjs → archive-DihHU042.mjs} +5 -5
- package/dist/archive-DyPsHSFb.mjs +39 -0
- package/dist/{archive-DfbI8DRB.mjs → archive-ExcEma7q.mjs} +7 -7
- package/dist/archive-hKPQXgXa.mjs +38 -0
- package/dist/{auth-XfuGXI2K.mjs → auth-B8Yb4ZaN.mjs} +5 -5
- package/dist/{body-BW_CiL1d.mjs → body-DXJ2v3GY.mjs} +3 -3
- package/dist/{branches-gVRwKne4.mjs → branches-ByCzTuiv.mjs} +4 -4
- package/dist/{cancel-CBOJSslz.mjs → cancel-DvehNbDD.mjs} +3 -3
- package/dist/{cancel-task-Djancczz.mjs → cancel-task-BM8ADd3Y.mjs} +4 -4
- package/dist/{capabilities-CSjeWyLV.mjs → capabilities-1HTHeDa4.mjs} +1 -1
- package/dist/{card-B8G5jQQT.mjs → card-BFRRyTGs.mjs} +3 -3
- package/dist/card-BT7ce7uO.mjs +27 -0
- package/dist/{cards-23FtfL4S.mjs → cards-Bz6anDNX.mjs} +6 -6
- package/dist/cli.mjs +30 -28
- package/dist/collection-ahFSJT-e.mjs +23 -0
- package/dist/{collection-namespace-w1y5D0Uh.mjs → collection-namespace-8i_CvWsg.mjs} +2 -2
- package/dist/{create-BkvdOecg.mjs → create--_4GZUNY.mjs} +7 -6
- package/dist/{create-DbHIjWio.mjs → create-1O1UiTVt.mjs} +6 -6
- package/dist/{create-CvptjYVb.mjs → create-BnNRvoyz.mjs} +11 -11
- package/dist/{create-CGsTL5aE.mjs → create-BynNiG1N.mjs} +6 -6
- package/dist/{create-q2QqkwEN.mjs → create-CHK9cJcK.mjs} +8 -8
- package/dist/create-COI80Veo.mjs +52 -0
- package/dist/{create-CnT-L03B.mjs → create-CtIOvInN.mjs} +8 -8
- package/dist/{create-ldvT5L0W.mjs → create-Cy57naL0.mjs} +12 -12
- package/dist/{create-C_fyIHZU.mjs → create-D57tRDrg.mjs} +8 -8
- package/dist/{create-VA58AF6A.mjs → create-D6bXJlBS.mjs} +6 -6
- package/dist/{create-BRK8TBzp.mjs → create-DAj8pyfQ.mjs} +5 -5
- package/dist/create-DOpa2TmH.mjs +53 -0
- package/dist/{create-branch-BtqOfSRb.mjs → create-branch-BwqFHYcZ.mjs} +4 -4
- package/dist/{create-CnqGhtuF.mjs → create-qzjhJFP8.mjs} +6 -6
- package/dist/{create-DZBtbGqj.mjs → create-t7z8Eb4T.mjs} +6 -6
- package/dist/{create-D_eiLBqR.mjs → create-yK1-fuX5.mjs} +9 -9
- package/dist/cron-93wjhtrP.mjs +7 -0
- package/dist/{csv-C3O1wTQ8.mjs → csv-yoFA1hhv.mjs} +5 -5
- package/dist/{current-task-CZsZPe0o.mjs → current-task-D8Q1uFmk.mjs} +4 -4
- package/dist/{dashboard-BLihjDXg.mjs → dashboard-BSCXTX4H.mjs} +2 -2
- package/dist/dashboard-C__PiWrv.mjs +36 -0
- package/dist/{database-BOqzcexD.mjs → database-B-xwx5LA.mjs} +1 -1
- package/dist/{db-CHnqeJCo.mjs → db-BiLWl1J9.mjs} +7 -7
- package/dist/{delete-BmT5C6eK.mjs → delete-B8dui6O6.mjs} +5 -5
- package/dist/{delete-cF97pfFX.mjs → delete-BwPgIWV8.mjs} +5 -5
- package/dist/{delete-Dkfu4e5K.mjs → delete-CA7IjA5J.mjs} +5 -5
- package/dist/{delete-DgI03U43.mjs → delete-CawUDFud.mjs} +5 -5
- package/dist/{delete-JeRzVISE.mjs → delete-Dcu3iDkg.mjs} +5 -5
- package/dist/{delete-runtime-DiqKOEqi.mjs → delete-runtime-00-R9iJm.mjs} +2 -2
- package/dist/{delete-table-dnQs_Twm.mjs → delete-table-DS0b3i0k.mjs} +5 -5
- package/dist/{dependencies-BsMwFSxP.mjs → dependencies-BQVZylqV.mjs} +4 -4
- package/dist/{dirty-CN6sGKX3.mjs → dirty-BqdcrfUz.mjs} +4 -4
- package/dist/document-C9ykHYOG.mjs +22 -0
- package/dist/{eid-60sCZhQV.mjs → eid-DcCAs-RP.mjs} +5 -5
- package/dist/{events-CSZEAgs0.mjs → events-C9PqRUCO.mjs} +4 -4
- package/dist/{export-CAxUJer6.mjs → export-CdKR5nPT.mjs} +6 -6
- package/dist/field-P7aJaet9.mjs +21 -0
- package/dist/{fields-CLWtUlpR.mjs → fields-D2czTLKq.mjs} +5 -5
- package/dist/get-4rA8pbRu.mjs +38 -0
- package/dist/{get-DTjeTNGb.mjs → get-75Vdyusm.mjs} +4 -4
- package/dist/{get-Csa7Dz36.mjs → get-B2vvnMpl.mjs} +5 -5
- package/dist/{get-B_QKP1vR.mjs → get-B6fSPCfp.mjs} +4 -4
- package/dist/{get-BIHtWl2x.mjs → get-BbKC0fTx.mjs} +4 -4
- package/dist/{get-CRXEqpar.mjs → get-BfFKIfpX.mjs} +5 -4
- package/dist/{get-B22wjDxr.mjs → get-Bpw05IUm.mjs} +7 -7
- package/dist/{get-L8c_h5EP.mjs → get-CJYv3CfV.mjs} +3 -3
- package/dist/{get-H3X5e5-Y.mjs → get-CaIYg15K.mjs} +6 -6
- package/dist/get-CvXOGyFj.mjs +36 -0
- package/dist/{get-DxAx-2C0.mjs → get-Cvkt6GcQ.mjs} +4 -4
- package/dist/{get-Ct5TnofS.mjs → get-DQ0pb4tT.mjs} +4 -4
- package/dist/{get-fGOQA0GF.mjs → get-DXiL39gi.mjs} +6 -6
- package/dist/{get-Ca30K5_W.mjs → get-DXydDRVU.mjs} +4 -4
- package/dist/{get-CKnHNxak.mjs → get-DZRB5S37.mjs} +4 -4
- package/dist/{get-BNBRMNtC.mjs → get-Db8YNxId.mjs} +5 -5
- package/dist/{get-B_EinsrO.mjs → get-DhS4y0K9.mjs} +4 -4
- package/dist/{get-DU8V-7S2.mjs → get-Dy5f54pV.mjs} +4 -4
- package/dist/{get-run-DqwPQRMJ.mjs → get-run-BF5ZBE8o.mjs} +4 -4
- package/dist/{get-CaosV7j8.mjs → get-vGqyjGSW.mjs} +4 -4
- package/dist/git-sync-BzievbUz.mjs +31 -0
- package/dist/{has-remote-changes-D0ZIBHSk.mjs → has-remote-changes-CjDHphUH.mjs} +4 -4
- package/dist/{import-BcIcDPl9.mjs → import-DzA5Ty9_.mjs} +6 -6
- package/dist/{input-D2-H-QKX.mjs → input-BpXlmJ5J.mjs} +1 -1
- package/dist/{is-dirty-B87YMLV2.mjs → is-dirty-4kIyD4oP.mjs} +3 -3
- package/dist/is-dirty-Cv0bdKkX.mjs +8 -0
- package/dist/{items-DrP1b4Qj.mjs → items-BXH0f1r6.mjs} +6 -6
- package/dist/{key-GP1gxZZD.mjs → key-B9AAqwjq.mjs} +1 -1
- package/dist/{library-bUBWlweP.mjs → library-BFZYsBcz.mjs} +5 -5
- package/dist/list-AyGEaws8.mjs +8 -0
- package/dist/{list-TibX1b8i.mjs → list-Bar8uQRC.mjs} +3 -3
- package/dist/{list-D1pHJX7w.mjs → list-BiAVv9jX.mjs} +3 -3
- package/dist/{list-MPePXEWe.mjs → list-Bm1PlZEV.mjs} +3 -3
- package/dist/{list-DhT42e0q.mjs → list-BtgjcC2w.mjs} +3 -3
- package/dist/{list-B8zgT05M.mjs → list-By1yYVGq.mjs} +7 -7
- package/dist/{list-F_hMRbsa.mjs → list-CG3ec9BZ.mjs} +4 -4
- package/dist/{list-B8212eUr.mjs → list-CLgkOcmY.mjs} +5 -5
- package/dist/{list-TJjExx6e.mjs → list-CSnpbFML.mjs} +3 -3
- package/dist/list-Cn-VruXD.mjs +8 -0
- package/dist/{list-CoXeBm66.mjs → list-D7mMcRG5.mjs} +6 -6
- package/dist/{list-TQghfc-u.mjs → list-DOhVPh95.mjs} +3 -3
- package/dist/{list-GeqRHx8g.mjs → list-DSHteJOl.mjs} +4 -3
- package/dist/{list-B-_PTqKw.mjs → list-Dl81pkVs.mjs} +5 -5
- package/dist/{list-Cbhx7N_t.mjs → list-DwMcwucR.mjs} +3 -3
- package/dist/{list-CWQYaCp8.mjs → list-IxaPXKXu.mjs} +3 -3
- package/dist/list-SiSfX4wl.mjs +73 -0
- package/dist/{list-BhCahBEO.mjs → list-hKRQUcGB.mjs} +3 -3
- package/dist/list-oRyXsJXs.mjs +50 -0
- package/dist/{list-DCl7zHCp.mjs → list-w61Uovt2.mjs} +5 -5
- package/dist/{login-C5Ug3BVC.mjs → login-zUCMDLC8.mjs} +7 -7
- package/dist/{logout-B_N1N2DV.mjs → logout-BFh7QHx6.mjs} +3 -3
- package/dist/{measure-D9rKeA6Z.mjs → measure-DNldT89z.mjs} +6 -6
- package/dist/notification-BR5wehqg.mjs +201 -0
- package/dist/{parameter-values-ZXKECrJk.mjs → parameter-values-BYDFzxNY.mjs} +4 -4
- package/dist/{parse-enum-D5h-JePs.mjs → parse-enum-D1zTYr_i.mjs} +1 -1
- package/dist/{parse-id-ySsF4nA3.mjs → parse-id-waEVK-uR.mjs} +1 -1
- package/dist/{parse-ref-Ds8VxdKb.mjs → parse-ref-C3DUXwci.mjs} +1 -1
- package/dist/patch-BpjI9BOz.mjs +20 -0
- package/dist/patch-DrMVqf34.mjs +36 -0
- package/dist/{path-C6ucgeYs.mjs → path-Bvs9IR4k.mjs} +3 -3
- package/dist/{poll-CgzD9_RH.mjs → poll-rqLkEJVP.mjs} +2 -2
- package/dist/{poll-task-DF9xJl13.mjs → poll-task-CiB1o1wG.mjs} +2 -2
- package/dist/{preflight-Co2grgX_.mjs → preflight-DJOBTWVq.mjs} +3 -3
- package/dist/{process-jjR_DX5G.mjs → process-BxAUv3Wx.mjs} +1 -1
- package/dist/{prompt-BSqji7Fo.mjs → prompt-DmxSLNrO.mjs} +1 -1
- package/dist/{publish-F-QbufXr.mjs → publish-C1y_vGGw.mjs} +10 -10
- package/dist/pulse-C8q469KD.mjs +186 -0
- package/dist/{query-DX4r0-uz.mjs → query-B9LlGOZI.mjs} +8 -8
- package/dist/{query-DGBzATpV.mjs → query-DpVWKW-y.mjs} +12 -12
- package/dist/{query-result-D5J3Dlpn.mjs → query-result-Bvh89K4f.mjs} +1 -1
- package/dist/{remove-collection-C-msSyas.mjs → remove-collection-DYQibG6d.mjs} +6 -6
- package/dist/{replace-xlQv9yl_.mjs → replace-sHtPBNnA.mjs} +5 -5
- package/dist/{requests-COuEPJxE.mjs → requests-Pc0u7PQS.mjs} +2 -2
- package/dist/{rescan-values-BC2SVtY6.mjs → rescan-values-CuPGOzKI.mjs} +6 -6
- package/dist/{resolve-8iT-dXgX.mjs → resolve-BiL5scF0.mjs} +2 -2
- package/dist/{run-opQkYIaT.mjs → run-Ce_gPVcg.mjs} +3 -3
- package/dist/{run-Cg6k3kHo.mjs → run-D6jyZ0nv.mjs} +6 -6
- package/dist/{runs-Cbqm1HYG.mjs → runs-DRxrpAkU.mjs} +5 -5
- package/dist/{runtime-MGH96fhp.mjs → runtime-CPIHg_Zg.mjs} +104 -100
- package/dist/{schema-tables-8FjtkFIt.mjs → schema-tables-D91DWM5l.mjs} +5 -5
- package/dist/{schemas-L9kMsEJL.mjs → schemas-OVYRgvz9.mjs} +3 -3
- package/dist/{search-Csbb-u-_.mjs → search-msFNbxU6.mjs} +3 -3
- package/dist/{segment-DCeafJwX.mjs → segment-BIKVTq_n.mjs} +6 -6
- package/dist/{selectors-D34gXjQa.mjs → selectors-Bsyhe1zP.mjs} +3 -3
- package/dist/send-BeFpVrwD.mjs +60 -0
- package/dist/{set-active-gP4mjVDY.mjs → set-active-CFWtIWzX.mjs} +3 -3
- package/dist/{set-CfwncOI_.mjs → set-jRnCLhvc.mjs} +6 -6
- package/dist/{setting-D5Y9sJha.mjs → setting-CApPg0Xr.mjs} +4 -4
- package/dist/{setup-D9HNfS7W.mjs → setup-CruHFQJz.mjs} +5 -5
- package/dist/{skills-DvSQOPWg.mjs → skills-CxqkjkdQ.mjs} +3 -3
- package/dist/{skills-aRQfUvCq.mjs → skills-DlFbbaoS.mjs} +1 -1
- package/dist/snippet-DdoeL-7N.mjs +22 -0
- package/dist/{stash-C_k1uZlf.mjs → stash-CR-ESWiX.mjs} +6 -6
- package/dist/{status-D1vtL5eW.mjs → status-BMEdl-_G.mjs} +3 -3
- package/dist/{status-BsEPyknG.mjs → status-DCIOvsc6.mjs} +8 -8
- package/dist/subscription-BOOBR5Ir.mjs +25 -0
- package/dist/subscriptions-C_1AQpZF.mjs +47 -0
- package/dist/summary-D1fKnwE3.mjs +8 -0
- package/dist/{summary-h20AjhcO.mjs → summary-WUjzNITU.mjs} +4 -4
- package/dist/{sync-schema-D67cYLhd.mjs → sync-schema-Cq5LzHHc.mjs} +8 -8
- package/dist/{sync-scope-CKx6xeF6.mjs → sync-scope-Dh1wBlrg.mjs} +5 -5
- package/dist/table-BK56VDw8.mjs +21 -0
- package/dist/{table-3onHpwcb.mjs → table-fDvuvqoU.mjs} +1 -1
- package/dist/timeline-Dl5pm5tN.mjs +24 -0
- package/dist/{timeline-event-C6aKZ4EO.mjs → timeline-event-5JAeGVSI.mjs} +6 -6
- package/dist/transform-ATK6rJBl.mjs +31 -0
- package/dist/transform-job-BezBE6Y8.mjs +25 -0
- package/dist/{transform-job-CvE0MBBo.mjs → transform-job-sJmW_En3.mjs} +4 -4
- package/dist/{transform-tag-DhDnvbmq.mjs → transform-tag-GqbcG_6_.mjs} +5 -5
- package/dist/{transforms-BQkmsPUR.mjs → transforms-Cosz-Vq3.mjs} +4 -4
- package/dist/{tree-CtufTBZY.mjs → tree-BkXtw0c4.mjs} +3 -3
- package/dist/{unpublish-CnLXPYR8.mjs → unpublish-BlGj7omM.mjs} +4 -4
- package/dist/{update-CE-Z6E8V.mjs → update-BHhEtxwC.mjs} +13 -13
- package/dist/update-C-ChEcI9.mjs +57 -0
- package/dist/{update-dJ2mlCXm.mjs → update-C9K1QnOo.mjs} +8 -7
- package/dist/{update-Dt9-3Tqf.mjs → update-CTWsiwme.mjs} +7 -7
- package/dist/{update-DmQJqGvX.mjs → update-CXlhrcy8.mjs} +7 -7
- package/dist/update-Cbsgvopz.mjs +56 -0
- package/dist/{update-bz-FKwuR.mjs → update-CsYFWkVd.mjs} +12 -12
- package/dist/{update-D6blsNGY.mjs → update-CuKHukZ6.mjs} +7 -7
- package/dist/{update-C4P_YtGW.mjs → update-CzrbMLZq.mjs} +7 -7
- package/dist/{update-BZxLyBVm.mjs → update-DDVuyquf.mjs} +9 -9
- package/dist/{update-BC-MLtiG.mjs → update-DpIzJ8Ts.mjs} +10 -10
- package/dist/{update-DcYwxb-R.mjs → update-DrvAdi-O.mjs} +8 -8
- package/dist/{update-QNuvGuS3.mjs → update-Tw0kARao.mjs} +7 -7
- package/dist/{update-DshCe-bl.mjs → update-ZJ5T-SBW.mjs} +9 -9
- package/dist/{update-dashcard-CQP-qd6a.mjs → update-dashcard-Dnfa8_aJ.mjs} +9 -9
- package/dist/{update-CqQj32ol.mjs → update-hoCyoR-u.mjs} +7 -7
- package/dist/{upgrade--_g3bacj.mjs → upgrade-D0HiyTxw.mjs} +4 -4
- package/dist/upload-WT6SywFa.mjs +16 -0
- package/dist/{uuid-DBKkosBq.mjs → uuid-D7NcSTj8.mjs} +2 -2
- package/dist/{validate-Bpqt3ntH.mjs → validate-BoY75_M3.mjs} +1 -1
- package/dist/{validate-query-tECK019A.mjs → validate-query-Di0VKMF-.mjs} +2 -2
- package/dist/{values-BAhMnVh6.mjs → values-OBiEVCVH.mjs} +4 -4
- package/dist/{verify-RLb2DoOX.mjs → verify-VEB7TBQ_.mjs} +2 -2
- package/dist/{wait-BJ_87Yz0.mjs → wait-B9qNlcTe.mjs} +5 -5
- package/dist/{wait-flags-DEn-3mjb.mjs → wait-flags-D0FEgH6k.mjs} +2 -2
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +5 -3
- package/skill-data/notification/SKILL.md +157 -0
- package/dist/add-collection-DByJYvGO.mjs +0 -9
- package/dist/card-B_kiDDil.mjs +0 -26
- package/dist/collection-DNzM3u7n.mjs +0 -23
- package/dist/dashboard-kb1oz7Z3.mjs +0 -35
- package/dist/document-Y_DZNi4D.mjs +0 -22
- package/dist/field-DAB2gImv.mjs +0 -21
- package/dist/git-sync-BhhdNjq5.mjs +0 -31
- package/dist/is-dirty-CXTS25Tk.mjs +0 -8
- package/dist/snippet-CwRiMCfE.mjs +0 -22
- package/dist/table-CmKFWPvJ.mjs +0 -21
- package/dist/timeline-1ZphX3zj.mjs +0 -24
- package/dist/transform-CvsBOTqB.mjs +0 -31
- package/dist/transform-job-D_8Kp772.mjs +0 -25
- package/dist/upload-BOFc_eZD.mjs +0 -16
- /package/dist/{body-flags-CgHgJBRC.mjs → body-flags-Cbv-Ba6W.mjs} +0 -0
- /package/dist/{collection-C52Ndi_O.mjs → collection-BrrjbPLN.mjs} +0 -0
- /package/dist/{document-D4zB-5a0.mjs → document-C7IR6T8c.mjs} +0 -0
- /package/dist/{embedding-CKdw8q7p.mjs → embedding-B0x9CPkU.mjs} +0 -0
- /package/dist/{field-DsXTeqBy.mjs → field-RYBTW2KS.mjs} +0 -0
- /package/dist/{group-CILtQqCL.mjs → group-DfTvzGz-.mjs} +0 -0
- /package/dist/{listing-wFZuS5li.mjs → listing-1G8iFfZe.mjs} +0 -0
- /package/dist/{measure-ByY4U3ZK.mjs → measure-DH3ow2ko.mjs} +0 -0
- /package/dist/{paginate-FVZUxL4J.mjs → paginate-DuDXvUPr.mjs} +0 -0
- /package/dist/{parameter-BZ6y-Gfs.mjs → parameter-hCQ80jnc.mjs} +0 -0
- /package/dist/{render-CkuFkWlQ.mjs → render-rgZBe3rO.mjs} +0 -0
- /package/dist/{revision-message-flag-vt_V8ACy.mjs → revision-message-flag-B4BxzDXJ.mjs} +0 -0
- /package/dist/{segment-eeGhLo7_.mjs → segment-cwIOOF0v.mjs} +0 -0
- /package/dist/{setting-DADuiF5W.mjs → setting-CDEoJYO0.mjs} +0 -0
- /package/dist/{snippet-CdjEhVCT.mjs → snippet-1xYckIwc.mjs} +0 -0
- /package/dist/{timeline-2ShuGr4f.mjs → timeline-BNwnJ3g9.mjs} +0 -0
- /package/dist/{transform-DNSMm1dV.mjs → transform-BkSkCvpx.mjs} +0 -0
- /package/dist/{transform-tag-xdxjlDcD.mjs → transform-tag-qTjNVfTW.mjs} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ConfigError, connectionFlags, errorMessage, outputFlags, profileFlag, renderSummary, warn } from "./capabilities-
|
|
1
|
+
import { ConfigError, connectionFlags, errorMessage, outputFlags, profileFlag, renderSummary, warn } from "./capabilities-1HTHeDa4.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { DEFAULT_PROFILE, OAUTH_SCOPE, ParsedVersionSchema, ProbedUser, consumeKeychainResidualWarning, consumeKeyringDowngradeWarning, defineMetabaseCommand, discoverMetadata, exchangeCode, explicitProfileName, keyringFallbackWarning, normalizeUrl, oauthCredentialFromTokens, readEnvCredentials, registerClient, revokeOAuthCredential, tryDiscoverMetadata, writeOAuthProfile, writeProbeFailure, writeProbeResult, writeProfile } from "./runtime-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { DEFAULT_PROFILE, OAUTH_SCOPE, ParsedVersionSchema, ProbedUser, consumeKeychainResidualWarning, consumeKeyringDowngradeWarning, defineMetabaseCommand, discoverMetadata, exchangeCode, explicitProfileName, keyringFallbackWarning, normalizeUrl, oauthCredentialFromTokens, readEnvCredentials, registerClient, revokeOAuthCredential, tryDiscoverMetadata, writeOAuthProfile, writeProbeFailure, writeProbeResult, writeProfile } from "./runtime-CPIHg_Zg.mjs";
|
|
4
|
+
import { readInput } from "./input-BpXlmJ5J.mjs";
|
|
5
|
+
import { verifyAndProbe } from "./verify-VEB7TBQ_.mjs";
|
|
6
|
+
import { EMPTY_CELL, renderUserName, renderUserRole, renderVersionTag } from "./render-rgZBe3rO.mjs";
|
|
7
|
+
import { promptPassword, promptSelect, promptText } from "./prompt-DmxSLNrO.mjs";
|
|
8
|
+
import { openBrowser } from "./process-BxAUv3Wx.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { createServer } from "node:http";
|
|
11
11
|
import { createHash, randomBytes } from "node:crypto";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { errorMessage, outputFlags, profileFlag, renderSummary, warn } from "./capabilities-
|
|
1
|
+
import { errorMessage, outputFlags, profileFlag, renderSummary, warn } from "./capabilities-1HTHeDa4.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { clearProfile, consumeKeychainResidualWarning, defineMetabaseCommand, readProfileCredential, resolveProfileName, revokeOAuthCredential } from "./runtime-
|
|
4
|
-
import { promptConfirm } from "./prompt-
|
|
3
|
+
import { clearProfile, consumeKeychainResidualWarning, defineMetabaseCommand, readProfileCredential, resolveProfileName, revokeOAuthCredential } from "./runtime-CPIHg_Zg.mjs";
|
|
4
|
+
import { promptConfirm } from "./prompt-DmxSLNrO.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/auth/logout.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
2
|
-
import { defineCommandGroup } from "./group-
|
|
2
|
+
import { defineCommandGroup } from "./group-DfTvzGz-.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/commands/measure/index.ts
|
|
5
5
|
var measure_default = defineCommandGroup({
|
|
@@ -13,11 +13,11 @@ var measure_default = defineCommandGroup({
|
|
|
13
13
|
purpose: "define reusable measures"
|
|
14
14
|
}],
|
|
15
15
|
subCommands: {
|
|
16
|
-
list: () => import("./list-
|
|
17
|
-
get: () => import("./get-
|
|
18
|
-
create: () => import("./create-
|
|
19
|
-
update: () => import("./update-
|
|
20
|
-
archive: () => import("./archive-
|
|
16
|
+
list: () => import("./list-DwMcwucR.mjs").then((mod) => mod.default),
|
|
17
|
+
get: () => import("./get-B6fSPCfp.mjs").then((mod) => mod.default),
|
|
18
|
+
create: () => import("./create-CHK9cJcK.mjs").then((mod) => mod.default),
|
|
19
|
+
update: () => import("./update-ZJ5T-SBW.mjs").then((mod) => mod.default),
|
|
20
|
+
archive: () => import("./archive-DihHU042.mjs").then((mod) => mod.default)
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { CronUiDisplayType } from "./cron-93wjhtrP.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/domain/notification.ts
|
|
5
|
+
const NotificationPayloadType = z.enum([
|
|
6
|
+
"notification/card",
|
|
7
|
+
"notification/dashboard",
|
|
8
|
+
"notification/system-event",
|
|
9
|
+
"notification/testing"
|
|
10
|
+
]);
|
|
11
|
+
const CARD_PAYLOAD_TYPE = "notification/card";
|
|
12
|
+
const NotificationSendCondition = z.enum([
|
|
13
|
+
"has_result",
|
|
14
|
+
"goal_above",
|
|
15
|
+
"goal_below"
|
|
16
|
+
]);
|
|
17
|
+
const NotificationChannelType = z.enum([
|
|
18
|
+
"channel/email",
|
|
19
|
+
"channel/slack",
|
|
20
|
+
"channel/http"
|
|
21
|
+
]);
|
|
22
|
+
const NotificationRecipientType = z.enum([
|
|
23
|
+
"notification-recipient/user",
|
|
24
|
+
"notification-recipient/group",
|
|
25
|
+
"notification-recipient/raw-value",
|
|
26
|
+
"notification-recipient/template"
|
|
27
|
+
]);
|
|
28
|
+
const NotificationSubscriptionType = z.enum(["notification-subscription/cron", "notification-subscription/system-event"]);
|
|
29
|
+
const NotificationRecipientDetails = z.object({
|
|
30
|
+
value: z.string().optional(),
|
|
31
|
+
channel_id: z.string().nullable().optional()
|
|
32
|
+
}).loose();
|
|
33
|
+
const NotificationRecipientDetailsCompact = NotificationRecipientDetails.pick({
|
|
34
|
+
value: true,
|
|
35
|
+
channel_id: true
|
|
36
|
+
}).strip();
|
|
37
|
+
const NotificationRecipient = z.object({
|
|
38
|
+
id: z.number().int().optional(),
|
|
39
|
+
type: NotificationRecipientType,
|
|
40
|
+
user_id: z.number().int().nullable().optional(),
|
|
41
|
+
permissions_group_id: z.number().int().nullable().optional(),
|
|
42
|
+
details: NotificationRecipientDetails.nullable().optional()
|
|
43
|
+
}).loose();
|
|
44
|
+
const NotificationRecipientCompact = NotificationRecipient.pick({
|
|
45
|
+
type: true,
|
|
46
|
+
user_id: true,
|
|
47
|
+
permissions_group_id: true
|
|
48
|
+
}).strip().extend({ details: NotificationRecipientDetailsCompact.nullable().optional() });
|
|
49
|
+
const NotificationHandler = z.object({
|
|
50
|
+
id: z.number().int().optional(),
|
|
51
|
+
channel_type: NotificationChannelType,
|
|
52
|
+
channel_id: z.number().int().nullable().optional(),
|
|
53
|
+
template_id: z.number().int().nullable().optional(),
|
|
54
|
+
active: z.boolean().optional(),
|
|
55
|
+
recipients: z.array(NotificationRecipient).optional()
|
|
56
|
+
}).loose();
|
|
57
|
+
const NotificationHandlerCompact = NotificationHandler.pick({
|
|
58
|
+
channel_type: true,
|
|
59
|
+
channel_id: true
|
|
60
|
+
}).strip().extend({ recipients: z.array(NotificationRecipientCompact).optional() });
|
|
61
|
+
const NotificationSubscription = z.object({
|
|
62
|
+
id: z.number().int().optional(),
|
|
63
|
+
type: NotificationSubscriptionType,
|
|
64
|
+
cron_schedule: z.string().nullable().optional(),
|
|
65
|
+
event_name: z.string().nullable().optional(),
|
|
66
|
+
ui_display_type: CronUiDisplayType.nullable().optional()
|
|
67
|
+
}).loose();
|
|
68
|
+
const NotificationSubscriptionCompact = NotificationSubscription.pick({
|
|
69
|
+
type: true,
|
|
70
|
+
cron_schedule: true
|
|
71
|
+
}).strip();
|
|
72
|
+
const NotificationCardPayload = z.object({
|
|
73
|
+
id: z.number().int().optional(),
|
|
74
|
+
card_id: z.number().int(),
|
|
75
|
+
send_condition: NotificationSendCondition,
|
|
76
|
+
send_once: z.boolean()
|
|
77
|
+
}).loose();
|
|
78
|
+
const NotificationCardPayloadCompact = NotificationCardPayload.pick({
|
|
79
|
+
card_id: true,
|
|
80
|
+
send_condition: true,
|
|
81
|
+
send_once: true
|
|
82
|
+
}).strip();
|
|
83
|
+
const Notification = z.object({
|
|
84
|
+
id: z.number().int(),
|
|
85
|
+
payload_type: NotificationPayloadType,
|
|
86
|
+
payload_id: z.number().int().nullable(),
|
|
87
|
+
payload: NotificationCardPayload.nullable(),
|
|
88
|
+
active: z.boolean(),
|
|
89
|
+
creator_id: z.number().int().nullable(),
|
|
90
|
+
subscriptions: z.array(NotificationSubscription),
|
|
91
|
+
handlers: z.array(NotificationHandler)
|
|
92
|
+
}).loose();
|
|
93
|
+
const NotificationCompact = Notification.pick({
|
|
94
|
+
id: true,
|
|
95
|
+
payload_type: true,
|
|
96
|
+
active: true,
|
|
97
|
+
creator_id: true
|
|
98
|
+
}).strip().extend({
|
|
99
|
+
payload: NotificationCardPayloadCompact.nullable(),
|
|
100
|
+
subscriptions: z.array(NotificationSubscriptionCompact),
|
|
101
|
+
handlers: z.array(NotificationHandlerCompact)
|
|
102
|
+
});
|
|
103
|
+
const NullableCardPayload = NotificationCardPayload.nullable();
|
|
104
|
+
const NotificationSubscriptionList = z.array(NotificationSubscription);
|
|
105
|
+
const NotificationHandlerList = z.array(NotificationHandler);
|
|
106
|
+
const notificationView = {
|
|
107
|
+
compactPick: NotificationCompact,
|
|
108
|
+
tableColumns: [
|
|
109
|
+
{
|
|
110
|
+
key: "id",
|
|
111
|
+
label: "ID"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
key: "payload",
|
|
115
|
+
label: "Card",
|
|
116
|
+
format: formatPayload
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
key: "subscriptions",
|
|
120
|
+
label: "Schedule",
|
|
121
|
+
format: formatSubscriptions
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
key: "handlers",
|
|
125
|
+
label: "Delivery",
|
|
126
|
+
format: formatHandlers
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
key: "active",
|
|
130
|
+
label: "Active"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
};
|
|
134
|
+
function formatPayload(value) {
|
|
135
|
+
const parsed = NullableCardPayload.safeParse(value);
|
|
136
|
+
if (!parsed.success || parsed.data === null) return "";
|
|
137
|
+
const { card_id, send_condition, send_once } = parsed.data;
|
|
138
|
+
const once = send_once ? ", once" : "";
|
|
139
|
+
return `${card_id} (${send_condition}${once})`;
|
|
140
|
+
}
|
|
141
|
+
function formatSubscriptions(value) {
|
|
142
|
+
const parsed = NotificationSubscriptionList.safeParse(value);
|
|
143
|
+
if (!parsed.success) return "";
|
|
144
|
+
return parsed.data.map((subscription) => subscription.cron_schedule ?? subscription.event_name ?? "").filter((label) => label !== "").join("; ");
|
|
145
|
+
}
|
|
146
|
+
function formatHandlers(value) {
|
|
147
|
+
const parsed = NotificationHandlerList.safeParse(value);
|
|
148
|
+
if (!parsed.success) return "";
|
|
149
|
+
return parsed.data.map(describeHandler).join("; ");
|
|
150
|
+
}
|
|
151
|
+
function describeHandler(handler) {
|
|
152
|
+
const channel = handler.channel_type.replace("channel/", "");
|
|
153
|
+
const recipients = (handler.recipients ?? []).map(describeRecipient).join(", ");
|
|
154
|
+
return recipients === "" ? channel : `${channel} → ${recipients}`;
|
|
155
|
+
}
|
|
156
|
+
function describeRecipient(recipient) {
|
|
157
|
+
switch (recipient.type) {
|
|
158
|
+
case "notification-recipient/user": return `user:${recipient.user_id}`;
|
|
159
|
+
case "notification-recipient/group": return `group:${recipient.permissions_group_id}`;
|
|
160
|
+
case "notification-recipient/raw-value": return recipient.details?.value ?? "";
|
|
161
|
+
case "notification-recipient/template": return "template";
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
const NotificationRecipientInput = z.object({
|
|
165
|
+
type: NotificationRecipientType,
|
|
166
|
+
user_id: z.number().int().positive().optional(),
|
|
167
|
+
permissions_group_id: z.number().int().positive().optional(),
|
|
168
|
+
details: NotificationRecipientDetails.optional()
|
|
169
|
+
}).loose();
|
|
170
|
+
const NotificationHandlerInput = z.object({
|
|
171
|
+
channel_type: NotificationChannelType,
|
|
172
|
+
channel_id: z.number().int().positive().nullable().optional(),
|
|
173
|
+
active: z.boolean().optional(),
|
|
174
|
+
recipients: z.array(NotificationRecipientInput).optional()
|
|
175
|
+
}).loose();
|
|
176
|
+
const NotificationSubscriptionInput = z.object({
|
|
177
|
+
type: NotificationSubscriptionType.default("notification-subscription/cron"),
|
|
178
|
+
cron_schedule: z.string().min(1)
|
|
179
|
+
}).loose();
|
|
180
|
+
const NotificationCardPayloadInput = z.object({
|
|
181
|
+
card_id: z.number().int().positive(),
|
|
182
|
+
send_condition: NotificationSendCondition.optional(),
|
|
183
|
+
send_once: z.boolean().optional()
|
|
184
|
+
}).loose();
|
|
185
|
+
const NotificationCreateInput = z.object({
|
|
186
|
+
payload_type: NotificationPayloadType.default(CARD_PAYLOAD_TYPE),
|
|
187
|
+
payload: NotificationCardPayloadInput,
|
|
188
|
+
subscriptions: z.array(NotificationSubscriptionInput).min(1),
|
|
189
|
+
handlers: z.array(NotificationHandlerInput).min(1),
|
|
190
|
+
active: z.boolean().optional()
|
|
191
|
+
}).loose();
|
|
192
|
+
const NotificationCardPayloadPatch = NotificationCardPayloadInput.partial();
|
|
193
|
+
const NotificationUpdateInput = z.object({
|
|
194
|
+
payload: NotificationCardPayloadPatch.optional(),
|
|
195
|
+
subscriptions: z.array(NotificationSubscriptionInput).min(1).optional(),
|
|
196
|
+
handlers: z.array(NotificationHandlerInput).min(1).optional(),
|
|
197
|
+
active: z.boolean().optional()
|
|
198
|
+
}).loose();
|
|
199
|
+
|
|
200
|
+
//#endregion
|
|
201
|
+
export { CARD_PAYLOAD_TYPE, Notification, NotificationCardPayload, NotificationCompact, NotificationCreateInput, NotificationUpdateInput, notificationView };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ConfigError, connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { ConfigError, connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-1HTHeDa4.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CPIHg_Zg.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-waEVK-uR.mjs";
|
|
5
|
+
import { ParameterValues, parameterValuesView } from "./parameter-hCQ80jnc.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/dashboard/parameter-values.ts
|
|
8
8
|
var parameter_values_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Pulse } from "./pulse-C8q469KD.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/subscription/patch.ts
|
|
4
|
+
function mergeSubscriptionUpdate(current, patch) {
|
|
5
|
+
return {
|
|
6
|
+
...patch,
|
|
7
|
+
archived: patch.archived ?? current.archived,
|
|
8
|
+
skip_if_empty: patch.skip_if_empty ?? current.skip_if_empty
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
async function patchSubscription(client, id, patch) {
|
|
12
|
+
const current = await client.requestParsed(Pulse, `/api/pulse/${id}`);
|
|
13
|
+
return client.requestParsed(Pulse, `/api/pulse/${id}`, {
|
|
14
|
+
method: "PUT",
|
|
15
|
+
body: mergeSubscriptionUpdate(current, patch)
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { patchSubscription };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ConfigError } from "./capabilities-1HTHeDa4.mjs";
|
|
2
|
+
import { CARD_PAYLOAD_TYPE, Notification, NotificationCardPayload } from "./notification-BR5wehqg.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/commands/alert/patch.ts
|
|
5
|
+
async function fetchAlert(client, id) {
|
|
6
|
+
return assertCardAlert(await client.requestParsed(Notification, `/api/notification/${id}`));
|
|
7
|
+
}
|
|
8
|
+
function assertCardAlert(notification) {
|
|
9
|
+
if (notification.payload_type !== CARD_PAYLOAD_TYPE) throw new ConfigError(`notification ${notification.id} is a ${notification.payload_type}, not a question alert — \`mb alert\` manages card alerts only`);
|
|
10
|
+
return notification;
|
|
11
|
+
}
|
|
12
|
+
function mergeAlertUpdate(current, patch) {
|
|
13
|
+
return Notification.parse({
|
|
14
|
+
...current,
|
|
15
|
+
...patch,
|
|
16
|
+
id: current.id,
|
|
17
|
+
payload: patch.payload === void 0 ? current.payload : mergePayload(current, patch.payload)
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function mergePayload(current, patch) {
|
|
21
|
+
if (current.payload === null) throw new ConfigError(`alert ${current.id} has lost its card payload — it can be archived, but not patched`);
|
|
22
|
+
return NotificationCardPayload.parse({
|
|
23
|
+
...current.payload,
|
|
24
|
+
...patch
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
async function patchAlert(client, id, patch) {
|
|
28
|
+
const current = await fetchAlert(client, id);
|
|
29
|
+
return client.requestParsed(Notification, `/api/notification/${id}`, {
|
|
30
|
+
method: "PUT",
|
|
31
|
+
body: mergeAlertUpdate(current, patch)
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { fetchAlert, patchAlert };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { listEnvelopeSchema, outputFlags, renderList, wrapList } from "./capabilities-
|
|
1
|
+
import { listEnvelopeSchema, outputFlags, renderList, wrapList } from "./capabilities-1HTHeDa4.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import { findSkillByName, loadAllSkills, loadVisibleSkills } from "./skills-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CPIHg_Zg.mjs";
|
|
4
|
+
import { findSkillByName, loadAllSkills, loadVisibleSkills } from "./skills-DlFbbaoS.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/skills/path.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TimeoutError } from "./capabilities-
|
|
2
|
-
import { combineAborts, throwIfAborted } from "./runtime-
|
|
1
|
+
import { TimeoutError } from "./capabilities-1HTHeDa4.mjs";
|
|
2
|
+
import { combineAborts, throwIfAborted } from "./runtime-CPIHg_Zg.mjs";
|
|
3
3
|
import { setTimeout } from "node:timers/promises";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/poll.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parseJsonOrPlain } from "./runtime-
|
|
2
|
-
import { pollUntil } from "./poll-
|
|
1
|
+
import { parseJsonOrPlain } from "./runtime-CPIHg_Zg.mjs";
|
|
2
|
+
import { pollUntil } from "./poll-rqLkEJVP.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/domain/git-sync.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ChainedRequestError, ConfigError, MetabaseError, writeJson } from "./capabilities-
|
|
2
|
-
import { HttpError } from "./runtime-
|
|
3
|
-
import { Card } from "./card-
|
|
1
|
+
import { ChainedRequestError, ConfigError, MetabaseError, writeJson } from "./capabilities-1HTHeDa4.mjs";
|
|
2
|
+
import { HttpError } from "./runtime-CPIHg_Zg.mjs";
|
|
3
|
+
import { Card } from "./card-BFRRyTGs.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/commands/dashboard/preflight.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-1HTHeDa4.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
4
|
-
import "./parse-id-
|
|
5
|
-
import { Collection, CollectionCompact } from "./collection-
|
|
6
|
-
import "./listing-
|
|
7
|
-
import "./poll-
|
|
8
|
-
import "./poll-task-
|
|
9
|
-
import { warnIfOutsideSyncScope } from "./sync-scope-
|
|
10
|
-
import { ensureLibraryDataCollectionId } from "./resolve-
|
|
11
|
-
import { parseTableSelectors, tableSelectorFlags } from "./selectors-
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-CPIHg_Zg.mjs";
|
|
4
|
+
import "./parse-id-waEVK-uR.mjs";
|
|
5
|
+
import { Collection, CollectionCompact } from "./collection-BrrjbPLN.mjs";
|
|
6
|
+
import "./listing-1G8iFfZe.mjs";
|
|
7
|
+
import "./poll-rqLkEJVP.mjs";
|
|
8
|
+
import "./poll-task-CiB1o1wG.mjs";
|
|
9
|
+
import { warnIfOutsideSyncScope } from "./sync-scope-Dh1wBlrg.mjs";
|
|
10
|
+
import { ensureLibraryDataCollectionId } from "./resolve-BiL5scF0.mjs";
|
|
11
|
+
import { parseTableSelectors, tableSelectorFlags } from "./selectors-Bsyhe1zP.mjs";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
|
|
14
14
|
//#region src/commands/library/publish.ts
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { Parameter } from "./parameter-hCQ80jnc.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/domain/pulse.ts
|
|
5
|
+
const PulseChannelType = z.enum([
|
|
6
|
+
"email",
|
|
7
|
+
"slack",
|
|
8
|
+
"http"
|
|
9
|
+
]);
|
|
10
|
+
const PulseScheduleType = z.enum([
|
|
11
|
+
"hourly",
|
|
12
|
+
"daily",
|
|
13
|
+
"weekly",
|
|
14
|
+
"monthly"
|
|
15
|
+
]);
|
|
16
|
+
const PulseScheduleDay = z.enum([
|
|
17
|
+
"mon",
|
|
18
|
+
"tue",
|
|
19
|
+
"wed",
|
|
20
|
+
"thu",
|
|
21
|
+
"fri",
|
|
22
|
+
"sat",
|
|
23
|
+
"sun"
|
|
24
|
+
]);
|
|
25
|
+
const PulseScheduleFrame = z.enum([
|
|
26
|
+
"first",
|
|
27
|
+
"mid",
|
|
28
|
+
"last"
|
|
29
|
+
]);
|
|
30
|
+
const PulseChannelDetails = z.object({ channel: z.string().optional() }).loose();
|
|
31
|
+
const PulseRecipient = z.object({
|
|
32
|
+
id: z.number().int().nullable().optional(),
|
|
33
|
+
email: z.string()
|
|
34
|
+
}).loose();
|
|
35
|
+
const PulseRecipientCompact = PulseRecipient.pick({
|
|
36
|
+
id: true,
|
|
37
|
+
email: true
|
|
38
|
+
}).strip();
|
|
39
|
+
const PulseChannel = z.object({
|
|
40
|
+
id: z.number().int().optional(),
|
|
41
|
+
channel_type: PulseChannelType,
|
|
42
|
+
channel_id: z.number().int().nullable().optional(),
|
|
43
|
+
enabled: z.boolean(),
|
|
44
|
+
schedule_type: PulseScheduleType,
|
|
45
|
+
schedule_hour: z.number().int().nullable(),
|
|
46
|
+
schedule_day: PulseScheduleDay.nullable(),
|
|
47
|
+
schedule_frame: PulseScheduleFrame.nullable(),
|
|
48
|
+
details: PulseChannelDetails.optional(),
|
|
49
|
+
recipients: z.array(PulseRecipient)
|
|
50
|
+
}).loose();
|
|
51
|
+
const PulseChannelCompact = PulseChannel.pick({
|
|
52
|
+
channel_type: true,
|
|
53
|
+
enabled: true,
|
|
54
|
+
schedule_type: true,
|
|
55
|
+
schedule_hour: true,
|
|
56
|
+
schedule_day: true,
|
|
57
|
+
schedule_frame: true,
|
|
58
|
+
details: true
|
|
59
|
+
}).strip().extend({ recipients: z.array(PulseRecipientCompact) });
|
|
60
|
+
const PulseCard = z.object({
|
|
61
|
+
id: z.number().int(),
|
|
62
|
+
name: z.string(),
|
|
63
|
+
dashboard_card_id: z.number().int().nullable(),
|
|
64
|
+
include_csv: z.boolean(),
|
|
65
|
+
include_xls: z.boolean()
|
|
66
|
+
}).loose();
|
|
67
|
+
const PulseCardCompact = PulseCard.pick({
|
|
68
|
+
id: true,
|
|
69
|
+
name: true,
|
|
70
|
+
dashboard_card_id: true,
|
|
71
|
+
include_csv: true,
|
|
72
|
+
include_xls: true
|
|
73
|
+
}).strip();
|
|
74
|
+
const Pulse = z.object({
|
|
75
|
+
id: z.number().int(),
|
|
76
|
+
name: z.string().nullable(),
|
|
77
|
+
creator_id: z.number().int(),
|
|
78
|
+
dashboard_id: z.number().int().nullable(),
|
|
79
|
+
collection_id: z.number().int().nullable(),
|
|
80
|
+
archived: z.boolean(),
|
|
81
|
+
skip_if_empty: z.boolean(),
|
|
82
|
+
parameters: z.array(Parameter),
|
|
83
|
+
cards: z.array(PulseCard),
|
|
84
|
+
channels: z.array(PulseChannel)
|
|
85
|
+
}).loose();
|
|
86
|
+
const PulseCompact = Pulse.pick({
|
|
87
|
+
id: true,
|
|
88
|
+
name: true,
|
|
89
|
+
dashboard_id: true,
|
|
90
|
+
collection_id: true,
|
|
91
|
+
archived: true,
|
|
92
|
+
skip_if_empty: true
|
|
93
|
+
}).strip().extend({
|
|
94
|
+
cards: z.array(PulseCardCompact),
|
|
95
|
+
channels: z.array(PulseChannelCompact)
|
|
96
|
+
});
|
|
97
|
+
const PulseChannelList = z.array(PulseChannel);
|
|
98
|
+
const pulseView = {
|
|
99
|
+
compactPick: PulseCompact,
|
|
100
|
+
tableColumns: [
|
|
101
|
+
{
|
|
102
|
+
key: "id",
|
|
103
|
+
label: "ID"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
key: "name",
|
|
107
|
+
label: "Name"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
key: "dashboard_id",
|
|
111
|
+
label: "Dashboard"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
key: "channels",
|
|
115
|
+
label: "Delivery",
|
|
116
|
+
format: formatChannels
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
key: "archived",
|
|
120
|
+
label: "Archived"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
};
|
|
124
|
+
function formatChannels(value) {
|
|
125
|
+
const parsed = PulseChannelList.safeParse(value);
|
|
126
|
+
if (!parsed.success) return "";
|
|
127
|
+
return parsed.data.map(describeChannel).join("; ");
|
|
128
|
+
}
|
|
129
|
+
function describeChannel(channel) {
|
|
130
|
+
const parts = [channel.channel_type, describeSchedule(channel)];
|
|
131
|
+
const audience = describeAudience(channel);
|
|
132
|
+
if (audience !== null) parts.push(`→ ${audience}`);
|
|
133
|
+
if (!channel.enabled) parts.push("(disabled)");
|
|
134
|
+
return parts.join(" ");
|
|
135
|
+
}
|
|
136
|
+
function describeSchedule(channel) {
|
|
137
|
+
const parts = [channel.schedule_type];
|
|
138
|
+
if (channel.schedule_frame !== null) parts.push(channel.schedule_frame);
|
|
139
|
+
if (channel.schedule_day !== null) parts.push(channel.schedule_day);
|
|
140
|
+
if (channel.schedule_hour !== null) parts.push(`${channel.schedule_hour}:00`);
|
|
141
|
+
return parts.join(" ");
|
|
142
|
+
}
|
|
143
|
+
function describeAudience(channel) {
|
|
144
|
+
if (channel.recipients.length > 0) return channel.recipients.map((recipient) => recipient.email).join(", ");
|
|
145
|
+
const slackChannel = channel.details?.channel;
|
|
146
|
+
return slackChannel === void 0 ? null : slackChannel;
|
|
147
|
+
}
|
|
148
|
+
const PulseRecipientInput = z.union([z.object({ id: z.number().int().positive() }).loose(), z.object({ email: z.string().min(1) }).loose()]);
|
|
149
|
+
const PulseCardInput = z.object({
|
|
150
|
+
id: z.number().int().positive(),
|
|
151
|
+
include_csv: z.boolean(),
|
|
152
|
+
include_xls: z.boolean(),
|
|
153
|
+
dashboard_card_id: z.number().int().positive().nullable().optional(),
|
|
154
|
+
format_rows: z.boolean().optional(),
|
|
155
|
+
pivot_results: z.boolean().optional()
|
|
156
|
+
}).loose();
|
|
157
|
+
const PulseChannelInput = z.object({
|
|
158
|
+
channel_type: PulseChannelType,
|
|
159
|
+
enabled: z.boolean().default(true),
|
|
160
|
+
schedule_type: PulseScheduleType,
|
|
161
|
+
schedule_hour: z.number().int().min(0).max(23).nullable().optional(),
|
|
162
|
+
schedule_day: PulseScheduleDay.nullable().optional(),
|
|
163
|
+
schedule_frame: PulseScheduleFrame.nullable().optional(),
|
|
164
|
+
channel_id: z.number().int().positive().nullable().optional(),
|
|
165
|
+
details: PulseChannelDetails.optional(),
|
|
166
|
+
recipients: z.array(PulseRecipientInput).optional()
|
|
167
|
+
}).loose();
|
|
168
|
+
const PulseCreateInput = z.object({
|
|
169
|
+
name: z.string().min(1),
|
|
170
|
+
dashboard_id: z.number().int().positive(),
|
|
171
|
+
cards: z.array(PulseCardInput).min(1),
|
|
172
|
+
channels: z.array(PulseChannelInput).min(1),
|
|
173
|
+
skip_if_empty: z.boolean().optional(),
|
|
174
|
+
parameters: z.array(Parameter).optional()
|
|
175
|
+
}).loose();
|
|
176
|
+
const PulseUpdateInput = z.object({
|
|
177
|
+
name: z.string().min(1).optional(),
|
|
178
|
+
cards: z.array(PulseCardInput).min(1).optional(),
|
|
179
|
+
channels: z.array(PulseChannelInput).min(1).optional(),
|
|
180
|
+
skip_if_empty: z.boolean().optional(),
|
|
181
|
+
archived: z.boolean().optional(),
|
|
182
|
+
parameters: z.array(Parameter).optional()
|
|
183
|
+
}).loose();
|
|
184
|
+
|
|
185
|
+
//#endregion
|
|
186
|
+
export { Pulse, PulseCompact, PulseCreateInput, PulseUpdateInput, pulseView };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ConfigError, connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-
|
|
1
|
+
import { ConfigError, connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-1HTHeDa4.mjs";
|
|
2
2
|
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
-
import { defineMetabaseCommand, parseJson } from "./runtime-
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import { formatQueryResult } from "./query-result-
|
|
3
|
+
import { defineMetabaseCommand, parseJson } from "./runtime-CPIHg_Zg.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-waEVK-uR.mjs";
|
|
5
|
+
import "./embedding-B0x9CPkU.mjs";
|
|
6
|
+
import "./field-RYBTW2KS.mjs";
|
|
7
|
+
import "./parameter-hCQ80jnc.mjs";
|
|
8
|
+
import { CardQueryResult, cardQueryView } from "./card-BFRRyTGs.mjs";
|
|
9
|
+
import { formatQueryResult } from "./query-result-Bvh89K4f.mjs";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { Writable } from "node:stream";
|
|
12
12
|
|