@lunora/studio 1.0.0-alpha.59 → 1.0.0-alpha.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -43
- package/dist/mount.js +1 -27
- package/dist/packem_chunks/ApiTab.js +1 -251
- package/dist/packem_chunks/AuditPanel.js +1 -200
- package/dist/packem_chunks/DeploymentHealthPanel.js +1 -664
- package/dist/packem_chunks/ExportImportPanel.js +3 -198
- package/dist/packem_chunks/FileBrowser.js +4 -2955
- package/dist/packem_chunks/FunctionRunner.js +1 -326
- package/dist/packem_chunks/FunctionStatsPanel.js +1 -377
- package/dist/packem_chunks/HealthPanel.js +1 -648
- package/dist/packem_chunks/InsightsPanel.js +1 -462
- package/dist/packem_chunks/LogsPanel.js +1 -1303
- package/dist/packem_chunks/MailPanel.js +2 -353
- package/dist/packem_chunks/MetricsPanel.js +1 -1960
- package/dist/packem_chunks/MigrationsPanel.js +1 -239
- package/dist/packem_chunks/NotificationsPanel.js +1 -306
- package/dist/packem_chunks/PitrPanel.js +1 -252
- package/dist/packem_chunks/SchemaViewer.js +1 -2512
- package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -95
- package/dist/packem_chunks/SettingsPanel.js +1 -391
- package/dist/packem_chunks/SqlEditorPanel.js +4 -2340
- package/dist/packem_chunks/TableEditor.js +1 -290
- package/dist/packem_chunks/agents-panel.js +1 -326
- package/dist/packem_chunks/analytics-panel.js +1 -261
- package/dist/packem_chunks/auth-audit-panel.js +1 -247
- package/dist/packem_chunks/auth-config-panel.js +1 -365
- package/dist/packem_chunks/auth-sessions-panel.js +1 -175
- package/dist/packem_chunks/containers-panel.js +1 -261
- package/dist/packem_chunks/dashboards-panel.js +1 -781
- package/dist/packem_chunks/fanout-panel.js +1 -482
- package/dist/packem_chunks/flags-panel.js +1 -176
- package/dist/packem_chunks/issues-panel.js +1 -427
- package/dist/packem_chunks/kv-browser.js +1 -1896
- package/dist/packem_chunks/log-drains-panel.js +4 -273
- package/dist/packem_chunks/organizations-panel.js +1 -3209
- package/dist/packem_chunks/payments-panel.js +1 -213
- package/dist/packem_chunks/permissions-panel.js +1 -805
- package/dist/packem_chunks/queues-panel.js +1 -1075
- package/dist/packem_chunks/rls-panel.js +1 -315
- package/dist/packem_chunks/schedule-panel.js +1 -831
- package/dist/packem_chunks/sparkline.js +1 -79
- package/dist/packem_chunks/storage-rules-panel.js +1 -140
- package/dist/packem_chunks/subscriptions-panel.js +1 -238
- package/dist/packem_chunks/sync-client-panel.js +1 -0
- package/dist/packem_chunks/traces-panel.js +1 -747
- package/dist/packem_chunks/users-panel.js +1 -1731
- package/dist/packem_chunks/vector-browser.js +1 -281
- package/dist/packem_chunks/workflows-panel.js +1 -562
- package/dist/packem_shared/ADMIN_FUNCTIONS-BYNSbBVE.js +1 -0
- package/dist/packem_shared/ApiDocsPanel-eJYZlylw.js +2 -0
- package/dist/packem_shared/ApiReferencePanel-C42v1jr6.js +1 -0
- package/dist/packem_shared/CommandPalette-CVIaY3j8.js +1 -0
- package/dist/packem_shared/ConfirmButton-CTL3f3kr.js +1 -0
- package/dist/packem_shared/ConnectionBadge-DOk0CQWo.js +1 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js +1 -0
- package/dist/packem_shared/DEFAULT_LOCALE-BZ4NojpD.js +1 -0
- package/dist/packem_shared/DataBrowser-B8J5lHjP.js +1 -0
- package/dist/packem_shared/DataFilters-Csb30F0C.js +1 -0
- package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +1 -0
- package/dist/packem_shared/GlobalDataBrowser-RLJ6NvOs.js +1 -0
- package/dist/packem_shared/HomePanel-DL1HupAN.js +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-sGsIgYWj.js +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
- package/dist/packem_shared/ScheduledJobs-DUbo6epc.js +1 -0
- package/dist/packem_shared/ShardInput-BVn2iCU0.js +1 -0
- package/dist/packem_shared/Studio-BWBclm_C.js +1 -0
- package/dist/packem_shared/StudioApp-BFm73yVr.js +1 -0
- package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +1 -0
- package/dist/packem_shared/advisor-view-DaCX9Jy5.js +1 -0
- package/dist/packem_shared/aggregateMetrics-BNfajLa2.js +1 -0
- package/dist/packem_shared/alert-CVcOFuDR.js +1 -0
- package/dist/packem_shared/badge-BbuuAio7.js +1 -0
- package/dist/packem_shared/bar-chart-AryFCeoa.js +9 -0
- package/dist/packem_shared/browser-storage-xjTyMKY0.js +1 -0
- package/dist/packem_shared/button-BkCrNcAs.js +1 -0
- package/dist/packem_shared/card-CIDGUN6K.js +1 -0
- package/dist/packem_shared/cf-links-gbDy51nR.js +1 -0
- package/dist/packem_shared/checkbox-StT4Gob6.js +1 -0
- package/dist/packem_shared/data-grid-BMBKzMEJ.js +1 -0
- package/dist/packem_shared/data-view-params-C8T3bW1z.js +1 -0
- package/dist/packem_shared/dropdown-menu-C3RQ_HlW.js +2 -0
- package/dist/packem_shared/empty-state-Cg7t_8qu.js +1 -0
- package/dist/packem_shared/error-alert-B59DnrDI.js +1 -0
- package/dist/packem_shared/grid-features-uZCUj955.js +6 -0
- package/dist/packem_shared/home-panel-B-8BCffw.js +3 -0
- package/dist/packem_shared/input-JHu63lTv.js +1 -0
- package/dist/packem_shared/internal-AtZ4bTal.js +2 -0
- package/dist/packem_shared/label-6uP1obNF.js +1 -0
- package/dist/packem_shared/live-status-CGW2JHf_.js +1 -0
- package/dist/packem_shared/log-fields-CoL3hsIQ.js +1 -0
- package/dist/packem_shared/modal-shell-CUwwWC2o.js +1 -0
- package/dist/packem_shared/reference-view-KvhektwF.js +12 -0
- package/dist/packem_shared/result-chart-CwKhhKM0.js +1 -0
- package/dist/packem_shared/scroll-area-DTEq6Jec.js +2 -0
- package/dist/packem_shared/select-Bul-DeII.js +2 -0
- package/dist/packem_shared/shard-history-DMEW5VBE.js +1 -0
- package/dist/packem_shared/skeleton-C1wQ9M5t.js +1 -0
- package/dist/packem_shared/sparkline-DtcZoU48.js +1 -0
- package/dist/packem_shared/storage-tier-DznqOf-q.js +1 -0
- package/dist/packem_shared/studio-BHA7hnI3.js +2 -0
- package/dist/packem_shared/table-DdJBrClo.js +2 -0
- package/dist/packem_shared/table-list-sidebar-CMCcNALK.js +1 -0
- package/dist/packem_shared/textarea-Bu2-jKAs.js +1 -0
- package/dist/packem_shared/trace-handoff-Dw7mwjxu.js +1 -0
- package/dist/packem_shared/use-admin-query-Di3fLE8H.js +1 -0
- package/dist/packem_shared/use-async-submit-H68GHPz8.js +1 -0
- package/dist/packem_shared/useDebounced-Ihdiid_k.js +1 -0
- package/dist/packem_shared/utils-bhneXptQ.js +1 -0
- package/dist/packem_shared/virtual-rect-1o1veP7R.js +1 -0
- package/dist/standalone/chunk-23HKRH5H.js +13 -0
- package/dist/standalone/chunk-2A4RKII2.js +1 -0
- package/dist/standalone/chunk-3DTM4GI5.js +1 -0
- package/dist/standalone/chunk-3MHKT76P.js +1 -0
- package/dist/standalone/chunk-46IB4C4Q.js +1 -0
- package/dist/standalone/chunk-4AYEV5UN.js +1 -0
- package/dist/standalone/chunk-4FNHHFWR.js +1 -0
- package/dist/standalone/chunk-6CLVIOCB.js +1 -0
- package/dist/standalone/chunk-6I62RSI5.js +1 -0
- package/dist/standalone/chunk-6OKDCV7J.js +1 -0
- package/dist/standalone/chunk-6P7HIPUE.js +1 -0
- package/dist/standalone/chunk-6UYILUSX.js +1 -0
- package/dist/standalone/chunk-725RLB7D.js +1 -0
- package/dist/standalone/chunk-7AZZ7OJO.js +1 -0
- package/dist/standalone/chunk-7CRLAMGB.js +1 -0
- package/dist/standalone/chunk-7Z5QEFR4.js +2 -0
- package/dist/standalone/chunk-AGVJJQFL.js +1 -0
- package/dist/standalone/chunk-AKTGRZXN.js +1 -0
- package/dist/standalone/chunk-BAIN7UJ4.js +1 -0
- package/dist/standalone/chunk-BHWSIIDT.js +1 -0
- package/dist/standalone/{chunk-L7SK4ZZD.js → chunk-C4O5UR4Y.js} +1 -1
- package/dist/standalone/chunk-C4VURT57.js +1 -0
- package/dist/standalone/chunk-CKO3F55C.js +4 -0
- package/dist/standalone/chunk-CVMRZUF5.js +4 -0
- package/dist/standalone/chunk-CWWGDW4V.js +1 -0
- package/dist/standalone/chunk-CYET4BRZ.js +1 -0
- package/dist/standalone/chunk-CZEUVNCQ.js +1 -0
- package/dist/standalone/chunk-FXFK4M4E.js +1 -0
- package/dist/standalone/chunk-FYAJPWE7.js +1 -0
- package/dist/standalone/chunk-GS7OBQO5.js +1 -0
- package/dist/standalone/chunk-GTXVH7I5.js +1 -0
- package/dist/standalone/chunk-H6SIM4BT.js +1 -0
- package/dist/standalone/chunk-H6WOFY6A.js +8 -0
- package/dist/standalone/chunk-HA34GYEX.js +1 -0
- package/dist/standalone/chunk-HMIOF5GV.js +1 -0
- package/dist/standalone/chunk-HY46NTNW.js +6 -0
- package/dist/standalone/chunk-IBCKC2BO.js +1 -0
- package/dist/standalone/chunk-ICKBVXPP.js +1 -0
- package/dist/standalone/chunk-IE4ROTQD.js +1 -0
- package/dist/standalone/chunk-IYYTWZ2E.js +2 -0
- package/dist/standalone/chunk-J2LMP2A7.js +1 -0
- package/dist/standalone/chunk-JC6WYIHM.js +1 -0
- package/dist/standalone/chunk-JKPK25JO.js +1 -0
- package/dist/standalone/chunk-JLFCXBNQ.js +1 -0
- package/dist/standalone/chunk-JRWBGR5B.js +1 -0
- package/dist/standalone/chunk-K5PFWU5J.js +1 -0
- package/dist/standalone/chunk-KJTLW5W2.js +11 -0
- package/dist/standalone/{chunk-HBGS4SEX.js → chunk-KLLYGWNF.js} +9 -9
- package/dist/standalone/chunk-KNN3ZEQ7.js +1 -0
- package/dist/standalone/{chunk-4QHKBC77.js → chunk-KOC5KV3E.js} +1 -1
- package/dist/standalone/chunk-KSRXMTBV.js +1 -0
- package/dist/standalone/chunk-KYCAYNXM.js +1 -0
- package/dist/standalone/chunk-KZ2YUNMR.js +1 -0
- package/dist/standalone/chunk-LKHUVEHX.js +1 -0
- package/dist/standalone/chunk-LPOKAJT4.js +4 -0
- package/dist/standalone/chunk-MZEK4SGD.js +1 -0
- package/dist/standalone/chunk-NCCUM26H.js +1 -0
- package/dist/standalone/chunk-O62HJZV3.js +1 -0
- package/dist/standalone/chunk-OTJOI23O.js +62 -0
- package/dist/standalone/chunk-P2NBOUGZ.js +1 -0
- package/dist/standalone/chunk-P4J6XNG3.js +1 -0
- package/dist/standalone/chunk-PGDWFWH5.js +1 -0
- package/dist/standalone/chunk-PR2SE2MD.js +1 -0
- package/dist/standalone/chunk-PTTDIYGP.js +1 -0
- package/dist/standalone/chunk-PWDMXMRD.js +1 -0
- package/dist/standalone/chunk-Q34MSC2F.js +1 -0
- package/dist/standalone/chunk-Q5WXTZWX.js +1 -0
- package/dist/standalone/chunk-QC5HCNJZ.js +4 -0
- package/dist/standalone/chunk-QJKRHZYV.js +1 -0
- package/dist/standalone/chunk-R43KHQDA.js +1 -0
- package/dist/standalone/chunk-RC2K5RBE.js +1 -0
- package/dist/standalone/chunk-RE6UWCMG.js +1 -0
- package/dist/standalone/chunk-RUP3M2GF.js +3 -0
- package/dist/standalone/chunk-SA6MBPBL.js +1 -0
- package/dist/standalone/{chunk-BJGBHGK3.js → chunk-SEDZDNQF.js} +1 -1
- package/dist/standalone/chunk-SKHEGARW.js +1 -0
- package/dist/standalone/chunk-SKJZDOHG.js +1 -0
- package/dist/standalone/chunk-SNDYNCAA.js +1 -0
- package/dist/standalone/chunk-SZUHZ2OG.js +1 -0
- package/dist/standalone/chunk-TAE2H7PU.js +1 -0
- package/dist/standalone/chunk-TEIBKU46.js +1 -0
- package/dist/standalone/chunk-TO6NLVFD.js +1 -0
- package/dist/standalone/chunk-TYTJDFX2.js +1 -0
- package/dist/standalone/{chunk-LXULVPEM.js → chunk-UDZY7MKE.js} +3 -3
- package/dist/standalone/chunk-UHHTEBC3.js +1 -0
- package/dist/standalone/chunk-UNDFOYRI.js +1 -0
- package/dist/standalone/chunk-UNN4CESU.js +1 -0
- package/dist/standalone/chunk-UNXX5GQH.js +1 -0
- package/dist/standalone/{chunk-ZHVTQ37P.js → chunk-UREY4GLG.js} +1 -1
- package/dist/standalone/chunk-UWF5DOGV.js +1 -0
- package/dist/standalone/chunk-UY2Y5CXB.js +1 -0
- package/dist/standalone/{chunk-VLXV72QE.js → chunk-UZYGEOWY.js} +1 -1
- package/dist/standalone/chunk-V66TSUKV.js +1 -0
- package/dist/standalone/chunk-VEFNSN7P.js +1 -0
- package/dist/standalone/chunk-VUJGR4PB.js +1 -0
- package/dist/standalone/chunk-VUXJER3D.js +1 -0
- package/dist/standalone/chunk-W572365D.js +1 -0
- package/dist/standalone/chunk-WYFLGXZ3.js +3 -0
- package/dist/standalone/chunk-XDKFPBIL.js +1 -0
- package/dist/standalone/chunk-XRKCGQM2.js +1 -0
- package/dist/standalone/chunk-YNBJ6ICE.js +1 -0
- package/dist/standalone/chunk-YQ5PILIJ.js +1 -0
- package/dist/standalone/chunk-YT7VXQVX.js +1 -0
- package/dist/standalone/chunk-Z7MUQMLE.js +1 -0
- package/dist/standalone/chunk-ZFWEPGWG.js +1 -0
- package/dist/standalone/chunk-ZMFZRGAN.js +1 -0
- package/dist/standalone/studio.js +9 -214
- package/package.json +4 -4
- package/dist/packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js +0 -62
- package/dist/packem_shared/ApiDocsPanel-DNDpeR5O.js +0 -842
- package/dist/packem_shared/ApiReferencePanel-ChlRsAXU.js +0 -230
- package/dist/packem_shared/CommandPalette-BpkopP5f.js +0 -373
- package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
- package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
- package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
- package/dist/packem_shared/DataBrowser-obTn4sKX.js +0 -4493
- package/dist/packem_shared/DataFilters-B1Q7mrt7.js +0 -253
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
- package/dist/packem_shared/GlobalDataBrowser-BCaohHZ5.js +0 -293
- package/dist/packem_shared/HomePanel-DCRj3hGB.js +0 -14
- package/dist/packem_shared/OpenRpcReferencePanel-CIeQE1aE.js +0 -192
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
- package/dist/packem_shared/ScheduledJobs-BQzQo84k.js +0 -262
- package/dist/packem_shared/ShardInput-CZnpHILL.js +0 -107
- package/dist/packem_shared/Studio-DnlPCbID.js +0 -16
- package/dist/packem_shared/StudioApp-CzqlB4zO.js +0 -708
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
- package/dist/packem_shared/advisor-view-D95sN-wO.js +0 -159
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
- package/dist/packem_shared/alert-CdAET2K_.js +0 -68
- package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
- package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
- package/dist/packem_shared/browser-storage-L4gOP5gJ.js +0 -105
- package/dist/packem_shared/button-BhsN2uZH.js +0 -49
- package/dist/packem_shared/card-F2vH_aj2.js +0 -175
- package/dist/packem_shared/cf-links-SIbyi4Y1.js +0 -8
- package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
- package/dist/packem_shared/data-grid-BywzWfek.js +0 -183
- package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
- package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
- package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
- package/dist/packem_shared/error-alert-D9uIFJUS.js +0 -114
- package/dist/packem_shared/grid-features-ZOLhHKrR.js +0 -809
- package/dist/packem_shared/home-panel-BRAA2UlM.js +0 -1889
- package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
- package/dist/packem_shared/internal-DzHCc2Rq.js +0 -131
- package/dist/packem_shared/label-D8ykjn5J.js +0 -46
- package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
- package/dist/packem_shared/log-fields-jEH83H2G.js +0 -18
- package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
- package/dist/packem_shared/reference-view-DfXN7oWP.js +0 -2127
- package/dist/packem_shared/result-chart-Bf9mbCIo.js +0 -119
- package/dist/packem_shared/scroll-area-DLhcy-ml.js +0 -93
- package/dist/packem_shared/select-D9OwHEch.js +0 -273
- package/dist/packem_shared/shard-history-AxiJ1WPP.js +0 -16
- package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
- package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
- package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
- package/dist/packem_shared/studio-8QSXbZ98.js +0 -4192
- package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
- package/dist/packem_shared/table-list-sidebar-gCE17v9B.js +0 -842
- package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
- package/dist/packem_shared/trace-handoff-CGolF3KS.js +0 -38
- package/dist/packem_shared/use-admin-query-C7JNuQp-.js +0 -106
- package/dist/packem_shared/use-async-submit-rnSk_jXl.js +0 -91
- package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
- package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
- package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
- package/dist/standalone/chunk-2K47A3P6.js +0 -1
- package/dist/standalone/chunk-2MLA6WFH.js +0 -1
- package/dist/standalone/chunk-2NGUNNGW.js +0 -1
- package/dist/standalone/chunk-2TJVFKD2.js +0 -1
- package/dist/standalone/chunk-2YTF6LJ6.js +0 -1
- package/dist/standalone/chunk-3GXGLNKW.js +0 -1
- package/dist/standalone/chunk-3HGNPZBN.js +0 -1
- package/dist/standalone/chunk-3LJEGSMK.js +0 -11
- package/dist/standalone/chunk-3OA7PECS.js +0 -6
- package/dist/standalone/chunk-4PC7IXNY.js +0 -1
- package/dist/standalone/chunk-56XQYNUJ.js +0 -1
- package/dist/standalone/chunk-5OIBXYZM.js +0 -1
- package/dist/standalone/chunk-5QT5JRXD.js +0 -3
- package/dist/standalone/chunk-6RLPR7PL.js +0 -1
- package/dist/standalone/chunk-6V74EUPK.js +0 -1
- package/dist/standalone/chunk-7EE33WLB.js +0 -1
- package/dist/standalone/chunk-7TJJXVSE.js +0 -1
- package/dist/standalone/chunk-AHILM3ZP.js +0 -1
- package/dist/standalone/chunk-AN4RKMKW.js +0 -1
- package/dist/standalone/chunk-APSSZB6Z.js +0 -1
- package/dist/standalone/chunk-AXNGWSBM.js +0 -1
- package/dist/standalone/chunk-AXZILWRM.js +0 -1
- package/dist/standalone/chunk-C7RHEBOH.js +0 -1
- package/dist/standalone/chunk-CKSHCYGC.js +0 -2
- package/dist/standalone/chunk-CSWIYOB3.js +0 -1
- package/dist/standalone/chunk-D3VAON25.js +0 -1
- package/dist/standalone/chunk-DDLQN67F.js +0 -1
- package/dist/standalone/chunk-DGHW5JG5.js +0 -1
- package/dist/standalone/chunk-DMCSOTAE.js +0 -3
- package/dist/standalone/chunk-E3BKETAS.js +0 -1
- package/dist/standalone/chunk-E3OXNN6O.js +0 -1
- package/dist/standalone/chunk-E6BOGDIS.js +0 -1
- package/dist/standalone/chunk-F2YMCQ6B.js +0 -1
- package/dist/standalone/chunk-F7GE4X2U.js +0 -1
- package/dist/standalone/chunk-FAVUOGJR.js +0 -1
- package/dist/standalone/chunk-FXP6256Q.js +0 -1
- package/dist/standalone/chunk-G6CTAYHJ.js +0 -1
- package/dist/standalone/chunk-GTM65MVX.js +0 -1
- package/dist/standalone/chunk-H42W62SE.js +0 -1
- package/dist/standalone/chunk-HTF5ZX4I.js +0 -8
- package/dist/standalone/chunk-HV7G6DFP.js +0 -5
- package/dist/standalone/chunk-I2PS4L74.js +0 -1
- package/dist/standalone/chunk-IYHPYY4A.js +0 -1
- package/dist/standalone/chunk-J6J54MBP.js +0 -1
- package/dist/standalone/chunk-J7OGP4NN.js +0 -1
- package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
- package/dist/standalone/chunk-JZLGLG4T.js +0 -1
- package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
- package/dist/standalone/chunk-KZ6INM5M.js +0 -1
- package/dist/standalone/chunk-L2LN3MK4.js +0 -4
- package/dist/standalone/chunk-LT3FH6MW.js +0 -1
- package/dist/standalone/chunk-LZUWZBPE.js +0 -1
- package/dist/standalone/chunk-M4JM3TOY.js +0 -1
- package/dist/standalone/chunk-MLA5ZAEB.js +0 -1
- package/dist/standalone/chunk-MRBI5HNQ.js +0 -1
- package/dist/standalone/chunk-N5XX4HOL.js +0 -6
- package/dist/standalone/chunk-N7SVJOHN.js +0 -1
- package/dist/standalone/chunk-NKFXMDOD.js +0 -1
- package/dist/standalone/chunk-NPSNKFHE.js +0 -1
- package/dist/standalone/chunk-O3NAGRTR.js +0 -1
- package/dist/standalone/chunk-O7FVPUCO.js +0 -1
- package/dist/standalone/chunk-OKQXTLFX.js +0 -1
- package/dist/standalone/chunk-OXHHSUXO.js +0 -1
- package/dist/standalone/chunk-QAFAJBAW.js +0 -1
- package/dist/standalone/chunk-QAIM6KWT.js +0 -1
- package/dist/standalone/chunk-QCPMTB6W.js +0 -1
- package/dist/standalone/chunk-QQ2LOSZL.js +0 -1
- package/dist/standalone/chunk-QVIPA6UJ.js +0 -1
- package/dist/standalone/chunk-QVUQXJCT.js +0 -4
- package/dist/standalone/chunk-R2GMHLJY.js +0 -1
- package/dist/standalone/chunk-RD5UG2YL.js +0 -1
- package/dist/standalone/chunk-RJTIP3WF.js +0 -1
- package/dist/standalone/chunk-RRCPZMC2.js +0 -22
- package/dist/standalone/chunk-SHERR7ZP.js +0 -1
- package/dist/standalone/chunk-SOC5CY3F.js +0 -1
- package/dist/standalone/chunk-SS7JLF2I.js +0 -4
- package/dist/standalone/chunk-SWWYUGPL.js +0 -2
- package/dist/standalone/chunk-TAD43CG5.js +0 -1
- package/dist/standalone/chunk-TTXRHJUP.js +0 -4
- package/dist/standalone/chunk-UK64ZSUW.js +0 -1
- package/dist/standalone/chunk-UKDHGVOC.js +0 -1
- package/dist/standalone/chunk-UPNTMJFF.js +0 -1
- package/dist/standalone/chunk-V43BLH4J.js +0 -1
- package/dist/standalone/chunk-VL23Y44O.js +0 -4
- package/dist/standalone/chunk-VXM5H542.js +0 -4
- package/dist/standalone/chunk-WMDH2CIZ.js +0 -1
- package/dist/standalone/chunk-WVTPZ6CM.js +0 -1
- package/dist/standalone/chunk-XN6QYJQ6.js +0 -13
- package/dist/standalone/chunk-XNJNSCLM.js +0 -1
- package/dist/standalone/chunk-Y4U6CC22.js +0 -1
- package/dist/standalone/chunk-Y572GMZE.js +0 -1
- package/dist/standalone/chunk-Y7PD5KP4.js +0 -76
- package/dist/standalone/chunk-YFIPHCEC.js +0 -1
- package/dist/standalone/chunk-YJXOWLFJ.js +0 -1
- package/dist/standalone/chunk-YNN6NFRZ.js +0 -1
- package/dist/standalone/chunk-YUGHRVPD.js +0 -1
- package/dist/standalone/chunk-ZIGWVHCS.js +0 -1
- package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
- package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
- /package/dist/standalone/{chunk-TEWVD66F.js → chunk-GXZAXNZI.js} +0 -0
|
@@ -1,1075 +1 @@
|
|
|
1
|
-
import { c } from 'react/compiler-runtime';
|
|
2
|
-
import { useLunora } from '@lunora/react';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { E as ErrorAlert } from '../packem_shared/error-alert-D9uIFJUS.js';
|
|
5
|
-
import { A as Alert } from '../packem_shared/alert-CdAET2K_.js';
|
|
6
|
-
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
7
|
-
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
8
|
-
import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
|
|
9
|
-
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
10
|
-
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
11
|
-
import { S as ScrollArea } from '../packem_shared/scroll-area-DLhcy-ml.js';
|
|
12
|
-
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
13
|
-
import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
|
|
14
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
|
|
15
|
-
import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
|
|
16
|
-
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
17
|
-
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
|
|
18
|
-
import { c as callOptions, e as errorMessage, a as adminRef, f as fireAndForget, i as formatTimestamp } from '../packem_shared/internal-DzHCc2Rq.js';
|
|
19
|
-
import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
|
|
20
|
-
|
|
21
|
-
const computeQueueReliability = (queues, messages) => {
|
|
22
|
-
const dlqTargets = new Set(queues.map((queue) => queue.deadLetterQueue).filter((name) => typeof name === "string" && name !== ""));
|
|
23
|
-
const queuesWithoutDlq = queues.filter((queue) => (queue.deadLetterQueue === void 0 || queue.deadLetterQueue === "") && !dlqTargets.has(queue.name));
|
|
24
|
-
const deadLetteredCount = messages.filter((message) => message.deadLettered).length;
|
|
25
|
-
return {
|
|
26
|
-
deadLetteredCount,
|
|
27
|
-
queuesWithoutDlq,
|
|
28
|
-
showReliabilityWarning: queuesWithoutDlq.length > 0 || deadLetteredCount > 0
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const DEFAULT_MESSAGE_LIMIT = 200;
|
|
33
|
-
const SEND_QUEUE_MESSAGE = adminRef(ADMIN_FUNCTIONS.sendQueueMessage);
|
|
34
|
-
const REPLAY_QUEUE_MESSAGE = adminRef(ADMIN_FUNCTIONS.replayQueueMessage);
|
|
35
|
-
const CLEAR_QUEUE_MESSAGES = adminRef(ADMIN_FUNCTIONS.clearQueueMessages);
|
|
36
|
-
const BODY_PREVIEW_MAX = 96;
|
|
37
|
-
const formatBody = (value) => {
|
|
38
|
-
if (value === void 0) {
|
|
39
|
-
return "—";
|
|
40
|
-
}
|
|
41
|
-
try {
|
|
42
|
-
return JSON.stringify(value);
|
|
43
|
-
} catch {
|
|
44
|
-
return "[unserializable]";
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
const truncate = (text) => text.length > BODY_PREVIEW_MAX ? `${text.slice(0, BODY_PREVIEW_MAX)}…` : text;
|
|
48
|
-
const outcomeVariant = (outcome) => {
|
|
49
|
-
if (outcome === "error") {
|
|
50
|
-
return "destructive";
|
|
51
|
-
}
|
|
52
|
-
if (outcome === "retry") {
|
|
53
|
-
return "outline";
|
|
54
|
-
}
|
|
55
|
-
return "secondary";
|
|
56
|
-
};
|
|
57
|
-
const tabLabel = (value, t) => {
|
|
58
|
-
if (value === "messages") {
|
|
59
|
-
return t("Messages");
|
|
60
|
-
}
|
|
61
|
-
if (value === "send") {
|
|
62
|
-
return t("Send");
|
|
63
|
-
}
|
|
64
|
-
return t("Declared");
|
|
65
|
-
};
|
|
66
|
-
const QueuesDeclaredTab = (t0) => {
|
|
67
|
-
const $ = c(11);
|
|
68
|
-
const {
|
|
69
|
-
loaded,
|
|
70
|
-
queues
|
|
71
|
-
} = t0;
|
|
72
|
-
const t = useT();
|
|
73
|
-
let t1;
|
|
74
|
-
if ($[0] !== t) {
|
|
75
|
-
t1 = t("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker.");
|
|
76
|
-
$[0] = t;
|
|
77
|
-
$[1] = t1;
|
|
78
|
-
} else {
|
|
79
|
-
t1 = $[1];
|
|
80
|
-
}
|
|
81
|
-
let t2;
|
|
82
|
-
if ($[2] !== t1) {
|
|
83
|
-
t2 = /* @__PURE__ */ jsxDEV("p", {
|
|
84
|
-
className: "text-sm text-muted-foreground",
|
|
85
|
-
children: t1
|
|
86
|
-
}, void 0, false);
|
|
87
|
-
$[2] = t1;
|
|
88
|
-
$[3] = t2;
|
|
89
|
-
} else {
|
|
90
|
-
t2 = $[3];
|
|
91
|
-
}
|
|
92
|
-
let t3;
|
|
93
|
-
if ($[4] !== loaded || $[5] !== queues || $[6] !== t) {
|
|
94
|
-
t3 = loaded && queues.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
95
|
-
description: t("No defineQueue is declared in lunora/queues.ts in this deployment. Add one to offload async work to a Cloudflare Queue."),
|
|
96
|
-
testId: "queues-empty",
|
|
97
|
-
title: t("No queues defined")
|
|
98
|
-
}, void 0, false) : /* @__PURE__ */ jsxDEV(Card, {
|
|
99
|
-
className: "overflow-hidden py-0",
|
|
100
|
-
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
101
|
-
className: "px-0",
|
|
102
|
-
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
103
|
-
"data-testid": "queues-table",
|
|
104
|
-
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
105
|
-
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
106
|
-
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
107
|
-
children: t("Export")
|
|
108
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
109
|
-
children: t("Queue")
|
|
110
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
111
|
-
children: t("Mode")
|
|
112
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
113
|
-
children: t("Binding")
|
|
114
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
115
|
-
children: t("Dead-letter")
|
|
116
|
-
}, void 0, false)]
|
|
117
|
-
}, void 0, true)
|
|
118
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
119
|
-
children: queues.map(_temp)
|
|
120
|
-
}, void 0, false)]
|
|
121
|
-
}, void 0, true)
|
|
122
|
-
}, void 0, false)
|
|
123
|
-
}, void 0, false);
|
|
124
|
-
$[4] = loaded;
|
|
125
|
-
$[5] = queues;
|
|
126
|
-
$[6] = t;
|
|
127
|
-
$[7] = t3;
|
|
128
|
-
} else {
|
|
129
|
-
t3 = $[7];
|
|
130
|
-
}
|
|
131
|
-
let t4;
|
|
132
|
-
if ($[8] !== t2 || $[9] !== t3) {
|
|
133
|
-
t4 = /* @__PURE__ */ jsxDEV("div", {
|
|
134
|
-
className: "flex flex-col gap-4",
|
|
135
|
-
"data-testid": "queues-declared",
|
|
136
|
-
children: [t2, t3]
|
|
137
|
-
}, void 0, true);
|
|
138
|
-
$[8] = t2;
|
|
139
|
-
$[9] = t3;
|
|
140
|
-
$[10] = t4;
|
|
141
|
-
} else {
|
|
142
|
-
t4 = $[10];
|
|
143
|
-
}
|
|
144
|
-
return t4;
|
|
145
|
-
};
|
|
146
|
-
const QueueLogRow = (t0) => {
|
|
147
|
-
const $ = c(67);
|
|
148
|
-
const {
|
|
149
|
-
message,
|
|
150
|
-
onReplay,
|
|
151
|
-
replayingId
|
|
152
|
-
} = t0;
|
|
153
|
-
const t = useT();
|
|
154
|
-
let T0;
|
|
155
|
-
let T1;
|
|
156
|
-
let t1;
|
|
157
|
-
let t2;
|
|
158
|
-
let t3;
|
|
159
|
-
let t4;
|
|
160
|
-
let t5;
|
|
161
|
-
let t6;
|
|
162
|
-
let t7;
|
|
163
|
-
let t8;
|
|
164
|
-
if ($[0] !== message.attempts || $[1] !== message.body || $[2] !== message.deadLettered || $[3] !== message.exportName || $[4] !== message.id || $[5] !== message.messageId || $[6] !== message.outcome || $[7] !== message.queue || $[8] !== t) {
|
|
165
|
-
const body = formatBody(message.body);
|
|
166
|
-
T1 = TableRow;
|
|
167
|
-
t4 = `queues-message-${message.id}`;
|
|
168
|
-
const t92 = message.exportName ?? message.queue;
|
|
169
|
-
if ($[19] !== t92) {
|
|
170
|
-
t5 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
171
|
-
className: "font-mono text-xs",
|
|
172
|
-
children: t92
|
|
173
|
-
}, void 0, false);
|
|
174
|
-
$[19] = t92;
|
|
175
|
-
$[20] = t5;
|
|
176
|
-
} else {
|
|
177
|
-
t5 = $[20];
|
|
178
|
-
}
|
|
179
|
-
if ($[21] !== message.messageId) {
|
|
180
|
-
t6 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
181
|
-
className: "max-w-[16ch] truncate font-mono text-xs text-muted-foreground",
|
|
182
|
-
title: message.messageId,
|
|
183
|
-
children: message.messageId
|
|
184
|
-
}, void 0, false);
|
|
185
|
-
$[21] = message.messageId;
|
|
186
|
-
$[22] = t6;
|
|
187
|
-
} else {
|
|
188
|
-
t6 = $[22];
|
|
189
|
-
}
|
|
190
|
-
if ($[23] !== message.attempts) {
|
|
191
|
-
t7 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
192
|
-
className: "font-mono text-xs tabular-nums",
|
|
193
|
-
children: message.attempts
|
|
194
|
-
}, void 0, false);
|
|
195
|
-
$[23] = message.attempts;
|
|
196
|
-
$[24] = t7;
|
|
197
|
-
} else {
|
|
198
|
-
t7 = $[24];
|
|
199
|
-
}
|
|
200
|
-
const t102 = `queues-outcome-${message.id}`;
|
|
201
|
-
let t112;
|
|
202
|
-
if ($[25] !== message.outcome) {
|
|
203
|
-
t112 = outcomeVariant(message.outcome);
|
|
204
|
-
$[25] = message.outcome;
|
|
205
|
-
$[26] = t112;
|
|
206
|
-
} else {
|
|
207
|
-
t112 = $[26];
|
|
208
|
-
}
|
|
209
|
-
let t122;
|
|
210
|
-
if ($[27] !== message.outcome || $[28] !== t102 || $[29] !== t112) {
|
|
211
|
-
t122 = /* @__PURE__ */ jsxDEV(Badge, {
|
|
212
|
-
"data-testid": t102,
|
|
213
|
-
variant: t112,
|
|
214
|
-
children: message.outcome
|
|
215
|
-
}, void 0, false);
|
|
216
|
-
$[27] = message.outcome;
|
|
217
|
-
$[28] = t102;
|
|
218
|
-
$[29] = t112;
|
|
219
|
-
$[30] = t122;
|
|
220
|
-
} else {
|
|
221
|
-
t122 = $[30];
|
|
222
|
-
}
|
|
223
|
-
let t132;
|
|
224
|
-
if ($[31] !== message.deadLettered || $[32] !== message.id || $[33] !== t) {
|
|
225
|
-
t132 = message.deadLettered && /* @__PURE__ */ jsxDEV(Badge, {
|
|
226
|
-
"data-testid": `queues-dlq-${message.id}`,
|
|
227
|
-
variant: "destructive",
|
|
228
|
-
children: t("DLQ")
|
|
229
|
-
}, void 0, false);
|
|
230
|
-
$[31] = message.deadLettered;
|
|
231
|
-
$[32] = message.id;
|
|
232
|
-
$[33] = t;
|
|
233
|
-
$[34] = t132;
|
|
234
|
-
} else {
|
|
235
|
-
t132 = $[34];
|
|
236
|
-
}
|
|
237
|
-
if ($[35] !== t122 || $[36] !== t132) {
|
|
238
|
-
t8 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
239
|
-
children: /* @__PURE__ */ jsxDEV("span", {
|
|
240
|
-
className: "inline-flex items-center gap-1",
|
|
241
|
-
children: [t122, t132]
|
|
242
|
-
}, void 0, true)
|
|
243
|
-
}, void 0, false);
|
|
244
|
-
$[35] = t122;
|
|
245
|
-
$[36] = t132;
|
|
246
|
-
$[37] = t8;
|
|
247
|
-
} else {
|
|
248
|
-
t8 = $[37];
|
|
249
|
-
}
|
|
250
|
-
T0 = TableCell;
|
|
251
|
-
t1 = "max-w-[32ch] truncate font-mono text-xs text-muted-foreground";
|
|
252
|
-
t2 = body;
|
|
253
|
-
t3 = truncate(body);
|
|
254
|
-
$[0] = message.attempts;
|
|
255
|
-
$[1] = message.body;
|
|
256
|
-
$[2] = message.deadLettered;
|
|
257
|
-
$[3] = message.exportName;
|
|
258
|
-
$[4] = message.id;
|
|
259
|
-
$[5] = message.messageId;
|
|
260
|
-
$[6] = message.outcome;
|
|
261
|
-
$[7] = message.queue;
|
|
262
|
-
$[8] = t;
|
|
263
|
-
$[9] = T0;
|
|
264
|
-
$[10] = T1;
|
|
265
|
-
$[11] = t1;
|
|
266
|
-
$[12] = t2;
|
|
267
|
-
$[13] = t3;
|
|
268
|
-
$[14] = t4;
|
|
269
|
-
$[15] = t5;
|
|
270
|
-
$[16] = t6;
|
|
271
|
-
$[17] = t7;
|
|
272
|
-
$[18] = t8;
|
|
273
|
-
} else {
|
|
274
|
-
T0 = $[9];
|
|
275
|
-
T1 = $[10];
|
|
276
|
-
t1 = $[11];
|
|
277
|
-
t2 = $[12];
|
|
278
|
-
t3 = $[13];
|
|
279
|
-
t4 = $[14];
|
|
280
|
-
t5 = $[15];
|
|
281
|
-
t6 = $[16];
|
|
282
|
-
t7 = $[17];
|
|
283
|
-
t8 = $[18];
|
|
284
|
-
}
|
|
285
|
-
let t9;
|
|
286
|
-
if ($[38] !== T0 || $[39] !== t1 || $[40] !== t2 || $[41] !== t3) {
|
|
287
|
-
t9 = /* @__PURE__ */ jsxDEV(T0, {
|
|
288
|
-
className: t1,
|
|
289
|
-
title: t2,
|
|
290
|
-
children: t3
|
|
291
|
-
}, void 0, false);
|
|
292
|
-
$[38] = T0;
|
|
293
|
-
$[39] = t1;
|
|
294
|
-
$[40] = t2;
|
|
295
|
-
$[41] = t3;
|
|
296
|
-
$[42] = t9;
|
|
297
|
-
} else {
|
|
298
|
-
t9 = $[42];
|
|
299
|
-
}
|
|
300
|
-
let t10;
|
|
301
|
-
if ($[43] !== message.capturedAt) {
|
|
302
|
-
t10 = formatTimestamp(message.capturedAt, "—");
|
|
303
|
-
$[43] = message.capturedAt;
|
|
304
|
-
$[44] = t10;
|
|
305
|
-
} else {
|
|
306
|
-
t10 = $[44];
|
|
307
|
-
}
|
|
308
|
-
let t11;
|
|
309
|
-
if ($[45] !== t10) {
|
|
310
|
-
t11 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
311
|
-
className: "text-xs text-muted-foreground tabular-nums",
|
|
312
|
-
children: t10
|
|
313
|
-
}, void 0, false);
|
|
314
|
-
$[45] = t10;
|
|
315
|
-
$[46] = t11;
|
|
316
|
-
} else {
|
|
317
|
-
t11 = $[46];
|
|
318
|
-
}
|
|
319
|
-
const t12 = `queues-replay-${message.id}`;
|
|
320
|
-
const t13 = replayingId !== null;
|
|
321
|
-
let t14;
|
|
322
|
-
if ($[47] !== message.id || $[48] !== replayingId || $[49] !== t) {
|
|
323
|
-
t14 = replayingId === message.id ? t("Replaying…") : t("Replay");
|
|
324
|
-
$[47] = message.id;
|
|
325
|
-
$[48] = replayingId;
|
|
326
|
-
$[49] = t;
|
|
327
|
-
$[50] = t14;
|
|
328
|
-
} else {
|
|
329
|
-
t14 = $[50];
|
|
330
|
-
}
|
|
331
|
-
let t15;
|
|
332
|
-
if ($[51] !== message.id || $[52] !== onReplay || $[53] !== t12 || $[54] !== t13 || $[55] !== t14) {
|
|
333
|
-
t15 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
334
|
-
children: /* @__PURE__ */ jsxDEV(Button, {
|
|
335
|
-
"data-id": message.id,
|
|
336
|
-
"data-testid": t12,
|
|
337
|
-
disabled: t13,
|
|
338
|
-
onClick: onReplay,
|
|
339
|
-
size: "xs",
|
|
340
|
-
type: "button",
|
|
341
|
-
variant: "outline",
|
|
342
|
-
children: t14
|
|
343
|
-
}, void 0, false)
|
|
344
|
-
}, void 0, false);
|
|
345
|
-
$[51] = message.id;
|
|
346
|
-
$[52] = onReplay;
|
|
347
|
-
$[53] = t12;
|
|
348
|
-
$[54] = t13;
|
|
349
|
-
$[55] = t14;
|
|
350
|
-
$[56] = t15;
|
|
351
|
-
} else {
|
|
352
|
-
t15 = $[56];
|
|
353
|
-
}
|
|
354
|
-
let t16;
|
|
355
|
-
if ($[57] !== T1 || $[58] !== t11 || $[59] !== t15 || $[60] !== t4 || $[61] !== t5 || $[62] !== t6 || $[63] !== t7 || $[64] !== t8 || $[65] !== t9) {
|
|
356
|
-
t16 = /* @__PURE__ */ jsxDEV(T1, {
|
|
357
|
-
"data-testid": t4,
|
|
358
|
-
children: [t5, t6, t7, t8, t9, t11, t15]
|
|
359
|
-
}, void 0, true);
|
|
360
|
-
$[57] = T1;
|
|
361
|
-
$[58] = t11;
|
|
362
|
-
$[59] = t15;
|
|
363
|
-
$[60] = t4;
|
|
364
|
-
$[61] = t5;
|
|
365
|
-
$[62] = t6;
|
|
366
|
-
$[63] = t7;
|
|
367
|
-
$[64] = t8;
|
|
368
|
-
$[65] = t9;
|
|
369
|
-
$[66] = t16;
|
|
370
|
-
} else {
|
|
371
|
-
t16 = $[66];
|
|
372
|
-
}
|
|
373
|
-
return t16;
|
|
374
|
-
};
|
|
375
|
-
const QueuesMessagesTab = (t0) => {
|
|
376
|
-
const $ = c(26);
|
|
377
|
-
const {
|
|
378
|
-
hasError,
|
|
379
|
-
messages,
|
|
380
|
-
onClear,
|
|
381
|
-
onReplay,
|
|
382
|
-
replayingId
|
|
383
|
-
} = t0;
|
|
384
|
-
const t = useT();
|
|
385
|
-
let t1;
|
|
386
|
-
if ($[0] !== t) {
|
|
387
|
-
t1 = t("Cloudflare Queues have no peek API, so this is what push consumers actually processed — not pending depth.");
|
|
388
|
-
$[0] = t;
|
|
389
|
-
$[1] = t1;
|
|
390
|
-
} else {
|
|
391
|
-
t1 = $[1];
|
|
392
|
-
}
|
|
393
|
-
let t2;
|
|
394
|
-
if ($[2] !== t1) {
|
|
395
|
-
t2 = /* @__PURE__ */ jsxDEV("p", {
|
|
396
|
-
className: "text-sm text-muted-foreground",
|
|
397
|
-
children: t1
|
|
398
|
-
}, void 0, false);
|
|
399
|
-
$[2] = t1;
|
|
400
|
-
$[3] = t2;
|
|
401
|
-
} else {
|
|
402
|
-
t2 = $[3];
|
|
403
|
-
}
|
|
404
|
-
const t3 = messages.length === 0;
|
|
405
|
-
let t4;
|
|
406
|
-
if ($[4] !== t) {
|
|
407
|
-
t4 = t("Clear log");
|
|
408
|
-
$[4] = t;
|
|
409
|
-
$[5] = t4;
|
|
410
|
-
} else {
|
|
411
|
-
t4 = $[5];
|
|
412
|
-
}
|
|
413
|
-
let t5;
|
|
414
|
-
if ($[6] !== onClear || $[7] !== t3 || $[8] !== t4) {
|
|
415
|
-
t5 = /* @__PURE__ */ jsxDEV(Button, {
|
|
416
|
-
className: "ml-auto",
|
|
417
|
-
"data-testid": "queues-clear",
|
|
418
|
-
disabled: t3,
|
|
419
|
-
onClick: onClear,
|
|
420
|
-
size: "sm",
|
|
421
|
-
type: "button",
|
|
422
|
-
variant: "outline",
|
|
423
|
-
children: t4
|
|
424
|
-
}, void 0, false);
|
|
425
|
-
$[6] = onClear;
|
|
426
|
-
$[7] = t3;
|
|
427
|
-
$[8] = t4;
|
|
428
|
-
$[9] = t5;
|
|
429
|
-
} else {
|
|
430
|
-
t5 = $[9];
|
|
431
|
-
}
|
|
432
|
-
let t6;
|
|
433
|
-
if ($[10] !== messages.length || $[11] !== t) {
|
|
434
|
-
t6 = messages.length > 0 && /* @__PURE__ */ jsxDEV(Badge, {
|
|
435
|
-
"data-testid": "queues-count",
|
|
436
|
-
variant: "secondary",
|
|
437
|
-
children: t("{count} messages", {
|
|
438
|
-
count: messages.length
|
|
439
|
-
})
|
|
440
|
-
}, void 0, false);
|
|
441
|
-
$[10] = messages.length;
|
|
442
|
-
$[11] = t;
|
|
443
|
-
$[12] = t6;
|
|
444
|
-
} else {
|
|
445
|
-
t6 = $[12];
|
|
446
|
-
}
|
|
447
|
-
let t7;
|
|
448
|
-
if ($[13] !== t2 || $[14] !== t5 || $[15] !== t6) {
|
|
449
|
-
t7 = /* @__PURE__ */ jsxDEV("div", {
|
|
450
|
-
className: "flex flex-wrap items-center gap-2",
|
|
451
|
-
children: [t2, t5, t6]
|
|
452
|
-
}, void 0, true);
|
|
453
|
-
$[13] = t2;
|
|
454
|
-
$[14] = t5;
|
|
455
|
-
$[15] = t6;
|
|
456
|
-
$[16] = t7;
|
|
457
|
-
} else {
|
|
458
|
-
t7 = $[16];
|
|
459
|
-
}
|
|
460
|
-
let t8;
|
|
461
|
-
if ($[17] !== hasError || $[18] !== messages || $[19] !== onReplay || $[20] !== replayingId || $[21] !== t) {
|
|
462
|
-
t8 = !hasError && messages.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
463
|
-
description: t("Consumed messages appear here once a push consumer processes a batch in dev. Send one from the Send tab to see it captured."),
|
|
464
|
-
testId: "queues-messages-empty",
|
|
465
|
-
title: t("No consumed messages yet.")
|
|
466
|
-
}, void 0, false) : /* @__PURE__ */ jsxDEV(Card, {
|
|
467
|
-
className: "overflow-hidden py-0",
|
|
468
|
-
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
469
|
-
className: "px-0",
|
|
470
|
-
children: /* @__PURE__ */ jsxDEV(ScrollArea, {
|
|
471
|
-
className: "max-h-[32rem]",
|
|
472
|
-
"data-testid": "queues-messages-scroll",
|
|
473
|
-
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
474
|
-
"data-testid": "queues-messages-table",
|
|
475
|
-
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
476
|
-
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
477
|
-
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
478
|
-
children: t("Export")
|
|
479
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
480
|
-
children: t("Message")
|
|
481
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
482
|
-
children: t("Attempts")
|
|
483
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
484
|
-
children: t("Outcome")
|
|
485
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
486
|
-
children: t("Body")
|
|
487
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
488
|
-
children: t("Captured")
|
|
489
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {}, void 0, false)]
|
|
490
|
-
}, void 0, true)
|
|
491
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
492
|
-
children: messages.map((message) => /* @__PURE__ */ jsxDEV(QueueLogRow, {
|
|
493
|
-
message,
|
|
494
|
-
onReplay,
|
|
495
|
-
replayingId
|
|
496
|
-
}, message.id, false))
|
|
497
|
-
}, void 0, false)]
|
|
498
|
-
}, void 0, true)
|
|
499
|
-
}, void 0, false)
|
|
500
|
-
}, void 0, false)
|
|
501
|
-
}, void 0, false);
|
|
502
|
-
$[17] = hasError;
|
|
503
|
-
$[18] = messages;
|
|
504
|
-
$[19] = onReplay;
|
|
505
|
-
$[20] = replayingId;
|
|
506
|
-
$[21] = t;
|
|
507
|
-
$[22] = t8;
|
|
508
|
-
} else {
|
|
509
|
-
t8 = $[22];
|
|
510
|
-
}
|
|
511
|
-
let t9;
|
|
512
|
-
if ($[23] !== t7 || $[24] !== t8) {
|
|
513
|
-
t9 = /* @__PURE__ */ jsxDEV("div", {
|
|
514
|
-
className: "flex flex-col gap-4",
|
|
515
|
-
"data-testid": "queues-messages",
|
|
516
|
-
children: [t7, t8]
|
|
517
|
-
}, void 0, true);
|
|
518
|
-
$[23] = t7;
|
|
519
|
-
$[24] = t8;
|
|
520
|
-
$[25] = t9;
|
|
521
|
-
} else {
|
|
522
|
-
t9 = $[25];
|
|
523
|
-
}
|
|
524
|
-
return t9;
|
|
525
|
-
};
|
|
526
|
-
const QueuesSendTab = (t0) => {
|
|
527
|
-
const $ = c(20);
|
|
528
|
-
const {
|
|
529
|
-
batchMode,
|
|
530
|
-
bodyText,
|
|
531
|
-
delayText,
|
|
532
|
-
onBatchModeChange,
|
|
533
|
-
onBodyChange,
|
|
534
|
-
onDelayChange,
|
|
535
|
-
onSelectExport,
|
|
536
|
-
onSend,
|
|
537
|
-
queues,
|
|
538
|
-
selectedExportName,
|
|
539
|
-
sending
|
|
540
|
-
} = t0;
|
|
541
|
-
const t = useT();
|
|
542
|
-
let t1;
|
|
543
|
-
if ($[0] !== t) {
|
|
544
|
-
t1 = t("Enqueue a JSON message to a declared producer to exercise its consumer. Nothing is captured until the consumer processes it.");
|
|
545
|
-
$[0] = t;
|
|
546
|
-
$[1] = t1;
|
|
547
|
-
} else {
|
|
548
|
-
t1 = $[1];
|
|
549
|
-
}
|
|
550
|
-
let t2;
|
|
551
|
-
if ($[2] !== t1) {
|
|
552
|
-
t2 = /* @__PURE__ */ jsxDEV("p", {
|
|
553
|
-
className: "text-sm text-muted-foreground",
|
|
554
|
-
children: t1
|
|
555
|
-
}, void 0, false);
|
|
556
|
-
$[2] = t1;
|
|
557
|
-
$[3] = t2;
|
|
558
|
-
} else {
|
|
559
|
-
t2 = $[3];
|
|
560
|
-
}
|
|
561
|
-
let t3;
|
|
562
|
-
if ($[4] !== batchMode || $[5] !== bodyText || $[6] !== delayText || $[7] !== onBatchModeChange || $[8] !== onBodyChange || $[9] !== onDelayChange || $[10] !== onSelectExport || $[11] !== onSend || $[12] !== queues || $[13] !== selectedExportName || $[14] !== sending || $[15] !== t) {
|
|
563
|
-
t3 = queues.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
564
|
-
description: t("Declare a queue with defineQueue in lunora/queues.ts to enqueue a test message."),
|
|
565
|
-
testId: "queues-send-empty",
|
|
566
|
-
title: t("No queues to send to")
|
|
567
|
-
}, void 0, false) : /* @__PURE__ */ jsxDEV(Fragment, {
|
|
568
|
-
children: [/* @__PURE__ */ jsxDEV("div", {
|
|
569
|
-
className: "flex flex-wrap items-center gap-2",
|
|
570
|
-
children: [/* @__PURE__ */ jsxDEV("select", {
|
|
571
|
-
"aria-label": t("Queue"),
|
|
572
|
-
className: "h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50",
|
|
573
|
-
"data-testid": "queues-send-select",
|
|
574
|
-
onChange: onSelectExport,
|
|
575
|
-
value: selectedExportName,
|
|
576
|
-
children: queues.map(_temp2)
|
|
577
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(Input, {
|
|
578
|
-
"aria-label": t("Delay (seconds)"),
|
|
579
|
-
className: "max-w-36",
|
|
580
|
-
"data-testid": "queues-send-delay",
|
|
581
|
-
min: 0,
|
|
582
|
-
onChange: onDelayChange,
|
|
583
|
-
placeholder: t("Delay (s)"),
|
|
584
|
-
type: "number",
|
|
585
|
-
value: delayText
|
|
586
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("label", {
|
|
587
|
-
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
588
|
-
htmlFor: "queues-send-batch",
|
|
589
|
-
children: [/* @__PURE__ */ jsxDEV("input", {
|
|
590
|
-
checked: batchMode,
|
|
591
|
-
"data-testid": "queues-send-batch",
|
|
592
|
-
id: "queues-send-batch",
|
|
593
|
-
onChange: onBatchModeChange,
|
|
594
|
-
type: "checkbox"
|
|
595
|
-
}, void 0, false), t("Send as batch (JSON array)")]
|
|
596
|
-
}, void 0, true), /* @__PURE__ */ jsxDEV(Button, {
|
|
597
|
-
className: "ml-auto",
|
|
598
|
-
"data-testid": "queues-send-button",
|
|
599
|
-
disabled: sending || selectedExportName === "",
|
|
600
|
-
onClick: onSend,
|
|
601
|
-
type: "button",
|
|
602
|
-
children: sending ? t("Sending…") : t("Send message")
|
|
603
|
-
}, void 0, false)]
|
|
604
|
-
}, void 0, true), /* @__PURE__ */ jsxDEV(Textarea, {
|
|
605
|
-
"aria-label": t("Message body (JSON)"),
|
|
606
|
-
className: "font-mono",
|
|
607
|
-
"data-testid": "queues-send-body",
|
|
608
|
-
onChange: onBodyChange,
|
|
609
|
-
placeholder: batchMode ? '[ { "hello": "world" } ]' : '{ "hello": "world" }',
|
|
610
|
-
value: bodyText
|
|
611
|
-
}, void 0, false)]
|
|
612
|
-
}, void 0, true);
|
|
613
|
-
$[4] = batchMode;
|
|
614
|
-
$[5] = bodyText;
|
|
615
|
-
$[6] = delayText;
|
|
616
|
-
$[7] = onBatchModeChange;
|
|
617
|
-
$[8] = onBodyChange;
|
|
618
|
-
$[9] = onDelayChange;
|
|
619
|
-
$[10] = onSelectExport;
|
|
620
|
-
$[11] = onSend;
|
|
621
|
-
$[12] = queues;
|
|
622
|
-
$[13] = selectedExportName;
|
|
623
|
-
$[14] = sending;
|
|
624
|
-
$[15] = t;
|
|
625
|
-
$[16] = t3;
|
|
626
|
-
} else {
|
|
627
|
-
t3 = $[16];
|
|
628
|
-
}
|
|
629
|
-
let t4;
|
|
630
|
-
if ($[17] !== t2 || $[18] !== t3) {
|
|
631
|
-
t4 = /* @__PURE__ */ jsxDEV("div", {
|
|
632
|
-
className: "flex flex-col gap-3",
|
|
633
|
-
"data-testid": "queues-send",
|
|
634
|
-
children: [t2, t3]
|
|
635
|
-
}, void 0, true);
|
|
636
|
-
$[17] = t2;
|
|
637
|
-
$[18] = t3;
|
|
638
|
-
$[19] = t4;
|
|
639
|
-
} else {
|
|
640
|
-
t4 = $[19];
|
|
641
|
-
}
|
|
642
|
-
return t4;
|
|
643
|
-
};
|
|
644
|
-
const QueuesPanel = (t0) => {
|
|
645
|
-
const $ = c(59);
|
|
646
|
-
const {
|
|
647
|
-
limit
|
|
648
|
-
} = t0;
|
|
649
|
-
const messageLimit = limit ?? DEFAULT_MESSAGE_LIMIT;
|
|
650
|
-
const client = useLunora();
|
|
651
|
-
const t = useT();
|
|
652
|
-
const [tab, setTab] = useState("declared");
|
|
653
|
-
const [actionError, setActionError] = useState(null);
|
|
654
|
-
let t1;
|
|
655
|
-
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
656
|
-
t1 = {};
|
|
657
|
-
$[0] = t1;
|
|
658
|
-
} else {
|
|
659
|
-
t1 = $[0];
|
|
660
|
-
}
|
|
661
|
-
const {
|
|
662
|
-
data: queuesData,
|
|
663
|
-
error: queuesError,
|
|
664
|
-
errorSource: queuesErrorSource
|
|
665
|
-
} = useAdminQuery(ADMIN_FUNCTIONS.listQueues, t1);
|
|
666
|
-
let t2;
|
|
667
|
-
if ($[1] !== messageLimit) {
|
|
668
|
-
t2 = {
|
|
669
|
-
limit: messageLimit
|
|
670
|
-
};
|
|
671
|
-
$[1] = messageLimit;
|
|
672
|
-
$[2] = t2;
|
|
673
|
-
} else {
|
|
674
|
-
t2 = $[2];
|
|
675
|
-
}
|
|
676
|
-
const {
|
|
677
|
-
data: messagesData,
|
|
678
|
-
error: messagesError,
|
|
679
|
-
errorSource: messagesErrorSource,
|
|
680
|
-
refetch: refetchMessages
|
|
681
|
-
} = useAdminQuery(ADMIN_FUNCTIONS.getQueueMessages, t2);
|
|
682
|
-
const queues = Array.isArray(queuesData?.queues) ? [...queuesData.queues].toSorted(_temp3) : [];
|
|
683
|
-
const messages = messagesData?.entries ?? [];
|
|
684
|
-
const {
|
|
685
|
-
deadLetteredCount,
|
|
686
|
-
queuesWithoutDlq,
|
|
687
|
-
showReliabilityWarning
|
|
688
|
-
} = computeQueueReliability(queues, messages);
|
|
689
|
-
const [selectedExport, setSelectedExport] = useState("");
|
|
690
|
-
const [bodyText, setBodyText] = useState("");
|
|
691
|
-
const [delayText, setDelayText] = useState("");
|
|
692
|
-
const [batchMode, setBatchMode] = useState(false);
|
|
693
|
-
const [sending, setSending] = useState(false);
|
|
694
|
-
const [replayingId, setReplayingId] = useState(null);
|
|
695
|
-
const selectedExportName = queues.some((queue) => queue.exportName === selectedExport) ? selectedExport : queues[0]?.exportName ?? "";
|
|
696
|
-
const readError = tab === "messages" ? messagesError : queuesError;
|
|
697
|
-
const readErrorSource = tab === "messages" ? messagesErrorSource : queuesErrorSource;
|
|
698
|
-
const error = readError ?? actionError;
|
|
699
|
-
const errorSource = readError === null ? actionError : readErrorSource;
|
|
700
|
-
let t3;
|
|
701
|
-
if ($[3] !== refetchMessages) {
|
|
702
|
-
t3 = () => {
|
|
703
|
-
refetchMessages();
|
|
704
|
-
};
|
|
705
|
-
$[3] = refetchMessages;
|
|
706
|
-
$[4] = t3;
|
|
707
|
-
} else {
|
|
708
|
-
t3 = $[4];
|
|
709
|
-
}
|
|
710
|
-
useAutoRefresh(t3, tab === "messages");
|
|
711
|
-
const send = async () => {
|
|
712
|
-
setActionError(null);
|
|
713
|
-
const exportName = selectedExportName;
|
|
714
|
-
if (exportName === "") {
|
|
715
|
-
return;
|
|
716
|
-
}
|
|
717
|
-
let body = null;
|
|
718
|
-
const trimmedBody = bodyText.trim();
|
|
719
|
-
if (trimmedBody !== "") {
|
|
720
|
-
try {
|
|
721
|
-
body = JSON.parse(trimmedBody);
|
|
722
|
-
} catch {
|
|
723
|
-
setActionError(t("Body must be valid JSON."));
|
|
724
|
-
return;
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
let delaySeconds;
|
|
728
|
-
const trimmedDelay = delayText.trim();
|
|
729
|
-
if (trimmedDelay !== "") {
|
|
730
|
-
const parsed = Number(trimmedDelay);
|
|
731
|
-
if (!Number.isFinite(parsed) || parsed < 0) {
|
|
732
|
-
setActionError(t("Delay must be a non-negative number of seconds."));
|
|
733
|
-
return;
|
|
734
|
-
}
|
|
735
|
-
delaySeconds = parsed;
|
|
736
|
-
}
|
|
737
|
-
if (batchMode && !Array.isArray(body)) {
|
|
738
|
-
setActionError(t("Batch mode needs a JSON array body — each element is enqueued as one message."));
|
|
739
|
-
return;
|
|
740
|
-
}
|
|
741
|
-
setSending(true);
|
|
742
|
-
const args = batchMode ? {
|
|
743
|
-
batch: body,
|
|
744
|
-
delaySeconds,
|
|
745
|
-
exportName
|
|
746
|
-
} : {
|
|
747
|
-
body,
|
|
748
|
-
delaySeconds,
|
|
749
|
-
exportName
|
|
750
|
-
};
|
|
751
|
-
try {
|
|
752
|
-
await client.query(SEND_QUEUE_MESSAGE, args, callOptions(""));
|
|
753
|
-
refetchMessages();
|
|
754
|
-
} catch (t4) {
|
|
755
|
-
const error_ = t4;
|
|
756
|
-
setActionError(errorMessage(error_));
|
|
757
|
-
}
|
|
758
|
-
setSending(false);
|
|
759
|
-
};
|
|
760
|
-
let t5;
|
|
761
|
-
if ($[5] !== client || $[6] !== refetchMessages) {
|
|
762
|
-
t5 = async (id) => {
|
|
763
|
-
setActionError(null);
|
|
764
|
-
setReplayingId(id);
|
|
765
|
-
try {
|
|
766
|
-
await client.query(REPLAY_QUEUE_MESSAGE, {
|
|
767
|
-
id
|
|
768
|
-
}, callOptions(""));
|
|
769
|
-
refetchMessages();
|
|
770
|
-
} catch (t62) {
|
|
771
|
-
const error__0 = t62;
|
|
772
|
-
setActionError(errorMessage(error__0));
|
|
773
|
-
}
|
|
774
|
-
setReplayingId(null);
|
|
775
|
-
};
|
|
776
|
-
$[5] = client;
|
|
777
|
-
$[6] = refetchMessages;
|
|
778
|
-
$[7] = t5;
|
|
779
|
-
} else {
|
|
780
|
-
t5 = $[7];
|
|
781
|
-
}
|
|
782
|
-
const replay = t5;
|
|
783
|
-
let t6;
|
|
784
|
-
if ($[8] !== client || $[9] !== refetchMessages) {
|
|
785
|
-
t6 = async () => {
|
|
786
|
-
setActionError(null);
|
|
787
|
-
try {
|
|
788
|
-
await client.query(CLEAR_QUEUE_MESSAGES, {}, callOptions(""));
|
|
789
|
-
refetchMessages();
|
|
790
|
-
} catch (t72) {
|
|
791
|
-
const error__1 = t72;
|
|
792
|
-
setActionError(errorMessage(error__1));
|
|
793
|
-
}
|
|
794
|
-
};
|
|
795
|
-
$[8] = client;
|
|
796
|
-
$[9] = refetchMessages;
|
|
797
|
-
$[10] = t6;
|
|
798
|
-
} else {
|
|
799
|
-
t6 = $[10];
|
|
800
|
-
}
|
|
801
|
-
const clearLog = t6;
|
|
802
|
-
let t7;
|
|
803
|
-
if ($[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
804
|
-
t7 = (event) => {
|
|
805
|
-
const next = event.currentTarget.dataset.tab;
|
|
806
|
-
if (next === "declared" || next === "messages" || next === "send") {
|
|
807
|
-
setTab(next);
|
|
808
|
-
}
|
|
809
|
-
};
|
|
810
|
-
$[11] = t7;
|
|
811
|
-
} else {
|
|
812
|
-
t7 = $[11];
|
|
813
|
-
}
|
|
814
|
-
const onSelectTab = t7;
|
|
815
|
-
let t8;
|
|
816
|
-
if ($[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
817
|
-
t8 = (event_0) => {
|
|
818
|
-
setSelectedExport(event_0.currentTarget.value);
|
|
819
|
-
};
|
|
820
|
-
$[12] = t8;
|
|
821
|
-
} else {
|
|
822
|
-
t8 = $[12];
|
|
823
|
-
}
|
|
824
|
-
const onSelectExport = t8;
|
|
825
|
-
let t9;
|
|
826
|
-
if ($[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
827
|
-
t9 = (event_1) => {
|
|
828
|
-
setBodyText(event_1.currentTarget.value);
|
|
829
|
-
};
|
|
830
|
-
$[13] = t9;
|
|
831
|
-
} else {
|
|
832
|
-
t9 = $[13];
|
|
833
|
-
}
|
|
834
|
-
const onBodyChange = t9;
|
|
835
|
-
let t10;
|
|
836
|
-
if ($[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
837
|
-
t10 = (event_2) => {
|
|
838
|
-
setDelayText(event_2.currentTarget.value);
|
|
839
|
-
};
|
|
840
|
-
$[14] = t10;
|
|
841
|
-
} else {
|
|
842
|
-
t10 = $[14];
|
|
843
|
-
}
|
|
844
|
-
const onDelayChange = t10;
|
|
845
|
-
let t11;
|
|
846
|
-
if ($[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
847
|
-
t11 = (event_3) => {
|
|
848
|
-
setBatchMode(event_3.currentTarget.checked);
|
|
849
|
-
};
|
|
850
|
-
$[15] = t11;
|
|
851
|
-
} else {
|
|
852
|
-
t11 = $[15];
|
|
853
|
-
}
|
|
854
|
-
const onBatchModeChange = t11;
|
|
855
|
-
let t12;
|
|
856
|
-
if ($[16] !== send) {
|
|
857
|
-
t12 = () => {
|
|
858
|
-
fireAndForget(send());
|
|
859
|
-
};
|
|
860
|
-
$[16] = send;
|
|
861
|
-
$[17] = t12;
|
|
862
|
-
} else {
|
|
863
|
-
t12 = $[17];
|
|
864
|
-
}
|
|
865
|
-
const onSend = t12;
|
|
866
|
-
let t13;
|
|
867
|
-
if ($[18] !== replay) {
|
|
868
|
-
t13 = (event_4) => {
|
|
869
|
-
const {
|
|
870
|
-
id: id_0
|
|
871
|
-
} = event_4.currentTarget.dataset;
|
|
872
|
-
if (id_0 !== void 0) {
|
|
873
|
-
fireAndForget(replay(id_0));
|
|
874
|
-
}
|
|
875
|
-
};
|
|
876
|
-
$[18] = replay;
|
|
877
|
-
$[19] = t13;
|
|
878
|
-
} else {
|
|
879
|
-
t13 = $[19];
|
|
880
|
-
}
|
|
881
|
-
const onReplay = t13;
|
|
882
|
-
let t14;
|
|
883
|
-
if ($[20] !== clearLog) {
|
|
884
|
-
t14 = () => {
|
|
885
|
-
fireAndForget(clearLog());
|
|
886
|
-
};
|
|
887
|
-
$[20] = clearLog;
|
|
888
|
-
$[21] = t14;
|
|
889
|
-
} else {
|
|
890
|
-
t14 = $[21];
|
|
891
|
-
}
|
|
892
|
-
const onClear = t14;
|
|
893
|
-
const t15 = "flex flex-col gap-6";
|
|
894
|
-
const t16 = "lunora-queues-panel";
|
|
895
|
-
let t17;
|
|
896
|
-
if ($[22] !== t || $[23] !== tab) {
|
|
897
|
-
t17 = /* @__PURE__ */ jsxDEV("div", {
|
|
898
|
-
className: "flex items-center gap-1",
|
|
899
|
-
"data-testid": "queues-tabs",
|
|
900
|
-
role: "tablist",
|
|
901
|
-
children: ["declared", "messages", "send"].map((value) => /* @__PURE__ */ jsxDEV(Button, {
|
|
902
|
-
"aria-selected": tab === value,
|
|
903
|
-
"data-tab": value,
|
|
904
|
-
"data-testid": `queues-tab-${value}`,
|
|
905
|
-
onClick: onSelectTab,
|
|
906
|
-
role: "tab",
|
|
907
|
-
size: "sm",
|
|
908
|
-
type: "button",
|
|
909
|
-
variant: tab === value ? "secondary" : "ghost",
|
|
910
|
-
children: tabLabel(value, t)
|
|
911
|
-
}, value, false))
|
|
912
|
-
}, void 0, false);
|
|
913
|
-
$[22] = t;
|
|
914
|
-
$[23] = tab;
|
|
915
|
-
$[24] = t17;
|
|
916
|
-
} else {
|
|
917
|
-
t17 = $[24];
|
|
918
|
-
}
|
|
919
|
-
let t18;
|
|
920
|
-
if ($[25] !== error || $[26] !== errorSource) {
|
|
921
|
-
t18 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
|
|
922
|
-
error: errorSource,
|
|
923
|
-
testId: "queues-error"
|
|
924
|
-
}, void 0, false);
|
|
925
|
-
$[25] = error;
|
|
926
|
-
$[26] = errorSource;
|
|
927
|
-
$[27] = t18;
|
|
928
|
-
} else {
|
|
929
|
-
t18 = $[27];
|
|
930
|
-
}
|
|
931
|
-
const t19 = showReliabilityWarning && /* @__PURE__ */ jsxDEV(Alert, {
|
|
932
|
-
icon: /* @__PURE__ */ jsxDEV("span", {
|
|
933
|
-
"aria-hidden": "true",
|
|
934
|
-
className: "text-base leading-none",
|
|
935
|
-
children: "⚠"
|
|
936
|
-
}, void 0, false),
|
|
937
|
-
testId: "queues-dlq-warning",
|
|
938
|
-
variant: "warning",
|
|
939
|
-
children: /* @__PURE__ */ jsxDEV("div", {
|
|
940
|
-
className: "flex flex-col gap-1",
|
|
941
|
-
children: [queuesWithoutDlq.length > 0 && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
942
|
-
children: [/* @__PURE__ */ jsxDEV("p", {
|
|
943
|
-
className: "font-medium",
|
|
944
|
-
children: t("No dead-letter queue on {queues}.", {
|
|
945
|
-
queues: queuesWithoutDlq.map(_temp4).join(", ")
|
|
946
|
-
})
|
|
947
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("p", {
|
|
948
|
-
className: "text-muted-foreground",
|
|
949
|
-
children: t("Exhausted messages are dropped after retries. Add a deadLetterQueue to capture them.")
|
|
950
|
-
}, void 0, false)]
|
|
951
|
-
}, void 0, true), deadLetteredCount > 0 && /* @__PURE__ */ jsxDEV("p", {
|
|
952
|
-
className: queuesWithoutDlq.length > 0 ? "text-muted-foreground" : "font-medium",
|
|
953
|
-
children: deadLetteredCount === 1 ? t("1 message was recently dead-lettered.") : t("{count} messages were recently dead-lettered.", {
|
|
954
|
-
count: deadLetteredCount
|
|
955
|
-
})
|
|
956
|
-
}, void 0, false)]
|
|
957
|
-
}, void 0, true)
|
|
958
|
-
}, void 0, false);
|
|
959
|
-
let t20;
|
|
960
|
-
if ($[28] !== queues || $[29] !== queuesData || $[30] !== tab) {
|
|
961
|
-
t20 = tab === "declared" && /* @__PURE__ */ jsxDEV(QueuesDeclaredTab, {
|
|
962
|
-
loaded: queuesData !== void 0,
|
|
963
|
-
queues
|
|
964
|
-
}, void 0, false);
|
|
965
|
-
$[28] = queues;
|
|
966
|
-
$[29] = queuesData;
|
|
967
|
-
$[30] = tab;
|
|
968
|
-
$[31] = t20;
|
|
969
|
-
} else {
|
|
970
|
-
t20 = $[31];
|
|
971
|
-
}
|
|
972
|
-
let t21;
|
|
973
|
-
if ($[32] !== messages || $[33] !== messagesError || $[34] !== onClear || $[35] !== onReplay || $[36] !== replayingId || $[37] !== tab) {
|
|
974
|
-
t21 = tab === "messages" && /* @__PURE__ */ jsxDEV(QueuesMessagesTab, {
|
|
975
|
-
hasError: messagesError !== null,
|
|
976
|
-
messages,
|
|
977
|
-
onClear,
|
|
978
|
-
onReplay,
|
|
979
|
-
replayingId
|
|
980
|
-
}, void 0, false);
|
|
981
|
-
$[32] = messages;
|
|
982
|
-
$[33] = messagesError;
|
|
983
|
-
$[34] = onClear;
|
|
984
|
-
$[35] = onReplay;
|
|
985
|
-
$[36] = replayingId;
|
|
986
|
-
$[37] = tab;
|
|
987
|
-
$[38] = t21;
|
|
988
|
-
} else {
|
|
989
|
-
t21 = $[38];
|
|
990
|
-
}
|
|
991
|
-
let t22;
|
|
992
|
-
if ($[39] !== batchMode || $[40] !== bodyText || $[41] !== delayText || $[42] !== onBatchModeChange || $[43] !== onBodyChange || $[44] !== onDelayChange || $[45] !== onSelectExport || $[46] !== onSend || $[47] !== queues || $[48] !== selectedExportName || $[49] !== sending || $[50] !== tab) {
|
|
993
|
-
t22 = tab === "send" && /* @__PURE__ */ jsxDEV(QueuesSendTab, {
|
|
994
|
-
batchMode,
|
|
995
|
-
bodyText,
|
|
996
|
-
delayText,
|
|
997
|
-
onBatchModeChange,
|
|
998
|
-
onBodyChange,
|
|
999
|
-
onDelayChange,
|
|
1000
|
-
onSelectExport,
|
|
1001
|
-
onSend,
|
|
1002
|
-
queues,
|
|
1003
|
-
selectedExportName,
|
|
1004
|
-
sending
|
|
1005
|
-
}, void 0, false);
|
|
1006
|
-
$[39] = batchMode;
|
|
1007
|
-
$[40] = bodyText;
|
|
1008
|
-
$[41] = delayText;
|
|
1009
|
-
$[42] = onBatchModeChange;
|
|
1010
|
-
$[43] = onBodyChange;
|
|
1011
|
-
$[44] = onDelayChange;
|
|
1012
|
-
$[45] = onSelectExport;
|
|
1013
|
-
$[46] = onSend;
|
|
1014
|
-
$[47] = queues;
|
|
1015
|
-
$[48] = selectedExportName;
|
|
1016
|
-
$[49] = sending;
|
|
1017
|
-
$[50] = tab;
|
|
1018
|
-
$[51] = t22;
|
|
1019
|
-
} else {
|
|
1020
|
-
t22 = $[51];
|
|
1021
|
-
}
|
|
1022
|
-
let t23;
|
|
1023
|
-
if ($[52] !== t17 || $[53] !== t18 || $[54] !== t19 || $[55] !== t20 || $[56] !== t21 || $[57] !== t22) {
|
|
1024
|
-
t23 = /* @__PURE__ */ jsxDEV("div", {
|
|
1025
|
-
className: t15,
|
|
1026
|
-
"data-testid": t16,
|
|
1027
|
-
children: [t17, t18, t19, t20, t21, t22]
|
|
1028
|
-
}, void 0, true);
|
|
1029
|
-
$[52] = t17;
|
|
1030
|
-
$[53] = t18;
|
|
1031
|
-
$[54] = t19;
|
|
1032
|
-
$[55] = t20;
|
|
1033
|
-
$[56] = t21;
|
|
1034
|
-
$[57] = t22;
|
|
1035
|
-
$[58] = t23;
|
|
1036
|
-
} else {
|
|
1037
|
-
t23 = $[58];
|
|
1038
|
-
}
|
|
1039
|
-
return t23;
|
|
1040
|
-
};
|
|
1041
|
-
function _temp(queue) {
|
|
1042
|
-
return /* @__PURE__ */ jsxDEV(TableRow, {
|
|
1043
|
-
"data-testid": `queues-row-${queue.exportName}`,
|
|
1044
|
-
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
1045
|
-
className: "font-mono text-xs",
|
|
1046
|
-
children: queue.exportName
|
|
1047
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1048
|
-
className: "font-mono text-xs text-muted-foreground",
|
|
1049
|
-
children: queue.name
|
|
1050
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1051
|
-
className: "font-mono text-xs text-muted-foreground",
|
|
1052
|
-
children: queue.mode
|
|
1053
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1054
|
-
className: "font-mono text-xs text-muted-foreground",
|
|
1055
|
-
children: queue.binding
|
|
1056
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1057
|
-
className: "font-mono text-xs text-muted-foreground",
|
|
1058
|
-
children: queue.deadLetterQueue ?? "—"
|
|
1059
|
-
}, void 0, false)]
|
|
1060
|
-
}, queue.exportName, true);
|
|
1061
|
-
}
|
|
1062
|
-
function _temp2(queue) {
|
|
1063
|
-
return /* @__PURE__ */ jsxDEV("option", {
|
|
1064
|
-
value: queue.exportName,
|
|
1065
|
-
children: queue.exportName
|
|
1066
|
-
}, queue.exportName, false);
|
|
1067
|
-
}
|
|
1068
|
-
function _temp3(a, b) {
|
|
1069
|
-
return a.exportName.localeCompare(b.exportName);
|
|
1070
|
-
}
|
|
1071
|
-
function _temp4(queue_0) {
|
|
1072
|
-
return queue_0.name;
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
export { QueuesPanel as default };
|
|
1
|
+
import{c as P}from"react/compiler-runtime";import{useLunora as He}from"@lunora/react";import{useState as _}from"react";import{E as Ve}from"../packem_shared/error-alert-B59DnrDI.js";import{A as Xe}from"../packem_shared/alert-CVcOFuDR.js";import{g as Qe}from"../packem_shared/badge-BbuuAio7.js";import{u as oe}from"../packem_shared/button-BkCrNcAs.js";import{c as ke,u as Oe}from"../packem_shared/card-CIDGUN6K.js";import{E as Ie}from"../packem_shared/empty-state-Cg7t_8qu.js";import{u as Ye}from"../packem_shared/input-JHu63lTv.js";import{p as Ze}from"../packem_shared/scroll-area-DTEq6Jec.js";import{n as Be,d as Je,m as de,p as $,f as Fe,u as w}from"../packem_shared/table-DdJBrClo.js";import{l as et}from"../packem_shared/textarea-Bu2-jKAs.js";import{K as De}from"../packem_shared/use-admin-query-Di3fLE8H.js";import{useAutoRefresh as tt}from"../packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js";import{useT as U}from"../packem_shared/DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as j}from"../packem_shared/ADMIN_FUNCTIONS-BYNSbBVE.js";import{c as $e,e as we,a as Ae,i as at,f as Ce}from"../packem_shared/internal-AtZ4bTal.js";import{jsx as a,jsxs as b,Fragment as We}from"react/jsx-runtime";const st=(r,e)=>{const t=new Set(r.map(s=>s.deadLetterQueue).filter(s=>typeof s=="string"&&s!=="")),u=r.filter(s=>(s.deadLetterQueue===void 0||s.deadLetterQueue==="")&&!t.has(s.name)),d=e.filter(s=>s.deadLettered).length;return{deadLetteredCount:d,queuesWithoutDlq:u,showReliabilityWarning:u.length>0||d>0}},rt=200,nt=Ae(j.sendQueueMessage),ot=Ae(j.replayQueueMessage),dt=Ae(j.clearQueueMessages),Re=96,lt=r=>{if(r===void 0)return"—";try{return JSON.stringify(r)}catch{return"[unserializable]"}},ut=r=>r.length>Re?`${r.slice(0,Re)}…`:r,ct=r=>r==="error"?"destructive":r==="retry"?"outline":"secondary",it=(r,e)=>e(r==="messages"?"Messages":r==="send"?"Send":"Declared"),mt=r=>{const e=P(11),{loaded:t,queues:u}=r,d=U();let s;e[0]!==d?(s=d("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker."),e[0]=d,e[1]=s):s=e[1];let o;e[2]!==s?(o=a("p",{className:"text-sm text-muted-foreground",children:s}),e[2]=s,e[3]=o):o=e[3];let n;e[4]!==t||e[5]!==u||e[6]!==d?(n=t&&u.length===0?a(Ie,{description:d("No defineQueue is declared in lunora/queues.ts in this deployment. Add one to offload async work to a Cloudflare Queue."),testId:"queues-empty",title:d("No queues defined")}):a(ke,{className:"overflow-hidden py-0",children:a(Oe,{className:"px-0",children:b(Be,{"data-testid":"queues-table",children:[a(Je,{children:b(de,{children:[a($,{children:d("Export")}),a($,{children:d("Queue")}),a($,{children:d("Mode")}),a($,{children:d("Binding")}),a($,{children:d("Dead-letter")})]})}),a(Fe,{children:u.map(ft)})]})})}),e[4]=t,e[5]=u,e[6]=d,e[7]=n):n=e[7];let h;return e[8]!==o||e[9]!==n?(h=b("div",{className:"flex flex-col gap-4","data-testid":"queues-declared",children:[o,n]}),e[8]=o,e[9]=n,e[10]=h):h=e[10],h},ht=r=>{const e=P(67),{message:t,onReplay:u,replayingId:d}=r,s=U();let o,n,h,i,y,p,x,l,m,g;if(e[0]!==t.attempts||e[1]!==t.body||e[2]!==t.deadLettered||e[3]!==t.exportName||e[4]!==t.id||e[5]!==t.messageId||e[6]!==t.outcome||e[7]!==t.queue||e[8]!==s){const J=lt(t.body);n=de,p=`queues-message-${t.id}`;const F=t.exportName??t.queue;e[19]!==F?(x=a(w,{className:"font-mono text-xs",children:F}),e[19]=F,e[20]=x):x=e[20],e[21]!==t.messageId?(l=a(w,{className:"max-w-[16ch] truncate font-mono text-xs text-muted-foreground",title:t.messageId,children:t.messageId}),e[21]=t.messageId,e[22]=l):l=e[22],e[23]!==t.attempts?(m=a(w,{className:"font-mono text-xs tabular-nums",children:t.attempts}),e[23]=t.attempts,e[24]=m):m=e[24];const E=`queues-outcome-${t.id}`;let L;e[25]!==t.outcome?(L=ct(t.outcome),e[25]=t.outcome,e[26]=L):L=e[26];let C;e[27]!==t.outcome||e[28]!==E||e[29]!==L?(C=a(Qe,{"data-testid":E,variant:L,children:t.outcome}),e[27]=t.outcome,e[28]=E,e[29]=L,e[30]=C):C=e[30];let M;e[31]!==t.deadLettered||e[32]!==t.id||e[33]!==s?(M=t.deadLettered&&a(Qe,{"data-testid":`queues-dlq-${t.id}`,variant:"destructive",children:s("DLQ")}),e[31]=t.deadLettered,e[32]=t.id,e[33]=s,e[34]=M):M=e[34],e[35]!==C||e[36]!==M?(g=a(w,{children:b("span",{className:"inline-flex items-center gap-1",children:[C,M]})}),e[35]=C,e[36]=M,e[37]=g):g=e[37],o=w,h="max-w-[32ch] truncate font-mono text-xs text-muted-foreground",i=J,y=ut(J),e[0]=t.attempts,e[1]=t.body,e[2]=t.deadLettered,e[3]=t.exportName,e[4]=t.id,e[5]=t.messageId,e[6]=t.outcome,e[7]=t.queue,e[8]=s,e[9]=o,e[10]=n,e[11]=h,e[12]=i,e[13]=y,e[14]=p,e[15]=x,e[16]=l,e[17]=m,e[18]=g}else o=e[9],n=e[10],h=e[11],i=e[12],y=e[13],p=e[14],x=e[15],l=e[16],m=e[17],g=e[18];let f;e[38]!==o||e[39]!==h||e[40]!==i||e[41]!==y?(f=a(o,{className:h,title:i,children:y}),e[38]=o,e[39]=h,e[40]=i,e[41]=y,e[42]=f):f=e[42];let q;e[43]!==t.capturedAt?(q=at(t.capturedAt,"—"),e[43]=t.capturedAt,e[44]=q):q=e[44];let N;e[45]!==q?(N=a(w,{className:"text-xs text-muted-foreground tabular-nums",children:q}),e[45]=q,e[46]=N):N=e[46];const S=`queues-replay-${t.id}`,A=d!==null;let Q;e[47]!==t.id||e[48]!==d||e[49]!==s?(Q=d===t.id?s("Replaying…"):s("Replay"),e[47]=t.id,e[48]=d,e[49]=s,e[50]=Q):Q=e[50];let I;e[51]!==t.id||e[52]!==u||e[53]!==S||e[54]!==A||e[55]!==Q?(I=a(w,{children:a(oe,{"data-id":t.id,"data-testid":S,disabled:A,onClick:u,size:"xs",type:"button",variant:"outline",children:Q})}),e[51]=t.id,e[52]=u,e[53]=S,e[54]=A,e[55]=Q,e[56]=I):I=e[56];let T;return e[57]!==n||e[58]!==N||e[59]!==I||e[60]!==p||e[61]!==x||e[62]!==l||e[63]!==m||e[64]!==g||e[65]!==f?(T=b(n,{"data-testid":p,children:[x,l,m,g,f,N,I]}),e[57]=n,e[58]=N,e[59]=I,e[60]=p,e[61]=x,e[62]=l,e[63]=m,e[64]=g,e[65]=f,e[66]=T):T=e[66],T},pt=r=>{const e=P(26),{hasError:t,messages:u,onClear:d,onReplay:s,replayingId:o}=r,n=U();let h;e[0]!==n?(h=n("Cloudflare Queues have no peek API, so this is what push consumers actually processed — not pending depth."),e[0]=n,e[1]=h):h=e[1];let i;e[2]!==h?(i=a("p",{className:"text-sm text-muted-foreground",children:h}),e[2]=h,e[3]=i):i=e[3];const y=u.length===0;let p;e[4]!==n?(p=n("Clear log"),e[4]=n,e[5]=p):p=e[5];let x;e[6]!==d||e[7]!==y||e[8]!==p?(x=a(oe,{className:"ml-auto","data-testid":"queues-clear",disabled:y,onClick:d,size:"sm",type:"button",variant:"outline",children:p}),e[6]=d,e[7]=y,e[8]=p,e[9]=x):x=e[9];let l;e[10]!==u.length||e[11]!==n?(l=u.length>0&&a(Qe,{"data-testid":"queues-count",variant:"secondary",children:n("{count} messages",{count:u.length})}),e[10]=u.length,e[11]=n,e[12]=l):l=e[12];let m;e[13]!==i||e[14]!==x||e[15]!==l?(m=b("div",{className:"flex flex-wrap items-center gap-2",children:[i,x,l]}),e[13]=i,e[14]=x,e[15]=l,e[16]=m):m=e[16];let g;e[17]!==t||e[18]!==u||e[19]!==s||e[20]!==o||e[21]!==n?(g=!t&&u.length===0?a(Ie,{description:n("Consumed messages appear here once a push consumer processes a batch in dev. Send one from the Send tab to see it captured."),testId:"queues-messages-empty",title:n("No consumed messages yet.")}):a(ke,{className:"overflow-hidden py-0",children:a(Oe,{className:"px-0",children:a(Ze,{className:"max-h-[32rem]","data-testid":"queues-messages-scroll",children:b(Be,{"data-testid":"queues-messages-table",children:[a(Je,{children:b(de,{children:[a($,{children:n("Export")}),a($,{children:n("Message")}),a($,{children:n("Attempts")}),a($,{children:n("Outcome")}),a($,{children:n("Body")}),a($,{children:n("Captured")}),a($,{})]})}),a(Fe,{children:u.map(q=>a(ht,{message:q,onReplay:s,replayingId:o},q.id))})]})})})}),e[17]=t,e[18]=u,e[19]=s,e[20]=o,e[21]=n,e[22]=g):g=e[22];let f;return e[23]!==m||e[24]!==g?(f=b("div",{className:"flex flex-col gap-4","data-testid":"queues-messages",children:[m,g]}),e[23]=m,e[24]=g,e[25]=f):f=e[25],f},gt=r=>{const e=P(20),{batchMode:t,bodyText:u,delayText:d,onBatchModeChange:s,onBodyChange:o,onDelayChange:n,onSelectExport:h,onSend:i,queues:y,selectedExportName:p,sending:x}=r,l=U();let m;e[0]!==l?(m=l("Enqueue a JSON message to a declared producer to exercise its consumer. Nothing is captured until the consumer processes it."),e[0]=l,e[1]=m):m=e[1];let g;e[2]!==m?(g=a("p",{className:"text-sm text-muted-foreground",children:m}),e[2]=m,e[3]=g):g=e[3];let f;e[4]!==t||e[5]!==u||e[6]!==d||e[7]!==s||e[8]!==o||e[9]!==n||e[10]!==h||e[11]!==i||e[12]!==y||e[13]!==p||e[14]!==x||e[15]!==l?(f=y.length===0?a(Ie,{description:l("Declare a queue with defineQueue in lunora/queues.ts to enqueue a test message."),testId:"queues-send-empty",title:l("No queues to send to")}):b(We,{children:[b("div",{className:"flex flex-wrap items-center gap-2",children:[a("select",{"aria-label":l("Queue"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"queues-send-select",onChange:h,value:p,children:y.map(xt)}),a(Ye,{"aria-label":l("Delay (seconds)"),className:"max-w-36","data-testid":"queues-send-delay",min:0,onChange:n,placeholder:l("Delay (s)"),type:"number",value:d}),b("label",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",htmlFor:"queues-send-batch",children:[a("input",{checked:t,"data-testid":"queues-send-batch",id:"queues-send-batch",onChange:s,type:"checkbox"}),l("Send as batch (JSON array)")]}),a(oe,{className:"ml-auto","data-testid":"queues-send-button",disabled:x||p==="",onClick:i,type:"button",children:l(x?"Sending…":"Send message")})]}),a(et,{"aria-label":l("Message body (JSON)"),className:"font-mono","data-testid":"queues-send-body",onChange:o,placeholder:t?'[ { "hello": "world" } ]':'{ "hello": "world" }',value:u})]}),e[4]=t,e[5]=u,e[6]=d,e[7]=s,e[8]=o,e[9]=n,e[10]=h,e[11]=i,e[12]=y,e[13]=p,e[14]=x,e[15]=l,e[16]=f):f=e[16];let q;return e[17]!==g||e[18]!==f?(q=b("div",{className:"flex flex-col gap-3","data-testid":"queues-send",children:[g,f]}),e[17]=g,e[18]=f,e[19]=q):q=e[19],q},Bt=r=>{const e=P(59),{limit:t}=r,u=t??rt,d=He(),s=U(),[o,n]=_("declared"),[h,i]=_(null);let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y={},e[0]=y):y=e[0];const{data:p,error:x,errorSource:l}=De(j.listQueues,y);let m;e[1]!==u?(m={limit:u},e[1]=u,e[2]=m):m=e[2];const{data:g,error:f,errorSource:q,refetch:N}=De(j.getQueueMessages,m),S=Array.isArray(p?.queues)?[...p.queues].toSorted(yt):[],A=g?.entries??[],{deadLetteredCount:Q,queuesWithoutDlq:I,showReliabilityWarning:T}=st(S,A),[J,F]=_(""),[E,L]=_(""),[C,M]=_(""),[W,ze]=_(!1),[le,Ee]=_(!1),[ue,Le]=_(null),G=S.some(c=>c.exportName===J)?J:S[0]?.exportName??"",Me=o==="messages"?f:x,je=o==="messages"?q:l,ce=Me??h,ie=Me===null?h:je;let K;e[3]!==N?(K=()=>{N()},e[3]=N,e[4]=K):K=e[4],tt(K,o==="messages");const me=async()=>{i(null);const c=G;if(c==="")return;let v=null;const _e=E.trim();if(_e!=="")try{v=JSON.parse(_e)}catch{i(s("Body must be valid JSON."));return}let Se;const Te=C.trim();if(Te!==""){const z=Number(Te);if(!Number.isFinite(z)||z<0){i(s("Delay must be a non-negative number of seconds."));return}Se=z}if(W&&!Array.isArray(v)){i(s("Batch mode needs a JSON array body — each element is enqueued as one message."));return}Ee(!0);const Ke=W?{batch:v,delaySeconds:Se,exportName:c}:{body:v,delaySeconds:Se,exportName:c};try{await d.query(nt,Ke,$e("")),N()}catch(z){i(we(z))}Ee(!1)};let H;e[5]!==d||e[6]!==N?(H=async c=>{i(null),Le(c);try{await d.query(ot,{id:c},$e("")),N()}catch(v){i(we(v))}Le(null)},e[5]=d,e[6]=N,e[7]=H):H=e[7];const he=H;let V;e[8]!==d||e[9]!==N?(V=async()=>{i(null);try{await d.query(dt,{},$e("")),N()}catch(c){i(we(c))}},e[8]=d,e[9]=N,e[10]=V):V=e[10];const pe=V;let X;e[11]===Symbol.for("react.memo_cache_sentinel")?(X=c=>{const v=c.currentTarget.dataset.tab;(v==="declared"||v==="messages"||v==="send")&&n(v)},e[11]=X):X=e[11];const Pe=X;let Y;e[12]===Symbol.for("react.memo_cache_sentinel")?(Y=c=>{F(c.currentTarget.value)},e[12]=Y):Y=e[12];const ge=Y;let Z;e[13]===Symbol.for("react.memo_cache_sentinel")?(Z=c=>{L(c.currentTarget.value)},e[13]=Z):Z=e[13];const fe=Z;let ee;e[14]===Symbol.for("react.memo_cache_sentinel")?(ee=c=>{M(c.currentTarget.value)},e[14]=ee):ee=e[14];const xe=ee;let te;e[15]===Symbol.for("react.memo_cache_sentinel")?(te=c=>{ze(c.currentTarget.checked)},e[15]=te):te=e[15];const ye=te;let ae;e[16]!==me?(ae=()=>{Ce(me())},e[16]=me,e[17]=ae):ae=e[17];const Ne=ae;let se;e[18]!==he?(se=c=>{const{id:v}=c.currentTarget.dataset;v!==void 0&&Ce(he(v))},e[18]=he,e[19]=se):se=e[19];const be=se;let re;e[20]!==pe?(re=()=>{Ce(pe())},e[20]=pe,e[21]=re):re=e[21];const qe=re,Ue="flex flex-col gap-6",Ge="lunora-queues-panel";let D;e[22]!==s||e[23]!==o?(D=a("div",{className:"flex items-center gap-1","data-testid":"queues-tabs",role:"tablist",children:["declared","messages","send"].map(c=>a(oe,{"aria-selected":o===c,"data-tab":c,"data-testid":`queues-tab-${c}`,onClick:Pe,role:"tab",size:"sm",type:"button",variant:o===c?"secondary":"ghost",children:it(c,s)},c))}),e[22]=s,e[23]=o,e[24]=D):D=e[24];let R;e[25]!==ce||e[26]!==ie?(R=ce!==null&&a(Ve,{error:ie,testId:"queues-error"}),e[25]=ce,e[26]=ie,e[27]=R):R=e[27];const ve=T&&a(Xe,{icon:a("span",{"aria-hidden":"true",className:"text-base leading-none",children:"⚠"}),testId:"queues-dlq-warning",variant:"warning",children:b("div",{className:"flex flex-col gap-1",children:[I.length>0&&b(We,{children:[a("p",{className:"font-medium",children:s("No dead-letter queue on {queues}.",{queues:I.map(Nt).join(", ")})}),a("p",{className:"text-muted-foreground",children:s("Exhausted messages are dropped after retries. Add a deadLetterQueue to capture them.")})]}),Q>0&&a("p",{className:I.length>0?"text-muted-foreground":"font-medium",children:Q===1?s("1 message was recently dead-lettered."):s("{count} messages were recently dead-lettered.",{count:Q})})]})});let k;e[28]!==S||e[29]!==p||e[30]!==o?(k=o==="declared"&&a(mt,{loaded:p!==void 0,queues:S}),e[28]=S,e[29]=p,e[30]=o,e[31]=k):k=e[31];let O;e[32]!==A||e[33]!==f||e[34]!==qe||e[35]!==be||e[36]!==ue||e[37]!==o?(O=o==="messages"&&a(pt,{hasError:f!==null,messages:A,onClear:qe,onReplay:be,replayingId:ue}),e[32]=A,e[33]=f,e[34]=qe,e[35]=be,e[36]=ue,e[37]=o,e[38]=O):O=e[38];let B;e[39]!==W||e[40]!==E||e[41]!==C||e[42]!==ye||e[43]!==fe||e[44]!==xe||e[45]!==ge||e[46]!==Ne||e[47]!==S||e[48]!==G||e[49]!==le||e[50]!==o?(B=o==="send"&&a(gt,{batchMode:W,bodyText:E,delayText:C,onBatchModeChange:ye,onBodyChange:fe,onDelayChange:xe,onSelectExport:ge,onSend:Ne,queues:S,selectedExportName:G,sending:le}),e[39]=W,e[40]=E,e[41]=C,e[42]=ye,e[43]=fe,e[44]=xe,e[45]=ge,e[46]=Ne,e[47]=S,e[48]=G,e[49]=le,e[50]=o,e[51]=B):B=e[51];let ne;return e[52]!==D||e[53]!==R||e[54]!==ve||e[55]!==k||e[56]!==O||e[57]!==B?(ne=b("div",{className:Ue,"data-testid":Ge,children:[D,R,ve,k,O,B]}),e[52]=D,e[53]=R,e[54]=ve,e[55]=k,e[56]=O,e[57]=B,e[58]=ne):ne=e[58],ne};function ft(r){return b(de,{"data-testid":`queues-row-${r.exportName}`,children:[a(w,{className:"font-mono text-xs",children:r.exportName}),a(w,{className:"font-mono text-xs text-muted-foreground",children:r.name}),a(w,{className:"font-mono text-xs text-muted-foreground",children:r.mode}),a(w,{className:"font-mono text-xs text-muted-foreground",children:r.binding}),a(w,{className:"font-mono text-xs text-muted-foreground",children:r.deadLetterQueue??"—"})]},r.exportName)}function xt(r){return a("option",{value:r.exportName,children:r.exportName},r.exportName)}function yt(r,e){return r.exportName.localeCompare(e.exportName)}function Nt(r){return r.name}export{Bt as default};
|