@lunora/studio 1.0.0-alpha.3 → 1.0.0-alpha.30

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.
Files changed (174) hide show
  1. package/__assets__/package-og.svg +1 -1
  2. package/dist/index.d.ts +29 -18
  3. package/dist/index.js +29 -29
  4. package/dist/mount.d.ts +1 -1
  5. package/dist/mount.js +1 -1
  6. package/dist/{packem_shared/ApiTab-W3no0KOj.js → packem_chunks/ApiTab.js} +5 -5
  7. package/dist/{packem_shared/AuditPanel-Bq4o_IqT.js → packem_chunks/AuditPanel.js} +24 -36
  8. package/dist/{packem_shared/ExportImportPanel-dxY56TDF.js → packem_chunks/ExportImportPanel.js} +13 -9
  9. package/dist/{packem_shared/FileBrowser-Dhy4zES8.js → packem_chunks/FileBrowser.js} +15 -15
  10. package/dist/{packem_shared/FunctionRunner--fQJRPAD.js → packem_chunks/FunctionRunner.js} +10 -10
  11. package/dist/{packem_shared/FunctionStatsPanel-BjRUA_G3.js → packem_chunks/FunctionStatsPanel.js} +147 -204
  12. package/dist/{packem_shared/HealthPanel-PxclMWmA.js → packem_chunks/HealthPanel.js} +37 -29
  13. package/dist/{packem_shared/InsightsPanel-CWS_C-xW.js → packem_chunks/InsightsPanel.js} +107 -69
  14. package/dist/{packem_shared/LogsPanel-CTW8CFcM.js → packem_chunks/LogsPanel.js} +41 -53
  15. package/dist/{packem_shared/MailPanel-BwkvfIHF.js → packem_chunks/MailPanel.js} +37 -44
  16. package/dist/{packem_shared/MetricsPanel-BLuOhZQ4.js → packem_chunks/MetricsPanel.js} +41 -322
  17. package/dist/{packem_shared/MigrationsPanel-DT3lnwHF.js → packem_chunks/MigrationsPanel.js} +39 -46
  18. package/dist/{packem_shared/PitrPanel-CdErL7EJ.js → packem_chunks/PitrPanel.js} +9 -9
  19. package/dist/{packem_shared/SchemaViewer-LJDcmNIO.js → packem_chunks/SchemaViewer.js} +15 -15
  20. package/dist/{packem_shared/SecurityAdvisorPanel-C_ETsPih.js → packem_chunks/SecurityAdvisorPanel.js} +44 -31
  21. package/dist/packem_chunks/SettingsPanel.js +390 -0
  22. package/dist/{packem_shared/sql-editor-panel-BFRpzj6r.js → packem_chunks/SqlEditorPanel.js} +12 -252
  23. package/dist/{packem_shared/TableEditor-ChfUOZec.js → packem_chunks/TableEditor.js} +10 -68
  24. package/dist/packem_chunks/analytics-panel.js +261 -0
  25. package/dist/packem_chunks/auth-config-panel.js +179 -0
  26. package/dist/packem_chunks/auth-sessions-panel.js +175 -0
  27. package/dist/packem_chunks/dashboards-panel.js +779 -0
  28. package/dist/packem_chunks/fanout-panel.js +481 -0
  29. package/dist/packem_chunks/flags-panel.js +176 -0
  30. package/dist/packem_chunks/kv-browser.js +1896 -0
  31. package/dist/packem_chunks/log-drains-panel.js +273 -0
  32. package/dist/packem_chunks/organizations-panel.js +670 -0
  33. package/dist/packem_chunks/payments-panel.js +185 -0
  34. package/dist/packem_chunks/permissions-panel.js +804 -0
  35. package/dist/packem_chunks/queues-panel.js +147 -0
  36. package/dist/packem_chunks/rls-panel.js +313 -0
  37. package/dist/packem_chunks/schedule-panel.js +831 -0
  38. package/dist/packem_chunks/sparkline.js +79 -0
  39. package/dist/packem_chunks/storage-rules-panel.js +138 -0
  40. package/dist/packem_chunks/subscriptions-panel.js +236 -0
  41. package/dist/packem_chunks/users-panel.js +1265 -0
  42. package/dist/packem_chunks/vector-browser.js +281 -0
  43. package/dist/packem_chunks/workflows-panel.js +562 -0
  44. package/dist/packem_shared/{ADMIN_FUNCTIONS-DmBqMZ-z.js → ADMIN_FUNCTIONS-CdaxLGkE.js} +3 -0
  45. package/dist/packem_shared/{ApiDocsPanel-C5-yJ1p7.js → ApiDocsPanel-B6u_wnz-.js} +2 -2
  46. package/dist/packem_shared/{ApiReferencePanel-1vubqG5s.js → ApiReferencePanel-Drz4UO0a.js} +2 -1
  47. package/dist/packem_shared/{CommandPalette-BtgkBzZI.js → CommandPalette-B5BertvU.js} +1 -1
  48. package/dist/packem_shared/{DataBrowser-CtBe1So9.js → DataBrowser-ANTHLWWh.js} +198 -247
  49. package/dist/packem_shared/{GlobalDataBrowser-BTEmGrph.js → GlobalDataBrowser-CjgTG_wa.js} +37 -66
  50. package/dist/packem_shared/HomePanel-c2FodE9t.js +14 -0
  51. package/dist/packem_shared/{OpenRpcReferencePanel-vbcYbv3V.js → OpenRpcReferencePanel-CspFdbUT.js} +2 -1
  52. package/dist/packem_shared/{ScheduledJobs-CabfKbyM.js → ScheduledJobs-BEJXtsBn.js} +163 -60
  53. package/dist/packem_shared/Studio-CVTtA_sB.js +16 -0
  54. package/dist/packem_shared/{StudioApp-CHOZA-z-.js → StudioApp-BSYV2fz6.js} +277 -3
  55. package/dist/packem_shared/{advisor-view-CGcfMiPq.js → advisor-view-DzqyvUU3.js} +1 -1
  56. package/dist/packem_shared/{app.d-CCmwDEVs.d.ts → app.d-B6MyY_al.d.ts} +1 -1
  57. package/dist/packem_shared/{bar-chart-CzJAgqkp.js → bar-chart-Bb__F5-u.js} +1 -1
  58. package/dist/packem_shared/browser-storage-d03UsV7v.js +249 -0
  59. package/dist/packem_shared/{cf-links-2cktDedA.js → cf-links-BZfRdxSE.js} +1 -1
  60. package/dist/packem_shared/{data-grid-B5CaV3wS.js → data-grid-Dsg6nRjo.js} +1 -1
  61. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +96 -0
  62. package/dist/packem_shared/{grid-features-CzUfqgsM.js → grid-features-D7nNzBYm.js} +4 -99
  63. package/dist/packem_shared/{HomePanel-Cw16stjq.js → home-panel-aOR_drVv.js} +833 -469
  64. package/dist/packem_shared/{internal-rXJEAhXS.js → internal-FcNZ3beb.js} +1 -1
  65. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +100 -0
  66. package/dist/packem_shared/{reference-view-B4E49Lip.js → reference-view-Doy1XlQq.js} +4 -44
  67. package/dist/packem_shared/select-UkNYCT3s.js +273 -0
  68. package/dist/packem_shared/skeleton-CGhL0p20.js +45 -0
  69. package/dist/packem_shared/{sparkline-10dG-_f0.js → sparkline-KgMPHS4u.js} +1 -1
  70. package/dist/packem_shared/studio-dMTJ-kRR.js +3987 -0
  71. package/dist/packem_shared/{table-_RzNvy3R.js → table-DsCa9Qp9.js} +1 -1
  72. package/dist/packem_shared/{table-list-sidebar-Bg7uzbvC.js → table-list-sidebar-VMo0ftxD.js} +1 -1
  73. package/dist/packem_shared/use-admin-query-BViPA3US.js +105 -0
  74. package/dist/packem_shared/use-auth-capabilities-BHkoBnbZ.js +32 -0
  75. package/dist/standalone/chunk-2DS7JLWL.js +13 -0
  76. package/dist/standalone/chunk-2K47A3P6.js +1 -0
  77. package/dist/standalone/chunk-2NGUNNGW.js +1 -0
  78. package/dist/standalone/chunk-2PDQ4KZ6.js +1 -0
  79. package/dist/standalone/chunk-3BP4BTLR.js +4 -0
  80. package/dist/standalone/chunk-3OA7PECS.js +6 -0
  81. package/dist/standalone/chunk-4QHKBC77.js +1 -0
  82. package/dist/standalone/chunk-57LYXHXH.js +1 -0
  83. package/dist/standalone/chunk-5NSZVXCS.js +1 -0
  84. package/dist/standalone/chunk-5OIBXYZM.js +1 -0
  85. package/dist/standalone/chunk-63XKJQTQ.js +1 -0
  86. package/dist/standalone/chunk-6RC6L33K.js +4 -0
  87. package/dist/standalone/chunk-6VTGE3WJ.js +1 -0
  88. package/dist/standalone/chunk-7PBZKXYA.js +1 -0
  89. package/dist/standalone/chunk-7POIIWC5.js +3 -0
  90. package/dist/standalone/chunk-7RYIQKZA.js +1 -0
  91. package/dist/standalone/chunk-7TJJXVSE.js +1 -0
  92. package/dist/standalone/chunk-AB6QGMBF.js +1 -0
  93. package/dist/standalone/chunk-AHILM3ZP.js +1 -0
  94. package/dist/standalone/chunk-AQGOX5DK.js +1 -0
  95. package/dist/standalone/chunk-ASLGNHAX.js +1 -0
  96. package/dist/standalone/chunk-BHTPZS7L.js +4 -0
  97. package/dist/standalone/chunk-BJGBHGK3.js +1 -0
  98. package/dist/standalone/chunk-D7HKX4DI.js +1 -0
  99. package/dist/standalone/chunk-DGWTR4G7.js +1 -0
  100. package/dist/standalone/chunk-DSX53PBM.js +1 -0
  101. package/dist/standalone/chunk-DV2MNASX.js +1 -0
  102. package/dist/standalone/chunk-DWDILV2E.js +1 -0
  103. package/dist/standalone/chunk-E7AVZZKO.js +1 -0
  104. package/dist/standalone/chunk-EGJX34WM.js +1 -0
  105. package/dist/standalone/chunk-FCR3HKFV.js +1 -0
  106. package/dist/standalone/chunk-FKO3HO6I.js +4 -0
  107. package/dist/standalone/chunk-FQKNJSRA.js +76 -0
  108. package/dist/standalone/chunk-G2TFEWEQ.js +4 -0
  109. package/dist/standalone/chunk-GABMIICA.js +1 -0
  110. package/dist/standalone/chunk-GTM65MVX.js +1 -0
  111. package/dist/standalone/chunk-GZXPPJVK.js +1 -0
  112. package/dist/standalone/chunk-HFBRE65A.js +1 -0
  113. package/dist/standalone/chunk-HFMQNUBC.js +1 -0
  114. package/dist/standalone/chunk-HG7Q5B3H.js +1 -0
  115. package/dist/standalone/chunk-HTQL7AXU.js +1 -0
  116. package/dist/standalone/chunk-HV7G6DFP.js +5 -0
  117. package/dist/standalone/chunk-ITLLHEVG.js +1 -0
  118. package/dist/standalone/chunk-J6J54MBP.js +1 -0
  119. package/dist/standalone/chunk-JSEXCW5Q.js +1 -0
  120. package/dist/standalone/chunk-KEGAWN6Y.js +1 -0
  121. package/dist/standalone/chunk-KG3QTFWE.js +1 -0
  122. package/dist/standalone/chunk-KGS7KM4A.js +2 -0
  123. package/dist/standalone/chunk-KODWGUAB.js +1 -0
  124. package/dist/standalone/chunk-KZ6INM5M.js +1 -0
  125. package/dist/standalone/chunk-MGFEVTRI.js +1 -0
  126. package/dist/standalone/chunk-N2QDG3MW.js +1 -0
  127. package/dist/standalone/chunk-N4JI6VQD.js +1 -0
  128. package/dist/standalone/chunk-NNISYDNI.js +1 -0
  129. package/dist/standalone/chunk-O4PXDNR3.js +1 -0
  130. package/dist/standalone/chunk-O77VNUFD.js +1 -0
  131. package/dist/standalone/chunk-OD2POGPJ.js +1 -0
  132. package/dist/standalone/chunk-OXCK3ZUG.js +1 -0
  133. package/dist/standalone/chunk-P7DSVO4U.js +1 -0
  134. package/dist/standalone/chunk-PKAM3N5C.js +1 -0
  135. package/dist/standalone/chunk-QGXGBHQO.js +1 -0
  136. package/dist/standalone/chunk-QHA3TAEJ.js +1 -0
  137. package/dist/standalone/chunk-QQWC62X7.js +1 -0
  138. package/dist/standalone/chunk-RMYA7NAH.js +1 -0
  139. package/dist/standalone/chunk-RRCPZMC2.js +22 -0
  140. package/dist/standalone/chunk-S53RUBW5.js +1 -0
  141. package/dist/standalone/chunk-SB4GT6PK.js +1 -0
  142. package/dist/standalone/chunk-SEU5V7I6.js +1 -0
  143. package/dist/standalone/chunk-SHIOUDOT.js +1 -0
  144. package/dist/standalone/chunk-SIDRSX7Y.js +1 -0
  145. package/dist/standalone/chunk-SVR644RF.js +1 -0
  146. package/dist/standalone/chunk-TAD43CG5.js +1 -0
  147. package/dist/standalone/chunk-TBMYIZIO.js +1 -0
  148. package/dist/standalone/chunk-TICVNLPM.js +1 -0
  149. package/dist/standalone/chunk-TQ36RWOP.js +1 -0
  150. package/dist/standalone/chunk-UGMRUEBU.js +1 -0
  151. package/dist/standalone/chunk-UII66UVF.js +1 -0
  152. package/dist/standalone/chunk-VJPQUBN6.js +8 -0
  153. package/dist/standalone/chunk-VLXV72QE.js +1 -0
  154. package/dist/standalone/chunk-VMJKJWG6.js +1 -0
  155. package/dist/standalone/chunk-VPDPN5RR.js +2 -0
  156. package/dist/standalone/chunk-VSEGZA3J.js +1 -0
  157. package/dist/standalone/chunk-VXBZQIGY.js +4 -0
  158. package/dist/standalone/chunk-W7PCVQTE.js +1 -0
  159. package/dist/standalone/chunk-XLILSHPE.js +1 -0
  160. package/dist/standalone/chunk-XURNGQSS.js +1 -0
  161. package/dist/standalone/chunk-YJGANMU7.js +18 -0
  162. package/dist/standalone/chunk-YQQJ4N6U.js +1 -0
  163. package/dist/standalone/chunk-ZH7UES4T.js +2 -0
  164. package/dist/standalone/chunk-ZPUO7FNI.js +1 -0
  165. package/dist/standalone/chunk-ZQCVDXDL.js +1 -0
  166. package/dist/standalone/studio.js +104 -246
  167. package/dist/styles.css +1 -1
  168. package/package.json +13 -12
  169. package/dist/packem_shared/SettingsPanel-C0uLRf5P.js +0 -176
  170. package/dist/packem_shared/SqlEditorPanel-CguV7otm.js +0 -13
  171. package/dist/packem_shared/Studio-DFWAlcuf.js +0 -33
  172. package/dist/packem_shared/studio-Bj8psK1c.js +0 -10303
  173. package/dist/packem_shared/use-live-admin-Dq6g3daN.js +0 -73
  174. package/dist/packem_shared/use-live-shard-seed-Cuk3dnH0.js +0 -76
@@ -1,12 +1,10 @@
1
- import { useLunora } from '@lunora/react';
2
- import { useState, useEffect } from 'react';
3
- import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
4
- import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-DmBqMZ-z.js';
5
- import { f as fireAndForget, c as callOptions, e as errorMessage, a as adminRef } from './internal-rXJEAhXS.js';
6
- import { A as AdvisorView } from './advisor-view-CGcfMiPq.js';
1
+ import { c } from 'react/compiler-runtime';
2
+ import { u as useAdminQuery } from '../packem_shared/use-admin-query-BViPA3US.js';
3
+ import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
4
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js';
5
+ import { A as AdvisorView } from '../packem_shared/advisor-view-DzqyvUU3.js';
7
6
  import { jsxDEV } from 'react/jsx-dev-runtime';
8
7
 
9
- const GET_SECURITY_AUDIT = adminRef(ADMIN_FUNCTIONS.getSecurityAudit);
10
8
  const findingTitle = (t, finding) => ({
11
9
  "admin-token-weak": t("Weak admin token"),
12
10
  "auth-secret-weak": t("Weak auth secret"),
@@ -17,6 +15,7 @@ const findingTitle = (t, finding) => ({
17
15
  "security-headers-disabled": t("Security headers are off"),
18
16
  "ws-gate-open": t("Live admin subscriptions are ungated")
19
17
  })[finding.kind];
18
+ const toFindings = (result) => Array.isArray(result.findings) ? result.findings : [];
20
19
  const findingEntity = (finding) => ({
21
20
  "admin-token-weak": "LUNORA_ADMIN_TOKEN",
22
21
  "auth-secret-weak": "AUTH_SECRET",
@@ -44,36 +43,50 @@ const findingDetail = (t, finding) => ({
44
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.")
45
44
  })[finding.kind];
46
45
  const SecurityAdvisorPanel = () => {
47
- const client = useLunora();
46
+ const $ = c(7);
48
47
  const t = useT();
49
- const [findings, setFindings] = useState(null);
50
- const [error, setError] = useState(null);
51
- const refresh = async () => {
52
- try {
53
- const result = await client.query(GET_SECURITY_AUDIT, {}, callOptions(""));
54
- setFindings(Array.isArray(result.findings) ? result.findings : []);
55
- setError(null);
56
- } catch (error_) {
57
- setError(errorMessage(error_));
58
- }
59
- };
60
- useEffect(() => {
61
- fireAndForget(refresh());
62
- }, [refresh]);
63
- const rows = findings === null ? null : findings.map((finding) => {
64
- return {
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) => ({
65
63
  description: findingDetail(t, finding),
66
64
  entity: findingEntity(finding),
67
65
  issueType: findingTitle(t, finding),
68
66
  key: finding.kind,
69
67
  level: finding.level
70
- };
71
- });
72
- return /* @__PURE__ */ jsxDEV(AdvisorView, {
73
- error,
74
- rows,
75
- testId: "lunora-security-advisor"
76
- }, void 0, false);
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;
77
90
  };
78
91
 
79
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 '../packem_shared/badge-B2PKA1-5.js';
4
+ import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
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
+ import { u as useAdminQuery } from '../packem_shared/use-admin-query-BViPA3US.js';
7
+ import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
8
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js';
9
+ import { b as CLOUDFLARE_WORKERS_URL } from '../packem_shared/cf-links-BZfRdxSE.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 };