@lunora/studio 1.0.0-alpha.1 → 1.0.0-alpha.10
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/__assets__/package-og.svg +1 -1
- package/dist/index.d.ts +15 -14
- package/dist/index.js +34 -34
- package/dist/mount.d.ts +1 -1
- package/dist/mount.js +1 -1
- package/dist/packem_shared/{ADMIN_FUNCTION_PREFIX-DmBqMZ-z.js → ADMIN_FUNCTIONS-DjXgvJb6.js} +1 -0
- package/dist/packem_shared/{ApiDocsPanel-DpRjJhG5.js → ApiDocsPanel-yVSGHK3H.js} +3 -3
- package/dist/packem_shared/{ApiReferencePanel-DMIUp-kK.js → ApiReferencePanel-1vubqG5s.js} +2 -2
- package/dist/packem_shared/{ApiTab-DURGU15e.js → ApiTab-rwttyQ1-.js} +4 -4
- package/dist/packem_shared/{AuditPanel-BC59Nhst.js → AuditPanel-D9Eh7j7E.js} +19 -31
- package/dist/packem_shared/{CommandPalette-Dx_CoB9i.js → CommandPalette-BtgkBzZI.js} +2 -2
- package/dist/packem_shared/{ConfirmButton-WQVUoGFb.js → ConfirmButton-C2eVi2Qv.js} +1 -1
- package/dist/packem_shared/{ConnectionBadge-Bxagrip8.js → ConnectionBadge-B2DDM2Tn.js} +1 -1
- package/dist/packem_shared/{createStudioI18n-CgvlmDkN.js → DEFAULT_LOCALE-CiX4W7Kr.js} +1 -1
- package/dist/packem_shared/{DataBrowser-Coz6jJE6.js → DataBrowser-CyckZRwj.js} +115 -177
- package/dist/packem_shared/{ExportImportPanel-WO34fJxy.js → ExportImportPanel-BGJqFK9X.js} +9 -5
- package/dist/packem_shared/{FileBrowser-Zcr-Qgxo.js → FileBrowser-0pCpdKPE.js} +7 -7
- package/dist/packem_shared/{FunctionRunner-j0Rd5m9t.js → FunctionRunner-7NH3KcTg.js} +4 -4
- package/dist/packem_shared/{FunctionStatsPanel-DboBl-XL.js → FunctionStatsPanel-CXynSuqT.js} +141 -198
- package/dist/packem_shared/{GlobalDataBrowser-9MhPEfgN.js → GlobalDataBrowser-DAxzB-Br.js} +37 -66
- package/dist/packem_shared/{HealthPanel-DOIgbUtx.js → HealthPanel-CyLs7qZm.js} +31 -23
- package/dist/packem_shared/{HomePanel-bdOCNA-p.js → HomePanel-BOkFRbuj.js} +450 -389
- package/dist/packem_shared/{InsightsPanel-DaZPnSgt.js → InsightsPanel-CvXMoZuv.js} +104 -66
- package/dist/packem_shared/{LogsPanel-CWdqAGpQ.js → LogsPanel-BrUstOk6.js} +35 -47
- package/dist/packem_shared/{MailPanel-D_EGtDnS.js → MailPanel-GnnrNqL6.js} +31 -38
- package/dist/packem_shared/{MetricsPanel-E4Gv6wTO.js → MetricsPanel-BN_uUU-_.js} +34 -48
- package/dist/packem_shared/{MigrationsPanel-DQdPY9io.js → MigrationsPanel-DaZuUHje.js} +31 -38
- package/dist/packem_shared/{OpenRpcReferencePanel-j2p3HB0s.js → OpenRpcReferencePanel-vbcYbv3V.js} +2 -2
- package/dist/packem_shared/{PitrPanel-BbBkQR6t.js → PitrPanel-LJGNP_IX.js} +4 -4
- package/dist/packem_shared/{ScheduledJobs-Ok1CYYwI.js → ScheduledJobs-UmVaMbJy.js} +164 -61
- package/dist/packem_shared/{SchemaViewer-D8XGnp-X.js → SchemaViewer-Bam6ylvw.js} +4 -4
- package/dist/packem_shared/{SecurityAdvisorPanel-Cdm2IxLW.js → SecurityAdvisorPanel-DTmjUNqt.js} +44 -31
- package/dist/packem_shared/SettingsPanel-C2wDK-8F.js +390 -0
- package/dist/packem_shared/{ShardInput-DNCsT1KW.js → ShardInput-gx_DZXXn.js} +1 -1
- package/dist/packem_shared/SqlEditorPanel-D5wMIxcg.js +13 -0
- package/dist/packem_shared/Studio-DpgYe4qt.js +33 -0
- package/dist/packem_shared/{StudioApp-dvywkJ8I.js → StudioApp-C7aaizqc.js} +278 -4
- package/dist/packem_shared/{StudioI18nProvider-Dcajsznk.js → StudioI18nProvider-B-tDCZIi.js} +1 -1
- package/dist/packem_shared/{TableEditor-DIVDk3vT.js → TableEditor-DzK3Z6rL.js} +4 -4
- package/dist/packem_shared/{advisor-view-DBlzJi6C.js → advisor-view-CGcfMiPq.js} +1 -1
- package/dist/packem_shared/{app.d-CCmwDEVs.d.ts → app.d-Nbhpihxv.d.ts} +1 -1
- package/dist/packem_shared/{cf-links-BZfRdxSE.js → cf-links-2cktDedA.js} +1 -1
- package/dist/packem_shared/{data-grid-CCh2Couo.js → data-grid-B5CaV3wS.js} +2 -2
- package/dist/packem_shared/{grid-features-DTjG6Sex.js → grid-features-CzUfqgsM.js} +3 -3
- package/dist/packem_shared/{internal-BBZYexre.js → internal-rXJEAhXS.js} +1 -1
- package/dist/packem_shared/{live-status-bPff1O7Y.js → live-status-FZ0psC1z.js} +1 -1
- package/dist/packem_shared/{reference-view-BCKIoai7.js → reference-view-B4E49Lip.js} +3 -3
- package/dist/packem_shared/{sql-editor-panel-CW2y2x9h.js → sql-editor-panel-Smfl_FDF.js} +6 -6
- package/dist/packem_shared/{studio-BDVd7rIV.js → studio-9Mq0PdMi.js} +2120 -1592
- package/dist/packem_shared/{table-list-sidebar-aZHLq70w.js → table-list-sidebar-Bg7uzbvC.js} +2 -2
- package/dist/packem_shared/use-admin-query-4JQW2rr1.js +88 -0
- package/dist/standalone/studio.js +176 -154
- package/dist/styles.css +1 -1
- package/package.json +13 -12
- package/dist/packem_shared/SettingsPanel-D3WF2mBU.js +0 -176
- package/dist/packem_shared/SqlEditorPanel-BuQ7f2Hs.js +0 -13
- package/dist/packem_shared/Studio-D36od9Oz.js +0 -33
- package/dist/packem_shared/use-live-admin-D1h1Fzsd.js +0 -73
- package/dist/packem_shared/use-live-shard-seed-B74RYcOy.js +0 -76
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useLunora } from '@lunora/react';
|
|
3
3
|
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
4
|
-
import ConnectionBadge from './ConnectionBadge-
|
|
5
|
-
import { L as LiveError } from './live-status-
|
|
4
|
+
import ConnectionBadge from './ConnectionBadge-B2DDM2Tn.js';
|
|
5
|
+
import { L as LiveError } from './live-status-FZ0psC1z.js';
|
|
6
6
|
import { B as Badge } from './badge-B2PKA1-5.js';
|
|
7
7
|
import { C as Card } from './card-DURq3ElK.js';
|
|
8
|
-
import { u as
|
|
9
|
-
import { useT } from './
|
|
10
|
-
import { ADMIN_FUNCTIONS } from './
|
|
11
|
-
import { f as fireAndForget,
|
|
8
|
+
import { u as useAdminQuery } from './use-admin-query-4JQW2rr1.js';
|
|
9
|
+
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
10
|
+
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-DjXgvJb6.js';
|
|
11
|
+
import { f as fireAndForget, b as formatTimestamp, c as callOptions, e as errorMessage, a as adminRef } from './internal-rXJEAhXS.js';
|
|
12
12
|
import { l as loadRecentShards } from './shard-history-DyebH1R5.js';
|
|
13
13
|
import { c as cn } from './utils-B05Dmz_H.js';
|
|
14
14
|
import { shardsToAggregate } from './aggregateMetrics-D4nUHEKU.js';
|
|
@@ -333,7 +333,6 @@ const HealthPanel = ({
|
|
|
333
333
|
const [auth, setAuth] = useState(null);
|
|
334
334
|
const [scheduler, setScheduler] = useState(null);
|
|
335
335
|
const [migrations, setMigrations] = useState([]);
|
|
336
|
-
const [liveError, setLiveError] = useState(void 0);
|
|
337
336
|
const [recentShards] = useState(loadRecentShards);
|
|
338
337
|
const inFlightRef = useRef(false);
|
|
339
338
|
const mountedRef = useRef(true);
|
|
@@ -387,10 +386,19 @@ const HealthPanel = ({
|
|
|
387
386
|
clearTimeout(trailingTimerRef.current);
|
|
388
387
|
}
|
|
389
388
|
}, []);
|
|
390
|
-
|
|
391
|
-
|
|
389
|
+
const {
|
|
390
|
+
data: liveMetrics,
|
|
391
|
+
liveError
|
|
392
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.getMetrics, {}, {
|
|
393
|
+
live: true,
|
|
394
|
+
shardKey: rootShard
|
|
395
|
+
});
|
|
396
|
+
useEffect(() => {
|
|
397
|
+
if (liveMetrics === void 0) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
392
400
|
scheduleFanOut();
|
|
393
|
-
},
|
|
401
|
+
}, [liveMetrics]);
|
|
394
402
|
const recentErrors = entries.filter((entry) => entry.level === "error");
|
|
395
403
|
const topErrors = recentErrors.slice(0, RECENT_ERROR_LIMIT);
|
|
396
404
|
const trend = requestErrorSeries(totals?.history);
|
|
@@ -398,7 +406,7 @@ const HealthPanel = ({
|
|
|
398
406
|
const buckets = auth?.history ?? [];
|
|
399
407
|
return {
|
|
400
408
|
attempts: buckets.map((bucket) => bucket.attempts),
|
|
401
|
-
failures: buckets.map((
|
|
409
|
+
failures: buckets.map((bucket) => bucket.failures)
|
|
402
410
|
};
|
|
403
411
|
}, [auth?.history]);
|
|
404
412
|
const worstFunctions = functions.filter((stat) => stat.calls > 0).toSorted((a, b) => b.errors / b.calls - a.errors / a.calls || b.calls - a.calls).slice(0, TOP_FUNCTION_LIMIT);
|
|
@@ -549,25 +557,25 @@ const HealthPanel = ({
|
|
|
549
557
|
children: t("No function activity yet.")
|
|
550
558
|
}, void 0, false) : /* @__PURE__ */ jsxDEV("ul", {
|
|
551
559
|
className: "divide-y divide-border",
|
|
552
|
-
children: worstFunctions.map((
|
|
560
|
+
children: worstFunctions.map((stat) => /* @__PURE__ */ jsxDEV("li", {
|
|
553
561
|
className: "flex flex-wrap items-center justify-between gap-2 px-4 py-2 text-xs",
|
|
554
562
|
"data-testid": "hl-fn-row",
|
|
555
563
|
children: [/* @__PURE__ */ jsxDEV("span", {
|
|
556
564
|
className: "truncate font-mono text-foreground",
|
|
557
|
-
children:
|
|
565
|
+
children: stat.path
|
|
558
566
|
}, void 0, false), /* @__PURE__ */ jsxDEV("span", {
|
|
559
567
|
className: "flex shrink-0 items-center gap-2",
|
|
560
568
|
children: [/* @__PURE__ */ jsxDEV("span", {
|
|
561
569
|
className: "tabular-nums text-muted-foreground",
|
|
562
570
|
children: t("{count} calls", {
|
|
563
|
-
count:
|
|
571
|
+
count: stat.calls.toString()
|
|
564
572
|
})
|
|
565
573
|
}, void 0, false), /* @__PURE__ */ jsxDEV(Badge, {
|
|
566
|
-
variant: LEVEL_VARIANT[rateLevel(
|
|
567
|
-
children: ratePercent(
|
|
574
|
+
variant: LEVEL_VARIANT[rateLevel(stat.errors / stat.calls, REQUEST_ERROR_WARN, REQUEST_ERROR_CRIT)],
|
|
575
|
+
children: ratePercent(stat.errors, stat.calls)
|
|
568
576
|
}, void 0, false)]
|
|
569
577
|
}, void 0, true)]
|
|
570
|
-
},
|
|
578
|
+
}, stat.path, true))
|
|
571
579
|
}, void 0, false)]
|
|
572
580
|
}, void 0, true), /* @__PURE__ */ jsxDEV(Card, {
|
|
573
581
|
className: "gap-0 py-0",
|
|
@@ -592,23 +600,23 @@ const HealthPanel = ({
|
|
|
592
600
|
children: t("No recent errors.")
|
|
593
601
|
}, void 0, false), topErrors.length > 0 && /* @__PURE__ */ jsxDEV("ul", {
|
|
594
602
|
className: "divide-y divide-border",
|
|
595
|
-
children: topErrors.map((
|
|
603
|
+
children: topErrors.map((entry, index) => /* @__PURE__ */ jsxDEV("li", {
|
|
596
604
|
className: "flex flex-col gap-0.5 px-4 py-2 text-xs",
|
|
597
605
|
"data-testid": "hl-error-row",
|
|
598
606
|
children: [/* @__PURE__ */ jsxDEV("span", {
|
|
599
607
|
className: "flex items-center gap-2",
|
|
600
608
|
children: [/* @__PURE__ */ jsxDEV("time", {
|
|
601
609
|
className: "shrink-0 text-muted-foreground",
|
|
602
|
-
children: formatTimestamp(
|
|
603
|
-
}, void 0, false),
|
|
610
|
+
children: formatTimestamp(entry.timestamp)
|
|
611
|
+
}, void 0, false), entry.functionPath !== void 0 && /* @__PURE__ */ jsxDEV("span", {
|
|
604
612
|
className: "truncate font-mono text-foreground",
|
|
605
|
-
children:
|
|
613
|
+
children: entry.functionPath
|
|
606
614
|
}, void 0, false)]
|
|
607
615
|
}, void 0, true), /* @__PURE__ */ jsxDEV("span", {
|
|
608
616
|
className: "text-destructive",
|
|
609
|
-
children:
|
|
617
|
+
children: entry.message
|
|
610
618
|
}, void 0, false)]
|
|
611
|
-
}, `${
|
|
619
|
+
}, `${entry.timestamp.toString()}-${index.toString()}`, true))
|
|
612
620
|
}, void 0, false)]
|
|
613
621
|
}, void 0, true)]
|
|
614
622
|
}, void 0, true), /* @__PURE__ */ jsxDEV(Card, {
|