@lunora/studio 1.0.0-alpha.37 → 1.0.0-alpha.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/mount.js +1 -1
- package/dist/packem_chunks/ApiTab.js +3 -3
- package/dist/packem_chunks/AuditPanel.js +3 -3
- package/dist/packem_chunks/ExportImportPanel.js +2 -2
- package/dist/packem_chunks/FileBrowser.js +2 -2
- package/dist/packem_chunks/FunctionRunner.js +1 -1
- package/dist/packem_chunks/FunctionStatsPanel.js +3 -3
- package/dist/packem_chunks/HealthPanel.js +2 -2
- package/dist/packem_chunks/InsightsPanel.js +3 -3
- package/dist/packem_chunks/LogsPanel.js +2 -2
- package/dist/packem_chunks/MailPanel.js +3 -3
- package/dist/packem_chunks/MetricsPanel.js +2 -2
- package/dist/packem_chunks/MigrationsPanel.js +3 -3
- package/dist/packem_chunks/PitrPanel.js +1 -1
- package/dist/packem_chunks/SchemaViewer.js +1 -1
- package/dist/packem_chunks/SecurityAdvisorPanel.js +2 -2
- package/dist/packem_chunks/SettingsPanel.js +2 -2
- package/dist/packem_chunks/SqlEditorPanel.js +149 -139
- package/dist/packem_chunks/TableEditor.js +3 -3
- package/dist/packem_chunks/analytics-panel.js +1 -1
- package/dist/packem_chunks/auth-config-panel.js +291 -105
- package/dist/packem_chunks/auth-sessions-panel.js +2 -2
- package/dist/packem_chunks/containers-panel.js +1 -1
- package/dist/packem_chunks/dashboards-panel.js +2 -2
- package/dist/packem_chunks/fanout-panel.js +2 -2
- package/dist/packem_chunks/flags-panel.js +2 -2
- package/dist/packem_chunks/kv-browser.js +2 -2
- package/dist/packem_chunks/log-drains-panel.js +1 -1
- package/dist/packem_chunks/organizations-panel.js +3003 -495
- package/dist/packem_chunks/payments-panel.js +3 -3
- package/dist/packem_chunks/permissions-panel.js +3 -3
- package/dist/packem_chunks/queues-panel.js +242 -219
- package/dist/packem_chunks/rls-panel.js +2 -2
- package/dist/packem_chunks/schedule-panel.js +3 -3
- package/dist/packem_chunks/storage-rules-panel.js +2 -2
- package/dist/packem_chunks/subscriptions-panel.js +2 -2
- package/dist/packem_chunks/users-panel.js +577 -111
- package/dist/packem_chunks/vector-browser.js +1 -1
- package/dist/packem_chunks/workflows-panel.js +2 -2
- package/dist/packem_shared/{ApiDocsPanel-D4CJf2ad.js → ApiDocsPanel-CBma-lnp.js} +1 -1
- package/dist/packem_shared/{ApiReferencePanel-Co_wpRF2.js → ApiReferencePanel-CQM3pPN7.js} +1 -1
- package/dist/packem_shared/{CommandPalette-BUPpbpMc.js → CommandPalette-X2tkbyHk.js} +1 -1
- package/dist/packem_shared/{DataBrowser-BeVNxSVm.js → DataBrowser-D2ywrdId.js} +5 -5
- package/dist/packem_shared/{GlobalDataBrowser-ErfvIs1S.js → GlobalDataBrowser-BkTPLzAY.js} +3 -3
- package/dist/packem_shared/{HomePanel-D9MQk8I7.js → HomePanel-D1Q9LZgK.js} +3 -3
- package/dist/packem_shared/{OpenRpcReferencePanel-DLWzrIx9.js → OpenRpcReferencePanel-Dno-hfDb.js} +1 -1
- package/dist/packem_shared/{ScheduledJobs-ClaNpZsg.js → ScheduledJobs-Ctw4jYtU.js} +2 -2
- package/dist/packem_shared/{Studio-C48P1K5W.js → Studio-lJhzDAze.js} +4 -4
- package/dist/packem_shared/{StudioApp-Cqh-SYm2.js → StudioApp-DiMkupvZ.js} +3 -12
- package/dist/packem_shared/{advisor-view-D3-U4kRR.js → advisor-view-BX8OhG0w.js} +1 -1
- package/dist/packem_shared/{browser-storage-tLOxkIHd.js → browser-storage-BTrX4y3B.js} +32 -2
- package/dist/packem_shared/{data-grid-Jz8FqQ2C.js → data-grid-CdXztApG.js} +1 -1
- package/dist/packem_shared/{error-alert-BBT6D22d.js → error-alert-CXjqyGw9.js} +1 -1
- package/dist/packem_shared/{grid-features-CUr8Z1_O.js → grid-features-BF-KBDFz.js} +128 -65
- package/dist/packem_shared/{home-panel-CoGxi-oj.js → home-panel-TFcRf9Ui.js} +272 -22
- package/dist/packem_shared/{internal-DTsYVn-g.js → internal-CYcbqMjX.js} +15 -3
- package/dist/packem_shared/{reference-view-CSKyUyPl.js → reference-view-DUiJcILV.js} +1 -1
- package/dist/packem_shared/{studio-CPHA_-3I.js → studio-Dh9UlaF_.js} +3 -3
- package/dist/packem_shared/{table-list-sidebar-B5psdSV1.js → table-list-sidebar-UVIXQJdU.js} +1 -1
- package/dist/packem_shared/{use-admin-query-BHPKmPuj.js → use-admin-query-CfHYWx5n.js} +1 -1
- package/dist/packem_shared/use-async-submit-DJQiPc-_.js +91 -0
- package/dist/standalone/{chunk-M55U7NHO.js → chunk-23C4TCRO.js} +1 -1
- package/dist/standalone/{chunk-TO4JQX7W.js → chunk-5ZAA2PVR.js} +1 -1
- package/dist/standalone/{chunk-MPTM7ZU3.js → chunk-676HEBIR.js} +1 -1
- package/dist/standalone/{chunk-Y2ZPNDL7.js → chunk-6VO23MMW.js} +1 -1
- package/dist/standalone/{chunk-OIZ4CHPN.js → chunk-7RE5UW27.js} +1 -1
- package/dist/standalone/chunk-7YXOPTWI.js +1 -0
- package/dist/standalone/{chunk-QLM6FYZW.js → chunk-AAVIFQ4Y.js} +1 -1
- package/dist/standalone/{chunk-ATYUMPDM.js → chunk-AJFQ3LNM.js} +1 -1
- package/dist/standalone/chunk-AJULNB46.js +4 -0
- package/dist/standalone/{chunk-6GFEVKJP.js → chunk-BGXOXASQ.js} +1 -1
- package/dist/standalone/{chunk-2THHW7BC.js → chunk-BKW7FFEO.js} +1 -1
- package/dist/standalone/{chunk-YEVCU7TB.js → chunk-BXOYVWJR.js} +1 -1
- package/dist/standalone/{chunk-DVKPRFIJ.js → chunk-C7WTJLC3.js} +1 -1
- package/dist/standalone/{chunk-AJIUI7DD.js → chunk-CACB34RQ.js} +1 -1
- package/dist/standalone/{chunk-DVC6YWVP.js → chunk-CICVBMEN.js} +1 -1
- package/dist/standalone/{chunk-DWTBY343.js → chunk-CWEAJUHW.js} +1 -1
- package/dist/standalone/{chunk-TOJ3TC35.js → chunk-DECHEGIC.js} +1 -1
- package/dist/standalone/{chunk-PVZI3CXP.js → chunk-E75ANNWX.js} +7 -7
- package/dist/standalone/{chunk-OCHNCAXJ.js → chunk-ERJNDIXC.js} +1 -1
- package/dist/standalone/{chunk-RRAFQ5G2.js → chunk-FKACHRWO.js} +1 -1
- package/dist/standalone/{chunk-46K3NKPA.js → chunk-FSGCANAU.js} +1 -1
- package/dist/standalone/chunk-GLUNBZRI.js +1 -0
- package/dist/standalone/{chunk-5OH3VPZF.js → chunk-H6RKXQZU.js} +1 -1
- package/dist/standalone/chunk-HZTGDL4L.js +1 -0
- package/dist/standalone/{chunk-FCSPAJW4.js → chunk-I7ZZRM7I.js} +1 -1
- package/dist/standalone/{chunk-764T6X6X.js → chunk-IXDH4GL5.js} +1 -1
- package/dist/standalone/{chunk-ZU4DZ6NK.js → chunk-J46WXQYL.js} +1 -1
- package/dist/standalone/{chunk-PACH5AHG.js → chunk-JVODY4EP.js} +1 -1
- package/dist/standalone/chunk-KSKXW5PX.js +1 -0
- package/dist/standalone/chunk-L7SK4ZZD.js +1 -0
- package/dist/standalone/chunk-LNZIB2MD.js +1 -0
- package/dist/standalone/{chunk-LD2R263D.js → chunk-LYB5L53X.js} +1 -1
- package/dist/standalone/chunk-MJWVMKQ4.js +6 -0
- package/dist/standalone/chunk-MT2J3H7O.js +3 -0
- package/dist/standalone/{chunk-VTGBPW24.js → chunk-N746FOQP.js} +1 -1
- package/dist/standalone/{chunk-U4OAQPBT.js → chunk-NC6MBMSI.js} +1 -1
- package/dist/standalone/chunk-NN27EDQB.js +1 -0
- package/dist/standalone/chunk-NY6GDADQ.js +1 -0
- package/dist/standalone/{chunk-JE2YOAB7.js → chunk-OY3HD7BJ.js} +1 -1
- package/dist/standalone/{chunk-ILCTSAOB.js → chunk-P5HJXCZS.js} +1 -1
- package/dist/standalone/chunk-PTS5TW3J.js +1 -0
- package/dist/standalone/chunk-QDBOPDJ7.js +1 -0
- package/dist/standalone/{chunk-7SLSB2TS.js → chunk-QHFTGJPS.js} +2 -2
- package/dist/standalone/chunk-SSI4G2MY.js +1 -0
- package/dist/standalone/chunk-TH45YG6Q.js +1 -0
- package/dist/standalone/{chunk-WXPWVBIY.js → chunk-UGUEC6BC.js} +1 -1
- package/dist/standalone/{chunk-K3GNLVYK.js → chunk-UKDJ4H7I.js} +1 -1
- package/dist/standalone/chunk-V6IWFYAQ.js +1 -0
- package/dist/standalone/{chunk-BQUQS7QN.js → chunk-V7SRH36W.js} +1 -1
- package/dist/standalone/chunk-VON7JUPG.js +1 -0
- package/dist/standalone/{chunk-X5P2WRYI.js → chunk-WPNXY7IS.js} +1 -1
- package/dist/standalone/{chunk-PZ7HD5T2.js → chunk-X33MSJPP.js} +1 -1
- package/dist/standalone/{chunk-BI35RXKQ.js → chunk-XRNXOIVZ.js} +1 -1
- package/dist/standalone/{chunk-TDL7NEWA.js → chunk-YBGC4PPD.js} +1 -1
- package/dist/standalone/{chunk-XLQ4BHBD.js → chunk-YNZ7ARWW.js} +1 -1
- package/dist/standalone/{chunk-SLKF2L74.js → chunk-YTO65GHS.js} +1 -1
- package/dist/standalone/{chunk-6WRZP62V.js → chunk-ZE6FT5Z3.js} +1 -1
- package/dist/standalone/studio.js +31 -31
- package/dist/styles.css +1 -1
- package/package.json +4 -4
- package/dist/packem_shared/use-auth-capabilities-C-VH0oJJ.js +0 -32
- package/dist/standalone/chunk-22W5VKZ6.js +0 -1
- package/dist/standalone/chunk-2GGMGPEP.js +0 -1
- package/dist/standalone/chunk-7VF3IAAW.js +0 -2
- package/dist/standalone/chunk-BACPICH6.js +0 -1
- package/dist/standalone/chunk-DORBUITF.js +0 -1
- package/dist/standalone/chunk-EUIHTPKI.js +0 -1
- package/dist/standalone/chunk-IOFMK4D7.js +0 -1
- package/dist/standalone/chunk-LI43EKM6.js +0 -1
- package/dist/standalone/chunk-MPYFGAOW.js +0 -1
- package/dist/standalone/chunk-NKJDGOM3.js +0 -1
- package/dist/standalone/chunk-OY3GVYS7.js +0 -4
- package/dist/standalone/chunk-PN5NCZDX.js +0 -1
- package/dist/standalone/chunk-RSEEHNFI.js +0 -1
- package/dist/standalone/chunk-X7MMBSNW.js +0 -1
- package/dist/standalone/chunk-XUGSA2NG.js +0 -1
- package/dist/standalone/chunk-ZYRGPDZB.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useLunora } from '@lunora/react';
|
|
3
3
|
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
4
|
-
import {
|
|
5
|
-
import { a as useClientQuery } from '../packem_shared/use-admin-query-
|
|
4
|
+
import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
5
|
+
import { a as useClientQuery } from '../packem_shared/use-admin-query-CfHYWx5n.js';
|
|
6
6
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
7
|
-
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
7
|
+
import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
|
|
8
8
|
|
|
9
9
|
const CAPABILITY_ROWS = [{
|
|
10
10
|
key: "accounts",
|
|
@@ -22,158 +22,344 @@ const CAPABILITY_ROWS = [{
|
|
|
22
22
|
key: "twoFactor",
|
|
23
23
|
label: "Two-factor"
|
|
24
24
|
}];
|
|
25
|
+
const formatDuration = (seconds) => {
|
|
26
|
+
if (seconds === void 0) {
|
|
27
|
+
return "—";
|
|
28
|
+
}
|
|
29
|
+
const units = [[86400, "d"], [3600, "h"], [60, "m"]];
|
|
30
|
+
for (const [size, suffix] of units) {
|
|
31
|
+
if (seconds >= size && seconds % size === 0) {
|
|
32
|
+
return `${String(seconds / size)}${suffix}`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return `${String(seconds)}s`;
|
|
36
|
+
};
|
|
37
|
+
const ConfigCard = (t0) => {
|
|
38
|
+
const $ = c(8);
|
|
39
|
+
const {
|
|
40
|
+
children,
|
|
41
|
+
heading,
|
|
42
|
+
testId
|
|
43
|
+
} = t0;
|
|
44
|
+
let t1;
|
|
45
|
+
if ($[0] !== heading) {
|
|
46
|
+
t1 = /* @__PURE__ */ jsxDEV("header", {
|
|
47
|
+
className: "border-b border-border px-4 py-3",
|
|
48
|
+
children: /* @__PURE__ */ jsxDEV("span", {
|
|
49
|
+
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
50
|
+
children: heading
|
|
51
|
+
}, void 0, false)
|
|
52
|
+
}, void 0, false);
|
|
53
|
+
$[0] = heading;
|
|
54
|
+
$[1] = t1;
|
|
55
|
+
} else {
|
|
56
|
+
t1 = $[1];
|
|
57
|
+
}
|
|
58
|
+
let t2;
|
|
59
|
+
if ($[2] !== children) {
|
|
60
|
+
t2 = /* @__PURE__ */ jsxDEV(CardContent, {
|
|
61
|
+
className: "p-3",
|
|
62
|
+
children
|
|
63
|
+
}, void 0, false);
|
|
64
|
+
$[2] = children;
|
|
65
|
+
$[3] = t2;
|
|
66
|
+
} else {
|
|
67
|
+
t2 = $[3];
|
|
68
|
+
}
|
|
69
|
+
let t3;
|
|
70
|
+
if ($[4] !== t1 || $[5] !== t2 || $[6] !== testId) {
|
|
71
|
+
t3 = /* @__PURE__ */ jsxDEV(Card, {
|
|
72
|
+
className: "gap-0 py-0",
|
|
73
|
+
"data-testid": testId,
|
|
74
|
+
children: [t1, t2]
|
|
75
|
+
}, void 0, true);
|
|
76
|
+
$[4] = t1;
|
|
77
|
+
$[5] = t2;
|
|
78
|
+
$[6] = testId;
|
|
79
|
+
$[7] = t3;
|
|
80
|
+
} else {
|
|
81
|
+
t3 = $[7];
|
|
82
|
+
}
|
|
83
|
+
return t3;
|
|
84
|
+
};
|
|
85
|
+
const KeyValue = (t0) => {
|
|
86
|
+
const $ = c(7);
|
|
87
|
+
const {
|
|
88
|
+
label,
|
|
89
|
+
value
|
|
90
|
+
} = t0;
|
|
91
|
+
let t1;
|
|
92
|
+
if ($[0] !== label) {
|
|
93
|
+
t1 = /* @__PURE__ */ jsxDEV("span", {
|
|
94
|
+
className: "text-sm",
|
|
95
|
+
children: label
|
|
96
|
+
}, void 0, false);
|
|
97
|
+
$[0] = label;
|
|
98
|
+
$[1] = t1;
|
|
99
|
+
} else {
|
|
100
|
+
t1 = $[1];
|
|
101
|
+
}
|
|
102
|
+
let t2;
|
|
103
|
+
if ($[2] !== value) {
|
|
104
|
+
t2 = /* @__PURE__ */ jsxDEV("span", {
|
|
105
|
+
className: "text-sm text-muted-foreground tabular-nums",
|
|
106
|
+
children: value
|
|
107
|
+
}, void 0, false);
|
|
108
|
+
$[2] = value;
|
|
109
|
+
$[3] = t2;
|
|
110
|
+
} else {
|
|
111
|
+
t2 = $[3];
|
|
112
|
+
}
|
|
113
|
+
let t3;
|
|
114
|
+
if ($[4] !== t1 || $[5] !== t2) {
|
|
115
|
+
t3 = /* @__PURE__ */ jsxDEV("div", {
|
|
116
|
+
className: "flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs",
|
|
117
|
+
children: [t1, t2]
|
|
118
|
+
}, void 0, true);
|
|
119
|
+
$[4] = t1;
|
|
120
|
+
$[5] = t2;
|
|
121
|
+
$[6] = t3;
|
|
122
|
+
} else {
|
|
123
|
+
t3 = $[6];
|
|
124
|
+
}
|
|
125
|
+
return t3;
|
|
126
|
+
};
|
|
25
127
|
const AuthConfigPanel = () => {
|
|
26
|
-
const $ = c(
|
|
128
|
+
const $ = c(20);
|
|
27
129
|
const client = useLunora();
|
|
28
130
|
const t = useT();
|
|
29
131
|
let t0;
|
|
30
132
|
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
31
|
-
t0 = ["lunora-auth-
|
|
133
|
+
t0 = ["lunora-auth-config"];
|
|
32
134
|
$[0] = t0;
|
|
33
135
|
} else {
|
|
34
136
|
t0 = $[0];
|
|
35
137
|
}
|
|
36
138
|
let t1;
|
|
37
139
|
if ($[1] !== client) {
|
|
38
|
-
t1 = () => client.
|
|
140
|
+
t1 = () => client.getAuthConfig();
|
|
39
141
|
$[1] = client;
|
|
40
142
|
$[2] = t1;
|
|
41
143
|
} else {
|
|
42
144
|
t1 = $[2];
|
|
43
145
|
}
|
|
44
146
|
const {
|
|
45
|
-
data:
|
|
147
|
+
data: config,
|
|
46
148
|
error
|
|
47
149
|
} = useClientQuery(t0, t1);
|
|
48
150
|
let t2;
|
|
49
151
|
if ($[3] !== t) {
|
|
50
|
-
t2 =
|
|
152
|
+
t2 = (on) => /* @__PURE__ */ jsxDEV(Badge, {
|
|
153
|
+
variant: on ? "success" : "outline",
|
|
154
|
+
children: on ? t("Enabled") : t("Disabled")
|
|
155
|
+
}, void 0, false);
|
|
51
156
|
$[3] = t;
|
|
52
157
|
$[4] = t2;
|
|
53
158
|
} else {
|
|
54
159
|
t2 = $[4];
|
|
55
160
|
}
|
|
161
|
+
const statusBadge = t2;
|
|
56
162
|
let t3;
|
|
57
|
-
if ($[5] !==
|
|
58
|
-
t3 = /* @__PURE__ */ jsxDEV("
|
|
59
|
-
className: "border-b border-border px-4 py-3",
|
|
60
|
-
children: /* @__PURE__ */ jsxDEV("span", {
|
|
61
|
-
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
62
|
-
children: t2
|
|
63
|
-
}, void 0, false)
|
|
64
|
-
}, void 0, false);
|
|
65
|
-
$[5] = t2;
|
|
66
|
-
$[6] = t3;
|
|
67
|
-
} else {
|
|
68
|
-
t3 = $[6];
|
|
69
|
-
}
|
|
70
|
-
let t4;
|
|
71
|
-
if ($[7] !== error) {
|
|
72
|
-
t4 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
163
|
+
if ($[5] !== error) {
|
|
164
|
+
t3 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
73
165
|
className: "px-4 py-8 text-center text-sm text-destructive",
|
|
74
166
|
"data-testid": "auth-config-error",
|
|
75
167
|
role: "alert",
|
|
76
168
|
children: error
|
|
77
169
|
}, void 0, false);
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
170
|
+
$[5] = error;
|
|
171
|
+
$[6] = t3;
|
|
80
172
|
} else {
|
|
81
|
-
|
|
173
|
+
t3 = $[6];
|
|
82
174
|
}
|
|
83
|
-
let
|
|
84
|
-
if ($[
|
|
85
|
-
|
|
175
|
+
let t4;
|
|
176
|
+
if ($[7] !== config || $[8] !== error || $[9] !== t) {
|
|
177
|
+
t4 = error === null && config === void 0 && /* @__PURE__ */ jsxDEV("p", {
|
|
86
178
|
className: "px-4 py-8 text-center text-sm text-muted-foreground",
|
|
87
179
|
"data-testid": "auth-config-loading",
|
|
88
180
|
children: t("Loading auth configuration…")
|
|
89
181
|
}, void 0, false);
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
182
|
+
$[7] = config;
|
|
183
|
+
$[8] = error;
|
|
184
|
+
$[9] = t;
|
|
185
|
+
$[10] = t4;
|
|
94
186
|
} else {
|
|
95
|
-
|
|
187
|
+
t4 = $[10];
|
|
96
188
|
}
|
|
97
|
-
let
|
|
98
|
-
if ($[
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
children:
|
|
104
|
-
|
|
105
|
-
|
|
189
|
+
let t5;
|
|
190
|
+
if ($[11] !== config || $[12] !== error || $[13] !== statusBadge || $[14] !== t) {
|
|
191
|
+
t5 = error === null && config !== void 0 && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
192
|
+
children: [/* @__PURE__ */ jsxDEV(ConfigCard, {
|
|
193
|
+
heading: t("Enabled capabilities"),
|
|
194
|
+
testId: "auth-config-capabilities",
|
|
195
|
+
children: /* @__PURE__ */ jsxDEV("ul", {
|
|
196
|
+
className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
197
|
+
children: CAPABILITY_ROWS.map((row) => {
|
|
198
|
+
const enabled = config.capabilities[row.key];
|
|
199
|
+
return /* @__PURE__ */ jsxDEV("li", {
|
|
200
|
+
className: "flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs",
|
|
201
|
+
"data-testid": `auth-config-cap-${row.key}`,
|
|
202
|
+
children: [/* @__PURE__ */ jsxDEV("span", {
|
|
203
|
+
className: "text-sm",
|
|
204
|
+
children: t(row.label)
|
|
205
|
+
}, void 0, false), statusBadge(enabled)]
|
|
206
|
+
}, row.key, true);
|
|
207
|
+
})
|
|
208
|
+
}, void 0, false)
|
|
209
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(ConfigCard, {
|
|
210
|
+
heading: t("Plugins"),
|
|
211
|
+
testId: "auth-config-plugins",
|
|
212
|
+
children: config.plugins.length === 0 ? /* @__PURE__ */ jsxDEV("p", {
|
|
213
|
+
className: "text-sm text-muted-foreground",
|
|
214
|
+
children: t("No plugins enabled.")
|
|
215
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV("div", {
|
|
216
|
+
className: "flex flex-wrap gap-2",
|
|
217
|
+
children: config.plugins.map(_temp)
|
|
218
|
+
}, void 0, false)
|
|
219
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(ConfigCard, {
|
|
220
|
+
heading: t("Sign-in methods"),
|
|
221
|
+
testId: "auth-config-signin",
|
|
222
|
+
children: /* @__PURE__ */ jsxDEV("div", {
|
|
223
|
+
className: "flex flex-col gap-2",
|
|
224
|
+
children: [/* @__PURE__ */ jsxDEV(KeyValue, {
|
|
225
|
+
label: t("Email & password"),
|
|
226
|
+
value: statusBadge(config.emailAndPassword)
|
|
227
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(KeyValue, {
|
|
228
|
+
label: t("Social providers"),
|
|
229
|
+
value: config.socialProviders.length === 0 ? t("None") : /* @__PURE__ */ jsxDEV("span", {
|
|
230
|
+
className: "flex flex-wrap justify-end gap-1",
|
|
231
|
+
children: config.socialProviders.map(_temp2)
|
|
232
|
+
}, void 0, false)
|
|
233
|
+
}, void 0, false)]
|
|
234
|
+
}, void 0, true)
|
|
235
|
+
}, void 0, false), config.organization.enabled && /* @__PURE__ */ jsxDEV(ConfigCard, {
|
|
236
|
+
heading: t("Organizations"),
|
|
237
|
+
testId: "auth-config-org",
|
|
238
|
+
children: /* @__PURE__ */ jsxDEV("div", {
|
|
239
|
+
className: "flex flex-col gap-2",
|
|
240
|
+
children: [/* @__PURE__ */ jsxDEV(KeyValue, {
|
|
241
|
+
label: t("Teams"),
|
|
242
|
+
value: statusBadge(config.organization.teams)
|
|
243
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(KeyValue, {
|
|
244
|
+
label: t("Custom roles"),
|
|
245
|
+
value: statusBadge(config.organization.roles)
|
|
246
|
+
}, void 0, false)]
|
|
247
|
+
}, void 0, true)
|
|
248
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(ConfigCard, {
|
|
249
|
+
heading: t("Session policy"),
|
|
250
|
+
testId: "auth-config-session",
|
|
251
|
+
children: /* @__PURE__ */ jsxDEV("div", {
|
|
252
|
+
className: "flex flex-col gap-2",
|
|
253
|
+
children: [/* @__PURE__ */ jsxDEV(KeyValue, {
|
|
254
|
+
label: t("Expires in"),
|
|
255
|
+
value: formatDuration(config.session.expiresIn)
|
|
256
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(KeyValue, {
|
|
257
|
+
label: t("Refresh after"),
|
|
258
|
+
value: formatDuration(config.session.updateAge)
|
|
259
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(KeyValue, {
|
|
260
|
+
label: t("Fresh window"),
|
|
261
|
+
value: formatDuration(config.session.freshAge)
|
|
262
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(KeyValue, {
|
|
263
|
+
label: t("Cookie cache"),
|
|
264
|
+
value: statusBadge(config.session.cookieCache === true)
|
|
265
|
+
}, void 0, false)]
|
|
266
|
+
}, void 0, true)
|
|
267
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(ConfigCard, {
|
|
268
|
+
heading: t("Rate limit"),
|
|
269
|
+
testId: "auth-config-ratelimit",
|
|
270
|
+
children: /* @__PURE__ */ jsxDEV("div", {
|
|
271
|
+
className: "flex flex-col gap-2",
|
|
272
|
+
children: [/* @__PURE__ */ jsxDEV(KeyValue, {
|
|
273
|
+
label: t("Status"),
|
|
274
|
+
value: statusBadge(config.rateLimit.enabled)
|
|
275
|
+
}, void 0, false), config.rateLimit.enabled && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
276
|
+
children: [/* @__PURE__ */ jsxDEV(KeyValue, {
|
|
277
|
+
label: t("Max requests"),
|
|
278
|
+
value: config.rateLimit.max ?? "—"
|
|
279
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(KeyValue, {
|
|
280
|
+
label: t("Window"),
|
|
281
|
+
value: formatDuration(config.rateLimit.window)
|
|
282
|
+
}, void 0, false)]
|
|
283
|
+
}, void 0, true)]
|
|
284
|
+
}, void 0, true)
|
|
285
|
+
}, void 0, false), config.userFields.length > 0 && /* @__PURE__ */ jsxDEV(ConfigCard, {
|
|
286
|
+
heading: t("Plugin user fields"),
|
|
287
|
+
testId: "auth-config-user-fields",
|
|
288
|
+
children: /* @__PURE__ */ jsxDEV("ul", {
|
|
289
|
+
className: "flex flex-col gap-2",
|
|
290
|
+
children: config.userFields.map((field) => /* @__PURE__ */ jsxDEV("li", {
|
|
106
291
|
className: "flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs",
|
|
107
|
-
"data-testid": `auth-config-
|
|
292
|
+
"data-testid": `auth-config-user-field-${field.name}`,
|
|
108
293
|
children: [/* @__PURE__ */ jsxDEV("span", {
|
|
109
|
-
className: "
|
|
110
|
-
children:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
294
|
+
className: "flex flex-col",
|
|
295
|
+
children: [/* @__PURE__ */ jsxDEV("span", {
|
|
296
|
+
className: "font-mono text-xs",
|
|
297
|
+
children: field.name
|
|
298
|
+
}, void 0, false), field.plugin !== void 0 && /* @__PURE__ */ jsxDEV("span", {
|
|
299
|
+
className: "text-[11px] text-muted-foreground",
|
|
300
|
+
children: field.plugin
|
|
301
|
+
}, void 0, false)]
|
|
302
|
+
}, void 0, true), /* @__PURE__ */ jsxDEV("span", {
|
|
303
|
+
className: "flex items-center gap-1",
|
|
304
|
+
children: [/* @__PURE__ */ jsxDEV(Badge, {
|
|
305
|
+
variant: "outline",
|
|
306
|
+
children: field.type
|
|
307
|
+
}, void 0, false), field.required && /* @__PURE__ */ jsxDEV(Badge, {
|
|
308
|
+
variant: "secondary",
|
|
309
|
+
children: t("required")
|
|
310
|
+
}, void 0, false), field.unique && /* @__PURE__ */ jsxDEV(Badge, {
|
|
311
|
+
variant: "secondary",
|
|
312
|
+
children: t("unique")
|
|
313
|
+
}, void 0, false)]
|
|
314
|
+
}, void 0, true)]
|
|
315
|
+
}, field.name, true))
|
|
316
|
+
}, void 0, false)
|
|
317
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(Card, {
|
|
318
|
+
className: "gap-0 py-0",
|
|
319
|
+
children: /* @__PURE__ */ jsxDEV("p", {
|
|
320
|
+
className: "px-4 py-3 text-xs text-muted-foreground",
|
|
321
|
+
"data-testid": "auth-config-note",
|
|
322
|
+
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.")
|
|
323
|
+
}, void 0, false)
|
|
324
|
+
}, void 0, false)]
|
|
131
325
|
}, void 0, true);
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
} else {
|
|
138
|
-
t7 = $[21];
|
|
139
|
-
}
|
|
140
|
-
let t8;
|
|
141
|
-
if ($[22] !== t) {
|
|
142
|
-
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.");
|
|
143
|
-
$[22] = t;
|
|
144
|
-
$[23] = t8;
|
|
326
|
+
$[11] = config;
|
|
327
|
+
$[12] = error;
|
|
328
|
+
$[13] = statusBadge;
|
|
329
|
+
$[14] = t;
|
|
330
|
+
$[15] = t5;
|
|
145
331
|
} else {
|
|
146
|
-
|
|
332
|
+
t5 = $[15];
|
|
147
333
|
}
|
|
148
|
-
let
|
|
149
|
-
if ($[
|
|
150
|
-
|
|
151
|
-
className: "gap-0 py-0",
|
|
152
|
-
children: /* @__PURE__ */ jsxDEV("p", {
|
|
153
|
-
className: "px-4 py-3 text-xs text-muted-foreground",
|
|
154
|
-
"data-testid": "auth-config-note",
|
|
155
|
-
children: t8
|
|
156
|
-
}, void 0, false)
|
|
157
|
-
}, void 0, false);
|
|
158
|
-
$[24] = t8;
|
|
159
|
-
$[25] = t9;
|
|
160
|
-
} else {
|
|
161
|
-
t9 = $[25];
|
|
162
|
-
}
|
|
163
|
-
let t10;
|
|
164
|
-
if ($[26] !== t7 || $[27] !== t9) {
|
|
165
|
-
t10 = /* @__PURE__ */ jsxDEV("div", {
|
|
334
|
+
let t6;
|
|
335
|
+
if ($[16] !== t3 || $[17] !== t4 || $[18] !== t5) {
|
|
336
|
+
t6 = /* @__PURE__ */ jsxDEV("div", {
|
|
166
337
|
className: "flex flex-col gap-4",
|
|
167
338
|
"data-testid": "auth-config",
|
|
168
|
-
children: [
|
|
339
|
+
children: [t3, t4, t5]
|
|
169
340
|
}, void 0, true);
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
341
|
+
$[16] = t3;
|
|
342
|
+
$[17] = t4;
|
|
343
|
+
$[18] = t5;
|
|
344
|
+
$[19] = t6;
|
|
173
345
|
} else {
|
|
174
|
-
|
|
346
|
+
t6 = $[19];
|
|
175
347
|
}
|
|
176
|
-
return
|
|
348
|
+
return t6;
|
|
177
349
|
};
|
|
350
|
+
function _temp(plugin) {
|
|
351
|
+
return /* @__PURE__ */ jsxDEV(Badge, {
|
|
352
|
+
"data-testid": `auth-config-plugin-${plugin}`,
|
|
353
|
+
variant: "outline",
|
|
354
|
+
children: plugin
|
|
355
|
+
}, plugin, false);
|
|
356
|
+
}
|
|
357
|
+
function _temp2(provider) {
|
|
358
|
+
return /* @__PURE__ */ jsxDEV(Badge, {
|
|
359
|
+
"data-testid": `auth-config-provider-${provider}`,
|
|
360
|
+
variant: "outline",
|
|
361
|
+
children: provider
|
|
362
|
+
}, provider, false);
|
|
363
|
+
}
|
|
178
364
|
|
|
179
365
|
export { AuthConfigPanel };
|
|
@@ -4,10 +4,10 @@ import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
|
4
4
|
import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
5
5
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
6
6
|
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
7
|
-
import { a as useClientQuery } from '../packem_shared/use-admin-query-
|
|
7
|
+
import { a as useClientQuery } from '../packem_shared/use-admin-query-CfHYWx5n.js';
|
|
8
8
|
import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
|
|
9
9
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
10
|
-
import { i as formatTimestamp, f as fireAndForget } from '../packem_shared/internal-
|
|
10
|
+
import { i as formatTimestamp, f as fireAndForget } from '../packem_shared/internal-CYcbqMjX.js';
|
|
11
11
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
12
12
|
|
|
13
13
|
const SESSION_LIMIT = 200;
|
|
@@ -5,7 +5,7 @@ import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
|
5
5
|
import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
6
6
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
7
7
|
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
8
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-
|
|
8
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-CfHYWx5n.js';
|
|
9
9
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
10
10
|
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js';
|
|
11
11
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useState, useCallback, useEffect } from 'react';
|
|
3
|
-
import { u as usePersistedList, S as SqlResultChart, n as newId } from '../packem_shared/browser-storage-
|
|
3
|
+
import { u as usePersistedList, S as SqlResultChart, n as newId } from '../packem_shared/browser-storage-BTrX4y3B.js';
|
|
4
4
|
import { A as Alert } from '../packem_shared/alert-CdAET2K_.js';
|
|
5
5
|
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
6
6
|
import { c as CardTitle, b as CardHeader, a as CardContent, C as Card } from '../packem_shared/card-DURq3ElK.js';
|
|
@@ -8,7 +8,7 @@ import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
|
8
8
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
9
9
|
import { useLunora } from '@lunora/react';
|
|
10
10
|
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js';
|
|
11
|
-
import { c as callOptions, e as errorMessage, f as fireAndForget, a as adminRef } from '../packem_shared/internal-
|
|
11
|
+
import { c as callOptions, e as errorMessage, f as fireAndForget, a as adminRef } from '../packem_shared/internal-CYcbqMjX.js';
|
|
12
12
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
13
13
|
|
|
14
14
|
const RUN_SQL = adminRef(ADMIN_FUNCTIONS.runSql);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { E as ErrorAlert } from '../packem_shared/error-alert-
|
|
3
|
+
import { E as ErrorAlert } from '../packem_shared/error-alert-CXjqyGw9.js';
|
|
4
4
|
import { ShardInput } from '../packem_shared/ShardInput-gx_DZXXn.js';
|
|
5
5
|
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
6
6
|
import { C as Card } from '../packem_shared/card-DURq3ElK.js';
|
|
7
7
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
8
8
|
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
9
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-
|
|
9
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-CfHYWx5n.js';
|
|
10
10
|
import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
|
|
11
11
|
import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
|
|
12
12
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useState, useMemo } from 'react';
|
|
2
|
-
import { E as ErrorAlert } from '../packem_shared/error-alert-
|
|
2
|
+
import { E as ErrorAlert } from '../packem_shared/error-alert-CXjqyGw9.js';
|
|
3
3
|
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
4
4
|
import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
5
5
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
6
6
|
import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
|
|
7
7
|
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
8
8
|
import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
|
|
9
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-
|
|
9
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-CfHYWx5n.js';
|
|
10
10
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
11
11
|
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js';
|
|
12
12
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
@@ -4,11 +4,11 @@ import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
|
4
4
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
5
5
|
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
6
6
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
7
|
-
import { f as fireAndForget, e as errorMessage, j as formatBytes, g as copyToClipboard } from '../packem_shared/internal-
|
|
7
|
+
import { f as fireAndForget, e as errorMessage, j as formatBytes, g as copyToClipboard } from '../packem_shared/internal-CYcbqMjX.js';
|
|
8
8
|
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
9
9
|
import { C as Checkbox } from '../packem_shared/checkbox-UNkzAxl-.js';
|
|
10
10
|
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
11
|
-
import { b as Sheet, c as SheetContent, d as SheetHeader, e as SheetTitle } from '../packem_shared/studio-
|
|
11
|
+
import { b as Sheet, c as SheetContent, d as SheetHeader, e as SheetTitle } from '../packem_shared/studio-Dh9UlaF_.js';
|
|
12
12
|
import { c } from 'react/compiler-runtime';
|
|
13
13
|
import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
|
|
14
14
|
import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
|
|
@@ -5,7 +5,7 @@ import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
|
5
5
|
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
6
6
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
7
7
|
import { a as CLOUDFLARE_OBSERVABILITY_URL } from '../packem_shared/cf-links-BZfRdxSE.js';
|
|
8
|
-
import { f as fireAndForget, e as errorMessage, g as copyToClipboard } from '../packem_shared/internal-
|
|
8
|
+
import { f as fireAndForget, e as errorMessage, g as copyToClipboard } from '../packem_shared/internal-CYcbqMjX.js';
|
|
9
9
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
10
10
|
|
|
11
11
|
const DestinationRow = (t0) => {
|