@lunora/studio 1.0.0-alpha.1 → 1.0.0-alpha.11
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 +21 -17
- 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-SRilxyg0.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-B4v_9GiU.js} +182 -249
- package/dist/packem_shared/{ExportImportPanel-WO34fJxy.js → ExportImportPanel-NtZVqbOj.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-n-6FrbOH.js} +141 -198
- package/dist/packem_shared/{GlobalDataBrowser-9MhPEfgN.js → GlobalDataBrowser-3X9uRfdO.js} +37 -66
- package/dist/packem_shared/{HealthPanel-DOIgbUtx.js → HealthPanel-Dpr6KTmV.js} +31 -23
- package/dist/packem_shared/{HomePanel-bdOCNA-p.js → HomePanel-CpFLsa64.js} +450 -389
- package/dist/packem_shared/{InsightsPanel-DaZPnSgt.js → InsightsPanel-BchgeeRx.js} +104 -66
- package/dist/packem_shared/{LogsPanel-CWdqAGpQ.js → LogsPanel-DsPnKZ95.js} +35 -47
- package/dist/packem_shared/{MailPanel-D_EGtDnS.js → MailPanel-Bmg781UW.js} +31 -38
- package/dist/packem_shared/{MetricsPanel-E4Gv6wTO.js → MetricsPanel-DaE8ZXrf.js} +34 -48
- package/dist/packem_shared/{MigrationsPanel-DQdPY9io.js → MigrationsPanel-CaUpce-G.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-BWNwIN3I.js} +164 -61
- package/dist/packem_shared/{SchemaViewer-D8XGnp-X.js → SchemaViewer-Bam6ylvw.js} +4 -4
- package/dist/packem_shared/{SecurityAdvisorPanel-Cdm2IxLW.js → SecurityAdvisorPanel-PAx712Bd.js} +44 -31
- package/dist/packem_shared/SettingsPanel-C4tufQD5.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-BFg10lBc.js +33 -0
- package/dist/packem_shared/{StudioApp-dvywkJ8I.js → StudioApp-g8j3V6vA.js} +278 -4
- package/dist/packem_shared/{StudioI18nProvider-Dcajsznk.js → StudioI18nProvider-B-tDCZIi.js} +1 -1
- package/dist/packem_shared/TableEditor-0TYRqi6t.js +11 -0
- 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-DRWW__L9.js} +2150 -1602
- package/dist/packem_shared/{TableEditor-DIVDk3vT.js → table-editor-CiyJi0Nm.js} +43 -7
- package/dist/packem_shared/{table-list-sidebar-aZHLq70w.js → table-list-sidebar-Bg7uzbvC.js} +2 -2
- package/dist/packem_shared/use-admin-query-BkbdNFNz.js +105 -0
- package/dist/standalone/studio.js +184 -162
- 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
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { c } from 'react/compiler-runtime';
|
|
3
3
|
import { createRootRoute, createRoute, createBrowserHistory, createMemoryHistory, createRouter, useNavigate, useRouterState, useSearch, Outlet, RouterProvider } from '@tanstack/react-router';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { useState, useEffect, createContext, use, useMemo,
|
|
5
|
+
import { useState, useEffect, createContext, use, useMemo, useCallback, useRef } from 'react';
|
|
6
6
|
import { c as cn } from './utils-B05Dmz_H.js';
|
|
7
7
|
import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
|
|
8
8
|
import { ErrorBoundary } from './ErrorBoundary-BzAApI7J.js';
|
|
9
|
-
import { useT } from './
|
|
9
|
+
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
10
10
|
import { motion } from 'motion/react';
|
|
11
11
|
import { B as Badge } from './badge-B2PKA1-5.js';
|
|
12
12
|
import { I as Input } from './input-XH4r1Pt1.js';
|
|
@@ -19,46 +19,46 @@ import { cva } from 'class-variance-authority';
|
|
|
19
19
|
import { B as Button } from './button-BhsN2uZH.js';
|
|
20
20
|
import { Dialog } from '@base-ui/react/dialog';
|
|
21
21
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
22
|
-
import { S as Skeleton } from './reference-view-
|
|
23
|
-
import { InsightsPanel } from './InsightsPanel-
|
|
24
|
-
import {
|
|
25
|
-
import { C as Card, a as CardContent, b as CardHeader, c as CardTitle, d as CardDescription } from './card-DURq3ElK.js';
|
|
22
|
+
import { S as Skeleton } from './reference-view-B4E49Lip.js';
|
|
23
|
+
import { InsightsPanel } from './InsightsPanel-BchgeeRx.js';
|
|
24
|
+
import { a as CardContent, C as Card, b as CardHeader, c as CardTitle, d as CardDescription } from './card-DURq3ElK.js';
|
|
26
25
|
import { E as EmptyState } from './empty-state-DY_oe0k6.js';
|
|
27
26
|
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-_RzNvy3R.js';
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import SecurityAdvisorPanel from './SecurityAdvisorPanel-
|
|
31
|
-
import { createAnalyticsSqlClient } from '@lunora/analytics';
|
|
32
|
-
import
|
|
27
|
+
import { u as useAdminQuery, b as useClientQuery } from './use-admin-query-BkbdNFNz.js';
|
|
28
|
+
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-DjXgvJb6.js';
|
|
29
|
+
import SecurityAdvisorPanel from './SecurityAdvisorPanel-PAx712Bd.js';
|
|
30
|
+
import { createAnalyticsSqlClient } from '@lunora/bindings/analytics';
|
|
31
|
+
import { e as errorMessage, f as fireAndForget, h as formatCell, b as formatTimestamp, g as copyToClipboard, c as callOptions, a as adminRef } from './internal-rXJEAhXS.js';
|
|
32
|
+
import ApiTab from './ApiTab-rwttyQ1-.js';
|
|
33
|
+
import { useLunora } from '@lunora/react';
|
|
33
34
|
import { useAutoRefresh } from './DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
|
|
34
35
|
import useDebounced from './useDebounced-Dxncpg6z.js';
|
|
35
36
|
import { L as Label } from './label-D8ykjn5J.js';
|
|
36
|
-
import { M as ModalShell } from './grid-features-
|
|
37
|
-
import { TableEditor } from './
|
|
38
|
-
import { ExportImportPanel } from './ExportImportPanel-
|
|
39
|
-
import { MigrationsPanel } from './MigrationsPanel-
|
|
40
|
-
import { PitrPanel } from './PitrPanel-
|
|
41
|
-
import { FunctionRunner } from './FunctionRunner-
|
|
42
|
-
import { FunctionStatsPanel } from './FunctionStatsPanel-
|
|
43
|
-
import { HomePanel } from './HomePanel-
|
|
44
|
-
import { AuditPanel } from './AuditPanel-
|
|
45
|
-
import {
|
|
46
|
-
import { LogsPanel } from './LogsPanel-
|
|
47
|
-
import { MailPanel } from './MailPanel-
|
|
48
|
-
import { ConfirmButton } from './ConfirmButton-
|
|
49
|
-
import { ScheduledJobs } from './ScheduledJobs-
|
|
50
|
-
import { ShardInput } from './ShardInput-
|
|
51
|
-
import { L as LiveError } from './live-status-
|
|
52
|
-
import { u as useLiveAdmin } from './use-live-admin-D1h1Fzsd.js';
|
|
37
|
+
import { M as ModalShell } from './grid-features-CzUfqgsM.js';
|
|
38
|
+
import { v as validateDataViewSearch, T as TableEditor } from './table-editor-CiyJi0Nm.js';
|
|
39
|
+
import { ExportImportPanel } from './ExportImportPanel-NtZVqbOj.js';
|
|
40
|
+
import { MigrationsPanel } from './MigrationsPanel-CaUpce-G.js';
|
|
41
|
+
import { PitrPanel } from './PitrPanel-LJGNP_IX.js';
|
|
42
|
+
import { FunctionRunner } from './FunctionRunner-7NH3KcTg.js';
|
|
43
|
+
import { FunctionStatsPanel } from './FunctionStatsPanel-n-6FrbOH.js';
|
|
44
|
+
import { HomePanel } from './HomePanel-CpFLsa64.js';
|
|
45
|
+
import { AuditPanel } from './AuditPanel-SRilxyg0.js';
|
|
46
|
+
import { C as CLOUDFLARE_OBSERVABILITY_URL } from './cf-links-2cktDedA.js';
|
|
47
|
+
import { LogsPanel } from './LogsPanel-DsPnKZ95.js';
|
|
48
|
+
import { MailPanel } from './MailPanel-Bmg781UW.js';
|
|
49
|
+
import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
|
|
50
|
+
import { ScheduledJobs } from './ScheduledJobs-BWNwIN3I.js';
|
|
51
|
+
import { ShardInput } from './ShardInput-gx_DZXXn.js';
|
|
52
|
+
import { L as LiveError } from './live-status-FZ0psC1z.js';
|
|
53
53
|
import { T as Textarea } from './textarea-D3gaCU_-.js';
|
|
54
|
-
import { u as usePersistedList, A as Alert, a as SqlResultChart, n as newId, S as SqlEditorPanel } from './sql-editor-panel-
|
|
55
|
-
import { HealthPanel } from './HealthPanel-
|
|
56
|
-
import { MetricsPanel } from './MetricsPanel-
|
|
57
|
-
import { SchemaViewer } from './SchemaViewer-
|
|
58
|
-
import { SettingsPanel } from './SettingsPanel-
|
|
59
|
-
import { FileBrowser } from './FileBrowser-
|
|
60
|
-
import { StudioI18nProvider } from './StudioI18nProvider-
|
|
61
|
-
import { CommandPalette, openCommandPalette } from './CommandPalette-
|
|
54
|
+
import { u as usePersistedList, A as Alert, a as SqlResultChart, n as newId, S as SqlEditorPanel } from './sql-editor-panel-Smfl_FDF.js';
|
|
55
|
+
import { HealthPanel } from './HealthPanel-Dpr6KTmV.js';
|
|
56
|
+
import { MetricsPanel } from './MetricsPanel-DaE8ZXrf.js';
|
|
57
|
+
import { SchemaViewer } from './SchemaViewer-Bam6ylvw.js';
|
|
58
|
+
import { SettingsPanel } from './SettingsPanel-C4tufQD5.js';
|
|
59
|
+
import { FileBrowser } from './FileBrowser-0pCpdKPE.js';
|
|
60
|
+
import { StudioI18nProvider } from './StudioI18nProvider-B-tDCZIi.js';
|
|
61
|
+
import { CommandPalette, openCommandPalette } from './CommandPalette-BtgkBzZI.js';
|
|
62
62
|
|
|
63
63
|
const DARK_MEDIA_QUERY = "(prefers-color-scheme: dark)";
|
|
64
64
|
const store = () => {
|
|
@@ -302,7 +302,7 @@ const writeBannerDismissed = () => {
|
|
|
302
302
|
const RulesBanner = () => {
|
|
303
303
|
const $ = c(18);
|
|
304
304
|
const t = useT();
|
|
305
|
-
const [dismissed, setDismissed] = useState(_temp$
|
|
305
|
+
const [dismissed, setDismissed] = useState(_temp$8);
|
|
306
306
|
let t0;
|
|
307
307
|
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
308
308
|
t0 = () => {
|
|
@@ -422,7 +422,7 @@ const RulesBanner = () => {
|
|
|
422
422
|
}
|
|
423
423
|
return t9;
|
|
424
424
|
};
|
|
425
|
-
function _temp$
|
|
425
|
+
function _temp$8() {
|
|
426
426
|
return readBannerDismissed();
|
|
427
427
|
}
|
|
428
428
|
|
|
@@ -1648,7 +1648,6 @@ function SidebarMenuButton({
|
|
|
1648
1648
|
}, void 0, true);
|
|
1649
1649
|
}
|
|
1650
1650
|
|
|
1651
|
-
const RLS_POLICIES$1 = adminRef(ADMIN_FUNCTIONS.rlsPolicies);
|
|
1652
1651
|
const OPERATIONS$1 = ["read", "insert", "update", "delete"];
|
|
1653
1652
|
const operationLabel$2 = (t, operation) => ({
|
|
1654
1653
|
delete: t("Delete"),
|
|
@@ -1673,145 +1672,283 @@ const groupByTable = (policies) => {
|
|
|
1673
1672
|
return [...byTable.values()].toSorted((a, b) => a.table.localeCompare(b.table));
|
|
1674
1673
|
};
|
|
1675
1674
|
const RlsPanel = () => {
|
|
1676
|
-
const
|
|
1675
|
+
const $ = c(47);
|
|
1677
1676
|
const t = useT();
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1677
|
+
let t0;
|
|
1678
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
1679
|
+
t0 = {};
|
|
1680
|
+
$[0] = t0;
|
|
1681
|
+
} else {
|
|
1682
|
+
t0 = $[0];
|
|
1683
|
+
}
|
|
1684
|
+
const {
|
|
1685
|
+
data,
|
|
1686
|
+
error
|
|
1687
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.rlsPolicies, t0);
|
|
1688
|
+
const loaded = data !== void 0;
|
|
1689
|
+
let T0;
|
|
1690
|
+
let roles;
|
|
1691
|
+
let t1;
|
|
1692
|
+
let t2;
|
|
1693
|
+
let t3;
|
|
1694
|
+
let t4;
|
|
1695
|
+
let t5;
|
|
1696
|
+
let t6;
|
|
1697
|
+
let t7;
|
|
1698
|
+
if ($[1] !== data || $[2] !== error || $[3] !== loaded || $[4] !== t) {
|
|
1699
|
+
const tables = groupByTable(Array.isArray(data?.policies) ? data.policies : []);
|
|
1700
|
+
let t82;
|
|
1701
|
+
if ($[14] !== data) {
|
|
1702
|
+
t82 = Array.isArray(data?.roles) ? data.roles : [];
|
|
1703
|
+
$[14] = data;
|
|
1704
|
+
$[15] = t82;
|
|
1705
|
+
} else {
|
|
1706
|
+
t82 = $[15];
|
|
1690
1707
|
}
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
children: "—"
|
|
1747
|
-
}, void 0, false)
|
|
1748
|
-
}, operation_0, false)), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1749
|
-
className: "font-mono text-xs text-muted-foreground",
|
|
1750
|
-
children: coverage.procedures.join(", ")
|
|
1751
|
-
}, void 0, false)]
|
|
1752
|
-
}, coverage.table, true))
|
|
1708
|
+
roles = t82;
|
|
1709
|
+
t5 = "flex flex-col gap-6";
|
|
1710
|
+
t6 = "lunora-rls-panel";
|
|
1711
|
+
if ($[16] !== error) {
|
|
1712
|
+
t7 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
1713
|
+
className: "px-4 py-8 text-center text-sm text-destructive",
|
|
1714
|
+
"data-testid": "rls-error",
|
|
1715
|
+
role: "alert",
|
|
1716
|
+
children: error
|
|
1717
|
+
}, void 0, false);
|
|
1718
|
+
$[16] = error;
|
|
1719
|
+
$[17] = t7;
|
|
1720
|
+
} else {
|
|
1721
|
+
t7 = $[17];
|
|
1722
|
+
}
|
|
1723
|
+
t4 = "flex flex-col gap-2";
|
|
1724
|
+
T0 = Card;
|
|
1725
|
+
t1 = "overflow-hidden py-0";
|
|
1726
|
+
let t92;
|
|
1727
|
+
if ($[18] !== t) {
|
|
1728
|
+
t92 = t("Policies");
|
|
1729
|
+
$[18] = t;
|
|
1730
|
+
$[19] = t92;
|
|
1731
|
+
} else {
|
|
1732
|
+
t92 = $[19];
|
|
1733
|
+
}
|
|
1734
|
+
if ($[20] !== t92) {
|
|
1735
|
+
t2 = /* @__PURE__ */ jsxDEV("header", {
|
|
1736
|
+
className: "border-b border-border px-4 py-3",
|
|
1737
|
+
children: /* @__PURE__ */ jsxDEV("span", {
|
|
1738
|
+
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
1739
|
+
children: t92
|
|
1740
|
+
}, void 0, false)
|
|
1741
|
+
}, void 0, false);
|
|
1742
|
+
$[20] = t92;
|
|
1743
|
+
$[21] = t2;
|
|
1744
|
+
} else {
|
|
1745
|
+
t2 = $[21];
|
|
1746
|
+
}
|
|
1747
|
+
t3 = loaded && tables.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
1748
|
+
description: t("No `definePolicy` is wired through `.use(rls(...))` in this deployment. Add one to guard a table's rows."),
|
|
1749
|
+
testId: "rls-policies-empty",
|
|
1750
|
+
title: t("No policies defined")
|
|
1751
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV(CardContent, {
|
|
1752
|
+
className: "px-0",
|
|
1753
|
+
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
1754
|
+
"data-testid": "rls-policies-table",
|
|
1755
|
+
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
1756
|
+
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
1757
|
+
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
1758
|
+
children: t("Table")
|
|
1759
|
+
}, void 0, false), OPERATIONS$1.map((operation) => /* @__PURE__ */ jsxDEV(TableHead, {
|
|
1760
|
+
children: operationLabel$2(t, operation)
|
|
1761
|
+
}, operation, false)), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
1762
|
+
children: t("Guarded by")
|
|
1753
1763
|
}, void 0, false)]
|
|
1754
1764
|
}, void 0, true)
|
|
1765
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
1766
|
+
children: tables.map((coverage) => /* @__PURE__ */ jsxDEV(TableRow, {
|
|
1767
|
+
"data-testid": `rls-table-${coverage.table}`,
|
|
1768
|
+
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
1769
|
+
className: "font-mono text-xs",
|
|
1770
|
+
children: coverage.table
|
|
1771
|
+
}, void 0, false), OPERATIONS$1.map((operation_0) => /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1772
|
+
children: coverage.operations.has(operation_0) ? /* @__PURE__ */ jsxDEV(Badge, {
|
|
1773
|
+
variant: "secondary",
|
|
1774
|
+
children: t("Guarded")
|
|
1775
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV("span", {
|
|
1776
|
+
"aria-hidden": "true",
|
|
1777
|
+
className: "text-muted-foreground",
|
|
1778
|
+
children: "—"
|
|
1779
|
+
}, void 0, false)
|
|
1780
|
+
}, operation_0, false)), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1781
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
1782
|
+
children: coverage.procedures.join(", ")
|
|
1783
|
+
}, void 0, false)]
|
|
1784
|
+
}, coverage.table, true))
|
|
1755
1785
|
}, void 0, false)]
|
|
1756
1786
|
}, void 0, true)
|
|
1757
|
-
}, void 0, false)
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1787
|
+
}, void 0, false);
|
|
1788
|
+
$[1] = data;
|
|
1789
|
+
$[2] = error;
|
|
1790
|
+
$[3] = loaded;
|
|
1791
|
+
$[4] = t;
|
|
1792
|
+
$[5] = T0;
|
|
1793
|
+
$[6] = roles;
|
|
1794
|
+
$[7] = t1;
|
|
1795
|
+
$[8] = t2;
|
|
1796
|
+
$[9] = t3;
|
|
1797
|
+
$[10] = t4;
|
|
1798
|
+
$[11] = t5;
|
|
1799
|
+
$[12] = t6;
|
|
1800
|
+
$[13] = t7;
|
|
1801
|
+
} else {
|
|
1802
|
+
T0 = $[5];
|
|
1803
|
+
roles = $[6];
|
|
1804
|
+
t1 = $[7];
|
|
1805
|
+
t2 = $[8];
|
|
1806
|
+
t3 = $[9];
|
|
1807
|
+
t4 = $[10];
|
|
1808
|
+
t5 = $[11];
|
|
1809
|
+
t6 = $[12];
|
|
1810
|
+
t7 = $[13];
|
|
1811
|
+
}
|
|
1812
|
+
let t8;
|
|
1813
|
+
if ($[22] !== T0 || $[23] !== t1 || $[24] !== t2 || $[25] !== t3) {
|
|
1814
|
+
t8 = /* @__PURE__ */ jsxDEV(T0, {
|
|
1815
|
+
className: t1,
|
|
1816
|
+
children: [t2, t3]
|
|
1817
|
+
}, void 0, true);
|
|
1818
|
+
$[22] = T0;
|
|
1819
|
+
$[23] = t1;
|
|
1820
|
+
$[24] = t2;
|
|
1821
|
+
$[25] = t3;
|
|
1822
|
+
$[26] = t8;
|
|
1823
|
+
} else {
|
|
1824
|
+
t8 = $[26];
|
|
1825
|
+
}
|
|
1826
|
+
let t9;
|
|
1827
|
+
if ($[27] !== t4 || $[28] !== t8) {
|
|
1828
|
+
t9 = /* @__PURE__ */ jsxDEV("section", {
|
|
1829
|
+
className: t4,
|
|
1830
|
+
children: t8
|
|
1831
|
+
}, void 0, false);
|
|
1832
|
+
$[27] = t4;
|
|
1833
|
+
$[28] = t8;
|
|
1834
|
+
$[29] = t9;
|
|
1835
|
+
} else {
|
|
1836
|
+
t9 = $[29];
|
|
1837
|
+
}
|
|
1838
|
+
let t10;
|
|
1839
|
+
if ($[30] !== t) {
|
|
1840
|
+
t10 = t("Roles");
|
|
1841
|
+
$[30] = t;
|
|
1842
|
+
$[31] = t10;
|
|
1843
|
+
} else {
|
|
1844
|
+
t10 = $[31];
|
|
1845
|
+
}
|
|
1846
|
+
let t11;
|
|
1847
|
+
if ($[32] !== t10) {
|
|
1848
|
+
t11 = /* @__PURE__ */ jsxDEV("header", {
|
|
1849
|
+
className: "border-b border-border px-4 py-3",
|
|
1850
|
+
children: /* @__PURE__ */ jsxDEV("span", {
|
|
1851
|
+
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
1852
|
+
children: t10
|
|
1853
|
+
}, void 0, false)
|
|
1854
|
+
}, void 0, false);
|
|
1855
|
+
$[32] = t10;
|
|
1856
|
+
$[33] = t11;
|
|
1857
|
+
} else {
|
|
1858
|
+
t11 = $[33];
|
|
1859
|
+
}
|
|
1860
|
+
let t12;
|
|
1861
|
+
if ($[34] !== loaded || $[35] !== roles || $[36] !== t) {
|
|
1862
|
+
t12 = loaded && roles.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
1863
|
+
description: t("No `defineRole` is registered via `rls(policies, { roles })`. Roles back `ctx.auth.can(...)` permission checks."),
|
|
1864
|
+
testId: "rls-roles-empty",
|
|
1865
|
+
title: t("No roles defined")
|
|
1866
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV(CardContent, {
|
|
1867
|
+
className: "px-0",
|
|
1868
|
+
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
1869
|
+
"data-testid": "rls-roles-table",
|
|
1870
|
+
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
1871
|
+
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
1872
|
+
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
1873
|
+
children: t("Role")
|
|
1874
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
1875
|
+
children: t("Description")
|
|
1876
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
1877
|
+
children: t("Permissions")
|
|
1808
1878
|
}, void 0, false)]
|
|
1809
1879
|
}, void 0, true)
|
|
1880
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
1881
|
+
children: roles.map(_temp2$4)
|
|
1810
1882
|
}, void 0, false)]
|
|
1811
1883
|
}, void 0, true)
|
|
1812
|
-
}, void 0, false)
|
|
1813
|
-
|
|
1884
|
+
}, void 0, false);
|
|
1885
|
+
$[34] = loaded;
|
|
1886
|
+
$[35] = roles;
|
|
1887
|
+
$[36] = t;
|
|
1888
|
+
$[37] = t12;
|
|
1889
|
+
} else {
|
|
1890
|
+
t12 = $[37];
|
|
1891
|
+
}
|
|
1892
|
+
let t13;
|
|
1893
|
+
if ($[38] !== t11 || $[39] !== t12) {
|
|
1894
|
+
t13 = /* @__PURE__ */ jsxDEV("section", {
|
|
1895
|
+
className: "flex flex-col gap-2",
|
|
1896
|
+
children: /* @__PURE__ */ jsxDEV(Card, {
|
|
1897
|
+
className: "overflow-hidden py-0",
|
|
1898
|
+
children: [t11, t12]
|
|
1899
|
+
}, void 0, true)
|
|
1900
|
+
}, void 0, false);
|
|
1901
|
+
$[38] = t11;
|
|
1902
|
+
$[39] = t12;
|
|
1903
|
+
$[40] = t13;
|
|
1904
|
+
} else {
|
|
1905
|
+
t13 = $[40];
|
|
1906
|
+
}
|
|
1907
|
+
let t14;
|
|
1908
|
+
if ($[41] !== t13 || $[42] !== t5 || $[43] !== t6 || $[44] !== t7 || $[45] !== t9) {
|
|
1909
|
+
t14 = /* @__PURE__ */ jsxDEV("div", {
|
|
1910
|
+
className: t5,
|
|
1911
|
+
"data-testid": t6,
|
|
1912
|
+
children: [t7, t9, t13]
|
|
1913
|
+
}, void 0, true);
|
|
1914
|
+
$[41] = t13;
|
|
1915
|
+
$[42] = t5;
|
|
1916
|
+
$[43] = t6;
|
|
1917
|
+
$[44] = t7;
|
|
1918
|
+
$[45] = t9;
|
|
1919
|
+
$[46] = t14;
|
|
1920
|
+
} else {
|
|
1921
|
+
t14 = $[46];
|
|
1922
|
+
}
|
|
1923
|
+
return t14;
|
|
1814
1924
|
};
|
|
1925
|
+
function _temp$7(permission) {
|
|
1926
|
+
return /* @__PURE__ */ jsxDEV(Badge, {
|
|
1927
|
+
variant: "outline",
|
|
1928
|
+
children: permission
|
|
1929
|
+
}, permission, false);
|
|
1930
|
+
}
|
|
1931
|
+
function _temp2$4(role) {
|
|
1932
|
+
return /* @__PURE__ */ jsxDEV(TableRow, {
|
|
1933
|
+
"data-testid": `rls-role-${role.name}`,
|
|
1934
|
+
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
1935
|
+
className: "font-mono text-xs",
|
|
1936
|
+
children: role.name
|
|
1937
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1938
|
+
className: "text-muted-foreground",
|
|
1939
|
+
children: role.description ?? ""
|
|
1940
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1941
|
+
children: role.permissions.length === 0 ? /* @__PURE__ */ jsxDEV("span", {
|
|
1942
|
+
"aria-hidden": "true",
|
|
1943
|
+
className: "text-muted-foreground",
|
|
1944
|
+
children: "—"
|
|
1945
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV("span", {
|
|
1946
|
+
className: "flex flex-wrap gap-1",
|
|
1947
|
+
children: role.permissions.map(_temp$7)
|
|
1948
|
+
}, void 0, false)
|
|
1949
|
+
}, void 0, false)]
|
|
1950
|
+
}, role.name, true);
|
|
1951
|
+
}
|
|
1815
1952
|
|
|
1816
1953
|
const DEFAULT_DATASET = "ANALYTICS";
|
|
1817
1954
|
const PANEL_QUERIES = [{
|
|
@@ -1915,7 +2052,7 @@ const PanelResult = (t0) => {
|
|
|
1915
2052
|
t7 = !loading && error === null && result !== null && result.rows.length > 0 && /* @__PURE__ */ jsxDEV(Table, {
|
|
1916
2053
|
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
1917
2054
|
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
1918
|
-
children: result.columns.map(_temp$
|
|
2055
|
+
children: result.columns.map(_temp$6)
|
|
1919
2056
|
}, void 0, false)
|
|
1920
2057
|
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
1921
2058
|
children: result.rows.map((row, rowIndex) => /* @__PURE__ */ jsxDEV(TableRow, {
|
|
@@ -1972,7 +2109,7 @@ const AnalyticsPanel = ({
|
|
|
1972
2109
|
});
|
|
1973
2110
|
return (sql) => client.query(sql);
|
|
1974
2111
|
}, [config, runQuery]);
|
|
1975
|
-
const load = async (token) => {
|
|
2112
|
+
const load = useCallback(async (token) => {
|
|
1976
2113
|
if (run === null) {
|
|
1977
2114
|
return;
|
|
1978
2115
|
}
|
|
@@ -2019,7 +2156,7 @@ const AnalyticsPanel = ({
|
|
|
2019
2156
|
}
|
|
2020
2157
|
}
|
|
2021
2158
|
}
|
|
2022
|
-
};
|
|
2159
|
+
}, [run, dataset]);
|
|
2023
2160
|
useEffect(() => {
|
|
2024
2161
|
const token_0 = {
|
|
2025
2162
|
cancelled: false
|
|
@@ -2057,7 +2194,7 @@ const AnalyticsPanel = ({
|
|
|
2057
2194
|
}, panel_0.key, false))
|
|
2058
2195
|
}, void 0, false);
|
|
2059
2196
|
};
|
|
2060
|
-
function _temp$
|
|
2197
|
+
function _temp$6(column) {
|
|
2061
2198
|
return /* @__PURE__ */ jsxDEV(TableHead, {
|
|
2062
2199
|
children: column.name
|
|
2063
2200
|
}, column.name, false);
|
|
@@ -2080,153 +2217,209 @@ const CAPABILITY_ROWS = [{
|
|
|
2080
2217
|
label: "Two-factor"
|
|
2081
2218
|
}];
|
|
2082
2219
|
const AuthConfigPanel = () => {
|
|
2220
|
+
const $ = c(29);
|
|
2083
2221
|
const client = useLunora();
|
|
2084
2222
|
const t = useT();
|
|
2085
|
-
const [capabilities, setCapabilities] = useState(null);
|
|
2086
|
-
const [error, setError] = useState(null);
|
|
2087
|
-
const [loading, setLoading] = useState(true);
|
|
2088
|
-
useEffect(() => {
|
|
2089
|
-
const token = {
|
|
2090
|
-
cancelled: false
|
|
2091
|
-
};
|
|
2092
|
-
fireAndForget((async () => {
|
|
2093
|
-
try {
|
|
2094
|
-
const result = await client.getAuthCapabilities();
|
|
2095
|
-
if (!token.cancelled) {
|
|
2096
|
-
setCapabilities(result);
|
|
2097
|
-
setError(null);
|
|
2098
|
-
}
|
|
2099
|
-
} catch (error_) {
|
|
2100
|
-
if (!token.cancelled) {
|
|
2101
|
-
setError(errorMessage(error_));
|
|
2102
|
-
}
|
|
2103
|
-
} finally {
|
|
2104
|
-
if (!token.cancelled) {
|
|
2105
|
-
setLoading(false);
|
|
2106
|
-
}
|
|
2107
|
-
}
|
|
2108
|
-
})());
|
|
2109
|
-
return () => {
|
|
2110
|
-
token.cancelled = true;
|
|
2111
|
-
};
|
|
2112
|
-
}, [client]);
|
|
2113
|
-
return /* @__PURE__ */ jsxDEV("div", {
|
|
2114
|
-
className: "flex flex-col gap-4",
|
|
2115
|
-
"data-testid": "auth-config",
|
|
2116
|
-
children: [/* @__PURE__ */ jsxDEV(Card, {
|
|
2117
|
-
className: "gap-0 py-0",
|
|
2118
|
-
children: [/* @__PURE__ */ jsxDEV("header", {
|
|
2119
|
-
className: "border-b border-border px-4 py-3",
|
|
2120
|
-
children: /* @__PURE__ */ jsxDEV("span", {
|
|
2121
|
-
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
2122
|
-
children: t("Enabled capabilities")
|
|
2123
|
-
}, void 0, false)
|
|
2124
|
-
}, void 0, false), error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
2125
|
-
className: "px-4 py-8 text-center text-sm text-destructive",
|
|
2126
|
-
"data-testid": "auth-config-error",
|
|
2127
|
-
role: "alert",
|
|
2128
|
-
children: error
|
|
2129
|
-
}, void 0, false), error === null && loading && /* @__PURE__ */ jsxDEV("p", {
|
|
2130
|
-
className: "px-4 py-8 text-center text-sm text-muted-foreground",
|
|
2131
|
-
"data-testid": "auth-config-loading",
|
|
2132
|
-
children: t("Loading auth configuration…")
|
|
2133
|
-
}, void 0, false), error === null && !loading && capabilities !== null && /* @__PURE__ */ jsxDEV(CardContent, {
|
|
2134
|
-
className: "p-3",
|
|
2135
|
-
children: /* @__PURE__ */ jsxDEV("ul", {
|
|
2136
|
-
className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
2137
|
-
children: CAPABILITY_ROWS.map((row) => {
|
|
2138
|
-
const enabled = capabilities[row.key];
|
|
2139
|
-
return /* @__PURE__ */ jsxDEV("li", {
|
|
2140
|
-
className: "flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs",
|
|
2141
|
-
"data-testid": `auth-config-cap-${row.key}`,
|
|
2142
|
-
children: [/* @__PURE__ */ jsxDEV("span", {
|
|
2143
|
-
className: "text-sm",
|
|
2144
|
-
children: t(row.label)
|
|
2145
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(Badge, {
|
|
2146
|
-
variant: enabled ? "success" : "outline",
|
|
2147
|
-
children: enabled ? t("Enabled") : t("Disabled")
|
|
2148
|
-
}, void 0, false)]
|
|
2149
|
-
}, row.key, true);
|
|
2150
|
-
})
|
|
2151
|
-
}, void 0, false)
|
|
2152
|
-
}, void 0, false)]
|
|
2153
|
-
}, void 0, true), /* @__PURE__ */ jsxDEV(Card, {
|
|
2154
|
-
className: "gap-0 py-0",
|
|
2155
|
-
children: /* @__PURE__ */ jsxDEV("p", {
|
|
2156
|
-
className: "px-4 py-3 text-xs text-muted-foreground",
|
|
2157
|
-
"data-testid": "auth-config-note",
|
|
2158
|
-
children: t("OAuth providers, email templates, and rate limits are configured at deploy time in the better-auth setup and aren't editable here. See the Mail tab for email output.")
|
|
2159
|
-
}, void 0, false)
|
|
2160
|
-
}, void 0, false)]
|
|
2161
|
-
}, void 0, true);
|
|
2162
|
-
};
|
|
2163
|
-
|
|
2164
|
-
const SESSION_LIMIT = 200;
|
|
2165
|
-
const AuthSessionsPanel = () => {
|
|
2166
|
-
const $ = c(21);
|
|
2167
|
-
const client = useLunora();
|
|
2168
|
-
const t = useT();
|
|
2169
|
-
const [sessions, setSessions] = useState(null);
|
|
2170
|
-
const [error, setError] = useState(null);
|
|
2171
|
-
const [version, setVersion] = useState(0);
|
|
2172
2223
|
let t0;
|
|
2173
|
-
if ($[0]
|
|
2174
|
-
t0 =
|
|
2175
|
-
|
|
2176
|
-
setError(null);
|
|
2177
|
-
try {
|
|
2178
|
-
const page = await client.listAuthSessions({
|
|
2179
|
-
limit: SESSION_LIMIT
|
|
2180
|
-
});
|
|
2181
|
-
setSessions(page.rows);
|
|
2182
|
-
} catch (t12) {
|
|
2183
|
-
const error_ = t12;
|
|
2184
|
-
setSessions(null);
|
|
2185
|
-
setError(errorMessage(error_));
|
|
2186
|
-
}
|
|
2187
|
-
})());
|
|
2188
|
-
};
|
|
2189
|
-
$[0] = client;
|
|
2190
|
-
$[1] = t0;
|
|
2224
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2225
|
+
t0 = ["lunora-auth-capabilities"];
|
|
2226
|
+
$[0] = t0;
|
|
2191
2227
|
} else {
|
|
2192
|
-
t0 = $[
|
|
2228
|
+
t0 = $[0];
|
|
2193
2229
|
}
|
|
2194
2230
|
let t1;
|
|
2195
|
-
if ($[
|
|
2196
|
-
t1 =
|
|
2197
|
-
$[
|
|
2198
|
-
$[
|
|
2199
|
-
$[4] = t1;
|
|
2231
|
+
if ($[1] !== client) {
|
|
2232
|
+
t1 = () => client.getAuthCapabilities();
|
|
2233
|
+
$[1] = client;
|
|
2234
|
+
$[2] = t1;
|
|
2200
2235
|
} else {
|
|
2201
|
-
t1 = $[
|
|
2236
|
+
t1 = $[2];
|
|
2202
2237
|
}
|
|
2203
|
-
|
|
2238
|
+
const {
|
|
2239
|
+
data: capabilities,
|
|
2240
|
+
error
|
|
2241
|
+
} = useClientQuery(t0, t1);
|
|
2204
2242
|
let t2;
|
|
2205
|
-
if ($[
|
|
2243
|
+
if ($[3] !== t) {
|
|
2244
|
+
t2 = t("Enabled capabilities");
|
|
2245
|
+
$[3] = t;
|
|
2246
|
+
$[4] = t2;
|
|
2247
|
+
} else {
|
|
2248
|
+
t2 = $[4];
|
|
2249
|
+
}
|
|
2250
|
+
let t3;
|
|
2251
|
+
if ($[5] !== t2) {
|
|
2252
|
+
t3 = /* @__PURE__ */ jsxDEV("header", {
|
|
2253
|
+
className: "border-b border-border px-4 py-3",
|
|
2254
|
+
children: /* @__PURE__ */ jsxDEV("span", {
|
|
2255
|
+
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
2256
|
+
children: t2
|
|
2257
|
+
}, void 0, false)
|
|
2258
|
+
}, void 0, false);
|
|
2259
|
+
$[5] = t2;
|
|
2260
|
+
$[6] = t3;
|
|
2261
|
+
} else {
|
|
2262
|
+
t3 = $[6];
|
|
2263
|
+
}
|
|
2264
|
+
let t4;
|
|
2265
|
+
if ($[7] !== error) {
|
|
2266
|
+
t4 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
2267
|
+
className: "px-4 py-8 text-center text-sm text-destructive",
|
|
2268
|
+
"data-testid": "auth-config-error",
|
|
2269
|
+
role: "alert",
|
|
2270
|
+
children: error
|
|
2271
|
+
}, void 0, false);
|
|
2272
|
+
$[7] = error;
|
|
2273
|
+
$[8] = t4;
|
|
2274
|
+
} else {
|
|
2275
|
+
t4 = $[8];
|
|
2276
|
+
}
|
|
2277
|
+
let t5;
|
|
2278
|
+
if ($[9] !== capabilities || $[10] !== error || $[11] !== t) {
|
|
2279
|
+
t5 = error === null && capabilities === void 0 && /* @__PURE__ */ jsxDEV("p", {
|
|
2280
|
+
className: "px-4 py-8 text-center text-sm text-muted-foreground",
|
|
2281
|
+
"data-testid": "auth-config-loading",
|
|
2282
|
+
children: t("Loading auth configuration…")
|
|
2283
|
+
}, void 0, false);
|
|
2284
|
+
$[9] = capabilities;
|
|
2285
|
+
$[10] = error;
|
|
2286
|
+
$[11] = t;
|
|
2287
|
+
$[12] = t5;
|
|
2288
|
+
} else {
|
|
2289
|
+
t5 = $[12];
|
|
2290
|
+
}
|
|
2291
|
+
let t6;
|
|
2292
|
+
if ($[13] !== capabilities || $[14] !== error || $[15] !== t) {
|
|
2293
|
+
t6 = error === null && capabilities !== void 0 && /* @__PURE__ */ jsxDEV(CardContent, {
|
|
2294
|
+
className: "p-3",
|
|
2295
|
+
children: /* @__PURE__ */ jsxDEV("ul", {
|
|
2296
|
+
className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
2297
|
+
children: CAPABILITY_ROWS.map((row) => {
|
|
2298
|
+
const enabled = capabilities[row.key];
|
|
2299
|
+
return /* @__PURE__ */ jsxDEV("li", {
|
|
2300
|
+
className: "flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs",
|
|
2301
|
+
"data-testid": `auth-config-cap-${row.key}`,
|
|
2302
|
+
children: [/* @__PURE__ */ jsxDEV("span", {
|
|
2303
|
+
className: "text-sm",
|
|
2304
|
+
children: t(row.label)
|
|
2305
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(Badge, {
|
|
2306
|
+
variant: enabled ? "success" : "outline",
|
|
2307
|
+
children: enabled ? t("Enabled") : t("Disabled")
|
|
2308
|
+
}, void 0, false)]
|
|
2309
|
+
}, row.key, true);
|
|
2310
|
+
})
|
|
2311
|
+
}, void 0, false)
|
|
2312
|
+
}, void 0, false);
|
|
2313
|
+
$[13] = capabilities;
|
|
2314
|
+
$[14] = error;
|
|
2315
|
+
$[15] = t;
|
|
2316
|
+
$[16] = t6;
|
|
2317
|
+
} else {
|
|
2318
|
+
t6 = $[16];
|
|
2319
|
+
}
|
|
2320
|
+
let t7;
|
|
2321
|
+
if ($[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== t6) {
|
|
2322
|
+
t7 = /* @__PURE__ */ jsxDEV(Card, {
|
|
2323
|
+
className: "gap-0 py-0",
|
|
2324
|
+
children: [t3, t4, t5, t6]
|
|
2325
|
+
}, void 0, true);
|
|
2326
|
+
$[17] = t3;
|
|
2327
|
+
$[18] = t4;
|
|
2328
|
+
$[19] = t5;
|
|
2329
|
+
$[20] = t6;
|
|
2330
|
+
$[21] = t7;
|
|
2331
|
+
} else {
|
|
2332
|
+
t7 = $[21];
|
|
2333
|
+
}
|
|
2334
|
+
let t8;
|
|
2335
|
+
if ($[22] !== t) {
|
|
2336
|
+
t8 = t("OAuth providers, email templates, and rate limits are configured at deploy time in the better-auth setup and aren't editable here. See the Mail tab for email output.");
|
|
2337
|
+
$[22] = t;
|
|
2338
|
+
$[23] = t8;
|
|
2339
|
+
} else {
|
|
2340
|
+
t8 = $[23];
|
|
2341
|
+
}
|
|
2342
|
+
let t9;
|
|
2343
|
+
if ($[24] !== t8) {
|
|
2344
|
+
t9 = /* @__PURE__ */ jsxDEV(Card, {
|
|
2345
|
+
className: "gap-0 py-0",
|
|
2346
|
+
children: /* @__PURE__ */ jsxDEV("p", {
|
|
2347
|
+
className: "px-4 py-3 text-xs text-muted-foreground",
|
|
2348
|
+
"data-testid": "auth-config-note",
|
|
2349
|
+
children: t8
|
|
2350
|
+
}, void 0, false)
|
|
2351
|
+
}, void 0, false);
|
|
2352
|
+
$[24] = t8;
|
|
2353
|
+
$[25] = t9;
|
|
2354
|
+
} else {
|
|
2355
|
+
t9 = $[25];
|
|
2356
|
+
}
|
|
2357
|
+
let t10;
|
|
2358
|
+
if ($[26] !== t7 || $[27] !== t9) {
|
|
2359
|
+
t10 = /* @__PURE__ */ jsxDEV("div", {
|
|
2360
|
+
className: "flex flex-col gap-4",
|
|
2361
|
+
"data-testid": "auth-config",
|
|
2362
|
+
children: [t7, t9]
|
|
2363
|
+
}, void 0, true);
|
|
2364
|
+
$[26] = t7;
|
|
2365
|
+
$[27] = t9;
|
|
2366
|
+
$[28] = t10;
|
|
2367
|
+
} else {
|
|
2368
|
+
t10 = $[28];
|
|
2369
|
+
}
|
|
2370
|
+
return t10;
|
|
2371
|
+
};
|
|
2372
|
+
|
|
2373
|
+
const SESSION_LIMIT = 200;
|
|
2374
|
+
const AuthSessionsPanel = () => {
|
|
2375
|
+
const $ = c(21);
|
|
2376
|
+
const client = useLunora();
|
|
2377
|
+
const t = useT();
|
|
2378
|
+
let t0;
|
|
2379
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2380
|
+
t0 = ["lunora-auth-sessions", SESSION_LIMIT];
|
|
2381
|
+
$[0] = t0;
|
|
2382
|
+
} else {
|
|
2383
|
+
t0 = $[0];
|
|
2384
|
+
}
|
|
2385
|
+
let t1;
|
|
2386
|
+
if ($[1] !== client) {
|
|
2387
|
+
t1 = () => client.listAuthSessions({
|
|
2388
|
+
limit: SESSION_LIMIT
|
|
2389
|
+
});
|
|
2390
|
+
$[1] = client;
|
|
2391
|
+
$[2] = t1;
|
|
2392
|
+
} else {
|
|
2393
|
+
t1 = $[2];
|
|
2394
|
+
}
|
|
2395
|
+
const sessionsQuery = useClientQuery(t0, t1);
|
|
2396
|
+
const {
|
|
2397
|
+
error
|
|
2398
|
+
} = sessionsQuery;
|
|
2399
|
+
const sessions = sessionsQuery.data?.rows ?? null;
|
|
2400
|
+
let t2;
|
|
2401
|
+
if ($[3] !== sessionsQuery) {
|
|
2206
2402
|
t2 = () => {
|
|
2207
|
-
|
|
2403
|
+
sessionsQuery.refetch();
|
|
2208
2404
|
};
|
|
2209
|
-
$[
|
|
2405
|
+
$[3] = sessionsQuery;
|
|
2406
|
+
$[4] = t2;
|
|
2210
2407
|
} else {
|
|
2211
|
-
t2 = $[
|
|
2408
|
+
t2 = $[4];
|
|
2212
2409
|
}
|
|
2213
2410
|
useAutoRefresh(t2, true);
|
|
2214
2411
|
let t3;
|
|
2215
|
-
if ($[6] !==
|
|
2412
|
+
if ($[5] !== client || $[6] !== sessionsQuery) {
|
|
2216
2413
|
t3 = (sessionId) => {
|
|
2217
2414
|
fireAndForget((async () => {
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
setVersion(_temp2$2);
|
|
2223
|
-
} catch (t42) {
|
|
2224
|
-
const error__0 = t42;
|
|
2225
|
-
setError(errorMessage(error__0));
|
|
2226
|
-
}
|
|
2415
|
+
await client.revokeAuthSession({
|
|
2416
|
+
sessionId
|
|
2417
|
+
});
|
|
2418
|
+
sessionsQuery.refetch();
|
|
2227
2419
|
})());
|
|
2228
2420
|
};
|
|
2229
|
-
$[
|
|
2421
|
+
$[5] = client;
|
|
2422
|
+
$[6] = sessionsQuery;
|
|
2230
2423
|
$[7] = t3;
|
|
2231
2424
|
} else {
|
|
2232
2425
|
t3 = $[7];
|
|
@@ -2338,12 +2531,6 @@ const AuthSessionsPanel = () => {
|
|
|
2338
2531
|
}
|
|
2339
2532
|
return t7;
|
|
2340
2533
|
};
|
|
2341
|
-
function _temp$2(value) {
|
|
2342
|
-
return value + 1;
|
|
2343
|
-
}
|
|
2344
|
-
function _temp2$2(value_0) {
|
|
2345
|
-
return value_0 + 1;
|
|
2346
|
-
}
|
|
2347
2534
|
|
|
2348
2535
|
const DEFAULT_CAPABILITIES = {
|
|
2349
2536
|
accounts: true,
|
|
@@ -2401,7 +2588,7 @@ const OrgRowTable = (t0) => {
|
|
|
2401
2588
|
}
|
|
2402
2589
|
let t2;
|
|
2403
2590
|
if ($[2] !== columns) {
|
|
2404
|
-
t2 = columns.map(_temp$
|
|
2591
|
+
t2 = columns.map(_temp$5);
|
|
2405
2592
|
$[2] = columns;
|
|
2406
2593
|
$[3] = t2;
|
|
2407
2594
|
} else {
|
|
@@ -2534,344 +2721,358 @@ const OrgRowTable = (t0) => {
|
|
|
2534
2721
|
return t10;
|
|
2535
2722
|
};
|
|
2536
2723
|
const OrganizationsPanel = () => {
|
|
2537
|
-
const $ = c(
|
|
2724
|
+
const $ = c(95);
|
|
2538
2725
|
const client = useLunora();
|
|
2539
2726
|
const t = useT();
|
|
2540
2727
|
const {
|
|
2541
2728
|
capabilities,
|
|
2542
2729
|
ready
|
|
2543
2730
|
} = useAuthCapabilities();
|
|
2544
|
-
const [orgs, setOrgs] = useState(null);
|
|
2545
|
-
const [error, setError] = useState(null);
|
|
2546
2731
|
const [selected, setSelected] = useState(null);
|
|
2547
|
-
const [members, setMembers] = useState(null);
|
|
2548
|
-
const [invitations, setInvitations] = useState(null);
|
|
2549
|
-
const [version, setVersion] = useState(0);
|
|
2550
2732
|
let t0;
|
|
2551
|
-
if ($[0]
|
|
2552
|
-
t0 =
|
|
2553
|
-
|
|
2554
|
-
return;
|
|
2555
|
-
}
|
|
2556
|
-
fireAndForget((async () => {
|
|
2557
|
-
try {
|
|
2558
|
-
const page = await client.listAuthOrganizations({
|
|
2559
|
-
limit: 100
|
|
2560
|
-
});
|
|
2561
|
-
setOrgs(page.rows);
|
|
2562
|
-
} catch (t110) {
|
|
2563
|
-
const error_ = t110;
|
|
2564
|
-
setError(errorMessage(error_));
|
|
2565
|
-
}
|
|
2566
|
-
})());
|
|
2567
|
-
};
|
|
2568
|
-
$[0] = capabilities.organization;
|
|
2569
|
-
$[1] = client;
|
|
2570
|
-
$[2] = t0;
|
|
2733
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2734
|
+
t0 = ["lunora-auth-orgs"];
|
|
2735
|
+
$[0] = t0;
|
|
2571
2736
|
} else {
|
|
2572
|
-
t0 = $[
|
|
2737
|
+
t0 = $[0];
|
|
2573
2738
|
}
|
|
2574
2739
|
let t1;
|
|
2575
|
-
if ($[
|
|
2576
|
-
t1 =
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
$[
|
|
2580
|
-
$[
|
|
2740
|
+
if ($[1] !== client) {
|
|
2741
|
+
t1 = () => client.listAuthOrganizations({
|
|
2742
|
+
limit: 100
|
|
2743
|
+
});
|
|
2744
|
+
$[1] = client;
|
|
2745
|
+
$[2] = t1;
|
|
2581
2746
|
} else {
|
|
2582
|
-
t1 = $[
|
|
2747
|
+
t1 = $[2];
|
|
2583
2748
|
}
|
|
2584
|
-
useEffect(t0, t1);
|
|
2585
2749
|
let t2;
|
|
2586
|
-
if ($[
|
|
2587
|
-
t2 =
|
|
2588
|
-
|
|
2589
|
-
return;
|
|
2590
|
-
}
|
|
2591
|
-
let cancelled = false;
|
|
2592
|
-
fireAndForget((async () => {
|
|
2593
|
-
try {
|
|
2594
|
-
const [memberPage, invitePage] = await Promise.all([client.listAuthOrgMembers({
|
|
2595
|
-
limit: 200,
|
|
2596
|
-
organizationId: selected
|
|
2597
|
-
}), client.listAuthOrgInvitations({
|
|
2598
|
-
limit: 200,
|
|
2599
|
-
organizationId: selected
|
|
2600
|
-
})]);
|
|
2601
|
-
if (!cancelled) {
|
|
2602
|
-
setMembers(memberPage.rows);
|
|
2603
|
-
setInvitations(invitePage.rows);
|
|
2604
|
-
}
|
|
2605
|
-
} catch (t32) {
|
|
2606
|
-
const error__0 = t32;
|
|
2607
|
-
if (!cancelled) {
|
|
2608
|
-
setError(errorMessage(error__0));
|
|
2609
|
-
}
|
|
2610
|
-
}
|
|
2611
|
-
})());
|
|
2612
|
-
return () => {
|
|
2613
|
-
cancelled = true;
|
|
2614
|
-
};
|
|
2750
|
+
if ($[3] !== capabilities.organization) {
|
|
2751
|
+
t2 = {
|
|
2752
|
+
enabled: capabilities.organization
|
|
2615
2753
|
};
|
|
2616
|
-
$[
|
|
2617
|
-
$[
|
|
2618
|
-
$[9] = t2;
|
|
2754
|
+
$[3] = capabilities.organization;
|
|
2755
|
+
$[4] = t2;
|
|
2619
2756
|
} else {
|
|
2620
|
-
t2 = $[
|
|
2757
|
+
t2 = $[4];
|
|
2621
2758
|
}
|
|
2759
|
+
const orgsQuery = useClientQuery(t0, t1, t2);
|
|
2760
|
+
const orgs = orgsQuery.data?.rows ?? null;
|
|
2622
2761
|
let t3;
|
|
2623
|
-
if ($[
|
|
2624
|
-
t3 = [
|
|
2625
|
-
$[
|
|
2626
|
-
$[
|
|
2627
|
-
$[12] = version;
|
|
2628
|
-
$[13] = t3;
|
|
2762
|
+
if ($[5] !== selected) {
|
|
2763
|
+
t3 = ["lunora-auth-org-members", selected];
|
|
2764
|
+
$[5] = selected;
|
|
2765
|
+
$[6] = t3;
|
|
2629
2766
|
} else {
|
|
2630
|
-
t3 = $[
|
|
2767
|
+
t3 = $[6];
|
|
2631
2768
|
}
|
|
2632
|
-
useEffect(t2, t3);
|
|
2633
2769
|
let t4;
|
|
2634
|
-
if ($[
|
|
2635
|
-
t4 = () => {
|
|
2636
|
-
|
|
2770
|
+
if ($[7] !== client || $[8] !== selected) {
|
|
2771
|
+
t4 = () => client.listAuthOrgMembers({
|
|
2772
|
+
limit: 200,
|
|
2773
|
+
organizationId: selected ?? ""
|
|
2774
|
+
});
|
|
2775
|
+
$[7] = client;
|
|
2776
|
+
$[8] = selected;
|
|
2777
|
+
$[9] = t4;
|
|
2778
|
+
} else {
|
|
2779
|
+
t4 = $[9];
|
|
2780
|
+
}
|
|
2781
|
+
const t5 = selected !== null;
|
|
2782
|
+
let t6;
|
|
2783
|
+
if ($[10] !== t5) {
|
|
2784
|
+
t6 = {
|
|
2785
|
+
enabled: t5
|
|
2637
2786
|
};
|
|
2638
|
-
$[
|
|
2787
|
+
$[10] = t5;
|
|
2788
|
+
$[11] = t6;
|
|
2639
2789
|
} else {
|
|
2640
|
-
|
|
2790
|
+
t6 = $[11];
|
|
2641
2791
|
}
|
|
2642
|
-
|
|
2643
|
-
let
|
|
2644
|
-
if ($[
|
|
2645
|
-
|
|
2792
|
+
const membersQuery = useClientQuery(t3, t4, t6);
|
|
2793
|
+
let t7;
|
|
2794
|
+
if ($[12] !== selected) {
|
|
2795
|
+
t7 = ["lunora-auth-org-invitations", selected];
|
|
2796
|
+
$[12] = selected;
|
|
2797
|
+
$[13] = t7;
|
|
2798
|
+
} else {
|
|
2799
|
+
t7 = $[13];
|
|
2800
|
+
}
|
|
2801
|
+
let t8;
|
|
2802
|
+
if ($[14] !== client || $[15] !== selected) {
|
|
2803
|
+
t8 = () => client.listAuthOrgInvitations({
|
|
2804
|
+
limit: 200,
|
|
2805
|
+
organizationId: selected ?? ""
|
|
2806
|
+
});
|
|
2807
|
+
$[14] = client;
|
|
2808
|
+
$[15] = selected;
|
|
2809
|
+
$[16] = t8;
|
|
2810
|
+
} else {
|
|
2811
|
+
t8 = $[16];
|
|
2812
|
+
}
|
|
2813
|
+
const t9 = selected !== null;
|
|
2814
|
+
let t10;
|
|
2815
|
+
if ($[17] !== t9) {
|
|
2816
|
+
t10 = {
|
|
2817
|
+
enabled: t9
|
|
2818
|
+
};
|
|
2819
|
+
$[17] = t9;
|
|
2820
|
+
$[18] = t10;
|
|
2821
|
+
} else {
|
|
2822
|
+
t10 = $[18];
|
|
2823
|
+
}
|
|
2824
|
+
const invitationsQuery = useClientQuery(t7, t8, t10);
|
|
2825
|
+
const members = selected === null ? null : membersQuery.data?.rows ?? null;
|
|
2826
|
+
const invitations = selected === null ? null : invitationsQuery.data?.rows ?? null;
|
|
2827
|
+
const error = orgsQuery.error ?? membersQuery.error ?? invitationsQuery.error;
|
|
2828
|
+
let t11;
|
|
2829
|
+
if ($[19] !== invitationsQuery || $[20] !== membersQuery || $[21] !== orgsQuery || $[22] !== selected) {
|
|
2830
|
+
t11 = () => {
|
|
2831
|
+
orgsQuery.refetch();
|
|
2832
|
+
if (selected !== null) {
|
|
2833
|
+
membersQuery.refetch();
|
|
2834
|
+
invitationsQuery.refetch();
|
|
2835
|
+
}
|
|
2836
|
+
};
|
|
2837
|
+
$[19] = invitationsQuery;
|
|
2838
|
+
$[20] = membersQuery;
|
|
2839
|
+
$[21] = orgsQuery;
|
|
2840
|
+
$[22] = selected;
|
|
2841
|
+
$[23] = t11;
|
|
2842
|
+
} else {
|
|
2843
|
+
t11 = $[23];
|
|
2844
|
+
}
|
|
2845
|
+
useAutoRefresh(t11, capabilities.organization);
|
|
2846
|
+
let t12;
|
|
2847
|
+
if ($[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2848
|
+
t12 = (id) => {
|
|
2646
2849
|
setSelected(id);
|
|
2647
|
-
setMembers(null);
|
|
2648
|
-
setInvitations(null);
|
|
2649
2850
|
};
|
|
2650
|
-
$[
|
|
2851
|
+
$[24] = t12;
|
|
2651
2852
|
} else {
|
|
2652
|
-
|
|
2853
|
+
t12 = $[24];
|
|
2653
2854
|
}
|
|
2654
|
-
const onSelectOrg =
|
|
2655
|
-
let
|
|
2656
|
-
if ($[
|
|
2657
|
-
|
|
2855
|
+
const onSelectOrg = t12;
|
|
2856
|
+
let t13;
|
|
2857
|
+
if ($[25] !== invitationsQuery || $[26] !== membersQuery) {
|
|
2858
|
+
t13 = (action) => {
|
|
2658
2859
|
fireAndForget((async () => {
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
} catch (t72) {
|
|
2663
|
-
const error__1 = t72;
|
|
2664
|
-
setError(errorMessage(error__1));
|
|
2665
|
-
}
|
|
2860
|
+
await action();
|
|
2861
|
+
membersQuery.refetch();
|
|
2862
|
+
invitationsQuery.refetch();
|
|
2666
2863
|
})());
|
|
2667
2864
|
};
|
|
2668
|
-
$[
|
|
2865
|
+
$[25] = invitationsQuery;
|
|
2866
|
+
$[26] = membersQuery;
|
|
2867
|
+
$[27] = t13;
|
|
2669
2868
|
} else {
|
|
2670
|
-
|
|
2869
|
+
t13 = $[27];
|
|
2671
2870
|
}
|
|
2672
|
-
const runOrgAction =
|
|
2673
|
-
let
|
|
2674
|
-
if ($[
|
|
2675
|
-
|
|
2871
|
+
const runOrgAction = t13;
|
|
2872
|
+
let t14;
|
|
2873
|
+
if ($[28] !== client || $[29] !== runOrgAction) {
|
|
2874
|
+
t14 = (memberId) => {
|
|
2676
2875
|
runOrgAction(() => client.removeAuthOrgMember({
|
|
2677
2876
|
memberId
|
|
2678
2877
|
}));
|
|
2679
2878
|
};
|
|
2680
|
-
$[
|
|
2681
|
-
$[
|
|
2879
|
+
$[28] = client;
|
|
2880
|
+
$[29] = runOrgAction;
|
|
2881
|
+
$[30] = t14;
|
|
2682
2882
|
} else {
|
|
2683
|
-
|
|
2883
|
+
t14 = $[30];
|
|
2684
2884
|
}
|
|
2685
|
-
const onRemoveMember =
|
|
2686
|
-
let
|
|
2687
|
-
if ($[
|
|
2688
|
-
|
|
2885
|
+
const onRemoveMember = t14;
|
|
2886
|
+
let t15;
|
|
2887
|
+
if ($[31] !== client || $[32] !== runOrgAction) {
|
|
2888
|
+
t15 = (invitationId) => {
|
|
2689
2889
|
runOrgAction(() => client.cancelAuthOrgInvitation({
|
|
2690
2890
|
invitationId
|
|
2691
2891
|
}));
|
|
2692
2892
|
};
|
|
2693
|
-
$[
|
|
2694
|
-
$[
|
|
2893
|
+
$[31] = client;
|
|
2894
|
+
$[32] = runOrgAction;
|
|
2895
|
+
$[33] = t15;
|
|
2695
2896
|
} else {
|
|
2696
|
-
|
|
2897
|
+
t15 = $[33];
|
|
2697
2898
|
}
|
|
2698
|
-
const onCancelInvitation =
|
|
2699
|
-
let
|
|
2700
|
-
if ($[
|
|
2701
|
-
|
|
2702
|
-
$[
|
|
2703
|
-
$[
|
|
2899
|
+
const onCancelInvitation = t15;
|
|
2900
|
+
let t16;
|
|
2901
|
+
if ($[34] !== t) {
|
|
2902
|
+
t16 = t("userId");
|
|
2903
|
+
$[34] = t;
|
|
2904
|
+
$[35] = t16;
|
|
2704
2905
|
} else {
|
|
2705
|
-
|
|
2906
|
+
t16 = $[35];
|
|
2706
2907
|
}
|
|
2707
|
-
let
|
|
2708
|
-
if ($[
|
|
2709
|
-
|
|
2710
|
-
head:
|
|
2711
|
-
render:
|
|
2908
|
+
let t17;
|
|
2909
|
+
if ($[36] !== t16) {
|
|
2910
|
+
t17 = {
|
|
2911
|
+
head: t16,
|
|
2912
|
+
render: _temp2$3
|
|
2712
2913
|
};
|
|
2713
|
-
$[
|
|
2714
|
-
$[
|
|
2914
|
+
$[36] = t16;
|
|
2915
|
+
$[37] = t17;
|
|
2715
2916
|
} else {
|
|
2716
|
-
|
|
2917
|
+
t17 = $[37];
|
|
2717
2918
|
}
|
|
2718
|
-
let
|
|
2719
|
-
if ($[
|
|
2720
|
-
|
|
2721
|
-
$[
|
|
2722
|
-
$[
|
|
2919
|
+
let t18;
|
|
2920
|
+
if ($[38] !== t) {
|
|
2921
|
+
t18 = t("role");
|
|
2922
|
+
$[38] = t;
|
|
2923
|
+
$[39] = t18;
|
|
2723
2924
|
} else {
|
|
2724
|
-
|
|
2925
|
+
t18 = $[39];
|
|
2725
2926
|
}
|
|
2726
|
-
let
|
|
2727
|
-
if ($[
|
|
2728
|
-
|
|
2729
|
-
head:
|
|
2730
|
-
render:
|
|
2927
|
+
let t19;
|
|
2928
|
+
if ($[40] !== t18) {
|
|
2929
|
+
t19 = {
|
|
2930
|
+
head: t18,
|
|
2931
|
+
render: _temp3
|
|
2731
2932
|
};
|
|
2732
|
-
$[
|
|
2733
|
-
$[
|
|
2933
|
+
$[40] = t18;
|
|
2934
|
+
$[41] = t19;
|
|
2734
2935
|
} else {
|
|
2735
|
-
|
|
2936
|
+
t19 = $[41];
|
|
2736
2937
|
}
|
|
2737
|
-
let
|
|
2738
|
-
if ($[
|
|
2739
|
-
|
|
2740
|
-
$[
|
|
2741
|
-
$[
|
|
2742
|
-
$[
|
|
2938
|
+
let t20;
|
|
2939
|
+
if ($[42] !== t17 || $[43] !== t19) {
|
|
2940
|
+
t20 = [t17, t19];
|
|
2941
|
+
$[42] = t17;
|
|
2942
|
+
$[43] = t19;
|
|
2943
|
+
$[44] = t20;
|
|
2743
2944
|
} else {
|
|
2744
|
-
|
|
2945
|
+
t20 = $[44];
|
|
2745
2946
|
}
|
|
2746
|
-
const memberColumns =
|
|
2747
|
-
let
|
|
2748
|
-
if ($[
|
|
2749
|
-
|
|
2750
|
-
$[
|
|
2751
|
-
$[
|
|
2947
|
+
const memberColumns = t20;
|
|
2948
|
+
let t21;
|
|
2949
|
+
if ($[45] !== t) {
|
|
2950
|
+
t21 = t("email");
|
|
2951
|
+
$[45] = t;
|
|
2952
|
+
$[46] = t21;
|
|
2752
2953
|
} else {
|
|
2753
|
-
|
|
2954
|
+
t21 = $[46];
|
|
2754
2955
|
}
|
|
2755
|
-
let
|
|
2756
|
-
if ($[
|
|
2757
|
-
|
|
2758
|
-
head:
|
|
2759
|
-
render:
|
|
2956
|
+
let t22;
|
|
2957
|
+
if ($[47] !== t21) {
|
|
2958
|
+
t22 = {
|
|
2959
|
+
head: t21,
|
|
2960
|
+
render: _temp4
|
|
2760
2961
|
};
|
|
2761
|
-
$[
|
|
2762
|
-
$[
|
|
2962
|
+
$[47] = t21;
|
|
2963
|
+
$[48] = t22;
|
|
2763
2964
|
} else {
|
|
2764
|
-
|
|
2965
|
+
t22 = $[48];
|
|
2765
2966
|
}
|
|
2766
|
-
let
|
|
2767
|
-
if ($[
|
|
2768
|
-
|
|
2769
|
-
$[
|
|
2770
|
-
$[
|
|
2967
|
+
let t23;
|
|
2968
|
+
if ($[49] !== t) {
|
|
2969
|
+
t23 = t("role");
|
|
2970
|
+
$[49] = t;
|
|
2971
|
+
$[50] = t23;
|
|
2771
2972
|
} else {
|
|
2772
|
-
|
|
2973
|
+
t23 = $[50];
|
|
2773
2974
|
}
|
|
2774
|
-
let
|
|
2775
|
-
if ($[
|
|
2776
|
-
|
|
2777
|
-
head:
|
|
2778
|
-
render:
|
|
2975
|
+
let t24;
|
|
2976
|
+
if ($[51] !== t23) {
|
|
2977
|
+
t24 = {
|
|
2978
|
+
head: t23,
|
|
2979
|
+
render: _temp5
|
|
2779
2980
|
};
|
|
2780
|
-
$[
|
|
2781
|
-
$[
|
|
2981
|
+
$[51] = t23;
|
|
2982
|
+
$[52] = t24;
|
|
2782
2983
|
} else {
|
|
2783
|
-
|
|
2984
|
+
t24 = $[52];
|
|
2784
2985
|
}
|
|
2785
|
-
let
|
|
2786
|
-
if ($[
|
|
2787
|
-
|
|
2788
|
-
$[
|
|
2789
|
-
$[
|
|
2986
|
+
let t25;
|
|
2987
|
+
if ($[53] !== t) {
|
|
2988
|
+
t25 = t("status");
|
|
2989
|
+
$[53] = t;
|
|
2990
|
+
$[54] = t25;
|
|
2790
2991
|
} else {
|
|
2791
|
-
|
|
2992
|
+
t25 = $[54];
|
|
2792
2993
|
}
|
|
2793
|
-
let
|
|
2794
|
-
if ($[
|
|
2795
|
-
|
|
2796
|
-
head:
|
|
2797
|
-
render:
|
|
2994
|
+
let t26;
|
|
2995
|
+
if ($[55] !== t25) {
|
|
2996
|
+
t26 = {
|
|
2997
|
+
head: t25,
|
|
2998
|
+
render: _temp6
|
|
2798
2999
|
};
|
|
2799
|
-
$[
|
|
2800
|
-
$[
|
|
3000
|
+
$[55] = t25;
|
|
3001
|
+
$[56] = t26;
|
|
2801
3002
|
} else {
|
|
2802
|
-
|
|
3003
|
+
t26 = $[56];
|
|
2803
3004
|
}
|
|
2804
|
-
let
|
|
2805
|
-
if ($[
|
|
2806
|
-
|
|
2807
|
-
$[
|
|
2808
|
-
$[
|
|
2809
|
-
$[
|
|
2810
|
-
$[
|
|
3005
|
+
let t27;
|
|
3006
|
+
if ($[57] !== t22 || $[58] !== t24 || $[59] !== t26) {
|
|
3007
|
+
t27 = [t22, t24, t26];
|
|
3008
|
+
$[57] = t22;
|
|
3009
|
+
$[58] = t24;
|
|
3010
|
+
$[59] = t26;
|
|
3011
|
+
$[60] = t27;
|
|
2811
3012
|
} else {
|
|
2812
|
-
|
|
3013
|
+
t27 = $[60];
|
|
2813
3014
|
}
|
|
2814
|
-
const invitationColumns =
|
|
3015
|
+
const invitationColumns = t27;
|
|
2815
3016
|
if (ready && !capabilities.organization) {
|
|
2816
|
-
let
|
|
2817
|
-
if ($[
|
|
2818
|
-
|
|
2819
|
-
$[
|
|
2820
|
-
$[
|
|
3017
|
+
let t282;
|
|
3018
|
+
if ($[61] !== t) {
|
|
3019
|
+
t282 = t("Enable the organization() plugin in your auth config to manage organizations here.");
|
|
3020
|
+
$[61] = t;
|
|
3021
|
+
$[62] = t282;
|
|
2821
3022
|
} else {
|
|
2822
|
-
|
|
3023
|
+
t282 = $[62];
|
|
2823
3024
|
}
|
|
2824
|
-
let
|
|
2825
|
-
if ($[
|
|
2826
|
-
|
|
2827
|
-
$[
|
|
2828
|
-
$[
|
|
3025
|
+
let t292;
|
|
3026
|
+
if ($[63] !== t) {
|
|
3027
|
+
t292 = t("Organizations are not enabled.");
|
|
3028
|
+
$[63] = t;
|
|
3029
|
+
$[64] = t292;
|
|
2829
3030
|
} else {
|
|
2830
|
-
|
|
3031
|
+
t292 = $[64];
|
|
2831
3032
|
}
|
|
2832
|
-
let
|
|
2833
|
-
if ($[
|
|
2834
|
-
|
|
2835
|
-
description:
|
|
3033
|
+
let t302;
|
|
3034
|
+
if ($[65] !== t282 || $[66] !== t292) {
|
|
3035
|
+
t302 = /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
3036
|
+
description: t282,
|
|
2836
3037
|
testId: "org-disabled",
|
|
2837
|
-
title:
|
|
3038
|
+
title: t292
|
|
2838
3039
|
}, void 0, false);
|
|
2839
|
-
$[
|
|
2840
|
-
$[
|
|
2841
|
-
$[
|
|
3040
|
+
$[65] = t282;
|
|
3041
|
+
$[66] = t292;
|
|
3042
|
+
$[67] = t302;
|
|
2842
3043
|
} else {
|
|
2843
|
-
|
|
3044
|
+
t302 = $[67];
|
|
2844
3045
|
}
|
|
2845
|
-
return
|
|
3046
|
+
return t302;
|
|
2846
3047
|
}
|
|
2847
|
-
let
|
|
2848
|
-
if ($[
|
|
2849
|
-
|
|
3048
|
+
let t28;
|
|
3049
|
+
if ($[68] !== error) {
|
|
3050
|
+
t28 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
2850
3051
|
className: "text-sm text-destructive",
|
|
2851
3052
|
"data-testid": "org-error",
|
|
2852
3053
|
role: "alert",
|
|
2853
3054
|
children: error
|
|
2854
3055
|
}, void 0, false);
|
|
2855
|
-
$[
|
|
2856
|
-
$[
|
|
3056
|
+
$[68] = error;
|
|
3057
|
+
$[69] = t28;
|
|
2857
3058
|
} else {
|
|
2858
|
-
|
|
3059
|
+
t28 = $[69];
|
|
2859
3060
|
}
|
|
2860
|
-
let
|
|
2861
|
-
if ($[
|
|
2862
|
-
|
|
3061
|
+
let t29;
|
|
3062
|
+
if ($[70] !== orgs || $[71] !== t) {
|
|
3063
|
+
t29 = orgs !== null && orgs.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
2863
3064
|
testId: "org-empty",
|
|
2864
3065
|
title: t("No organizations.")
|
|
2865
3066
|
}, void 0, false);
|
|
2866
|
-
$[
|
|
2867
|
-
$[
|
|
2868
|
-
$[
|
|
3067
|
+
$[70] = orgs;
|
|
3068
|
+
$[71] = t;
|
|
3069
|
+
$[72] = t29;
|
|
2869
3070
|
} else {
|
|
2870
|
-
|
|
3071
|
+
t29 = $[72];
|
|
2871
3072
|
}
|
|
2872
|
-
let
|
|
2873
|
-
if ($[
|
|
2874
|
-
|
|
3073
|
+
let t30;
|
|
3074
|
+
if ($[73] !== orgs || $[74] !== selected || $[75] !== t) {
|
|
3075
|
+
t30 = orgs !== null && orgs.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
|
|
2875
3076
|
className: "overflow-hidden py-0",
|
|
2876
3077
|
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
2877
3078
|
className: "px-0",
|
|
@@ -2925,16 +3126,16 @@ const OrganizationsPanel = () => {
|
|
|
2925
3126
|
}, void 0, true)
|
|
2926
3127
|
}, void 0, false)
|
|
2927
3128
|
}, void 0, false);
|
|
2928
|
-
$[
|
|
2929
|
-
$[
|
|
2930
|
-
$[
|
|
2931
|
-
$[
|
|
3129
|
+
$[73] = orgs;
|
|
3130
|
+
$[74] = selected;
|
|
3131
|
+
$[75] = t;
|
|
3132
|
+
$[76] = t30;
|
|
2932
3133
|
} else {
|
|
2933
|
-
|
|
3134
|
+
t30 = $[76];
|
|
2934
3135
|
}
|
|
2935
|
-
let
|
|
2936
|
-
if ($[
|
|
2937
|
-
|
|
3136
|
+
let t31;
|
|
3137
|
+
if ($[77] !== memberColumns || $[78] !== members || $[79] !== onRemoveMember || $[80] !== selected || $[81] !== t) {
|
|
3138
|
+
t31 = selected !== null && members !== null && /* @__PURE__ */ jsxDEV(OrgRowTable, {
|
|
2938
3139
|
actionLabel: t("Remove"),
|
|
2939
3140
|
actionPrefix: "org-remove-member",
|
|
2940
3141
|
columns: memberColumns,
|
|
@@ -2944,18 +3145,18 @@ const OrganizationsPanel = () => {
|
|
|
2944
3145
|
rows: members,
|
|
2945
3146
|
testId: "org-members"
|
|
2946
3147
|
}, void 0, false);
|
|
2947
|
-
$[
|
|
2948
|
-
$[
|
|
2949
|
-
$[
|
|
2950
|
-
$[
|
|
2951
|
-
$[
|
|
2952
|
-
$[
|
|
3148
|
+
$[77] = memberColumns;
|
|
3149
|
+
$[78] = members;
|
|
3150
|
+
$[79] = onRemoveMember;
|
|
3151
|
+
$[80] = selected;
|
|
3152
|
+
$[81] = t;
|
|
3153
|
+
$[82] = t31;
|
|
2953
3154
|
} else {
|
|
2954
|
-
|
|
3155
|
+
t31 = $[82];
|
|
2955
3156
|
}
|
|
2956
|
-
let
|
|
2957
|
-
if ($[
|
|
2958
|
-
|
|
3157
|
+
let t32;
|
|
3158
|
+
if ($[83] !== invitationColumns || $[84] !== invitations || $[85] !== onCancelInvitation || $[86] !== selected || $[87] !== t) {
|
|
3159
|
+
t32 = selected !== null && invitations !== null && invitations.length > 0 && /* @__PURE__ */ jsxDEV(OrgRowTable, {
|
|
2959
3160
|
actionLabel: t("Cancel"),
|
|
2960
3161
|
actionPrefix: "org-cancel-invitation",
|
|
2961
3162
|
columns: invitationColumns,
|
|
@@ -2965,57 +3166,51 @@ const OrganizationsPanel = () => {
|
|
|
2965
3166
|
rows: invitations,
|
|
2966
3167
|
testId: "org-invitations"
|
|
2967
3168
|
}, void 0, false);
|
|
2968
|
-
$[
|
|
2969
|
-
$[
|
|
2970
|
-
$[
|
|
2971
|
-
$[
|
|
2972
|
-
$[
|
|
2973
|
-
$[
|
|
3169
|
+
$[83] = invitationColumns;
|
|
3170
|
+
$[84] = invitations;
|
|
3171
|
+
$[85] = onCancelInvitation;
|
|
3172
|
+
$[86] = selected;
|
|
3173
|
+
$[87] = t;
|
|
3174
|
+
$[88] = t32;
|
|
2974
3175
|
} else {
|
|
2975
|
-
|
|
3176
|
+
t32 = $[88];
|
|
2976
3177
|
}
|
|
2977
|
-
let
|
|
2978
|
-
if ($[
|
|
2979
|
-
|
|
3178
|
+
let t33;
|
|
3179
|
+
if ($[89] !== t28 || $[90] !== t29 || $[91] !== t30 || $[92] !== t31 || $[93] !== t32) {
|
|
3180
|
+
t33 = /* @__PURE__ */ jsxDEV("div", {
|
|
2980
3181
|
className: "flex flex-col gap-4",
|
|
2981
3182
|
"data-testid": "lunora-organizations",
|
|
2982
|
-
children: [
|
|
3183
|
+
children: [t28, t29, t30, t31, t32]
|
|
2983
3184
|
}, void 0, true);
|
|
2984
|
-
$[
|
|
2985
|
-
$[
|
|
2986
|
-
$[
|
|
2987
|
-
$[
|
|
2988
|
-
$[
|
|
2989
|
-
$[
|
|
3185
|
+
$[89] = t28;
|
|
3186
|
+
$[90] = t29;
|
|
3187
|
+
$[91] = t30;
|
|
3188
|
+
$[92] = t31;
|
|
3189
|
+
$[93] = t32;
|
|
3190
|
+
$[94] = t33;
|
|
2990
3191
|
} else {
|
|
2991
|
-
|
|
3192
|
+
t33 = $[94];
|
|
2992
3193
|
}
|
|
2993
|
-
return
|
|
3194
|
+
return t33;
|
|
2994
3195
|
};
|
|
2995
|
-
function _temp$
|
|
3196
|
+
function _temp$5(column) {
|
|
2996
3197
|
return /* @__PURE__ */ jsxDEV(TableHead, {
|
|
2997
3198
|
children: column.head
|
|
2998
3199
|
}, column.head, false);
|
|
2999
3200
|
}
|
|
3000
|
-
function _temp2$
|
|
3001
|
-
return value + 1;
|
|
3002
|
-
}
|
|
3003
|
-
function _temp3(value_0) {
|
|
3004
|
-
return value_0 + 1;
|
|
3005
|
-
}
|
|
3006
|
-
function _temp4(row) {
|
|
3201
|
+
function _temp2$3(row) {
|
|
3007
3202
|
return formatCell(row.userId);
|
|
3008
3203
|
}
|
|
3009
|
-
function
|
|
3204
|
+
function _temp3(row_0) {
|
|
3010
3205
|
return formatCell(row_0.role);
|
|
3011
3206
|
}
|
|
3012
|
-
function
|
|
3207
|
+
function _temp4(row_1) {
|
|
3013
3208
|
return formatCell(row_1.email);
|
|
3014
3209
|
}
|
|
3015
|
-
function
|
|
3210
|
+
function _temp5(row_2) {
|
|
3016
3211
|
return formatCell(row_2.role);
|
|
3017
3212
|
}
|
|
3018
|
-
function
|
|
3213
|
+
function _temp6(row_3) {
|
|
3019
3214
|
return formatCell(row_3.status);
|
|
3020
3215
|
}
|
|
3021
3216
|
|
|
@@ -4092,8 +4287,6 @@ const UsersPanel = ({
|
|
|
4092
4287
|
} = {}) => {
|
|
4093
4288
|
const client = useLunora();
|
|
4094
4289
|
const t = useT();
|
|
4095
|
-
const [users, setUsers] = useState(null);
|
|
4096
|
-
const [usersError, setUsersError] = useState(null);
|
|
4097
4290
|
const [search, setSearch] = useState("");
|
|
4098
4291
|
const [roleFilter, setRoleFilter] = useState("");
|
|
4099
4292
|
const debouncedSearch = useDebounced(search);
|
|
@@ -4102,31 +4295,23 @@ const UsersPanel = ({
|
|
|
4102
4295
|
const {
|
|
4103
4296
|
capabilities
|
|
4104
4297
|
} = useAuthCapabilities();
|
|
4105
|
-
const
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
} catch (error_) {
|
|
4118
|
-
setUsers(null);
|
|
4119
|
-
setUsersError(errorMessage(error_));
|
|
4120
|
-
}
|
|
4121
|
-
};
|
|
4298
|
+
const trimmedSearch = debouncedSearch.trim();
|
|
4299
|
+
const trimmedRole = roleFilter.trim();
|
|
4300
|
+
const usersQuery = useClientQuery(["lunora-auth-users", trimmedSearch, trimmedRole, pageSize], () => client.listAuthUsers({
|
|
4301
|
+
filterField: trimmedRole === "" ? void 0 : "role",
|
|
4302
|
+
filterValue: trimmedRole === "" ? void 0 : trimmedRole,
|
|
4303
|
+
limit: pageSize,
|
|
4304
|
+
search: trimmedSearch === "" ? void 0 : trimmedSearch
|
|
4305
|
+
}), {
|
|
4306
|
+
keepPreviousData: true
|
|
4307
|
+
});
|
|
4308
|
+
const users = usersQuery.data?.rows ?? null;
|
|
4309
|
+
const usersError = usersQuery.error;
|
|
4122
4310
|
const reloadUsers = () => {
|
|
4123
|
-
|
|
4311
|
+
usersQuery.refetch();
|
|
4124
4312
|
};
|
|
4125
|
-
useEffect(() => {
|
|
4126
|
-
fireAndForget(fetchUsers());
|
|
4127
|
-
}, [fetchUsers]);
|
|
4128
4313
|
useAutoRefresh(() => {
|
|
4129
|
-
|
|
4314
|
+
usersQuery.refetch();
|
|
4130
4315
|
}, true);
|
|
4131
4316
|
const selectedUser = selectedUserId === null ? null : users?.find((user) => user.id === selectedUserId) ?? null;
|
|
4132
4317
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
@@ -4545,37 +4730,18 @@ const CronTriggersPanel = ({
|
|
|
4545
4730
|
} = {}) => {
|
|
4546
4731
|
const client = useLunora();
|
|
4547
4732
|
const t = useT();
|
|
4548
|
-
const [jobs, setJobs] = useState(null);
|
|
4549
|
-
const [error, setError] = useState(null);
|
|
4550
4733
|
const [runStates, setRunStates] = useState({});
|
|
4734
|
+
const jobsQuery = useClientQuery(["lunora-cron-jobs", loadCronJobs ? "custom" : "default"], () => (loadCronJobs ?? (() => client.getCronJobs()))());
|
|
4735
|
+
const {
|
|
4736
|
+
data: jobs,
|
|
4737
|
+
error
|
|
4738
|
+
} = jobsQuery;
|
|
4551
4739
|
const runImpl = useMemo(() => {
|
|
4552
4740
|
if (runCronJob !== void 0) {
|
|
4553
4741
|
return runCronJob;
|
|
4554
4742
|
}
|
|
4555
4743
|
return loadCronJobs === void 0 ? (name) => client.runCronJob(name) : void 0;
|
|
4556
4744
|
}, [client, loadCronJobs, runCronJob]);
|
|
4557
|
-
useEffect(() => {
|
|
4558
|
-
const token = {
|
|
4559
|
-
cancelled: false
|
|
4560
|
-
};
|
|
4561
|
-
fireAndForget((async () => {
|
|
4562
|
-
try {
|
|
4563
|
-
const records = await (loadCronJobs ?? (() => client.getCronJobs()))();
|
|
4564
|
-
if (!token.cancelled) {
|
|
4565
|
-
setJobs(records);
|
|
4566
|
-
setError(null);
|
|
4567
|
-
}
|
|
4568
|
-
} catch (error_) {
|
|
4569
|
-
if (!token.cancelled) {
|
|
4570
|
-
setJobs(null);
|
|
4571
|
-
setError(errorMessage(error_));
|
|
4572
|
-
}
|
|
4573
|
-
}
|
|
4574
|
-
})());
|
|
4575
|
-
return () => {
|
|
4576
|
-
token.cancelled = true;
|
|
4577
|
-
};
|
|
4578
|
-
}, [client, loadCronJobs]);
|
|
4579
4745
|
const run = async (name_0) => {
|
|
4580
4746
|
if (runImpl === void 0) {
|
|
4581
4747
|
return;
|
|
@@ -4598,13 +4764,14 @@ const CronTriggersPanel = ({
|
|
|
4598
4764
|
}
|
|
4599
4765
|
};
|
|
4600
4766
|
});
|
|
4601
|
-
|
|
4767
|
+
jobsQuery.refetch();
|
|
4768
|
+
} catch (error_) {
|
|
4602
4769
|
setRunStates((previous_0) => {
|
|
4603
4770
|
return {
|
|
4604
4771
|
...previous_0,
|
|
4605
4772
|
[name_0]: {
|
|
4606
4773
|
kind: "error",
|
|
4607
|
-
message: errorMessage(
|
|
4774
|
+
message: errorMessage(error_)
|
|
4608
4775
|
}
|
|
4609
4776
|
};
|
|
4610
4777
|
});
|
|
@@ -4618,7 +4785,7 @@ const CronTriggersPanel = ({
|
|
|
4618
4785
|
"data-testid": "cron-error",
|
|
4619
4786
|
role: "alert",
|
|
4620
4787
|
children: error
|
|
4621
|
-
}, void 0, false), jobs
|
|
4788
|
+
}, void 0, false), jobs?.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
4622
4789
|
description: t("Triggers declared with the cronJobs() builder appear here."),
|
|
4623
4790
|
icon: /* @__PURE__ */ jsxDEV("svg", {
|
|
4624
4791
|
"aria-hidden": "true",
|
|
@@ -4638,7 +4805,7 @@ const CronTriggersPanel = ({
|
|
|
4638
4805
|
}, void 0, true),
|
|
4639
4806
|
testId: "cron-empty",
|
|
4640
4807
|
title: t("No cron triggers.")
|
|
4641
|
-
}, void 0, false), jobs !==
|
|
4808
|
+
}, void 0, false), jobs !== void 0 && jobs.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
|
|
4642
4809
|
className: "overflow-hidden py-0",
|
|
4643
4810
|
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
4644
4811
|
className: "px-0",
|
|
@@ -4718,54 +4885,115 @@ const CronTriggersPanel = ({
|
|
|
4718
4885
|
};
|
|
4719
4886
|
|
|
4720
4887
|
const formatScheduledFor = (value) => Number.isFinite(value) ? formatTimestamp(value, "—") : "—";
|
|
4721
|
-
const DeadLetterJobs = ({
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4888
|
+
const DeadLetterJobs = (t0) => {
|
|
4889
|
+
const $ = c(34);
|
|
4890
|
+
let t1;
|
|
4891
|
+
if ($[0] !== t0) {
|
|
4892
|
+
t1 = t0 === void 0 ? {} : t0;
|
|
4893
|
+
$[0] = t0;
|
|
4894
|
+
$[1] = t1;
|
|
4895
|
+
} else {
|
|
4896
|
+
t1 = $[1];
|
|
4897
|
+
}
|
|
4898
|
+
const {
|
|
4899
|
+
loadJobs,
|
|
4900
|
+
removeJob,
|
|
4901
|
+
retryJob
|
|
4902
|
+
} = t1;
|
|
4726
4903
|
const client = useLunora();
|
|
4727
4904
|
const t = useT();
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4905
|
+
let t2;
|
|
4906
|
+
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
4907
|
+
t2 = ["lunora-dead-jobs"];
|
|
4908
|
+
$[2] = t2;
|
|
4909
|
+
} else {
|
|
4910
|
+
t2 = $[2];
|
|
4911
|
+
}
|
|
4912
|
+
let t3;
|
|
4913
|
+
if ($[3] !== client || $[4] !== loadJobs) {
|
|
4914
|
+
t3 = async () => {
|
|
4915
|
+
const records = await (loadJobs ?? (() => client.listDeadJobs()))();
|
|
4916
|
+
return records.toSorted(_temp$4);
|
|
4917
|
+
};
|
|
4918
|
+
$[3] = client;
|
|
4919
|
+
$[4] = loadJobs;
|
|
4920
|
+
$[5] = t3;
|
|
4921
|
+
} else {
|
|
4922
|
+
t3 = $[5];
|
|
4923
|
+
}
|
|
4924
|
+
const jobsQuery = useClientQuery(t2, t3);
|
|
4925
|
+
const jobs = jobsQuery.data;
|
|
4926
|
+
const [actionError, setActionError] = useState(void 0);
|
|
4927
|
+
const error = jobsQuery.error ?? actionError;
|
|
4731
4928
|
const clientOwned = loadJobs === void 0;
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4929
|
+
let t4;
|
|
4930
|
+
if ($[6] !== client || $[7] !== clientOwned || $[8] !== retryJob) {
|
|
4931
|
+
t4 = retryJob ?? (clientOwned ? (id) => client.retryDeadJob(id) : void 0);
|
|
4932
|
+
$[6] = client;
|
|
4933
|
+
$[7] = clientOwned;
|
|
4934
|
+
$[8] = retryJob;
|
|
4935
|
+
$[9] = t4;
|
|
4936
|
+
} else {
|
|
4937
|
+
t4 = $[9];
|
|
4938
|
+
}
|
|
4939
|
+
const retryImpl = t4;
|
|
4940
|
+
let t5;
|
|
4941
|
+
if ($[10] !== client || $[11] !== clientOwned || $[12] !== removeJob) {
|
|
4942
|
+
t5 = removeJob ?? (clientOwned ? (id_0) => client.removeDeadJob(id_0) : void 0);
|
|
4943
|
+
$[10] = client;
|
|
4944
|
+
$[11] = clientOwned;
|
|
4945
|
+
$[12] = removeJob;
|
|
4946
|
+
$[13] = t5;
|
|
4947
|
+
} else {
|
|
4948
|
+
t5 = $[13];
|
|
4949
|
+
}
|
|
4950
|
+
const removeImpl = t5;
|
|
4951
|
+
let t6;
|
|
4952
|
+
if ($[14] !== jobsQuery) {
|
|
4953
|
+
t6 = () => {
|
|
4954
|
+
jobsQuery.refetch();
|
|
4955
|
+
};
|
|
4956
|
+
$[14] = jobsQuery;
|
|
4957
|
+
$[15] = t6;
|
|
4958
|
+
} else {
|
|
4959
|
+
t6 = $[15];
|
|
4960
|
+
}
|
|
4961
|
+
useAutoRefresh(t6, true);
|
|
4962
|
+
let t7;
|
|
4963
|
+
if ($[16] !== jobsQuery) {
|
|
4964
|
+
t7 = async (operation) => {
|
|
4965
|
+
setActionError(void 0);
|
|
4966
|
+
try {
|
|
4967
|
+
await operation;
|
|
4968
|
+
jobsQuery.refetch();
|
|
4969
|
+
} catch (t82) {
|
|
4970
|
+
const error_ = t82;
|
|
4971
|
+
setActionError(errorMessage(error_));
|
|
4972
|
+
}
|
|
4973
|
+
};
|
|
4974
|
+
$[16] = jobsQuery;
|
|
4975
|
+
$[17] = t7;
|
|
4976
|
+
} else {
|
|
4977
|
+
t7 = $[17];
|
|
4978
|
+
}
|
|
4979
|
+
const act = t7;
|
|
4759
4980
|
const hasActions = retryImpl !== void 0 || removeImpl !== void 0;
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
children: [error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
4981
|
+
let t8;
|
|
4982
|
+
if ($[18] !== error) {
|
|
4983
|
+
t8 = error !== void 0 && /* @__PURE__ */ jsxDEV("p", {
|
|
4764
4984
|
className: "text-sm text-destructive",
|
|
4765
4985
|
"data-testid": "dlq-error",
|
|
4766
4986
|
role: "alert",
|
|
4767
4987
|
children: error
|
|
4768
|
-
}, void 0, false)
|
|
4988
|
+
}, void 0, false);
|
|
4989
|
+
$[18] = error;
|
|
4990
|
+
$[19] = t8;
|
|
4991
|
+
} else {
|
|
4992
|
+
t8 = $[19];
|
|
4993
|
+
}
|
|
4994
|
+
let t9;
|
|
4995
|
+
if ($[20] !== jobs?.length || $[21] !== t) {
|
|
4996
|
+
t9 = jobs?.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
4769
4997
|
description: t("Jobs that exhaust their retry budget are parked here instead of being dropped."),
|
|
4770
4998
|
icon: /* @__PURE__ */ jsxDEV("svg", {
|
|
4771
4999
|
"aria-hidden": "true",
|
|
@@ -4781,7 +5009,16 @@ const DeadLetterJobs = ({
|
|
|
4781
5009
|
}, void 0, false),
|
|
4782
5010
|
testId: "dlq-empty",
|
|
4783
5011
|
title: t("No dead-letter jobs.")
|
|
4784
|
-
}, void 0, false)
|
|
5012
|
+
}, void 0, false);
|
|
5013
|
+
$[20] = jobs?.length;
|
|
5014
|
+
$[21] = t;
|
|
5015
|
+
$[22] = t9;
|
|
5016
|
+
} else {
|
|
5017
|
+
t9 = $[22];
|
|
5018
|
+
}
|
|
5019
|
+
let t10;
|
|
5020
|
+
if ($[23] !== act || $[24] !== hasActions || $[25] !== jobs || $[26] !== removeImpl || $[27] !== retryImpl || $[28] !== t) {
|
|
5021
|
+
t10 = jobs !== void 0 && jobs.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
|
|
4785
5022
|
className: "overflow-hidden py-0",
|
|
4786
5023
|
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
4787
5024
|
className: "px-0",
|
|
@@ -4852,9 +5089,36 @@ const DeadLetterJobs = ({
|
|
|
4852
5089
|
}, void 0, false)]
|
|
4853
5090
|
}, void 0, true)
|
|
4854
5091
|
}, void 0, false)
|
|
4855
|
-
}, void 0, false)
|
|
4856
|
-
|
|
5092
|
+
}, void 0, false);
|
|
5093
|
+
$[23] = act;
|
|
5094
|
+
$[24] = hasActions;
|
|
5095
|
+
$[25] = jobs;
|
|
5096
|
+
$[26] = removeImpl;
|
|
5097
|
+
$[27] = retryImpl;
|
|
5098
|
+
$[28] = t;
|
|
5099
|
+
$[29] = t10;
|
|
5100
|
+
} else {
|
|
5101
|
+
t10 = $[29];
|
|
5102
|
+
}
|
|
5103
|
+
let t11;
|
|
5104
|
+
if ($[30] !== t10 || $[31] !== t8 || $[32] !== t9) {
|
|
5105
|
+
t11 = /* @__PURE__ */ jsxDEV("div", {
|
|
5106
|
+
className: "flex flex-col gap-3",
|
|
5107
|
+
"data-testid": "lunora-dead-letter",
|
|
5108
|
+
children: [t8, t9, t10]
|
|
5109
|
+
}, void 0, true);
|
|
5110
|
+
$[30] = t10;
|
|
5111
|
+
$[31] = t8;
|
|
5112
|
+
$[32] = t9;
|
|
5113
|
+
$[33] = t11;
|
|
5114
|
+
} else {
|
|
5115
|
+
t11 = $[33];
|
|
5116
|
+
}
|
|
5117
|
+
return t11;
|
|
4857
5118
|
};
|
|
5119
|
+
function _temp$4(a, b) {
|
|
5120
|
+
return (b.attempts ?? 0) - (a.attempts ?? 0);
|
|
5121
|
+
}
|
|
4858
5122
|
|
|
4859
5123
|
const StatTile = (t0) => {
|
|
4860
5124
|
const $ = c(8);
|
|
@@ -4904,42 +5168,77 @@ const StatTile = (t0) => {
|
|
|
4904
5168
|
}
|
|
4905
5169
|
return t3;
|
|
4906
5170
|
};
|
|
4907
|
-
const SchedulerPoolsPanel = ({
|
|
4908
|
-
|
|
4909
|
-
|
|
5171
|
+
const SchedulerPoolsPanel = (t0) => {
|
|
5172
|
+
const $ = c(25);
|
|
5173
|
+
let t1;
|
|
5174
|
+
if ($[0] !== t0) {
|
|
5175
|
+
t1 = t0 === void 0 ? {} : t0;
|
|
5176
|
+
$[0] = t0;
|
|
5177
|
+
$[1] = t1;
|
|
5178
|
+
} else {
|
|
5179
|
+
t1 = $[1];
|
|
5180
|
+
}
|
|
5181
|
+
const {
|
|
5182
|
+
loadStatus
|
|
5183
|
+
} = t1;
|
|
4910
5184
|
const client = useLunora();
|
|
4911
5185
|
const t = useT();
|
|
4912
|
-
const
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
5186
|
+
const t2 = loadStatus === void 0;
|
|
5187
|
+
let t3;
|
|
5188
|
+
if ($[2] !== t2) {
|
|
5189
|
+
t3 = ["lunora-scheduler-status", t2];
|
|
5190
|
+
$[2] = t2;
|
|
5191
|
+
$[3] = t3;
|
|
5192
|
+
} else {
|
|
5193
|
+
t3 = $[3];
|
|
5194
|
+
}
|
|
5195
|
+
let t4;
|
|
5196
|
+
if ($[4] !== client || $[5] !== loadStatus) {
|
|
5197
|
+
t4 = async () => {
|
|
5198
|
+
const next = await (loadStatus ?? (() => client.schedulerStatus()))();
|
|
5199
|
+
return {
|
|
4920
5200
|
...next,
|
|
4921
|
-
pools: next.pools.toSorted(
|
|
4922
|
-
}
|
|
4923
|
-
}
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
}
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
5201
|
+
pools: next.pools.toSorted(_temp$3)
|
|
5202
|
+
};
|
|
5203
|
+
};
|
|
5204
|
+
$[4] = client;
|
|
5205
|
+
$[5] = loadStatus;
|
|
5206
|
+
$[6] = t4;
|
|
5207
|
+
} else {
|
|
5208
|
+
t4 = $[6];
|
|
5209
|
+
}
|
|
5210
|
+
const statusQuery = useClientQuery(t3, t4);
|
|
5211
|
+
const {
|
|
5212
|
+
data: status,
|
|
5213
|
+
error
|
|
5214
|
+
} = statusQuery;
|
|
5215
|
+
let t5;
|
|
5216
|
+
if ($[7] !== statusQuery) {
|
|
5217
|
+
t5 = () => {
|
|
5218
|
+
statusQuery.refetch();
|
|
5219
|
+
};
|
|
5220
|
+
$[7] = statusQuery;
|
|
5221
|
+
$[8] = t5;
|
|
5222
|
+
} else {
|
|
5223
|
+
t5 = $[8];
|
|
5224
|
+
}
|
|
5225
|
+
useAutoRefresh(t5, true);
|
|
5226
|
+
let t6;
|
|
5227
|
+
if ($[9] !== error) {
|
|
5228
|
+
t6 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
4938
5229
|
className: "text-sm text-destructive",
|
|
4939
5230
|
"data-testid": "pools-error",
|
|
4940
5231
|
role: "alert",
|
|
4941
5232
|
children: error
|
|
4942
|
-
}, void 0, false)
|
|
5233
|
+
}, void 0, false);
|
|
5234
|
+
$[9] = error;
|
|
5235
|
+
$[10] = t6;
|
|
5236
|
+
} else {
|
|
5237
|
+
t6 = $[10];
|
|
5238
|
+
}
|
|
5239
|
+
let t7;
|
|
5240
|
+
if ($[11] !== status || $[12] !== t) {
|
|
5241
|
+
t7 = status !== void 0 && /* @__PURE__ */ jsxDEV("div", {
|
|
4943
5242
|
className: "flex gap-3",
|
|
4944
5243
|
"data-testid": "pools-totals",
|
|
4945
5244
|
children: [/* @__PURE__ */ jsxDEV(StatTile, {
|
|
@@ -4955,7 +5254,16 @@ const SchedulerPoolsPanel = ({
|
|
|
4955
5254
|
testId: "pools-count",
|
|
4956
5255
|
value: status.pools.length
|
|
4957
5256
|
}, void 0, false)]
|
|
4958
|
-
}, void 0, true)
|
|
5257
|
+
}, void 0, true);
|
|
5258
|
+
$[11] = status;
|
|
5259
|
+
$[12] = t;
|
|
5260
|
+
$[13] = t7;
|
|
5261
|
+
} else {
|
|
5262
|
+
t7 = $[13];
|
|
5263
|
+
}
|
|
5264
|
+
let t8;
|
|
5265
|
+
if ($[14] !== status?.pools.length || $[15] !== t) {
|
|
5266
|
+
t8 = status?.pools.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
4959
5267
|
description: t("Pools created with createWorkpool appear here once they have activity."),
|
|
4960
5268
|
icon: /* @__PURE__ */ jsxDEV("svg", {
|
|
4961
5269
|
"aria-hidden": "true",
|
|
@@ -4971,7 +5279,16 @@ const SchedulerPoolsPanel = ({
|
|
|
4971
5279
|
}, void 0, false),
|
|
4972
5280
|
testId: "pools-empty",
|
|
4973
5281
|
title: t("No workpools.")
|
|
4974
|
-
}, void 0, false)
|
|
5282
|
+
}, void 0, false);
|
|
5283
|
+
$[14] = status?.pools.length;
|
|
5284
|
+
$[15] = t;
|
|
5285
|
+
$[16] = t8;
|
|
5286
|
+
} else {
|
|
5287
|
+
t8 = $[16];
|
|
5288
|
+
}
|
|
5289
|
+
let t9;
|
|
5290
|
+
if ($[17] !== status || $[18] !== t) {
|
|
5291
|
+
t9 = status !== void 0 && status.pools.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
|
|
4975
5292
|
className: "overflow-hidden py-0",
|
|
4976
5293
|
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
4977
5294
|
className: "px-0",
|
|
@@ -4990,28 +5307,55 @@ const SchedulerPoolsPanel = ({
|
|
|
4990
5307
|
}, void 0, false)]
|
|
4991
5308
|
}, void 0, true)
|
|
4992
5309
|
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
4993
|
-
children: status.pools.map(
|
|
4994
|
-
"data-testid": `pools-row-${pool.name}`,
|
|
4995
|
-
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
4996
|
-
className: "font-mono text-xs",
|
|
4997
|
-
children: pool.name
|
|
4998
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
4999
|
-
className: "tabular-nums",
|
|
5000
|
-
children: pool.queued
|
|
5001
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
5002
|
-
className: "tabular-nums",
|
|
5003
|
-
children: [pool.inFlight, " / ", pool.maxConcurrency]
|
|
5004
|
-
}, void 0, true), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
5005
|
-
className: "tabular-nums",
|
|
5006
|
-
children: pool.maxConcurrency
|
|
5007
|
-
}, void 0, false)]
|
|
5008
|
-
}, pool.name, true))
|
|
5310
|
+
children: status.pools.map(_temp2$2)
|
|
5009
5311
|
}, void 0, false)]
|
|
5010
5312
|
}, void 0, true)
|
|
5011
5313
|
}, void 0, false)
|
|
5012
|
-
}, void 0, false)
|
|
5013
|
-
|
|
5314
|
+
}, void 0, false);
|
|
5315
|
+
$[17] = status;
|
|
5316
|
+
$[18] = t;
|
|
5317
|
+
$[19] = t9;
|
|
5318
|
+
} else {
|
|
5319
|
+
t9 = $[19];
|
|
5320
|
+
}
|
|
5321
|
+
let t10;
|
|
5322
|
+
if ($[20] !== t6 || $[21] !== t7 || $[22] !== t8 || $[23] !== t9) {
|
|
5323
|
+
t10 = /* @__PURE__ */ jsxDEV("div", {
|
|
5324
|
+
className: "flex flex-col gap-3",
|
|
5325
|
+
"data-testid": "lunora-scheduler-pools",
|
|
5326
|
+
children: [t6, t7, t8, t9]
|
|
5327
|
+
}, void 0, true);
|
|
5328
|
+
$[20] = t6;
|
|
5329
|
+
$[21] = t7;
|
|
5330
|
+
$[22] = t8;
|
|
5331
|
+
$[23] = t9;
|
|
5332
|
+
$[24] = t10;
|
|
5333
|
+
} else {
|
|
5334
|
+
t10 = $[24];
|
|
5335
|
+
}
|
|
5336
|
+
return t10;
|
|
5014
5337
|
};
|
|
5338
|
+
function _temp$3(a, b) {
|
|
5339
|
+
return b.queued - a.queued;
|
|
5340
|
+
}
|
|
5341
|
+
function _temp2$2(pool) {
|
|
5342
|
+
return /* @__PURE__ */ jsxDEV(TableRow, {
|
|
5343
|
+
"data-testid": `pools-row-${pool.name}`,
|
|
5344
|
+
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
5345
|
+
className: "font-mono text-xs",
|
|
5346
|
+
children: pool.name
|
|
5347
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
5348
|
+
className: "tabular-nums",
|
|
5349
|
+
children: pool.queued
|
|
5350
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
5351
|
+
className: "tabular-nums",
|
|
5352
|
+
children: [pool.inFlight, " / ", pool.maxConcurrency]
|
|
5353
|
+
}, void 0, true), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
5354
|
+
className: "tabular-nums",
|
|
5355
|
+
children: pool.maxConcurrency
|
|
5356
|
+
}, void 0, false)]
|
|
5357
|
+
}, pool.name, true);
|
|
5358
|
+
}
|
|
5015
5359
|
|
|
5016
5360
|
const VIEW_KEYS = ["jobs", "dead", "pools", "cron"];
|
|
5017
5361
|
const SchedulePanel = (t0) => {
|
|
@@ -5191,7 +5535,6 @@ const SchedulePanel = (t0) => {
|
|
|
5191
5535
|
return t15;
|
|
5192
5536
|
};
|
|
5193
5537
|
|
|
5194
|
-
const LIST_SUBSCRIPTIONS = adminRef(ADMIN_FUNCTIONS.listSubscriptions);
|
|
5195
5538
|
const ARGS_MAX = 80;
|
|
5196
5539
|
const formatArguments = (args) => {
|
|
5197
5540
|
if (args === void 0) {
|
|
@@ -5229,89 +5572,63 @@ const DASH = /* @__PURE__ */ jsxDEV("span", {
|
|
|
5229
5572
|
children: "—"
|
|
5230
5573
|
}, void 0, false);
|
|
5231
5574
|
const SubscriptionsPanel = (t0) => {
|
|
5232
|
-
const $ = c(
|
|
5575
|
+
const $ = c(20);
|
|
5233
5576
|
const {
|
|
5234
5577
|
initialShardKey
|
|
5235
5578
|
} = t0;
|
|
5236
|
-
const client = useLunora();
|
|
5237
5579
|
const t = useT();
|
|
5238
5580
|
const [shardKey, setShardKey] = useState(initialShardKey ?? "");
|
|
5239
|
-
const [result, setResult] = useState(null);
|
|
5240
|
-
const [error, setError] = useState(null);
|
|
5241
5581
|
let t1;
|
|
5242
|
-
if ($[0] !==
|
|
5243
|
-
t1 =
|
|
5244
|
-
|
|
5245
|
-
try {
|
|
5246
|
-
const next = await client.query(LIST_SUBSCRIPTIONS, {}, callOptions(shard));
|
|
5247
|
-
setResult(next);
|
|
5248
|
-
} catch (t22) {
|
|
5249
|
-
const error_ = t22;
|
|
5250
|
-
setResult(null);
|
|
5251
|
-
setError(errorMessage(error_));
|
|
5252
|
-
}
|
|
5253
|
-
};
|
|
5254
|
-
$[0] = client;
|
|
5582
|
+
if ($[0] !== shardKey) {
|
|
5583
|
+
t1 = shardKey.trim();
|
|
5584
|
+
$[0] = shardKey;
|
|
5255
5585
|
$[1] = t1;
|
|
5256
5586
|
} else {
|
|
5257
5587
|
t1 = $[1];
|
|
5258
5588
|
}
|
|
5259
|
-
const
|
|
5589
|
+
const debouncedShard = useDebounced(t1, 400);
|
|
5260
5590
|
let t2;
|
|
5261
|
-
if ($[2]
|
|
5262
|
-
t2 =
|
|
5263
|
-
$[2] =
|
|
5264
|
-
$[3] = t2;
|
|
5591
|
+
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
5592
|
+
t2 = {};
|
|
5593
|
+
$[2] = t2;
|
|
5265
5594
|
} else {
|
|
5266
|
-
t2 = $[
|
|
5595
|
+
t2 = $[2];
|
|
5267
5596
|
}
|
|
5268
|
-
const debouncedShard = useDebounced(t2, 400);
|
|
5269
5597
|
let t3;
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
};
|
|
5275
|
-
t4 = [refresh, debouncedShard];
|
|
5276
|
-
$[4] = debouncedShard;
|
|
5277
|
-
$[5] = refresh;
|
|
5278
|
-
$[6] = t3;
|
|
5279
|
-
$[7] = t4;
|
|
5280
|
-
} else {
|
|
5281
|
-
t3 = $[6];
|
|
5282
|
-
t4 = $[7];
|
|
5283
|
-
}
|
|
5284
|
-
useEffect(t3, t4);
|
|
5285
|
-
let t5;
|
|
5286
|
-
if ($[8] !== debouncedShard || $[9] !== refresh) {
|
|
5287
|
-
t5 = () => {
|
|
5288
|
-
fireAndForget(refresh(debouncedShard));
|
|
5598
|
+
if ($[3] !== debouncedShard) {
|
|
5599
|
+
t3 = {
|
|
5600
|
+
keepPreviousData: true,
|
|
5601
|
+
shardKey: debouncedShard
|
|
5289
5602
|
};
|
|
5290
|
-
$[
|
|
5291
|
-
$[
|
|
5292
|
-
$[10] = t5;
|
|
5603
|
+
$[3] = debouncedShard;
|
|
5604
|
+
$[4] = t3;
|
|
5293
5605
|
} else {
|
|
5294
|
-
|
|
5606
|
+
t3 = $[4];
|
|
5295
5607
|
}
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5608
|
+
const {
|
|
5609
|
+
data: result,
|
|
5610
|
+
error,
|
|
5611
|
+
refetch
|
|
5612
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.listSubscriptions, t2, t3);
|
|
5613
|
+
useAutoRefresh(refetch, true);
|
|
5614
|
+
let t4;
|
|
5615
|
+
if ($[5] !== error || $[6] !== result || $[7] !== shardKey || $[8] !== t) {
|
|
5616
|
+
const rows = result === void 0 ? [] : toRows(result.connections);
|
|
5617
|
+
let t5;
|
|
5618
|
+
if ($[10] !== shardKey) {
|
|
5619
|
+
t5 = /* @__PURE__ */ jsxDEV(ShardInput, {
|
|
5303
5620
|
onChange: setShardKey,
|
|
5304
5621
|
testId: "subs-shard-input",
|
|
5305
5622
|
value: shardKey
|
|
5306
5623
|
}, void 0, false);
|
|
5307
|
-
$[
|
|
5308
|
-
$[
|
|
5624
|
+
$[10] = shardKey;
|
|
5625
|
+
$[11] = t5;
|
|
5309
5626
|
} else {
|
|
5310
|
-
|
|
5627
|
+
t5 = $[11];
|
|
5311
5628
|
}
|
|
5312
|
-
let
|
|
5313
|
-
if ($[
|
|
5314
|
-
|
|
5629
|
+
let t6;
|
|
5630
|
+
if ($[12] !== result || $[13] !== t) {
|
|
5631
|
+
t6 = result !== void 0 && /* @__PURE__ */ jsxDEV("div", {
|
|
5315
5632
|
className: "ml-auto flex items-center gap-2 text-sm text-muted-foreground",
|
|
5316
5633
|
"data-testid": "subs-count",
|
|
5317
5634
|
children: [/* @__PURE__ */ jsxDEV(Badge, {
|
|
@@ -5326,41 +5643,41 @@ const SubscriptionsPanel = (t0) => {
|
|
|
5326
5643
|
})
|
|
5327
5644
|
}, void 0, false)]
|
|
5328
5645
|
}, void 0, true);
|
|
5329
|
-
$[
|
|
5330
|
-
$[
|
|
5331
|
-
$[
|
|
5646
|
+
$[12] = result;
|
|
5647
|
+
$[13] = t;
|
|
5648
|
+
$[14] = t6;
|
|
5332
5649
|
} else {
|
|
5333
|
-
|
|
5650
|
+
t6 = $[14];
|
|
5334
5651
|
}
|
|
5335
|
-
let
|
|
5336
|
-
if ($[
|
|
5337
|
-
|
|
5652
|
+
let t7;
|
|
5653
|
+
if ($[15] !== t5 || $[16] !== t6) {
|
|
5654
|
+
t7 = /* @__PURE__ */ jsxDEV("div", {
|
|
5338
5655
|
className: "flex flex-wrap items-center gap-2",
|
|
5339
|
-
children: [
|
|
5656
|
+
children: [t5, t6]
|
|
5340
5657
|
}, void 0, true);
|
|
5341
|
-
$[
|
|
5342
|
-
$[
|
|
5343
|
-
$[
|
|
5658
|
+
$[15] = t5;
|
|
5659
|
+
$[16] = t6;
|
|
5660
|
+
$[17] = t7;
|
|
5344
5661
|
} else {
|
|
5345
|
-
|
|
5662
|
+
t7 = $[17];
|
|
5346
5663
|
}
|
|
5347
|
-
let
|
|
5348
|
-
if ($[
|
|
5349
|
-
|
|
5664
|
+
let t8;
|
|
5665
|
+
if ($[18] !== error) {
|
|
5666
|
+
t8 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
5350
5667
|
className: "text-sm text-destructive",
|
|
5351
5668
|
"data-testid": "subs-error",
|
|
5352
5669
|
role: "alert",
|
|
5353
5670
|
children: error
|
|
5354
5671
|
}, void 0, false);
|
|
5355
|
-
$[
|
|
5356
|
-
$[
|
|
5672
|
+
$[18] = error;
|
|
5673
|
+
$[19] = t8;
|
|
5357
5674
|
} else {
|
|
5358
|
-
|
|
5675
|
+
t8 = $[19];
|
|
5359
5676
|
}
|
|
5360
|
-
|
|
5677
|
+
t4 = /* @__PURE__ */ jsxDEV("div", {
|
|
5361
5678
|
className: "flex flex-col gap-4",
|
|
5362
5679
|
"data-testid": "subs-panel",
|
|
5363
|
-
children: [
|
|
5680
|
+
children: [t7, t8, error === null && result !== void 0 && rows.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
5364
5681
|
description: t("Active WebSocket subscriptions on this shard."),
|
|
5365
5682
|
icon: /* @__PURE__ */ jsxDEV("svg", {
|
|
5366
5683
|
"aria-hidden": "true",
|
|
@@ -5376,7 +5693,7 @@ const SubscriptionsPanel = (t0) => {
|
|
|
5376
5693
|
}, void 0, false),
|
|
5377
5694
|
testId: "subs-empty",
|
|
5378
5695
|
title: t("No active subscriptions.")
|
|
5379
|
-
}, void 0, false), rows.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
|
|
5696
|
+
}, void 0, false), error === null && rows.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
|
|
5380
5697
|
className: "overflow-hidden py-0",
|
|
5381
5698
|
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
5382
5699
|
className: "px-0",
|
|
@@ -5428,18 +5745,17 @@ const SubscriptionsPanel = (t0) => {
|
|
|
5428
5745
|
}, void 0, false)
|
|
5429
5746
|
}, void 0, false)]
|
|
5430
5747
|
}, void 0, true);
|
|
5431
|
-
$[
|
|
5432
|
-
$[
|
|
5433
|
-
$[
|
|
5434
|
-
$[
|
|
5435
|
-
$[
|
|
5748
|
+
$[5] = error;
|
|
5749
|
+
$[6] = result;
|
|
5750
|
+
$[7] = shardKey;
|
|
5751
|
+
$[8] = t;
|
|
5752
|
+
$[9] = t4;
|
|
5436
5753
|
} else {
|
|
5437
|
-
|
|
5754
|
+
t4 = $[9];
|
|
5438
5755
|
}
|
|
5439
|
-
return
|
|
5756
|
+
return t4;
|
|
5440
5757
|
};
|
|
5441
5758
|
|
|
5442
|
-
const READ_TABLE_PAGE = adminRef(ADMIN_FUNCTIONS.readTablePage);
|
|
5443
5759
|
const ACTIVE_STATES = /* @__PURE__ */ new Set(["active", "trialing"]);
|
|
5444
5760
|
const ALERT_STATES = /* @__PURE__ */ new Set(["past_due", "unpaid"]);
|
|
5445
5761
|
const readField = (row, key) => {
|
|
@@ -5470,44 +5786,33 @@ const badgeVariant = (state) => {
|
|
|
5470
5786
|
}
|
|
5471
5787
|
return ALERT_STATES.has(state) ? "destructive" : "outline";
|
|
5472
5788
|
};
|
|
5473
|
-
const
|
|
5474
|
-
|
|
5789
|
+
const PaymentsPanel = ({
|
|
5790
|
+
limit = 100
|
|
5791
|
+
}) => {
|
|
5792
|
+
const t = useT();
|
|
5793
|
+
const subscriptionsQuery = useAdminQuery(ADMIN_FUNCTIONS.readTablePage, {
|
|
5475
5794
|
filters: [],
|
|
5476
5795
|
limit,
|
|
5477
5796
|
offset: 0,
|
|
5478
5797
|
orderBy: [],
|
|
5479
5798
|
search: "",
|
|
5480
|
-
table
|
|
5481
|
-
}
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
setEvents(eventRows);
|
|
5498
|
-
} catch (error_) {
|
|
5499
|
-
setSubscriptions([]);
|
|
5500
|
-
setEvents([]);
|
|
5501
|
-
setError(errorMessage(error_));
|
|
5502
|
-
}
|
|
5503
|
-
};
|
|
5504
|
-
useEffect(() => {
|
|
5505
|
-
fireAndForget(refresh());
|
|
5506
|
-
}, [refresh]);
|
|
5507
|
-
const reload = () => {
|
|
5508
|
-
fireAndForget(refresh());
|
|
5509
|
-
};
|
|
5510
|
-
useAutoRefresh(reload, true);
|
|
5799
|
+
table: "subscriptions"
|
|
5800
|
+
});
|
|
5801
|
+
const eventsQuery = useAdminQuery(ADMIN_FUNCTIONS.readTablePage, {
|
|
5802
|
+
filters: [],
|
|
5803
|
+
limit: 25,
|
|
5804
|
+
offset: 0,
|
|
5805
|
+
orderBy: [],
|
|
5806
|
+
search: "",
|
|
5807
|
+
table: "events"
|
|
5808
|
+
});
|
|
5809
|
+
useAutoRefresh(() => {
|
|
5810
|
+
subscriptionsQuery.refetch();
|
|
5811
|
+
eventsQuery.refetch();
|
|
5812
|
+
}, true);
|
|
5813
|
+
const subscriptions = subscriptionsQuery.data?.rows ?? [];
|
|
5814
|
+
const events = eventsQuery.data?.rows ?? [];
|
|
5815
|
+
const error = subscriptionsQuery.error ?? eventsQuery.error;
|
|
5511
5816
|
const activeCount = subscriptions.filter((row) => ACTIVE_STATES.has(text(readField(row, "state")))).length;
|
|
5512
5817
|
const recentEvents = events.toSorted((a, b) => Number(readField(b, "processedAt") ?? 0) - Number(readField(a, "processedAt") ?? 0));
|
|
5513
5818
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
@@ -5545,7 +5850,7 @@ const PaymentsPanel = ({
|
|
|
5545
5850
|
}, void 0, false), error === null ? void 0 : /* @__PURE__ */ jsxDEV("p", {
|
|
5546
5851
|
className: "text-sm text-destructive",
|
|
5547
5852
|
children: error
|
|
5548
|
-
}, void 0, false), subscriptions.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
5853
|
+
}, void 0, false), subscriptions.length === 0 && !subscriptionsQuery.isLoading ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
5549
5854
|
testId: "payments-empty",
|
|
5550
5855
|
title: t("No subscriptions yet")
|
|
5551
5856
|
}, void 0, false) : /* @__PURE__ */ jsxDEV(Card, {
|
|
@@ -5624,9 +5929,6 @@ const PaymentsPanel = ({
|
|
|
5624
5929
|
}, void 0, true);
|
|
5625
5930
|
};
|
|
5626
5931
|
|
|
5627
|
-
const RLS_POLICIES = adminRef(ADMIN_FUNCTIONS.rlsPolicies);
|
|
5628
|
-
const MASK_POLICIES = adminRef(ADMIN_FUNCTIONS.maskPolicies);
|
|
5629
|
-
const GET_ADVISORIES = adminRef(ADMIN_FUNCTIONS.getAdvisories);
|
|
5630
5932
|
const OPERATIONS = ["read", "insert", "update", "delete"];
|
|
5631
5933
|
const operationLabel$1 = (t, operation) => ({
|
|
5632
5934
|
delete: t("Delete"),
|
|
@@ -5685,136 +5987,181 @@ const buildRows = (policies, maskColumns, uncovered) => {
|
|
|
5685
5987
|
}
|
|
5686
5988
|
return [...byTable.values()].toSorted((a, b) => a.table.localeCompare(b.table));
|
|
5687
5989
|
};
|
|
5688
|
-
const PermissionsMatrix = ({
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5990
|
+
const PermissionsMatrix = (t0) => {
|
|
5991
|
+
const $ = c(16);
|
|
5992
|
+
let t1;
|
|
5993
|
+
if ($[0] !== t0) {
|
|
5994
|
+
t1 = t0 === void 0 ? {} : t0;
|
|
5995
|
+
$[0] = t0;
|
|
5996
|
+
$[1] = t1;
|
|
5997
|
+
} else {
|
|
5998
|
+
t1 = $[1];
|
|
5999
|
+
}
|
|
6000
|
+
const {
|
|
6001
|
+
onProbe
|
|
6002
|
+
} = t1;
|
|
5692
6003
|
const t = useT();
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
6004
|
+
let t2;
|
|
6005
|
+
let t3;
|
|
6006
|
+
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6007
|
+
t2 = {};
|
|
6008
|
+
t3 = {
|
|
6009
|
+
live: true
|
|
6010
|
+
};
|
|
6011
|
+
$[2] = t2;
|
|
6012
|
+
$[3] = t3;
|
|
6013
|
+
} else {
|
|
6014
|
+
t2 = $[2];
|
|
6015
|
+
t3 = $[3];
|
|
6016
|
+
}
|
|
6017
|
+
const policiesQuery = useAdminQuery(ADMIN_FUNCTIONS.rlsPolicies, t2, t3);
|
|
6018
|
+
let t4;
|
|
6019
|
+
if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6020
|
+
t4 = {};
|
|
6021
|
+
$[4] = t4;
|
|
6022
|
+
} else {
|
|
6023
|
+
t4 = $[4];
|
|
6024
|
+
}
|
|
6025
|
+
const masksQuery = useAdminQuery(ADMIN_FUNCTIONS.maskPolicies, t4);
|
|
6026
|
+
let t5;
|
|
6027
|
+
if ($[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6028
|
+
t5 = {};
|
|
6029
|
+
$[5] = t5;
|
|
6030
|
+
} else {
|
|
6031
|
+
t5 = $[5];
|
|
6032
|
+
}
|
|
6033
|
+
const advisoriesQuery = useAdminQuery(ADMIN_FUNCTIONS.getAdvisories, t5);
|
|
6034
|
+
let t6;
|
|
6035
|
+
if ($[6] !== advisoriesQuery.data || $[7] !== masksQuery.data || $[8] !== onProbe || $[9] !== policiesQuery || $[10] !== t) {
|
|
6036
|
+
let policies = null;
|
|
6037
|
+
if (policiesQuery.data !== void 0) {
|
|
6038
|
+
policies = Array.isArray(policiesQuery.data.policies) ? policiesQuery.data.policies : [];
|
|
5718
6039
|
}
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
children: /* @__PURE__ */ jsxDEV(
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
"
|
|
5777
|
-
children:
|
|
5778
|
-
className: "
|
|
5779
|
-
children:
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
children: t("Covered by {procedure}", {
|
|
5785
|
-
procedure: cell.procedure
|
|
5786
|
-
})
|
|
5787
|
-
}, void 0, false), onProbe !== void 0 && /* @__PURE__ */ jsxDEV(Button, {
|
|
5788
|
-
className: "h-auto justify-start p-0 text-[11px]",
|
|
5789
|
-
"data-testid": `pm-probe-${row.table}-${operation_0}`,
|
|
5790
|
-
onClick: () => {
|
|
5791
|
-
onProbe(row.table, operation_0, cell.procedure ?? "");
|
|
5792
|
-
},
|
|
5793
|
-
size: "xs",
|
|
5794
|
-
type: "button",
|
|
5795
|
-
variant: "ghost",
|
|
5796
|
-
children: t("Probe this")
|
|
6040
|
+
const maskColumns = Array.isArray(masksQuery.data?.columns) ? masksQuery.data.columns : [];
|
|
6041
|
+
const advisories = advisoriesQuery.data ?? null;
|
|
6042
|
+
const {
|
|
6043
|
+
error,
|
|
6044
|
+
liveError
|
|
6045
|
+
} = policiesQuery;
|
|
6046
|
+
const rows = policies === null ? [] : buildRows(policies, maskColumns, uncoveredTables(advisories));
|
|
6047
|
+
let t7;
|
|
6048
|
+
if ($[12] !== liveError) {
|
|
6049
|
+
t7 = /* @__PURE__ */ jsxDEV("div", {
|
|
6050
|
+
className: "flex items-center justify-end",
|
|
6051
|
+
children: /* @__PURE__ */ jsxDEV(LiveError, {
|
|
6052
|
+
message: liveError,
|
|
6053
|
+
prefix: "pm"
|
|
6054
|
+
}, void 0, false)
|
|
6055
|
+
}, void 0, false);
|
|
6056
|
+
$[12] = liveError;
|
|
6057
|
+
$[13] = t7;
|
|
6058
|
+
} else {
|
|
6059
|
+
t7 = $[13];
|
|
6060
|
+
}
|
|
6061
|
+
let t8;
|
|
6062
|
+
if ($[14] !== error) {
|
|
6063
|
+
t8 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
6064
|
+
className: "text-sm text-destructive",
|
|
6065
|
+
"data-testid": "pm-error",
|
|
6066
|
+
role: "alert",
|
|
6067
|
+
children: error
|
|
6068
|
+
}, void 0, false);
|
|
6069
|
+
$[14] = error;
|
|
6070
|
+
$[15] = t8;
|
|
6071
|
+
} else {
|
|
6072
|
+
t8 = $[15];
|
|
6073
|
+
}
|
|
6074
|
+
t6 = /* @__PURE__ */ jsxDEV("div", {
|
|
6075
|
+
className: "flex flex-col gap-3",
|
|
6076
|
+
"data-testid": "lunora-permissions-matrix",
|
|
6077
|
+
children: [t7, t8, policies !== null && rows.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
6078
|
+
description: t("Add a `definePolicy` and wire it through `.use(rls(...))` to populate this matrix."),
|
|
6079
|
+
testId: "pm-empty",
|
|
6080
|
+
title: t("No policy")
|
|
6081
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV(Table, {
|
|
6082
|
+
"data-testid": "pm-table",
|
|
6083
|
+
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
6084
|
+
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
6085
|
+
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
6086
|
+
children: t("Table")
|
|
6087
|
+
}, void 0, false), OPERATIONS.map((operation) => /* @__PURE__ */ jsxDEV(TableHead, {
|
|
6088
|
+
children: operationLabel$1(t, operation)
|
|
6089
|
+
}, operation, false)), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
6090
|
+
children: t("Masked columns")
|
|
6091
|
+
}, void 0, false)]
|
|
6092
|
+
}, void 0, true)
|
|
6093
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
6094
|
+
children: rows.map((row) => /* @__PURE__ */ jsxDEV(TableRow, {
|
|
6095
|
+
"data-testid": `pm-row-${row.table}`,
|
|
6096
|
+
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
6097
|
+
className: "font-mono text-xs",
|
|
6098
|
+
children: /* @__PURE__ */ jsxDEV("span", {
|
|
6099
|
+
className: "flex items-center gap-1.5",
|
|
6100
|
+
children: [row.table, row.uncovered && /* @__PURE__ */ jsxDEV(Badge, {
|
|
6101
|
+
"data-testid": `pm-uncovered-${row.table}`,
|
|
6102
|
+
title: t("Uncovered — reachable without a policy"),
|
|
6103
|
+
variant: "destructive",
|
|
6104
|
+
children: t("Uncovered — reachable without a policy")
|
|
5797
6105
|
}, void 0, false)]
|
|
5798
6106
|
}, void 0, true)
|
|
5799
|
-
},
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
6107
|
+
}, void 0, false), OPERATIONS.map((operation_0) => {
|
|
6108
|
+
const cell = row.cells[operation_0];
|
|
6109
|
+
return /* @__PURE__ */ jsxDEV(TableCell, {
|
|
6110
|
+
"data-testid": `pm-cell-${row.table}-${operation_0}`,
|
|
6111
|
+
children: cell.procedure === void 0 ? /* @__PURE__ */ jsxDEV("span", {
|
|
6112
|
+
className: "text-xs text-muted-foreground",
|
|
6113
|
+
children: t("No policy")
|
|
6114
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV("span", {
|
|
6115
|
+
className: "flex flex-col gap-1",
|
|
6116
|
+
children: [/* @__PURE__ */ jsxDEV(Badge, {
|
|
6117
|
+
variant: "secondary",
|
|
6118
|
+
children: t("Covered by {procedure}", {
|
|
6119
|
+
procedure: cell.procedure
|
|
6120
|
+
})
|
|
6121
|
+
}, void 0, false), onProbe !== void 0 && /* @__PURE__ */ jsxDEV(Button, {
|
|
6122
|
+
className: "h-auto justify-start p-0 text-[11px]",
|
|
6123
|
+
"data-testid": `pm-probe-${row.table}-${operation_0}`,
|
|
6124
|
+
onClick: () => {
|
|
6125
|
+
onProbe(row.table, operation_0, cell.procedure ?? "");
|
|
6126
|
+
},
|
|
6127
|
+
size: "xs",
|
|
6128
|
+
type: "button",
|
|
6129
|
+
variant: "ghost",
|
|
6130
|
+
children: t("Probe this")
|
|
6131
|
+
}, void 0, false)]
|
|
6132
|
+
}, void 0, true)
|
|
6133
|
+
}, operation_0, false);
|
|
6134
|
+
}), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
6135
|
+
children: row.maskedColumns.length === 0 ? /* @__PURE__ */ jsxDEV("span", {
|
|
6136
|
+
"aria-hidden": "true",
|
|
6137
|
+
className: "text-muted-foreground",
|
|
6138
|
+
children: "—"
|
|
6139
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV("span", {
|
|
6140
|
+
className: "flex flex-wrap gap-1",
|
|
6141
|
+
children: row.maskedColumns.map(_temp$2)
|
|
6142
|
+
}, void 0, false)
|
|
6143
|
+
}, void 0, false)]
|
|
6144
|
+
}, row.table, true))
|
|
6145
|
+
}, void 0, false)]
|
|
6146
|
+
}, void 0, true)]
|
|
6147
|
+
}, void 0, true);
|
|
6148
|
+
$[6] = advisoriesQuery.data;
|
|
6149
|
+
$[7] = masksQuery.data;
|
|
6150
|
+
$[8] = onProbe;
|
|
6151
|
+
$[9] = policiesQuery;
|
|
6152
|
+
$[10] = t;
|
|
6153
|
+
$[11] = t6;
|
|
6154
|
+
} else {
|
|
6155
|
+
t6 = $[11];
|
|
6156
|
+
}
|
|
6157
|
+
return t6;
|
|
5817
6158
|
};
|
|
6159
|
+
function _temp$2(column) {
|
|
6160
|
+
return /* @__PURE__ */ jsxDEV(Badge, {
|
|
6161
|
+
variant: "outline",
|
|
6162
|
+
children: column
|
|
6163
|
+
}, column, false);
|
|
6164
|
+
}
|
|
5818
6165
|
|
|
5819
6166
|
const RUN_AS = adminRef(ADMIN_FUNCTIONS.runAs);
|
|
5820
6167
|
const useRunAsProbe = () => {
|
|
@@ -6357,14 +6704,150 @@ const PermissionsPanel = ({
|
|
|
6357
6704
|
prefill,
|
|
6358
6705
|
runAsIdentity
|
|
6359
6706
|
}, void 0, false)]
|
|
6360
|
-
}, void 0, true)]
|
|
6361
|
-
}, void 0, true)
|
|
6362
|
-
}, void 0, false), schemaEditable && /* @__PURE__ */ jsxDEV("section", {
|
|
6363
|
-
className: "flex flex-col gap-2",
|
|
6364
|
-
children: /* @__PURE__ */ jsxDEV(PolicyScaffolder, {}, void 0, false)
|
|
6365
|
-
}, void 0, false)]
|
|
6366
|
-
}, void 0, true);
|
|
6707
|
+
}, void 0, true)]
|
|
6708
|
+
}, void 0, true)
|
|
6709
|
+
}, void 0, false), schemaEditable && /* @__PURE__ */ jsxDEV("section", {
|
|
6710
|
+
className: "flex flex-col gap-2",
|
|
6711
|
+
children: /* @__PURE__ */ jsxDEV(PolicyScaffolder, {}, void 0, false)
|
|
6712
|
+
}, void 0, false)]
|
|
6713
|
+
}, void 0, true);
|
|
6714
|
+
};
|
|
6715
|
+
|
|
6716
|
+
const QueuesPanel = () => {
|
|
6717
|
+
const $ = c(17);
|
|
6718
|
+
const t = useT();
|
|
6719
|
+
let t0;
|
|
6720
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6721
|
+
t0 = {};
|
|
6722
|
+
$[0] = t0;
|
|
6723
|
+
} else {
|
|
6724
|
+
t0 = $[0];
|
|
6725
|
+
}
|
|
6726
|
+
const {
|
|
6727
|
+
data,
|
|
6728
|
+
error
|
|
6729
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.listQueues, t0);
|
|
6730
|
+
const loaded = data !== void 0;
|
|
6731
|
+
let t1;
|
|
6732
|
+
if ($[1] !== data) {
|
|
6733
|
+
t1 = Array.isArray(data?.queues) ? [...data.queues].toSorted(_temp$1) : [];
|
|
6734
|
+
$[1] = data;
|
|
6735
|
+
$[2] = t1;
|
|
6736
|
+
} else {
|
|
6737
|
+
t1 = $[2];
|
|
6738
|
+
}
|
|
6739
|
+
const queues = t1;
|
|
6740
|
+
let t2;
|
|
6741
|
+
if ($[3] !== error) {
|
|
6742
|
+
t2 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
6743
|
+
className: "text-sm text-destructive",
|
|
6744
|
+
"data-testid": "queues-error",
|
|
6745
|
+
role: "alert",
|
|
6746
|
+
children: error
|
|
6747
|
+
}, void 0, false);
|
|
6748
|
+
$[3] = error;
|
|
6749
|
+
$[4] = t2;
|
|
6750
|
+
} else {
|
|
6751
|
+
t2 = $[4];
|
|
6752
|
+
}
|
|
6753
|
+
let t3;
|
|
6754
|
+
if ($[5] !== t) {
|
|
6755
|
+
t3 = t("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker.");
|
|
6756
|
+
$[5] = t;
|
|
6757
|
+
$[6] = t3;
|
|
6758
|
+
} else {
|
|
6759
|
+
t3 = $[6];
|
|
6760
|
+
}
|
|
6761
|
+
let t4;
|
|
6762
|
+
if ($[7] !== t3) {
|
|
6763
|
+
t4 = /* @__PURE__ */ jsxDEV("p", {
|
|
6764
|
+
className: "text-sm text-muted-foreground",
|
|
6765
|
+
children: t3
|
|
6766
|
+
}, void 0, false);
|
|
6767
|
+
$[7] = t3;
|
|
6768
|
+
$[8] = t4;
|
|
6769
|
+
} else {
|
|
6770
|
+
t4 = $[8];
|
|
6771
|
+
}
|
|
6772
|
+
let t5;
|
|
6773
|
+
if ($[9] !== loaded || $[10] !== queues || $[11] !== t) {
|
|
6774
|
+
t5 = loaded && queues.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
6775
|
+
description: t("No defineQueue is declared in lunora/queues.ts in this deployment. Add one to offload async work to a Cloudflare Queue."),
|
|
6776
|
+
testId: "queues-empty",
|
|
6777
|
+
title: t("No queues defined")
|
|
6778
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV(Card, {
|
|
6779
|
+
className: "overflow-hidden py-0",
|
|
6780
|
+
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
6781
|
+
className: "px-0",
|
|
6782
|
+
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
6783
|
+
"data-testid": "queues-table",
|
|
6784
|
+
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
6785
|
+
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
6786
|
+
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
6787
|
+
children: t("Export")
|
|
6788
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
6789
|
+
children: t("Queue")
|
|
6790
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
6791
|
+
children: t("Mode")
|
|
6792
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
6793
|
+
children: t("Binding")
|
|
6794
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
6795
|
+
children: t("Dead-letter")
|
|
6796
|
+
}, void 0, false)]
|
|
6797
|
+
}, void 0, true)
|
|
6798
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
6799
|
+
children: queues.map(_temp2$1)
|
|
6800
|
+
}, void 0, false)]
|
|
6801
|
+
}, void 0, true)
|
|
6802
|
+
}, void 0, false)
|
|
6803
|
+
}, void 0, false);
|
|
6804
|
+
$[9] = loaded;
|
|
6805
|
+
$[10] = queues;
|
|
6806
|
+
$[11] = t;
|
|
6807
|
+
$[12] = t5;
|
|
6808
|
+
} else {
|
|
6809
|
+
t5 = $[12];
|
|
6810
|
+
}
|
|
6811
|
+
let t6;
|
|
6812
|
+
if ($[13] !== t2 || $[14] !== t4 || $[15] !== t5) {
|
|
6813
|
+
t6 = /* @__PURE__ */ jsxDEV("div", {
|
|
6814
|
+
className: "flex flex-col gap-6",
|
|
6815
|
+
"data-testid": "lunora-queues-panel",
|
|
6816
|
+
children: [t2, t4, t5]
|
|
6817
|
+
}, void 0, true);
|
|
6818
|
+
$[13] = t2;
|
|
6819
|
+
$[14] = t4;
|
|
6820
|
+
$[15] = t5;
|
|
6821
|
+
$[16] = t6;
|
|
6822
|
+
} else {
|
|
6823
|
+
t6 = $[16];
|
|
6824
|
+
}
|
|
6825
|
+
return t6;
|
|
6367
6826
|
};
|
|
6827
|
+
function _temp$1(a, b) {
|
|
6828
|
+
return a.exportName.localeCompare(b.exportName);
|
|
6829
|
+
}
|
|
6830
|
+
function _temp2$1(queue) {
|
|
6831
|
+
return /* @__PURE__ */ jsxDEV(TableRow, {
|
|
6832
|
+
"data-testid": `queues-row-${queue.exportName}`,
|
|
6833
|
+
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
6834
|
+
className: "font-mono text-xs",
|
|
6835
|
+
children: queue.exportName
|
|
6836
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
6837
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
6838
|
+
children: queue.name
|
|
6839
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
6840
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
6841
|
+
children: queue.mode
|
|
6842
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
6843
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
6844
|
+
children: queue.binding
|
|
6845
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
6846
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
6847
|
+
children: queue.deadLetterQueue ?? "—"
|
|
6848
|
+
}, void 0, false)]
|
|
6849
|
+
}, queue.exportName, true);
|
|
6850
|
+
}
|
|
6368
6851
|
|
|
6369
6852
|
const RUN_SQL = adminRef(ADMIN_FUNCTIONS.runSql);
|
|
6370
6853
|
const useRunSql = (sql, shardKey) => {
|
|
@@ -7132,7 +7615,6 @@ const DashboardsPanel = (t0) => {
|
|
|
7132
7615
|
return t12;
|
|
7133
7616
|
};
|
|
7134
7617
|
|
|
7135
|
-
const STORAGE_RULES = adminRef(ADMIN_FUNCTIONS.storageRules);
|
|
7136
7618
|
const operationLabel = (t, operation) => ({
|
|
7137
7619
|
delete: t("Delete"),
|
|
7138
7620
|
list: t("List"),
|
|
@@ -7147,86 +7629,117 @@ const OPERATION_ORDER = {
|
|
|
7147
7629
|
};
|
|
7148
7630
|
const sortRules = (rules) => [...rules].toSorted((a, b) => a.bucket.localeCompare(b.bucket) || OPERATION_ORDER[a.on] - OPERATION_ORDER[b.on] || (a.prefix ?? "").localeCompare(b.prefix ?? ""));
|
|
7149
7631
|
const StorageRulesPanel = () => {
|
|
7150
|
-
const
|
|
7632
|
+
const $ = c(12);
|
|
7151
7633
|
const t = useT();
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7634
|
+
let t0;
|
|
7635
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
7636
|
+
t0 = {};
|
|
7637
|
+
$[0] = t0;
|
|
7638
|
+
} else {
|
|
7639
|
+
t0 = $[0];
|
|
7640
|
+
}
|
|
7641
|
+
const {
|
|
7642
|
+
data,
|
|
7643
|
+
error
|
|
7644
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.storageRules, t0);
|
|
7645
|
+
const loaded = data !== void 0;
|
|
7646
|
+
let t1;
|
|
7647
|
+
if ($[1] !== data || $[2] !== error || $[3] !== loaded || $[4] !== t) {
|
|
7648
|
+
const rules = sortRules(Array.isArray(data?.rules) ? data.rules : []);
|
|
7649
|
+
let t2;
|
|
7650
|
+
if ($[6] !== error) {
|
|
7651
|
+
t2 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
7652
|
+
className: "text-sm text-destructive",
|
|
7653
|
+
"data-testid": "storage-rules-error",
|
|
7654
|
+
role: "alert",
|
|
7655
|
+
children: error
|
|
7656
|
+
}, void 0, false);
|
|
7657
|
+
$[6] = error;
|
|
7658
|
+
$[7] = t2;
|
|
7659
|
+
} else {
|
|
7660
|
+
t2 = $[7];
|
|
7163
7661
|
}
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
}
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
children: /* @__PURE__ */ jsxDEV(
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7662
|
+
let t3;
|
|
7663
|
+
if ($[8] !== t) {
|
|
7664
|
+
t3 = t("Storage rules are declared in code with defineStorageRule and gate ctx.storage access per bucket. This view is read-only.");
|
|
7665
|
+
$[8] = t;
|
|
7666
|
+
$[9] = t3;
|
|
7667
|
+
} else {
|
|
7668
|
+
t3 = $[9];
|
|
7669
|
+
}
|
|
7670
|
+
let t4;
|
|
7671
|
+
if ($[10] !== t3) {
|
|
7672
|
+
t4 = /* @__PURE__ */ jsxDEV("p", {
|
|
7673
|
+
className: "text-sm text-muted-foreground",
|
|
7674
|
+
"data-testid": "storage-rules-note",
|
|
7675
|
+
children: t3
|
|
7676
|
+
}, void 0, false);
|
|
7677
|
+
$[10] = t3;
|
|
7678
|
+
$[11] = t4;
|
|
7679
|
+
} else {
|
|
7680
|
+
t4 = $[11];
|
|
7681
|
+
}
|
|
7682
|
+
t1 = /* @__PURE__ */ jsxDEV("div", {
|
|
7683
|
+
className: "flex flex-col gap-4",
|
|
7684
|
+
"data-testid": "lunora-storage-rules-panel",
|
|
7685
|
+
children: [t2, t4, loaded && rules.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
7686
|
+
description: t("No defineStorageRule is wired through .use(storageRules(...)) in this deployment. Add one to gate object access by key prefix."),
|
|
7687
|
+
testId: "storage-rules-empty",
|
|
7688
|
+
title: t("No storage rules defined")
|
|
7689
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV(Card, {
|
|
7690
|
+
className: "overflow-hidden py-0",
|
|
7691
|
+
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
7692
|
+
className: "px-0",
|
|
7693
|
+
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
7694
|
+
"data-testid": "storage-rules-table",
|
|
7695
|
+
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
7696
|
+
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
7697
|
+
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
7698
|
+
children: t("Bucket")
|
|
7699
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
7700
|
+
children: t("Operation")
|
|
7701
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
7702
|
+
children: t("Key prefix")
|
|
7703
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
7704
|
+
children: t("Guarded by")
|
|
7705
|
+
}, void 0, false)]
|
|
7706
|
+
}, void 0, true)
|
|
7707
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
7708
|
+
children: rules.map((rule) => /* @__PURE__ */ jsxDEV(TableRow, {
|
|
7709
|
+
"data-testid": `storage-rule-${rule.bucket}-${rule.on}-${rule.prefix ?? ""}`,
|
|
7710
|
+
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
7711
|
+
className: "font-mono text-xs",
|
|
7712
|
+
children: rule.bucket
|
|
7713
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
7714
|
+
children: /* @__PURE__ */ jsxDEV(Badge, {
|
|
7715
|
+
variant: "secondary",
|
|
7716
|
+
children: operationLabel(t, rule.on)
|
|
7717
|
+
}, void 0, false)
|
|
7718
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
7719
|
+
className: "font-mono text-xs",
|
|
7720
|
+
children: rule.prefix ?? /* @__PURE__ */ jsxDEV("span", {
|
|
7721
|
+
className: "text-muted-foreground",
|
|
7722
|
+
children: t("(whole bucket)")
|
|
7723
|
+
}, void 0, false)
|
|
7724
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
7725
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
7726
|
+
children: rule.procedure
|
|
7727
|
+
}, void 0, false)]
|
|
7728
|
+
}, `${rule.bucket}:${rule.on}:${rule.prefix ?? ""}:${rule.procedure}`, true))
|
|
7729
|
+
}, void 0, false)]
|
|
7730
|
+
}, void 0, true)
|
|
7731
|
+
}, void 0, false)
|
|
7732
|
+
}, void 0, false)]
|
|
7733
|
+
}, void 0, true);
|
|
7734
|
+
$[1] = data;
|
|
7735
|
+
$[2] = error;
|
|
7736
|
+
$[3] = loaded;
|
|
7737
|
+
$[4] = t;
|
|
7738
|
+
$[5] = t1;
|
|
7739
|
+
} else {
|
|
7740
|
+
t1 = $[5];
|
|
7741
|
+
}
|
|
7742
|
+
return t1;
|
|
7230
7743
|
};
|
|
7231
7744
|
|
|
7232
7745
|
const DEFAULT_TOP_K = 10;
|
|
@@ -7527,10 +8040,6 @@ const WorkflowInstanceHistory = ({
|
|
|
7527
8040
|
const [error, setError] = useState(null);
|
|
7528
8041
|
const [notConfigured, setNotConfigured] = useState(false);
|
|
7529
8042
|
const [busyId, setBusyId] = useState(null);
|
|
7530
|
-
const listImpl = loadInstances ?? (async (arguments_) => {
|
|
7531
|
-
const page = await client.listWorkflowInstances(arguments_);
|
|
7532
|
-
return page.instances;
|
|
7533
|
-
});
|
|
7534
8043
|
const detailImpl = loadDetail ?? ((arguments_) => client.getWorkflowInstance(arguments_));
|
|
7535
8044
|
const clientOwned = loadInstances === void 0;
|
|
7536
8045
|
const clientAction = clientOwned ? (arguments_) => client.setWorkflowInstanceStatus(arguments_) : void 0;
|
|
@@ -7538,10 +8047,24 @@ const WorkflowInstanceHistory = ({
|
|
|
7538
8047
|
const load = async () => {
|
|
7539
8048
|
setError(null);
|
|
7540
8049
|
setNotConfigured(false);
|
|
8050
|
+
const status = statusFilter === "" ? void 0 : statusFilter;
|
|
7541
8051
|
try {
|
|
7542
|
-
|
|
8052
|
+
if (loadInstances === void 0) {
|
|
8053
|
+
const page = await client.listWorkflowInstances({
|
|
8054
|
+
name: workflowName,
|
|
8055
|
+
status
|
|
8056
|
+
});
|
|
8057
|
+
if (page.configured === false) {
|
|
8058
|
+
setInstances(null);
|
|
8059
|
+
setNotConfigured(true);
|
|
8060
|
+
return;
|
|
8061
|
+
}
|
|
8062
|
+
setInstances(page.instances);
|
|
8063
|
+
return;
|
|
8064
|
+
}
|
|
8065
|
+
setInstances(await loadInstances({
|
|
7543
8066
|
name: workflowName,
|
|
7544
|
-
status
|
|
8067
|
+
status
|
|
7545
8068
|
}));
|
|
7546
8069
|
} catch (error_) {
|
|
7547
8070
|
setInstances(null);
|
|
@@ -7754,7 +8277,6 @@ const WorkflowInstanceHistory = ({
|
|
|
7754
8277
|
}, void 0, true);
|
|
7755
8278
|
};
|
|
7756
8279
|
|
|
7757
|
-
const LIST_WORKFLOWS = adminRef(ADMIN_FUNCTIONS.listWorkflows);
|
|
7758
8280
|
const CREATE_WORKFLOW_INSTANCE = adminRef(ADMIN_FUNCTIONS.createWorkflowInstance);
|
|
7759
8281
|
const GET_WORKFLOW_INSTANCE_STATUS = adminRef(ADMIN_FUNCTIONS.getWorkflowInstanceStatus);
|
|
7760
8282
|
const formatPayload = (instance) => {
|
|
@@ -7773,8 +8295,10 @@ const formatPayload = (instance) => {
|
|
|
7773
8295
|
const WorkflowsPanel = () => {
|
|
7774
8296
|
const client = useLunora();
|
|
7775
8297
|
const t = useT();
|
|
7776
|
-
const
|
|
7777
|
-
|
|
8298
|
+
const {
|
|
8299
|
+
data,
|
|
8300
|
+
error
|
|
8301
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.listWorkflows, {});
|
|
7778
8302
|
const [selectedExport, setSelectedExport] = useState("");
|
|
7779
8303
|
const [instanceIdInput, setInstanceIdInput] = useState("");
|
|
7780
8304
|
const [paramsText, setParamsText] = useState("");
|
|
@@ -7782,21 +8306,8 @@ const WorkflowsPanel = () => {
|
|
|
7782
8306
|
const [startError, setStartError] = useState(null);
|
|
7783
8307
|
const [instances, setInstances] = useState([]);
|
|
7784
8308
|
const [refreshingId, setRefreshingId] = useState(null);
|
|
7785
|
-
const
|
|
7786
|
-
|
|
7787
|
-
const result = await client.query(LIST_WORKFLOWS, {}, callOptions(""));
|
|
7788
|
-
setData({
|
|
7789
|
-
workflows: Array.isArray(result.workflows) ? result.workflows : []
|
|
7790
|
-
});
|
|
7791
|
-
setError(null);
|
|
7792
|
-
} catch (error_) {
|
|
7793
|
-
setError(errorMessage(error_));
|
|
7794
|
-
}
|
|
7795
|
-
}, [client]);
|
|
7796
|
-
useEffect(() => {
|
|
7797
|
-
fireAndForget(refresh());
|
|
7798
|
-
}, [refresh]);
|
|
7799
|
-
const workflows = useMemo(() => data === null ? [] : [...data.workflows].toSorted((a, b) => a.exportName.localeCompare(b.exportName)), [data]);
|
|
8309
|
+
const loaded = data !== void 0;
|
|
8310
|
+
const workflows = useMemo(() => Array.isArray(data?.workflows) ? [...data.workflows].toSorted((a, b) => a.exportName.localeCompare(b.exportName)) : [], [data]);
|
|
7800
8311
|
const selectedExportName = useMemo(() => {
|
|
7801
8312
|
if (workflows.some((workflow) => workflow.exportName === selectedExport)) {
|
|
7802
8313
|
return selectedExport;
|
|
@@ -7829,19 +8340,19 @@ const WorkflowsPanel = () => {
|
|
|
7829
8340
|
setStartError(null);
|
|
7830
8341
|
try {
|
|
7831
8342
|
const id = instanceIdInput.trim();
|
|
7832
|
-
const
|
|
8343
|
+
const result = await client.query(CREATE_WORKFLOW_INSTANCE, {
|
|
7833
8344
|
exportName,
|
|
7834
8345
|
id: id === "" ? void 0 : id,
|
|
7835
8346
|
params: parameters
|
|
7836
8347
|
}, callOptions(""));
|
|
7837
8348
|
upsertInstance({
|
|
7838
8349
|
exportName,
|
|
7839
|
-
id:
|
|
7840
|
-
status:
|
|
8350
|
+
id: result.id,
|
|
8351
|
+
status: result.status
|
|
7841
8352
|
});
|
|
7842
8353
|
setInstanceIdInput("");
|
|
7843
|
-
} catch (
|
|
7844
|
-
setStartError(errorMessage(
|
|
8354
|
+
} catch (error_) {
|
|
8355
|
+
setStartError(errorMessage(error_));
|
|
7845
8356
|
} finally {
|
|
7846
8357
|
setStarting(false);
|
|
7847
8358
|
}
|
|
@@ -7852,19 +8363,19 @@ const WorkflowsPanel = () => {
|
|
|
7852
8363
|
const refreshInstance = async (exportName_0, id_0) => {
|
|
7853
8364
|
setRefreshingId(id_0);
|
|
7854
8365
|
try {
|
|
7855
|
-
const
|
|
8366
|
+
const result_0 = await client.query(GET_WORKFLOW_INSTANCE_STATUS, {
|
|
7856
8367
|
exportName: exportName_0,
|
|
7857
8368
|
id: id_0
|
|
7858
8369
|
}, callOptions(""));
|
|
7859
8370
|
upsertInstance({
|
|
7860
|
-
error:
|
|
8371
|
+
error: result_0.error,
|
|
7861
8372
|
exportName: exportName_0,
|
|
7862
|
-
id:
|
|
7863
|
-
output:
|
|
7864
|
-
status:
|
|
8373
|
+
id: result_0.id,
|
|
8374
|
+
output: result_0.output,
|
|
8375
|
+
status: result_0.status
|
|
7865
8376
|
});
|
|
7866
|
-
} catch (
|
|
7867
|
-
setStartError(errorMessage(
|
|
8377
|
+
} catch (error__0) {
|
|
8378
|
+
setStartError(errorMessage(error__0));
|
|
7868
8379
|
} finally {
|
|
7869
8380
|
setRefreshingId(null);
|
|
7870
8381
|
}
|
|
@@ -7898,7 +8409,7 @@ const WorkflowsPanel = () => {
|
|
|
7898
8409
|
}, void 0, false), /* @__PURE__ */ jsxDEV("p", {
|
|
7899
8410
|
className: "text-sm text-muted-foreground",
|
|
7900
8411
|
children: t("Workflows are declared in code with defineWorkflow and run as durable Cloudflare Workflows. Start an instance and observe its status below.")
|
|
7901
|
-
}, void 0, false),
|
|
8412
|
+
}, void 0, false), loaded && workflows.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
7902
8413
|
description: t("No defineWorkflow is declared in lunora/workflows.ts in this deployment. Add one to run a durable, multi-step workflow."),
|
|
7903
8414
|
testId: "workflows-empty",
|
|
7904
8415
|
title: t("No workflows defined")
|
|
@@ -8050,6 +8561,7 @@ const STUDIO_FEATURES = adminRef(ADMIN_FUNCTIONS.studioFeatures);
|
|
|
8050
8561
|
const DEFAULT_STUDIO_FEATURES = {
|
|
8051
8562
|
mail: true,
|
|
8052
8563
|
payments: true,
|
|
8564
|
+
queues: true,
|
|
8053
8565
|
scheduler: true,
|
|
8054
8566
|
storage: true,
|
|
8055
8567
|
vectors: true,
|
|
@@ -8064,6 +8576,7 @@ const coerceFeatures = (raw) => {
|
|
|
8064
8576
|
return {
|
|
8065
8577
|
mail: flag("mail"),
|
|
8066
8578
|
payments: flag("payments"),
|
|
8579
|
+
queues: flag("queues"),
|
|
8067
8580
|
scheduler: flag("scheduler"),
|
|
8068
8581
|
storage: flag("storage"),
|
|
8069
8582
|
vectors: flag("vectors"),
|
|
@@ -8165,6 +8678,9 @@ const TAB_ICONS = {
|
|
|
8165
8678
|
pitr: /* @__PURE__ */ jsxDEV("path", {
|
|
8166
8679
|
d: "M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"
|
|
8167
8680
|
}, void 0, false),
|
|
8681
|
+
queues: /* @__PURE__ */ jsxDEV("path", {
|
|
8682
|
+
d: "M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"
|
|
8683
|
+
}, void 0, false),
|
|
8168
8684
|
realtime: /* @__PURE__ */ jsxDEV("path", {
|
|
8169
8685
|
d: "M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"
|
|
8170
8686
|
}, void 0, false),
|
|
@@ -8207,7 +8723,7 @@ const NAV_GROUPS = [{
|
|
|
8207
8723
|
tabs: ["data", "sql", "schema", "migrations", "vectors", "pitr", "export"]
|
|
8208
8724
|
}, {
|
|
8209
8725
|
key: "functions",
|
|
8210
|
-
tabs: ["functions", "api", "workflows"]
|
|
8726
|
+
tabs: ["functions", "api", "workflows", "queues"]
|
|
8211
8727
|
}, {
|
|
8212
8728
|
key: "auth",
|
|
8213
8729
|
tabs: ["users", "organizations", "authSessions", "authConfig"]
|
|
@@ -8231,6 +8747,7 @@ const TAB_FEATURE = {
|
|
|
8231
8747
|
files: "storage",
|
|
8232
8748
|
mail: "mail",
|
|
8233
8749
|
payments: "payments",
|
|
8750
|
+
queues: "queues",
|
|
8234
8751
|
schedule: "scheduler",
|
|
8235
8752
|
storageRules: "storage",
|
|
8236
8753
|
vectors: "vectors",
|
|
@@ -8266,7 +8783,7 @@ const TabIcon = (t0) => {
|
|
|
8266
8783
|
}
|
|
8267
8784
|
return t2;
|
|
8268
8785
|
};
|
|
8269
|
-
const TABS = ["home", "data", "sql", "functions", "api", "workflows", "schema", "migrations", "vectors", "export", "pitr", "users", "organizations", "authSessions", "authConfig", "files", "storageRules", "dashboards", "metrics", "analytics", "health", "security", "rls", "permissions", "insights", "logs", "realtime", "mail", "payments", "audit", "schedule", "drains", "settings"];
|
|
8786
|
+
const TABS = ["home", "data", "sql", "functions", "api", "workflows", "queues", "schema", "migrations", "vectors", "export", "pitr", "users", "organizations", "authSessions", "authConfig", "files", "storageRules", "dashboards", "metrics", "analytics", "health", "security", "rls", "permissions", "insights", "logs", "realtime", "mail", "payments", "audit", "schedule", "drains", "settings"];
|
|
8270
8787
|
const FULL_HEIGHT_TABS = /* @__PURE__ */ new Set(["api", "data", "sql"]);
|
|
8271
8788
|
const tabFromPathname = (pathname) => {
|
|
8272
8789
|
const slug = pathname.split("/").findLast(Boolean) ?? "";
|
|
@@ -8873,7 +9390,7 @@ const StudioSidebar = (t0) => {
|
|
|
8873
9390
|
return t9;
|
|
8874
9391
|
};
|
|
8875
9392
|
const StudioLayout = () => {
|
|
8876
|
-
const $ = c(
|
|
9393
|
+
const $ = c(270);
|
|
8877
9394
|
const t = useT();
|
|
8878
9395
|
const navigate = useNavigate();
|
|
8879
9396
|
let t0;
|
|
@@ -9112,7 +9629,7 @@ const StudioLayout = () => {
|
|
|
9112
9629
|
}
|
|
9113
9630
|
let t27;
|
|
9114
9631
|
if ($[55] !== t) {
|
|
9115
|
-
t27 = t("
|
|
9632
|
+
t27 = t("Queues");
|
|
9116
9633
|
$[55] = t;
|
|
9117
9634
|
$[56] = t27;
|
|
9118
9635
|
} else {
|
|
@@ -9120,7 +9637,7 @@ const StudioLayout = () => {
|
|
|
9120
9637
|
}
|
|
9121
9638
|
let t28;
|
|
9122
9639
|
if ($[57] !== t) {
|
|
9123
|
-
t28 = t("
|
|
9640
|
+
t28 = t("Realtime");
|
|
9124
9641
|
$[57] = t;
|
|
9125
9642
|
$[58] = t28;
|
|
9126
9643
|
} else {
|
|
@@ -9128,7 +9645,7 @@ const StudioLayout = () => {
|
|
|
9128
9645
|
}
|
|
9129
9646
|
let t29;
|
|
9130
9647
|
if ($[59] !== t) {
|
|
9131
|
-
t29 = t("
|
|
9648
|
+
t29 = t("RLS Policies");
|
|
9132
9649
|
$[59] = t;
|
|
9133
9650
|
$[60] = t29;
|
|
9134
9651
|
} else {
|
|
@@ -9136,7 +9653,7 @@ const StudioLayout = () => {
|
|
|
9136
9653
|
}
|
|
9137
9654
|
let t30;
|
|
9138
9655
|
if ($[61] !== t) {
|
|
9139
|
-
t30 = t("
|
|
9656
|
+
t30 = t("Scheduled");
|
|
9140
9657
|
$[61] = t;
|
|
9141
9658
|
$[62] = t30;
|
|
9142
9659
|
} else {
|
|
@@ -9144,7 +9661,7 @@ const StudioLayout = () => {
|
|
|
9144
9661
|
}
|
|
9145
9662
|
let t31;
|
|
9146
9663
|
if ($[63] !== t) {
|
|
9147
|
-
t31 = t("
|
|
9664
|
+
t31 = t("Schema");
|
|
9148
9665
|
$[63] = t;
|
|
9149
9666
|
$[64] = t31;
|
|
9150
9667
|
} else {
|
|
@@ -9152,7 +9669,7 @@ const StudioLayout = () => {
|
|
|
9152
9669
|
}
|
|
9153
9670
|
let t32;
|
|
9154
9671
|
if ($[65] !== t) {
|
|
9155
|
-
t32 = t("
|
|
9672
|
+
t32 = t("Security");
|
|
9156
9673
|
$[65] = t;
|
|
9157
9674
|
$[66] = t32;
|
|
9158
9675
|
} else {
|
|
@@ -9160,7 +9677,7 @@ const StudioLayout = () => {
|
|
|
9160
9677
|
}
|
|
9161
9678
|
let t33;
|
|
9162
9679
|
if ($[67] !== t) {
|
|
9163
|
-
t33 = t("
|
|
9680
|
+
t33 = t("Settings");
|
|
9164
9681
|
$[67] = t;
|
|
9165
9682
|
$[68] = t33;
|
|
9166
9683
|
} else {
|
|
@@ -9168,7 +9685,7 @@ const StudioLayout = () => {
|
|
|
9168
9685
|
}
|
|
9169
9686
|
let t34;
|
|
9170
9687
|
if ($[69] !== t) {
|
|
9171
|
-
t34 = t("
|
|
9688
|
+
t34 = t("SQL editor");
|
|
9172
9689
|
$[69] = t;
|
|
9173
9690
|
$[70] = t34;
|
|
9174
9691
|
} else {
|
|
@@ -9176,7 +9693,7 @@ const StudioLayout = () => {
|
|
|
9176
9693
|
}
|
|
9177
9694
|
let t35;
|
|
9178
9695
|
if ($[71] !== t) {
|
|
9179
|
-
t35 = t("
|
|
9696
|
+
t35 = t("Access Rules");
|
|
9180
9697
|
$[71] = t;
|
|
9181
9698
|
$[72] = t35;
|
|
9182
9699
|
} else {
|
|
@@ -9184,7 +9701,7 @@ const StudioLayout = () => {
|
|
|
9184
9701
|
}
|
|
9185
9702
|
let t36;
|
|
9186
9703
|
if ($[73] !== t) {
|
|
9187
|
-
t36 = t("
|
|
9704
|
+
t36 = t("Users");
|
|
9188
9705
|
$[73] = t;
|
|
9189
9706
|
$[74] = t36;
|
|
9190
9707
|
} else {
|
|
@@ -9192,15 +9709,23 @@ const StudioLayout = () => {
|
|
|
9192
9709
|
}
|
|
9193
9710
|
let t37;
|
|
9194
9711
|
if ($[75] !== t) {
|
|
9195
|
-
t37 = t("
|
|
9712
|
+
t37 = t("Vectors");
|
|
9196
9713
|
$[75] = t;
|
|
9197
9714
|
$[76] = t37;
|
|
9198
9715
|
} else {
|
|
9199
9716
|
t37 = $[76];
|
|
9200
9717
|
}
|
|
9201
9718
|
let t38;
|
|
9202
|
-
if ($[77] !==
|
|
9203
|
-
t38 =
|
|
9719
|
+
if ($[77] !== t) {
|
|
9720
|
+
t38 = t("Workflows");
|
|
9721
|
+
$[77] = t;
|
|
9722
|
+
$[78] = t38;
|
|
9723
|
+
} else {
|
|
9724
|
+
t38 = $[78];
|
|
9725
|
+
}
|
|
9726
|
+
let t39;
|
|
9727
|
+
if ($[79] !== t10 || $[80] !== t11 || $[81] !== t12 || $[82] !== t13 || $[83] !== t14 || $[84] !== t15 || $[85] !== t16 || $[86] !== t17 || $[87] !== t18 || $[88] !== t19 || $[89] !== t20 || $[90] !== t21 || $[91] !== t22 || $[92] !== t23 || $[93] !== t24 || $[94] !== t25 || $[95] !== t26 || $[96] !== t27 || $[97] !== t28 || $[98] !== t29 || $[99] !== t30 || $[100] !== t31 || $[101] !== t32 || $[102] !== t33 || $[103] !== t34 || $[104] !== t35 || $[105] !== t36 || $[106] !== t37 || $[107] !== t38 || $[108] !== t5 || $[109] !== t6 || $[110] !== t7 || $[111] !== t8 || $[112] !== t9) {
|
|
9728
|
+
t39 = {
|
|
9204
9729
|
analytics: t5,
|
|
9205
9730
|
api: t6,
|
|
9206
9731
|
audit: t7,
|
|
@@ -9223,56 +9748,58 @@ const StudioLayout = () => {
|
|
|
9223
9748
|
mail: t24,
|
|
9224
9749
|
payments: t25,
|
|
9225
9750
|
permissions: t26,
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9751
|
+
queues: t27,
|
|
9752
|
+
realtime: t28,
|
|
9753
|
+
rls: t29,
|
|
9754
|
+
schedule: t30,
|
|
9755
|
+
schema: t31,
|
|
9756
|
+
security: t32,
|
|
9757
|
+
settings: t33,
|
|
9758
|
+
sql: t34,
|
|
9759
|
+
storageRules: t35,
|
|
9760
|
+
users: t36,
|
|
9761
|
+
vectors: t37,
|
|
9762
|
+
workflows: t38
|
|
9237
9763
|
};
|
|
9238
|
-
$[
|
|
9239
|
-
$[
|
|
9240
|
-
$[
|
|
9241
|
-
$[
|
|
9242
|
-
$[
|
|
9243
|
-
$[
|
|
9244
|
-
$[
|
|
9245
|
-
$[
|
|
9246
|
-
$[
|
|
9247
|
-
$[
|
|
9248
|
-
$[
|
|
9249
|
-
$[
|
|
9250
|
-
$[
|
|
9251
|
-
$[
|
|
9252
|
-
$[
|
|
9253
|
-
$[
|
|
9254
|
-
$[
|
|
9255
|
-
$[
|
|
9256
|
-
$[
|
|
9257
|
-
$[
|
|
9258
|
-
$[
|
|
9259
|
-
$[
|
|
9260
|
-
$[
|
|
9261
|
-
$[
|
|
9262
|
-
$[
|
|
9263
|
-
$[
|
|
9264
|
-
$[
|
|
9265
|
-
$[
|
|
9266
|
-
$[
|
|
9267
|
-
$[
|
|
9268
|
-
$[
|
|
9269
|
-
$[
|
|
9270
|
-
$[
|
|
9271
|
-
$[
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9764
|
+
$[79] = t10;
|
|
9765
|
+
$[80] = t11;
|
|
9766
|
+
$[81] = t12;
|
|
9767
|
+
$[82] = t13;
|
|
9768
|
+
$[83] = t14;
|
|
9769
|
+
$[84] = t15;
|
|
9770
|
+
$[85] = t16;
|
|
9771
|
+
$[86] = t17;
|
|
9772
|
+
$[87] = t18;
|
|
9773
|
+
$[88] = t19;
|
|
9774
|
+
$[89] = t20;
|
|
9775
|
+
$[90] = t21;
|
|
9776
|
+
$[91] = t22;
|
|
9777
|
+
$[92] = t23;
|
|
9778
|
+
$[93] = t24;
|
|
9779
|
+
$[94] = t25;
|
|
9780
|
+
$[95] = t26;
|
|
9781
|
+
$[96] = t27;
|
|
9782
|
+
$[97] = t28;
|
|
9783
|
+
$[98] = t29;
|
|
9784
|
+
$[99] = t30;
|
|
9785
|
+
$[100] = t31;
|
|
9786
|
+
$[101] = t32;
|
|
9787
|
+
$[102] = t33;
|
|
9788
|
+
$[103] = t34;
|
|
9789
|
+
$[104] = t35;
|
|
9790
|
+
$[105] = t36;
|
|
9791
|
+
$[106] = t37;
|
|
9792
|
+
$[107] = t38;
|
|
9793
|
+
$[108] = t5;
|
|
9794
|
+
$[109] = t6;
|
|
9795
|
+
$[110] = t7;
|
|
9796
|
+
$[111] = t8;
|
|
9797
|
+
$[112] = t9;
|
|
9798
|
+
$[113] = t39;
|
|
9799
|
+
} else {
|
|
9800
|
+
t39 = $[113];
|
|
9801
|
+
}
|
|
9802
|
+
const tabLabel = t39;
|
|
9276
9803
|
const groupLabel = {
|
|
9277
9804
|
advisors: t("Advisors"),
|
|
9278
9805
|
auth: t("Auth"),
|
|
@@ -9284,376 +9811,386 @@ const StudioLayout = () => {
|
|
|
9284
9811
|
settings: t("Settings"),
|
|
9285
9812
|
storage: t("Storage")
|
|
9286
9813
|
};
|
|
9287
|
-
let t39;
|
|
9288
|
-
if ($[111] !== t) {
|
|
9289
|
-
t39 = t("Usage and latency from Analytics Engine — request volume, p50/p95, and hot shards.");
|
|
9290
|
-
$[111] = t;
|
|
9291
|
-
$[112] = t39;
|
|
9292
|
-
} else {
|
|
9293
|
-
t39 = $[112];
|
|
9294
|
-
}
|
|
9295
9814
|
let t40;
|
|
9296
|
-
if ($[
|
|
9297
|
-
t40 = t("
|
|
9298
|
-
$[
|
|
9299
|
-
$[
|
|
9815
|
+
if ($[114] !== t) {
|
|
9816
|
+
t40 = t("Usage and latency from Analytics Engine — request volume, p50/p95, and hot shards.");
|
|
9817
|
+
$[114] = t;
|
|
9818
|
+
$[115] = t40;
|
|
9300
9819
|
} else {
|
|
9301
|
-
t40 = $[
|
|
9820
|
+
t40 = $[115];
|
|
9302
9821
|
}
|
|
9303
9822
|
let t41;
|
|
9304
|
-
if ($[
|
|
9305
|
-
t41 = t("
|
|
9306
|
-
$[
|
|
9307
|
-
$[
|
|
9823
|
+
if ($[116] !== t) {
|
|
9824
|
+
t41 = t("Interactive OpenAPI reference and copy-paste snippets for your functions.");
|
|
9825
|
+
$[116] = t;
|
|
9826
|
+
$[117] = t41;
|
|
9308
9827
|
} else {
|
|
9309
|
-
t41 = $[
|
|
9828
|
+
t41 = $[117];
|
|
9310
9829
|
}
|
|
9311
9830
|
let t42;
|
|
9312
|
-
if ($[
|
|
9313
|
-
t42 = t("
|
|
9314
|
-
$[
|
|
9315
|
-
$[
|
|
9831
|
+
if ($[118] !== t) {
|
|
9832
|
+
t42 = t("A durable log of admin state-changing operations.");
|
|
9833
|
+
$[118] = t;
|
|
9834
|
+
$[119] = t42;
|
|
9316
9835
|
} else {
|
|
9317
|
-
t42 = $[
|
|
9836
|
+
t42 = $[119];
|
|
9318
9837
|
}
|
|
9319
9838
|
let t43;
|
|
9320
|
-
if ($[
|
|
9321
|
-
t43 = t("
|
|
9322
|
-
$[
|
|
9323
|
-
$[
|
|
9839
|
+
if ($[120] !== t) {
|
|
9840
|
+
t43 = t("Enabled plugins and session config (read-only).");
|
|
9841
|
+
$[120] = t;
|
|
9842
|
+
$[121] = t43;
|
|
9324
9843
|
} else {
|
|
9325
|
-
t43 = $[
|
|
9844
|
+
t43 = $[121];
|
|
9326
9845
|
}
|
|
9327
9846
|
let t44;
|
|
9328
|
-
if ($[
|
|
9329
|
-
t44 = t("
|
|
9330
|
-
$[
|
|
9331
|
-
$[
|
|
9847
|
+
if ($[122] !== t) {
|
|
9848
|
+
t44 = t("Browse and revoke active sessions across all users.");
|
|
9849
|
+
$[122] = t;
|
|
9850
|
+
$[123] = t44;
|
|
9332
9851
|
} else {
|
|
9333
|
-
t44 = $[
|
|
9852
|
+
t44 = $[123];
|
|
9334
9853
|
}
|
|
9335
9854
|
let t45;
|
|
9336
|
-
if ($[
|
|
9337
|
-
t45 = t("
|
|
9338
|
-
$[
|
|
9339
|
-
$[
|
|
9855
|
+
if ($[124] !== t) {
|
|
9856
|
+
t45 = t("Chart widgets backed by saved read-only SQL queries.");
|
|
9857
|
+
$[124] = t;
|
|
9858
|
+
$[125] = t45;
|
|
9340
9859
|
} else {
|
|
9341
|
-
t45 = $[
|
|
9860
|
+
t45 = $[125];
|
|
9342
9861
|
}
|
|
9343
9862
|
let t46;
|
|
9344
|
-
if ($[
|
|
9345
|
-
t46 = t("
|
|
9346
|
-
$[
|
|
9347
|
-
$[
|
|
9863
|
+
if ($[126] !== t) {
|
|
9864
|
+
t46 = t("Browse and edit rows across your shard and global tables.");
|
|
9865
|
+
$[126] = t;
|
|
9866
|
+
$[127] = t46;
|
|
9348
9867
|
} else {
|
|
9349
|
-
t46 = $[
|
|
9868
|
+
t46 = $[127];
|
|
9350
9869
|
}
|
|
9351
9870
|
let t47;
|
|
9352
|
-
if ($[
|
|
9353
|
-
t47 = t("
|
|
9354
|
-
$[
|
|
9355
|
-
$[
|
|
9871
|
+
if ($[128] !== t) {
|
|
9872
|
+
t47 = t("Forward logs to Logpush, Tail Workers, or a webhook collector.");
|
|
9873
|
+
$[128] = t;
|
|
9874
|
+
$[129] = t47;
|
|
9356
9875
|
} else {
|
|
9357
|
-
t47 = $[
|
|
9876
|
+
t47 = $[129];
|
|
9358
9877
|
}
|
|
9359
9878
|
let t48;
|
|
9360
|
-
if ($[
|
|
9361
|
-
t48 = t("
|
|
9362
|
-
$[
|
|
9363
|
-
$[
|
|
9879
|
+
if ($[130] !== t) {
|
|
9880
|
+
t48 = t("Export a shard to NDJSON, or import rows from it.");
|
|
9881
|
+
$[130] = t;
|
|
9882
|
+
$[131] = t48;
|
|
9364
9883
|
} else {
|
|
9365
|
-
t48 = $[
|
|
9884
|
+
t48 = $[131];
|
|
9366
9885
|
}
|
|
9367
9886
|
let t49;
|
|
9368
|
-
if ($[
|
|
9369
|
-
t49 = t("
|
|
9370
|
-
$[
|
|
9371
|
-
$[
|
|
9887
|
+
if ($[132] !== t) {
|
|
9888
|
+
t49 = t("Browse objects in your R2 storage buckets.");
|
|
9889
|
+
$[132] = t;
|
|
9890
|
+
$[133] = t49;
|
|
9372
9891
|
} else {
|
|
9373
|
-
t49 = $[
|
|
9892
|
+
t49 = $[133];
|
|
9374
9893
|
}
|
|
9375
9894
|
let t50;
|
|
9376
|
-
if ($[
|
|
9377
|
-
t50 = t("
|
|
9378
|
-
$[
|
|
9379
|
-
$[
|
|
9895
|
+
if ($[134] !== t) {
|
|
9896
|
+
t50 = t("Run registered queries, mutations, and actions.");
|
|
9897
|
+
$[134] = t;
|
|
9898
|
+
$[135] = t50;
|
|
9380
9899
|
} else {
|
|
9381
|
-
t50 = $[
|
|
9900
|
+
t50 = $[135];
|
|
9382
9901
|
}
|
|
9383
9902
|
let t51;
|
|
9384
|
-
if ($[
|
|
9385
|
-
t51 = t("
|
|
9386
|
-
$[
|
|
9387
|
-
$[
|
|
9903
|
+
if ($[136] !== t) {
|
|
9904
|
+
t51 = t("At-a-glance connection, error, and shard signals.");
|
|
9905
|
+
$[136] = t;
|
|
9906
|
+
$[137] = t51;
|
|
9388
9907
|
} else {
|
|
9389
|
-
t51 = $[
|
|
9908
|
+
t51 = $[137];
|
|
9390
9909
|
}
|
|
9391
9910
|
let t52;
|
|
9392
|
-
if ($[
|
|
9393
|
-
t52 = t("
|
|
9394
|
-
$[
|
|
9395
|
-
$[
|
|
9911
|
+
if ($[138] !== t) {
|
|
9912
|
+
t52 = t("Connection, health, and advisor summary for your deployment.");
|
|
9913
|
+
$[138] = t;
|
|
9914
|
+
$[139] = t52;
|
|
9396
9915
|
} else {
|
|
9397
|
-
t52 = $[
|
|
9916
|
+
t52 = $[139];
|
|
9398
9917
|
}
|
|
9399
9918
|
let t53;
|
|
9400
|
-
if ($[
|
|
9401
|
-
t53 = t("
|
|
9402
|
-
$[
|
|
9403
|
-
$[
|
|
9919
|
+
if ($[140] !== t) {
|
|
9920
|
+
t53 = t("Surface slow functions, error spikes, and cache problems.");
|
|
9921
|
+
$[140] = t;
|
|
9922
|
+
$[141] = t53;
|
|
9404
9923
|
} else {
|
|
9405
|
-
t53 = $[
|
|
9924
|
+
t53 = $[141];
|
|
9406
9925
|
}
|
|
9407
9926
|
let t54;
|
|
9408
|
-
if ($[
|
|
9409
|
-
t54 = t("
|
|
9410
|
-
$[
|
|
9411
|
-
$[
|
|
9927
|
+
if ($[142] !== t) {
|
|
9928
|
+
t54 = t("A live stream of recent function logs.");
|
|
9929
|
+
$[142] = t;
|
|
9930
|
+
$[143] = t54;
|
|
9412
9931
|
} else {
|
|
9413
|
-
t54 = $[
|
|
9932
|
+
t54 = $[143];
|
|
9414
9933
|
}
|
|
9415
9934
|
let t55;
|
|
9416
|
-
if ($[
|
|
9417
|
-
t55 = t("
|
|
9418
|
-
$[
|
|
9419
|
-
$[
|
|
9935
|
+
if ($[144] !== t) {
|
|
9936
|
+
t55 = t("Per-shard health and aggregate metrics.");
|
|
9937
|
+
$[144] = t;
|
|
9938
|
+
$[145] = t55;
|
|
9420
9939
|
} else {
|
|
9421
|
-
t55 = $[
|
|
9940
|
+
t55 = $[145];
|
|
9422
9941
|
}
|
|
9423
9942
|
let t56;
|
|
9424
|
-
if ($[
|
|
9425
|
-
t56 = t("
|
|
9426
|
-
$[
|
|
9427
|
-
$[
|
|
9943
|
+
if ($[146] !== t) {
|
|
9944
|
+
t56 = t("Review migration status and run them.");
|
|
9945
|
+
$[146] = t;
|
|
9946
|
+
$[147] = t56;
|
|
9428
9947
|
} else {
|
|
9429
|
-
t56 = $[
|
|
9948
|
+
t56 = $[147];
|
|
9430
9949
|
}
|
|
9431
9950
|
let t57;
|
|
9432
|
-
if ($[
|
|
9433
|
-
t57 = t("
|
|
9434
|
-
$[
|
|
9435
|
-
$[
|
|
9951
|
+
if ($[148] !== t) {
|
|
9952
|
+
t57 = t("Browse and manage organizations, members, and invitations.");
|
|
9953
|
+
$[148] = t;
|
|
9954
|
+
$[149] = t57;
|
|
9436
9955
|
} else {
|
|
9437
|
-
t57 = $[
|
|
9956
|
+
t57 = $[149];
|
|
9438
9957
|
}
|
|
9439
9958
|
let t58;
|
|
9440
|
-
if ($[
|
|
9441
|
-
t58 = t("
|
|
9442
|
-
$[
|
|
9443
|
-
$[
|
|
9959
|
+
if ($[150] !== t) {
|
|
9960
|
+
t58 = t("Restore a shard to a point in the last 30 days.");
|
|
9961
|
+
$[150] = t;
|
|
9962
|
+
$[151] = t58;
|
|
9444
9963
|
} else {
|
|
9445
|
-
t58 = $[
|
|
9964
|
+
t58 = $[151];
|
|
9446
9965
|
}
|
|
9447
9966
|
let t59;
|
|
9448
|
-
if ($[
|
|
9449
|
-
t59 = t("
|
|
9450
|
-
$[
|
|
9451
|
-
$[
|
|
9967
|
+
if ($[152] !== t) {
|
|
9968
|
+
t59 = t("Email your app sent, captured in dev.");
|
|
9969
|
+
$[152] = t;
|
|
9970
|
+
$[153] = t59;
|
|
9452
9971
|
} else {
|
|
9453
|
-
t59 = $[
|
|
9972
|
+
t59 = $[153];
|
|
9454
9973
|
}
|
|
9455
9974
|
let t60;
|
|
9456
|
-
if ($[
|
|
9457
|
-
t60 = t("
|
|
9458
|
-
$[
|
|
9459
|
-
$[
|
|
9975
|
+
if ($[154] !== t) {
|
|
9976
|
+
t60 = t("Synced customers, subscriptions, and webhook events.");
|
|
9977
|
+
$[154] = t;
|
|
9978
|
+
$[155] = t60;
|
|
9460
9979
|
} else {
|
|
9461
|
-
t60 = $[
|
|
9980
|
+
t60 = $[155];
|
|
9462
9981
|
}
|
|
9463
9982
|
let t61;
|
|
9464
|
-
if ($[
|
|
9465
|
-
t61 = t("
|
|
9466
|
-
$[
|
|
9467
|
-
$[
|
|
9983
|
+
if ($[156] !== t) {
|
|
9984
|
+
t61 = t("Inspect access policies per table, and probe a function as any identity.");
|
|
9985
|
+
$[156] = t;
|
|
9986
|
+
$[157] = t61;
|
|
9468
9987
|
} else {
|
|
9469
|
-
t61 = $[
|
|
9988
|
+
t61 = $[157];
|
|
9470
9989
|
}
|
|
9471
9990
|
let t62;
|
|
9472
|
-
if ($[
|
|
9473
|
-
t62 = t("Inspect
|
|
9474
|
-
$[
|
|
9475
|
-
$[
|
|
9991
|
+
if ($[158] !== t) {
|
|
9992
|
+
t62 = t("Inspect declared Cloudflare Queues — their producer bindings, consumer mode, and dead-letter queue.");
|
|
9993
|
+
$[158] = t;
|
|
9994
|
+
$[159] = t62;
|
|
9476
9995
|
} else {
|
|
9477
|
-
t62 = $[
|
|
9996
|
+
t62 = $[159];
|
|
9478
9997
|
}
|
|
9479
9998
|
let t63;
|
|
9480
|
-
if ($[
|
|
9481
|
-
t63 = t("
|
|
9482
|
-
$[
|
|
9483
|
-
$[
|
|
9999
|
+
if ($[160] !== t) {
|
|
10000
|
+
t63 = t("Active WebSocket subscriptions on this shard.");
|
|
10001
|
+
$[160] = t;
|
|
10002
|
+
$[161] = t63;
|
|
9484
10003
|
} else {
|
|
9485
|
-
t63 = $[
|
|
10004
|
+
t63 = $[161];
|
|
9486
10005
|
}
|
|
9487
10006
|
let t64;
|
|
9488
|
-
if ($[
|
|
9489
|
-
t64 = t("Inspect
|
|
9490
|
-
$[
|
|
9491
|
-
$[
|
|
10007
|
+
if ($[162] !== t) {
|
|
10008
|
+
t64 = t("Inspect row-level-security policies and roles, per table.");
|
|
10009
|
+
$[162] = t;
|
|
10010
|
+
$[163] = t64;
|
|
9492
10011
|
} else {
|
|
9493
|
-
t64 = $[
|
|
10012
|
+
t64 = $[163];
|
|
9494
10013
|
}
|
|
9495
10014
|
let t65;
|
|
9496
|
-
if ($[
|
|
9497
|
-
t65 = t("
|
|
9498
|
-
$[
|
|
9499
|
-
$[
|
|
10015
|
+
if ($[164] !== t) {
|
|
10016
|
+
t65 = t("Inspect and cancel scheduled jobs.");
|
|
10017
|
+
$[164] = t;
|
|
10018
|
+
$[165] = t65;
|
|
9500
10019
|
} else {
|
|
9501
|
-
t65 = $[
|
|
10020
|
+
t65 = $[165];
|
|
9502
10021
|
}
|
|
9503
10022
|
let t66;
|
|
9504
|
-
if ($[
|
|
9505
|
-
t66 = t("
|
|
9506
|
-
$[
|
|
9507
|
-
$[
|
|
10023
|
+
if ($[166] !== t) {
|
|
10024
|
+
t66 = t("Inspect each table and its columns.");
|
|
10025
|
+
$[166] = t;
|
|
10026
|
+
$[167] = t66;
|
|
9508
10027
|
} else {
|
|
9509
|
-
t66 = $[
|
|
10028
|
+
t66 = $[167];
|
|
9510
10029
|
}
|
|
9511
10030
|
let t67;
|
|
9512
|
-
if ($[
|
|
9513
|
-
t67 = t("
|
|
9514
|
-
$[
|
|
9515
|
-
$[
|
|
10031
|
+
if ($[168] !== t) {
|
|
10032
|
+
t67 = t("Review admin gates, credentials, and log redaction.");
|
|
10033
|
+
$[168] = t;
|
|
10034
|
+
$[169] = t67;
|
|
9516
10035
|
} else {
|
|
9517
|
-
t67 = $[
|
|
10036
|
+
t67 = $[169];
|
|
9518
10037
|
}
|
|
9519
10038
|
let t68;
|
|
9520
|
-
if ($[
|
|
9521
|
-
t68 = t("
|
|
9522
|
-
$[
|
|
9523
|
-
$[
|
|
10039
|
+
if ($[170] !== t) {
|
|
10040
|
+
t68 = t("Read-only deployment config — vars, secrets, and bindings.");
|
|
10041
|
+
$[170] = t;
|
|
10042
|
+
$[171] = t68;
|
|
9524
10043
|
} else {
|
|
9525
|
-
t68 = $[
|
|
10044
|
+
t68 = $[171];
|
|
9526
10045
|
}
|
|
9527
10046
|
let t69;
|
|
9528
|
-
if ($[
|
|
9529
|
-
t69 = t("
|
|
9530
|
-
$[
|
|
9531
|
-
$[
|
|
10047
|
+
if ($[172] !== t) {
|
|
10048
|
+
t69 = t("Run read-only SQL against a shard.");
|
|
10049
|
+
$[172] = t;
|
|
10050
|
+
$[173] = t69;
|
|
9532
10051
|
} else {
|
|
9533
|
-
t69 = $[
|
|
10052
|
+
t69 = $[173];
|
|
9534
10053
|
}
|
|
9535
10054
|
let t70;
|
|
9536
|
-
if ($[
|
|
9537
|
-
t70 = t("
|
|
9538
|
-
$[
|
|
9539
|
-
$[
|
|
10055
|
+
if ($[174] !== t) {
|
|
10056
|
+
t70 = t("Inspect storage access rules — per bucket, operation, and key prefix.");
|
|
10057
|
+
$[174] = t;
|
|
10058
|
+
$[175] = t70;
|
|
9540
10059
|
} else {
|
|
9541
|
-
t70 = $[
|
|
10060
|
+
t70 = $[175];
|
|
9542
10061
|
}
|
|
9543
10062
|
let t71;
|
|
9544
|
-
if ($[
|
|
9545
|
-
t71 = t("
|
|
9546
|
-
$[
|
|
9547
|
-
$[
|
|
10063
|
+
if ($[176] !== t) {
|
|
10064
|
+
t71 = t("Manage auth users — roles, bans, sessions, and identity.");
|
|
10065
|
+
$[176] = t;
|
|
10066
|
+
$[177] = t71;
|
|
9548
10067
|
} else {
|
|
9549
|
-
t71 = $[
|
|
10068
|
+
t71 = $[177];
|
|
9550
10069
|
}
|
|
9551
10070
|
let t72;
|
|
9552
|
-
if ($[
|
|
9553
|
-
t72 =
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
dashboards: t44,
|
|
9560
|
-
data: t45,
|
|
9561
|
-
drains: t46,
|
|
9562
|
-
export: t47,
|
|
9563
|
-
files: t48,
|
|
9564
|
-
functions: t49,
|
|
9565
|
-
health: t50,
|
|
9566
|
-
home: t51,
|
|
9567
|
-
insights: t52,
|
|
9568
|
-
logs: t53,
|
|
9569
|
-
metrics: t54,
|
|
9570
|
-
migrations: t55,
|
|
9571
|
-
organizations: t56,
|
|
9572
|
-
pitr: t57,
|
|
9573
|
-
mail: t58,
|
|
9574
|
-
payments: t59,
|
|
9575
|
-
permissions: t60,
|
|
9576
|
-
realtime: t61,
|
|
9577
|
-
rls: t62,
|
|
9578
|
-
schedule: t63,
|
|
9579
|
-
schema: t64,
|
|
9580
|
-
security: t65,
|
|
9581
|
-
settings: t66,
|
|
9582
|
-
sql: t67,
|
|
9583
|
-
storageRules: t68,
|
|
9584
|
-
users: t69,
|
|
9585
|
-
vectors: t70,
|
|
9586
|
-
workflows: t71
|
|
9587
|
-
};
|
|
9588
|
-
$[177] = t39;
|
|
9589
|
-
$[178] = t40;
|
|
9590
|
-
$[179] = t41;
|
|
9591
|
-
$[180] = t42;
|
|
9592
|
-
$[181] = t43;
|
|
9593
|
-
$[182] = t44;
|
|
9594
|
-
$[183] = t45;
|
|
9595
|
-
$[184] = t46;
|
|
9596
|
-
$[185] = t47;
|
|
9597
|
-
$[186] = t48;
|
|
9598
|
-
$[187] = t49;
|
|
9599
|
-
$[188] = t50;
|
|
9600
|
-
$[189] = t51;
|
|
9601
|
-
$[190] = t52;
|
|
9602
|
-
$[191] = t53;
|
|
9603
|
-
$[192] = t54;
|
|
9604
|
-
$[193] = t55;
|
|
9605
|
-
$[194] = t56;
|
|
9606
|
-
$[195] = t57;
|
|
9607
|
-
$[196] = t58;
|
|
9608
|
-
$[197] = t59;
|
|
9609
|
-
$[198] = t60;
|
|
9610
|
-
$[199] = t61;
|
|
9611
|
-
$[200] = t62;
|
|
9612
|
-
$[201] = t63;
|
|
9613
|
-
$[202] = t64;
|
|
9614
|
-
$[203] = t65;
|
|
9615
|
-
$[204] = t66;
|
|
9616
|
-
$[205] = t67;
|
|
9617
|
-
$[206] = t68;
|
|
9618
|
-
$[207] = t69;
|
|
9619
|
-
$[208] = t70;
|
|
9620
|
-
$[209] = t71;
|
|
9621
|
-
$[210] = t72;
|
|
9622
|
-
} else {
|
|
9623
|
-
t72 = $[210];
|
|
9624
|
-
}
|
|
9625
|
-
const tabDescription = t72;
|
|
10071
|
+
if ($[178] !== t) {
|
|
10072
|
+
t72 = t("Browse Vectorize indexes and run similarity searches.");
|
|
10073
|
+
$[178] = t;
|
|
10074
|
+
$[179] = t72;
|
|
10075
|
+
} else {
|
|
10076
|
+
t72 = $[179];
|
|
10077
|
+
}
|
|
9626
10078
|
let t73;
|
|
9627
|
-
if ($[
|
|
9628
|
-
t73 = (
|
|
10079
|
+
if ($[180] !== t) {
|
|
10080
|
+
t73 = t("Inspect declared Cloudflare Workflows and their bindings.");
|
|
10081
|
+
$[180] = t;
|
|
10082
|
+
$[181] = t73;
|
|
10083
|
+
} else {
|
|
10084
|
+
t73 = $[181];
|
|
10085
|
+
}
|
|
10086
|
+
let t74;
|
|
10087
|
+
if ($[182] !== t40 || $[183] !== t41 || $[184] !== t42 || $[185] !== t43 || $[186] !== t44 || $[187] !== t45 || $[188] !== t46 || $[189] !== t47 || $[190] !== t48 || $[191] !== t49 || $[192] !== t50 || $[193] !== t51 || $[194] !== t52 || $[195] !== t53 || $[196] !== t54 || $[197] !== t55 || $[198] !== t56 || $[199] !== t57 || $[200] !== t58 || $[201] !== t59 || $[202] !== t60 || $[203] !== t61 || $[204] !== t62 || $[205] !== t63 || $[206] !== t64 || $[207] !== t65 || $[208] !== t66 || $[209] !== t67 || $[210] !== t68 || $[211] !== t69 || $[212] !== t70 || $[213] !== t71 || $[214] !== t72 || $[215] !== t73) {
|
|
10088
|
+
t74 = {
|
|
10089
|
+
analytics: t40,
|
|
10090
|
+
api: t41,
|
|
10091
|
+
audit: t42,
|
|
10092
|
+
authConfig: t43,
|
|
10093
|
+
authSessions: t44,
|
|
10094
|
+
dashboards: t45,
|
|
10095
|
+
data: t46,
|
|
10096
|
+
drains: t47,
|
|
10097
|
+
export: t48,
|
|
10098
|
+
files: t49,
|
|
10099
|
+
functions: t50,
|
|
10100
|
+
health: t51,
|
|
10101
|
+
home: t52,
|
|
10102
|
+
insights: t53,
|
|
10103
|
+
logs: t54,
|
|
10104
|
+
metrics: t55,
|
|
10105
|
+
migrations: t56,
|
|
10106
|
+
organizations: t57,
|
|
10107
|
+
pitr: t58,
|
|
10108
|
+
mail: t59,
|
|
10109
|
+
payments: t60,
|
|
10110
|
+
permissions: t61,
|
|
10111
|
+
queues: t62,
|
|
10112
|
+
realtime: t63,
|
|
10113
|
+
rls: t64,
|
|
10114
|
+
schedule: t65,
|
|
10115
|
+
schema: t66,
|
|
10116
|
+
security: t67,
|
|
10117
|
+
settings: t68,
|
|
10118
|
+
sql: t69,
|
|
10119
|
+
storageRules: t70,
|
|
10120
|
+
users: t71,
|
|
10121
|
+
vectors: t72,
|
|
10122
|
+
workflows: t73
|
|
10123
|
+
};
|
|
10124
|
+
$[182] = t40;
|
|
10125
|
+
$[183] = t41;
|
|
10126
|
+
$[184] = t42;
|
|
10127
|
+
$[185] = t43;
|
|
10128
|
+
$[186] = t44;
|
|
10129
|
+
$[187] = t45;
|
|
10130
|
+
$[188] = t46;
|
|
10131
|
+
$[189] = t47;
|
|
10132
|
+
$[190] = t48;
|
|
10133
|
+
$[191] = t49;
|
|
10134
|
+
$[192] = t50;
|
|
10135
|
+
$[193] = t51;
|
|
10136
|
+
$[194] = t52;
|
|
10137
|
+
$[195] = t53;
|
|
10138
|
+
$[196] = t54;
|
|
10139
|
+
$[197] = t55;
|
|
10140
|
+
$[198] = t56;
|
|
10141
|
+
$[199] = t57;
|
|
10142
|
+
$[200] = t58;
|
|
10143
|
+
$[201] = t59;
|
|
10144
|
+
$[202] = t60;
|
|
10145
|
+
$[203] = t61;
|
|
10146
|
+
$[204] = t62;
|
|
10147
|
+
$[205] = t63;
|
|
10148
|
+
$[206] = t64;
|
|
10149
|
+
$[207] = t65;
|
|
10150
|
+
$[208] = t66;
|
|
10151
|
+
$[209] = t67;
|
|
10152
|
+
$[210] = t68;
|
|
10153
|
+
$[211] = t69;
|
|
10154
|
+
$[212] = t70;
|
|
10155
|
+
$[213] = t71;
|
|
10156
|
+
$[214] = t72;
|
|
10157
|
+
$[215] = t73;
|
|
10158
|
+
$[216] = t74;
|
|
10159
|
+
} else {
|
|
10160
|
+
t74 = $[216];
|
|
10161
|
+
}
|
|
10162
|
+
const tabDescription = t74;
|
|
10163
|
+
let t75;
|
|
10164
|
+
if ($[217] !== navigate) {
|
|
10165
|
+
t75 = (event) => {
|
|
9629
10166
|
fireAndForget(navigate({
|
|
9630
10167
|
to: `/${event.currentTarget.dataset.tab ?? ""}`
|
|
9631
10168
|
}));
|
|
9632
10169
|
};
|
|
9633
|
-
$[
|
|
9634
|
-
$[
|
|
10170
|
+
$[217] = navigate;
|
|
10171
|
+
$[218] = t75;
|
|
9635
10172
|
} else {
|
|
9636
|
-
|
|
10173
|
+
t75 = $[218];
|
|
9637
10174
|
}
|
|
9638
|
-
const selectTab =
|
|
9639
|
-
let
|
|
9640
|
-
let
|
|
9641
|
-
if ($[
|
|
9642
|
-
|
|
10175
|
+
const selectTab = t75;
|
|
10176
|
+
let t76;
|
|
10177
|
+
let t77;
|
|
10178
|
+
if ($[219] !== current || $[220] !== tabLabel) {
|
|
10179
|
+
t76 = () => {
|
|
9643
10180
|
if (typeof document !== "undefined") {
|
|
9644
10181
|
document.title = `${tabLabel[current]} · lunora`;
|
|
9645
10182
|
}
|
|
9646
10183
|
};
|
|
9647
|
-
|
|
9648
|
-
$[
|
|
9649
|
-
$[
|
|
9650
|
-
$[
|
|
9651
|
-
$[
|
|
10184
|
+
t77 = [current, tabLabel];
|
|
10185
|
+
$[219] = current;
|
|
10186
|
+
$[220] = tabLabel;
|
|
10187
|
+
$[221] = t76;
|
|
10188
|
+
$[222] = t77;
|
|
9652
10189
|
} else {
|
|
9653
|
-
|
|
9654
|
-
|
|
10190
|
+
t76 = $[221];
|
|
10191
|
+
t77 = $[222];
|
|
9655
10192
|
}
|
|
9656
|
-
useEffect(
|
|
10193
|
+
useEffect(t76, t77);
|
|
9657
10194
|
const activeGroup = visibleGroups.find((group_1) => group_1.tabs.includes(current)) ?? NAV_GROUPS[0];
|
|
9658
10195
|
const commandItems = visibleGroups.flatMap((group_2) => group_2.tabs.map((tab_0) => ({
|
|
9659
10196
|
group: groupLabel[group_2.key],
|
|
@@ -9662,48 +10199,48 @@ const StudioLayout = () => {
|
|
|
9662
10199
|
})));
|
|
9663
10200
|
const chrome = use(StudioChromeContext);
|
|
9664
10201
|
const connected = chrome !== null && chrome.token !== "";
|
|
9665
|
-
let
|
|
9666
|
-
if ($[
|
|
9667
|
-
|
|
10202
|
+
let t78;
|
|
10203
|
+
if ($[223] !== commandItems) {
|
|
10204
|
+
t78 = /* @__PURE__ */ jsxDEV(CommandPalette, {
|
|
9668
10205
|
items: commandItems
|
|
9669
10206
|
}, void 0, false);
|
|
9670
|
-
$[
|
|
9671
|
-
$[
|
|
10207
|
+
$[223] = commandItems;
|
|
10208
|
+
$[224] = t78;
|
|
9672
10209
|
} else {
|
|
9673
|
-
|
|
10210
|
+
t78 = $[224];
|
|
9674
10211
|
}
|
|
9675
|
-
let
|
|
9676
|
-
if ($[
|
|
9677
|
-
|
|
10212
|
+
let t79;
|
|
10213
|
+
if ($[225] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
10214
|
+
t79 = /* @__PURE__ */ jsxDEV(SidebarTrigger, {
|
|
9678
10215
|
className: "-ms-1"
|
|
9679
10216
|
}, void 0, false);
|
|
9680
|
-
$[
|
|
10217
|
+
$[225] = t79;
|
|
9681
10218
|
} else {
|
|
9682
|
-
|
|
10219
|
+
t79 = $[225];
|
|
9683
10220
|
}
|
|
9684
|
-
let
|
|
9685
|
-
if ($[
|
|
9686
|
-
|
|
9687
|
-
$[
|
|
9688
|
-
$[
|
|
10221
|
+
let t80;
|
|
10222
|
+
if ($[226] !== t) {
|
|
10223
|
+
t80 = t("Breadcrumb");
|
|
10224
|
+
$[226] = t;
|
|
10225
|
+
$[227] = t80;
|
|
9689
10226
|
} else {
|
|
9690
|
-
|
|
10227
|
+
t80 = $[227];
|
|
9691
10228
|
}
|
|
9692
|
-
const
|
|
9693
|
-
let
|
|
9694
|
-
if ($[
|
|
9695
|
-
|
|
10229
|
+
const t81 = groupLabel[activeGroup.key];
|
|
10230
|
+
let t82;
|
|
10231
|
+
if ($[228] !== t81) {
|
|
10232
|
+
t82 = /* @__PURE__ */ jsxDEV("span", {
|
|
9696
10233
|
className: "text-muted-foreground",
|
|
9697
|
-
children:
|
|
10234
|
+
children: t81
|
|
9698
10235
|
}, void 0, false);
|
|
9699
|
-
$[
|
|
9700
|
-
$[
|
|
10236
|
+
$[228] = t81;
|
|
10237
|
+
$[229] = t82;
|
|
9701
10238
|
} else {
|
|
9702
|
-
|
|
10239
|
+
t82 = $[229];
|
|
9703
10240
|
}
|
|
9704
|
-
let
|
|
9705
|
-
if ($[
|
|
9706
|
-
|
|
10241
|
+
let t83;
|
|
10242
|
+
if ($[230] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
10243
|
+
t83 = /* @__PURE__ */ jsxDEV("svg", {
|
|
9707
10244
|
"aria-hidden": "true",
|
|
9708
10245
|
className: "size-3.5 text-muted-foreground/60",
|
|
9709
10246
|
fill: "none",
|
|
@@ -9716,39 +10253,39 @@ const StudioLayout = () => {
|
|
|
9716
10253
|
strokeLinejoin: "round"
|
|
9717
10254
|
}, void 0, false)
|
|
9718
10255
|
}, void 0, false);
|
|
9719
|
-
$[
|
|
10256
|
+
$[230] = t83;
|
|
9720
10257
|
} else {
|
|
9721
|
-
|
|
10258
|
+
t83 = $[230];
|
|
9722
10259
|
}
|
|
9723
|
-
const
|
|
9724
|
-
let
|
|
9725
|
-
if ($[
|
|
9726
|
-
|
|
10260
|
+
const t84 = tabLabel[current];
|
|
10261
|
+
let t85;
|
|
10262
|
+
if ($[231] !== t84) {
|
|
10263
|
+
t85 = /* @__PURE__ */ jsxDEV("span", {
|
|
9727
10264
|
className: "font-medium text-foreground",
|
|
9728
|
-
children:
|
|
10265
|
+
children: t84
|
|
9729
10266
|
}, void 0, false);
|
|
9730
|
-
$[
|
|
9731
|
-
$[
|
|
10267
|
+
$[231] = t84;
|
|
10268
|
+
$[232] = t85;
|
|
9732
10269
|
} else {
|
|
9733
|
-
|
|
10270
|
+
t85 = $[232];
|
|
9734
10271
|
}
|
|
9735
|
-
let
|
|
9736
|
-
if ($[
|
|
9737
|
-
|
|
9738
|
-
"aria-label":
|
|
10272
|
+
let t86;
|
|
10273
|
+
if ($[233] !== t80 || $[234] !== t82 || $[235] !== t85) {
|
|
10274
|
+
t86 = /* @__PURE__ */ jsxDEV("nav", {
|
|
10275
|
+
"aria-label": t80,
|
|
9739
10276
|
className: "flex items-center gap-1.5 text-[13px]",
|
|
9740
|
-
children: [
|
|
10277
|
+
children: [t82, t83, t85]
|
|
9741
10278
|
}, void 0, true);
|
|
9742
|
-
$[
|
|
9743
|
-
$[
|
|
9744
|
-
$[
|
|
9745
|
-
$[
|
|
10279
|
+
$[233] = t80;
|
|
10280
|
+
$[234] = t82;
|
|
10281
|
+
$[235] = t85;
|
|
10282
|
+
$[236] = t86;
|
|
9746
10283
|
} else {
|
|
9747
|
-
|
|
10284
|
+
t86 = $[236];
|
|
9748
10285
|
}
|
|
9749
|
-
let
|
|
9750
|
-
if ($[
|
|
9751
|
-
|
|
10286
|
+
let t87;
|
|
10287
|
+
if ($[237] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
10288
|
+
t87 = /* @__PURE__ */ jsxDEV("svg", {
|
|
9752
10289
|
"aria-hidden": "true",
|
|
9753
10290
|
className: "size-3.5",
|
|
9754
10291
|
fill: "none",
|
|
@@ -9764,164 +10301,164 @@ const StudioLayout = () => {
|
|
|
9764
10301
|
strokeLinecap: "round"
|
|
9765
10302
|
}, void 0, false)]
|
|
9766
10303
|
}, void 0, true);
|
|
9767
|
-
$[
|
|
10304
|
+
$[237] = t87;
|
|
9768
10305
|
} else {
|
|
9769
|
-
|
|
10306
|
+
t87 = $[237];
|
|
9770
10307
|
}
|
|
9771
|
-
let
|
|
9772
|
-
if ($[
|
|
9773
|
-
|
|
9774
|
-
$[
|
|
9775
|
-
$[
|
|
10308
|
+
let t88;
|
|
10309
|
+
if ($[238] !== t) {
|
|
10310
|
+
t88 = t("Search…");
|
|
10311
|
+
$[238] = t;
|
|
10312
|
+
$[239] = t88;
|
|
9776
10313
|
} else {
|
|
9777
|
-
|
|
10314
|
+
t88 = $[239];
|
|
9778
10315
|
}
|
|
9779
|
-
let
|
|
9780
|
-
if ($[
|
|
9781
|
-
|
|
10316
|
+
let t89;
|
|
10317
|
+
if ($[240] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
10318
|
+
t89 = /* @__PURE__ */ jsxDEV("kbd", {
|
|
9782
10319
|
className: "ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",
|
|
9783
10320
|
children: "⌘K"
|
|
9784
10321
|
}, void 0, false);
|
|
9785
|
-
$[
|
|
10322
|
+
$[240] = t89;
|
|
9786
10323
|
} else {
|
|
9787
|
-
|
|
10324
|
+
t89 = $[240];
|
|
9788
10325
|
}
|
|
9789
|
-
let
|
|
9790
|
-
if ($[
|
|
9791
|
-
|
|
10326
|
+
let t90;
|
|
10327
|
+
if ($[241] !== t88) {
|
|
10328
|
+
t90 = /* @__PURE__ */ jsxDEV("button", {
|
|
9792
10329
|
className: "mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex",
|
|
9793
10330
|
"data-testid": "dash-app-search",
|
|
9794
10331
|
onClick: openCommandPalette,
|
|
9795
10332
|
type: "button",
|
|
9796
|
-
children: [
|
|
10333
|
+
children: [t87, t88, t89]
|
|
9797
10334
|
}, void 0, true);
|
|
9798
|
-
$[
|
|
9799
|
-
$[
|
|
10335
|
+
$[241] = t88;
|
|
10336
|
+
$[242] = t90;
|
|
9800
10337
|
} else {
|
|
9801
|
-
|
|
10338
|
+
t90 = $[242];
|
|
9802
10339
|
}
|
|
9803
|
-
let
|
|
9804
|
-
if ($[
|
|
9805
|
-
|
|
10340
|
+
let t91;
|
|
10341
|
+
if ($[243] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
10342
|
+
t91 = /* @__PURE__ */ jsxDEV("div", {
|
|
9806
10343
|
className: "ms-auto flex items-center gap-1.5 md:ms-0",
|
|
9807
10344
|
children: /* @__PURE__ */ jsxDEV(ThemeToggle, {}, void 0, false)
|
|
9808
10345
|
}, void 0, false);
|
|
9809
|
-
$[
|
|
10346
|
+
$[243] = t91;
|
|
9810
10347
|
} else {
|
|
9811
|
-
|
|
10348
|
+
t91 = $[243];
|
|
9812
10349
|
}
|
|
9813
|
-
let
|
|
9814
|
-
if ($[
|
|
9815
|
-
|
|
10350
|
+
let t92;
|
|
10351
|
+
if ($[244] !== t86 || $[245] !== t90) {
|
|
10352
|
+
t92 = /* @__PURE__ */ jsxDEV("header", {
|
|
9816
10353
|
className: "flex h-11 shrink-0 items-center gap-2 border-b border-border px-4",
|
|
9817
10354
|
"data-testid": "dash-app-header",
|
|
9818
|
-
children: [
|
|
10355
|
+
children: [t79, t86, t90, t91]
|
|
9819
10356
|
}, void 0, true);
|
|
9820
|
-
$[
|
|
9821
|
-
$[
|
|
9822
|
-
$[
|
|
10357
|
+
$[244] = t86;
|
|
10358
|
+
$[245] = t90;
|
|
10359
|
+
$[246] = t92;
|
|
9823
10360
|
} else {
|
|
9824
|
-
|
|
10361
|
+
t92 = $[246];
|
|
9825
10362
|
}
|
|
9826
|
-
let
|
|
9827
|
-
if ($[
|
|
9828
|
-
|
|
9829
|
-
$[
|
|
9830
|
-
$[
|
|
9831
|
-
} else {
|
|
9832
|
-
t91 = $[242];
|
|
9833
|
-
}
|
|
9834
|
-
const t92 = `dash-tab-${current}`;
|
|
9835
|
-
const t93 = fullHeight ? "flex min-w-0 flex-1 flex-col overflow-hidden" : "min-w-0 flex-1 overflow-auto p-6";
|
|
9836
|
-
const t94 = tabLabel[current];
|
|
9837
|
-
let t95;
|
|
9838
|
-
if ($[243] !== t || $[244] !== t94) {
|
|
9839
|
-
t95 = t("{title} failed", {
|
|
9840
|
-
title: t94
|
|
9841
|
-
});
|
|
9842
|
-
$[243] = t;
|
|
9843
|
-
$[244] = t94;
|
|
9844
|
-
$[245] = t95;
|
|
10363
|
+
let t93;
|
|
10364
|
+
if ($[247] !== chrome?.rulesInstalled) {
|
|
10365
|
+
t93 = chrome?.rulesInstalled === false && /* @__PURE__ */ jsxDEV(RulesBanner, {}, void 0, false);
|
|
10366
|
+
$[247] = chrome?.rulesInstalled;
|
|
10367
|
+
$[248] = t93;
|
|
9845
10368
|
} else {
|
|
9846
|
-
|
|
10369
|
+
t93 = $[248];
|
|
9847
10370
|
}
|
|
10371
|
+
const t94 = `dash-tab-${current}`;
|
|
10372
|
+
const t95 = fullHeight ? "flex min-w-0 flex-1 flex-col overflow-hidden" : "min-w-0 flex-1 overflow-auto p-6";
|
|
9848
10373
|
const t96 = tabLabel[current];
|
|
9849
10374
|
let t97;
|
|
9850
|
-
if ($[
|
|
9851
|
-
t97 = t("
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
let t98;
|
|
9858
|
-
if ($[248] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
9859
|
-
t98 = /* @__PURE__ */ jsxDEV(Outlet, {}, void 0, false);
|
|
9860
|
-
$[248] = t98;
|
|
10375
|
+
if ($[249] !== t || $[250] !== t96) {
|
|
10376
|
+
t97 = t("{title} failed", {
|
|
10377
|
+
title: t96
|
|
10378
|
+
});
|
|
10379
|
+
$[249] = t;
|
|
10380
|
+
$[250] = t96;
|
|
10381
|
+
$[251] = t97;
|
|
9861
10382
|
} else {
|
|
9862
|
-
|
|
10383
|
+
t97 = $[251];
|
|
9863
10384
|
}
|
|
10385
|
+
const t98 = tabLabel[current];
|
|
9864
10386
|
let t99;
|
|
9865
|
-
if ($[
|
|
9866
|
-
t99 =
|
|
9867
|
-
|
|
9868
|
-
label: t96,
|
|
9869
|
-
retryLabel: t97,
|
|
9870
|
-
children: t98
|
|
9871
|
-
}, current, false);
|
|
9872
|
-
$[249] = current;
|
|
9873
|
-
$[250] = t95;
|
|
9874
|
-
$[251] = t96;
|
|
9875
|
-
$[252] = t97;
|
|
10387
|
+
if ($[252] !== t) {
|
|
10388
|
+
t99 = t("Try again");
|
|
10389
|
+
$[252] = t;
|
|
9876
10390
|
$[253] = t99;
|
|
9877
10391
|
} else {
|
|
9878
10392
|
t99 = $[253];
|
|
9879
10393
|
}
|
|
9880
10394
|
let t100;
|
|
9881
|
-
if ($[254]
|
|
9882
|
-
t100 = /* @__PURE__ */ jsxDEV(
|
|
9883
|
-
|
|
9884
|
-
children: t99
|
|
9885
|
-
}, void 0, false);
|
|
9886
|
-
$[254] = t93;
|
|
9887
|
-
$[255] = t99;
|
|
9888
|
-
$[256] = t100;
|
|
10395
|
+
if ($[254] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
10396
|
+
t100 = /* @__PURE__ */ jsxDEV(Outlet, {}, void 0, false);
|
|
10397
|
+
$[254] = t100;
|
|
9889
10398
|
} else {
|
|
9890
|
-
t100 = $[
|
|
10399
|
+
t100 = $[254];
|
|
9891
10400
|
}
|
|
9892
10401
|
let t101;
|
|
9893
|
-
if ($[257] !==
|
|
9894
|
-
t101 = /* @__PURE__ */ jsxDEV(
|
|
9895
|
-
|
|
10402
|
+
if ($[255] !== current || $[256] !== t97 || $[257] !== t98 || $[258] !== t99) {
|
|
10403
|
+
t101 = /* @__PURE__ */ jsxDEV(ErrorBoundary, {
|
|
10404
|
+
fallbackTitle: t97,
|
|
10405
|
+
label: t98,
|
|
10406
|
+
retryLabel: t99,
|
|
10407
|
+
children: t100
|
|
10408
|
+
}, current, false);
|
|
10409
|
+
$[255] = current;
|
|
10410
|
+
$[256] = t97;
|
|
10411
|
+
$[257] = t98;
|
|
10412
|
+
$[258] = t99;
|
|
10413
|
+
$[259] = t101;
|
|
10414
|
+
} else {
|
|
10415
|
+
t101 = $[259];
|
|
10416
|
+
}
|
|
10417
|
+
let t102;
|
|
10418
|
+
if ($[260] !== t101 || $[261] !== t95) {
|
|
10419
|
+
t102 = /* @__PURE__ */ jsxDEV("div", {
|
|
10420
|
+
className: t95,
|
|
10421
|
+
children: t101
|
|
10422
|
+
}, void 0, false);
|
|
10423
|
+
$[260] = t101;
|
|
10424
|
+
$[261] = t95;
|
|
10425
|
+
$[262] = t102;
|
|
10426
|
+
} else {
|
|
10427
|
+
t102 = $[262];
|
|
10428
|
+
}
|
|
10429
|
+
let t103;
|
|
10430
|
+
if ($[263] !== t102 || $[264] !== t94) {
|
|
10431
|
+
t103 = /* @__PURE__ */ jsxDEV("div", {
|
|
10432
|
+
"aria-labelledby": t94,
|
|
9896
10433
|
className: "flex min-w-0 flex-1 flex-col overflow-hidden",
|
|
9897
10434
|
"data-testid": "dash-panel",
|
|
9898
10435
|
id: "dash-panel",
|
|
9899
10436
|
role: "tabpanel",
|
|
9900
|
-
children:
|
|
10437
|
+
children: t102
|
|
9901
10438
|
}, void 0, false);
|
|
9902
|
-
$[
|
|
9903
|
-
$[
|
|
9904
|
-
$[
|
|
10439
|
+
$[263] = t102;
|
|
10440
|
+
$[264] = t94;
|
|
10441
|
+
$[265] = t103;
|
|
9905
10442
|
} else {
|
|
9906
|
-
|
|
10443
|
+
t103 = $[265];
|
|
9907
10444
|
}
|
|
9908
|
-
let
|
|
9909
|
-
if ($[
|
|
9910
|
-
|
|
10445
|
+
let t104;
|
|
10446
|
+
if ($[266] !== t103 || $[267] !== t92 || $[268] !== t93) {
|
|
10447
|
+
t104 = /* @__PURE__ */ jsxDEV(SidebarInset, {
|
|
9911
10448
|
className: "overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",
|
|
9912
|
-
children: [
|
|
10449
|
+
children: [t92, t93, t103]
|
|
9913
10450
|
}, void 0, true);
|
|
9914
|
-
$[
|
|
9915
|
-
$[
|
|
9916
|
-
$[
|
|
9917
|
-
$[
|
|
10451
|
+
$[266] = t103;
|
|
10452
|
+
$[267] = t92;
|
|
10453
|
+
$[268] = t93;
|
|
10454
|
+
$[269] = t104;
|
|
9918
10455
|
} else {
|
|
9919
|
-
|
|
10456
|
+
t104 = $[269];
|
|
9920
10457
|
}
|
|
9921
10458
|
return /* @__PURE__ */ jsxDEV(SidebarProvider, {
|
|
9922
10459
|
className: "min-h-0 flex-1",
|
|
9923
10460
|
"data-testid": "lunora-studio",
|
|
9924
|
-
children: [
|
|
10461
|
+
children: [t78, /* @__PURE__ */ jsxDEV(StudioSidebar, {
|
|
9925
10462
|
chrome,
|
|
9926
10463
|
connected,
|
|
9927
10464
|
current,
|
|
@@ -9930,7 +10467,7 @@ const StudioLayout = () => {
|
|
|
9930
10467
|
selectTab,
|
|
9931
10468
|
tabDescription,
|
|
9932
10469
|
tabLabel
|
|
9933
|
-
}, void 0, false),
|
|
10470
|
+
}, void 0, false), t104]
|
|
9934
10471
|
}, void 0, true);
|
|
9935
10472
|
};
|
|
9936
10473
|
const RoutePending = () => {
|
|
@@ -10096,6 +10633,7 @@ const buildRouter = ({
|
|
|
10096
10633
|
}, void 0, false),
|
|
10097
10634
|
mail: /* @__PURE__ */ jsxDEV(MailPanel, {}, void 0, false),
|
|
10098
10635
|
payments: /* @__PURE__ */ jsxDEV(PaymentsPanel, {}, void 0, false),
|
|
10636
|
+
queues: /* @__PURE__ */ jsxDEV(QueuesPanel, {}, void 0, false),
|
|
10099
10637
|
realtime: /* @__PURE__ */ jsxDEV(SubscriptionsPanel, {
|
|
10100
10638
|
initialShardKey
|
|
10101
10639
|
}, void 0, false),
|
|
@@ -10126,11 +10664,21 @@ const buildRouter = ({
|
|
|
10126
10664
|
getParentRoute: () => rootRoute,
|
|
10127
10665
|
path: "/"
|
|
10128
10666
|
});
|
|
10129
|
-
const tabRoutes = TABS.map((tab) =>
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10667
|
+
const tabRoutes = TABS.map((tab) => {
|
|
10668
|
+
if (tab === "data") {
|
|
10669
|
+
return createRoute({
|
|
10670
|
+
component: () => panels[tab],
|
|
10671
|
+
getParentRoute: () => rootRoute,
|
|
10672
|
+
path: `/${tab}`,
|
|
10673
|
+
validateSearch: validateDataViewSearch
|
|
10674
|
+
});
|
|
10675
|
+
}
|
|
10676
|
+
return createRoute({
|
|
10677
|
+
component: () => panels[tab],
|
|
10678
|
+
getParentRoute: () => rootRoute,
|
|
10679
|
+
path: `/${tab}`
|
|
10680
|
+
});
|
|
10681
|
+
});
|
|
10134
10682
|
const routeTree = rootRoute.addChildren([indexRoute, ...tabRoutes]);
|
|
10135
10683
|
const history = "window" in globalThis ? createBrowserHistory() : createMemoryHistory({
|
|
10136
10684
|
initialEntries: ["/home"]
|
|
@@ -10300,4 +10848,4 @@ function _temp2(group_0) {
|
|
|
10300
10848
|
return group_0.tabs.length > 0;
|
|
10301
10849
|
}
|
|
10302
10850
|
|
|
10303
|
-
export { Studio as S, ThemeProvider as T, TooltipProvider as a, useTheme as u };
|
|
10851
|
+
export { BrandMark as B, Studio as S, ThemeProvider as T, TooltipProvider as a, useTheme as u };
|