@lunora/studio 0.0.0 → 1.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +105 -0
- package/README.md +123 -9
- package/__assets__/package-og.svg +14 -0
- package/dist/index.d.ts +1403 -0
- package/dist/index.js +41 -0
- package/dist/mount.d.ts +21 -0
- package/dist/mount.js +26 -0
- package/dist/packem_shared/ADMIN_FUNCTIONS-DjXgvJb6.js +46 -0
- package/dist/packem_shared/ApiDocsPanel-yVSGHK3H.js +842 -0
- package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +229 -0
- package/dist/packem_shared/ApiTab-rwttyQ1-.js +251 -0
- package/dist/packem_shared/AuditPanel-D9Eh7j7E.js +200 -0
- package/dist/packem_shared/CommandPalette-BtgkBzZI.js +373 -0
- package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +59 -0
- package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +111 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +50 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +89 -0
- package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +27 -0
- package/dist/packem_shared/DataBrowser-CyckZRwj.js +4480 -0
- package/dist/packem_shared/DataFilters-FNquMaiu.js +249 -0
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +66 -0
- package/dist/packem_shared/ExportImportPanel-BGJqFK9X.js +197 -0
- package/dist/packem_shared/FileBrowser-0pCpdKPE.js +2932 -0
- package/dist/packem_shared/FunctionRunner-7NH3KcTg.js +343 -0
- package/dist/packem_shared/FunctionStatsPanel-CXynSuqT.js +375 -0
- package/dist/packem_shared/GlobalDataBrowser-DAxzB-Br.js +289 -0
- package/dist/packem_shared/HealthPanel-CyLs7qZm.js +648 -0
- package/dist/packem_shared/HomePanel-BOkFRbuj.js +1334 -0
- package/dist/packem_shared/InsightsPanel-CvXMoZuv.js +461 -0
- package/dist/packem_shared/LogsPanel-BrUstOk6.js +827 -0
- package/dist/packem_shared/MailPanel-GnnrNqL6.js +440 -0
- package/dist/packem_shared/MetricsPanel-BN_uUU-_.js +1611 -0
- package/dist/packem_shared/MigrationsPanel-DaZuUHje.js +239 -0
- package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +191 -0
- package/dist/packem_shared/PitrPanel-LJGNP_IX.js +252 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +3 -0
- package/dist/packem_shared/ScheduledJobs-UmVaMbJy.js +262 -0
- package/dist/packem_shared/SchemaViewer-Bam6ylvw.js +2512 -0
- package/dist/packem_shared/SecurityAdvisorPanel-DTmjUNqt.js +92 -0
- package/dist/packem_shared/SettingsPanel-C2wDK-8F.js +390 -0
- package/dist/packem_shared/ShardInput-gx_DZXXn.js +107 -0
- package/dist/packem_shared/SqlEditorPanel-D5wMIxcg.js +13 -0
- package/dist/packem_shared/Studio-DpgYe4qt.js +33 -0
- package/dist/packem_shared/StudioApp-C7aaizqc.js +657 -0
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +48 -0
- package/dist/packem_shared/TableEditor-DzK3Z6rL.js +371 -0
- package/dist/packem_shared/advisor-view-CGcfMiPq.js +159 -0
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +108 -0
- package/dist/packem_shared/app.d-Nbhpihxv.d.ts +300 -0
- package/dist/packem_shared/badge-B2PKA1-5.js +49 -0
- package/dist/packem_shared/bar-chart-CzJAgqkp.js +3245 -0
- package/dist/packem_shared/button-BhsN2uZH.js +49 -0
- package/dist/packem_shared/card-DURq3ElK.js +175 -0
- package/dist/packem_shared/cf-links-2cktDedA.js +8 -0
- package/dist/packem_shared/checkbox-UNkzAxl-.js +63 -0
- package/dist/packem_shared/data-grid-B5CaV3wS.js +183 -0
- package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +280 -0
- package/dist/packem_shared/empty-state-DY_oe0k6.js +98 -0
- package/dist/packem_shared/grid-features-CzUfqgsM.js +840 -0
- package/dist/packem_shared/input-XH4r1Pt1.js +53 -0
- package/dist/packem_shared/internal-rXJEAhXS.js +68 -0
- package/dist/packem_shared/label-D8ykjn5J.js +46 -0
- package/dist/packem_shared/live-status-FZ0psC1z.js +44 -0
- package/dist/packem_shared/reference-view-B4E49Lip.js +2180 -0
- package/dist/packem_shared/shard-history-DyebH1R5.js +38 -0
- package/dist/packem_shared/sparkline-10dG-_f0.js +93 -0
- package/dist/packem_shared/sql-editor-panel-Smfl_FDF.js +2562 -0
- package/dist/packem_shared/storage-tier-CL98eOvn.js +85 -0
- package/dist/packem_shared/studio-9Mq0PdMi.js +10831 -0
- package/dist/packem_shared/table-_RzNvy3R.js +246 -0
- package/dist/packem_shared/table-list-sidebar-Bg7uzbvC.js +832 -0
- package/dist/packem_shared/textarea-D3gaCU_-.js +46 -0
- package/dist/packem_shared/use-admin-query-4JQW2rr1.js +88 -0
- package/dist/packem_shared/useDebounced-Dxncpg6z.js +32 -0
- package/dist/packem_shared/utils-B05Dmz_H.js +8 -0
- package/dist/packem_shared/virtual-rect-CVMUskSm.js +10 -0
- package/dist/standalone/studio.js +378 -0
- package/dist/styles.css +2 -0
- package/package.json +78 -17
- package/src/theme.css +59 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { u as useAdminQuery } from './use-admin-query-4JQW2rr1.js';
|
|
3
|
+
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
4
|
+
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-DjXgvJb6.js';
|
|
5
|
+
import { A as AdvisorView } from './advisor-view-CGcfMiPq.js';
|
|
6
|
+
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
7
|
+
|
|
8
|
+
const findingTitle = (t, finding) => ({
|
|
9
|
+
"admin-token-weak": t("Weak admin token"),
|
|
10
|
+
"auth-secret-weak": t("Weak auth secret"),
|
|
11
|
+
"cookies-insecure": t("Session cookies are not Secure"),
|
|
12
|
+
"cors-wildcard-credentials": t("Wildcard CORS with credentials"),
|
|
13
|
+
"csrf-disabled": t("CSRF/origin guard is off"),
|
|
14
|
+
"dev-args-unredacted": t("Request log keeps un-redacted args"),
|
|
15
|
+
"security-headers-disabled": t("Security headers are off"),
|
|
16
|
+
"ws-gate-open": t("Live admin subscriptions are ungated")
|
|
17
|
+
})[finding.kind];
|
|
18
|
+
const toFindings = (result) => Array.isArray(result.findings) ? result.findings : [];
|
|
19
|
+
const findingEntity = (finding) => ({
|
|
20
|
+
"admin-token-weak": "LUNORA_ADMIN_TOKEN",
|
|
21
|
+
"auth-secret-weak": "AUTH_SECRET",
|
|
22
|
+
"cookies-insecure": "BETTER_AUTH_URL",
|
|
23
|
+
"cors-wildcard-credentials": "LUNORA_ALLOWED_ORIGINS",
|
|
24
|
+
"csrf-disabled": "LUNORA_SECURITY_CSRF",
|
|
25
|
+
"dev-args-unredacted": "request log",
|
|
26
|
+
"security-headers-disabled": "LUNORA_SECURITY_HEADERS",
|
|
27
|
+
"ws-gate-open": "LUNORA_WS_BEARER"
|
|
28
|
+
})[finding.kind];
|
|
29
|
+
const findingDetail = (t, finding) => ({
|
|
30
|
+
"admin-token-weak": t("Your admin token is {length} characters — use at least {min} for a brute-force-resistant secret.", {
|
|
31
|
+
length: finding.detail?.["length"],
|
|
32
|
+
min: finding.detail?.["min"]
|
|
33
|
+
}),
|
|
34
|
+
"auth-secret-weak": t("Your auth secret is {length} characters — use at least {min} (e.g. `openssl rand -hex 32`) to sign sessions safely.", {
|
|
35
|
+
length: finding.detail?.["length"],
|
|
36
|
+
min: finding.detail?.["min"]
|
|
37
|
+
}),
|
|
38
|
+
"cookies-insecure": t("BETTER_AUTH_URL is a plaintext http:// origin, so session cookies cannot be Secure and ride in cleartext. Serve auth over https:// in production."),
|
|
39
|
+
"cors-wildcard-credentials": t("LUNORA_ALLOWED_ORIGINS includes a wildcard while credentials are allowed — browsers reject this and it defeats the allowlist. Name explicit origins instead of *."),
|
|
40
|
+
"csrf-disabled": t("LUNORA_SECURITY_CSRF is off, so cross-origin state-changing cookie requests are not blocked. Re-enable it in production to keep mutations un-forgeable."),
|
|
41
|
+
"dev-args-unredacted": t("This worker reports a development environment, so the request log stores raw args and identity. Confirm it isn't a mislabeled production deploy."),
|
|
42
|
+
"security-headers-disabled": t("LUNORA_SECURITY_HEADERS is off, so HSTS, CSP, nosniff, and frame-options are not applied. Re-enable the baseline headers in production."),
|
|
43
|
+
"ws-gate-open": t("LUNORA_WS_BEARER is unset, so the WebSocket upgrade gate is open: live admin subscriptions need no credential. Set it to gate them like the HTTP admin RPCs.")
|
|
44
|
+
})[finding.kind];
|
|
45
|
+
const SecurityAdvisorPanel = () => {
|
|
46
|
+
const $ = c(7);
|
|
47
|
+
const t = useT();
|
|
48
|
+
let t0;
|
|
49
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
50
|
+
t0 = {};
|
|
51
|
+
$[0] = t0;
|
|
52
|
+
} else {
|
|
53
|
+
t0 = $[0];
|
|
54
|
+
}
|
|
55
|
+
const {
|
|
56
|
+
data,
|
|
57
|
+
error
|
|
58
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.getSecurityAudit, t0);
|
|
59
|
+
let t1;
|
|
60
|
+
if ($[1] !== data || $[2] !== t) {
|
|
61
|
+
const findings = data === void 0 ? null : toFindings(data);
|
|
62
|
+
t1 = findings === null ? null : findings.map((finding) => ({
|
|
63
|
+
description: findingDetail(t, finding),
|
|
64
|
+
entity: findingEntity(finding),
|
|
65
|
+
issueType: findingTitle(t, finding),
|
|
66
|
+
key: finding.kind,
|
|
67
|
+
level: finding.level
|
|
68
|
+
}));
|
|
69
|
+
$[1] = data;
|
|
70
|
+
$[2] = t;
|
|
71
|
+
$[3] = t1;
|
|
72
|
+
} else {
|
|
73
|
+
t1 = $[3];
|
|
74
|
+
}
|
|
75
|
+
const rows = t1;
|
|
76
|
+
let t2;
|
|
77
|
+
if ($[4] !== error || $[5] !== rows) {
|
|
78
|
+
t2 = /* @__PURE__ */ jsxDEV(AdvisorView, {
|
|
79
|
+
error,
|
|
80
|
+
rows,
|
|
81
|
+
testId: "lunora-security-advisor"
|
|
82
|
+
}, void 0, false);
|
|
83
|
+
$[4] = error;
|
|
84
|
+
$[5] = rows;
|
|
85
|
+
$[6] = t2;
|
|
86
|
+
} else {
|
|
87
|
+
t2 = $[6];
|
|
88
|
+
}
|
|
89
|
+
return t2;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export { SecurityAdvisorPanel as default };
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { B as Badge } from './badge-B2PKA1-5.js';
|
|
4
|
+
import { C as Card, a as CardContent } from './card-DURq3ElK.js';
|
|
5
|
+
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-_RzNvy3R.js';
|
|
6
|
+
import { u as useAdminQuery } from './use-admin-query-4JQW2rr1.js';
|
|
7
|
+
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
8
|
+
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-DjXgvJb6.js';
|
|
9
|
+
import { a as CLOUDFLARE_WORKERS_URL } from './cf-links-2cktDedA.js';
|
|
10
|
+
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
11
|
+
|
|
12
|
+
const KIND_VARIANT = {
|
|
13
|
+
binding: "outline",
|
|
14
|
+
secret: "destructive",
|
|
15
|
+
var: "secondary"
|
|
16
|
+
};
|
|
17
|
+
const SettingsPanel = (t0) => {
|
|
18
|
+
const $ = c(67);
|
|
19
|
+
const {
|
|
20
|
+
initialShardKey
|
|
21
|
+
} = t0;
|
|
22
|
+
const t = useT();
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
25
|
+
t1 = {};
|
|
26
|
+
$[0] = t1;
|
|
27
|
+
} else {
|
|
28
|
+
t1 = $[0];
|
|
29
|
+
}
|
|
30
|
+
const t2 = initialShardKey ?? "";
|
|
31
|
+
let t3;
|
|
32
|
+
if ($[1] !== t2) {
|
|
33
|
+
t3 = {
|
|
34
|
+
shardKey: t2
|
|
35
|
+
};
|
|
36
|
+
$[1] = t2;
|
|
37
|
+
$[2] = t3;
|
|
38
|
+
} else {
|
|
39
|
+
t3 = $[2];
|
|
40
|
+
}
|
|
41
|
+
const {
|
|
42
|
+
data: result,
|
|
43
|
+
error,
|
|
44
|
+
isLoading: loading
|
|
45
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.getSettings, t1, t3);
|
|
46
|
+
let t4;
|
|
47
|
+
bb0: {
|
|
48
|
+
const deploy = result?.deploy;
|
|
49
|
+
if (deploy === void 0) {
|
|
50
|
+
let t52;
|
|
51
|
+
if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
52
|
+
t52 = [];
|
|
53
|
+
$[3] = t52;
|
|
54
|
+
} else {
|
|
55
|
+
t52 = $[3];
|
|
56
|
+
}
|
|
57
|
+
t4 = t52;
|
|
58
|
+
break bb0;
|
|
59
|
+
}
|
|
60
|
+
let rows;
|
|
61
|
+
if ($[4] !== deploy.deploymentId || $[5] !== deploy.environment || $[6] !== deploy.versionTag || $[7] !== deploy.workerUrl || $[8] !== t) {
|
|
62
|
+
rows = [];
|
|
63
|
+
if (deploy.workerUrl !== void 0) {
|
|
64
|
+
let t52;
|
|
65
|
+
if ($[10] !== t) {
|
|
66
|
+
t52 = t("URL");
|
|
67
|
+
$[10] = t;
|
|
68
|
+
$[11] = t52;
|
|
69
|
+
} else {
|
|
70
|
+
t52 = $[11];
|
|
71
|
+
}
|
|
72
|
+
let t62;
|
|
73
|
+
if ($[12] !== deploy.workerUrl || $[13] !== t52) {
|
|
74
|
+
t62 = {
|
|
75
|
+
label: t52,
|
|
76
|
+
value: deploy.workerUrl
|
|
77
|
+
};
|
|
78
|
+
$[12] = deploy.workerUrl;
|
|
79
|
+
$[13] = t52;
|
|
80
|
+
$[14] = t62;
|
|
81
|
+
} else {
|
|
82
|
+
t62 = $[14];
|
|
83
|
+
}
|
|
84
|
+
rows.push(t62);
|
|
85
|
+
}
|
|
86
|
+
if (deploy.environment !== void 0) {
|
|
87
|
+
let t52;
|
|
88
|
+
if ($[15] !== t) {
|
|
89
|
+
t52 = t("Environment");
|
|
90
|
+
$[15] = t;
|
|
91
|
+
$[16] = t52;
|
|
92
|
+
} else {
|
|
93
|
+
t52 = $[16];
|
|
94
|
+
}
|
|
95
|
+
let t62;
|
|
96
|
+
if ($[17] !== deploy.environment || $[18] !== t52) {
|
|
97
|
+
t62 = {
|
|
98
|
+
label: t52,
|
|
99
|
+
value: deploy.environment
|
|
100
|
+
};
|
|
101
|
+
$[17] = deploy.environment;
|
|
102
|
+
$[18] = t52;
|
|
103
|
+
$[19] = t62;
|
|
104
|
+
} else {
|
|
105
|
+
t62 = $[19];
|
|
106
|
+
}
|
|
107
|
+
rows.push(t62);
|
|
108
|
+
}
|
|
109
|
+
if (deploy.deploymentId !== void 0) {
|
|
110
|
+
let t52;
|
|
111
|
+
if ($[20] !== t) {
|
|
112
|
+
t52 = t("Deployment");
|
|
113
|
+
$[20] = t;
|
|
114
|
+
$[21] = t52;
|
|
115
|
+
} else {
|
|
116
|
+
t52 = $[21];
|
|
117
|
+
}
|
|
118
|
+
let t62;
|
|
119
|
+
if ($[22] !== deploy.deploymentId || $[23] !== t52) {
|
|
120
|
+
t62 = {
|
|
121
|
+
label: t52,
|
|
122
|
+
value: deploy.deploymentId
|
|
123
|
+
};
|
|
124
|
+
$[22] = deploy.deploymentId;
|
|
125
|
+
$[23] = t52;
|
|
126
|
+
$[24] = t62;
|
|
127
|
+
} else {
|
|
128
|
+
t62 = $[24];
|
|
129
|
+
}
|
|
130
|
+
rows.push(t62);
|
|
131
|
+
}
|
|
132
|
+
if (deploy.versionTag !== void 0) {
|
|
133
|
+
let t52;
|
|
134
|
+
if ($[25] !== t) {
|
|
135
|
+
t52 = t("Version");
|
|
136
|
+
$[25] = t;
|
|
137
|
+
$[26] = t52;
|
|
138
|
+
} else {
|
|
139
|
+
t52 = $[26];
|
|
140
|
+
}
|
|
141
|
+
let t62;
|
|
142
|
+
if ($[27] !== deploy.versionTag || $[28] !== t52) {
|
|
143
|
+
t62 = {
|
|
144
|
+
label: t52,
|
|
145
|
+
value: deploy.versionTag
|
|
146
|
+
};
|
|
147
|
+
$[27] = deploy.versionTag;
|
|
148
|
+
$[28] = t52;
|
|
149
|
+
$[29] = t62;
|
|
150
|
+
} else {
|
|
151
|
+
t62 = $[29];
|
|
152
|
+
}
|
|
153
|
+
rows.push(t62);
|
|
154
|
+
}
|
|
155
|
+
$[4] = deploy.deploymentId;
|
|
156
|
+
$[5] = deploy.environment;
|
|
157
|
+
$[6] = deploy.versionTag;
|
|
158
|
+
$[7] = deploy.workerUrl;
|
|
159
|
+
$[8] = t;
|
|
160
|
+
$[9] = rows;
|
|
161
|
+
} else {
|
|
162
|
+
rows = $[9];
|
|
163
|
+
}
|
|
164
|
+
t4 = rows;
|
|
165
|
+
}
|
|
166
|
+
const deployRows = t4;
|
|
167
|
+
let t5;
|
|
168
|
+
if ($[30] !== result?.settings) {
|
|
169
|
+
t5 = result?.settings ?? [];
|
|
170
|
+
$[30] = result?.settings;
|
|
171
|
+
$[31] = t5;
|
|
172
|
+
} else {
|
|
173
|
+
t5 = $[31];
|
|
174
|
+
}
|
|
175
|
+
const settings = t5;
|
|
176
|
+
let t6;
|
|
177
|
+
if ($[32] !== t) {
|
|
178
|
+
t6 = t("Open in Cloudflare");
|
|
179
|
+
$[32] = t;
|
|
180
|
+
$[33] = t6;
|
|
181
|
+
} else {
|
|
182
|
+
t6 = $[33];
|
|
183
|
+
}
|
|
184
|
+
let t7;
|
|
185
|
+
if ($[34] !== t6) {
|
|
186
|
+
t7 = /* @__PURE__ */ jsxDEV("div", {
|
|
187
|
+
className: "flex flex-wrap items-center gap-3",
|
|
188
|
+
children: /* @__PURE__ */ jsxDEV("a", {
|
|
189
|
+
className: "text-sm text-primary underline-offset-4 hover:underline",
|
|
190
|
+
"data-testid": "set-cf-link",
|
|
191
|
+
href: CLOUDFLARE_WORKERS_URL,
|
|
192
|
+
rel: "noreferrer",
|
|
193
|
+
target: "_blank",
|
|
194
|
+
children: t6
|
|
195
|
+
}, void 0, false)
|
|
196
|
+
}, void 0, false);
|
|
197
|
+
$[34] = t6;
|
|
198
|
+
$[35] = t7;
|
|
199
|
+
} else {
|
|
200
|
+
t7 = $[35];
|
|
201
|
+
}
|
|
202
|
+
let t8;
|
|
203
|
+
if ($[36] !== t) {
|
|
204
|
+
t8 = t("View-only — values are masked. Edit vars, secrets, and bindings in wrangler or the Cloudflare dashboard.");
|
|
205
|
+
$[36] = t;
|
|
206
|
+
$[37] = t8;
|
|
207
|
+
} else {
|
|
208
|
+
t8 = $[37];
|
|
209
|
+
}
|
|
210
|
+
let t9;
|
|
211
|
+
if ($[38] !== t8) {
|
|
212
|
+
t9 = /* @__PURE__ */ jsxDEV("p", {
|
|
213
|
+
className: "text-sm text-muted-foreground",
|
|
214
|
+
"data-testid": "set-readonly-note",
|
|
215
|
+
children: t8
|
|
216
|
+
}, void 0, false);
|
|
217
|
+
$[38] = t8;
|
|
218
|
+
$[39] = t9;
|
|
219
|
+
} else {
|
|
220
|
+
t9 = $[39];
|
|
221
|
+
}
|
|
222
|
+
let t10;
|
|
223
|
+
if ($[40] !== error) {
|
|
224
|
+
t10 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
225
|
+
className: "text-sm text-destructive",
|
|
226
|
+
"data-testid": "set-error",
|
|
227
|
+
role: "alert",
|
|
228
|
+
children: error
|
|
229
|
+
}, void 0, false);
|
|
230
|
+
$[40] = error;
|
|
231
|
+
$[41] = t10;
|
|
232
|
+
} else {
|
|
233
|
+
t10 = $[41];
|
|
234
|
+
}
|
|
235
|
+
let t11;
|
|
236
|
+
if ($[42] !== deployRows || $[43] !== t) {
|
|
237
|
+
t11 = deployRows.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
|
|
238
|
+
className: "py-0",
|
|
239
|
+
"data-testid": "set-deploy",
|
|
240
|
+
children: [/* @__PURE__ */ jsxDEV("header", {
|
|
241
|
+
className: "border-b border-border px-4 py-3",
|
|
242
|
+
children: /* @__PURE__ */ jsxDEV("span", {
|
|
243
|
+
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
244
|
+
children: t("Deployment")
|
|
245
|
+
}, void 0, false)
|
|
246
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(CardContent, {
|
|
247
|
+
className: "py-3",
|
|
248
|
+
children: /* @__PURE__ */ jsxDEV("dl", {
|
|
249
|
+
className: "grid grid-cols-[8rem_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm",
|
|
250
|
+
children: deployRows.map(_temp)
|
|
251
|
+
}, void 0, false)
|
|
252
|
+
}, void 0, false)]
|
|
253
|
+
}, void 0, true);
|
|
254
|
+
$[42] = deployRows;
|
|
255
|
+
$[43] = t;
|
|
256
|
+
$[44] = t11;
|
|
257
|
+
} else {
|
|
258
|
+
t11 = $[44];
|
|
259
|
+
}
|
|
260
|
+
let t12;
|
|
261
|
+
if ($[45] !== t) {
|
|
262
|
+
t12 = t("Environment & bindings");
|
|
263
|
+
$[45] = t;
|
|
264
|
+
$[46] = t12;
|
|
265
|
+
} else {
|
|
266
|
+
t12 = $[46];
|
|
267
|
+
}
|
|
268
|
+
let t13;
|
|
269
|
+
if ($[47] !== t12) {
|
|
270
|
+
t13 = /* @__PURE__ */ jsxDEV("header", {
|
|
271
|
+
className: "border-b border-border px-4 py-3",
|
|
272
|
+
children: /* @__PURE__ */ jsxDEV("span", {
|
|
273
|
+
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
274
|
+
children: t12
|
|
275
|
+
}, void 0, false)
|
|
276
|
+
}, void 0, false);
|
|
277
|
+
$[47] = t12;
|
|
278
|
+
$[48] = t13;
|
|
279
|
+
} else {
|
|
280
|
+
t13 = $[48];
|
|
281
|
+
}
|
|
282
|
+
let t14;
|
|
283
|
+
if ($[49] !== error || $[50] !== loading || $[51] !== settings.length || $[52] !== t) {
|
|
284
|
+
t14 = error === null && !loading && settings.length === 0 && /* @__PURE__ */ jsxDEV("p", {
|
|
285
|
+
className: "px-4 py-8 text-center text-sm text-muted-foreground",
|
|
286
|
+
"data-testid": "set-empty",
|
|
287
|
+
children: t("No environment variables or bindings.")
|
|
288
|
+
}, void 0, false);
|
|
289
|
+
$[49] = error;
|
|
290
|
+
$[50] = loading;
|
|
291
|
+
$[51] = settings.length;
|
|
292
|
+
$[52] = t;
|
|
293
|
+
$[53] = t14;
|
|
294
|
+
} else {
|
|
295
|
+
t14 = $[53];
|
|
296
|
+
}
|
|
297
|
+
let t15;
|
|
298
|
+
if ($[54] !== settings || $[55] !== t) {
|
|
299
|
+
t15 = settings.length > 0 && /* @__PURE__ */ jsxDEV(CardContent, {
|
|
300
|
+
className: "px-0 py-0",
|
|
301
|
+
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
302
|
+
"data-testid": "set-table",
|
|
303
|
+
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
304
|
+
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
305
|
+
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
306
|
+
children: t("name")
|
|
307
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
308
|
+
children: t("kind")
|
|
309
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
310
|
+
children: t("value")
|
|
311
|
+
}, void 0, false)]
|
|
312
|
+
}, void 0, true)
|
|
313
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
314
|
+
children: settings.map(_temp2)
|
|
315
|
+
}, void 0, false)]
|
|
316
|
+
}, void 0, true)
|
|
317
|
+
}, void 0, false);
|
|
318
|
+
$[54] = settings;
|
|
319
|
+
$[55] = t;
|
|
320
|
+
$[56] = t15;
|
|
321
|
+
} else {
|
|
322
|
+
t15 = $[56];
|
|
323
|
+
}
|
|
324
|
+
let t16;
|
|
325
|
+
if ($[57] !== t13 || $[58] !== t14 || $[59] !== t15) {
|
|
326
|
+
t16 = /* @__PURE__ */ jsxDEV(Card, {
|
|
327
|
+
className: "py-0",
|
|
328
|
+
children: [t13, t14, t15]
|
|
329
|
+
}, void 0, true);
|
|
330
|
+
$[57] = t13;
|
|
331
|
+
$[58] = t14;
|
|
332
|
+
$[59] = t15;
|
|
333
|
+
$[60] = t16;
|
|
334
|
+
} else {
|
|
335
|
+
t16 = $[60];
|
|
336
|
+
}
|
|
337
|
+
let t17;
|
|
338
|
+
if ($[61] !== t10 || $[62] !== t11 || $[63] !== t16 || $[64] !== t7 || $[65] !== t9) {
|
|
339
|
+
t17 = /* @__PURE__ */ jsxDEV("div", {
|
|
340
|
+
className: "flex flex-col gap-4",
|
|
341
|
+
"data-testid": "lunora-settings",
|
|
342
|
+
children: [t7, t9, t10, t11, t16]
|
|
343
|
+
}, void 0, true);
|
|
344
|
+
$[61] = t10;
|
|
345
|
+
$[62] = t11;
|
|
346
|
+
$[63] = t16;
|
|
347
|
+
$[64] = t7;
|
|
348
|
+
$[65] = t9;
|
|
349
|
+
$[66] = t17;
|
|
350
|
+
} else {
|
|
351
|
+
t17 = $[66];
|
|
352
|
+
}
|
|
353
|
+
return t17;
|
|
354
|
+
};
|
|
355
|
+
function _temp(row) {
|
|
356
|
+
return /* @__PURE__ */ jsxDEV("div", {
|
|
357
|
+
className: "contents",
|
|
358
|
+
"data-testid": "set-deploy-row",
|
|
359
|
+
children: [/* @__PURE__ */ jsxDEV("dt", {
|
|
360
|
+
className: "text-muted-foreground",
|
|
361
|
+
children: row.label
|
|
362
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV("dd", {
|
|
363
|
+
className: "truncate font-mono text-xs",
|
|
364
|
+
title: row.value,
|
|
365
|
+
children: row.value
|
|
366
|
+
}, void 0, false)]
|
|
367
|
+
}, row.label, true);
|
|
368
|
+
}
|
|
369
|
+
function _temp2(entry) {
|
|
370
|
+
return /* @__PURE__ */ jsxDEV(TableRow, {
|
|
371
|
+
"data-testid": "set-row",
|
|
372
|
+
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
373
|
+
className: "font-mono text-xs font-medium",
|
|
374
|
+
children: entry.name
|
|
375
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
376
|
+
children: /* @__PURE__ */ jsxDEV(Badge, {
|
|
377
|
+
variant: KIND_VARIANT[entry.kind],
|
|
378
|
+
children: entry.bindingType ?? entry.kind
|
|
379
|
+
}, void 0, false)
|
|
380
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
381
|
+
className: "max-w-[28ch] truncate font-mono text-xs text-muted-foreground",
|
|
382
|
+
children: entry.value ?? /* @__PURE__ */ jsxDEV("span", {
|
|
383
|
+
className: "text-muted-foreground",
|
|
384
|
+
children: "—"
|
|
385
|
+
}, void 0, false)
|
|
386
|
+
}, void 0, false)]
|
|
387
|
+
}, entry.name, true);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export { SettingsPanel };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { useId, useState } from 'react';
|
|
3
|
+
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
4
|
+
import { l as loadRecentShards } from './shard-history-DyebH1R5.js';
|
|
5
|
+
import { I as Input } from './input-XH4r1Pt1.js';
|
|
6
|
+
import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
|
|
7
|
+
|
|
8
|
+
const ShardInput = (t0) => {
|
|
9
|
+
const $ = c(21);
|
|
10
|
+
const {
|
|
11
|
+
id,
|
|
12
|
+
onChange,
|
|
13
|
+
testId,
|
|
14
|
+
value
|
|
15
|
+
} = t0;
|
|
16
|
+
const t = useT();
|
|
17
|
+
const listId = useId();
|
|
18
|
+
const [recents] = useState(_temp);
|
|
19
|
+
let t1;
|
|
20
|
+
if ($[0] !== onChange) {
|
|
21
|
+
t1 = (event) => {
|
|
22
|
+
onChange(event.target.value);
|
|
23
|
+
};
|
|
24
|
+
$[0] = onChange;
|
|
25
|
+
$[1] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
t1 = $[1];
|
|
28
|
+
}
|
|
29
|
+
const onInputChange = t1;
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[2] !== t) {
|
|
32
|
+
t2 = t("Shard key");
|
|
33
|
+
$[2] = t;
|
|
34
|
+
$[3] = t2;
|
|
35
|
+
} else {
|
|
36
|
+
t2 = $[3];
|
|
37
|
+
}
|
|
38
|
+
const t3 = recents.length > 0 ? listId : void 0;
|
|
39
|
+
let t4;
|
|
40
|
+
if ($[4] !== t) {
|
|
41
|
+
t4 = t("shard key (optional)");
|
|
42
|
+
$[4] = t;
|
|
43
|
+
$[5] = t4;
|
|
44
|
+
} else {
|
|
45
|
+
t4 = $[5];
|
|
46
|
+
}
|
|
47
|
+
let t5;
|
|
48
|
+
if ($[6] !== id || $[7] !== onInputChange || $[8] !== t2 || $[9] !== t3 || $[10] !== t4 || $[11] !== testId || $[12] !== value) {
|
|
49
|
+
t5 = /* @__PURE__ */ jsxDEV(Input, {
|
|
50
|
+
"aria-label": t2,
|
|
51
|
+
className: "h-8 w-48",
|
|
52
|
+
"data-testid": testId,
|
|
53
|
+
id,
|
|
54
|
+
list: t3,
|
|
55
|
+
onChange: onInputChange,
|
|
56
|
+
placeholder: t4,
|
|
57
|
+
value
|
|
58
|
+
}, void 0, false);
|
|
59
|
+
$[6] = id;
|
|
60
|
+
$[7] = onInputChange;
|
|
61
|
+
$[8] = t2;
|
|
62
|
+
$[9] = t3;
|
|
63
|
+
$[10] = t4;
|
|
64
|
+
$[11] = testId;
|
|
65
|
+
$[12] = value;
|
|
66
|
+
$[13] = t5;
|
|
67
|
+
} else {
|
|
68
|
+
t5 = $[13];
|
|
69
|
+
}
|
|
70
|
+
let t6;
|
|
71
|
+
if ($[14] !== listId || $[15] !== recents || $[16] !== testId) {
|
|
72
|
+
t6 = recents.length > 0 && /* @__PURE__ */ jsxDEV("datalist", {
|
|
73
|
+
"data-testid": `${testId}-recents`,
|
|
74
|
+
id: listId,
|
|
75
|
+
children: recents.map(_temp2)
|
|
76
|
+
}, void 0, false);
|
|
77
|
+
$[14] = listId;
|
|
78
|
+
$[15] = recents;
|
|
79
|
+
$[16] = testId;
|
|
80
|
+
$[17] = t6;
|
|
81
|
+
} else {
|
|
82
|
+
t6 = $[17];
|
|
83
|
+
}
|
|
84
|
+
let t7;
|
|
85
|
+
if ($[18] !== t5 || $[19] !== t6) {
|
|
86
|
+
t7 = /* @__PURE__ */ jsxDEV(Fragment, {
|
|
87
|
+
children: [t5, t6]
|
|
88
|
+
}, void 0, true);
|
|
89
|
+
$[18] = t5;
|
|
90
|
+
$[19] = t6;
|
|
91
|
+
$[20] = t7;
|
|
92
|
+
} else {
|
|
93
|
+
t7 = $[20];
|
|
94
|
+
}
|
|
95
|
+
return t7;
|
|
96
|
+
};
|
|
97
|
+
function _temp() {
|
|
98
|
+
return loadRecentShards();
|
|
99
|
+
}
|
|
100
|
+
function _temp2(shard) {
|
|
101
|
+
return /* @__PURE__ */ jsxDEV("option", {
|
|
102
|
+
"aria-label": shard,
|
|
103
|
+
value: shard
|
|
104
|
+
}, shard, false);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { ShardInput };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import 'react/compiler-runtime';
|
|
2
|
+
import '@lunora/react';
|
|
3
|
+
import 'react';
|
|
4
|
+
export { S as SqlEditorPanel } from './sql-editor-panel-Smfl_FDF.js';
|
|
5
|
+
import './ShardInput-gx_DZXXn.js';
|
|
6
|
+
import './table-_RzNvy3R.js';
|
|
7
|
+
import './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
8
|
+
import './ADMIN_FUNCTIONS-DjXgvJb6.js';
|
|
9
|
+
import './internal-rXJEAhXS.js';
|
|
10
|
+
import './shard-history-DyebH1R5.js';
|
|
11
|
+
import './data-grid-B5CaV3wS.js';
|
|
12
|
+
import './grid-features-CzUfqgsM.js';
|
|
13
|
+
import 'react/jsx-dev-runtime';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import 'react/compiler-runtime';
|
|
2
|
+
import '@tanstack/react-router';
|
|
3
|
+
import 'react';
|
|
4
|
+
export { S as Studio } from './studio-9Mq0PdMi.js';
|
|
5
|
+
import './ErrorBoundary-BzAApI7J.js';
|
|
6
|
+
import './badge-B2PKA1-5.js';
|
|
7
|
+
import './input-XH4r1Pt1.js';
|
|
8
|
+
import './reference-view-B4E49Lip.js';
|
|
9
|
+
import './InsightsPanel-CvXMoZuv.js';
|
|
10
|
+
import './SecurityAdvisorPanel-DTmjUNqt.js';
|
|
11
|
+
import './ApiTab-rwttyQ1-.js';
|
|
12
|
+
import './TableEditor-DzK3Z6rL.js';
|
|
13
|
+
import './ExportImportPanel-BGJqFK9X.js';
|
|
14
|
+
import './MigrationsPanel-DaZuUHje.js';
|
|
15
|
+
import './PitrPanel-LJGNP_IX.js';
|
|
16
|
+
import './FunctionRunner-7NH3KcTg.js';
|
|
17
|
+
import './FunctionStatsPanel-CXynSuqT.js';
|
|
18
|
+
import './HomePanel-BOkFRbuj.js';
|
|
19
|
+
import './AuditPanel-D9Eh7j7E.js';
|
|
20
|
+
import './LogsPanel-BrUstOk6.js';
|
|
21
|
+
import './MailPanel-GnnrNqL6.js';
|
|
22
|
+
import './HealthPanel-CyLs7qZm.js';
|
|
23
|
+
import './MetricsPanel-BN_uUU-_.js';
|
|
24
|
+
import './SchemaViewer-Bam6ylvw.js';
|
|
25
|
+
import './SettingsPanel-C2wDK-8F.js';
|
|
26
|
+
import './sql-editor-panel-Smfl_FDF.js';
|
|
27
|
+
import './FileBrowser-0pCpdKPE.js';
|
|
28
|
+
import './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
29
|
+
import './StudioI18nProvider-B-tDCZIi.js';
|
|
30
|
+
import './internal-rXJEAhXS.js';
|
|
31
|
+
import './utils-B05Dmz_H.js';
|
|
32
|
+
import './CommandPalette-BtgkBzZI.js';
|
|
33
|
+
import 'react/jsx-dev-runtime';
|