@lunora/studio 1.0.0-alpha.5 → 1.0.0-alpha.50
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 +6 -0
- package/__assets__/package-og.svg +1 -1
- package/dist/index.d.ts +45 -23
- package/dist/index.js +31 -31
- package/dist/mount.d.ts +1 -1
- package/dist/mount.js +3 -2
- package/dist/{packem_shared/ApiTab-W3no0KOj.js → packem_chunks/ApiTab.js} +5 -5
- package/dist/{packem_shared/AuditPanel-Bq4o_IqT.js → packem_chunks/AuditPanel.js} +29 -41
- package/dist/{packem_shared/ExportImportPanel-dxY56TDF.js → packem_chunks/ExportImportPanel.js} +16 -11
- package/dist/{packem_shared/FileBrowser-Dhy4zES8.js → packem_chunks/FileBrowser.js} +55 -32
- package/dist/{packem_shared/FunctionRunner--fQJRPAD.js → packem_chunks/FunctionRunner.js} +15 -32
- package/dist/{packem_shared/FunctionStatsPanel-BjRUA_G3.js → packem_chunks/FunctionStatsPanel.js} +153 -208
- package/dist/{packem_shared/HealthPanel-PxclMWmA.js → packem_chunks/HealthPanel.js} +37 -29
- package/dist/{packem_shared/InsightsPanel-CWS_C-xW.js → packem_chunks/InsightsPanel.js} +108 -69
- package/dist/{packem_shared/LogsPanel-CTW8CFcM.js → packem_chunks/LogsPanel.js} +46 -58
- package/dist/{packem_shared/MailPanel-BwkvfIHF.js → packem_chunks/MailPanel.js} +45 -139
- package/dist/{packem_shared/MetricsPanel-BLuOhZQ4.js → packem_chunks/MetricsPanel.js} +41 -322
- package/dist/{packem_shared/MigrationsPanel-DT3lnwHF.js → packem_chunks/MigrationsPanel.js} +44 -51
- package/dist/{packem_shared/PitrPanel-CdErL7EJ.js → packem_chunks/PitrPanel.js} +9 -9
- package/dist/{packem_shared/SchemaViewer-LJDcmNIO.js → packem_chunks/SchemaViewer.js} +17 -16
- package/dist/{packem_shared/SecurityAdvisorPanel-C_ETsPih.js → packem_chunks/SecurityAdvisorPanel.js} +47 -31
- package/dist/packem_chunks/SettingsPanel.js +391 -0
- package/dist/{packem_shared/sql-editor-panel-BFRpzj6r.js → packem_chunks/SqlEditorPanel.js} +159 -387
- package/dist/{packem_shared/TableEditor-ChfUOZec.js → packem_chunks/TableEditor.js} +13 -94
- package/dist/packem_chunks/agents-panel.js +326 -0
- package/dist/packem_chunks/analytics-panel.js +261 -0
- package/dist/packem_chunks/auth-config-panel.js +365 -0
- package/dist/packem_chunks/auth-sessions-panel.js +175 -0
- package/dist/packem_chunks/containers-panel.js +261 -0
- package/dist/packem_chunks/dashboards-panel.js +781 -0
- package/dist/packem_chunks/fanout-panel.js +482 -0
- package/dist/packem_chunks/flags-panel.js +176 -0
- package/dist/packem_chunks/issues-panel.js +188 -0
- package/dist/packem_chunks/kv-browser.js +1896 -0
- package/dist/packem_chunks/log-drains-panel.js +273 -0
- package/dist/packem_chunks/organizations-panel.js +3178 -0
- package/dist/packem_chunks/payments-panel.js +186 -0
- package/dist/packem_chunks/permissions-panel.js +805 -0
- package/dist/packem_chunks/queues-panel.js +1075 -0
- package/dist/packem_chunks/rls-panel.js +315 -0
- package/dist/packem_chunks/schedule-panel.js +831 -0
- package/dist/packem_chunks/sparkline.js +79 -0
- package/dist/packem_chunks/storage-rules-panel.js +140 -0
- package/dist/packem_chunks/subscriptions-panel.js +238 -0
- package/dist/packem_chunks/users-panel.js +1731 -0
- package/dist/packem_chunks/vector-browser.js +281 -0
- package/dist/packem_chunks/workflows-panel.js +562 -0
- package/dist/packem_shared/{ADMIN_FUNCTIONS-DmBqMZ-z.js → ADMIN_FUNCTIONS-DNeyYtUN.js} +8 -0
- package/dist/packem_shared/{ApiDocsPanel-C5-yJ1p7.js → ApiDocsPanel-_aEZxAMX.js} +2 -2
- package/dist/packem_shared/{ApiReferencePanel-1vubqG5s.js → ApiReferencePanel-Dd8pcswz.js} +2 -1
- package/dist/packem_shared/{CommandPalette-BtgkBzZI.js → CommandPalette-BXV4eKf5.js} +1 -1
- package/dist/packem_shared/{DataBrowser-CtBe1So9.js → DataBrowser-C8hejnub.js} +201 -250
- package/dist/packem_shared/{DataFilters-FNquMaiu.js → DataFilters-B1Q7mrt7.js} +6 -2
- package/dist/packem_shared/{GlobalDataBrowser-BTEmGrph.js → GlobalDataBrowser-CxJxRRf2.js} +37 -66
- package/dist/packem_shared/HomePanel-Ye8PaqQL.js +14 -0
- package/dist/packem_shared/{OpenRpcReferencePanel-vbcYbv3V.js → OpenRpcReferencePanel-CWaf0ZtX.js} +2 -1
- package/dist/packem_shared/{ScheduledJobs-CabfKbyM.js → ScheduledJobs-dHMgnJbx.js} +163 -60
- package/dist/packem_shared/{ShardInput-gx_DZXXn.js → ShardInput-CZnpHILL.js} +1 -1
- package/dist/packem_shared/Studio-xJLTlLpf.js +16 -0
- package/dist/packem_shared/{StudioApp-D4azxYBu.js → StudioApp-oCQholCL.js} +6 -21
- package/dist/packem_shared/{advisor-view-CGcfMiPq.js → advisor-view-Cx21PS_T.js} +6 -6
- package/dist/packem_shared/alert-CdAET2K_.js +68 -0
- package/dist/packem_shared/{app.d-CCmwDEVs.d.ts → app.d-CGdOmLTm.d.ts} +1 -1
- package/dist/packem_shared/{bar-chart-CzJAgqkp.js → bar-chart-DSwcWIRy.js} +5 -4
- package/dist/packem_shared/browser-storage-L4gOP5gJ.js +105 -0
- package/dist/packem_shared/{cf-links-2cktDedA.js → cf-links-BZfRdxSE.js} +1 -1
- package/dist/packem_shared/{data-grid-B5CaV3wS.js → data-grid-C9I16KWr.js} +1 -1
- package/dist/packem_shared/data-view-params-Cd6yRVbv.js +96 -0
- package/dist/packem_shared/error-alert-vIPQoN3Y.js +114 -0
- package/dist/packem_shared/{grid-features-CzUfqgsM.js → grid-features-B_fZH4iQ.js} +133 -164
- package/dist/packem_shared/home-panel-D62G8108.js +1889 -0
- package/dist/packem_shared/internal-zwBoOv24.js +122 -0
- package/dist/packem_shared/modal-shell-hyaJvIJ6.js +100 -0
- package/dist/packem_shared/{reference-view-B4E49Lip.js → reference-view-DUULLuOi.js} +8 -61
- package/dist/packem_shared/result-chart-DZradBAS.js +119 -0
- package/dist/packem_shared/scroll-area-DLhcy-ml.js +93 -0
- package/dist/packem_shared/select-UkNYCT3s.js +273 -0
- package/dist/packem_shared/shard-history-AxiJ1WPP.js +16 -0
- package/dist/packem_shared/skeleton-CGhL0p20.js +45 -0
- package/dist/packem_shared/{sparkline-10dG-_f0.js → sparkline-BnA1kC9X.js} +1 -1
- package/dist/packem_shared/studio-WZUOecDv.js +4069 -0
- package/dist/packem_shared/{table-_RzNvy3R.js → table-DsCa9Qp9.js} +1 -1
- package/dist/packem_shared/{table-list-sidebar-Bg7uzbvC.js → table-list-sidebar-huX4VmgI.js} +19 -9
- package/dist/packem_shared/use-admin-query-BGJ010yZ.js +106 -0
- package/dist/packem_shared/use-async-submit-DGCtuDyz.js +91 -0
- package/dist/standalone/chunk-22C6COGE.js +13 -0
- package/dist/standalone/chunk-2CCWLKQW.js +1 -0
- package/dist/standalone/chunk-2JTPX3CV.js +1 -0
- package/dist/standalone/chunk-2K47A3P6.js +1 -0
- package/dist/standalone/chunk-2MLA6WFH.js +1 -0
- package/dist/standalone/chunk-2NGUNNGW.js +1 -0
- package/dist/standalone/chunk-3CPQ5IQU.js +1 -0
- package/dist/standalone/chunk-3GXGLNKW.js +1 -0
- package/dist/standalone/chunk-3OA7PECS.js +6 -0
- package/dist/standalone/chunk-4AXW2ECS.js +13 -0
- package/dist/standalone/chunk-4BVRLBEW.js +1 -0
- package/dist/standalone/chunk-4PC7IXNY.js +1 -0
- package/dist/standalone/chunk-4QHKBC77.js +1 -0
- package/dist/standalone/chunk-5OIBXYZM.js +1 -0
- package/dist/standalone/chunk-5OZQHQ26.js +1 -0
- package/dist/standalone/chunk-6RREMPQX.js +2 -0
- package/dist/standalone/chunk-6ZBU3JWR.js +3 -0
- package/dist/standalone/chunk-7LDYSHOU.js +1 -0
- package/dist/standalone/chunk-7TJJXVSE.js +1 -0
- package/dist/standalone/chunk-A2DBMISD.js +1 -0
- package/dist/standalone/chunk-A3ZJACVT.js +4 -0
- package/dist/standalone/chunk-A66LI6OV.js +4 -0
- package/dist/standalone/chunk-AHILM3ZP.js +1 -0
- package/dist/standalone/chunk-AITOCPML.js +1 -0
- package/dist/standalone/chunk-APSSZB6Z.js +1 -0
- package/dist/standalone/chunk-BGG56IF5.js +1 -0
- package/dist/standalone/chunk-BJGBHGK3.js +1 -0
- package/dist/standalone/chunk-CJXJIRSN.js +1 -0
- package/dist/standalone/chunk-CKSHCYGC.js +2 -0
- package/dist/standalone/chunk-DR6LGPXE.js +1 -0
- package/dist/standalone/chunk-DWDILV2E.js +1 -0
- package/dist/standalone/chunk-EEWKIQUE.js +1 -0
- package/dist/standalone/chunk-EOE5NDMK.js +1 -0
- package/dist/standalone/chunk-FAUN4Z72.js +1 -0
- package/dist/standalone/chunk-G7ZBM54M.js +1 -0
- package/dist/standalone/chunk-GTM65MVX.js +1 -0
- package/dist/standalone/chunk-HAJSYWFT.js +8 -0
- package/dist/standalone/chunk-HQM6MBPS.js +1 -0
- package/dist/standalone/chunk-HTQNZXDT.js +1 -0
- package/dist/standalone/chunk-HV7G6DFP.js +5 -0
- package/dist/standalone/chunk-IO2XEI6T.js +1 -0
- package/dist/standalone/chunk-ITQKVEP7.js +19 -0
- package/dist/standalone/chunk-IZN4TYMN.js +1 -0
- package/dist/standalone/chunk-J6J54MBP.js +1 -0
- package/dist/standalone/chunk-JM7XBQVK.js +1 -0
- package/dist/standalone/chunk-JPILGFXT.js +1 -0
- package/dist/standalone/chunk-JSEXCW5Q.js +1 -0
- package/dist/standalone/chunk-JUDPYSJZ.js +1 -0
- package/dist/standalone/chunk-K4S652EQ.js +4 -0
- package/dist/standalone/chunk-KEGAWN6Y.js +1 -0
- package/dist/standalone/chunk-KJFFID72.js +1 -0
- package/dist/standalone/chunk-KJJ3WM6H.js +4 -0
- package/dist/standalone/chunk-KZ6INM5M.js +1 -0
- package/dist/standalone/chunk-L7SK4ZZD.js +1 -0
- package/dist/standalone/chunk-LAK5VSPI.js +1 -0
- package/dist/standalone/chunk-LJAAZNQ6.js +1 -0
- package/dist/standalone/chunk-LUP4YTBS.js +1 -0
- package/dist/standalone/chunk-LX7KONE3.js +1 -0
- package/dist/standalone/chunk-MDTNVR3G.js +1 -0
- package/dist/standalone/chunk-NS23QR4W.js +1 -0
- package/dist/standalone/chunk-NW6SZZ5O.js +1 -0
- package/dist/standalone/chunk-O3NAGRTR.js +1 -0
- package/dist/standalone/chunk-P2ERTKMB.js +1 -0
- package/dist/standalone/chunk-PS3XCCZD.js +1 -0
- package/dist/standalone/chunk-QAFAJBAW.js +1 -0
- package/dist/standalone/chunk-RRCPZMC2.js +22 -0
- package/dist/standalone/chunk-RS7S7XVP.js +1 -0
- package/dist/standalone/chunk-S5NTGHCG.js +1 -0
- package/dist/standalone/chunk-S7AB7Y75.js +1 -0
- package/dist/standalone/chunk-SDMZKBTD.js +1 -0
- package/dist/standalone/chunk-SDQE2IUJ.js +1 -0
- package/dist/standalone/chunk-SEU5V7I6.js +1 -0
- package/dist/standalone/chunk-SHERR7ZP.js +1 -0
- package/dist/standalone/chunk-SHJUAHC6.js +1 -0
- package/dist/standalone/chunk-TAD43CG5.js +1 -0
- package/dist/standalone/chunk-TO6D2PJC.js +6 -0
- package/dist/standalone/chunk-TQ36RWOP.js +1 -0
- package/dist/standalone/chunk-TYN6SQ73.js +1 -0
- package/dist/standalone/chunk-U26QNHMO.js +1 -0
- package/dist/standalone/chunk-UK64ZSUW.js +1 -0
- package/dist/standalone/chunk-UTHHHJYS.js +1 -0
- package/dist/standalone/chunk-V43BLH4J.js +1 -0
- package/dist/standalone/chunk-VL23Y44O.js +4 -0
- package/dist/standalone/chunk-VL6HOZHF.js +1 -0
- package/dist/standalone/chunk-VLXV72QE.js +1 -0
- package/dist/standalone/chunk-W666BB6V.js +1 -0
- package/dist/standalone/chunk-W6JKUZKD.js +1 -0
- package/dist/standalone/chunk-WI7GWFEG.js +1 -0
- package/dist/standalone/chunk-WUFVFVHJ.js +1 -0
- package/dist/standalone/chunk-WVTPZ6CM.js +1 -0
- package/dist/standalone/chunk-X2TQRMQV.js +1 -0
- package/dist/standalone/chunk-X4676IX6.js +1 -0
- package/dist/standalone/chunk-X4QFAAZ5.js +76 -0
- package/dist/standalone/chunk-XJU5SRNL.js +4 -0
- package/dist/standalone/chunk-XNJNSCLM.js +1 -0
- package/dist/standalone/chunk-XWPZBZSZ.js +3 -0
- package/dist/standalone/chunk-YLHDKM2P.js +1 -0
- package/dist/standalone/chunk-ZHVTQ37P.js +1 -0
- package/dist/standalone/chunk-ZIGWVHCS.js +1 -0
- package/dist/standalone/chunk-ZPP2KOR4.js +1 -0
- package/dist/standalone/chunk-ZPUO7FNI.js +1 -0
- package/dist/standalone/studio.js +104 -246
- package/dist/styles.css +2 -2
- package/package.json +17 -15
- package/dist/packem_shared/HomePanel-Cw16stjq.js +0 -1273
- package/dist/packem_shared/SettingsPanel-C0uLRf5P.js +0 -176
- package/dist/packem_shared/SqlEditorPanel-CguV7otm.js +0 -13
- package/dist/packem_shared/Studio-BmSGSIuY.js +0 -33
- package/dist/packem_shared/internal-rXJEAhXS.js +0 -68
- package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
- package/dist/packem_shared/studio-H9fuQgSj.js +0 -10303
- package/dist/packem_shared/use-live-admin-Dq6g3daN.js +0 -73
- package/dist/packem_shared/use-live-shard-seed-Cuk3dnH0.js +0 -76
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { useLunora } from '@lunora/react';
|
|
2
|
-
import { useState, useCallback, useEffect, useMemo } from '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 { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
7
|
-
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-DmBqMZ-z.js';
|
|
8
|
-
import { a as CLOUDFLARE_WORKERS_URL } from './cf-links-2cktDedA.js';
|
|
9
|
-
import { c as callOptions, e as errorMessage, f as fireAndForget, a as adminRef } from './internal-rXJEAhXS.js';
|
|
10
|
-
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
11
|
-
|
|
12
|
-
const GET_SETTINGS = adminRef(ADMIN_FUNCTIONS.getSettings);
|
|
13
|
-
const KIND_VARIANT = {
|
|
14
|
-
binding: "outline",
|
|
15
|
-
secret: "destructive",
|
|
16
|
-
var: "secondary"
|
|
17
|
-
};
|
|
18
|
-
const SettingsPanel = ({
|
|
19
|
-
initialShardKey
|
|
20
|
-
}) => {
|
|
21
|
-
const client = useLunora();
|
|
22
|
-
const t = useT();
|
|
23
|
-
const [result, setResult] = useState(null);
|
|
24
|
-
const [error, setError] = useState(null);
|
|
25
|
-
const [loading, setLoading] = useState(false);
|
|
26
|
-
const refresh = useCallback(async () => {
|
|
27
|
-
setLoading(true);
|
|
28
|
-
setError(null);
|
|
29
|
-
try {
|
|
30
|
-
const settings = await client.query(GET_SETTINGS, {}, callOptions(initialShardKey ?? ""));
|
|
31
|
-
setResult(settings);
|
|
32
|
-
} catch (error_) {
|
|
33
|
-
setResult(null);
|
|
34
|
-
setError(errorMessage(error_));
|
|
35
|
-
} finally {
|
|
36
|
-
setLoading(false);
|
|
37
|
-
}
|
|
38
|
-
}, [client, initialShardKey]);
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
fireAndForget(refresh());
|
|
41
|
-
}, [refresh]);
|
|
42
|
-
const deployRows = useMemo(() => {
|
|
43
|
-
const deploy = result?.deploy;
|
|
44
|
-
if (deploy === void 0) {
|
|
45
|
-
return [];
|
|
46
|
-
}
|
|
47
|
-
const rows = [];
|
|
48
|
-
if (deploy.workerUrl !== void 0) {
|
|
49
|
-
rows.push({
|
|
50
|
-
label: t("URL"),
|
|
51
|
-
value: deploy.workerUrl
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
if (deploy.environment !== void 0) {
|
|
55
|
-
rows.push({
|
|
56
|
-
label: t("Environment"),
|
|
57
|
-
value: deploy.environment
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
if (deploy.deploymentId !== void 0) {
|
|
61
|
-
rows.push({
|
|
62
|
-
label: t("Deployment"),
|
|
63
|
-
value: deploy.deploymentId
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
if (deploy.versionTag !== void 0) {
|
|
67
|
-
rows.push({
|
|
68
|
-
label: t("Version"),
|
|
69
|
-
value: deploy.versionTag
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
return rows;
|
|
73
|
-
}, [result, t]);
|
|
74
|
-
const settings_0 = result?.settings ?? [];
|
|
75
|
-
return /* @__PURE__ */ jsxDEV("div", {
|
|
76
|
-
className: "flex flex-col gap-4",
|
|
77
|
-
"data-testid": "lunora-settings",
|
|
78
|
-
children: [/* @__PURE__ */ jsxDEV("div", {
|
|
79
|
-
className: "flex flex-wrap items-center gap-3",
|
|
80
|
-
children: /* @__PURE__ */ jsxDEV("a", {
|
|
81
|
-
className: "text-sm text-primary underline-offset-4 hover:underline",
|
|
82
|
-
"data-testid": "set-cf-link",
|
|
83
|
-
href: CLOUDFLARE_WORKERS_URL,
|
|
84
|
-
rel: "noreferrer",
|
|
85
|
-
target: "_blank",
|
|
86
|
-
children: t("Open in Cloudflare")
|
|
87
|
-
}, void 0, false)
|
|
88
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("p", {
|
|
89
|
-
className: "text-sm text-muted-foreground",
|
|
90
|
-
"data-testid": "set-readonly-note",
|
|
91
|
-
children: t("View-only — values are masked. Edit vars, secrets, and bindings in wrangler or the Cloudflare dashboard.")
|
|
92
|
-
}, void 0, false), error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
93
|
-
className: "text-sm text-destructive",
|
|
94
|
-
"data-testid": "set-error",
|
|
95
|
-
role: "alert",
|
|
96
|
-
children: error
|
|
97
|
-
}, void 0, false), deployRows.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
|
|
98
|
-
className: "py-0",
|
|
99
|
-
"data-testid": "set-deploy",
|
|
100
|
-
children: [/* @__PURE__ */ jsxDEV("header", {
|
|
101
|
-
className: "border-b border-border px-4 py-3",
|
|
102
|
-
children: /* @__PURE__ */ jsxDEV("span", {
|
|
103
|
-
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
104
|
-
children: t("Deployment")
|
|
105
|
-
}, void 0, false)
|
|
106
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(CardContent, {
|
|
107
|
-
className: "py-3",
|
|
108
|
-
children: /* @__PURE__ */ jsxDEV("dl", {
|
|
109
|
-
className: "grid grid-cols-[8rem_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm",
|
|
110
|
-
children: deployRows.map((row) => /* @__PURE__ */ jsxDEV("div", {
|
|
111
|
-
className: "contents",
|
|
112
|
-
"data-testid": "set-deploy-row",
|
|
113
|
-
children: [/* @__PURE__ */ jsxDEV("dt", {
|
|
114
|
-
className: "text-muted-foreground",
|
|
115
|
-
children: row.label
|
|
116
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("dd", {
|
|
117
|
-
className: "truncate font-mono text-xs",
|
|
118
|
-
title: row.value,
|
|
119
|
-
children: row.value
|
|
120
|
-
}, void 0, false)]
|
|
121
|
-
}, row.label, true))
|
|
122
|
-
}, void 0, false)
|
|
123
|
-
}, void 0, false)]
|
|
124
|
-
}, void 0, true), /* @__PURE__ */ jsxDEV(Card, {
|
|
125
|
-
className: "py-0",
|
|
126
|
-
children: [/* @__PURE__ */ jsxDEV("header", {
|
|
127
|
-
className: "border-b border-border px-4 py-3",
|
|
128
|
-
children: /* @__PURE__ */ jsxDEV("span", {
|
|
129
|
-
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
130
|
-
children: t("Environment & bindings")
|
|
131
|
-
}, void 0, false)
|
|
132
|
-
}, void 0, false), error === null && !loading && settings_0.length === 0 && /* @__PURE__ */ jsxDEV("p", {
|
|
133
|
-
className: "px-4 py-8 text-center text-sm text-muted-foreground",
|
|
134
|
-
"data-testid": "set-empty",
|
|
135
|
-
children: t("No environment variables or bindings.")
|
|
136
|
-
}, void 0, false), settings_0.length > 0 && /* @__PURE__ */ jsxDEV(CardContent, {
|
|
137
|
-
className: "px-0 py-0",
|
|
138
|
-
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
139
|
-
"data-testid": "set-table",
|
|
140
|
-
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
141
|
-
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
142
|
-
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
143
|
-
children: t("name")
|
|
144
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
145
|
-
children: t("kind")
|
|
146
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
147
|
-
children: t("value")
|
|
148
|
-
}, void 0, false)]
|
|
149
|
-
}, void 0, true)
|
|
150
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
151
|
-
children: settings_0.map((entry) => /* @__PURE__ */ jsxDEV(TableRow, {
|
|
152
|
-
"data-testid": "set-row",
|
|
153
|
-
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
154
|
-
className: "font-mono text-xs font-medium",
|
|
155
|
-
children: entry.name
|
|
156
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
157
|
-
children: /* @__PURE__ */ jsxDEV(Badge, {
|
|
158
|
-
variant: KIND_VARIANT[entry.kind],
|
|
159
|
-
children: entry.bindingType ?? entry.kind
|
|
160
|
-
}, void 0, false)
|
|
161
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
162
|
-
className: "max-w-[28ch] truncate font-mono text-xs text-muted-foreground",
|
|
163
|
-
children: entry.value ?? /* @__PURE__ */ jsxDEV("span", {
|
|
164
|
-
className: "text-muted-foreground",
|
|
165
|
-
children: "—"
|
|
166
|
-
}, void 0, false)
|
|
167
|
-
}, void 0, false)]
|
|
168
|
-
}, entry.name, true))
|
|
169
|
-
}, void 0, false)]
|
|
170
|
-
}, void 0, true)
|
|
171
|
-
}, void 0, false)]
|
|
172
|
-
}, void 0, true)]
|
|
173
|
-
}, void 0, true);
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export { SettingsPanel };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import 'react/compiler-runtime';
|
|
2
|
-
import '@lunora/react';
|
|
3
|
-
import 'react';
|
|
4
|
-
export { S as SqlEditorPanel } from './sql-editor-panel-BFRpzj6r.js';
|
|
5
|
-
import './ShardInput-gx_DZXXn.js';
|
|
6
|
-
import './table-_RzNvy3R.js';
|
|
7
|
-
import './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
8
|
-
import './ADMIN_FUNCTIONS-DmBqMZ-z.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';
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import 'react/compiler-runtime';
|
|
2
|
-
import '@tanstack/react-router';
|
|
3
|
-
import 'react';
|
|
4
|
-
export { S as Studio } from './studio-H9fuQgSj.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-CWS_C-xW.js';
|
|
10
|
-
import './SecurityAdvisorPanel-C_ETsPih.js';
|
|
11
|
-
import './ApiTab-W3no0KOj.js';
|
|
12
|
-
import './TableEditor-ChfUOZec.js';
|
|
13
|
-
import './ExportImportPanel-dxY56TDF.js';
|
|
14
|
-
import './MigrationsPanel-DT3lnwHF.js';
|
|
15
|
-
import './PitrPanel-CdErL7EJ.js';
|
|
16
|
-
import './FunctionRunner--fQJRPAD.js';
|
|
17
|
-
import './FunctionStatsPanel-BjRUA_G3.js';
|
|
18
|
-
import './HomePanel-Cw16stjq.js';
|
|
19
|
-
import './AuditPanel-Bq4o_IqT.js';
|
|
20
|
-
import './LogsPanel-CTW8CFcM.js';
|
|
21
|
-
import './MailPanel-BwkvfIHF.js';
|
|
22
|
-
import './HealthPanel-PxclMWmA.js';
|
|
23
|
-
import './MetricsPanel-BLuOhZQ4.js';
|
|
24
|
-
import './SchemaViewer-LJDcmNIO.js';
|
|
25
|
-
import './SettingsPanel-C0uLRf5P.js';
|
|
26
|
-
import './sql-editor-panel-BFRpzj6r.js';
|
|
27
|
-
import './FileBrowser-Dhy4zES8.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';
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
const adminRef = (path) => {
|
|
2
|
-
return {
|
|
3
|
-
__lunoraRef: path
|
|
4
|
-
};
|
|
5
|
-
};
|
|
6
|
-
const callOptions = (shardKey) => {
|
|
7
|
-
const trimmed = shardKey.trim();
|
|
8
|
-
return trimmed === "" ? {} : {
|
|
9
|
-
shardKey: trimmed
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
const errorMessage = (error) => error instanceof Error ? error.message : String(error);
|
|
13
|
-
const formatCell = (value) => {
|
|
14
|
-
if (value === null || value === void 0) {
|
|
15
|
-
return "";
|
|
16
|
-
}
|
|
17
|
-
switch (typeof value) {
|
|
18
|
-
case "bigint":
|
|
19
|
-
case "boolean":
|
|
20
|
-
case "number": {
|
|
21
|
-
return value.toString();
|
|
22
|
-
}
|
|
23
|
-
case "string": {
|
|
24
|
-
return value;
|
|
25
|
-
}
|
|
26
|
-
case "symbol": {
|
|
27
|
-
return value.toString();
|
|
28
|
-
}
|
|
29
|
-
default: {
|
|
30
|
-
return JSON.stringify(value);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
const fireAndForget = (promise, onError) => {
|
|
35
|
-
promise.catch((error) => {
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
const copyToClipboard = (text) => {
|
|
39
|
-
const clipboard = "navigator" in globalThis ? globalThis.navigator.clipboard : void 0;
|
|
40
|
-
if (clipboard !== void 0) {
|
|
41
|
-
fireAndForget(clipboard.writeText(text));
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const formatBytes = (bytes) => {
|
|
45
|
-
if (bytes === null || bytes === void 0) {
|
|
46
|
-
return "—";
|
|
47
|
-
}
|
|
48
|
-
if (bytes < 1024) {
|
|
49
|
-
return `${bytes.toString()} B`;
|
|
50
|
-
}
|
|
51
|
-
const units = ["KB", "MB", "GB", "TB"];
|
|
52
|
-
let value = bytes / 1024;
|
|
53
|
-
let unit = 0;
|
|
54
|
-
while (value >= 1024 && unit < units.length - 1) {
|
|
55
|
-
value /= 1024;
|
|
56
|
-
unit += 1;
|
|
57
|
-
}
|
|
58
|
-
return `${value.toFixed(1)} ${units[unit] ?? "TB"}`;
|
|
59
|
-
};
|
|
60
|
-
const formatTimestamp = (value, fallback = "") => {
|
|
61
|
-
if (value === null || value === void 0 || value === "") {
|
|
62
|
-
return fallback;
|
|
63
|
-
}
|
|
64
|
-
const date = new Date(value);
|
|
65
|
-
return Number.isNaN(date.getTime()) ? String(value) : date.toLocaleString();
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export { adminRef as a, formatTimestamp as b, callOptions as c, formatBytes as d, errorMessage as e, fireAndForget as f, copyToClipboard as g, formatCell as h };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
const STORAGE_KEY = "lunora-studio-recent-shards";
|
|
2
|
-
const MAX_RECENTS = 10;
|
|
3
|
-
const store = () => {
|
|
4
|
-
try {
|
|
5
|
-
return globalThis.sessionStorage;
|
|
6
|
-
} catch {
|
|
7
|
-
return void 0;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
const loadRecentShards = () => {
|
|
11
|
-
try {
|
|
12
|
-
const raw = store()?.getItem(STORAGE_KEY);
|
|
13
|
-
if (raw === null || raw === void 0) {
|
|
14
|
-
return [];
|
|
15
|
-
}
|
|
16
|
-
const parsed = JSON.parse(raw);
|
|
17
|
-
return Array.isArray(parsed) ? parsed.filter((entry) => typeof entry === "string") : [];
|
|
18
|
-
} catch {
|
|
19
|
-
return [];
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
const recordShard = (shardKey) => {
|
|
23
|
-
const trimmed = shardKey.trim();
|
|
24
|
-
if (trimmed === "") {
|
|
25
|
-
return loadRecentShards();
|
|
26
|
-
}
|
|
27
|
-
const next = [trimmed, ...loadRecentShards().filter((entry) => entry !== trimmed)].slice(0, MAX_RECENTS);
|
|
28
|
-
const storage = store();
|
|
29
|
-
if (storage !== void 0) {
|
|
30
|
-
try {
|
|
31
|
-
storage.setItem(STORAGE_KEY, JSON.stringify(next));
|
|
32
|
-
} catch {
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return next;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export { loadRecentShards as l, recordShard as r };
|