prefect 3.6.14.dev3__py3-none-any.whl → 3.6.14.dev4__py3-none-any.whl
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.
- prefect/_build_info.py +3 -3
- prefect/futures.py +17 -4
- prefect/runner/runner.py +113 -29
- prefect/server/ui-v2/assets/{artifact-card-CNabu-6j.js → artifact-card-DmR_0bKj.js} +2 -2
- prefect/server/ui-v2/assets/{artifact-card-CNabu-6j.js.map → artifact-card-DmR_0bKj.js.map} +1 -1
- prefect/server/ui-v2/assets/{artifact._id-Emkhr_0h.js → artifact._id-BF4365i6.js} +2 -2
- prefect/server/ui-v2/assets/{artifact._id-Emkhr_0h.js.map → artifact._id-BF4365i6.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation-schema-CRKJHa4q.js → automation-schema-crrFcHTg.js} +2 -2
- prefect/server/ui-v2/assets/{automation-schema-CRKJHa4q.js.map → automation-schema-crrFcHTg.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation-wizard-Cej8aik5.js → automation-wizard-DMI3p_HA.js} +2 -2
- prefect/server/ui-v2/assets/{automation-wizard-Cej8aik5.js.map → automation-wizard-DMI3p_HA.js.map} +1 -1
- prefect/server/ui-v2/assets/automation._id-C_ZATYDQ.js +2 -0
- prefect/server/ui-v2/assets/{automation._id-Bm1T3_NO.js.map → automation._id-C_ZATYDQ.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation_._id.edit-C5NIVfxR.js → automation_._id.edit-Dkc09fFA.js} +2 -2
- prefect/server/ui-v2/assets/{automation_._id.edit-C5NIVfxR.js.map → automation_._id.edit-Dkc09fFA.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-header-CdJSlWw8.js → automations-header-H_FW9LY7.js} +2 -2
- prefect/server/ui-v2/assets/{automations-header-CdJSlWw8.js.map → automations-header-H_FW9LY7.js.map} +1 -1
- prefect/server/ui-v2/assets/{base-job-template-form-section-DX_X28oU.js → base-job-template-form-section-CVnxwfEi.js} +2 -2
- prefect/server/ui-v2/assets/{base-job-template-form-section-DX_X28oU.js.map → base-job-template-form-section-CVnxwfEi.js.map} +1 -1
- prefect/server/ui-v2/assets/{block-type-details-BcpcwaJS.js → block-type-details-BIzTWlfj.js} +2 -2
- prefect/server/ui-v2/assets/{block-type-details-BcpcwaJS.js.map → block-type-details-BIzTWlfj.js.map} +1 -1
- prefect/server/ui-v2/assets/block-type-logo-B3XAhRSL.js +2 -0
- prefect/server/ui-v2/assets/{block-type-logo-ox5VqJuy.js.map → block-type-logo-B3XAhRSL.js.map} +1 -1
- prefect/server/ui-v2/assets/{block._id-BD6wu3yC.js → block._id-Bj0YEdv1.js} +2 -2
- prefect/server/ui-v2/assets/{block._id-BD6wu3yC.js.map → block._id-Bj0YEdv1.js.map} +1 -1
- prefect/server/ui-v2/assets/{block_._id.edit-aneXPzUW.js → block_._id.edit-C7sUQ8mQ.js} +2 -2
- prefect/server/ui-v2/assets/{block_._id.edit-aneXPzUW.js.map → block_._id.edit-C7sUQ8mQ.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog-C7ttFKuv.js → catalog-Cywf-iho.js} +2 -2
- prefect/server/ui-v2/assets/{catalog-C7ttFKuv.js.map → catalog-Cywf-iho.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog_._slug-CrcphBbo.js → catalog_._slug-qLWMRQt3.js} +2 -2
- prefect/server/ui-v2/assets/{catalog_._slug-CrcphBbo.js.map → catalog_._slug-qLWMRQt3.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog_._slug_.create-Dd7ATIKq.js → catalog_._slug_.create-LslFlpde.js} +2 -2
- prefect/server/ui-v2/assets/{catalog_._slug_.create-Dd7ATIKq.js.map → catalog_._slug_.create-LslFlpde.js.map} +1 -1
- prefect/server/ui-v2/assets/{collapsible-D5U2XK4R.js → collapsible-BszH-EeY.js} +2 -2
- prefect/server/ui-v2/assets/{collapsible-D5U2XK4R.js.map → collapsible-BszH-EeY.js.map} +1 -1
- prefect/server/ui-v2/assets/{concurrency-limit._id-D-xV_tiF.js → concurrency-limit._id-Dam_Ftkw.js} +2 -2
- prefect/server/ui-v2/assets/{concurrency-limit._id-D-xV_tiF.js.map → concurrency-limit._id-Dam_Ftkw.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-Da7OBOa5.js → create-B11nNTmT.js} +2 -2
- prefect/server/ui-v2/assets/{create-Da7OBOa5.js.map → create-B11nNTmT.js.map} +1 -1
- prefect/server/ui-v2/assets/create-B8EFPjmO.js +2 -0
- prefect/server/ui-v2/assets/{create-CiMo25er.js.map → create-B8EFPjmO.js.map} +1 -1
- prefect/server/ui-v2/assets/cronstrue-IJcBJ9tZ.js +2 -0
- prefect/server/ui-v2/assets/cronstrue-IJcBJ9tZ.js.map +1 -0
- prefect/server/ui-v2/assets/{data-table-Bfa8_ZJd.js → data-table-C1eRvlXV.js} +2 -2
- prefect/server/ui-v2/assets/{data-table-Bfa8_ZJd.js.map → data-table-C1eRvlXV.js.map} +1 -1
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-D18TITKv.js → delete-confirmation-dialog-DCmC1ZTD.js} +2 -2
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-D18TITKv.js.map → delete-confirmation-dialog-DCmC1ZTD.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment-action-header-WD51TIyE.js +2 -0
- prefect/server/ui-v2/assets/{deployment-action-header-AamGn0qI.js.map → deployment-action-header-WD51TIyE.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-form-QIRH-pew.js → deployment-form-FaqDdnNa.js} +3 -3
- prefect/server/ui-v2/assets/{deployment-form-QIRH-pew.js.map → deployment-form-FaqDdnNa.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-links-yTRvIDd3.js → deployment-links-CLax44tW.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-links-yTRvIDd3.js.map → deployment-links-CLax44tW.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-CCBPOCfw.js → deployment._id-CbWiylvh.js} +2 -2
- prefect/server/ui-v2/assets/{deployment._id-CCBPOCfw.js.map → deployment._id-CbWiylvh.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-m4luvPWl.js → deployment._id-DrtOyhFC.js} +2 -2
- prefect/server/ui-v2/assets/{deployment._id-m4luvPWl.js.map → deployment._id-DrtOyhFC.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.duplicate-CqlNWQfz.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.duplicate-DFjSeYn4.js.map → deployment_._id.duplicate-CqlNWQfz.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.edit-CbvCe2YU.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.edit-5-mFOphJ.js.map → deployment_._id.edit-CbvCe2YU.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment_._id.run-CwVe5hPJ.js → deployment_._id.run-BnIFeR-d.js} +2 -2
- prefect/server/ui-v2/assets/{deployment_._id.run-CwVe5hPJ.js.map → deployment_._id.run-BnIFeR-d.js.map} +1 -1
- prefect/server/ui-v2/assets/{dropdown-menu-g64QiYKu.js → dropdown-menu-Bhox1zoa.js} +2 -2
- prefect/server/ui-v2/assets/{dropdown-menu-g64QiYKu.js.map → dropdown-menu-Bhox1zoa.js.map} +1 -1
- prefect/server/ui-v2/assets/{event-resource-display-BqqHFc0B.js → event-resource-display-65B76oFV.js} +2 -2
- prefect/server/ui-v2/assets/{event-resource-display-BqqHFc0B.js.map → event-resource-display-65B76oFV.js.map} +1 -1
- prefect/server/ui-v2/assets/{event._eventDate._eventId-BR0eukkm.js → event._eventDate._eventId-CxPjH2H7.js} +2 -2
- prefect/server/ui-v2/assets/{event._eventDate._eventId-BR0eukkm.js.map → event._eventDate._eventId-CxPjH2H7.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-run-graph-kZfaIevn.js → flow-run-graph-ZOatFLjv.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run-graph-kZfaIevn.js.map → flow-run-graph-ZOatFLjv.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run._id-1RC-URiA.js +2 -0
- prefect/server/ui-v2/assets/{flow-run._id-Caq--9Lr.js.map → flow-run._id-1RC-URiA.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run._id-CDFeuz16.js +2 -0
- prefect/server/ui-v2/assets/{flow-run._id-DiA0_X5m.js.map → flow-run._id-CDFeuz16.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-run._id-BX0UeXTj.js → flow-run._id-U6rzXfvR.js} +4 -4
- prefect/server/ui-v2/assets/{flow-run._id-BX0UeXTj.js.map → flow-run._id-U6rzXfvR.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-runs-pagination-CoZZ-ed_.js → flow-runs-pagination-D_d5hdM0.js} +2 -2
- prefect/server/ui-v2/assets/{flow-runs-pagination-CoZZ-ed_.js.map → flow-runs-pagination-D_d5hdM0.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow._id-nRzTWzLb.js → flow._id-DkeN8TLS.js} +2 -2
- prefect/server/ui-v2/assets/{flow._id-nRzTWzLb.js.map → flow._id-DkeN8TLS.js.map} +1 -1
- prefect/server/ui-v2/assets/{form-CdcF42XZ.js → form-CJfDUosd.js} +2 -2
- prefect/server/ui-v2/assets/{form-CdcF42XZ.js.map → form-CJfDUosd.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-DijI5Lcu.js → header-C5liWcfp.js} +2 -2
- prefect/server/ui-v2/assets/{header-DijI5Lcu.js.map → header-C5liWcfp.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-DkJo9Uge.js → header-MZZX5lQ8.js} +2 -2
- prefect/server/ui-v2/assets/{header-DkJo9Uge.js.map → header-MZZX5lQ8.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-DV0gMQER.js → header-vYbWNFdK.js} +2 -2
- prefect/server/ui-v2/assets/{header-DV0gMQER.js.map → header-vYbWNFdK.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-VUajxmNL.js → index-4xVLy12E.js} +2 -2
- prefect/server/ui-v2/assets/{index-VUajxmNL.js.map → index-4xVLy12E.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-KlV75baW.js → index-5fQrQZ3K.js} +2 -2
- prefect/server/ui-v2/assets/{index-KlV75baW.js.map → index-5fQrQZ3K.js.map} +1 -1
- prefect/server/ui-v2/assets/index-7bWZ2Znt.js +2 -0
- prefect/server/ui-v2/assets/{index-CqvGvZOq.js.map → index-7bWZ2Znt.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-Chtop8D8.js → index-BOVwKiXn.js} +2 -2
- prefect/server/ui-v2/assets/{index-Chtop8D8.js.map → index-BOVwKiXn.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BZ9TDxSy.js → index-BPmw935P.js} +2 -2
- prefect/server/ui-v2/assets/{index-BZ9TDxSy.js.map → index-BPmw935P.js.map} +1 -1
- prefect/server/ui-v2/assets/index-BR6bwuK4.js +2 -0
- prefect/server/ui-v2/assets/{index-BCKNs_w7.js.map → index-BR6bwuK4.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DYKO0qOd.js → index-B_3WKH2_.js} +2 -2
- prefect/server/ui-v2/assets/{index-DYKO0qOd.js.map → index-B_3WKH2_.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BV3WqCCv.js → index-BgOHAC5L.js} +2 -2
- prefect/server/ui-v2/assets/{index-BV3WqCCv.js.map → index-BgOHAC5L.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CUZXozY8.js → index-Bmd9p_xN.js} +2 -2
- prefect/server/ui-v2/assets/{index-CUZXozY8.js.map → index-Bmd9p_xN.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-faXvGo5k.js → index-BmdTLblr.js} +2 -2
- prefect/server/ui-v2/assets/{index-faXvGo5k.js.map → index-BmdTLblr.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-Cuh3BwlA.js → index-CCCwtbSq.js} +2 -2
- prefect/server/ui-v2/assets/{index-Cuh3BwlA.js.map → index-CCCwtbSq.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-yTjygRmH.js → index-CbJNJTr8.js} +2 -2
- prefect/server/ui-v2/assets/{index-yTjygRmH.js.map → index-CbJNJTr8.js.map} +1 -1
- prefect/server/ui-v2/assets/index-CcyfsgGP.js +2 -0
- prefect/server/ui-v2/assets/{index-BijfHkUE.js.map → index-CcyfsgGP.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-AXV1ellj.js → index-CfHvTOAO.js} +2 -2
- prefect/server/ui-v2/assets/{index-AXV1ellj.js.map → index-CfHvTOAO.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BGZtCgRR.js → index-ClXbR8i0.js} +2 -2
- prefect/server/ui-v2/assets/{index-BGZtCgRR.js.map → index-ClXbR8i0.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BfuGBXBN.js → index-Cyw9YHlj.js} +2 -2
- prefect/server/ui-v2/assets/{index-BfuGBXBN.js.map → index-Cyw9YHlj.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BZqccBpn.js → index-DLuXqHi9.js} +6 -6
- prefect/server/ui-v2/assets/index-DLuXqHi9.js.map +1 -0
- prefect/server/ui-v2/assets/{index-BmUvoLOK.js → index-DeeA9nPM.js} +2 -2
- prefect/server/ui-v2/assets/{index-BmUvoLOK.js.map → index-DeeA9nPM.js.map} +1 -1
- prefect/server/ui-v2/assets/index-MeJBhX-C.js +2 -0
- prefect/server/ui-v2/assets/{index-CUJoNEgb.js.map → index-MeJBhX-C.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DO_c3_A_.js → index-enqoJV8x.js} +2 -2
- prefect/server/ui-v2/assets/{index-DO_c3_A_.js.map → index-enqoJV8x.js.map} +1 -1
- prefect/server/ui-v2/assets/{json-input-DFgWdLGv.js → json-input-CJ1Ipjax.js} +2 -2
- prefect/server/ui-v2/assets/{json-input-DFgWdLGv.js.map → json-input-CJ1Ipjax.js.map} +1 -1
- prefect/server/ui-v2/assets/{key._key-CpeWM0mN.js → key._key-B0wb5Umi.js} +2 -2
- prefect/server/ui-v2/assets/{key._key-CpeWM0mN.js.map → key._key-B0wb5Umi.js.map} +1 -1
- prefect/server/ui-v2/assets/{lazy-markdown-Bzi0YUUV.js → lazy-markdown-sP3PYQgB.js} +3 -3
- prefect/server/ui-v2/assets/{lazy-markdown-Bzi0YUUV.js.map → lazy-markdown-sP3PYQgB.js.map} +1 -1
- prefect/server/ui-v2/assets/{login-CM0nuDdd.js → login-DNY0o3XU.js} +2 -2
- prefect/server/ui-v2/assets/{login-CM0nuDdd.js.map → login-DNY0o3XU.js.map} +1 -1
- prefect/server/ui-v2/assets/{markdown-input-CGOAnaWz.js → markdown-input-Bos2JYXW.js} +2 -2
- prefect/server/ui-v2/assets/{markdown-input-CGOAnaWz.js.map → markdown-input-Bos2JYXW.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-example-snippet-CyJ28Tm-.js → python-example-snippet-CWSJRd48.js} +3 -3
- prefect/server/ui-v2/assets/{python-example-snippet-CyJ28Tm-.js.map → python-example-snippet-CWSJRd48.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-input-D8_x22t4.js → python-input-Bu4995lK.js} +2 -2
- prefect/server/ui-v2/assets/{python-input-D8_x22t4.js.map → python-input-Bu4995lK.js.map} +1 -1
- prefect/server/ui-v2/assets/{radio-group-Dgu38qwz.js → radio-group-C0D0oLYd.js} +2 -2
- prefect/server/ui-v2/assets/{radio-group-Dgu38qwz.js.map → radio-group-C0D0oLYd.js.map} +1 -1
- prefect/server/ui-v2/assets/{route-error-state-CVHTggxQ.js → route-error-state-DzKu_Iw_.js} +2 -2
- prefect/server/ui-v2/assets/{route-error-state-CVHTggxQ.js.map → route-error-state-DzKu_Iw_.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-DqRLX--T.js → schema-form-BD95b0iS.js} +2 -2
- prefect/server/ui-v2/assets/schema-form-BD95b0iS.js.map +1 -0
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-DuEmswz-.js → schema-form-input-string-format-datetime-DyDs1jNl.js} +4 -4
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-DuEmswz-.js.map → schema-form-input-string-format-datetime-DyDs1jNl.js.map} +1 -1
- prefect/server/ui-v2/assets/{settings-CtKmYnoo.js → settings-a90cwhBe.js} +2 -2
- prefect/server/ui-v2/assets/{settings-CtKmYnoo.js.map → settings-a90cwhBe.js.map} +1 -1
- prefect/server/ui-v2/assets/{sort-filter-BNQ6rjAG.js → sort-filter-CCltjs1E.js} +2 -2
- prefect/server/ui-v2/assets/{sort-filter-BNQ6rjAG.js.map → sort-filter-CCltjs1E.js.map} +1 -1
- prefect/server/ui-v2/assets/{table-CJS-5Aky.js → table-CrPymfJD.js} +2 -2
- prefect/server/ui-v2/assets/{table-CJS-5Aky.js.map → table-CrPymfJD.js.map} +1 -1
- prefect/server/ui-v2/assets/{tags-input-CDvuqe9B.js → tags-input-BdNYl8nS.js} +2 -2
- prefect/server/ui-v2/assets/{tags-input-CDvuqe9B.js.map → tags-input-BdNYl8nS.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-DMqNFEVn.js → task-run-concurrency-limits-reset-dialog-B4bdiAgf.js} +2 -2
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-DMqNFEVn.js.map → task-run-concurrency-limits-reset-dialog-B4bdiAgf.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-CV5t0LR0.js → task-run._id-BQac40_I.js} +3 -3
- prefect/server/ui-v2/assets/{task-run._id-CV5t0LR0.js.map → task-run._id-BQac40_I.js.map} +1 -1
- prefect/server/ui-v2/assets/task-run._id-BzeMfM08.js +2 -0
- prefect/server/ui-v2/assets/{task-run._id-CiVsXKpy.js.map → task-run._id-BzeMfM08.js.map} +1 -1
- prefect/server/ui-v2/assets/task-runs-pagination-WFGIqR6p.js +2 -0
- prefect/server/ui-v2/assets/{task-runs-pagination-DGjxL4DO.js.map → task-runs-pagination-WFGIqR6p.js.map} +1 -1
- prefect/server/ui-v2/assets/{textarea-Mne2s-1n.js → textarea-CGFflH-n.js} +2 -2
- prefect/server/ui-v2/assets/{textarea-Mne2s-1n.js.map → textarea-CGFflH-n.js.map} +1 -1
- prefect/server/ui-v2/assets/{timezone-select-CPBtT8tA.js → timezone-select-ClE9nfKA.js} +2 -2
- prefect/server/ui-v2/assets/{timezone-select-CPBtT8tA.js.map → timezone-select-ClE9nfKA.js.map} +1 -1
- prefect/server/ui-v2/assets/{toggle-group-CvPe0UY1.js → toggle-group-Dnv_LMnU.js} +2 -2
- prefect/server/ui-v2/assets/{toggle-group-CvPe0UY1.js.map → toggle-group-Dnv_LMnU.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-debounce-callback-Dcf0d0U7.js → use-debounce-callback-CVfZS_LP.js} +2 -2
- prefect/server/ui-v2/assets/{use-debounce-callback-Dcf0d0U7.js.map → use-debounce-callback-CVfZS_LP.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-DnRkM1Cj.js → use-delete-automation-confirmation-dialog-CRGV6wvn.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-DnRkM1Cj.js.map → use-delete-automation-confirmation-dialog-CRGV6wvn.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-CMHtwDvb.js → use-delete-block-document-confirmation-dialog-DNMP_gtr.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-CMHtwDvb.js.map → use-delete-block-document-confirmation-dialog-DNMP_gtr.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-confirmation-dialog-Bka9YDdO.js → use-delete-confirmation-dialog-C5d6hPL-.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-confirmation-dialog-Bka9YDdO.js.map → use-delete-confirmation-dialog-C5d6hPL-.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-DB4pe2_m.js → use-flow-runs-selected-rows-D3-TVsRL.js} +2 -2
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-DB4pe2_m.js.map → use-flow-runs-selected-rows-D3-TVsRL.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DUPrB7V9.js → use-get-artifacts-flow-task-runs-I3Wb9fOV.js} +2 -2
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DUPrB7V9.js.map → use-get-artifacts-flow-task-runs-I3Wb9fOV.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-is-overflowing-Cc-Qm0vx.js → use-is-overflowing-CyVH32I2.js} +2 -2
- prefect/server/ui-v2/assets/{use-is-overflowing-Cc-Qm0vx.js.map → use-is-overflowing-CyVH32I2.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-page-title-ELpQMkBC.js → use-page-title-CImKMV-D.js} +2 -2
- prefect/server/ui-v2/assets/{use-page-title-ELpQMkBC.js.map → use-page-title-CImKMV-D.js.map} +1 -1
- prefect/server/ui-v2/assets/use-quick-run-Be-i6Tzi.js +2 -0
- prefect/server/ui-v2/assets/{use-quick-run-uAasMmAv.js.map → use-quick-run-Be-i6Tzi.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-state-favicon-CzOUYzQe.js → use-state-favicon-DtW_I9k3.js} +2 -2
- prefect/server/ui-v2/assets/{use-state-favicon-CzOUYzQe.js.map → use-state-favicon-DtW_I9k3.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-stepper-DvHmfROo.js → use-stepper-BSvi_u_j.js} +2 -2
- prefect/server/ui-v2/assets/{use-stepper-DvHmfROo.js.map → use-stepper-BSvi_u_j.js.map} +1 -1
- prefect/server/ui-v2/assets/{utilities-XA-1-LhA.js → utilities-BCBDUmEl.js} +2 -2
- prefect/server/ui-v2/assets/{utilities-XA-1-LhA.js.map → utilities-BCBDUmEl.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-codemirror-Dn73yRFx.js → vendor-codemirror-OTxfneaa.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-codemirror-Dn73yRFx.js.map → vendor-codemirror-OTxfneaa.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-date-Bxa7CHB1.js → vendor-date-CRz8gtWZ.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-date-Bxa7CHB1.js.map → vendor-date-CRz8gtWZ.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-forms-mroZAMaw.js → vendor-forms-D-iybWES.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-forms-mroZAMaw.js.map → vendor-forms-D-iybWES.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-markdown-BV905mMk.js → vendor-markdown-TdbL8FCd.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-markdown-BV905mMk.js.map → vendor-markdown-TdbL8FCd.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-radix-CP6hQtRc.js → vendor-radix-DRMjKWJW.js} +5 -5
- prefect/server/ui-v2/assets/{vendor-radix-CP6hQtRc.js.map → vendor-radix-DRMjKWJW.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-recharts-BOcghvr2.js → vendor-recharts-BGjDGXVf.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-recharts-BOcghvr2.js.map → vendor-recharts-BGjDGXVf.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-tanstack-CLpbOGYv.js → vendor-tanstack-CWDKYA_B.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-tanstack-CLpbOGYv.js.map → vendor-tanstack-CWDKYA_B.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool-filter-D4DI4Hd5.js → work-pool-filter-BuJB9elW.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-filter-D4DI4Hd5.js.map → work-pool-filter-BuJB9elW.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool-queue-toggle--tVsqhDi.js → work-pool-queue-toggle-DP2ONU28.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-queue-toggle--tVsqhDi.js.map → work-pool-queue-toggle-DP2ONU28.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool._workPoolName-Ba0XSN4m.js → work-pool._workPoolName-BjhJe3F4.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool._workPoolName-Ba0XSN4m.js.map → work-pool._workPoolName-BjhJe3F4.js.map} +1 -1
- prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-lHDf1Aih.js +2 -0
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-CeYLESXS.js.map → work-pool_._workPoolName.edit-lHDf1Aih.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-CHvlnO-U.js → work-pool_._workPoolName.queue._workQueueName-CLthz7sB.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-CHvlnO-U.js.map → work-pool_._workPoolName.queue._workQueueName-CLthz7sB.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-queue-icon-text-DnQAtUi_.js → work-queue-icon-text-4iEAtZOh.js} +2 -2
- prefect/server/ui-v2/assets/{work-queue-icon-text-DnQAtUi_.js.map → work-queue-icon-text-4iEAtZOh.js.map} +1 -1
- prefect/server/ui-v2/assets/{zod-cc-7bk3x.js → zod-CjGf5GIv.js} +2 -2
- prefect/server/ui-v2/assets/{zod-cc-7bk3x.js.map → zod-CjGf5GIv.js.map} +1 -1
- prefect/server/ui-v2/index.html +6 -6
- {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev4.dist-info}/METADATA +2 -2
- {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev4.dist-info}/RECORD +231 -231
- prefect/server/ui-v2/assets/automation._id-Bm1T3_NO.js +0 -2
- prefect/server/ui-v2/assets/block-type-logo-ox5VqJuy.js +0 -2
- prefect/server/ui-v2/assets/create-CiMo25er.js +0 -2
- prefect/server/ui-v2/assets/cronstrue-CeanGOEE.js +0 -2
- prefect/server/ui-v2/assets/cronstrue-CeanGOEE.js.map +0 -1
- prefect/server/ui-v2/assets/deployment-action-header-AamGn0qI.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.duplicate-DFjSeYn4.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.edit-5-mFOphJ.js +0 -2
- prefect/server/ui-v2/assets/flow-run._id-Caq--9Lr.js +0 -2
- prefect/server/ui-v2/assets/flow-run._id-DiA0_X5m.js +0 -2
- prefect/server/ui-v2/assets/index-BCKNs_w7.js +0 -2
- prefect/server/ui-v2/assets/index-BZqccBpn.js.map +0 -1
- prefect/server/ui-v2/assets/index-BijfHkUE.js +0 -2
- prefect/server/ui-v2/assets/index-CUJoNEgb.js +0 -2
- prefect/server/ui-v2/assets/index-CqvGvZOq.js +0 -2
- prefect/server/ui-v2/assets/schema-form-DqRLX--T.js.map +0 -1
- prefect/server/ui-v2/assets/task-run._id-CiVsXKpy.js +0 -2
- prefect/server/ui-v2/assets/task-runs-pagination-DGjxL4DO.js +0 -2
- prefect/server/ui-v2/assets/use-quick-run-uAasMmAv.js +0 -2
- prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-CeYLESXS.js +0 -2
- {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev4.dist-info}/WHEEL +0 -0
- {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev4.dist-info}/entry_points.txt +0 -0
- {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev4.dist-info}/licenses/LICENSE +0 -0
prefect/_build_info.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Generated by versioningit
|
|
2
|
-
__version__ = "3.6.14.
|
|
3
|
-
__build_date__ = "2026-01-
|
|
4
|
-
__git_commit__ = "
|
|
2
|
+
__version__ = "3.6.14.dev4"
|
|
3
|
+
__build_date__ = "2026-01-27 01:13:56.972342+00:00"
|
|
4
|
+
__git_commit__ = "deb82a88341242f18fc63452d516a096835660d1"
|
|
5
5
|
__dirty__ = False
|
prefect/futures.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import abc
|
|
4
|
+
import asyncio
|
|
4
5
|
import concurrent.futures
|
|
5
6
|
import threading
|
|
6
7
|
import time
|
|
@@ -402,11 +403,23 @@ class PrefectFlowRunFuture(PrefectFuture[R]):
|
|
|
402
403
|
"Waiting for completed event for flow run %s...",
|
|
403
404
|
self.flow_run_id,
|
|
404
405
|
)
|
|
406
|
+
start_time = time.monotonic()
|
|
405
407
|
await FlowRunWaiter.wait_for_flow_run(self._flow_run_id, timeout=timeout)
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
|
|
409
|
+
# Poll for the final state in case the event was missed due to race
|
|
410
|
+
# conditions or connection issues with the event subscriber
|
|
411
|
+
while True:
|
|
412
|
+
flow_run = await client.read_flow_run(flow_run_id=self._flow_run_id)
|
|
413
|
+
if flow_run.state and flow_run.state.is_final():
|
|
414
|
+
self._final_state = flow_run.state
|
|
415
|
+
return
|
|
416
|
+
# Check if timeout has been exceeded
|
|
417
|
+
if timeout is not None:
|
|
418
|
+
elapsed = time.monotonic() - start_time
|
|
419
|
+
if elapsed >= timeout:
|
|
420
|
+
return
|
|
421
|
+
# Brief sleep before polling again to avoid hammering the API
|
|
422
|
+
await asyncio.sleep(0.1)
|
|
410
423
|
|
|
411
424
|
def result(
|
|
412
425
|
self,
|
prefect/runner/runner.py
CHANGED
|
@@ -36,7 +36,6 @@ from __future__ import annotations
|
|
|
36
36
|
|
|
37
37
|
import asyncio
|
|
38
38
|
import datetime
|
|
39
|
-
import inspect
|
|
40
39
|
import logging
|
|
41
40
|
import multiprocessing.context
|
|
42
41
|
import os
|
|
@@ -76,6 +75,7 @@ from prefect._experimental.bundles import (
|
|
|
76
75
|
execute_bundle_in_subprocess,
|
|
77
76
|
extract_flow_from_bundle,
|
|
78
77
|
)
|
|
78
|
+
from prefect._internal.compatibility.async_dispatch import async_dispatch
|
|
79
79
|
from prefect._internal.concurrency.api import (
|
|
80
80
|
create_call,
|
|
81
81
|
from_async,
|
|
@@ -117,7 +117,6 @@ from prefect.utilities.annotations import NotSet
|
|
|
117
117
|
from prefect.utilities.asyncutils import (
|
|
118
118
|
asyncnullcontext,
|
|
119
119
|
is_async_fn,
|
|
120
|
-
sync_compatible,
|
|
121
120
|
)
|
|
122
121
|
from prefect.utilities.engine import propose_state, propose_state_sync
|
|
123
122
|
from prefect.utilities.processutils import (
|
|
@@ -280,35 +279,43 @@ class Runner:
|
|
|
280
279
|
assert self._cancelling_observer is not None
|
|
281
280
|
self._cancelling_observer.remove_in_flight_flow_run_id(flow_run_id)
|
|
282
281
|
|
|
283
|
-
|
|
284
|
-
async def add_deployment(
|
|
282
|
+
async def aadd_deployment(
|
|
285
283
|
self,
|
|
286
284
|
deployment: "RunnerDeployment",
|
|
287
285
|
) -> UUID:
|
|
288
286
|
"""
|
|
289
287
|
Registers the deployment with the Prefect API and will monitor for work once
|
|
290
|
-
the runner is started.
|
|
288
|
+
the runner is started. Async version.
|
|
291
289
|
|
|
292
290
|
Args:
|
|
293
291
|
deployment: A deployment for the runner to register.
|
|
294
292
|
"""
|
|
295
|
-
|
|
296
|
-
if TYPE_CHECKING:
|
|
297
|
-
assert inspect.isawaitable(apply_coro)
|
|
298
|
-
deployment_id = await apply_coro
|
|
293
|
+
deployment_id = await deployment.aapply()
|
|
299
294
|
storage = deployment.storage
|
|
300
295
|
if storage is not None:
|
|
301
|
-
|
|
302
|
-
if TYPE_CHECKING:
|
|
303
|
-
assert inspect.isawaitable(add_storage_coro)
|
|
304
|
-
storage = await add_storage_coro
|
|
296
|
+
storage = self._add_storage(storage)
|
|
305
297
|
self._deployment_storage_map[deployment_id] = storage
|
|
306
298
|
self._deployment_ids.add(deployment_id)
|
|
307
299
|
|
|
308
300
|
return deployment_id
|
|
309
301
|
|
|
310
|
-
@
|
|
311
|
-
|
|
302
|
+
@async_dispatch(aadd_deployment)
|
|
303
|
+
def add_deployment(
|
|
304
|
+
self,
|
|
305
|
+
deployment: "RunnerDeployment",
|
|
306
|
+
) -> UUID:
|
|
307
|
+
"""
|
|
308
|
+
Registers the deployment with the Prefect API and will monitor for work once
|
|
309
|
+
the runner is started.
|
|
310
|
+
|
|
311
|
+
Args:
|
|
312
|
+
deployment: A deployment for the runner to register.
|
|
313
|
+
"""
|
|
314
|
+
return from_sync.call_soon_in_loop_thread(
|
|
315
|
+
create_call(self.aadd_deployment, deployment)
|
|
316
|
+
).result()
|
|
317
|
+
|
|
318
|
+
async def aadd_flow(
|
|
312
319
|
self,
|
|
313
320
|
flow: Flow[Any, Any],
|
|
314
321
|
name: Optional[str] = None,
|
|
@@ -336,6 +343,7 @@ class Runner:
|
|
|
336
343
|
) -> UUID:
|
|
337
344
|
"""
|
|
338
345
|
Provides a flow to the runner to be run based on the provided configuration.
|
|
346
|
+
Async version.
|
|
339
347
|
|
|
340
348
|
Will create a deployment for the provided flow and register the deployment
|
|
341
349
|
with the runner.
|
|
@@ -372,7 +380,7 @@ class Runner:
|
|
|
372
380
|
)
|
|
373
381
|
name = self.name if name is None else name
|
|
374
382
|
|
|
375
|
-
|
|
383
|
+
deployment = await flow.ato_deployment(
|
|
376
384
|
name=name,
|
|
377
385
|
interval=interval,
|
|
378
386
|
cron=cron,
|
|
@@ -389,14 +397,8 @@ class Runner:
|
|
|
389
397
|
entrypoint_type=entrypoint_type,
|
|
390
398
|
concurrency_limit=concurrency_limit,
|
|
391
399
|
)
|
|
392
|
-
if TYPE_CHECKING:
|
|
393
|
-
assert inspect.isawaitable(to_deployment_coro)
|
|
394
|
-
deployment = await to_deployment_coro
|
|
395
400
|
|
|
396
|
-
|
|
397
|
-
if TYPE_CHECKING:
|
|
398
|
-
assert inspect.isawaitable(add_deployment_coro)
|
|
399
|
-
deployment_id = await add_deployment_coro
|
|
401
|
+
deployment_id = await self.aadd_deployment(deployment)
|
|
400
402
|
|
|
401
403
|
# Only add the flow to the map if it is not loaded from storage
|
|
402
404
|
# Further work is needed to support directly running flows created using `flow.from_source`
|
|
@@ -404,8 +406,86 @@ class Runner:
|
|
|
404
406
|
self._deployment_flow_map[deployment_id] = flow
|
|
405
407
|
return deployment_id
|
|
406
408
|
|
|
407
|
-
@
|
|
408
|
-
|
|
409
|
+
@async_dispatch(aadd_flow)
|
|
410
|
+
def add_flow(
|
|
411
|
+
self,
|
|
412
|
+
flow: Flow[Any, Any],
|
|
413
|
+
name: Optional[str] = None,
|
|
414
|
+
interval: Optional[
|
|
415
|
+
Union[
|
|
416
|
+
Iterable[Union[int, float, datetime.timedelta]],
|
|
417
|
+
int,
|
|
418
|
+
float,
|
|
419
|
+
datetime.timedelta,
|
|
420
|
+
]
|
|
421
|
+
] = None,
|
|
422
|
+
cron: Optional[Union[Iterable[str], str]] = None,
|
|
423
|
+
rrule: Optional[Union[Iterable[str], str]] = None,
|
|
424
|
+
paused: Optional[bool] = None,
|
|
425
|
+
schedule: Optional[Schedule] = None,
|
|
426
|
+
schedules: Optional["FlexibleScheduleList"] = None,
|
|
427
|
+
concurrency_limit: Optional[Union[int, ConcurrencyLimitConfig, None]] = None,
|
|
428
|
+
parameters: Optional[dict[str, Any]] = None,
|
|
429
|
+
triggers: Optional[List[Union[DeploymentTriggerTypes, TriggerTypes]]] = None,
|
|
430
|
+
description: Optional[str] = None,
|
|
431
|
+
tags: Optional[List[str]] = None,
|
|
432
|
+
version: Optional[str] = None,
|
|
433
|
+
enforce_parameter_schema: bool = True,
|
|
434
|
+
entrypoint_type: EntrypointType = EntrypointType.FILE_PATH,
|
|
435
|
+
) -> UUID:
|
|
436
|
+
"""
|
|
437
|
+
Provides a flow to the runner to be run based on the provided configuration.
|
|
438
|
+
|
|
439
|
+
Will create a deployment for the provided flow and register the deployment
|
|
440
|
+
with the runner.
|
|
441
|
+
|
|
442
|
+
Args:
|
|
443
|
+
flow: A flow for the runner to run.
|
|
444
|
+
name: The name to give the created deployment. Will default to the name
|
|
445
|
+
of the runner.
|
|
446
|
+
interval: An interval on which to execute the current flow. Accepts either a number
|
|
447
|
+
or a timedelta object. If a number is given, it will be interpreted as seconds.
|
|
448
|
+
cron: A cron schedule of when to execute runs of this flow.
|
|
449
|
+
rrule: An rrule schedule of when to execute runs of this flow.
|
|
450
|
+
paused: Whether or not to set the created deployment as paused.
|
|
451
|
+
schedule: A schedule object defining when to execute runs of this deployment.
|
|
452
|
+
Used to provide additional scheduling options like `timezone` or `parameters`.
|
|
453
|
+
schedules: A list of schedule objects defining when to execute runs of this flow.
|
|
454
|
+
Used to define multiple schedules or additional scheduling options like `timezone`.
|
|
455
|
+
concurrency_limit: The maximum number of concurrent runs of this flow to allow.
|
|
456
|
+
triggers: A list of triggers that should kick of a run of this flow.
|
|
457
|
+
parameters: A dictionary of default parameter values to pass to runs of this flow.
|
|
458
|
+
description: A description for the created deployment. Defaults to the flow's
|
|
459
|
+
description if not provided.
|
|
460
|
+
tags: A list of tags to associate with the created deployment for organizational
|
|
461
|
+
purposes.
|
|
462
|
+
version: A version for the created deployment. Defaults to the flow's version.
|
|
463
|
+
entrypoint_type: Type of entrypoint to use for the deployment. When using a module path
|
|
464
|
+
entrypoint, ensure that the module will be importable in the execution environment.
|
|
465
|
+
"""
|
|
466
|
+
return from_sync.call_soon_in_loop_thread(
|
|
467
|
+
create_call(
|
|
468
|
+
self.aadd_flow,
|
|
469
|
+
flow,
|
|
470
|
+
name=name,
|
|
471
|
+
interval=interval,
|
|
472
|
+
cron=cron,
|
|
473
|
+
rrule=rrule,
|
|
474
|
+
paused=paused,
|
|
475
|
+
schedule=schedule,
|
|
476
|
+
schedules=schedules,
|
|
477
|
+
concurrency_limit=concurrency_limit,
|
|
478
|
+
parameters=parameters,
|
|
479
|
+
triggers=triggers,
|
|
480
|
+
description=description,
|
|
481
|
+
tags=tags,
|
|
482
|
+
version=version,
|
|
483
|
+
enforce_parameter_schema=enforce_parameter_schema,
|
|
484
|
+
entrypoint_type=entrypoint_type,
|
|
485
|
+
)
|
|
486
|
+
).result()
|
|
487
|
+
|
|
488
|
+
def _add_storage(self, storage: RunnerStorage) -> RunnerStorage:
|
|
409
489
|
"""
|
|
410
490
|
Adds a storage object to the runner. The storage object will be used to pull
|
|
411
491
|
code to the runner's working directory before the runner starts.
|
|
@@ -434,7 +514,7 @@ class Runner:
|
|
|
434
514
|
Gracefully shuts down the runner when a SIGTERM is received.
|
|
435
515
|
"""
|
|
436
516
|
self._logger.info("SIGTERM received, initiating graceful shutdown...")
|
|
437
|
-
|
|
517
|
+
self.stop()
|
|
438
518
|
|
|
439
519
|
sys.exit(0)
|
|
440
520
|
|
|
@@ -554,9 +634,8 @@ class Runner:
|
|
|
554
634
|
exc_info=True,
|
|
555
635
|
)
|
|
556
636
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
"""Stops the runner's polling cycle."""
|
|
637
|
+
async def astop(self) -> None:
|
|
638
|
+
"""Stops the runner's polling cycle. Async version."""
|
|
560
639
|
if not self.started:
|
|
561
640
|
raise RuntimeError(
|
|
562
641
|
"Runner has not yet started. Please start the runner by calling"
|
|
@@ -573,6 +652,11 @@ class Runner:
|
|
|
573
652
|
"Exception encountered while shutting down", exc_info=True
|
|
574
653
|
)
|
|
575
654
|
|
|
655
|
+
@async_dispatch(astop)
|
|
656
|
+
def stop(self):
|
|
657
|
+
"""Stops the runner's polling cycle."""
|
|
658
|
+
from_sync.call_soon_in_loop_thread(create_call(self.astop)).result()
|
|
659
|
+
|
|
576
660
|
async def execute_flow_run(
|
|
577
661
|
self,
|
|
578
662
|
flow_run_id: UUID,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as o,j as e,L as t}from"./vendor-tanstack-
|
|
2
|
-
//# sourceMappingURL=artifact-card-
|
|
1
|
+
import{r as o,j as e,L as t}from"./vendor-tanstack-CWDKYA_B.js";import{L as n}from"./lazy-markdown-sP3PYQgB.js";import{aM as i,C as m,m as x,al as r,o as c,aW as d}from"./index-DLuXqHi9.js";const f=({artifact:s,compact:a=!1})=>{const l=o.useMemo(()=>i(new Date(s.created??""),"dateTime"),[s.created]);return e.jsx(t,{to:"/artifacts/key/$key",params:{key:s.key??""},children:e.jsxs(m,{className:"hover:shadow-lg hover:border-blue-700",children:[e.jsx(x,{children:e.jsx(r,{variant:"bodySmall",className:"font-bold text-muted-foreground",children:s.type?.toUpperCase()})}),e.jsxs(c,{children:[e.jsxs("div",{className:d("flex",a?"flex-row justify-between":"flex-col"),children:[e.jsx(r,{variant:a?"h4":"h3",className:"font-bold",children:s.key}),e.jsxs("div",{className:d("flex mt-2",a?"flex-col-reverse items-end":"justify-between"),children:[e.jsx(r,{variant:a?"bodySmall":"xsmall",className:"",fontFamily:"mono",children:l}),e.jsx(r,{variant:"bodySmall",className:"text-muted-foreground",children:"Created"})]})]}),e.jsx("hr",{className:"my-2"}),s.description?e.jsx("div",{className:"text-muted-foreground overflow-hidden truncate",children:e.jsx(n,{children:s.description??""})}):e.jsx(r,{variant:"bodySmall",className:"text-muted-foreground italic",children:"No description"})]})]})})};export{f as A};
|
|
2
|
+
//# sourceMappingURL=artifact-card-DmR_0bKj.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-card-
|
|
1
|
+
{"version":3,"file":"artifact-card-DmR_0bKj.js","sources":["../../src/components/artifacts/artifact-card.tsx"],"sourcesContent":["import { Link } from \"@tanstack/react-router\";\nimport { useMemo } from \"react\";\nimport type { Artifact } from \"@/api/artifacts\";\nimport { LazyMarkdown } from \"@/components/ui/lazy-markdown\";\nimport { cn } from \"@/utils\";\nimport { formatDate } from \"@/utils/date\";\nimport { Card, CardContent, CardHeader } from \"../ui/card\";\nimport { Typography } from \"../ui/typography\";\n\nexport type ArtifactsCardProps = {\n\tartifact: Artifact;\n\tcompact?: boolean;\n};\n\nexport const ArtifactCard = ({\n\tartifact,\n\tcompact = false,\n}: ArtifactsCardProps) => {\n\tconst createdAtDate = useMemo(() => {\n\t\treturn formatDate(new Date(artifact.created ?? \"\"), \"dateTime\");\n\t}, [artifact.created]);\n\treturn (\n\t\t<Link to=\"/artifacts/key/$key\" params={{ key: artifact.key ?? \"\" }}>\n\t\t\t<Card className=\"hover:shadow-lg hover:border-blue-700\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<Typography\n\t\t\t\t\t\tvariant=\"bodySmall\"\n\t\t\t\t\t\tclassName=\"font-bold text-muted-foreground\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{artifact.type?.toUpperCase()}\n\t\t\t\t\t</Typography>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\"flex\",\n\t\t\t\t\t\t\tcompact ? \"flex-row justify-between\" : \"flex-col\",\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Typography variant={compact ? \"h4\" : \"h3\"} className=\"font-bold\">\n\t\t\t\t\t\t\t{artifact.key}\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\"flex mt-2\",\n\t\t\t\t\t\t\t\tcompact ? \"flex-col-reverse items-end\" : \"justify-between\",\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\tvariant={compact ? \"bodySmall\" : \"xsmall\"}\n\t\t\t\t\t\t\t\tclassName=\"\"\n\t\t\t\t\t\t\t\tfontFamily=\"mono\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{createdAtDate}\n\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t<Typography variant=\"bodySmall\" className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\tCreated\n\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<hr className=\"my-2\" />\n\t\t\t\t\t{artifact.description ? (\n\t\t\t\t\t\t<div className=\"text-muted-foreground overflow-hidden truncate\">\n\t\t\t\t\t\t\t<LazyMarkdown>{artifact.description ?? \"\"}</LazyMarkdown>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\tvariant=\"bodySmall\"\n\t\t\t\t\t\t\tclassName=\"text-muted-foreground italic\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tNo description\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t)}\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</Link>\n\t);\n};\n"],"names":["ArtifactCard","artifact","compact","createdAtDate","useMemo","formatDate","jsx","Link","jsxs","Card","CardHeader","Typography","CardContent","cn","LazyMarkdown"],"mappings":"8LAcO,MAAMA,EAAe,CAAC,CAC5B,SAAAC,EACA,QAAAC,EAAU,EACX,IAA0B,CACzB,MAAMC,EAAgBC,EAAAA,QAAQ,IACtBC,EAAW,IAAI,KAAKJ,EAAS,SAAW,EAAE,EAAG,UAAU,EAC5D,CAACA,EAAS,OAAO,CAAC,EACrB,OACCK,EAAAA,IAACC,EAAA,CAAK,GAAG,sBAAsB,OAAQ,CAAE,IAAKN,EAAS,KAAO,EAAA,EAC7D,SAAAO,EAAAA,KAACC,EAAA,CAAK,UAAU,wCACf,SAAA,CAAAH,MAACI,EAAA,CACA,SAAAJ,EAAAA,IAACK,EAAA,CACA,QAAQ,YACR,UAAU,kCAET,SAAAV,EAAS,MAAM,YAAA,CAAY,CAAA,EAE9B,SACCW,EAAA,CACA,SAAA,CAAAJ,EAAAA,KAAC,MAAA,CACA,UAAWK,EACV,OACAX,EAAU,2BAA6B,UAAA,EAGxC,SAAA,CAAAI,EAAAA,IAACK,EAAA,CAAW,QAAST,EAAU,KAAO,KAAM,UAAU,YACpD,WAAS,GAAA,CACX,EACAM,EAAAA,KAAC,MAAA,CACA,UAAWK,EACV,YACAX,EAAU,6BAA+B,iBAAA,EAG1C,SAAA,CAAAI,EAAAA,IAACK,EAAA,CACA,QAAST,EAAU,YAAc,SACjC,UAAU,GACV,WAAW,OAEV,SAAAC,CAAA,CAAA,QAEDQ,EAAA,CAAW,QAAQ,YAAY,UAAU,wBAAwB,SAAA,SAAA,CAElE,CAAA,CAAA,CAAA,CACD,CAAA,CAAA,EAEDL,EAAAA,IAAC,KAAA,CAAG,UAAU,MAAA,CAAO,EACpBL,EAAS,YACTK,MAAC,MAAA,CAAI,UAAU,iDACd,SAAAA,EAAAA,IAACQ,EAAA,CAAc,SAAAb,EAAS,aAAe,EAAA,CAAG,CAAA,CAC3C,EAEAK,EAAAA,IAACK,EAAA,CACA,QAAQ,YACR,UAAU,+BACV,SAAA,gBAAA,CAAA,CAED,CAAA,CAEF,CAAA,CAAA,CACD,CAAA,CACD,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,r as l,
|
|
2
|
-
//# sourceMappingURL=artifact._id-
|
|
1
|
+
import{j as e,r as l,s as y}from"./vendor-tanstack-CWDKYA_B.js";import{B as j,g as p,h as c,bs as u,bB as x,D as w,al as h,q as b,I as v,y as N,O as k,dw as D,dv as S}from"./index-DLuXqHi9.js";import{a as T}from"./use-get-artifacts-flow-task-runs-I3Wb9fOV.js";import{L as f}from"./lazy-markdown-sP3PYQgB.js";import{u as C,E as L}from"./vendor-codemirror-OTxfneaa.js";import{T as B,a as _,b as g,c as A,d as R,e as I}from"./table-CrPymfJD.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-DRMjKWJW.js";import"./vendor-recharts-BGjDGXVf.js";import"./vendor-forms-D-iybWES.js";import"./vendor-date-CRz8gtWZ.js";const M=({artifact:s})=>{let a=e.jsx(e.Fragment,{});return s.key?a=e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(j,{children:e.jsxs(p,{children:[e.jsx(c,{children:e.jsx(u,{to:"/artifacts/key/$key",params:{key:s.key},className:"text-xl font-semibold",children:s.key})}),e.jsx(x,{}),e.jsx(c,{className:"text-xl font-semibold",children:s.id})]})})}):a=e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(j,{children:e.jsxs(p,{children:[s.flow_run&&e.jsxs(e.Fragment,{children:[e.jsx(c,{children:e.jsx(u,{to:"/runs/flow-run/$id",params:{id:s.flow_run_id??""},className:"text-xl font-semibold",children:s.flow_run.name})}),e.jsx(x,{})]}),s.task_run&&e.jsxs(e.Fragment,{children:[e.jsx(c,{children:e.jsx(u,{to:"/runs/task-run/$id",params:{id:s.task_run_id??""},className:"text-xl font-semibold",children:s.task_run.name})}),e.jsx(x,{})]}),e.jsx(c,{className:"text-xl font-semibold",children:s.id})]})})}),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[a,e.jsx(w,{id:"artifacts-guide",label:"Documentation"})]}),s.description&&e.jsx("div",{className:"",children:e.jsx(h,{variant:"h2",className:"my-4 font-bold prose lg:prose-xl",children:e.jsx(f,{children:s.description})})}),e.jsx("hr",{})]})},E=({artifact:s})=>{const[a,r]=l.useState(!1),d=()=>{r(o=>!o)},n=l.useRef(null),m={highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1},{setContainer:t}=C({container:n.current,extensions:[L.lineWrapping],value:String(s.data),indentWithTab:!1,editable:!0,basicSetup:m});l.useEffect(()=>{n.current&&t(n.current)},[t]);const i=o=>{N.success("Copied to clipboard"),navigator.clipboard.writeText(o)};return e.jsxs("div",{className:"flex flex-col justify-center items-center",children:[e.jsxs(b,{"data-testid":"show-raw-data-button",variant:"outline",onClick:d,className:"my-4",children:[a?"Hide":"Show"," Raw Data"]}),e.jsx("div",{className:"rounded-md border shadow-xs focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",style:{display:a?"block":"none"},ref:o=>{n.current=o},"data-testid":"raw-data-display",children:e.jsx(b,{onClick:()=>i(s.data),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:e.jsx(v,{id:"Copy",className:"size-2"})})})]})},F=({url:s})=>e.jsxs("div",{"data-testid":s,className:"prose mt-2",children:[e.jsx("img",{"data-testid":`image-${s}`,src:s,alt:"artifact-image",className:"w-full"}),e.jsxs(h,{variant:"bodyLarge",children:["Image URL:"," ",e.jsx("a",{className:"text-blue-700 hover:underline",target:"_blank",href:s,rel:"noreferrer",children:s})]})]}),H=({markdown:s})=>e.jsx("div",{"data-testid":"markdown-display",className:"mt-4 prose",children:e.jsx(f,{children:s})}),O=({progress:s})=>e.jsxs(h,{"data-testid":"progress-display",variant:"bodyLarge",children:["Progress: ",s,"%"]}),z=({tableData:s})=>{const a=JSON.parse(s),r=Object.keys(a[0]),[d,n]=l.useState(""),m=l.useMemo(()=>a.filter(t=>Object.values(t).some(i=>String(i).toLowerCase().includes(d.toLowerCase()))),[d,a]);return e.jsxs("div",{"data-testid":"table-display",className:"mt-4",children:[e.jsx("div",{className:"flex flex-row justify-end items-center mb-2",children:e.jsx("div",{children:e.jsx(k,{placeholder:"Search",value:d,onChange:t=>n(t.target.value)})})}),e.jsx("div",{className:"rounded-md border",children:e.jsxs(B,{children:[e.jsx(_,{className:"bg-muted",children:e.jsx(g,{children:r.map(t=>e.jsx(A,{className:"py-2 text-foreground",children:t},t))})}),e.jsx(R,{children:m.map(t=>e.jsx(g,{children:r.map(i=>e.jsx(I,{children:t[i]},i))},t.id))})]})})]})},G=({artifact:s})=>{const a=l.useMemo(()=>{switch(s.type){case"markdown":case"link":return e.jsx(H,{markdown:s.data});case"image":return e.jsx(F,{url:s.data});case"progress":return e.jsx(O,{progress:s.data});case"table":return e.jsx(z,{tableData:s.data});default:return e.jsx("pre",{children:JSON.stringify(s.data,null,2)})}},[s]);return e.jsxs("div",{children:[e.jsx(M,{artifact:s}),a,e.jsx(E,{artifact:s})]})};function Z(){const{id:s}=D.useParams(),{data:a}=y(S(s)),r=T(s);return e.jsx(G,{artifact:r??a})}export{Z as component};
|
|
2
|
+
//# sourceMappingURL=artifact._id-BF4365i6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact._id-Emkhr_0h.js","sources":["../../src/components/artifacts/artifact/artifact-detail-header.tsx","../../src/components/artifacts/artifact/artifact-raw-data-display.tsx","../../src/components/artifacts/artifact/detail-image.tsx","../../src/components/artifacts/artifact/detail-markdown.tsx","../../src/components/artifacts/artifact/detail-progress.tsx","../../src/components/artifacts/artifact/detail-table.tsx","../../src/components/artifacts/artifact/artifact-detail-page.tsx","../../src/routes/artifacts/artifact.$id.tsx?tsr-split=component"],"sourcesContent":["import type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport { LazyMarkdown } from \"@/components/ui/lazy-markdown\";\nimport { Typography } from \"@/components/ui/typography\";\n\nexport type ArtifactDetailHeaderProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const ArtifactDetailHeader = ({\n\tartifact,\n}: ArtifactDetailHeaderProps) => {\n\tlet header = <></>;\n\tif (artifact.key) {\n\t\theader = (\n\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t<Breadcrumb>\n\t\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t\t\t<BreadcrumbLink\n\t\t\t\t\t\t\t\tto=\"/artifacts/key/$key\"\n\t\t\t\t\t\t\t\tparams={{ key: artifact.key }}\n\t\t\t\t\t\t\t\tclassName=\"text-xl font-semibold\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{artifact.key}\n\t\t\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\t\t{artifact.id}\n\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t</BreadcrumbList>\n\t\t\t\t</Breadcrumb>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\theader = (\n\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t<Breadcrumb>\n\t\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t\t{artifact.flow_run && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t\t\t\t\t<BreadcrumbLink\n\t\t\t\t\t\t\t\t\t\tto=\"/runs/flow-run/$id\"\n\t\t\t\t\t\t\t\t\t\tparams={{ id: artifact.flow_run_id ?? \"\" }}\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-xl font-semibold\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{artifact.flow_run.name}\n\t\t\t\t\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{artifact.task_run && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t\t\t\t\t<BreadcrumbLink\n\t\t\t\t\t\t\t\t\t\tto=\"/runs/task-run/$id\"\n\t\t\t\t\t\t\t\t\t\tparams={{ id: artifact.task_run_id ?? \"\" }}\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-xl font-semibold\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{artifact.task_run.name}\n\t\t\t\t\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\t\t{artifact.id}\n\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t</BreadcrumbList>\n\t\t\t\t</Breadcrumb>\n\t\t\t</div>\n\t\t);\n\t}\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t{header}\n\t\t\t\t<DocsLink id=\"artifacts-guide\" label=\"Documentation\" />\n\t\t\t</div>\n\t\t\t{artifact.description && (\n\t\t\t\t<div className=\"\">\n\t\t\t\t\t<Typography variant=\"h2\" className=\"my-4 font-bold prose lg:prose-xl\">\n\t\t\t\t\t\t<LazyMarkdown>{artifact.description}</LazyMarkdown>\n\t\t\t\t\t</Typography>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<hr />\n\t\t</>\n\t);\n};\n","import { EditorView, useCodeMirror } from \"@uiw/react-codemirror\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype ArtifactDataDisplayProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const ArtifactDataDisplay = ({ artifact }: ArtifactDataDisplayProps) => {\n\tconst [showData, setShowData] = useState(false);\n\n\tconst toggleShowData = () => {\n\t\tsetShowData((val) => !val);\n\t};\n\n\tconst editor = useRef<HTMLDivElement | null>(null);\n\tconst basicSetup = {\n\t\thighlightActiveLine: false,\n\t\tfoldGutter: false,\n\t\thighlightActiveLineGutter: false,\n\t};\n\tconst { setContainer } = useCodeMirror({\n\t\tcontainer: editor.current,\n\t\textensions: [EditorView.lineWrapping],\n\t\tvalue: String(artifact.data),\n\t\tindentWithTab: false,\n\t\teditable: true,\n\t\tbasicSetup,\n\t});\n\n\tuseEffect(() => {\n\t\tif (editor.current) {\n\t\t\tsetContainer(editor.current);\n\t\t}\n\t}, [setContainer]);\n\n\tconst handleCopy = (_value: string) => {\n\t\ttoast.success(\"Copied to clipboard\");\n\t\tvoid navigator.clipboard.writeText(_value);\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col justify-center items-center\">\n\t\t\t<Button\n\t\t\t\tdata-testid=\"show-raw-data-button\"\n\t\t\t\tvariant={\"outline\"}\n\t\t\t\tonClick={toggleShowData}\n\t\t\t\tclassName=\"my-4\"\n\t\t\t>\n\t\t\t\t{showData ? \"Hide\" : \"Show\"} Raw Data\n\t\t\t</Button>\n\n\t\t\t<div\n\t\t\t\tclassName=\"rounded-md border shadow-xs focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\"\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: showData ? \"block\" : \"none\",\n\t\t\t\t}}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t}}\n\t\t\t\tdata-testid=\"raw-data-display\"\n\t\t\t>\n\t\t\t\t<Button\n\t\t\t\t\tonClick={() => handleCopy(artifact.data as string)}\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t>\n\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import { Typography } from \"@/components/ui/typography\";\n\nexport type DetailImageProps = {\n\turl: string;\n};\n\nexport const DetailImage = ({ url }: DetailImageProps) => {\n\treturn (\n\t\t<div data-testid={url} className=\"prose mt-2\">\n\t\t\t<img\n\t\t\t\tdata-testid={`image-${url}`}\n\t\t\t\tsrc={url}\n\t\t\t\talt=\"artifact-image\"\n\t\t\t\tclassName=\"w-full\"\n\t\t\t/>\n\n\t\t\t<Typography variant=\"bodyLarge\">\n\t\t\t\tImage URL:{\" \"}\n\t\t\t\t<a\n\t\t\t\t\tclassName=\"text-blue-700 hover:underline\"\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\thref={url}\n\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t>\n\t\t\t\t\t{url}\n\t\t\t\t</a>\n\t\t\t</Typography>\n\t\t</div>\n\t);\n};\n","import { LazyMarkdown } from \"@/components/ui/lazy-markdown\";\n\nexport type DetailMarkdownProps = {\n\tmarkdown: string;\n};\n\nexport const DetailMarkdown = ({ markdown }: DetailMarkdownProps) => {\n\treturn (\n\t\t<div data-testid=\"markdown-display\" className=\"mt-4 prose\">\n\t\t\t<LazyMarkdown>{markdown}</LazyMarkdown>\n\t\t</div>\n\t);\n};\n","import { Typography } from \"@/components/ui/typography\";\n\nexport type DetailProgressProps = {\n\tprogress: number;\n};\n\nexport const DetailProgress = ({ progress }: DetailProgressProps) => {\n\treturn (\n\t\t<Typography data-testid=\"progress-display\" variant=\"bodyLarge\">\n\t\t\tProgress: {progress}%\n\t\t</Typography>\n\t);\n};\n","import { useMemo, useState } from \"react\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\n\nexport type DetailTableProps = {\n\ttableData: string;\n};\n\nexport const DetailTable = ({ tableData }: DetailTableProps) => {\n\tconst table = JSON.parse(tableData) as Record<string, string>[];\n\tconst headers = Object.keys(table[0]);\n\tconst [input, setInput] = useState<string>(\"\");\n\n\tconst filteredTable = useMemo(() => {\n\t\treturn table.filter((row) => {\n\t\t\treturn Object.values(row).some((value: string) =>\n\t\t\t\tString(value).toLowerCase().includes(input.toLowerCase()),\n\t\t\t);\n\t\t});\n\t}, [input, table]);\n\n\treturn (\n\t\t<div data-testid=\"table-display\" className=\"mt-4\">\n\t\t\t<div className=\"flex flex-row justify-end items-center mb-2\">\n\t\t\t\t<div>\n\t\t\t\t\t<SearchInput\n\t\t\t\t\t\tplaceholder=\"Search\"\n\t\t\t\t\t\tvalue={input}\n\t\t\t\t\t\tonChange={(e) => setInput(e.target.value)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"rounded-md border\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader className=\"bg-muted\">\n\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t{headers.map((header) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<TableHead key={header} className=\"py-2 text-foreground\">\n\t\t\t\t\t\t\t\t\t\t{header}\n\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t</TableHeader>\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t{filteredTable.map((row) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<TableRow key={row.id}>\n\t\t\t\t\t\t\t\t\t{headers.map((header) => {\n\t\t\t\t\t\t\t\t\t\treturn <TableCell key={header}>{row[header]}</TableCell>;\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import { useMemo } from \"react\";\nimport type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { ArtifactDetailHeader } from \"./artifact-detail-header\";\nimport { ArtifactDataDisplay } from \"./artifact-raw-data-display\";\nimport { DetailImage } from \"./detail-image\";\nimport { DetailMarkdown } from \"./detail-markdown\";\nimport { DetailProgress } from \"./detail-progress\";\nimport { DetailTable } from \"./detail-table\";\n\nexport type ArtifactDetailPageProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const ArtifactDetailPage = ({ artifact }: ArtifactDetailPageProps) => {\n\tconst mapArtifactHoc = useMemo(() => {\n\t\tswitch (artifact.type) {\n\t\t\tcase \"markdown\":\n\t\t\tcase \"link\":\n\t\t\t\treturn <DetailMarkdown markdown={artifact.data as string} />;\n\t\t\tcase \"image\":\n\t\t\t\treturn <DetailImage url={artifact.data as string} />;\n\t\t\tcase \"progress\":\n\t\t\t\treturn <DetailProgress progress={artifact.data as number} />;\n\t\t\tcase \"table\":\n\t\t\t\treturn <DetailTable tableData={artifact.data as string} />;\n\t\t\tdefault:\n\t\t\t\treturn <pre>{JSON.stringify(artifact.data, null, 2)}</pre>;\n\t\t}\n\t}, [artifact]);\n\treturn (\n\t\t<div>\n\t\t\t<ArtifactDetailHeader artifact={artifact} />\n\t\t\t{mapArtifactHoc}\n\t\t\t<ArtifactDataDisplay artifact={artifact} />\n\t\t</div>\n\t);\n};\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport { buildGetArtifactQuery } from \"@/api/artifacts\";\nimport { useGetArtifactFlowTaskRuns } from \"@/api/artifacts/use-get-artifacts-flow-task-runs/use-get-artifacts-flow-task-runs\";\nimport { ArtifactDetailPage } from \"@/components/artifacts/artifact/artifact-detail-page\";\n\nexport const Route = createFileRoute(\"/artifacts/artifact/$id\")({\n\tcomponent: RouteComponent,\n\tloader: async ({ context, params }) => {\n\t\tconst { id } = params;\n\n\t\tconst artifact = await context.queryClient.ensureQueryData(\n\t\t\tbuildGetArtifactQuery(id),\n\t\t);\n\n\t\treturn { artifact };\n\t},\n});\n\nfunction RouteComponent() {\n\tconst { id } = Route.useParams();\n\n\tconst { data: artifact } = useSuspenseQuery(buildGetArtifactQuery(id));\n\n\tconst artifactWithMetadata = useGetArtifactFlowTaskRuns(id);\n\n\treturn <ArtifactDetailPage artifact={artifactWithMetadata ?? artifact} />;\n}\n"],"names":["ArtifactDetailHeader","artifact","header","jsx","Fragment","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","jsxs","DocsLink","Typography","LazyMarkdown","ArtifactDataDisplay","showData","setShowData","useState","toggleShowData","val","editor","useRef","basicSetup","setContainer","useCodeMirror","EditorView","useEffect","handleCopy","_value","toast","Button","node","Icon","DetailImage","url","DetailMarkdown","markdown","DetailProgress","progress","DetailTable","tableData","table","headers","input","setInput","filteredTable","useMemo","row","value","SearchInput","e","Table","TableHeader","TableRow","TableHead","TableBody","TableCell","ArtifactDetailPage","mapArtifactHoc","RouteComponent","id","Route","useParams","data","useSuspenseQuery","buildGetArtifactQuery","artifactWithMetadata","useGetArtifactFlowTaskRuns"],"mappings":"2mBAgBO,MAAMA,EAAuB,CAAC,CACpC,SAAAC,CACD,IAAiC,CAChC,IAAIC,EAASC,EAAAA,IAAAC,EAAAA,SAAA,EAAE,EACf,OAAIH,EAAS,IACZC,QACE,MAAA,CAAI,UAAU,0BACd,SAAAC,MAACE,EAAA,CACA,gBAACC,EAAA,CACA,SAAA,CAAAH,MAACI,EAAA,CACA,SAAAJ,EAAAA,IAACK,EAAA,CACA,GAAG,sBACH,OAAQ,CAAE,IAAKP,EAAS,GAAA,EACxB,UAAU,wBAET,SAAAA,EAAS,GAAA,CAAA,EAEZ,QACCQ,EAAA,EAAoB,EACrBN,EAAAA,IAACI,EAAA,CAAe,UAAU,wBACxB,WAAS,EAAA,CACX,CAAA,CAAA,CACD,EACD,EACD,EAGDL,QACE,MAAA,CAAI,UAAU,0BACd,SAAAC,MAACE,EAAA,CACA,gBAACC,EAAA,CACC,SAAA,CAAAL,EAAS,UACTS,EAAAA,KAAAN,EAAAA,SAAA,CACC,SAAA,CAAAD,MAACI,EAAA,CACA,SAAAJ,EAAAA,IAACK,EAAA,CACA,GAAG,qBACH,OAAQ,CAAE,GAAIP,EAAS,aAAe,EAAA,EACtC,UAAU,wBAET,WAAS,SAAS,IAAA,CAAA,EAErB,QACCQ,EAAA,CAAA,CAAoB,CAAA,EACtB,EAEAR,EAAS,UACTS,EAAAA,KAAAN,EAAAA,SAAA,CACC,SAAA,CAAAD,MAACI,EAAA,CACA,SAAAJ,EAAAA,IAACK,EAAA,CACA,GAAG,qBACH,OAAQ,CAAE,GAAIP,EAAS,aA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B,IAAK,WACL,IAAK,OACJ,OAAOE,EAAAA,IAACgC,EAAA,CAAe,SAAUlC,EAAS,IAAA,CAAgB,EAC3D,IAAK,QACJ,OAAOE,EAAAA,IAAC8B,EAAA,CAAY,IAAKhC,EAAS,IAAA,CAAgB,EACnD,IAAK,WACJ,OAAOE,EAAAA,IAACkC,EAAA,CAAe,SAAUpC,EAAS,IAAA,CAAgB,EAC3D,IAAK,QACJ,OAAOE,EAAAA,IAACoC,EAAA,CAAY,UAAWtC,EAAS,IAAA,CAAgB,EACzD,QACC,OAAOE,MAAC,OAAK,SAAA,KAAK,UAAUF,EAAS,KAAM,KAAM,CAAC,CAAA,CAAE,CAAA,CAEvD,EAAG,CAACA,CAAQ,CAAC,EACb,cACE,MAAA,CACA,SAAA,CAAAE,MAACH,GAAqB,SAAAC,EAAoB,EACzCyD,EACDvD,MAACW,GAAoB,SAAAb,CAAA,CAAoB,CAAA,EAC1C,CAEF,ECjBA,SAAS0D,GAAiB,CACzB,KAAM,CAAEC,GAAAA,CAAAA,EAAOC,EAAMC,UAAAA,EAEf,CAAEC,KAAM9D,CAAAA,EAAa+D,EAAiBC,EAAsBL,CAAE,CAAC,EAE/DM,EAAuBC,EAA2BP,CAAE,EAE1D,OAAOzD,EAAAA,IAACsD,EAAA,CAAmB,SAAUS,GAAwBjE,CAAAA,CAAS,CACvE"}
|
|
1
|
+
{"version":3,"file":"artifact._id-BF4365i6.js","sources":["../../src/components/artifacts/artifact/artifact-detail-header.tsx","../../src/components/artifacts/artifact/artifact-raw-data-display.tsx","../../src/components/artifacts/artifact/detail-image.tsx","../../src/components/artifacts/artifact/detail-markdown.tsx","../../src/components/artifacts/artifact/detail-progress.tsx","../../src/components/artifacts/artifact/detail-table.tsx","../../src/components/artifacts/artifact/artifact-detail-page.tsx","../../src/routes/artifacts/artifact.$id.tsx?tsr-split=component"],"sourcesContent":["import type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport { LazyMarkdown } from \"@/components/ui/lazy-markdown\";\nimport { Typography } from \"@/components/ui/typography\";\n\nexport type ArtifactDetailHeaderProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const ArtifactDetailHeader = ({\n\tartifact,\n}: ArtifactDetailHeaderProps) => {\n\tlet header = <></>;\n\tif (artifact.key) {\n\t\theader = (\n\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t<Breadcrumb>\n\t\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t\t\t<BreadcrumbLink\n\t\t\t\t\t\t\t\tto=\"/artifacts/key/$key\"\n\t\t\t\t\t\t\t\tparams={{ key: artifact.key }}\n\t\t\t\t\t\t\t\tclassName=\"text-xl font-semibold\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{artifact.key}\n\t\t\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\t\t{artifact.id}\n\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t</BreadcrumbList>\n\t\t\t\t</Breadcrumb>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\theader = (\n\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t<Breadcrumb>\n\t\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t\t{artifact.flow_run && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t\t\t\t\t<BreadcrumbLink\n\t\t\t\t\t\t\t\t\t\tto=\"/runs/flow-run/$id\"\n\t\t\t\t\t\t\t\t\t\tparams={{ id: artifact.flow_run_id ?? \"\" }}\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-xl font-semibold\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{artifact.flow_run.name}\n\t\t\t\t\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{artifact.task_run && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t\t\t\t\t<BreadcrumbLink\n\t\t\t\t\t\t\t\t\t\tto=\"/runs/task-run/$id\"\n\t\t\t\t\t\t\t\t\t\tparams={{ id: artifact.task_run_id ?? \"\" }}\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-xl font-semibold\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{artifact.task_run.name}\n\t\t\t\t\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\t\t{artifact.id}\n\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t</BreadcrumbList>\n\t\t\t\t</Breadcrumb>\n\t\t\t</div>\n\t\t);\n\t}\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t{header}\n\t\t\t\t<DocsLink id=\"artifacts-guide\" label=\"Documentation\" />\n\t\t\t</div>\n\t\t\t{artifact.description && (\n\t\t\t\t<div className=\"\">\n\t\t\t\t\t<Typography variant=\"h2\" className=\"my-4 font-bold prose lg:prose-xl\">\n\t\t\t\t\t\t<LazyMarkdown>{artifact.description}</LazyMarkdown>\n\t\t\t\t\t</Typography>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<hr />\n\t\t</>\n\t);\n};\n","import { EditorView, useCodeMirror } from \"@uiw/react-codemirror\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype ArtifactDataDisplayProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const ArtifactDataDisplay = ({ artifact }: ArtifactDataDisplayProps) => {\n\tconst [showData, setShowData] = useState(false);\n\n\tconst toggleShowData = () => {\n\t\tsetShowData((val) => !val);\n\t};\n\n\tconst editor = useRef<HTMLDivElement | null>(null);\n\tconst basicSetup = {\n\t\thighlightActiveLine: false,\n\t\tfoldGutter: false,\n\t\thighlightActiveLineGutter: false,\n\t};\n\tconst { setContainer } = useCodeMirror({\n\t\tcontainer: editor.current,\n\t\textensions: [EditorView.lineWrapping],\n\t\tvalue: String(artifact.data),\n\t\tindentWithTab: false,\n\t\teditable: true,\n\t\tbasicSetup,\n\t});\n\n\tuseEffect(() => {\n\t\tif (editor.current) {\n\t\t\tsetContainer(editor.current);\n\t\t}\n\t}, [setContainer]);\n\n\tconst handleCopy = (_value: string) => {\n\t\ttoast.success(\"Copied to clipboard\");\n\t\tvoid navigator.clipboard.writeText(_value);\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col justify-center items-center\">\n\t\t\t<Button\n\t\t\t\tdata-testid=\"show-raw-data-button\"\n\t\t\t\tvariant={\"outline\"}\n\t\t\t\tonClick={toggleShowData}\n\t\t\t\tclassName=\"my-4\"\n\t\t\t>\n\t\t\t\t{showData ? \"Hide\" : \"Show\"} Raw Data\n\t\t\t</Button>\n\n\t\t\t<div\n\t\t\t\tclassName=\"rounded-md border shadow-xs focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\"\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: showData ? \"block\" : \"none\",\n\t\t\t\t}}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t}}\n\t\t\t\tdata-testid=\"raw-data-display\"\n\t\t\t>\n\t\t\t\t<Button\n\t\t\t\t\tonClick={() => handleCopy(artifact.data as string)}\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t>\n\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import { Typography } from \"@/components/ui/typography\";\n\nexport type DetailImageProps = {\n\turl: string;\n};\n\nexport const DetailImage = ({ url }: DetailImageProps) => {\n\treturn (\n\t\t<div data-testid={url} className=\"prose mt-2\">\n\t\t\t<img\n\t\t\t\tdata-testid={`image-${url}`}\n\t\t\t\tsrc={url}\n\t\t\t\talt=\"artifact-image\"\n\t\t\t\tclassName=\"w-full\"\n\t\t\t/>\n\n\t\t\t<Typography variant=\"bodyLarge\">\n\t\t\t\tImage URL:{\" \"}\n\t\t\t\t<a\n\t\t\t\t\tclassName=\"text-blue-700 hover:underline\"\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\thref={url}\n\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t>\n\t\t\t\t\t{url}\n\t\t\t\t</a>\n\t\t\t</Typography>\n\t\t</div>\n\t);\n};\n","import { LazyMarkdown } from \"@/components/ui/lazy-markdown\";\n\nexport type DetailMarkdownProps = {\n\tmarkdown: string;\n};\n\nexport const DetailMarkdown = ({ markdown }: DetailMarkdownProps) => {\n\treturn (\n\t\t<div data-testid=\"markdown-display\" className=\"mt-4 prose\">\n\t\t\t<LazyMarkdown>{markdown}</LazyMarkdown>\n\t\t</div>\n\t);\n};\n","import { Typography } from \"@/components/ui/typography\";\n\nexport type DetailProgressProps = {\n\tprogress: number;\n};\n\nexport const DetailProgress = ({ progress }: DetailProgressProps) => {\n\treturn (\n\t\t<Typography data-testid=\"progress-display\" variant=\"bodyLarge\">\n\t\t\tProgress: {progress}%\n\t\t</Typography>\n\t);\n};\n","import { useMemo, useState } from \"react\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\n\nexport type DetailTableProps = {\n\ttableData: string;\n};\n\nexport const DetailTable = ({ tableData }: DetailTableProps) => {\n\tconst table = JSON.parse(tableData) as Record<string, string>[];\n\tconst headers = Object.keys(table[0]);\n\tconst [input, setInput] = useState<string>(\"\");\n\n\tconst filteredTable = useMemo(() => {\n\t\treturn table.filter((row) => {\n\t\t\treturn Object.values(row).some((value: string) =>\n\t\t\t\tString(value).toLowerCase().includes(input.toLowerCase()),\n\t\t\t);\n\t\t});\n\t}, [input, table]);\n\n\treturn (\n\t\t<div data-testid=\"table-display\" className=\"mt-4\">\n\t\t\t<div className=\"flex flex-row justify-end items-center mb-2\">\n\t\t\t\t<div>\n\t\t\t\t\t<SearchInput\n\t\t\t\t\t\tplaceholder=\"Search\"\n\t\t\t\t\t\tvalue={input}\n\t\t\t\t\t\tonChange={(e) => setInput(e.target.value)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"rounded-md border\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader className=\"bg-muted\">\n\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t{headers.map((header) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<TableHead key={header} className=\"py-2 text-foreground\">\n\t\t\t\t\t\t\t\t\t\t{header}\n\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t</TableHeader>\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t{filteredTable.map((row) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<TableRow key={row.id}>\n\t\t\t\t\t\t\t\t\t{headers.map((header) => {\n\t\t\t\t\t\t\t\t\t\treturn <TableCell key={header}>{row[header]}</TableCell>;\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import { useMemo } from \"react\";\nimport type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { ArtifactDetailHeader } from \"./artifact-detail-header\";\nimport { ArtifactDataDisplay } from \"./artifact-raw-data-display\";\nimport { DetailImage } from \"./detail-image\";\nimport { DetailMarkdown } from \"./detail-markdown\";\nimport { DetailProgress } from \"./detail-progress\";\nimport { DetailTable } from \"./detail-table\";\n\nexport type ArtifactDetailPageProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const ArtifactDetailPage = ({ artifact }: ArtifactDetailPageProps) => {\n\tconst mapArtifactHoc = useMemo(() => {\n\t\tswitch (artifact.type) {\n\t\t\tcase \"markdown\":\n\t\t\tcase \"link\":\n\t\t\t\treturn <DetailMarkdown markdown={artifact.data as string} />;\n\t\t\tcase \"image\":\n\t\t\t\treturn <DetailImage url={artifact.data as string} />;\n\t\t\tcase \"progress\":\n\t\t\t\treturn <DetailProgress progress={artifact.data as number} />;\n\t\t\tcase \"table\":\n\t\t\t\treturn <DetailTable tableData={artifact.data as string} />;\n\t\t\tdefault:\n\t\t\t\treturn <pre>{JSON.stringify(artifact.data, null, 2)}</pre>;\n\t\t}\n\t}, [artifact]);\n\treturn (\n\t\t<div>\n\t\t\t<ArtifactDetailHeader artifact={artifact} />\n\t\t\t{mapArtifactHoc}\n\t\t\t<ArtifactDataDisplay artifact={artifact} />\n\t\t</div>\n\t);\n};\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport { buildGetArtifactQuery } from \"@/api/artifacts\";\nimport { useGetArtifactFlowTaskRuns } from \"@/api/artifacts/use-get-artifacts-flow-task-runs/use-get-artifacts-flow-task-runs\";\nimport { ArtifactDetailPage } from \"@/components/artifacts/artifact/artifact-detail-page\";\n\nexport const Route = createFileRoute(\"/artifacts/artifact/$id\")({\n\tcomponent: RouteComponent,\n\tloader: async ({ context, params }) => {\n\t\tconst { id } = params;\n\n\t\tconst artifact = await context.queryClient.ensureQueryData(\n\t\t\tbuildGetArtifactQuery(id),\n\t\t);\n\n\t\treturn { artifact };\n\t},\n});\n\nfunction RouteComponent() {\n\tconst { id } = Route.useParams();\n\n\tconst { data: artifact } = useSuspenseQuery(buildGetArtifactQuery(id));\n\n\tconst artifactWithMetadata = useGetArtifactFlowTaskRuns(id);\n\n\treturn <ArtifactDetailPage artifact={artifactWithMetadata ?? artifact} />;\n}\n"],"names":["ArtifactDetailHeader","artifact","header","jsx","Fragment","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","jsxs","DocsLink","Typography","LazyMarkdown","ArtifactDataDisplay","showData","setShowData","useState","toggleShowData","val","editor","useRef","basicSetup","setContainer","useCodeMirror","EditorView","useEffect","handleCopy","_value","toast","Button","node","Icon","DetailImage","url","DetailMarkdown","markdown","DetailProgress","progress","DetailTable","tableData","table","headers","input","setInput","filteredTable","useMemo","row","value","SearchInput","e","Table","TableHeader","TableRow","TableHead","TableBody","TableCell","ArtifactDetailPage","mapArtifactHoc","RouteComponent","id","Route","useParams","data","useSuspenseQuery","buildGetArtifactQuery","artifactWithMetadata","useGetArtifactFlowTaskRuns"],"mappings":"2mBAgBO,MAAMA,EAAuB,CAAC,CACpC,SAAAC,CACD,IAAiC,CAChC,IAAIC,EAASC,EAAAA,IAAAC,EAAA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KAAK,UAAUF,EAAS,KAAM,KAAM,CAAC,CAAA,CAAE,CAAA,CAEvD,EAAG,CAACA,CAAQ,CAAC,EACb,cACE,MAAA,CACA,SAAA,CAAAE,MAACH,GAAqB,SAAAC,EAAoB,EACzCyD,EACDvD,MAACW,GAAoB,SAAAb,CAAA,CAAoB,CAAA,EAC1C,CAEF,ECjBA,SAAS0D,GAAiB,CACzB,KAAM,CAAEC,GAAAA,CAAAA,EAAOC,EAAMC,UAAAA,EAEf,CAAEC,KAAM9D,CAAAA,EAAa+D,EAAiBC,EAAsBL,CAAE,CAAC,EAE/DM,EAAuBC,EAA2BP,CAAE,EAE1D,OAAOzD,EAAAA,IAACsD,EAAA,CAAmB,SAAUS,GAAwBjE,CAAAA,CAAS,CACvE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as n,a as i,l,e as a,s as o,k as s,m as t,b as y,r as p,u as c,n as u}from"./vendor-forms-
|
|
2
|
-
//# sourceMappingURL=automation-schema-
|
|
1
|
+
import{o as n,a as i,l,e as a,s as o,k as s,m as t,b as y,r as p,u as c,n as u}from"./vendor-forms-D-iybWES.js";const r="UNASSIGNED",_=n({type:t("do-nothing")}),f=n({type:a(["cancel-flow-run","suspend-flow-run","resume-flow-run"])}),S=n({type:t("change-flow-run-state"),state:a(["COMPLETED","RUNNING","SCHEDULED","PENDING","FAILED","CANCELLED","CANCELLING","CRASHED","PAUSED"]),name:o().optional(),message:o().optional(),force:y().optional()}).transform(e=>({...e,force:e.force??!1})),w=n({type:t("run-deployment"),deployment_id:o().or(t(r)),job_variables:p(c()).optional(),parameters:p(c()).optional()}).transform(e=>({...e,...e.deployment_id===r?{source:"inferred",deployment_id:null}:{source:"selected",deployment_id:e.deployment_id}})),g=n({type:a(["pause-deployment","resume-deployment"]),deployment_id:o().or(t(r))}).transform(e=>({type:e.type,...e.deployment_id===r?{source:"inferred",deployment_id:null}:{source:"selected",deployment_id:e.deployment_id}})),k=n({type:a(["pause-work-queue","resume-work-queue"]),work_queue_id:o().or(t(r))}).transform(e=>({type:e.type,...e.work_queue_id===r?{source:"inferred",work_queue_id:null}:{source:"selected",work_queue_id:e.work_queue_id}})),T=n({type:a(["pause-work-pool","resume-work-pool"]),work_pool_id:o().or(t(r))}).transform(e=>({type:e.type,...e.work_pool_id===r?{source:"inferred",work_pool_id:null}:{source:"selected",work_pool_id:e.work_pool_id}})),h=n({type:a(["pause-automation","resume-automation"]),automation_id:o().or(t(r))}).transform(e=>({type:e.type,...e.automation_id===r?{source:"inferred",automation_id:null}:{source:"selected",automation_id:e.automation_id}})),N=n({type:t("send-notification"),block_document_id:o(),body:o(),subject:o()}),E=a(["deployment-status","flow-run-state","work-pool-status","work-queue-status","custom"]),D=a(["Reactive","Proactive"]),m=p(s([o(),i(o())])),q=n({type:t("event"),posture:D,threshold:u().min(1).default(1),within:u().min(0).default(0),match:m.optional(),match_related:m.optional(),for_each:i(o()).optional(),after:i(o()).optional(),expect:i(o()).optional()}),d=l(()=>s([q,A,b])),A=l(()=>n({type:t("compound"),triggers:i(d),require:s([u().min(1),t("any"),t("all")]).default("all"),within:u().min(0).default(0)})),b=l(()=>n({type:t("sequence"),triggers:i(d),within:u().min(0).default(0)})),L=n({name:o().min(1,"Name is required"),description:o().optional(),triggerTemplate:E.optional(),trigger:d,actions:i(s([_,S,g,w,T,k,h,N,f]))});export{L as A,d as T,r as U};
|
|
2
|
+
//# sourceMappingURL=automation-schema-crrFcHTg.js.map
|
prefect/server/ui-v2/assets/{automation-schema-CRKJHa4q.js.map → automation-schema-crrFcHTg.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-schema-CRKJHa4q.js","sources":["../../src/components/automations/automations-wizard/automation-schema.ts"],"sourcesContent":["import { z } from \"zod\";\nexport const UNASSIGNED = \"UNASSIGNED\";\n\n//----- Actions\nconst DoNothingSchema = z.object({ type: z.literal(\"do-nothing\") });\n\nconst FlowRunSchema = z.object({\n\ttype: z.enum([\"cancel-flow-run\", \"suspend-flow-run\", \"resume-flow-run\"]),\n});\n\nconst ChangeFlowRunStateSchema = z\n\t.object({\n\t\ttype: z.literal(\"change-flow-run-state\"),\n\t\tstate: z.enum([\n\t\t\t\"COMPLETED\",\n\t\t\t\"RUNNING\",\n\t\t\t\"SCHEDULED\",\n\t\t\t\"PENDING\",\n\t\t\t\"FAILED\",\n\t\t\t\"CANCELLED\",\n\t\t\t\"CANCELLING\",\n\t\t\t\"CRASHED\",\n\t\t\t\"PAUSED\",\n\t\t]),\n\t\tname: z.string().optional(),\n\t\tmessage: z.string().optional(),\n\t\tforce: z.boolean().optional(),\n\t})\n\t.transform((schema) => ({\n\t\t...schema,\n\t\tforce: schema.force ?? false,\n\t}));\n\nconst RunDeploymentsSchema = z\n\t.object({\n\t\ttype: z.literal(\"run-deployment\"),\n\t\tdeployment_id: z.string().or(z.literal(UNASSIGNED)),\n\t\tjob_variables: z.record(z.unknown()).optional(),\n\t\tparameters: z.record(z.unknown()).optional(),\n\t})\n\t.transform((schema) => ({\n\t\t...schema,\n\t\t...(schema.deployment_id === UNASSIGNED\n\t\t\t? ({ source: \"inferred\", deployment_id: null } as const)\n\t\t\t: ({ source: \"selected\", deployment_id: schema.deployment_id } as const)),\n\t}));\n\nconst DeploymentsSchema = z\n\t.object({\n\t\ttype: z.enum([\"pause-deployment\", \"resume-deployment\"]),\n\t\t/** nb: Because shadcn MUST have a non empty string as a value, use UNASSIGNED to indicate that this will turn to a null value */\n\t\tdeployment_id: z.string().or(z.literal(UNASSIGNED)),\n\t})\n\t.transform((schema) => ({\n\t\ttype: schema.type,\n\t\t...(schema.deployment_id === UNASSIGNED\n\t\t\t? ({ source: \"inferred\", deployment_id: null } as const)\n\t\t\t: ({ source: \"selected\", deployment_id: schema.deployment_id } as const)),\n\t}));\n\nconst WorkQueueSchema = z\n\t.object({\n\t\ttype: z.enum([\"pause-work-queue\", \"resume-work-queue\"]),\n\t\t/** nb: Because shadcn MUST have a non empty string as a value, use UNASSIGNED to indicate that this will turn to a null value */\n\t\twork_queue_id: z.string().or(z.literal(UNASSIGNED)),\n\t})\n\t.transform((schema) => ({\n\t\ttype: schema.type,\n\t\t...(schema.work_queue_id === UNASSIGNED\n\t\t\t? ({ source: \"inferred\", work_queue_id: null } as const)\n\t\t\t: ({ source: \"selected\", work_queue_id: schema.work_queue_id } as const)),\n\t}));\n\nconst WorkPoolSchema = z\n\t.object({\n\t\ttype: z.enum([\"pause-work-pool\", \"resume-work-pool\"]),\n\t\t/** nb: Because shadcn MUST have a non empty string as a value, use UNASSIGNED to indicate that this will turn to a null value */\n\t\twork_pool_id: z.string().or(z.literal(UNASSIGNED)),\n\t})\n\t.transform((schema) => ({\n\t\ttype: schema.type,\n\t\t...(schema.work_pool_id === UNASSIGNED\n\t\t\t? ({ source: \"inferred\", work_pool_id: null } as const)\n\t\t\t: ({ source: \"selected\", work_pool_id: schema.work_pool_id } as const)),\n\t}));\n\nconst AutomationSchema = z\n\t.object({\n\t\ttype: z.enum([\"pause-automation\", \"resume-automation\"]),\n\t\t/** nb: Because shadcn MUST have a non empty string as a value, use UNASSIGNED to indicate that this will turn to a null value */\n\t\tautomation_id: z.string().or(z.literal(UNASSIGNED)),\n\t})\n\t.transform((schema) => ({\n\t\ttype: schema.type,\n\t\t...(schema.automation_id === UNASSIGNED\n\t\t\t? ({ source: \"inferred\", automation_id: null } as const)\n\t\t\t: ({ source: \"selected\", automation_id: schema.automation_id } as const)),\n\t}));\n\nconst SendNotificationSchema = z.object({\n\ttype: z.literal(\"send-notification\"),\n\tblock_document_id: z.string(),\n\tbody: z.string(),\n\tsubject: z.string(),\n});\n\n//----- Triggers\n\n// Trigger template type (for UI selection)\nexport const TriggerTemplateSchema = z.enum([\n\t\"deployment-status\",\n\t\"flow-run-state\",\n\t\"work-pool-status\",\n\t\"work-queue-status\",\n\t\"custom\",\n]);\nexport type TriggerTemplate = z.infer<typeof TriggerTemplateSchema>;\n\n// Trigger posture\nconst TriggerPostureSchema = z.enum([\"Reactive\", \"Proactive\"]);\nexport type TriggerPosture = z.infer<typeof TriggerPostureSchema>;\n\n// Event trigger schema (the primary trigger type for form mode)\n// Resource specification schema (for match conditions)\nconst ResourceSpecificationSchema = z.record(\n\tz.union([z.string(), z.array(z.string())]),\n);\n\nexport const EventTriggerSchema = z.object({\n\ttype: z.literal(\"event\"),\n\tposture: TriggerPostureSchema,\n\tthreshold: z.number().min(1).default(1),\n\twithin: z.number().min(0).default(0),\n\t// Match conditions\n\tmatch: ResourceSpecificationSchema.optional(),\n\tmatch_related: ResourceSpecificationSchema.optional(),\n\tfor_each: z.array(z.string()).optional(),\n\tafter: z.array(z.string()).optional(),\n\texpect: z.array(z.string()).optional(),\n});\nexport type EventTrigger = z.output<typeof EventTriggerSchema>;\nexport type EventTriggerInput = z.input<typeof EventTriggerSchema>;\n\n// Output types (after parsing - all defaults are applied, fields are required)\nexport type CompoundTrigger = {\n\ttype: \"compound\";\n\ttriggers: Trigger[];\n\trequire: number | \"any\" | \"all\";\n\twithin: number;\n};\n\nexport type SequenceTrigger = {\n\ttype: \"sequence\";\n\ttriggers: Trigger[];\n\twithin: number;\n};\n\nexport type Trigger = EventTrigger | CompoundTrigger | SequenceTrigger;\n\n// Input types (before parsing - defaulted fields are optional)\nexport type CompoundTriggerInput = {\n\ttype: \"compound\";\n\ttriggers: TriggerInput[];\n\trequire?: number | \"any\" | \"all\";\n\twithin?: number;\n};\n\nexport type SequenceTriggerInput = {\n\ttype: \"sequence\";\n\ttriggers: TriggerInput[];\n\twithin?: number;\n};\n\nexport type TriggerInput =\n\t| EventTriggerInput\n\t| CompoundTriggerInput\n\t| SequenceTriggerInput;\n\n// Recursive trigger schemas with explicit type annotations\n// Using z.ZodType<Output, z.ZodTypeDef, Input> to handle input/output type differences from defaults\n\nexport const TriggerSchema: z.ZodType<Trigger, z.ZodTypeDef, TriggerInput> =\n\tz.lazy(() =>\n\t\tz.union([EventTriggerSchema, CompoundTriggerSchema, SequenceTriggerSchema]),\n\t);\n\nexport const CompoundTriggerSchema: z.ZodType<\n\tCompoundTrigger,\n\tz.ZodTypeDef,\n\tCompoundTriggerInput\n> = z.lazy(() =>\n\tz.object({\n\t\ttype: z.literal(\"compound\"),\n\t\ttriggers: z.array(TriggerSchema),\n\t\trequire: z\n\t\t\t.union([z.number().min(1), z.literal(\"any\"), z.literal(\"all\")])\n\t\t\t.default(\"all\"),\n\t\twithin: z.number().min(0).default(0),\n\t}),\n);\n\nexport const SequenceTriggerSchema: z.ZodType<\n\tSequenceTrigger,\n\tz.ZodTypeDef,\n\tSequenceTriggerInput\n> = z.lazy(() =>\n\tz.object({\n\t\ttype: z.literal(\"sequence\"),\n\t\ttriggers: z.array(TriggerSchema),\n\t\twithin: z.number().min(0).default(0),\n\t}),\n);\n\nexport const AutomationWizardSchema = z.object({\n\tname: z.string().min(1, \"Name is required\"),\n\tdescription: z.string().optional(),\n\ttriggerTemplate: TriggerTemplateSchema.optional(),\n\ttrigger: TriggerSchema,\n\tactions: z.array(\n\t\tz.union([\n\t\t\tDoNothingSchema,\n\t\t\tChangeFlowRunStateSchema,\n\t\t\tDeploymentsSchema,\n\t\t\tRunDeploymentsSchema,\n\t\t\tWorkPoolSchema,\n\t\t\tWorkQueueSchema,\n\t\t\tAutomationSchema,\n\t\t\tSendNotificationSchema,\n\t\t\tFlowRunSchema,\n\t\t]),\n\t),\n});\nexport type AutomationWizardSchema = z.infer<typeof AutomationWizardSchema>;\nexport type ActionsSchema = AutomationWizardSchema[\"actions\"][number];\nexport type ActionType = AutomationWizardSchema[\"actions\"][number][\"type\"];\n"],"names":["UNASSIGNED","DoNothingSchema","z.object","z.literal","FlowRunSchema","z.enum","ChangeFlowRunStateSchema","z.string","z.boolean","schema","RunDeploymentsSchema","z.record","z.unknown","DeploymentsSchema","WorkQueueSchema","WorkPoolSchema","AutomationSchema","SendNotificationSchema","TriggerTemplateSchema","TriggerPostureSchema","ResourceSpecificationSchema","z.union","z.array","EventTriggerSchema","z.number","TriggerSchema","z.lazy","CompoundTri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CAAC,EACtC,OAAQA,EAAE,EAAS,IAAI,CAAC,EAAE,QAAQ,CAAC,EAEnC,MAAOJ,EAA4B,SAAA,EACnC,cAAeA,EAA4B,SAAA,EAC3C,SAAUE,EAAQf,EAAE,CAAQ,EAAE,SAAA,EAC9B,MAAOe,EAAQf,EAAE,CAAQ,EAAE,SAAA,EAC3B,OAAQe,EAAQf,EAAE,CAAQ,EAAE,SAAA,CAC7B,CAAC,EA0CYkB,EACZC,EAAO,IACNL,EAAQ,CAACE,EAAoBI,EAAuBC,CAAqB,CAAC,CAC3E,EAEYD,EAITD,EAAO,IACVxB,EAAS,CACR,KAAMC,EAAU,UAAU,EAC1B,SAAUmB,EAAQG,CAAa,EAC/B,QAASJ,EACD,CAACG,EAAE,EAAS,IAAI,CAAC,EAAGrB,EAAU,KAAK,EAAGA,EAAU,KAAK,CAAC,CAAC,EAC7D,QAAQ,KAAK,EACf,OAAQqB,EAAE,EAAS,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAA,CACnC,CACF,EAEaI,EAITF,EAAO,IACVxB,EAAS,CACR,KAAMC,EAAU,UAAU,EAC1B,SAAUmB,EAAQG,CAAa,EAC/B,OAAQD,EAAE,EAAS,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAA,CACnC,CACF,EAEaK,EAAyB3B,EAAS,CAC9C,KAAMK,EAAE,EAAS,IAAI,EAAG,kBAAkB,EAC1C,YAAaA,EAAE,EAAS,SAAA,EACxB,gBAAiBW,EAAsB,SAAA,EACvC,QAASO,EACT,QAASH,EACRD,EAAQ,CACPpB,EACAK,EACAO,EACAH,EACAK,EACAD,EACAE,EACAC,EACAb,CAAA,CACA,CAAA,CAEH,CAAC"}
|
|
1
|
+
{"version":3,"file":"automation-schema-crrFcHTg.js","sources":["../../src/components/automations/automations-wizard/automation-schema.ts"],"sourcesContent":["import { z } from \"zod\";\nexport const UNASSIGNED = \"UNASSIGNED\";\n\n//----- Actions\nconst DoNothingSchema = z.object({ type: z.literal(\"do-nothing\") });\n\nconst FlowRunSchema = z.object({\n\ttype: z.enum([\"cancel-flow-run\", \"suspend-flow-run\", \"resume-flow-run\"]),\n});\n\nconst ChangeFlowRunStateSchema = z\n\t.object({\n\t\ttype: z.literal(\"change-flow-run-state\"),\n\t\tstate: z.enum([\n\t\t\t\"COMPLETED\",\n\t\t\t\"RUNNING\",\n\t\t\t\"SCHEDULED\",\n\t\t\t\"PENDING\",\n\t\t\t\"FAILED\",\n\t\t\t\"CANCELLED\",\n\t\t\t\"CANCELLING\",\n\t\t\t\"CRASHED\",\n\t\t\t\"PAUSED\",\n\t\t]),\n\t\tname: z.string().optional(),\n\t\tmessage: z.string().optional(),\n\t\tforce: z.boolean().optional(),\n\t})\n\t.transform((schema) => ({\n\t\t...schema,\n\t\tforce: schema.force ?? false,\n\t}));\n\nconst RunDeploymentsSchema = z\n\t.object({\n\t\ttype: z.literal(\"run-deployment\"),\n\t\tdeployment_id: z.string().or(z.literal(UNASSIGNED)),\n\t\tjob_variables: z.record(z.unknown()).optional(),\n\t\tparameters: z.record(z.unknown()).optional(),\n\t})\n\t.transform((schema) => ({\n\t\t...schema,\n\t\t...(schema.deployment_id === UNASSIGNED\n\t\t\t? ({ source: \"inferred\", deployment_id: null } as const)\n\t\t\t: ({ source: \"selected\", deployment_id: schema.deployment_id } as const)),\n\t}));\n\nconst DeploymentsSchema = z\n\t.object({\n\t\ttype: z.enum([\"pause-deployment\", \"resume-deployment\"]),\n\t\t/** nb: Because shadcn MUST have a non empty string as a value, use UNASSIGNED to indicate that this will turn to a null value */\n\t\tdeployment_id: z.string().or(z.literal(UNASSIGNED)),\n\t})\n\t.transform((schema) => ({\n\t\ttype: schema.type,\n\t\t...(schema.deployment_id === UNASSIGNED\n\t\t\t? ({ source: \"inferred\", deployment_id: null } as const)\n\t\t\t: ({ source: \"selected\", deployment_id: schema.deployment_id } as const)),\n\t}));\n\nconst WorkQueueSchema = z\n\t.object({\n\t\ttype: z.enum([\"pause-work-queue\", \"resume-work-queue\"]),\n\t\t/** nb: Because shadcn MUST have a non empty string as a value, use UNASSIGNED to indicate that this will turn to a null value */\n\t\twork_queue_id: z.string().or(z.literal(UNASSIGNED)),\n\t})\n\t.transform((schema) => ({\n\t\ttype: schema.type,\n\t\t...(schema.work_queue_id === UNASSIGNED\n\t\t\t? ({ source: \"inferred\", work_queue_id: null } as const)\n\t\t\t: ({ source: \"selected\", work_queue_id: schema.work_queue_id } as const)),\n\t}));\n\nconst WorkPoolSchema = z\n\t.object({\n\t\ttype: z.enum([\"pause-work-pool\", \"resume-work-pool\"]),\n\t\t/** nb: Because shadcn MUST have a non empty string as a value, use UNASSIGNED to indicate that this will turn to a null value */\n\t\twork_pool_id: z.string().or(z.literal(UNASSIGNED)),\n\t})\n\t.transform((schema) => ({\n\t\ttype: schema.type,\n\t\t...(schema.work_pool_id === UNASSIGNED\n\t\t\t? ({ source: \"inferred\", work_pool_id: null } as const)\n\t\t\t: ({ source: \"selected\", work_pool_id: schema.work_pool_id } as const)),\n\t}));\n\nconst AutomationSchema = z\n\t.object({\n\t\ttype: z.enum([\"pause-automation\", \"resume-automation\"]),\n\t\t/** nb: Because shadcn MUST have a non empty string as a value, use UNASSIGNED to indicate that this will turn to a null value */\n\t\tautomation_id: z.string().or(z.literal(UNASSIGNED)),\n\t})\n\t.transform((schema) => ({\n\t\ttype: schema.type,\n\t\t...(schema.automation_id === UNASSIGNED\n\t\t\t? ({ source: \"inferred\", automation_id: null } as const)\n\t\t\t: ({ source: \"selected\", automation_id: schema.automation_id } as const)),\n\t}));\n\nconst SendNotificationSchema = z.object({\n\ttype: z.literal(\"send-notification\"),\n\tblock_document_id: z.string(),\n\tbody: z.string(),\n\tsubject: z.string(),\n});\n\n//----- Triggers\n\n// Trigger template type (for UI selection)\nexport const TriggerTemplateSchema = z.enum([\n\t\"deployment-status\",\n\t\"flow-run-state\",\n\t\"work-pool-status\",\n\t\"work-queue-status\",\n\t\"custom\",\n]);\nexport type TriggerTemplate = z.infer<typeof TriggerTemplateSchema>;\n\n// Trigger posture\nconst TriggerPostureSchema = z.enum([\"Reactive\", \"Proactive\"]);\nexport type TriggerPosture = z.infer<typeof TriggerPostureSchema>;\n\n// Event trigger schema (the primary trigger type for form mode)\n// Resource specification schema (for match conditions)\nconst ResourceSpecificationSchema = z.record(\n\tz.union([z.string(), z.array(z.string())]),\n);\n\nexport const EventTriggerSchema = z.object({\n\ttype: z.literal(\"event\"),\n\tposture: TriggerPostureSchema,\n\tthreshold: z.number().min(1).default(1),\n\twithin: z.number().min(0).default(0),\n\t// Match conditions\n\tmatch: ResourceSpecificationSchema.optional(),\n\tmatch_related: ResourceSpecificationSchema.optional(),\n\tfor_each: z.array(z.string()).optional(),\n\tafter: z.array(z.string()).optional(),\n\texpect: z.array(z.string()).optional(),\n});\nexport type EventTrigger = z.output<typeof EventTriggerSchema>;\nexport type EventTriggerInput = z.input<typeof EventTriggerSchema>;\n\n// Output types (after parsing - all defaults are applied, fields are required)\nexport type CompoundTrigger = {\n\ttype: \"compound\";\n\ttriggers: Trigger[];\n\trequire: number | \"any\" | \"all\";\n\twithin: number;\n};\n\nexport type SequenceTrigger = {\n\ttype: \"sequence\";\n\ttriggers: Trigger[];\n\twithin: number;\n};\n\nexport type Trigger = EventTrigger | CompoundTrigger | SequenceTrigger;\n\n// Input types (before parsing - defaulted fields are optional)\nexport type CompoundTriggerInput = {\n\ttype: \"compound\";\n\ttriggers: TriggerInput[];\n\trequire?: number | \"any\" | \"all\";\n\twithin?: number;\n};\n\nexport type SequenceTriggerInput = {\n\ttype: \"sequence\";\n\ttriggers: TriggerInput[];\n\twithin?: number;\n};\n\nexport type TriggerInput =\n\t| EventTriggerInput\n\t| CompoundTriggerInput\n\t| SequenceTriggerInput;\n\n// Recursive trigger schemas with explicit type annotations\n// Using z.ZodType<Output, z.ZodTypeDef, Input> to handle input/output type differences from defaults\n\nexport const TriggerSchema: z.ZodType<Trigger, z.ZodTypeDef, TriggerInput> =\n\tz.lazy(() =>\n\t\tz.union([EventTriggerSchema, CompoundTriggerSchema, SequenceTriggerSchema]),\n\t);\n\nexport const CompoundTriggerSchema: z.ZodType<\n\tCompoundTrigger,\n\tz.ZodTypeDef,\n\tCompoundTriggerInput\n> = z.lazy(() =>\n\tz.object({\n\t\ttype: z.literal(\"compound\"),\n\t\ttriggers: z.array(TriggerSchema),\n\t\trequire: z\n\t\t\t.union([z.number().min(1), z.literal(\"any\"), z.literal(\"all\")])\n\t\t\t.default(\"all\"),\n\t\twithin: z.number().min(0).default(0),\n\t}),\n);\n\nexport const SequenceTriggerSchema: z.ZodType<\n\tSequenceTrigger,\n\tz.ZodTypeDef,\n\tSequenceTriggerInput\n> = z.lazy(() =>\n\tz.object({\n\t\ttype: z.literal(\"sequence\"),\n\t\ttriggers: z.array(TriggerSchema),\n\t\twithin: z.number().min(0).default(0),\n\t}),\n);\n\nexport const AutomationWizardSchema = z.object({\n\tname: z.string().min(1, \"Name is required\"),\n\tdescription: z.string().optional(),\n\ttriggerTemplate: TriggerTemplateSchema.optional(),\n\ttrigger: TriggerSchema,\n\tactions: z.array(\n\t\tz.union([\n\t\t\tDoNothingSchema,\n\t\t\tChangeFlowRunStateSchema,\n\t\t\tDeploymentsSchema,\n\t\t\tRunDeploymentsSchema,\n\t\t\tWorkPoolSchema,\n\t\t\tWorkQueueSchema,\n\t\t\tAutomationSchema,\n\t\t\tSendNotificationSchema,\n\t\t\tFlowRunSchema,\n\t\t]),\n\t),\n});\nexport type AutomationWizardSchema = z.infer<typeof AutomationWizardSchema>;\nexport type ActionsSchema = AutomationWizardSchema[\"actions\"][number];\nexport type ActionType = AutomationWizardSchema[\"actions\"][number][\"type\"];\n"],"names":["UNASSIGNED","DoNothingSchema","z.object","z.literal","FlowRunSchema","z.enum","ChangeFlowRunStateSchema","z.string","z.boolean","schema","RunDeploymentsSchema","z.record","z.unknown","DeploymentsSchema","WorkQueueSchema","WorkPoolSchema","AutomationSchema","SendNotificationSchema","TriggerTemplateSchema","TriggerPostureSchema","ResourceSpecificationSchema","z.union","z.array","EventTriggerSchema","z.number","TriggerSchema","z.lazy","CompoundTriggerSchema","SequenceTriggerSchema","AutomationWizardSchema"],"mappings":"gHACO,MAAMA,EAAa,aAGpBC,EAAkBC,EAAS,CAAE,KAAMC,EAAU,YAAY,CAAA,CAAG,EAE5DC,EAAgBF,EAAS,CAC9B,KAAMG,EAAO,CAAC,kBAAmB,mBAAoB,iBAAiB,CAAC,CACxE,CAAC,EAEKC,EAA2BJ,EACxB,CACP,KAAMC,EAAU,uBAAuB,EACvC,MAAOE,EAAO,CACb,YACA,UACA,YACA,UACA,SACA,YACA,aACA,UACA,QAAA,CACA,EACD,KAAME,EAAE,EAAS,SAAA,EACjB,QAASA,EAAE,EAAS,SAAA,EACpB,MAAOC,EAAE,EAAU,SAAA,CACpB,CAAC,EACA,UAAWC,IAAY,CACvB,GAAGA,EACH,MAAOA,EAAO,OAAS,EACxB,EAAE,EAEGC,EAAuBR,EACpB,CACP,KAAMC,EAAU,gBAAgB,EAChC,cAAeI,EAAE,EAAS,GAAGJ,EAAUH,CAAU,CAAC,EAClD,cAAeW,EAASC,EAAE,CAAS,EAAE,SAAA,EACrC,WAAYD,EAASC,EAAE,CAAS,EAAE,SAAA,CACnC,CAAC,EACA,UAAWH,IAAY,CACvB,GAAGA,EACH,GAAIA,EAAO,gBAAkBT,EACzB,CAAE,OAAQ,WAAY,cAAe,IAAA,EACrC,CAAE,OAAQ,WAAY,cAAeS,EAAO,aAAA,CACjD,EAAE,EAEGI,EAAoBX,EACjB,CACP,KAAMG,EAAO,CAAC,mBAAoB,mBAAmB,CAAC,EAEtD,cAAeE,EAAE,EAAS,GAAGJ,EAAUH,CAAU,CAAC,CACnD,CAAC,EACA,UAAWS,IAAY,CACvB,KAAMA,EAAO,KACb,GAAIA,EAAO,gBAAkBT,EACzB,CAAE,OAAQ,WAAY,cAAe,IAAA,EACrC,CAAE,OAAQ,WAAY,cAAeS,EAAO,aAAA,CACjD,EAAE,EAEGK,EAAkBZ,EACf,CACP,KA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