@lunora/studio 1.0.0-alpha.57 → 1.0.0-alpha.59

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.
Files changed (115) hide show
  1. package/dist/index.d.ts +61 -4
  2. package/dist/index.js +8 -6
  3. package/dist/mount.d.ts +1 -1
  4. package/dist/mount.js +1 -1
  5. package/dist/packem_chunks/ApiTab.js +1 -1
  6. package/dist/packem_chunks/AuditPanel.js +1 -1
  7. package/dist/packem_chunks/DeploymentHealthPanel.js +664 -0
  8. package/dist/packem_chunks/ExportImportPanel.js +1 -1
  9. package/dist/packem_chunks/FileBrowser.js +1 -1
  10. package/dist/packem_chunks/FunctionRunner.js +1 -1
  11. package/dist/packem_chunks/FunctionStatsPanel.js +1 -1
  12. package/dist/packem_chunks/HealthPanel.js +1 -1
  13. package/dist/packem_chunks/InsightsPanel.js +1 -1
  14. package/dist/packem_chunks/LogsPanel.js +1 -1
  15. package/dist/packem_chunks/MailPanel.js +1 -1
  16. package/dist/packem_chunks/MetricsPanel.js +473 -242
  17. package/dist/packem_chunks/MigrationsPanel.js +1 -1
  18. package/dist/packem_chunks/NotificationsPanel.js +306 -0
  19. package/dist/packem_chunks/PitrPanel.js +1 -1
  20. package/dist/packem_chunks/SchemaViewer.js +1 -1
  21. package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -1
  22. package/dist/packem_chunks/SettingsPanel.js +1 -1
  23. package/dist/packem_chunks/SqlEditorPanel.js +1 -1
  24. package/dist/packem_chunks/TableEditor.js +1 -1
  25. package/dist/packem_chunks/agents-panel.js +1 -1
  26. package/dist/packem_chunks/auth-audit-panel.js +247 -0
  27. package/dist/packem_chunks/containers-panel.js +1 -1
  28. package/dist/packem_chunks/dashboards-panel.js +1 -1
  29. package/dist/packem_chunks/fanout-panel.js +1 -1
  30. package/dist/packem_chunks/flags-panel.js +1 -1
  31. package/dist/packem_chunks/issues-panel.js +1 -1
  32. package/dist/packem_chunks/kv-browser.js +1 -1
  33. package/dist/packem_chunks/payments-panel.js +28 -1
  34. package/dist/packem_chunks/permissions-panel.js +1 -1
  35. package/dist/packem_chunks/queues-panel.js +1 -1
  36. package/dist/packem_chunks/rls-panel.js +1 -1
  37. package/dist/packem_chunks/storage-rules-panel.js +1 -1
  38. package/dist/packem_chunks/subscriptions-panel.js +1 -1
  39. package/dist/packem_chunks/traces-panel.js +125 -112
  40. package/dist/packem_chunks/workflows-panel.js +1 -1
  41. package/dist/packem_shared/{ADMIN_FUNCTIONS-C1LXrovV.js → ADMIN_FUNCTIONS-P2UzJscH.js} +3 -0
  42. package/dist/packem_shared/{ApiDocsPanel-BBvinlRD.js → ApiDocsPanel-DNDpeR5O.js} +1 -1
  43. package/dist/packem_shared/{DataBrowser-BoinTGxr.js → DataBrowser-obTn4sKX.js} +1 -1
  44. package/dist/packem_shared/{HomePanel-BpdGcW4L.js → HomePanel-DCRj3hGB.js} +2 -2
  45. package/dist/packem_shared/{Studio-BpnYw3lc.js → Studio-DnlPCbID.js} +2 -2
  46. package/dist/packem_shared/{StudioApp-DRGVBnFx.js → StudioApp-CzqlB4zO.js} +1 -1
  47. package/dist/packem_shared/{app.d-C-kxb-1T.d.ts → app.d-bRPJhby-.d.ts} +1 -1
  48. package/dist/packem_shared/{home-panel-Dmg4sNiv.js → home-panel-BRAA2UlM.js} +1 -1
  49. package/dist/packem_shared/{studio-LL4iP8fZ.js → studio-8QSXbZ98.js} +682 -607
  50. package/dist/packem_shared/trace-handoff-CGolF3KS.js +38 -0
  51. package/dist/standalone/{chunk-C7UZEQZ7.js → chunk-3LJEGSMK.js} +2 -2
  52. package/dist/standalone/{chunk-SAQU44MF.js → chunk-56XQYNUJ.js} +1 -1
  53. package/dist/standalone/chunk-5QT5JRXD.js +3 -0
  54. package/dist/standalone/{chunk-JM3ZISDM.js → chunk-6RLPR7PL.js} +1 -1
  55. package/dist/standalone/{chunk-T3R6VHAT.js → chunk-6V74EUPK.js} +1 -1
  56. package/dist/standalone/{chunk-27JTW53L.js → chunk-7EE33WLB.js} +1 -1
  57. package/dist/standalone/{chunk-R4ALMCZA.js → chunk-AXNGWSBM.js} +1 -1
  58. package/dist/standalone/{chunk-OHCGUIOG.js → chunk-AXZILWRM.js} +1 -1
  59. package/dist/standalone/{chunk-J2DQ63SR.js → chunk-C7RHEBOH.js} +1 -1
  60. package/dist/standalone/chunk-CSWIYOB3.js +1 -0
  61. package/dist/standalone/{chunk-NV5LO5I6.js → chunk-D3VAON25.js} +1 -1
  62. package/dist/standalone/{chunk-HQ2CPGA4.js → chunk-DDLQN67F.js} +1 -1
  63. package/dist/standalone/chunk-DGHW5JG5.js +1 -0
  64. package/dist/standalone/{chunk-EFYZYQUA.js → chunk-DMCSOTAE.js} +1 -1
  65. package/dist/standalone/{chunk-MBG7XWNH.js → chunk-E3BKETAS.js} +1 -1
  66. package/dist/standalone/{chunk-IMVAYDPK.js → chunk-E3OXNN6O.js} +1 -1
  67. package/dist/standalone/chunk-E6BOGDIS.js +1 -0
  68. package/dist/standalone/{chunk-2ICZ6HXQ.js → chunk-F7GE4X2U.js} +1 -1
  69. package/dist/standalone/{chunk-CENYZ5GF.js → chunk-FAVUOGJR.js} +1 -1
  70. package/dist/standalone/{chunk-NIC6UYAQ.js → chunk-FXP6256Q.js} +1 -1
  71. package/dist/standalone/{chunk-X34PHGZF.js → chunk-G6CTAYHJ.js} +1 -1
  72. package/dist/standalone/chunk-H42W62SE.js +1 -0
  73. package/dist/standalone/{chunk-LABWKVKR.js → chunk-HTF5ZX4I.js} +1 -1
  74. package/dist/standalone/{chunk-AYHAJL3Z.js → chunk-I2PS4L74.js} +1 -1
  75. package/dist/standalone/{chunk-MJ4HATA2.js → chunk-J7OGP4NN.js} +1 -1
  76. package/dist/standalone/{chunk-2XUT4Z4W.js → chunk-L2LN3MK4.js} +1 -1
  77. package/dist/standalone/{chunk-2BSDITP4.js → chunk-LT3FH6MW.js} +1 -1
  78. package/dist/standalone/{chunk-ZXLEXF4X.js → chunk-LXULVPEM.js} +3 -3
  79. package/dist/standalone/{chunk-RIZDNIW7.js → chunk-LZUWZBPE.js} +1 -1
  80. package/dist/standalone/{chunk-W3EYW2EA.js → chunk-M4JM3TOY.js} +1 -1
  81. package/dist/standalone/{chunk-P7MZQ6VJ.js → chunk-MLA5ZAEB.js} +1 -1
  82. package/dist/standalone/{chunk-67YMILPJ.js → chunk-MRBI5HNQ.js} +1 -1
  83. package/dist/standalone/{chunk-53J4JZ2D.js → chunk-NKFXMDOD.js} +1 -1
  84. package/dist/standalone/{chunk-WAX3RSAI.js → chunk-NPSNKFHE.js} +1 -1
  85. package/dist/standalone/{chunk-ZVQMTQYX.js → chunk-O7FVPUCO.js} +1 -1
  86. package/dist/standalone/{chunk-227DORM6.js → chunk-OKQXTLFX.js} +1 -1
  87. package/dist/standalone/{chunk-OPSAI5PZ.js → chunk-QAIM6KWT.js} +1 -1
  88. package/dist/standalone/{chunk-7YGTGBP7.js → chunk-QCPMTB6W.js} +1 -1
  89. package/dist/standalone/{chunk-XAGYDGI6.js → chunk-QQ2LOSZL.js} +1 -1
  90. package/dist/standalone/{chunk-Y26ZIWUZ.js → chunk-R2GMHLJY.js} +1 -1
  91. package/dist/standalone/{chunk-2YUYNNHQ.js → chunk-RD5UG2YL.js} +1 -1
  92. package/dist/standalone/chunk-RJTIP3WF.js +1 -0
  93. package/dist/standalone/{chunk-BIA2DLBR.js → chunk-SOC5CY3F.js} +1 -1
  94. package/dist/standalone/{chunk-GF6GF6CF.js → chunk-SS7JLF2I.js} +1 -1
  95. package/dist/standalone/{chunk-PYPWIYI2.js → chunk-SWWYUGPL.js} +1 -1
  96. package/dist/standalone/chunk-TEWVD66F.js +1 -0
  97. package/dist/standalone/{chunk-QAW6AWOE.js → chunk-TTXRHJUP.js} +1 -1
  98. package/dist/standalone/{chunk-4Q66FL5S.js → chunk-UKDHGVOC.js} +1 -1
  99. package/dist/standalone/{chunk-5IGHDPEP.js → chunk-UPNTMJFF.js} +1 -1
  100. package/dist/standalone/{chunk-PRHAIUWS.js → chunk-XN6QYJQ6.js} +1 -1
  101. package/dist/standalone/chunk-Y4U6CC22.js +1 -0
  102. package/dist/standalone/{chunk-SWMBBYJU.js → chunk-Y7PD5KP4.js} +1 -1
  103. package/dist/standalone/chunk-YFIPHCEC.js +1 -0
  104. package/dist/standalone/chunk-YJXOWLFJ.js +1 -0
  105. package/dist/standalone/{chunk-CURAOCQJ.js → chunk-YNN6NFRZ.js} +1 -1
  106. package/dist/standalone/{chunk-LFORIMS7.js → chunk-YUGHRVPD.js} +1 -1
  107. package/dist/standalone/studio.js +1 -1
  108. package/dist/styles.css +1 -1
  109. package/package.json +6 -6
  110. package/dist/standalone/chunk-EXNK5XAW.js +0 -1
  111. package/dist/standalone/chunk-LT2HPR6R.js +0 -3
  112. package/dist/standalone/chunk-MHGJUKCZ.js +0 -1
  113. package/dist/standalone/chunk-N2E4TKRD.js +0 -1
  114. package/dist/standalone/chunk-S6PTK7Y2.js +0 -1
  115. package/dist/standalone/chunk-X3VAERRH.js +0 -1
@@ -0,0 +1,664 @@
1
+ import { c } from 'react/compiler-runtime';
2
+ import { useLunora } from '@lunora/react';
3
+ import { useQuery } from '@tanstack/react-query';
4
+ import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
5
+ import { C as Card } from '../packem_shared/card-F2vH_aj2.js';
6
+ import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
7
+ import { S as Skeleton } from '../packem_shared/skeleton-CGhL0p20.js';
8
+ import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
9
+ import { i as formatTimestamp } from '../packem_shared/internal-DzHCc2Rq.js';
10
+ import { c as cn } from '../packem_shared/utils-B05Dmz_H.js';
11
+ import { jsxDEV } from 'react/jsx-dev-runtime';
12
+
13
+ const HEALTH_PATH = "/_lunora/health";
14
+ const HEALTH_READY_PATH = "/_lunora/health/ready";
15
+ const joinHealthUrl = (base, path) => (base.endsWith("/") ? base.slice(0, -1) : base) + path;
16
+ const useDefaultProbe = () => {
17
+ const client = useLunora();
18
+ return async (kind) => {
19
+ const path = kind === "ready" ? HEALTH_READY_PATH : HEALTH_PATH;
20
+ const token = client.getAuthToken();
21
+ const url = joinHealthUrl(client.url, path);
22
+ try {
23
+ const response = await fetch(url, {
24
+ headers: token === null ? {} : {
25
+ authorization: `Bearer ${token}`
26
+ }
27
+ });
28
+ let body = null;
29
+ try {
30
+ body = await response.json();
31
+ } catch {
32
+ body = null;
33
+ }
34
+ return {
35
+ body,
36
+ ok: response.ok,
37
+ status: response.status
38
+ };
39
+ } catch (error) {
40
+ return {
41
+ body: null,
42
+ error: error instanceof Error ? error.message : String(error),
43
+ ok: false,
44
+ status: 0
45
+ };
46
+ }
47
+ };
48
+ };
49
+ const LEVEL_DOT = {
50
+ crit: "bg-destructive",
51
+ ok: "bg-success",
52
+ warn: "bg-warning"
53
+ };
54
+ const LEVEL_RING = {
55
+ crit: "bg-destructive/10 text-destructive",
56
+ ok: "bg-success/10 text-success",
57
+ warn: "bg-warning/10 text-warning"
58
+ };
59
+ const statusLevel = (status) => {
60
+ if (status === "unhealthy") {
61
+ return "crit";
62
+ }
63
+ return status === "degraded" ? "warn" : "ok";
64
+ };
65
+ const ProbeTile = (t0) => {
66
+ const $ = c(13);
67
+ const {
68
+ label,
69
+ level,
70
+ testId,
71
+ value
72
+ } = t0;
73
+ const t1 = LEVEL_DOT[level];
74
+ let t2;
75
+ if ($[0] !== t1) {
76
+ t2 = cn("size-1.5 shrink-0 rounded-full", t1);
77
+ $[0] = t1;
78
+ $[1] = t2;
79
+ } else {
80
+ t2 = $[1];
81
+ }
82
+ let t3;
83
+ if ($[2] !== t2) {
84
+ t3 = /* @__PURE__ */ jsxDEV("span", {
85
+ "aria-hidden": "true",
86
+ className: t2
87
+ }, void 0, false);
88
+ $[2] = t2;
89
+ $[3] = t3;
90
+ } else {
91
+ t3 = $[3];
92
+ }
93
+ let t4;
94
+ if ($[4] !== label || $[5] !== t3) {
95
+ t4 = /* @__PURE__ */ jsxDEV("span", {
96
+ className: "flex items-center gap-1.5 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
97
+ children: [t3, label]
98
+ }, void 0, true);
99
+ $[4] = label;
100
+ $[5] = t3;
101
+ $[6] = t4;
102
+ } else {
103
+ t4 = $[6];
104
+ }
105
+ let t5;
106
+ if ($[7] !== testId || $[8] !== value) {
107
+ t5 = /* @__PURE__ */ jsxDEV("span", {
108
+ className: "text-lg font-semibold text-foreground",
109
+ "data-testid": testId,
110
+ children: value
111
+ }, void 0, false);
112
+ $[7] = testId;
113
+ $[8] = value;
114
+ $[9] = t5;
115
+ } else {
116
+ t5 = $[9];
117
+ }
118
+ let t6;
119
+ if ($[10] !== t4 || $[11] !== t5) {
120
+ t6 = /* @__PURE__ */ jsxDEV(Card, {
121
+ className: "gap-0 py-0",
122
+ children: /* @__PURE__ */ jsxDEV("div", {
123
+ className: "flex flex-col gap-2.5 p-4",
124
+ children: [t4, t5]
125
+ }, void 0, true)
126
+ }, void 0, false);
127
+ $[10] = t4;
128
+ $[11] = t5;
129
+ $[12] = t6;
130
+ } else {
131
+ t6 = $[12];
132
+ }
133
+ return t6;
134
+ };
135
+ const DeploymentHealthPanel = (t0) => {
136
+ const $ = c(115);
137
+ const {
138
+ probe
139
+ } = t0;
140
+ const t = useT();
141
+ const defaultProbe = useDefaultProbe();
142
+ const runProbe = probe ?? defaultProbe;
143
+ let t1;
144
+ if ($[0] !== runProbe) {
145
+ t1 = async () => {
146
+ const [liveResult, readyResult] = await Promise.all([runProbe("live"), runProbe("ready")]);
147
+ return {
148
+ live: liveResult,
149
+ ready: readyResult
150
+ };
151
+ };
152
+ $[0] = runProbe;
153
+ $[1] = t1;
154
+ } else {
155
+ t1 = $[1];
156
+ }
157
+ let t2;
158
+ if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
159
+ t2 = ["deployment-health"];
160
+ $[2] = t2;
161
+ } else {
162
+ t2 = $[2];
163
+ }
164
+ let t3;
165
+ if ($[3] !== t1) {
166
+ t3 = {
167
+ queryFn: t1,
168
+ queryKey: t2
169
+ };
170
+ $[3] = t1;
171
+ $[4] = t3;
172
+ } else {
173
+ t3 = $[4];
174
+ }
175
+ const {
176
+ data,
177
+ isPending
178
+ } = useQuery(t3);
179
+ const live = data?.live ?? null;
180
+ const ready = data?.ready ?? null;
181
+ if (isPending) {
182
+ let t42;
183
+ if ($[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
184
+ t42 = /* @__PURE__ */ jsxDEV("div", {
185
+ className: "flex flex-col gap-4",
186
+ "data-testid": "deployment-health-loading",
187
+ children: [/* @__PURE__ */ jsxDEV(Skeleton, {
188
+ className: "h-16 w-full"
189
+ }, void 0, false), /* @__PURE__ */ jsxDEV(Skeleton, {
190
+ className: "h-40 w-full"
191
+ }, void 0, false)]
192
+ }, void 0, true);
193
+ $[5] = t42;
194
+ } else {
195
+ t42 = $[5];
196
+ }
197
+ return t42;
198
+ }
199
+ const body = live?.body ?? null;
200
+ if (body === null) {
201
+ const gated = live?.status === 403;
202
+ let t42;
203
+ if ($[6] !== gated || $[7] !== live?.error || $[8] !== t) {
204
+ t42 = gated ? t("The health endpoint is in the admin posture. Paste a valid admin token in the connect popover, or set its auth to public.") : t("Couldn't reach the health endpoint: {message}", {
205
+ message: live?.error ?? t("no response")
206
+ });
207
+ $[6] = gated;
208
+ $[7] = live?.error;
209
+ $[8] = t;
210
+ $[9] = t42;
211
+ } else {
212
+ t42 = $[9];
213
+ }
214
+ let t52;
215
+ if ($[10] !== t) {
216
+ t52 = t("Health endpoint unavailable");
217
+ $[10] = t;
218
+ $[11] = t52;
219
+ } else {
220
+ t52 = $[11];
221
+ }
222
+ let t62;
223
+ if ($[12] !== t42 || $[13] !== t52) {
224
+ t62 = /* @__PURE__ */ jsxDEV(EmptyState, {
225
+ description: t42,
226
+ testId: "deployment-health-error",
227
+ title: t52
228
+ }, void 0, false);
229
+ $[12] = t42;
230
+ $[13] = t52;
231
+ $[14] = t62;
232
+ } else {
233
+ t62 = $[14];
234
+ }
235
+ return t62;
236
+ }
237
+ let t4;
238
+ if ($[15] !== body.status) {
239
+ t4 = statusLevel(body.status);
240
+ $[15] = body.status;
241
+ $[16] = t4;
242
+ } else {
243
+ t4 = $[16];
244
+ }
245
+ const level = t4;
246
+ let statusLabel;
247
+ if (body.status === "unhealthy") {
248
+ let t52;
249
+ if ($[17] !== t) {
250
+ t52 = t("Unhealthy");
251
+ $[17] = t;
252
+ $[18] = t52;
253
+ } else {
254
+ t52 = $[18];
255
+ }
256
+ statusLabel = t52;
257
+ } else {
258
+ if (body.status === "degraded") {
259
+ let t52;
260
+ if ($[19] !== t) {
261
+ t52 = t("Degraded");
262
+ $[19] = t;
263
+ $[20] = t52;
264
+ } else {
265
+ t52 = $[20];
266
+ }
267
+ statusLabel = t52;
268
+ } else {
269
+ let t52;
270
+ if ($[21] !== t) {
271
+ t52 = t("Healthy");
272
+ $[21] = t;
273
+ $[22] = t52;
274
+ } else {
275
+ t52 = $[22];
276
+ }
277
+ statusLabel = t52;
278
+ }
279
+ }
280
+ const readyOk = ready?.ok ?? false;
281
+ const readyLevel = readyOk ? "ok" : "crit";
282
+ let T0;
283
+ let t10;
284
+ let t11;
285
+ let t12;
286
+ let t13;
287
+ let t5;
288
+ let t6;
289
+ let t7;
290
+ let t8;
291
+ let t9;
292
+ if ($[23] !== body.appName || $[24] !== body.appVersion || $[25] !== body.checks || $[26] !== body.timestamp || $[27] !== level || $[28] !== readyLevel || $[29] !== readyOk || $[30] !== statusLabel || $[31] !== t) {
293
+ const checks = [...body.checks].toSorted(_temp);
294
+ t9 = "flex flex-col gap-6";
295
+ t10 = "deployment-health";
296
+ let t142;
297
+ if ($[42] !== t) {
298
+ t142 = t("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint — wire an uptime monitor or a Cloudflare Health Check at it.");
299
+ $[42] = t;
300
+ $[43] = t142;
301
+ } else {
302
+ t142 = $[43];
303
+ }
304
+ if ($[44] !== t142) {
305
+ t11 = /* @__PURE__ */ jsxDEV("p", {
306
+ className: "text-sm text-muted-foreground",
307
+ children: t142
308
+ }, void 0, false);
309
+ $[44] = t142;
310
+ $[45] = t11;
311
+ } else {
312
+ t11 = $[45];
313
+ }
314
+ const t152 = LEVEL_RING[level];
315
+ let t16;
316
+ if ($[46] !== t152) {
317
+ t16 = cn("flex size-10 shrink-0 items-center justify-center rounded-full", t152);
318
+ $[46] = t152;
319
+ $[47] = t16;
320
+ } else {
321
+ t16 = $[47];
322
+ }
323
+ const t17 = LEVEL_DOT[level];
324
+ let t18;
325
+ if ($[48] !== t17) {
326
+ t18 = cn("size-3 rounded-full", t17);
327
+ $[48] = t17;
328
+ $[49] = t18;
329
+ } else {
330
+ t18 = $[49];
331
+ }
332
+ let t19;
333
+ if ($[50] !== t18) {
334
+ t19 = /* @__PURE__ */ jsxDEV("span", {
335
+ className: t18
336
+ }, void 0, false);
337
+ $[50] = t18;
338
+ $[51] = t19;
339
+ } else {
340
+ t19 = $[51];
341
+ }
342
+ let t20;
343
+ if ($[52] !== t16 || $[53] !== t19) {
344
+ t20 = /* @__PURE__ */ jsxDEV("span", {
345
+ "aria-hidden": "true",
346
+ className: t16,
347
+ children: t19
348
+ }, void 0, false);
349
+ $[52] = t16;
350
+ $[53] = t19;
351
+ $[54] = t20;
352
+ } else {
353
+ t20 = $[54];
354
+ }
355
+ let t21;
356
+ if ($[55] !== statusLabel) {
357
+ t21 = /* @__PURE__ */ jsxDEV("span", {
358
+ className: "text-sm font-semibold text-foreground",
359
+ "data-testid": "dh-status",
360
+ children: statusLabel
361
+ }, void 0, false);
362
+ $[55] = statusLabel;
363
+ $[56] = t21;
364
+ } else {
365
+ t21 = $[56];
366
+ }
367
+ let t22;
368
+ if ($[57] !== body.appName || $[58] !== body.appVersion) {
369
+ t22 = /* @__PURE__ */ jsxDEV("span", {
370
+ className: "font-mono text-[13px] text-muted-foreground",
371
+ "data-testid": "dh-app",
372
+ children: [body.appName, " · ", body.appVersion]
373
+ }, void 0, true);
374
+ $[57] = body.appName;
375
+ $[58] = body.appVersion;
376
+ $[59] = t22;
377
+ } else {
378
+ t22 = $[59];
379
+ }
380
+ let t23;
381
+ if ($[60] !== t21 || $[61] !== t22) {
382
+ t23 = /* @__PURE__ */ jsxDEV("div", {
383
+ className: "grid leading-tight",
384
+ children: [t21, t22]
385
+ }, void 0, true);
386
+ $[60] = t21;
387
+ $[61] = t22;
388
+ $[62] = t23;
389
+ } else {
390
+ t23 = $[62];
391
+ }
392
+ let t24;
393
+ if ($[63] !== t20 || $[64] !== t23) {
394
+ t24 = /* @__PURE__ */ jsxDEV("div", {
395
+ className: "flex items-center gap-3",
396
+ children: [t20, t23]
397
+ }, void 0, true);
398
+ $[63] = t20;
399
+ $[64] = t23;
400
+ $[65] = t24;
401
+ } else {
402
+ t24 = $[65];
403
+ }
404
+ let t25;
405
+ if ($[66] !== t) {
406
+ t25 = t("Checked");
407
+ $[66] = t;
408
+ $[67] = t25;
409
+ } else {
410
+ t25 = $[67];
411
+ }
412
+ let t26;
413
+ if ($[68] !== t25) {
414
+ t26 = /* @__PURE__ */ jsxDEV("div", {
415
+ className: "font-mono text-[10px] tracking-wide text-muted-foreground uppercase",
416
+ children: t25
417
+ }, void 0, false);
418
+ $[68] = t25;
419
+ $[69] = t26;
420
+ } else {
421
+ t26 = $[69];
422
+ }
423
+ let t27;
424
+ if ($[70] !== body.timestamp) {
425
+ t27 = formatTimestamp(body.timestamp);
426
+ $[70] = body.timestamp;
427
+ $[71] = t27;
428
+ } else {
429
+ t27 = $[71];
430
+ }
431
+ let t28;
432
+ if ($[72] !== t27) {
433
+ t28 = /* @__PURE__ */ jsxDEV("time", {
434
+ className: "text-[13px] text-muted-foreground",
435
+ "data-testid": "dh-timestamp",
436
+ children: t27
437
+ }, void 0, false);
438
+ $[72] = t27;
439
+ $[73] = t28;
440
+ } else {
441
+ t28 = $[73];
442
+ }
443
+ let t29;
444
+ if ($[74] !== t26 || $[75] !== t28) {
445
+ t29 = /* @__PURE__ */ jsxDEV("div", {
446
+ className: "text-end",
447
+ children: [t26, t28]
448
+ }, void 0, true);
449
+ $[74] = t26;
450
+ $[75] = t28;
451
+ $[76] = t29;
452
+ } else {
453
+ t29 = $[76];
454
+ }
455
+ if ($[77] !== t24 || $[78] !== t29) {
456
+ t12 = /* @__PURE__ */ jsxDEV(Card, {
457
+ className: "gap-0 py-0",
458
+ children: /* @__PURE__ */ jsxDEV("div", {
459
+ className: "flex flex-wrap items-center justify-between gap-4 p-4",
460
+ children: [t24, t29]
461
+ }, void 0, true)
462
+ }, void 0, false);
463
+ $[77] = t24;
464
+ $[78] = t29;
465
+ $[79] = t12;
466
+ } else {
467
+ t12 = $[79];
468
+ }
469
+ let t30;
470
+ if ($[80] !== t) {
471
+ t30 = t("Liveness");
472
+ $[80] = t;
473
+ $[81] = t30;
474
+ } else {
475
+ t30 = $[81];
476
+ }
477
+ let t31;
478
+ if ($[82] !== level || $[83] !== statusLabel || $[84] !== t30) {
479
+ t31 = /* @__PURE__ */ jsxDEV(ProbeTile, {
480
+ label: t30,
481
+ level,
482
+ testId: "dh-liveness",
483
+ value: statusLabel
484
+ }, void 0, false);
485
+ $[82] = level;
486
+ $[83] = statusLabel;
487
+ $[84] = t30;
488
+ $[85] = t31;
489
+ } else {
490
+ t31 = $[85];
491
+ }
492
+ let t32;
493
+ if ($[86] !== t) {
494
+ t32 = t("Readiness");
495
+ $[86] = t;
496
+ $[87] = t32;
497
+ } else {
498
+ t32 = $[87];
499
+ }
500
+ let t33;
501
+ if ($[88] !== readyOk || $[89] !== t) {
502
+ t33 = readyOk ? t("Ready") : t("Not ready");
503
+ $[88] = readyOk;
504
+ $[89] = t;
505
+ $[90] = t33;
506
+ } else {
507
+ t33 = $[90];
508
+ }
509
+ let t34;
510
+ if ($[91] !== readyLevel || $[92] !== t32 || $[93] !== t33) {
511
+ t34 = /* @__PURE__ */ jsxDEV(ProbeTile, {
512
+ label: t32,
513
+ level: readyLevel,
514
+ testId: "dh-readiness",
515
+ value: t33
516
+ }, void 0, false);
517
+ $[91] = readyLevel;
518
+ $[92] = t32;
519
+ $[93] = t33;
520
+ $[94] = t34;
521
+ } else {
522
+ t34 = $[94];
523
+ }
524
+ if ($[95] !== t31 || $[96] !== t34) {
525
+ t13 = /* @__PURE__ */ jsxDEV("div", {
526
+ className: "grid gap-3 sm:grid-cols-2",
527
+ "data-testid": "dh-probes",
528
+ children: [t31, t34]
529
+ }, void 0, true);
530
+ $[95] = t31;
531
+ $[96] = t34;
532
+ $[97] = t13;
533
+ } else {
534
+ t13 = $[97];
535
+ }
536
+ T0 = Card;
537
+ t5 = "gap-0 py-0";
538
+ t6 = "dh-checks";
539
+ let t35;
540
+ if ($[98] !== t) {
541
+ t35 = t("Subsystem checks");
542
+ $[98] = t;
543
+ $[99] = t35;
544
+ } else {
545
+ t35 = $[99];
546
+ }
547
+ if ($[100] !== t35) {
548
+ t7 = /* @__PURE__ */ jsxDEV("header", {
549
+ className: "border-b border-border px-4 py-3",
550
+ children: /* @__PURE__ */ jsxDEV("span", {
551
+ className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
552
+ children: t35
553
+ }, void 0, false)
554
+ }, void 0, false);
555
+ $[100] = t35;
556
+ $[101] = t7;
557
+ } else {
558
+ t7 = $[101];
559
+ }
560
+ t8 = checks.length === 0 ? /* @__PURE__ */ jsxDEV("p", {
561
+ className: "px-4 py-8 text-center text-sm text-muted-foreground",
562
+ "data-testid": "dh-checks-empty",
563
+ children: t("No checks reported.")
564
+ }, void 0, false) : /* @__PURE__ */ jsxDEV("ul", {
565
+ className: "divide-y divide-border",
566
+ children: checks.map((check) => /* @__PURE__ */ jsxDEV("li", {
567
+ className: "flex flex-wrap items-center justify-between gap-2 px-4 py-2.5 text-xs",
568
+ "data-testid": `dh-check-${check.name}`,
569
+ children: [/* @__PURE__ */ jsxDEV("span", {
570
+ className: "flex items-center gap-2",
571
+ children: [/* @__PURE__ */ jsxDEV("span", {
572
+ "aria-hidden": "true",
573
+ className: cn("size-1.5 shrink-0 rounded-full", check.status === "up" ? "bg-success" : "bg-destructive")
574
+ }, void 0, false), /* @__PURE__ */ jsxDEV("span", {
575
+ className: "font-mono text-foreground",
576
+ children: check.name
577
+ }, void 0, false), check.critical && /* @__PURE__ */ jsxDEV(Badge, {
578
+ variant: "outline",
579
+ children: t("Critical")
580
+ }, void 0, false)]
581
+ }, void 0, true), /* @__PURE__ */ jsxDEV("span", {
582
+ className: "flex shrink-0 items-center gap-2",
583
+ children: [check.message !== void 0 && /* @__PURE__ */ jsxDEV("span", {
584
+ className: "text-muted-foreground",
585
+ children: check.message
586
+ }, void 0, false), /* @__PURE__ */ jsxDEV(Badge, {
587
+ "data-testid": `dh-check-status-${check.name}`,
588
+ variant: check.status === "up" ? "secondary" : "destructive",
589
+ children: check.status === "up" ? t("Up") : t("Down")
590
+ }, void 0, false)]
591
+ }, void 0, true)]
592
+ }, check.name, true))
593
+ }, void 0, false);
594
+ $[23] = body.appName;
595
+ $[24] = body.appVersion;
596
+ $[25] = body.checks;
597
+ $[26] = body.timestamp;
598
+ $[27] = level;
599
+ $[28] = readyLevel;
600
+ $[29] = readyOk;
601
+ $[30] = statusLabel;
602
+ $[31] = t;
603
+ $[32] = T0;
604
+ $[33] = t10;
605
+ $[34] = t11;
606
+ $[35] = t12;
607
+ $[36] = t13;
608
+ $[37] = t5;
609
+ $[38] = t6;
610
+ $[39] = t7;
611
+ $[40] = t8;
612
+ $[41] = t9;
613
+ } else {
614
+ T0 = $[32];
615
+ t10 = $[33];
616
+ t11 = $[34];
617
+ t12 = $[35];
618
+ t13 = $[36];
619
+ t5 = $[37];
620
+ t6 = $[38];
621
+ t7 = $[39];
622
+ t8 = $[40];
623
+ t9 = $[41];
624
+ }
625
+ let t14;
626
+ if ($[102] !== T0 || $[103] !== t5 || $[104] !== t6 || $[105] !== t7 || $[106] !== t8) {
627
+ t14 = /* @__PURE__ */ jsxDEV(T0, {
628
+ className: t5,
629
+ "data-testid": t6,
630
+ children: [t7, t8]
631
+ }, void 0, true);
632
+ $[102] = T0;
633
+ $[103] = t5;
634
+ $[104] = t6;
635
+ $[105] = t7;
636
+ $[106] = t8;
637
+ $[107] = t14;
638
+ } else {
639
+ t14 = $[107];
640
+ }
641
+ let t15;
642
+ if ($[108] !== t10 || $[109] !== t11 || $[110] !== t12 || $[111] !== t13 || $[112] !== t14 || $[113] !== t9) {
643
+ t15 = /* @__PURE__ */ jsxDEV("div", {
644
+ className: t9,
645
+ "data-testid": t10,
646
+ children: [t11, t12, t13, t14]
647
+ }, void 0, true);
648
+ $[108] = t10;
649
+ $[109] = t11;
650
+ $[110] = t12;
651
+ $[111] = t13;
652
+ $[112] = t14;
653
+ $[113] = t9;
654
+ $[114] = t15;
655
+ } else {
656
+ t15 = $[114];
657
+ }
658
+ return t15;
659
+ };
660
+ function _temp(a, b) {
661
+ return a.name.localeCompare(b.name);
662
+ }
663
+
664
+ export { DeploymentHealthPanel };
@@ -8,7 +8,7 @@ import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
8
8
  import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
9
9
  import { b as useInvalidateAdmin } from '../packem_shared/use-admin-query-C7JNuQp-.js';
10
10
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
11
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
11
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
12
12
  import { f as fireAndForget, c as callOptions, e as errorMessage, a as adminRef } from '../packem_shared/internal-DzHCc2Rq.js';
13
13
  import { r as recordShard } from '../packem_shared/shard-history-AxiJ1WPP.js';
14
14
  import { jsxDEV } from 'react/jsx-dev-runtime';
@@ -16,7 +16,7 @@ import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
16
16
  import { d as CLOUDFLARE_R2_URL } from '../packem_shared/cf-links-SIbyi4Y1.js';
17
17
  import { useLunora } from '@lunora/react';
18
18
  import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
19
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
19
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
20
20
 
21
21
  const useFileItem = (object, prefix, handlers) => {
22
22
  const $ = c(21);
@@ -7,7 +7,7 @@ import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
7
7
  import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
8
8
  import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
9
9
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
10
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
10
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
11
11
  import { e as errorMessage, i as formatTimestamp, f as fireAndForget, j as dispatchByKind, a as adminRef } from '../packem_shared/internal-DzHCc2Rq.js';
12
12
  import { r as recordShard } from '../packem_shared/shard-history-AxiJ1WPP.js';
13
13
  import { jsxDEV } from 'react/jsx-dev-runtime';
@@ -11,7 +11,7 @@ import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as Table
11
11
  import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
12
12
  import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
13
13
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
14
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
14
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
15
15
  import { i as formatTimestamp } from '../packem_shared/internal-DzHCc2Rq.js';
16
16
  import { c as cn } from '../packem_shared/utils-B05Dmz_H.js';
17
17
  import { jsxDEV } from 'react/jsx-dev-runtime';
@@ -7,7 +7,7 @@ import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
7
7
  import { C as Card } from '../packem_shared/card-F2vH_aj2.js';
8
8
  import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
9
9
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
10
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
10
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
11
11
  import { f as fireAndForget, i as formatTimestamp, c as callOptions, e as errorMessage, a as adminRef } from '../packem_shared/internal-DzHCc2Rq.js';
12
12
  import { l as loadRecentShards } from '../packem_shared/shard-history-AxiJ1WPP.js';
13
13
  import { c as cn } from '../packem_shared/utils-B05Dmz_H.js';