@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
@@ -13,7 +13,7 @@ import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as Table
13
13
  import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
14
14
  import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
15
15
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
16
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
16
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
17
17
  import { i as formatTimestamp, f as fireAndForget, a as adminRef, c as callOptions, e as errorMessage } from '../packem_shared/internal-DzHCc2Rq.js';
18
18
  import { jsxDEV } from 'react/jsx-dev-runtime';
19
19
 
@@ -8,7 +8,7 @@ import { f as fireAndForget, e as errorMessage, k as formatBytes, g as copyToCli
8
8
  import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
9
9
  import { C as Checkbox } from '../packem_shared/checkbox-UNkzAxl-.js';
10
10
  import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
11
- import { b as Sheet, c as SheetContent, d as SheetHeader, e as SheetTitle } from '../packem_shared/studio-LL4iP8fZ.js';
11
+ import { b as Sheet, c as SheetContent, d as SheetHeader, e as SheetTitle } from '../packem_shared/studio-8QSXbZ98.js';
12
12
  import { c } from 'react/compiler-runtime';
13
13
  import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
14
14
  import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
@@ -6,10 +6,12 @@ import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as Table
6
6
  import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
7
7
  import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
8
8
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
9
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
9
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
10
10
  import { i as formatTimestamp } from '../packem_shared/internal-DzHCc2Rq.js';
11
11
  import { jsxDEV } from 'react/jsx-dev-runtime';
12
12
 
13
+ const SUBSCRIPTIONS_TABLE = "subscriptions";
14
+ const NO_ARGS = {};
13
15
  const ACTIVE_STATES = /* @__PURE__ */ new Set(["active", "trialing"]);
14
16
  const ALERT_STATES = /* @__PURE__ */ new Set(["past_due", "unpaid"]);
15
17
  const readField = (row, key) => {
@@ -44,6 +46,13 @@ const PaymentsPanel = ({
44
46
  limit = 100
45
47
  }) => {
46
48
  const t = useT();
49
+ const {
50
+ data: tables
51
+ } = useAdminQuery(ADMIN_FUNCTIONS.listTables, NO_ARGS, {
52
+ live: true
53
+ });
54
+ const loadedTables = tables !== void 0;
55
+ const hasPaymentTables = Array.isArray(tables) && tables.some((table) => table.name === SUBSCRIPTIONS_TABLE);
47
56
  const subscriptionsQuery = useAdminQuery(ADMIN_FUNCTIONS.readTablePage, {
48
57
  filters: [],
49
58
  limit,
@@ -51,6 +60,8 @@ const PaymentsPanel = ({
51
60
  orderBy: [],
52
61
  search: "",
53
62
  table: "subscriptions"
63
+ }, {
64
+ enabled: hasPaymentTables
54
65
  });
55
66
  const eventsQuery = useAdminQuery(ADMIN_FUNCTIONS.readTablePage, {
56
67
  filters: [],
@@ -59,8 +70,13 @@ const PaymentsPanel = ({
59
70
  orderBy: [],
60
71
  search: "",
61
72
  table: "events"
73
+ }, {
74
+ enabled: hasPaymentTables
62
75
  });
63
76
  useAutoRefresh(() => {
77
+ if (!hasPaymentTables) {
78
+ return;
79
+ }
64
80
  subscriptionsQuery.refetch();
65
81
  eventsQuery.refetch();
66
82
  }, true);
@@ -70,6 +86,17 @@ const PaymentsPanel = ({
70
86
  const errorSource = subscriptionsQuery.error === null ? eventsQuery.errorSource : subscriptionsQuery.errorSource;
71
87
  const activeCount = subscriptions.filter((row) => ACTIVE_STATES.has(text(readField(row, "state")))).length;
72
88
  const recentEvents = events.toSorted((a, b) => Number(readField(b, "processedAt") ?? 0) - Number(readField(a, "processedAt") ?? 0));
89
+ if (loadedTables && !hasPaymentTables) {
90
+ return /* @__PURE__ */ jsxDEV("div", {
91
+ className: "flex flex-col gap-4",
92
+ "data-testid": "payments-panel",
93
+ children: /* @__PURE__ */ jsxDEV(EmptyState, {
94
+ description: t("No @lunora/payment tables found in this deployment. Declare the store tables (subscriptions, events, …) in lunora/schema.ts and wire `payment` on createShardDO() to sync customers and subscriptions."),
95
+ testId: "payments-unconfigured",
96
+ title: t("No payments configured")
97
+ }, void 0, false)
98
+ }, void 0, false);
99
+ }
73
100
  return /* @__PURE__ */ jsxDEV("div", {
74
101
  className: "flex flex-col gap-4",
75
102
  "data-testid": "payments-panel",
@@ -9,7 +9,7 @@ import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
9
9
  import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
10
10
  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';
11
11
  import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
12
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
12
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
13
13
  import { jsxDEV } from 'react/jsx-dev-runtime';
14
14
  import { useLunora } from '@lunora/react';
15
15
  import { ShardInput } from '../packem_shared/ShardInput-CZnpHILL.js';
@@ -14,7 +14,7 @@ import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
14
14
  import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
15
15
  import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
16
16
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
17
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
17
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
18
18
  import { c as callOptions, e as errorMessage, a as adminRef, f as fireAndForget, i as formatTimestamp } from '../packem_shared/internal-DzHCc2Rq.js';
19
19
  import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
20
20
 
@@ -6,7 +6,7 @@ import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
6
6
  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';
7
7
  import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
8
8
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
9
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
9
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
10
10
  import { jsxDEV } from 'react/jsx-dev-runtime';
11
11
 
12
12
  const OPERATIONS = ["read", "insert", "update", "delete"];
@@ -6,7 +6,7 @@ import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
6
6
  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';
7
7
  import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
8
8
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
9
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
9
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
10
10
  import { jsxDEV } from 'react/jsx-dev-runtime';
11
11
 
12
12
  const operationLabel = (t, operation) => ({
@@ -10,7 +10,7 @@ import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js
10
10
  import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
11
11
  import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
12
12
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
13
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
13
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
14
14
  import { jsxDEV } from 'react/jsx-dev-runtime';
15
15
 
16
16
  const ARGS_MAX = 80;
@@ -10,9 +10,10 @@ import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
10
10
  import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
11
11
  import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
12
12
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
13
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
13
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
14
14
  import { i as formatTimestamp } from '../packem_shared/internal-DzHCc2Rq.js';
15
15
  import { r as recordShard } from '../packem_shared/shard-history-AxiJ1WPP.js';
16
+ import { p as peekPendingTraceFilter, c as clearPendingTraceFilter } from '../packem_shared/trace-handoff-CGolF3KS.js';
16
17
  import { c as cn } from '../packem_shared/utils-B05Dmz_H.js';
17
18
  import { jsxDEV } from 'react/jsx-dev-runtime';
18
19
 
@@ -38,7 +39,7 @@ const filterTraces = (traces, search) => {
38
39
  if (needle === "") {
39
40
  return [...traces];
40
41
  }
41
- return traces.filter((trace) => trace.rootName.toLowerCase().includes(needle) || trace.functionPath.toLowerCase().includes(needle));
42
+ return traces.filter((trace) => trace.rootName.toLowerCase().includes(needle) || trace.functionPath.toLowerCase().includes(needle) || trace.traceId.toLowerCase().includes(needle));
42
43
  };
43
44
  const formatSpanDuration = (durationMs) => {
44
45
  if (!Number.isFinite(durationMs)) {
@@ -490,40 +491,49 @@ const TraceRow = (t0) => {
490
491
  return t20;
491
492
  };
492
493
  const TracesPanel = (t0) => {
493
- const $ = c(43);
494
+ const $ = c(44);
494
495
  const {
495
496
  initialShardKey
496
497
  } = t0;
497
498
  const t = useT();
498
- const [shardKey, setShardKey] = useState(initialShardKey ?? "");
499
- const [search, setSearch] = useState("");
499
+ const [pending] = useState(peekPendingTraceFilter);
500
+ const [shardKey, setShardKey] = useState(pending?.shardKey !== void 0 && pending.shardKey !== "" ? pending.shardKey : initialShardKey ?? "");
501
+ const [search, setSearch] = useState(pending?.traceId ?? "");
500
502
  const [expanded, setExpanded] = useState(_temp);
501
503
  let t1;
502
- if ($[0] !== shardKey) {
503
- t1 = shardKey.trim();
504
- $[0] = shardKey;
505
- $[1] = t1;
504
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
505
+ t1 = [];
506
+ $[0] = t1;
506
507
  } else {
507
- t1 = $[1];
508
+ t1 = $[0];
508
509
  }
509
- const debouncedShard = useDebounced(t1, 400);
510
+ useEffect(_temp2, t1);
510
511
  let t2;
511
- if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
512
- t2 = {};
512
+ if ($[1] !== shardKey) {
513
+ t2 = shardKey.trim();
514
+ $[1] = shardKey;
513
515
  $[2] = t2;
514
516
  } else {
515
517
  t2 = $[2];
516
518
  }
519
+ const debouncedShard = useDebounced(t2, 400);
517
520
  let t3;
518
- if ($[3] !== debouncedShard) {
519
- t3 = {
521
+ if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
522
+ t3 = {};
523
+ $[3] = t3;
524
+ } else {
525
+ t3 = $[3];
526
+ }
527
+ let t4;
528
+ if ($[4] !== debouncedShard) {
529
+ t4 = {
520
530
  live: true,
521
531
  shardKey: debouncedShard
522
532
  };
523
- $[3] = debouncedShard;
524
- $[4] = t3;
533
+ $[4] = debouncedShard;
534
+ $[5] = t4;
525
535
  } else {
526
- t3 = $[4];
536
+ t4 = $[5];
527
537
  }
528
538
  const {
529
539
  data,
@@ -531,44 +541,44 @@ const TracesPanel = (t0) => {
531
541
  errorSource,
532
542
  isLoading,
533
543
  liveError
534
- } = useAdminQuery(ADMIN_FUNCTIONS.getTraces, t2, t3);
535
- let t4;
544
+ } = useAdminQuery(ADMIN_FUNCTIONS.getTraces, t3, t4);
536
545
  let t5;
537
- if ($[5] !== data || $[6] !== debouncedShard) {
538
- t4 = () => {
546
+ let t6;
547
+ if ($[6] !== data || $[7] !== debouncedShard) {
548
+ t5 = () => {
539
549
  if (data !== void 0) {
540
550
  recordShard(debouncedShard);
541
551
  }
542
552
  };
543
- t5 = [data, debouncedShard];
544
- $[5] = data;
545
- $[6] = debouncedShard;
546
- $[7] = t4;
553
+ t6 = [data, debouncedShard];
554
+ $[6] = data;
555
+ $[7] = debouncedShard;
547
556
  $[8] = t5;
557
+ $[9] = t6;
548
558
  } else {
549
- t4 = $[7];
550
559
  t5 = $[8];
560
+ t6 = $[9];
551
561
  }
552
- useEffect(t4, t5);
553
- let t6;
554
- if ($[9] !== data || $[10] !== error || $[11] !== errorSource || $[12] !== expanded || $[13] !== isLoading || $[14] !== liveError || $[15] !== search || $[16] !== shardKey || $[17] !== t) {
562
+ useEffect(t5, t6);
563
+ let t7;
564
+ if ($[10] !== data || $[11] !== error || $[12] !== errorSource || $[13] !== expanded || $[14] !== isLoading || $[15] !== liveError || $[16] !== search || $[17] !== shardKey || $[18] !== t) {
555
565
  const traces = tracesOf(data);
556
566
  const total = data?.total ?? traces.length;
557
567
  const truncated = total > traces.length;
558
568
  const filtered = filterTraces(traces, search);
559
- let t7;
560
- if ($[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
561
- t7 = (event) => {
569
+ let t8;
570
+ if ($[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
571
+ t8 = (event) => {
562
572
  setSearch(event.target.value);
563
573
  };
564
- $[19] = t7;
574
+ $[20] = t8;
565
575
  } else {
566
- t7 = $[19];
576
+ t8 = $[20];
567
577
  }
568
- const onSearchChange = t7;
569
- let t8;
570
- if ($[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
571
- t8 = (traceId) => {
578
+ const onSearchChange = t8;
579
+ let t9;
580
+ if ($[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
581
+ t9 = (traceId) => {
572
582
  setExpanded((previous) => {
573
583
  const next = new Set(previous);
574
584
  if (next.has(traceId)) {
@@ -579,96 +589,96 @@ const TracesPanel = (t0) => {
579
589
  return next;
580
590
  });
581
591
  };
582
- $[20] = t8;
592
+ $[21] = t9;
583
593
  } else {
584
- t8 = $[20];
594
+ t9 = $[21];
585
595
  }
586
- const onToggle = t8;
596
+ const onToggle = t9;
587
597
  const showEmpty = error === null && filtered.length === 0 && !isLoading;
588
- let t9;
589
- if ($[21] !== shardKey) {
590
- t9 = /* @__PURE__ */ jsxDEV(ShardInput, {
598
+ let t10;
599
+ if ($[22] !== shardKey) {
600
+ t10 = /* @__PURE__ */ jsxDEV(ShardInput, {
591
601
  onChange: setShardKey,
592
602
  testId: "tr-shard-input",
593
603
  value: shardKey
594
604
  }, void 0, false);
595
- $[21] = shardKey;
596
- $[22] = t9;
605
+ $[22] = shardKey;
606
+ $[23] = t10;
597
607
  } else {
598
- t9 = $[22];
599
- }
600
- let t10;
601
- if ($[23] !== t) {
602
- t10 = t("Search traces");
603
- $[23] = t;
604
- $[24] = t10;
605
- } else {
606
- t10 = $[24];
608
+ t10 = $[23];
607
609
  }
608
610
  let t11;
609
- if ($[25] !== t) {
610
- t11 = t("search trace or function");
611
- $[25] = t;
612
- $[26] = t11;
611
+ if ($[24] !== t) {
612
+ t11 = t("Search traces");
613
+ $[24] = t;
614
+ $[25] = t11;
613
615
  } else {
614
- t11 = $[26];
616
+ t11 = $[25];
615
617
  }
616
618
  let t12;
617
- if ($[27] !== search || $[28] !== t10 || $[29] !== t11) {
618
- t12 = /* @__PURE__ */ jsxDEV(Input, {
619
- "aria-label": t10,
619
+ if ($[26] !== t) {
620
+ t12 = t("search trace or function");
621
+ $[26] = t;
622
+ $[27] = t12;
623
+ } else {
624
+ t12 = $[27];
625
+ }
626
+ let t13;
627
+ if ($[28] !== search || $[29] !== t11 || $[30] !== t12) {
628
+ t13 = /* @__PURE__ */ jsxDEV(Input, {
629
+ "aria-label": t11,
620
630
  className: "h-8 w-56",
621
631
  "data-testid": "tr-search",
622
632
  onChange: onSearchChange,
623
- placeholder: t11,
633
+ placeholder: t12,
624
634
  value: search
625
635
  }, void 0, false);
626
- $[27] = search;
627
- $[28] = t10;
636
+ $[28] = search;
628
637
  $[29] = t11;
629
638
  $[30] = t12;
639
+ $[31] = t13;
630
640
  } else {
631
- t12 = $[30];
641
+ t13 = $[31];
632
642
  }
633
- let t13;
634
- if ($[31] !== liveError) {
635
- t13 = /* @__PURE__ */ jsxDEV(LiveError, {
643
+ let t14;
644
+ if ($[32] !== liveError) {
645
+ t14 = /* @__PURE__ */ jsxDEV(LiveError, {
636
646
  message: liveError,
637
647
  prefix: "tr"
638
648
  }, void 0, false);
639
- $[31] = liveError;
640
- $[32] = t13;
649
+ $[32] = liveError;
650
+ $[33] = t14;
641
651
  } else {
642
- t13 = $[32];
652
+ t14 = $[33];
643
653
  }
644
- let t14;
645
- if ($[33] !== t12 || $[34] !== t13 || $[35] !== t9) {
646
- t14 = /* @__PURE__ */ jsxDEV("div", {
654
+ let t15;
655
+ if ($[34] !== t10 || $[35] !== t13 || $[36] !== t14) {
656
+ t15 = /* @__PURE__ */ jsxDEV("div", {
647
657
  className: "flex flex-wrap items-center gap-2",
648
- children: [t9, t12, t13]
658
+ children: [t10, t13, t14]
649
659
  }, void 0, true);
650
- $[33] = t12;
651
- $[34] = t13;
652
- $[35] = t9;
660
+ $[34] = t10;
661
+ $[35] = t13;
653
662
  $[36] = t14;
663
+ $[37] = t15;
654
664
  } else {
655
- t14 = $[36];
665
+ t15 = $[37];
656
666
  }
657
- let t15;
658
- if ($[37] !== error || $[38] !== errorSource) {
659
- t15 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
667
+ let t16;
668
+ if ($[38] !== error || $[39] !== errorSource) {
669
+ t16 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
660
670
  error: errorSource,
661
671
  testId: "tr-error"
662
672
  }, void 0, false);
663
- $[37] = error;
664
- $[38] = errorSource;
665
- $[39] = t15;
673
+ $[38] = error;
674
+ $[39] = errorSource;
675
+ $[40] = t16;
666
676
  } else {
667
- t15 = $[39];
677
+ t16 = $[40];
668
678
  }
669
- let t16;
670
- if ($[40] !== showEmpty || $[41] !== t) {
671
- t16 = showEmpty && /* @__PURE__ */ jsxDEV(EmptyState, {
679
+ let t17;
680
+ if ($[41] !== showEmpty || $[42] !== t) {
681
+ t17 = showEmpty && /* @__PURE__ */ jsxDEV(EmptyState, {
672
682
  description: t("Traces recorded with ctx.trace show up here as your app handles traffic. The span buffer resets when the shard hibernates."),
673
683
  icon: /* @__PURE__ */ jsxDEV("svg", {
674
684
  "aria-hidden": "true",
@@ -685,16 +695,16 @@ const TracesPanel = (t0) => {
685
695
  testId: "tr-empty",
686
696
  title: t("No traces")
687
697
  }, void 0, false);
688
- $[40] = showEmpty;
689
- $[41] = t;
690
- $[42] = t16;
698
+ $[41] = showEmpty;
699
+ $[42] = t;
700
+ $[43] = t17;
691
701
  } else {
692
- t16 = $[42];
702
+ t17 = $[43];
693
703
  }
694
- t6 = /* @__PURE__ */ jsxDEV("div", {
704
+ t7 = /* @__PURE__ */ jsxDEV("div", {
695
705
  className: "flex flex-col gap-4",
696
706
  "data-testid": "lunora-traces-panel",
697
- children: [t14, t15, t16, error === null && truncated && /* @__PURE__ */ jsxDEV("p", {
707
+ children: [t15, t16, t17, error === null && truncated && /* @__PURE__ */ jsxDEV("p", {
698
708
  className: "text-xs text-muted-foreground",
699
709
  "data-testid": "tr-truncated",
700
710
  children: t("Showing the {shown} most recent of {total} traces in the buffer.", {
@@ -712,23 +722,26 @@ const TracesPanel = (t0) => {
712
722
  }, trace.traceId, false))
713
723
  }, void 0, false)]
714
724
  }, void 0, true);
715
- $[9] = data;
716
- $[10] = error;
717
- $[11] = errorSource;
718
- $[12] = expanded;
719
- $[13] = isLoading;
720
- $[14] = liveError;
721
- $[15] = search;
722
- $[16] = shardKey;
723
- $[17] = t;
724
- $[18] = t6;
725
- } else {
726
- t6 = $[18];
727
- }
728
- return t6;
725
+ $[10] = data;
726
+ $[11] = error;
727
+ $[12] = errorSource;
728
+ $[13] = expanded;
729
+ $[14] = isLoading;
730
+ $[15] = liveError;
731
+ $[16] = search;
732
+ $[17] = shardKey;
733
+ $[18] = t;
734
+ $[19] = t7;
735
+ } else {
736
+ t7 = $[19];
737
+ }
738
+ return t7;
729
739
  };
730
740
  function _temp() {
731
741
  return /* @__PURE__ */ new Set();
732
742
  }
743
+ function _temp2() {
744
+ clearPendingTraceFilter();
745
+ }
733
746
 
734
747
  export { TracesPanel };
@@ -8,7 +8,7 @@ import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as Table
8
8
  import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
9
9
  import { u as useAdminQuery } 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, e as errorMessage, c as callOptions, a as adminRef } from '../packem_shared/internal-DzHCc2Rq.js';
13
13
  import { jsxDEV } from 'react/jsx-dev-runtime';
14
14
 
@@ -12,17 +12,20 @@ const ADMIN_FUNCTIONS = {
12
12
  facetColumn: "__lunora_admin__:facetColumn",
13
13
  getAdvisories: "__lunora_admin__:getAdvisories",
14
14
  getAuditLog: "__lunora_admin__:getAuditLog",
15
+ getAuthAuditLog: "__lunora_admin__:getAuthAuditLog",
15
16
  getAuthMetrics: "__lunora_admin__:getAuthMetrics",
16
17
  getCapturedMail: "__lunora_admin__:getCapturedMail",
17
18
  getFanoutMetrics: "__lunora_admin__:getFanoutMetrics",
18
19
  getFunctionStats: "__lunora_admin__:getFunctionStats",
19
20
  getIssues: "__lunora_admin__:getIssues",
20
21
  listFlags: "__lunora_admin__:listFlags",
22
+ listPushSubscriptions: "__lunora_admin__:listPushSubscriptions",
21
23
  listQueues: "__lunora_admin__:listQueues",
22
24
  listSubscriptions: "__lunora_admin__:listSubscriptions",
23
25
  listTableIndexes: "__lunora_admin__:listTableIndexes",
24
26
  listWorkflows: "__lunora_admin__:listWorkflows",
25
27
  getLogs: "__lunora_admin__:getLogs",
28
+ getMetricHistory: "__lunora_admin__:getMetricHistory",
26
29
  getMetricSeries: "__lunora_admin__:getMetricSeries",
27
30
  getMetrics: "__lunora_admin__:getMetrics",
28
31
  getPitrBookmark: "__lunora_admin__:getPitrBookmark",
@@ -4,7 +4,7 @@ import { useState, useEffect } from 'react';
4
4
  import { B as Button } from './button-BhsN2uZH.js';
5
5
  import { E as EmptyState } from './empty-state-DY_oe0k6.js';
6
6
  import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
7
- import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-C1LXrovV.js';
7
+ import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-P2UzJscH.js';
8
8
  import { c as callOptions, a as adminRef, g as copyToClipboard } from './internal-DzHCc2Rq.js';
9
9
  import { jsxDEV } from 'react/jsx-dev-runtime';
10
10
 
@@ -5,7 +5,7 @@ import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
5
5
  import { ShardInput } from './ShardInput-CZnpHILL.js';
6
6
  import { E as EmptyState } from './empty-state-DY_oe0k6.js';
7
7
  import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
8
- import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-C1LXrovV.js';
8
+ import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-P2UzJscH.js';
9
9
  import { h as formatCell, f as fireAndForget, c as callOptions, a as adminRef, i as formatTimestamp } from './internal-DzHCc2Rq.js';
10
10
  import { useReactTable, getSortedRowModel, getCoreRowModel, flexRender } from '@tanstack/react-table';
11
11
  import { useVirtualizer } from '@tanstack/react-virtual';
@@ -6,9 +6,9 @@ import './card-F2vH_aj2.js';
6
6
  import './empty-state-DY_oe0k6.js';
7
7
  import './use-admin-query-C7JNuQp-.js';
8
8
  import './DEFAULT_LOCALE-CiX4W7Kr.js';
9
- import './ADMIN_FUNCTIONS-C1LXrovV.js';
9
+ import './ADMIN_FUNCTIONS-P2UzJscH.js';
10
10
  import './internal-DzHCc2Rq.js';
11
11
  import './utils-B05Dmz_H.js';
12
12
  import './DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js';
13
- export { H as HomePanel } from './home-panel-Dmg4sNiv.js';
13
+ export { H as HomePanel } from './home-panel-BRAA2UlM.js';
14
14
  import 'react/jsx-dev-runtime';
@@ -1,12 +1,12 @@
1
1
  import 'react/compiler-runtime';
2
2
  import '@tanstack/react-router';
3
3
  import 'react';
4
- export { S as Studio } from './studio-LL4iP8fZ.js';
4
+ export { S as Studio } from './studio-8QSXbZ98.js';
5
5
  import './ErrorBoundary-BzAApI7J.js';
6
6
  import './badge-B2PKA1-5.js';
7
7
  import './input-XH4r1Pt1.js';
8
8
  import './skeleton-CGhL0p20.js';
9
- import './home-panel-Dmg4sNiv.js';
9
+ import './home-panel-BRAA2UlM.js';
10
10
  import './DEFAULT_LOCALE-CiX4W7Kr.js';
11
11
  import './StudioI18nProvider-B-tDCZIi.js';
12
12
  import './data-view-params-Cd6yRVbv.js';
@@ -3,7 +3,7 @@ import { LunoraClient } from '@lunora/client';
3
3
  import { LunoraProvider } from '@lunora/react';
4
4
  import { useState, useEffect } from 'react';
5
5
  import { ErrorBoundary } from './ErrorBoundary-BzAApI7J.js';
6
- import { u as useTheme, B as BrandMark, T as ThemeProvider, a as TooltipProvider, S as Studio } from './studio-LL4iP8fZ.js';
6
+ import { u as useTheme, B as BrandMark, T as ThemeProvider, a as TooltipProvider, S as Studio } from './studio-8QSXbZ98.js';
7
7
  import useDebounced from './useDebounced-Dxncpg6z.js';
8
8
  import { useT, createStudioI18n } from './DEFAULT_LOCALE-CiX4W7Kr.js';
9
9
  import { StudioI18nProvider } from './StudioI18nProvider-B-tDCZIi.js';
@@ -92,7 +92,7 @@ interface FunctionDescriptor {
92
92
  /** Outcome of a single `FunctionRunner` invocation. */
93
93
  type RunStatus = "error" | "idle" | "running" | "success";
94
94
  /** Identifier for each built-in studio tab. */
95
- type StudioTab = "agents" | "analytics" | "api" | "audit" | "authConfig" | "authSessions" | "containers" | "dashboards" | "data" | "drains" | "export" | "fanout" | "files" | "flags" | "functions" | "health" | "home" | "insights" | "issues" | "kv" | "logs" | "mail" | "metrics" | "migrations" | "organizations" | "payments" | "permissions" | "pitr" | "queues" | "realtime" | "rls" | "schedule" | "schema" | "security" | "settings" | "sql" | "storageRules" | "traces" | "users" | "vectors" | "workflows";
95
+ type StudioTab = "agents" | "analytics" | "api" | "audit" | "authAudit" | "authConfig" | "authSessions" | "containers" | "dashboards" | "data" | "deploymentHealth" | "drains" | "export" | "fanout" | "files" | "flags" | "functions" | "health" | "home" | "insights" | "issues" | "kv" | "logs" | "mail" | "metrics" | "migrations" | "notifications" | "organizations" | "payments" | "permissions" | "pitr" | "queues" | "realtime" | "rls" | "schedule" | "schema" | "security" | "settings" | "sql" | "storageRules" | "traces" | "users" | "vectors" | "workflows";
96
96
  interface StudioProps {
97
97
  /**
98
98
  * URL path prefix the studio is mounted under, passed to the router as its
@@ -6,7 +6,7 @@ import { a as CardContent, C as Card } from './card-F2vH_aj2.js';
6
6
  import { E as EmptyState } from './empty-state-DY_oe0k6.js';
7
7
  import { u as useAdminQuery } from './use-admin-query-C7JNuQp-.js';
8
8
  import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
9
- import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-C1LXrovV.js';
9
+ import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-P2UzJscH.js';
10
10
  import { f as fireAndForget, c as callOptions, a as adminRef, r as resolveOrigin, g as copyToClipboard, k as formatBytes } from './internal-DzHCc2Rq.js';
11
11
  import { c as cn } from './utils-B05Dmz_H.js';
12
12
  import { deriveInsights } from './DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js';