@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,482 +1 @@
|
|
|
1
|
-
import { c } from
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { E as ErrorAlert } from '../packem_shared/error-alert-D9uIFJUS.js';
|
|
4
|
-
import { ShardInput } from '../packem_shared/ShardInput-CZnpHILL.js';
|
|
5
|
-
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
6
|
-
import { C as Card } from '../packem_shared/card-F2vH_aj2.js';
|
|
7
|
-
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
8
|
-
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';
|
|
9
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
|
|
10
|
-
import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
|
|
11
|
-
import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
|
|
12
|
-
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
13
|
-
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
|
|
14
|
-
import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
|
|
15
|
-
|
|
16
|
-
const formatMs = (ms) => `${ms.toString()} ms`;
|
|
17
|
-
const isFanoutIdle = (result) => result.totalConnections === 0 && result.shapePoke.passes === 0 && result.whisper.passes === 0;
|
|
18
|
-
const StatCard = (t0) => {
|
|
19
|
-
const $ = c(8);
|
|
20
|
-
const {
|
|
21
|
-
label,
|
|
22
|
-
testId,
|
|
23
|
-
value
|
|
24
|
-
} = t0;
|
|
25
|
-
let t1;
|
|
26
|
-
if ($[0] !== label) {
|
|
27
|
-
t1 = /* @__PURE__ */ jsxDEV("span", {
|
|
28
|
-
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
29
|
-
children: label
|
|
30
|
-
}, void 0, false);
|
|
31
|
-
$[0] = label;
|
|
32
|
-
$[1] = t1;
|
|
33
|
-
} else {
|
|
34
|
-
t1 = $[1];
|
|
35
|
-
}
|
|
36
|
-
let t2;
|
|
37
|
-
if ($[2] !== testId || $[3] !== value) {
|
|
38
|
-
t2 = /* @__PURE__ */ jsxDEV("span", {
|
|
39
|
-
className: "truncate text-2xl font-semibold tabular-nums text-foreground",
|
|
40
|
-
"data-testid": testId,
|
|
41
|
-
children: value
|
|
42
|
-
}, void 0, false);
|
|
43
|
-
$[2] = testId;
|
|
44
|
-
$[3] = value;
|
|
45
|
-
$[4] = t2;
|
|
46
|
-
} else {
|
|
47
|
-
t2 = $[4];
|
|
48
|
-
}
|
|
49
|
-
let t3;
|
|
50
|
-
if ($[5] !== t1 || $[6] !== t2) {
|
|
51
|
-
t3 = /* @__PURE__ */ jsxDEV(Card, {
|
|
52
|
-
className: "gap-0 py-0",
|
|
53
|
-
children: /* @__PURE__ */ jsxDEV("div", {
|
|
54
|
-
className: "flex flex-col gap-2.5 p-4",
|
|
55
|
-
children: [t1, t2]
|
|
56
|
-
}, void 0, true)
|
|
57
|
-
}, void 0, false);
|
|
58
|
-
$[5] = t1;
|
|
59
|
-
$[6] = t2;
|
|
60
|
-
$[7] = t3;
|
|
61
|
-
} else {
|
|
62
|
-
t3 = $[7];
|
|
63
|
-
}
|
|
64
|
-
return t3;
|
|
65
|
-
};
|
|
66
|
-
const PathCounters = (t0) => {
|
|
67
|
-
const $ = c(48);
|
|
68
|
-
const {
|
|
69
|
-
counters,
|
|
70
|
-
includeTiming,
|
|
71
|
-
prefix,
|
|
72
|
-
t,
|
|
73
|
-
title
|
|
74
|
-
} = t0;
|
|
75
|
-
const t1 = `${prefix}-section`;
|
|
76
|
-
let t2;
|
|
77
|
-
if ($[0] !== title) {
|
|
78
|
-
t2 = /* @__PURE__ */ jsxDEV("h3", {
|
|
79
|
-
className: "text-sm font-medium text-foreground",
|
|
80
|
-
children: title
|
|
81
|
-
}, void 0, false);
|
|
82
|
-
$[0] = title;
|
|
83
|
-
$[1] = t2;
|
|
84
|
-
} else {
|
|
85
|
-
t2 = $[1];
|
|
86
|
-
}
|
|
87
|
-
const t3 = `${prefix}-stats`;
|
|
88
|
-
let t4;
|
|
89
|
-
if ($[2] !== t) {
|
|
90
|
-
t4 = t("Passes");
|
|
91
|
-
$[2] = t;
|
|
92
|
-
$[3] = t4;
|
|
93
|
-
} else {
|
|
94
|
-
t4 = $[3];
|
|
95
|
-
}
|
|
96
|
-
const t5 = `${prefix}-passes`;
|
|
97
|
-
let t6;
|
|
98
|
-
if ($[4] !== counters.passes || $[5] !== t4 || $[6] !== t5) {
|
|
99
|
-
t6 = /* @__PURE__ */ jsxDEV(StatCard, {
|
|
100
|
-
label: t4,
|
|
101
|
-
testId: t5,
|
|
102
|
-
value: counters.passes
|
|
103
|
-
}, void 0, false);
|
|
104
|
-
$[4] = counters.passes;
|
|
105
|
-
$[5] = t4;
|
|
106
|
-
$[6] = t5;
|
|
107
|
-
$[7] = t6;
|
|
108
|
-
} else {
|
|
109
|
-
t6 = $[7];
|
|
110
|
-
}
|
|
111
|
-
let t7;
|
|
112
|
-
if ($[8] !== t) {
|
|
113
|
-
t7 = t("Sockets iterated");
|
|
114
|
-
$[8] = t;
|
|
115
|
-
$[9] = t7;
|
|
116
|
-
} else {
|
|
117
|
-
t7 = $[9];
|
|
118
|
-
}
|
|
119
|
-
const t8 = `${prefix}-iterated`;
|
|
120
|
-
let t9;
|
|
121
|
-
if ($[10] !== counters.socketsIterated || $[11] !== t7 || $[12] !== t8) {
|
|
122
|
-
t9 = /* @__PURE__ */ jsxDEV(StatCard, {
|
|
123
|
-
label: t7,
|
|
124
|
-
testId: t8,
|
|
125
|
-
value: counters.socketsIterated
|
|
126
|
-
}, void 0, false);
|
|
127
|
-
$[10] = counters.socketsIterated;
|
|
128
|
-
$[11] = t7;
|
|
129
|
-
$[12] = t8;
|
|
130
|
-
$[13] = t9;
|
|
131
|
-
} else {
|
|
132
|
-
t9 = $[13];
|
|
133
|
-
}
|
|
134
|
-
let t10;
|
|
135
|
-
if ($[14] !== t) {
|
|
136
|
-
t10 = t("Delivered");
|
|
137
|
-
$[14] = t;
|
|
138
|
-
$[15] = t10;
|
|
139
|
-
} else {
|
|
140
|
-
t10 = $[15];
|
|
141
|
-
}
|
|
142
|
-
const t11 = `${prefix}-delivered`;
|
|
143
|
-
let t12;
|
|
144
|
-
if ($[16] !== counters.socketsDelivered || $[17] !== t10 || $[18] !== t11) {
|
|
145
|
-
t12 = /* @__PURE__ */ jsxDEV(StatCard, {
|
|
146
|
-
label: t10,
|
|
147
|
-
testId: t11,
|
|
148
|
-
value: counters.socketsDelivered
|
|
149
|
-
}, void 0, false);
|
|
150
|
-
$[16] = counters.socketsDelivered;
|
|
151
|
-
$[17] = t10;
|
|
152
|
-
$[18] = t11;
|
|
153
|
-
$[19] = t12;
|
|
154
|
-
} else {
|
|
155
|
-
t12 = $[19];
|
|
156
|
-
}
|
|
157
|
-
let t13;
|
|
158
|
-
if ($[20] !== t) {
|
|
159
|
-
t13 = t("Peak width");
|
|
160
|
-
$[20] = t;
|
|
161
|
-
$[21] = t13;
|
|
162
|
-
} else {
|
|
163
|
-
t13 = $[21];
|
|
164
|
-
}
|
|
165
|
-
const t14 = `${prefix}-peak`;
|
|
166
|
-
let t15;
|
|
167
|
-
if ($[22] !== counters.peakSocketsIterated || $[23] !== t13 || $[24] !== t14) {
|
|
168
|
-
t15 = /* @__PURE__ */ jsxDEV(StatCard, {
|
|
169
|
-
label: t13,
|
|
170
|
-
testId: t14,
|
|
171
|
-
value: counters.peakSocketsIterated
|
|
172
|
-
}, void 0, false);
|
|
173
|
-
$[22] = counters.peakSocketsIterated;
|
|
174
|
-
$[23] = t13;
|
|
175
|
-
$[24] = t14;
|
|
176
|
-
$[25] = t15;
|
|
177
|
-
} else {
|
|
178
|
-
t15 = $[25];
|
|
179
|
-
}
|
|
180
|
-
let t16;
|
|
181
|
-
if ($[26] !== counters.totalMs || $[27] !== includeTiming || $[28] !== prefix || $[29] !== t) {
|
|
182
|
-
t16 = includeTiming && /* @__PURE__ */ jsxDEV(StatCard, {
|
|
183
|
-
label: t("Total time"),
|
|
184
|
-
testId: `${prefix}-total-ms`,
|
|
185
|
-
value: formatMs(counters.totalMs)
|
|
186
|
-
}, void 0, false);
|
|
187
|
-
$[26] = counters.totalMs;
|
|
188
|
-
$[27] = includeTiming;
|
|
189
|
-
$[28] = prefix;
|
|
190
|
-
$[29] = t;
|
|
191
|
-
$[30] = t16;
|
|
192
|
-
} else {
|
|
193
|
-
t16 = $[30];
|
|
194
|
-
}
|
|
195
|
-
let t17;
|
|
196
|
-
if ($[31] !== counters.maxMs || $[32] !== includeTiming || $[33] !== prefix || $[34] !== t) {
|
|
197
|
-
t17 = includeTiming && /* @__PURE__ */ jsxDEV(StatCard, {
|
|
198
|
-
label: t("Max time"),
|
|
199
|
-
testId: `${prefix}-max-ms`,
|
|
200
|
-
value: formatMs(counters.maxMs)
|
|
201
|
-
}, void 0, false);
|
|
202
|
-
$[31] = counters.maxMs;
|
|
203
|
-
$[32] = includeTiming;
|
|
204
|
-
$[33] = prefix;
|
|
205
|
-
$[34] = t;
|
|
206
|
-
$[35] = t17;
|
|
207
|
-
} else {
|
|
208
|
-
t17 = $[35];
|
|
209
|
-
}
|
|
210
|
-
let t18;
|
|
211
|
-
if ($[36] !== t12 || $[37] !== t15 || $[38] !== t16 || $[39] !== t17 || $[40] !== t3 || $[41] !== t6 || $[42] !== t9) {
|
|
212
|
-
t18 = /* @__PURE__ */ jsxDEV("dl", {
|
|
213
|
-
className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-3",
|
|
214
|
-
"data-testid": t3,
|
|
215
|
-
children: [t6, t9, t12, t15, t16, t17]
|
|
216
|
-
}, void 0, true);
|
|
217
|
-
$[36] = t12;
|
|
218
|
-
$[37] = t15;
|
|
219
|
-
$[38] = t16;
|
|
220
|
-
$[39] = t17;
|
|
221
|
-
$[40] = t3;
|
|
222
|
-
$[41] = t6;
|
|
223
|
-
$[42] = t9;
|
|
224
|
-
$[43] = t18;
|
|
225
|
-
} else {
|
|
226
|
-
t18 = $[43];
|
|
227
|
-
}
|
|
228
|
-
let t19;
|
|
229
|
-
if ($[44] !== t1 || $[45] !== t18 || $[46] !== t2) {
|
|
230
|
-
t19 = /* @__PURE__ */ jsxDEV("section", {
|
|
231
|
-
className: "flex flex-col gap-2",
|
|
232
|
-
"data-testid": t1,
|
|
233
|
-
children: [t2, t18]
|
|
234
|
-
}, void 0, true);
|
|
235
|
-
$[44] = t1;
|
|
236
|
-
$[45] = t18;
|
|
237
|
-
$[46] = t2;
|
|
238
|
-
$[47] = t19;
|
|
239
|
-
} else {
|
|
240
|
-
t19 = $[47];
|
|
241
|
-
}
|
|
242
|
-
return t19;
|
|
243
|
-
};
|
|
244
|
-
const FanoutPanel = (t0) => {
|
|
245
|
-
const $ = c(32);
|
|
246
|
-
const {
|
|
247
|
-
initialShardKey
|
|
248
|
-
} = t0;
|
|
249
|
-
const t = useT();
|
|
250
|
-
const [shardKey, setShardKey] = useState(initialShardKey ?? "");
|
|
251
|
-
let t1;
|
|
252
|
-
if ($[0] !== shardKey) {
|
|
253
|
-
t1 = shardKey.trim();
|
|
254
|
-
$[0] = shardKey;
|
|
255
|
-
$[1] = t1;
|
|
256
|
-
} else {
|
|
257
|
-
t1 = $[1];
|
|
258
|
-
}
|
|
259
|
-
const debouncedShard = useDebounced(t1, 400);
|
|
260
|
-
let t2;
|
|
261
|
-
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
262
|
-
t2 = {};
|
|
263
|
-
$[2] = t2;
|
|
264
|
-
} else {
|
|
265
|
-
t2 = $[2];
|
|
266
|
-
}
|
|
267
|
-
let t3;
|
|
268
|
-
if ($[3] !== debouncedShard) {
|
|
269
|
-
t3 = {
|
|
270
|
-
keepPreviousData: true,
|
|
271
|
-
shardKey: debouncedShard
|
|
272
|
-
};
|
|
273
|
-
$[3] = debouncedShard;
|
|
274
|
-
$[4] = t3;
|
|
275
|
-
} else {
|
|
276
|
-
t3 = $[4];
|
|
277
|
-
}
|
|
278
|
-
const {
|
|
279
|
-
data: result,
|
|
280
|
-
error,
|
|
281
|
-
errorSource,
|
|
282
|
-
refetch
|
|
283
|
-
} = useAdminQuery(ADMIN_FUNCTIONS.getFanoutMetrics, t2, t3);
|
|
284
|
-
useAutoRefresh(refetch, true);
|
|
285
|
-
let t4;
|
|
286
|
-
if ($[5] !== result) {
|
|
287
|
-
t4 = result !== void 0 && isFanoutIdle(result);
|
|
288
|
-
$[5] = result;
|
|
289
|
-
$[6] = t4;
|
|
290
|
-
} else {
|
|
291
|
-
t4 = $[6];
|
|
292
|
-
}
|
|
293
|
-
const isIdle = t4;
|
|
294
|
-
let t5;
|
|
295
|
-
if ($[7] !== shardKey) {
|
|
296
|
-
t5 = /* @__PURE__ */ jsxDEV(ShardInput, {
|
|
297
|
-
onChange: setShardKey,
|
|
298
|
-
testId: "fanout-shard-input",
|
|
299
|
-
value: shardKey
|
|
300
|
-
}, void 0, false);
|
|
301
|
-
$[7] = shardKey;
|
|
302
|
-
$[8] = t5;
|
|
303
|
-
} else {
|
|
304
|
-
t5 = $[8];
|
|
305
|
-
}
|
|
306
|
-
let t6;
|
|
307
|
-
if ($[9] !== result || $[10] !== t) {
|
|
308
|
-
t6 = result !== void 0 && /* @__PURE__ */ jsxDEV("div", {
|
|
309
|
-
className: "ml-auto flex items-center gap-2 text-sm text-muted-foreground",
|
|
310
|
-
"data-testid": "fanout-count",
|
|
311
|
-
children: [result.promoted && /* @__PURE__ */ jsxDEV(Badge, {
|
|
312
|
-
"data-testid": "fanout-promoted",
|
|
313
|
-
variant: result.relayCount >= result.maxRelays ? "destructive" : "default",
|
|
314
|
-
children: result.relayCount >= result.maxRelays ? t("auto-scaled: {relayCount}/{maxRelays} relays (at ceiling)", {
|
|
315
|
-
maxRelays: result.maxRelays,
|
|
316
|
-
relayCount: result.relayCount
|
|
317
|
-
}) : t("auto-scaled: {relayCount}/{maxRelays} relays", {
|
|
318
|
-
maxRelays: result.maxRelays,
|
|
319
|
-
relayCount: result.relayCount
|
|
320
|
-
})
|
|
321
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(Badge, {
|
|
322
|
-
variant: "secondary",
|
|
323
|
-
children: t("{count} connections", {
|
|
324
|
-
count: result.totalConnections
|
|
325
|
-
})
|
|
326
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(Badge, {
|
|
327
|
-
variant: "secondary",
|
|
328
|
-
children: t("peak {count} subscribers", {
|
|
329
|
-
count: result.peakSubscribers
|
|
330
|
-
})
|
|
331
|
-
}, void 0, false)]
|
|
332
|
-
}, void 0, true);
|
|
333
|
-
$[9] = result;
|
|
334
|
-
$[10] = t;
|
|
335
|
-
$[11] = t6;
|
|
336
|
-
} else {
|
|
337
|
-
t6 = $[11];
|
|
338
|
-
}
|
|
339
|
-
let t7;
|
|
340
|
-
if ($[12] !== t5 || $[13] !== t6) {
|
|
341
|
-
t7 = /* @__PURE__ */ jsxDEV("div", {
|
|
342
|
-
className: "flex flex-wrap items-center gap-2",
|
|
343
|
-
children: [t5, t6]
|
|
344
|
-
}, void 0, true);
|
|
345
|
-
$[12] = t5;
|
|
346
|
-
$[13] = t6;
|
|
347
|
-
$[14] = t7;
|
|
348
|
-
} else {
|
|
349
|
-
t7 = $[14];
|
|
350
|
-
}
|
|
351
|
-
let t8;
|
|
352
|
-
if ($[15] !== error || $[16] !== errorSource) {
|
|
353
|
-
t8 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
|
|
354
|
-
error: errorSource,
|
|
355
|
-
testId: "fanout-error"
|
|
356
|
-
}, void 0, false);
|
|
357
|
-
$[15] = error;
|
|
358
|
-
$[16] = errorSource;
|
|
359
|
-
$[17] = t8;
|
|
360
|
-
} else {
|
|
361
|
-
t8 = $[17];
|
|
362
|
-
}
|
|
363
|
-
let t9;
|
|
364
|
-
if ($[18] !== error || $[19] !== isIdle || $[20] !== t) {
|
|
365
|
-
t9 = error === null && isIdle && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
366
|
-
description: t("Realtime fan-out cost and per-topic subscriber counts for this shard."),
|
|
367
|
-
icon: /* @__PURE__ */ jsxDEV("svg", {
|
|
368
|
-
"aria-hidden": "true",
|
|
369
|
-
fill: "none",
|
|
370
|
-
stroke: "currentColor",
|
|
371
|
-
strokeLinecap: "round",
|
|
372
|
-
strokeLinejoin: "round",
|
|
373
|
-
strokeWidth: 1.6,
|
|
374
|
-
viewBox: "0 0 24 24",
|
|
375
|
-
children: /* @__PURE__ */ jsxDEV("path", {
|
|
376
|
-
d: "M4 12h4l3 7 4-14 3 7h2"
|
|
377
|
-
}, void 0, false)
|
|
378
|
-
}, void 0, false),
|
|
379
|
-
testId: "fanout-empty",
|
|
380
|
-
title: t("No fan-out activity yet.")
|
|
381
|
-
}, void 0, false);
|
|
382
|
-
$[18] = error;
|
|
383
|
-
$[19] = isIdle;
|
|
384
|
-
$[20] = t;
|
|
385
|
-
$[21] = t9;
|
|
386
|
-
} else {
|
|
387
|
-
t9 = $[21];
|
|
388
|
-
}
|
|
389
|
-
let t10;
|
|
390
|
-
if ($[22] !== error || $[23] !== isIdle || $[24] !== result || $[25] !== t) {
|
|
391
|
-
t10 = error === null && result !== void 0 && !isIdle && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
392
|
-
children: [result.topics.length > 0 && /* @__PURE__ */ jsxDEV("section", {
|
|
393
|
-
className: "flex flex-col gap-2",
|
|
394
|
-
"data-testid": "fanout-topics-section",
|
|
395
|
-
children: [/* @__PURE__ */ jsxDEV("h3", {
|
|
396
|
-
className: "text-sm font-medium text-foreground",
|
|
397
|
-
children: t("Hot topics")
|
|
398
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(Card, {
|
|
399
|
-
className: "overflow-hidden py-0",
|
|
400
|
-
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
401
|
-
"data-testid": "fanout-topics-table",
|
|
402
|
-
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
403
|
-
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
404
|
-
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
405
|
-
children: t("Topic")
|
|
406
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
407
|
-
children: t("Kind")
|
|
408
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
409
|
-
className: "text-right",
|
|
410
|
-
children: t("Subscribers")
|
|
411
|
-
}, void 0, false)]
|
|
412
|
-
}, void 0, true)
|
|
413
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
414
|
-
children: result.topics.map(_temp)
|
|
415
|
-
}, void 0, false)]
|
|
416
|
-
}, void 0, true)
|
|
417
|
-
}, void 0, false)]
|
|
418
|
-
}, void 0, true), /* @__PURE__ */ jsxDEV("section", {
|
|
419
|
-
className: "flex flex-col gap-3",
|
|
420
|
-
"data-testid": "fanout-cost",
|
|
421
|
-
children: [/* @__PURE__ */ jsxDEV("h2", {
|
|
422
|
-
className: "text-sm font-medium text-muted-foreground",
|
|
423
|
-
children: t("Fan-out cost since this instance woke")
|
|
424
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(PathCounters, {
|
|
425
|
-
counters: result.shapePoke,
|
|
426
|
-
includeTiming: true,
|
|
427
|
-
prefix: "fanout-poke",
|
|
428
|
-
t,
|
|
429
|
-
title: t("Shape pokes")
|
|
430
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(PathCounters, {
|
|
431
|
-
counters: result.whisper,
|
|
432
|
-
includeTiming: false,
|
|
433
|
-
prefix: "fanout-whisper",
|
|
434
|
-
t,
|
|
435
|
-
title: t("Whisper broadcasts")
|
|
436
|
-
}, void 0, false)]
|
|
437
|
-
}, void 0, true)]
|
|
438
|
-
}, void 0, true);
|
|
439
|
-
$[22] = error;
|
|
440
|
-
$[23] = isIdle;
|
|
441
|
-
$[24] = result;
|
|
442
|
-
$[25] = t;
|
|
443
|
-
$[26] = t10;
|
|
444
|
-
} else {
|
|
445
|
-
t10 = $[26];
|
|
446
|
-
}
|
|
447
|
-
let t11;
|
|
448
|
-
if ($[27] !== t10 || $[28] !== t7 || $[29] !== t8 || $[30] !== t9) {
|
|
449
|
-
t11 = /* @__PURE__ */ jsxDEV("div", {
|
|
450
|
-
className: "flex flex-col gap-4",
|
|
451
|
-
"data-testid": "fanout-panel",
|
|
452
|
-
children: [t7, t8, t9, t10]
|
|
453
|
-
}, void 0, true);
|
|
454
|
-
$[27] = t10;
|
|
455
|
-
$[28] = t7;
|
|
456
|
-
$[29] = t8;
|
|
457
|
-
$[30] = t9;
|
|
458
|
-
$[31] = t11;
|
|
459
|
-
} else {
|
|
460
|
-
t11 = $[31];
|
|
461
|
-
}
|
|
462
|
-
return t11;
|
|
463
|
-
};
|
|
464
|
-
function _temp(topic) {
|
|
465
|
-
return /* @__PURE__ */ jsxDEV(TableRow, {
|
|
466
|
-
"data-testid": "fanout-topic-row",
|
|
467
|
-
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
468
|
-
className: "font-mono text-xs",
|
|
469
|
-
children: topic.topic
|
|
470
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
471
|
-
children: /* @__PURE__ */ jsxDEV(Badge, {
|
|
472
|
-
variant: "outline",
|
|
473
|
-
children: topic.kind
|
|
474
|
-
}, void 0, false)
|
|
475
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
476
|
-
className: "text-right font-medium tabular-nums",
|
|
477
|
-
children: topic.subscribers
|
|
478
|
-
}, void 0, false)]
|
|
479
|
-
}, `${topic.kind}:${topic.topic}`, true);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
export { FanoutPanel as default };
|
|
1
|
+
import{c as P}from"react/compiler-runtime";import{useState as j}from"react";import{E as A}from"../packem_shared/error-alert-B59DnrDI.js";import{ShardInput as L}from"../packem_shared/ShardInput-BVn2iCU0.js";import{g as M}from"../packem_shared/badge-BbuuAio7.js";import{c as K}from"../packem_shared/card-CIDGUN6K.js";import{E as W}from"../packem_shared/empty-state-Cg7t_8qu.js";import{n as B,d as H,m as _,p as T,f as O,u as D}from"../packem_shared/table-DdJBrClo.js";import{K as U}from"../packem_shared/use-admin-query-Di3fLE8H.js";import{useAutoRefresh as V}from"../packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js";import X from"../packem_shared/useDebounced-Ihdiid_k.js";import{useT as Y}from"../packem_shared/DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as q}from"../packem_shared/ADMIN_FUNCTIONS-BYNSbBVE.js";import{jsx as s,jsxs as x,Fragment as z}from"react/jsx-runtime";const E=i=>`${i.toString()} ms`,G=i=>i.totalConnections===0&&i.shapePoke.passes===0&&i.whisper.passes===0,R=i=>{const e=P(8),{label:r,testId:t,value:l}=i;let o;e[0]!==r?(o=s("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r}),e[0]=r,e[1]=o):o=e[1];let n;e[2]!==t||e[3]!==l?(n=s("span",{className:"truncate text-2xl font-semibold tabular-nums text-foreground","data-testid":t,children:l}),e[2]=t,e[3]=l,e[4]=n):n=e[4];let h;return e[5]!==o||e[6]!==n?(h=s(K,{className:"gap-0 py-0",children:x("div",{className:"flex flex-col gap-2.5 p-4",children:[o,n]})}),e[5]=o,e[6]=n,e[7]=h):h=e[7],h},F=i=>{const e=P(48),{counters:r,includeTiming:t,prefix:l,t:o,title:n}=i,h=`${l}-section`;let g;e[0]!==n?(g=s("h3",{className:"text-sm font-medium text-foreground",children:n}),e[0]=n,e[1]=g):g=e[1];const N=`${l}-stats`;let a;e[2]!==o?(a=o("Passes"),e[2]=o,e[3]=a):a=e[3];const c=`${l}-passes`;let v;e[4]!==r.passes||e[5]!==a||e[6]!==c?(v=s(R,{label:a,testId:c,value:r.passes}),e[4]=r.passes,e[5]=a,e[6]=c,e[7]=v):v=e[7];let $;e[8]!==o?($=o("Sockets iterated"),e[8]=o,e[9]=$):$=e[9];const I=`${l}-iterated`;let d;e[10]!==r.socketsIterated||e[11]!==$||e[12]!==I?(d=s(R,{label:$,testId:I,value:r.socketsIterated}),e[10]=r.socketsIterated,e[11]=$,e[12]=I,e[13]=d):d=e[13];let m;e[14]!==o?(m=o("Delivered"),e[14]=o,e[15]=m):m=e[15];const y=`${l}-delivered`;let u;e[16]!==r.socketsDelivered||e[17]!==m||e[18]!==y?(u=s(R,{label:m,testId:y,value:r.socketsDelivered}),e[16]=r.socketsDelivered,e[17]=m,e[18]=y,e[19]=u):u=e[19];let p;e[20]!==o?(p=o("Peak width"),e[20]=o,e[21]=p):p=e[21];const b=`${l}-peak`;let f;e[22]!==r.peakSocketsIterated||e[23]!==p||e[24]!==b?(f=s(R,{label:p,testId:b,value:r.peakSocketsIterated}),e[22]=r.peakSocketsIterated,e[23]=p,e[24]=b,e[25]=f):f=e[25];let k;e[26]!==r.totalMs||e[27]!==t||e[28]!==l||e[29]!==o?(k=t&&s(R,{label:o("Total time"),testId:`${l}-total-ms`,value:E(r.totalMs)}),e[26]=r.totalMs,e[27]=t,e[28]=l,e[29]=o,e[30]=k):k=e[30];let S;e[31]!==r.maxMs||e[32]!==t||e[33]!==l||e[34]!==o?(S=t&&s(R,{label:o("Max time"),testId:`${l}-max-ms`,value:E(r.maxMs)}),e[31]=r.maxMs,e[32]=t,e[33]=l,e[34]=o,e[35]=S):S=e[35];let C;e[36]!==u||e[37]!==f||e[38]!==k||e[39]!==S||e[40]!==N||e[41]!==v||e[42]!==d?(C=x("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":N,children:[v,d,u,f,k,S]}),e[36]=u,e[37]=f,e[38]=k,e[39]=S,e[40]=N,e[41]=v,e[42]=d,e[43]=C):C=e[43];let w;return e[44]!==h||e[45]!==C||e[46]!==g?(w=x("section",{className:"flex flex-col gap-2","data-testid":h,children:[g,C]}),e[44]=h,e[45]=C,e[46]=g,e[47]=w):w=e[47],w},ue=i=>{const e=P(32),{initialShardKey:r}=i,t=Y(),[l,o]=j(r??"");let n;e[0]!==l?(n=l.trim(),e[0]=l,e[1]=n):n=e[1];const h=X(n,400);let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g={},e[2]=g):g=e[2];let N;e[3]!==h?(N={keepPreviousData:!0,shardKey:h},e[3]=h,e[4]=N):N=e[4];const{data:a,error:c,errorSource:v,refetch:$}=U(q.getFanoutMetrics,g,N);V($,!0);let I;e[5]!==a?(I=a!==void 0&&G(a),e[5]=a,e[6]=I):I=e[6];const d=I;let m;e[7]!==l?(m=s(L,{onChange:o,testId:"fanout-shard-input",value:l}),e[7]=l,e[8]=m):m=e[8];let y;e[9]!==a||e[10]!==t?(y=a!==void 0&&x("div",{className:"ml-auto flex items-center gap-2 text-sm text-muted-foreground","data-testid":"fanout-count",children:[a.promoted&&s(M,{"data-testid":"fanout-promoted",variant:a.relayCount>=a.maxRelays?"destructive":"default",children:a.relayCount>=a.maxRelays?t("auto-scaled: {relayCount}/{maxRelays} relays (at ceiling)",{maxRelays:a.maxRelays,relayCount:a.relayCount}):t("auto-scaled: {relayCount}/{maxRelays} relays",{maxRelays:a.maxRelays,relayCount:a.relayCount})}),s(M,{variant:"secondary",children:t("{count} connections",{count:a.totalConnections})}),s(M,{variant:"secondary",children:t("peak {count} subscribers",{count:a.peakSubscribers})})]}),e[9]=a,e[10]=t,e[11]=y):y=e[11];let u;e[12]!==m||e[13]!==y?(u=x("div",{className:"flex flex-wrap items-center gap-2",children:[m,y]}),e[12]=m,e[13]=y,e[14]=u):u=e[14];let p;e[15]!==c||e[16]!==v?(p=c!==null&&s(A,{error:v,testId:"fanout-error"}),e[15]=c,e[16]=v,e[17]=p):p=e[17];let b;e[18]!==c||e[19]!==d||e[20]!==t?(b=c===null&&d&&s(W,{description:t("Realtime fan-out cost and per-topic subscriber counts for this shard."),icon:s("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:s("path",{d:"M4 12h4l3 7 4-14 3 7h2"})}),testId:"fanout-empty",title:t("No fan-out activity yet.")}),e[18]=c,e[19]=d,e[20]=t,e[21]=b):b=e[21];let f;e[22]!==c||e[23]!==d||e[24]!==a||e[25]!==t?(f=c===null&&a!==void 0&&!d&&x(z,{children:[a.topics.length>0&&x("section",{className:"flex flex-col gap-2","data-testid":"fanout-topics-section",children:[s("h3",{className:"text-sm font-medium text-foreground",children:t("Hot topics")}),s(K,{className:"overflow-hidden py-0",children:x(B,{"data-testid":"fanout-topics-table",children:[s(H,{children:x(_,{children:[s(T,{children:t("Topic")}),s(T,{children:t("Kind")}),s(T,{className:"text-right",children:t("Subscribers")})]})}),s(O,{children:a.topics.map(J)})]})})]}),x("section",{className:"flex flex-col gap-3","data-testid":"fanout-cost",children:[s("h2",{className:"text-sm font-medium text-muted-foreground",children:t("Fan-out cost since this instance woke")}),s(F,{counters:a.shapePoke,includeTiming:!0,prefix:"fanout-poke",t,title:t("Shape pokes")}),s(F,{counters:a.whisper,includeTiming:!1,prefix:"fanout-whisper",t,title:t("Whisper broadcasts")})]})]}),e[22]=c,e[23]=d,e[24]=a,e[25]=t,e[26]=f):f=e[26];let k;return e[27]!==f||e[28]!==u||e[29]!==p||e[30]!==b?(k=x("div",{className:"flex flex-col gap-4","data-testid":"fanout-panel",children:[u,p,b,f]}),e[27]=f,e[28]=u,e[29]=p,e[30]=b,e[31]=k):k=e[31],k};function J(i){return x(_,{"data-testid":"fanout-topic-row",children:[s(D,{className:"font-mono text-xs",children:i.topic}),s(D,{children:s(M,{variant:"outline",children:i.kind})}),s(D,{className:"text-right font-medium tabular-nums",children:i.subscribers})]},`${i.kind}:${i.topic}`)}export{ue as default};
|
|
@@ -1,176 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as ErrorAlert } from '../packem_shared/error-alert-D9uIFJUS.js';
|
|
3
|
-
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
4
|
-
import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
|
|
5
|
-
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
6
|
-
import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
|
|
7
|
-
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';
|
|
8
|
-
import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
|
|
9
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
|
|
10
|
-
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
11
|
-
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
|
|
12
|
-
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
13
|
-
|
|
14
|
-
const parseContext = (raw) => {
|
|
15
|
-
const trimmed = raw.trim();
|
|
16
|
-
if (trimmed.length === 0) {
|
|
17
|
-
return {
|
|
18
|
-
context: void 0,
|
|
19
|
-
error: null
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
try {
|
|
23
|
-
const parsed = JSON.parse(trimmed);
|
|
24
|
-
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
25
|
-
return {
|
|
26
|
-
context: void 0,
|
|
27
|
-
error: "Targeting context must be a JSON object."
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
context: parsed,
|
|
32
|
-
error: null
|
|
33
|
-
};
|
|
34
|
-
} catch {
|
|
35
|
-
return {
|
|
36
|
-
context: void 0,
|
|
37
|
-
error: "Targeting context is not valid JSON."
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const CONTEXT_PLACEHOLDER = '{ "targetingKey": "user-123", "plan": "premium" }';
|
|
42
|
-
const formatValue = (evaluation) => {
|
|
43
|
-
if (evaluation.type === "object") {
|
|
44
|
-
return JSON.stringify(evaluation.value);
|
|
45
|
-
}
|
|
46
|
-
return String(evaluation.value);
|
|
47
|
-
};
|
|
48
|
-
const FlagsPanel = ({
|
|
49
|
-
initialShardKey = ""
|
|
50
|
-
}) => {
|
|
51
|
-
const t = useT();
|
|
52
|
-
const [contextText, setContextText] = useState("");
|
|
53
|
-
const {
|
|
54
|
-
context,
|
|
55
|
-
error: contextError
|
|
56
|
-
} = parseContext(contextText);
|
|
57
|
-
const args = useMemo(() => context === void 0 ? {} : {
|
|
58
|
-
context
|
|
59
|
-
}, [context]);
|
|
60
|
-
const {
|
|
61
|
-
data,
|
|
62
|
-
error,
|
|
63
|
-
errorSource,
|
|
64
|
-
liveError
|
|
65
|
-
} = useAdminQuery(ADMIN_FUNCTIONS.listFlags, args, {
|
|
66
|
-
live: true,
|
|
67
|
-
shardKey: initialShardKey
|
|
68
|
-
});
|
|
69
|
-
const loaded = data !== void 0;
|
|
70
|
-
const configured = data?.configured ?? false;
|
|
71
|
-
const flags = useMemo(() => Array.isArray(data?.flags) ? [...data.flags].toSorted((a, b) => a.key.localeCompare(b.key)) : [], [data]);
|
|
72
|
-
let body;
|
|
73
|
-
if (loaded && !configured) {
|
|
74
|
-
body = /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
75
|
-
description: t("No @lunora/flags provider is wired in this deployment. Add lunora/flags.ts with defineFlags({ provider }) to gate code paths on feature flags."),
|
|
76
|
-
testId: "flags-unconfigured",
|
|
77
|
-
title: t("No flags provider configured")
|
|
78
|
-
}, void 0, false);
|
|
79
|
-
} else if (loaded && flags.length === 0) {
|
|
80
|
-
body = /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
81
|
-
description: t('A flags provider is configured, but no handler reads a flag yet. Call ctx.flags.boolean("key", false) in a query, mutation, or action.'),
|
|
82
|
-
testId: "flags-empty",
|
|
83
|
-
title: t("No flags read")
|
|
84
|
-
}, void 0, false);
|
|
85
|
-
} else {
|
|
86
|
-
body = /* @__PURE__ */ jsxDEV(Card, {
|
|
87
|
-
className: "overflow-hidden py-0",
|
|
88
|
-
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
89
|
-
className: "px-0",
|
|
90
|
-
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
91
|
-
"data-testid": "flags-table",
|
|
92
|
-
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
93
|
-
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
94
|
-
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
95
|
-
children: t("Key")
|
|
96
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
97
|
-
children: t("Type")
|
|
98
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
99
|
-
children: t("Value")
|
|
100
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
101
|
-
children: t("Reason")
|
|
102
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
103
|
-
children: t("Variant")
|
|
104
|
-
}, void 0, false)]
|
|
105
|
-
}, void 0, true)
|
|
106
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
107
|
-
children: flags.map((flag) => /* @__PURE__ */ jsxDEV(TableRow, {
|
|
108
|
-
"data-testid": `flags-row-${flag.key}`,
|
|
109
|
-
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
110
|
-
className: "font-mono text-xs",
|
|
111
|
-
children: flag.key
|
|
112
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
113
|
-
className: "font-mono text-xs text-muted-foreground",
|
|
114
|
-
children: flag.type
|
|
115
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
116
|
-
className: "font-mono text-xs",
|
|
117
|
-
children: formatValue(flag)
|
|
118
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
119
|
-
children: flag.errorCode === void 0 ? /* @__PURE__ */ jsxDEV("span", {
|
|
120
|
-
className: "font-mono text-xs text-muted-foreground",
|
|
121
|
-
children: flag.reason ?? "—"
|
|
122
|
-
}, void 0, false) : /* @__PURE__ */ jsxDEV(Badge, {
|
|
123
|
-
"data-testid": `flags-error-${flag.key}`,
|
|
124
|
-
variant: "destructive",
|
|
125
|
-
children: flag.errorCode
|
|
126
|
-
}, void 0, false)
|
|
127
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
128
|
-
className: "font-mono text-xs text-muted-foreground",
|
|
129
|
-
children: flag.variant ?? "—"
|
|
130
|
-
}, void 0, false)]
|
|
131
|
-
}, flag.key, true))
|
|
132
|
-
}, void 0, false)]
|
|
133
|
-
}, void 0, true)
|
|
134
|
-
}, void 0, false)
|
|
135
|
-
}, void 0, false);
|
|
136
|
-
}
|
|
137
|
-
return /* @__PURE__ */ jsxDEV("div", {
|
|
138
|
-
className: "flex flex-col gap-6",
|
|
139
|
-
"data-testid": "lunora-flags-panel",
|
|
140
|
-
children: [error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
|
|
141
|
-
error: errorSource,
|
|
142
|
-
testId: "flags-error"
|
|
143
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("p", {
|
|
144
|
-
className: "text-sm text-muted-foreground",
|
|
145
|
-
children: t('Feature flags are read in code with ctx.flags.<type>("key", default). They evaluate through the OpenFeature provider configured in lunora/flags.ts; edit the targeting context below to see how each flag resolves for a given audience.')
|
|
146
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("div", {
|
|
147
|
-
className: "flex flex-col gap-2",
|
|
148
|
-
children: [/* @__PURE__ */ jsxDEV(Label, {
|
|
149
|
-
htmlFor: "flags-targeting-context",
|
|
150
|
-
children: t("Targeting context (JSON)")
|
|
151
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(Textarea, {
|
|
152
|
-
className: "font-mono text-xs",
|
|
153
|
-
"data-testid": "flags-context-input",
|
|
154
|
-
id: "flags-targeting-context",
|
|
155
|
-
onChange: (event) => {
|
|
156
|
-
setContextText(event.target.value);
|
|
157
|
-
},
|
|
158
|
-
placeholder: CONTEXT_PLACEHOLDER,
|
|
159
|
-
rows: 3,
|
|
160
|
-
value: contextText
|
|
161
|
-
}, void 0, false), contextError !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
162
|
-
className: "text-xs text-destructive",
|
|
163
|
-
"data-testid": "flags-context-error",
|
|
164
|
-
role: "alert",
|
|
165
|
-
children: t(contextError)
|
|
166
|
-
}, void 0, false), liveError !== void 0 && /* @__PURE__ */ jsxDEV("p", {
|
|
167
|
-
className: "text-xs text-amber-600 dark:text-amber-500",
|
|
168
|
-
"data-testid": "flags-live-error",
|
|
169
|
-
role: "alert",
|
|
170
|
-
children: t("Live updates unavailable; showing the last evaluation.")
|
|
171
|
-
}, void 0, false)]
|
|
172
|
-
}, void 0, true), body]
|
|
173
|
-
}, void 0, true);
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export { FlagsPanel };
|
|
1
|
+
import{useState as k,useMemo as u}from"react";import{E as w}from"../packem_shared/error-alert-B59DnrDI.js";import{g as A}from"../packem_shared/badge-BbuuAio7.js";import{c as T,u as F}from"../packem_shared/card-CIDGUN6K.js";import{E as p}from"../packem_shared/empty-state-Cg7t_8qu.js";import{p as O}from"../packem_shared/label-6uP1obNF.js";import{n as C,d as j,m as h,p as n,f as E,u as i}from"../packem_shared/table-DdJBrClo.js";import{l as I}from"../packem_shared/textarea-Bu2-jKAs.js";import{K as J}from"../packem_shared/use-admin-query-Di3fLE8H.js";import{useT as K}from"../packem_shared/DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as V}from"../packem_shared/ADMIN_FUNCTIONS-BYNSbBVE.js";import{jsx as e,jsxs as s}from"react/jsx-runtime";const L=a=>{const t=a.trim();if(t.length===0)return{context:void 0,error:null};try{const o=JSON.parse(t);return o===null||typeof o!="object"||Array.isArray(o)?{context:void 0,error:"Targeting context must be a JSON object."}:{context:o,error:null}}catch{return{context:void 0,error:"Targeting context is not valid JSON."}}},M='{ "targetingKey": "user-123", "plan": "premium" }',_=a=>a.type==="object"?JSON.stringify(a.value):String(a.value),Y=({initialShardKey:a=""})=>{const t=K(),[o,x]=k(""),{context:c,error:f}=L(o),v=u(()=>c===void 0?{}:{context:c},[c]),{data:l,error:y,errorSource:N,liveError:b}=J(V.listFlags,v,{live:!0,shardKey:a}),g=l!==void 0,S=l?.configured??!1,m=u(()=>Array.isArray(l?.flags)?[...l.flags].toSorted((r,$)=>r.key.localeCompare($.key)):[],[l]);let d;return g&&!S?d=e(p,{description:t("No @lunora/flags provider is wired in this deployment. Add lunora/flags.ts with defineFlags({ provider }) to gate code paths on feature flags."),testId:"flags-unconfigured",title:t("No flags provider configured")}):g&&m.length===0?d=e(p,{description:t('A flags provider is configured, but no handler reads a flag yet. Call ctx.flags.boolean("key", false) in a query, mutation, or action.'),testId:"flags-empty",title:t("No flags read")}):d=e(T,{className:"overflow-hidden py-0",children:e(F,{className:"px-0",children:s(C,{"data-testid":"flags-table",children:[e(j,{children:s(h,{children:[e(n,{children:t("Key")}),e(n,{children:t("Type")}),e(n,{children:t("Value")}),e(n,{children:t("Reason")}),e(n,{children:t("Variant")})]})}),e(E,{children:m.map(r=>s(h,{"data-testid":`flags-row-${r.key}`,children:[e(i,{className:"font-mono text-xs",children:r.key}),e(i,{className:"font-mono text-xs text-muted-foreground",children:r.type}),e(i,{className:"font-mono text-xs",children:_(r)}),e(i,{children:r.errorCode===void 0?e("span",{className:"font-mono text-xs text-muted-foreground",children:r.reason??"—"}):e(A,{"data-testid":`flags-error-${r.key}`,variant:"destructive",children:r.errorCode})}),e(i,{className:"font-mono text-xs text-muted-foreground",children:r.variant??"—"})]},r.key))})]})})}),s("div",{className:"flex flex-col gap-6","data-testid":"lunora-flags-panel",children:[y!==null&&e(w,{error:N,testId:"flags-error"}),e("p",{className:"text-sm text-muted-foreground",children:t('Feature flags are read in code with ctx.flags.<type>("key", default). They evaluate through the OpenFeature provider configured in lunora/flags.ts; edit the targeting context below to see how each flag resolves for a given audience.')}),s("div",{className:"flex flex-col gap-2",children:[e(O,{htmlFor:"flags-targeting-context",children:t("Targeting context (JSON)")}),e(I,{className:"font-mono text-xs","data-testid":"flags-context-input",id:"flags-targeting-context",onChange:r=>{x(r.target.value)},placeholder:M,rows:3,value:o}),f!==null&&e("p",{className:"text-xs text-destructive","data-testid":"flags-context-error",role:"alert",children:t(f)}),b!==void 0&&e("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"flags-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")})]}),d]})};export{Y as FlagsPanel};
|