@hot-updater/console 0.36.7 → 1.0.0-rc.0

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 (266) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/AnalyticsCapabilityContext-BCke57-7.js +1 -0
  3. package/.output/public/assets/BundleActivityChart-CnsBe_1J.js +42 -0
  4. package/.output/public/assets/BundleIdDisplay-Dky75zLU.js +1 -0
  5. package/.output/public/assets/alert-C-1KvDW8.js +1 -0
  6. package/.output/public/assets/analytics-Bqz0c-BT.js +1 -0
  7. package/.output/public/assets/analytics-api-CJdrTLLO.js +1 -0
  8. package/.output/public/assets/api-B_Rh-uzC.js +1 -0
  9. package/.output/public/assets/api-keys-BurCFhzH.js +1 -0
  10. package/.output/public/assets/api-keys-api-BEDJdQg3.js +1 -0
  11. package/.output/public/assets/badge-Bf0fZ-Gx.js +1 -0
  12. package/.output/public/assets/chart-no-axes-combined-FaYMGmQS.js +1 -0
  13. package/.output/public/assets/createServerFn-gM2-LFBy.js +3 -0
  14. package/.output/public/assets/dialog-BS60BRr2.js +1 -0
  15. package/.output/public/assets/dist-DspNKfMj.js +1 -0
  16. package/.output/public/assets/download-O-yNBc9H.js +1 -0
  17. package/.output/public/assets/field-Buq148-A.js +1 -0
  18. package/.output/public/assets/index-kFhd2S78.js +10 -0
  19. package/.output/public/assets/installations-BrQ-od41.js +2 -0
  20. package/.output/public/assets/installations-CGlZ3ROz.js +1 -0
  21. package/.output/public/assets/lazyRouteComponent-rPzgA7S-.js +1 -0
  22. package/.output/public/assets/loader-circle-DCYF-wJl.js +1 -0
  23. package/.output/public/assets/preload-helper-TKOBYGYD.js +1 -0
  24. package/.output/public/assets/refresh-cw-n8XYbPPj.js +1 -0
  25. package/.output/public/assets/routes-CrdokJ80.js +1 -0
  26. package/.output/public/assets/routes-DcQnVajO.js +2 -0
  27. package/.output/public/assets/search-DLhbWw3W.js +1 -0
  28. package/.output/public/assets/shield-check-DE_hVuHu.js +1 -0
  29. package/.output/public/assets/signing-HRexfjsH.js +1 -0
  30. package/.output/public/assets/styles-eB4EtvFS.css +2 -0
  31. package/.output/public/assets/table-D8CLieHX.js +1 -0
  32. package/.output/public/assets/textarea-YJLTVAoq.js +1 -0
  33. package/.output/public/assets/useMutation-JsGVjQMY.js +1 -0
  34. package/.output/public/assets/useOpenInteractionType-4cRD5xO0.js +1 -0
  35. package/.output/server/__23tanstack-start-server-fn-resolver-DBP9TQ7K.mjs +146 -0
  36. package/.output/server/_libs/@base-ui/react+[...].mjs +16124 -0
  37. package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
  38. package/.output/server/_libs/@tanstack/react-router+[...].mjs +41 -10
  39. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +132 -0
  40. package/.output/server/_libs/d3-array.mjs +231 -0
  41. package/.output/server/_libs/d3-color.mjs +330 -0
  42. package/.output/server/_libs/d3-format.mjs +252 -0
  43. package/.output/server/_libs/d3-interpolate.mjs +207 -0
  44. package/.output/server/_libs/d3-path.mjs +77 -0
  45. package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
  46. package/.output/server/_libs/d3-shape.mjs +818 -0
  47. package/.output/server/_libs/decimal.js-light.mjs +884 -0
  48. package/.output/server/_libs/es-toolkit.mjs +1134 -0
  49. package/.output/server/_libs/eventemitter3.mjs +236 -0
  50. package/.output/server/_libs/immer.mjs +532 -0
  51. package/.output/server/_libs/lucide-react.mjs +141 -13
  52. package/.output/server/_libs/next-themes.mjs +2 -2
  53. package/.output/server/_libs/react-redux+[...].mjs +205 -0
  54. package/.output/server/_libs/recharts+[...].mjs +14117 -0
  55. package/.output/server/_libs/sonner.mjs +2 -2
  56. package/.output/server/_libs/tanstack__query-core.mjs +114 -1
  57. package/.output/server/_libs/tanstack__react-query.mjs +3 -4
  58. package/.output/server/_runtime.mjs +10 -1
  59. package/.output/server/_ssr/AnalyticsCapabilityContext-ui4DX8GO.mjs +15 -0
  60. package/.output/server/_ssr/BundleActivityChart-BiB9ZORH.mjs +288 -0
  61. package/.output/server/_ssr/BundleIdDisplay-Czk6iR6p.mjs +13 -0
  62. package/.output/server/_ssr/alert-Dim3MGY5.mjs +86 -0
  63. package/.output/server/_ssr/analytics-DtMTn8fn.mjs +858 -0
  64. package/.output/server/_ssr/analytics-api-Cg1M5v_H.mjs +71 -0
  65. package/.output/server/_ssr/analytics-input-fRRRn0uA.mjs +96 -0
  66. package/.output/server/_ssr/analytics-rpc-DY5uXvHT.mjs +155 -0
  67. package/.output/server/_ssr/api-BTSv1tZb.mjs +282 -0
  68. package/.output/server/_ssr/api-keys-BnM_o2nS.mjs +300 -0
  69. package/.output/server/_ssr/api-keys-api-CIywsSF5.mjs +60 -0
  70. package/.output/server/_ssr/api-keys-rpc-BSp1wkIV.mjs +136 -0
  71. package/.output/server/_ssr/api-rpc-cG5wd_tO.mjs +1468 -0
  72. package/.output/server/_ssr/auth-BF8mbAgF.mjs +21 -0
  73. package/.output/server/_ssr/auth-rpc-BrJ6obHJ.mjs +24 -0
  74. package/.output/server/_ssr/auth.server-DwKoZoQM.mjs +50 -0
  75. package/.output/server/_ssr/badge-DCxbEeof.mjs +26 -0
  76. package/.output/server/_ssr/bundle-signing-rpc-COoQhW8E.mjs +16 -0
  77. package/.output/server/_ssr/bundle-signing.server-D5u8KkMp.mjs +51 -0
  78. package/.output/server/_ssr/config-Dv8qLDZ0.mjs +13 -0
  79. package/.output/server/_ssr/config.server-DEiLhKmy.mjs +361 -0
  80. package/.output/server/_ssr/{createServerFn-DzU0k62V.mjs → createServerFn-B2hcXoPM.mjs} +1 -1
  81. package/.output/server/_ssr/createServerRpc-DB29C_5p.mjs +12 -0
  82. package/.output/server/_ssr/{sidebar-Cv_H0_Jv.mjs → createSsrRpc-9P0S0lJ3.mjs} +68 -50
  83. package/.output/server/_ssr/databaseRows-CwbNwYSl.mjs +166 -0
  84. package/.output/server/_ssr/deleteBundle-Cu_XOMt0.mjs +66 -0
  85. package/.output/server/_ssr/dialog-CQuRMNZ4.mjs +170 -0
  86. package/.output/server/_ssr/dist-BVSLTpoP.mjs +250 -0
  87. package/.output/server/_ssr/downloadBundle-CNnYxYO2.mjs +24 -0
  88. package/.output/server/_ssr/{empty-plugin-adapters-B4HCzgmM.mjs → empty-plugin-adapters-B5QvGpEl.mjs} +1 -1
  89. package/.output/server/_ssr/field-DRIXKjZG.mjs +74 -0
  90. package/.output/server/_ssr/{getBundleChildren-CVtSiH5t.mjs → getBundleChildren-BcRMFoDF.mjs} +10 -18
  91. package/.output/server/_ssr/installations-B-azgAvX.mjs +19 -0
  92. package/.output/server/_ssr/installations-Ctvzp2JH.mjs +535 -0
  93. package/.output/server/_ssr/router-C-KUBfOi.mjs +513 -0
  94. package/.output/server/_ssr/routes-BM4ht9jb.mjs +2286 -0
  95. package/.output/server/_ssr/routes-Z7TwC6nC.mjs +37 -0
  96. package/.output/server/_ssr/runtime.server-awTLiiXW.mjs +527 -0
  97. package/.output/server/_ssr/server-BjzmvXnO.mjs +7468 -0
  98. package/.output/server/_ssr/signing-k8GxyBDF.mjs +202 -0
  99. package/.output/server/_ssr/ssr.mjs +4 -5740
  100. package/.output/server/_ssr/start-DpViQGnt.mjs +4 -0
  101. package/.output/server/_ssr/table-v1yCvYo7.mjs +53 -0
  102. package/.output/server/_ssr/textarea-DYHnskhb.mjs +14 -0
  103. package/.output/server/_ssr/uuidv7-BbJ-9D_I.mjs +31 -0
  104. package/.output/server/_tanstack-start-manifest_v-CH4StzJu.mjs +108 -0
  105. package/.output/server/index.mjs +256 -53
  106. package/README.md +29 -8
  107. package/lib/index.d.mts +36 -0
  108. package/lib/index.mjs +4 -0
  109. package/lib/vite-internal.mjs +127 -0
  110. package/lib/vite.d.mts +10 -0
  111. package/lib/vite.mjs +5 -0
  112. package/package.json +51 -29
  113. package/public/apple-touch-icon.png +0 -0
  114. package/public/favicon-16x16.png +0 -0
  115. package/public/favicon-32x32.png +0 -0
  116. package/public/favicon.ico +0 -0
  117. package/public/logo.svg +1 -0
  118. package/public/manifest.json +30 -0
  119. package/public/robots.txt +3 -0
  120. package/src/components/AppSidebar.tsx +159 -0
  121. package/src/components/BundleIdDisplay.tsx +18 -0
  122. package/src/components/ChannelBadge.tsx +31 -0
  123. package/src/components/ConsoleAccessPage.tsx +122 -0
  124. package/src/components/EnabledStatusIcon.tsx +54 -0
  125. package/src/components/HashValueDisplay.tsx +85 -0
  126. package/src/components/HotUpdaterLogo.tsx +30 -0
  127. package/src/components/NotFoundPage.tsx +33 -0
  128. package/src/components/PlatformIcon.tsx +39 -0
  129. package/src/components/RolloutPercentageBadge.tsx +28 -0
  130. package/src/components/ThemeProvider.tsx +116 -0
  131. package/src/components/TimestampDisplay.tsx +41 -0
  132. package/src/components/features/analytics/ActivityChart.tsx +150 -0
  133. package/src/components/features/analytics/AnalyticsCapabilityContext.tsx +24 -0
  134. package/src/components/features/analytics/AnalyticsControls.tsx +115 -0
  135. package/src/components/features/analytics/AnalyticsErrorAlert.tsx +21 -0
  136. package/src/components/features/analytics/AnalyticsOverview.tsx +208 -0
  137. package/src/components/features/analytics/BundleDistribution.tsx +133 -0
  138. package/src/components/features/analytics/BundleSelector.tsx +114 -0
  139. package/src/components/features/analytics/InstallationHistoryCard.tsx +248 -0
  140. package/src/components/features/analytics/InstallationMatchesCard.tsx +132 -0
  141. package/src/components/features/analytics/InstallationPageHeader.tsx +138 -0
  142. package/src/components/features/analytics/InstallationPagination.tsx +48 -0
  143. package/src/components/features/analytics/InstallationSearch.tsx +230 -0
  144. package/src/components/features/analytics/UpdateOutcomes.tsx +147 -0
  145. package/src/components/features/api-keys/ApiKeysPage.tsx +377 -0
  146. package/src/components/features/bundles/BundleActivityChart.tsx +193 -0
  147. package/src/components/features/bundles/BundleAnalyticsSummary.tsx +123 -0
  148. package/src/components/features/bundles/BundleChildrenPanel.tsx +201 -0
  149. package/src/components/features/bundles/BundleMetadata.tsx +136 -0
  150. package/src/components/features/bundles/RolloutCohortsDialog.tsx +201 -0
  151. package/src/components/features/channels/ChannelManagementDialog.tsx +228 -0
  152. package/src/components/features/releases/ReleaseEditorSheet.tsx +879 -0
  153. package/src/components/features/releases/ReleaseStateBadge.tsx +20 -0
  154. package/src/components/features/signing/BundleSigningPage.tsx +247 -0
  155. package/src/components/ui/alert-dialog.tsx +185 -0
  156. package/src/components/ui/alert.tsx +76 -0
  157. package/src/components/ui/badge.tsx +49 -0
  158. package/src/components/ui/button.tsx +58 -0
  159. package/src/components/ui/card.tsx +89 -0
  160. package/src/components/ui/chart.tsx +371 -0
  161. package/src/components/ui/combobox.tsx +303 -0
  162. package/src/components/ui/dialog.tsx +156 -0
  163. package/src/components/ui/dropdown-menu.tsx +270 -0
  164. package/src/components/ui/field.tsx +235 -0
  165. package/src/components/ui/input-group.tsx +147 -0
  166. package/src/components/ui/input.tsx +19 -0
  167. package/src/components/ui/label.tsx +25 -0
  168. package/src/components/ui/progress.tsx +84 -0
  169. package/src/components/ui/select.tsx +205 -0
  170. package/src/components/ui/separator.tsx +23 -0
  171. package/src/components/ui/sheet.tsx +132 -0
  172. package/src/components/ui/sidebar.tsx +779 -0
  173. package/src/components/ui/skeleton.tsx +13 -0
  174. package/src/components/ui/slider.tsx +56 -0
  175. package/src/components/ui/sonner.tsx +45 -0
  176. package/src/components/ui/switch.tsx +25 -0
  177. package/src/components/ui/table.tsx +114 -0
  178. package/src/components/ui/textarea.tsx +18 -0
  179. package/src/components/ui/toggle-group.tsx +89 -0
  180. package/src/components/ui/toggle.tsx +43 -0
  181. package/src/components/ui/tooltip.tsx +66 -0
  182. package/src/hooks/use-mobile.ts +30 -0
  183. package/src/index.ts +48 -0
  184. package/src/lib/analytics-api.ts +145 -0
  185. package/src/lib/analytics-error.ts +19 -0
  186. package/src/lib/analytics-input.ts +187 -0
  187. package/src/lib/analytics-overview.ts +170 -0
  188. package/src/lib/analytics-rpc.ts +218 -0
  189. package/src/lib/api-keys-api.ts +69 -0
  190. package/src/lib/api-keys-rpc.ts +87 -0
  191. package/src/lib/api-rpc.ts +478 -0
  192. package/src/lib/api.ts +444 -0
  193. package/src/lib/auth-rpc.ts +16 -0
  194. package/src/lib/bundle-signing-api.ts +14 -0
  195. package/src/lib/bundle-signing-rpc.ts +16 -0
  196. package/src/lib/constants.ts +1 -0
  197. package/src/lib/git.ts +51 -0
  198. package/src/lib/server/auth.server.ts +43 -0
  199. package/src/lib/server/bundle-signing.server.ts +100 -0
  200. package/src/lib/server/config.server.ts +109 -0
  201. package/src/lib/server/console-runtime.server.ts +70 -0
  202. package/src/lib/server/deleteBundle.ts +145 -0
  203. package/src/lib/server/downloadBundle.ts +46 -0
  204. package/src/lib/server/getBundleChildren.ts +130 -0
  205. package/src/lib/server/listReleases.ts +61 -0
  206. package/src/lib/server/releaseActivity.ts +27 -0
  207. package/src/lib/server/releaseReachability.ts +95 -0
  208. package/src/lib/server/runtime.server.ts +172 -0
  209. package/src/lib/utils.ts +9 -0
  210. package/src/logo.svg +1 -0
  211. package/src/routeTree.gen.ts +199 -0
  212. package/src/router.tsx +21 -0
  213. package/src/routes/-installations-search.ts +19 -0
  214. package/src/routes/-releases-search.ts +74 -0
  215. package/src/routes/__root.tsx +174 -0
  216. package/src/routes/analytics.tsx +139 -0
  217. package/src/routes/api/auth/$.ts +19 -0
  218. package/src/routes/api/bundles/$bundleId/download.ts +17 -0
  219. package/src/routes/api-keys.tsx +37 -0
  220. package/src/routes/index.tsx +982 -0
  221. package/src/routes/installations.tsx +194 -0
  222. package/src/routes/signing.tsx +37 -0
  223. package/src/styles.css +152 -0
  224. package/src/virtual-modules.d.ts +21 -0
  225. package/src/vite-env.d.ts +1 -0
  226. package/src/vite-internal.ts +195 -0
  227. package/src/vite.ts +12 -0
  228. package/.output/public/assets/dist-DJX53faP.js +0 -3
  229. package/.output/public/assets/index-Iylis5kY.js +0 -10
  230. package/.output/public/assets/routes-HT21hs0C.js +0 -54
  231. package/.output/public/assets/styles-C0Re4quB.css +0 -2
  232. package/.output/server/__23tanstack-start-server-fn-resolver-CgwgZ0-i.mjs +0 -66
  233. package/.output/server/_libs/@floating-ui/core+[...].mjs +0 -698
  234. package/.output/server/_libs/@floating-ui/dom+[...].mjs +0 -644
  235. package/.output/server/_libs/@floating-ui/react-dom+[...].mjs +0 -839
  236. package/.output/server/_libs/@radix-ui/react-alert-dialog+[...].mjs +0 -2138
  237. package/.output/server/_libs/@radix-ui/react-popper+[...].mjs +0 -308
  238. package/.output/server/_libs/@radix-ui/react-select+[...].mjs +0 -1038
  239. package/.output/server/_libs/@tanstack/devtools-event-client+[...].mjs +0 -196
  240. package/.output/server/_libs/@tanstack/form-core+[...].mjs +0 -3228
  241. package/.output/server/_libs/@tanstack/react-form+[...].mjs +0 -430
  242. package/.output/server/_libs/@tanstack/react-table+[...].mjs +0 -2382
  243. package/.output/server/_libs/radix-ui__number.mjs +0 -6
  244. package/.output/server/_libs/radix-ui__primitive.mjs +0 -9
  245. package/.output/server/_libs/radix-ui__react-arrow.mjs +0 -23
  246. package/.output/server/_libs/radix-ui__react-collection.mjs +0 -78
  247. package/.output/server/_libs/radix-ui__react-direction.mjs +0 -13
  248. package/.output/server/_libs/radix-ui__react-label.mjs +0 -22
  249. package/.output/server/_libs/radix-ui__react-separator.mjs +0 -30
  250. package/.output/server/_libs/radix-ui__react-slider.mjs +0 -510
  251. package/.output/server/_libs/radix-ui__react-switch.mjs +0 -157
  252. package/.output/server/_libs/radix-ui__react-tooltip.mjs +0 -493
  253. package/.output/server/_ssr/api-rpc-BIbDUKSz.mjs +0 -292
  254. package/.output/server/_ssr/config.server-BSS366KT.mjs +0 -41
  255. package/.output/server/_ssr/deleteBundle-BgbZTtpW.mjs +0 -141
  256. package/.output/server/_ssr/dist-KboydRVk.mjs +0 -120
  257. package/.output/server/_ssr/router-C3hqEy3k.mjs +0 -307
  258. package/.output/server/_ssr/routes-B0lQvvlC.mjs +0 -3048
  259. package/.output/server/_ssr/start-02sLteYG.mjs +0 -4
  260. package/.output/server/_ssr/storageProfile-FVkjPoGb.mjs +0 -9
  261. package/.output/server/_tanstack-start-manifest_v-Bpx52WOU.mjs +0 -20
  262. package/.output/server/node_modules/tslib/modules/index.js +0 -70
  263. package/.output/server/node_modules/tslib/modules/package.json +0 -3
  264. package/.output/server/node_modules/tslib/package.json +0 -47
  265. package/.output/server/node_modules/tslib/tslib.js +0 -484
  266. package/.output/server/package.json +0 -9
@@ -0,0 +1,202 @@
1
+ import { it as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
+ import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
3
+ import { E as Clipboard, O as CircleCheck, T as Download, c as ShieldCheck, d as RefreshCw, n as TriangleAlert, x as Info } from "../_libs/lucide-react.mjs";
4
+ import { _ as Skeleton, g as SidebarTrigger, t as Button$1, w as createSsrRpc } from "./createSsrRpc-9P0S0lJ3.mjs";
5
+ import { n as useQuery } from "../_libs/tanstack__react-query.mjs";
6
+ import { t as Textarea } from "./textarea-DYHnskhb.mjs";
7
+ import { a as Card, i as AlertTitle, l as CardHeader, n as AlertAction, o as CardContent, r as AlertDescription, s as CardDescription, t as Alert, u as CardTitle } from "./alert-Dim3MGY5.mjs";
8
+ import { t as Badge } from "./badge-DCxbEeof.mjs";
9
+ import { n as toast } from "../_libs/sonner.mjs";
10
+ //#region node_modules/.nitro/vite/services/ssr/assets/signing-k8GxyBDF.js
11
+ var import_jsx_runtime = require_jsx_runtime();
12
+ var getBundleSigningInspectionRpc = createServerFn({ method: "GET" }).handler(createSsrRpc("662034966679a6d29db2b55e7ba665e26e6c9a58a5529f33aa857a2049616233"));
13
+ var bundleSigningQueryKey = ["bundle-signing"];
14
+ var getBundleSigningInspectionQueryOptions = () => ({
15
+ queryFn: () => getBundleSigningInspectionRpc(),
16
+ queryKey: bundleSigningQueryKey,
17
+ staleTime: 3e4
18
+ });
19
+ var useBundleSigningInspectionQuery = () => useQuery(getBundleSigningInspectionQueryOptions());
20
+ var PUBLIC_KEY_FILENAME = "hot-updater-public-key.pem";
21
+ function InspectionLoading() {
22
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
23
+ "aria-label": "Loading bundle signing",
24
+ className: "flex flex-col gap-6",
25
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-4 w-36" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-3 w-4/5" })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
26
+ className: "flex flex-col gap-4",
27
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-12 w-full" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-12 w-full" })]
28
+ })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-4 w-28" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-3 w-3/5" })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-56 w-full" }) })] })]
29
+ });
30
+ }
31
+ function InspectionError({ refetch }) {
32
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
33
+ variant: "destructive",
34
+ children: [
35
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, { "aria-hidden": "true" }),
36
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Bundle signing couldn't be loaded" }),
37
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "Check the Console connection and try again." }),
38
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertAction, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
39
+ onClick: refetch,
40
+ size: "xs",
41
+ variant: "outline",
42
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RefreshCw, { "data-icon": "inline-start" }), "Retry"]
43
+ }) })
44
+ ]
45
+ });
46
+ }
47
+ function SigningStatusCard({ inspection }) {
48
+ const enabled = inspection.status === "enabled";
49
+ const misconfigured = inspection.status === "misconfigured";
50
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
51
+ className: "flex flex-wrap items-center justify-between gap-2",
52
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
53
+ className: "text-sm font-medium",
54
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Signing status" })
55
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, {
56
+ variant: misconfigured ? "destructive" : enabled ? "default" : "outline",
57
+ children: enabled ? "Enabled" : misconfigured ? "Misconfigured" : "Disabled"
58
+ })]
59
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardDescription, { children: enabled ? "The Console found the public key configured for bundle verification." : misconfigured ? "Signing is enabled, but the public key cannot be inspected safely." : "Bundle signing is disabled in the current Hot Updater configuration." })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, {
60
+ className: "flex flex-col gap-5",
61
+ children: inspection.status === "disabled" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, { children: [
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, { "aria-hidden": "true" }),
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Configure signing outside the Console" }),
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "Use your signing provider or the Hot Updater CLI to configure a key. The Console never creates or stores private keys." })
65
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
66
+ className: "grid gap-4 sm:grid-cols-2",
67
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
68
+ className: "flex min-w-0 flex-col gap-1",
69
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
70
+ className: "text-xs text-muted-foreground",
71
+ children: "Provider"
72
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
73
+ className: "truncate text-sm font-medium",
74
+ children: inspection.provider
75
+ })]
76
+ }), inspection.status === "enabled" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
77
+ className: "flex min-w-0 flex-col gap-1",
78
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
79
+ className: "text-xs text-muted-foreground",
80
+ children: "Algorithm"
81
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
82
+ className: "text-sm font-medium",
83
+ children: inspection.algorithm
84
+ })]
85
+ }) : null]
86
+ }), inspection.status === "enabled" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
87
+ className: "flex min-w-0 flex-col gap-1 border-t pt-4",
88
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
89
+ className: "text-xs text-muted-foreground",
90
+ children: "SPKI SHA-256 fingerprint"
91
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
92
+ className: "break-all font-mono text-xs",
93
+ children: inspection.fingerprint
94
+ })]
95
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
96
+ variant: "destructive",
97
+ children: [
98
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, { "aria-hidden": "true" }),
99
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Public key unavailable" }),
100
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: inspection.message })
101
+ ]
102
+ })] })
103
+ })] });
104
+ }
105
+ function PublicKeyCard({ publicKey }) {
106
+ const copyPublicKey = async () => {
107
+ try {
108
+ await navigator.clipboard.writeText(publicKey);
109
+ toast.success("Public key copied");
110
+ } catch {
111
+ toast.error("Unable to copy public key");
112
+ }
113
+ };
114
+ const downloadPublicKey = () => {
115
+ const url = URL.createObjectURL(new Blob([`${publicKey}\n`], { type: "application/x-pem-file" }));
116
+ const link = document.createElement("a");
117
+ link.download = PUBLIC_KEY_FILENAME;
118
+ link.href = url;
119
+ link.click();
120
+ URL.revokeObjectURL(url);
121
+ };
122
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
123
+ className: "text-sm font-medium",
124
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Public key" })
125
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardDescription, { children: "This public key may be embedded in native app configuration. Private key material is never available in the Console." })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
126
+ className: "flex flex-col gap-3",
127
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Textarea, {
128
+ "aria-label": "Bundle signing public key",
129
+ className: "min-h-56 resize-none font-mono text-xs",
130
+ readOnly: true,
131
+ spellCheck: false,
132
+ value: publicKey
133
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
134
+ className: "flex flex-wrap gap-2",
135
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
136
+ onClick: () => void copyPublicKey(),
137
+ size: "sm",
138
+ variant: "outline",
139
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Clipboard, { "data-icon": "inline-start" }), "Copy"]
140
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
141
+ onClick: downloadPublicKey,
142
+ size: "sm",
143
+ variant: "outline",
144
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Download, { "data-icon": "inline-start" }), "Download"]
145
+ })]
146
+ })]
147
+ })] });
148
+ }
149
+ function BundleSigningPage() {
150
+ const inspection = useBundleSigningInspectionQuery();
151
+ if (inspection.isLoading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InspectionLoading, {});
152
+ if (inspection.isError || !inspection.data) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InspectionError, { refetch: () => void inspection.refetch() });
153
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
154
+ className: "flex flex-col gap-6",
155
+ children: [
156
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SigningStatusCard, { inspection: inspection.data }),
157
+ inspection.data.status === "enabled" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PublicKeyCard, { publicKey: inspection.data.publicKey }) : null,
158
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, { children: [
159
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleCheck, { "aria-hidden": "true" }),
160
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Read-only inspection" }),
161
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "Configure or rotate signing keys through the provider or Hot Updater CLI. The Console only reads a checked-in public key file." })
162
+ ] })
163
+ ]
164
+ });
165
+ }
166
+ function BundleSigningRoute() {
167
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
168
+ className: "flex h-svh min-h-0 flex-col",
169
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
170
+ className: "sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b bg-background px-3 py-3 sm:min-h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm",
171
+ children: [
172
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarTrigger, { className: "-ml-1" }),
173
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
174
+ className: "flex items-center gap-1.5",
175
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShieldCheck, {
176
+ "aria-hidden": "true",
177
+ className: "size-3.5 text-muted-foreground"
178
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
179
+ className: "text-sm font-medium",
180
+ children: "Bundle signing"
181
+ })]
182
+ }),
183
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, {
184
+ variant: "outline",
185
+ children: "Read-only"
186
+ }),
187
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
188
+ className: "basis-full pl-9 text-xs text-muted-foreground sm:basis-auto sm:pl-0",
189
+ children: "Inspect the public key used to verify signed updates."
190
+ })
191
+ ]
192
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
193
+ className: "min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6",
194
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
195
+ className: "mx-auto w-full max-w-5xl",
196
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BundleSigningPage, {})
197
+ })
198
+ })]
199
+ });
200
+ }
201
+ //#endregion
202
+ export { BundleSigningRoute as component };