@hot-updater/console 1.0.0-rc.2 → 1.0.0-rc.20

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 (275) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/ConsoleFeatureUnavailable-B9VYGA3N.js +1 -0
  3. package/.output/public/assets/HashValueDisplay-D880zntR.js +1 -0
  4. package/.output/public/assets/InsightsInfo-By_sPjTE.js +1 -0
  5. package/.output/public/assets/InsightsPageHeader-9_kx_LL7.js +1 -0
  6. package/.output/public/assets/NotFoundPage-Dys8C0cW.js +1 -0
  7. package/.output/public/assets/api-CtarlV0l.js +1 -0
  8. package/.output/public/assets/api-keys-DFF_QqtN.js +1 -0
  9. package/.output/public/assets/api-keys-evfsQ4sN.js +1 -0
  10. package/.output/public/assets/arrow-left-BP9D-ta_.js +1 -0
  11. package/.output/public/assets/arrow-up-right-CDP9Tevw.js +1 -0
  12. package/.output/public/assets/card-DzCPSRsh.js +1 -0
  13. package/.output/public/assets/console-features-api-yv7rm3DX.js +1 -0
  14. package/.output/public/assets/dialog-BDvCy_QO.js +1 -0
  15. package/.output/public/assets/dist-Clb6cQ9l.js +1 -0
  16. package/.output/public/assets/empty-C5x9mn_s.js +1 -0
  17. package/.output/public/assets/field-Bou7shoO.js +1 -0
  18. package/.output/public/assets/index-0eg3l8aC.js +10 -0
  19. package/.output/public/assets/input-group-DVtWFUUF.js +1 -0
  20. package/.output/public/assets/insights-2MbdiSNv.js +1 -0
  21. package/.output/public/assets/insights-C6tmCZHk.js +2 -0
  22. package/.output/public/assets/insights-CadS_aIA.js +42 -0
  23. package/.output/public/assets/insights-recovery-rpc-wvdyM4LD.js +1 -0
  24. package/.output/public/assets/insights-search-KIF7mRtB.js +1 -0
  25. package/.output/public/assets/insights-usage-rpc-qUkNtrWr.js +1 -0
  26. package/.output/public/assets/insights_.distribution-BhBs6PNA.js +1 -0
  27. package/.output/public/assets/insights_.distribution-CItZw3-8.js +1 -0
  28. package/.output/public/assets/insights_.distribution-CJUH_wAS.js +2 -0
  29. package/.output/public/assets/installations-CH2H7JQt.js +2 -0
  30. package/.output/public/assets/installations-DMeMuwsW.js +1 -0
  31. package/.output/public/assets/installations-DnvxI9Dt.js +1 -0
  32. package/.output/public/assets/loader-circle-Ca7C9YY1.js +1 -0
  33. package/.output/public/assets/mutation-x9L28_CD.js +1 -0
  34. package/.output/public/assets/preload-helper-BN-UkjOE.js +1 -0
  35. package/.output/public/assets/refresh-cw-CVGqvy8Z.js +1 -0
  36. package/.output/public/assets/routes-BhK8DuZA.js +1 -0
  37. package/.output/public/assets/routes-veKtDW39.js +2 -0
  38. package/.output/public/assets/sidebar-B45aMqRm.js +3 -0
  39. package/.output/public/assets/styles-Dn0pK1EX.css +2 -0
  40. package/.output/public/assets/table-CwLnN6KX.js +1 -0
  41. package/.output/public/assets/useCompositeListItem-CF7vsfcA.js +1 -0
  42. package/.output/public/assets/useMutation-CN1ygYEr.js +1 -0
  43. package/.output/public/assets/useOpenInteractionType-AnAMWYIY.js +1 -0
  44. package/.output/public/assets/valueToPercent-C-t8FT0y.js +1 -0
  45. package/.output/server/{__23tanstack-start-server-fn-resolver-B7ioJhtE.mjs → __23tanstack-start-server-fn-resolver-CUQLz7hs.mjs} +52 -40
  46. package/.output/server/_libs/@base-ui/react+[...].mjs +7044 -3622
  47. package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
  48. package/.output/server/_libs/@tanstack/react-router+[...].mjs +49 -3
  49. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +4 -4
  50. package/.output/server/_libs/d3-array.mjs +231 -0
  51. package/.output/server/_libs/d3-color.mjs +330 -0
  52. package/.output/server/_libs/d3-format.mjs +252 -0
  53. package/.output/server/_libs/d3-interpolate.mjs +207 -0
  54. package/.output/server/_libs/d3-path.mjs +77 -0
  55. package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
  56. package/.output/server/_libs/d3-shape.mjs +818 -0
  57. package/.output/server/_libs/decimal.js-light.mjs +884 -0
  58. package/.output/server/_libs/es-toolkit.mjs +1159 -0
  59. package/.output/server/_libs/eventemitter3.mjs +236 -0
  60. package/.output/server/_libs/immer.mjs +532 -0
  61. package/.output/server/_libs/lucide-react.mjs +46 -32
  62. package/.output/server/_libs/next-themes.mjs +2 -2
  63. package/.output/server/_libs/react-redux+[...].mjs +205 -0
  64. package/.output/server/_libs/recharts+[...].mjs +14350 -0
  65. package/.output/server/_libs/sonner.mjs +2 -2
  66. package/.output/server/_libs/tanstack__react-query.mjs +8 -3
  67. package/.output/server/_libs/verkit.mjs +99 -1
  68. package/.output/server/_runtime.mjs +10 -1
  69. package/.output/server/_ssr/ConsoleFeatureUnavailable-DoxET2AT.mjs +58 -0
  70. package/.output/server/_ssr/{HashValueDisplay-DwpGLfrl.mjs → HashValueDisplay-BplboHEb.mjs} +3 -3
  71. package/.output/server/_ssr/InsightsInfo-o2YPd5Qc.mjs +37 -0
  72. package/.output/server/_ssr/InsightsPageHeader-NExCJL1I.mjs +154 -0
  73. package/.output/server/_ssr/NotFoundPage-Cd-A8ock.mjs +37 -0
  74. package/.output/server/_ssr/api-B1Ro0uys.mjs +202 -0
  75. package/.output/server/_ssr/api-C0G9MTMI.mjs +4205 -0
  76. package/.output/server/_ssr/{api-keys-CZeTPQys.mjs → api-keys-CT3HG7KT.mjs} +49 -9
  77. package/.output/server/_ssr/api-keys-Dvvy1sem.mjs +5 -0
  78. package/.output/server/_ssr/api-keys-rpc-b1qTTFfG.mjs +52 -0
  79. package/.output/server/_ssr/api-rpc-Cbns2MGx.mjs +338 -0
  80. package/.output/server/_ssr/{auth-rpc-DUaeOWKK.mjs → auth-rpc-DChS7m9y.mjs} +6 -6
  81. package/.output/server/_ssr/auth.server-Ccqz2iVv.mjs +37 -0
  82. package/.output/server/_ssr/bundleActivity-D17Pb_h5.mjs +19 -0
  83. package/.output/server/_ssr/card-DMbcvlPz.mjs +49 -0
  84. package/.output/server/_ssr/config-DMEJdhoW.mjs +13 -0
  85. package/.output/server/_ssr/config.server-DyypN6cQ.mjs +60 -0
  86. package/.output/server/_ssr/console-access-KpPv5lin.mjs +17 -0
  87. package/.output/server/_ssr/console-features-CsbyHYfK.mjs +55 -0
  88. package/.output/server/_ssr/console-features-api-B-KVuo4p.mjs +43 -0
  89. package/.output/server/_ssr/console-features-rpc-Djyo5740.mjs +19 -0
  90. package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-B_I3Ll4M.mjs} +28 -2
  91. package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-DuNm5mmo.mjs} +2 -2
  92. package/.output/server/_ssr/databaseRows-CXxf_VIB.mjs +132 -0
  93. package/.output/server/_ssr/{deleteBundle-BTGwBgzx.mjs → deleteBundle-Dcc21Lbd.mjs} +9 -19
  94. package/.output/server/_ssr/{dialog-DS-nw-pA.mjs → dialog-cOmLTUV2.mjs} +2 -2
  95. package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-B-r4u3Lg.mjs} +28 -5
  96. package/.output/server/_ssr/{downloadBundle-CNnYxYO2.mjs → downloadBundle-CexOFoZ4.mjs} +6 -7
  97. package/.output/server/_ssr/empty-BHoY_5jt.mjs +49 -0
  98. package/.output/server/_ssr/{table-CnZmon_Z.mjs → field-mjhcNEXD.mjs} +63 -51
  99. package/.output/server/_ssr/getBundleChildren-DbDXe9wB.mjs +22 -0
  100. package/.output/server/_ssr/{input-group-BpsnmvZw.mjs → input-group-96H30HWC.mjs} +2 -2
  101. package/.output/server/_ssr/insights-D25VDVaz.mjs +5 -0
  102. package/.output/server/_ssr/insights-D359GJFL.mjs +14 -0
  103. package/.output/server/_ssr/insights-DgFv1NsO.mjs +1238 -0
  104. package/.output/server/_ssr/insights-api-ChAKrbhG.mjs +105 -0
  105. package/.output/server/_ssr/insights-failures-WQ-ttjOx.mjs +44 -0
  106. package/.output/server/_ssr/insights-failures-rpc-BFsqlltN.mjs +21 -0
  107. package/.output/server/_ssr/insights-recovery-DkL6bxMW.mjs +28 -0
  108. package/.output/server/_ssr/insights-recovery-rpc-2P5m8F62.mjs +46 -0
  109. package/.output/server/_ssr/insights-recovery-rpc-Tj8vNC19.mjs +20 -0
  110. package/.output/server/_ssr/{insights-rpc-38DujK0G.mjs → insights-rpc-DrkVmV9o.mjs} +22 -14
  111. package/.output/server/_ssr/insights-search-BsalnNw-.mjs +25 -0
  112. package/.output/server/_ssr/insights-usage-1nVTQrLy.mjs +29 -0
  113. package/.output/server/_ssr/insights-usage-rpc-Ct_4xHhZ.mjs +29 -0
  114. package/.output/server/_ssr/insights-usage-rpc-DaYIRtFK.mjs +41 -0
  115. package/.output/server/_ssr/insightsRecovery-CpGucWN1.mjs +45 -0
  116. package/.output/server/_ssr/insightsUsage-JYpKZAF7.mjs +56 -0
  117. package/.output/server/_ssr/insights_.distribution-Bcu6uYs_.mjs +5 -0
  118. package/.output/server/_ssr/insights_.distribution-D3Csuyjw.mjs +14 -0
  119. package/.output/server/_ssr/insights_.distribution-jQZEF07J.mjs +335 -0
  120. package/.output/server/_ssr/installations-B8Vh54lH.mjs +69 -0
  121. package/.output/server/_ssr/installations-BI5kelHv.mjs +5 -0
  122. package/.output/server/_ssr/{installations-DiVKEF5T.mjs → installations-Cxikllmx.mjs} +517 -54
  123. package/.output/server/_ssr/listReleases-DqU9t1l3.mjs +79 -0
  124. package/.output/server/_ssr/releaseManagement-B3e7I8J9.mjs +11 -0
  125. package/.output/server/_ssr/{router-B9wG_9f8.mjs → router-CRkm-wHD.mjs} +117 -124
  126. package/.output/server/_ssr/routes-B3IJo_jL.mjs +292 -0
  127. package/.output/server/_ssr/{routes-D7Yh_jfj.mjs → routes-CNAi0Mmv.mjs} +176 -455
  128. package/.output/server/_ssr/runtime.server-NucbYjc7.mjs +1372 -0
  129. package/.output/server/_ssr/select-BkPAJFL7.mjs +107 -0
  130. package/.output/server/_ssr/{server-D_C2rMzf.mjs → server-DKJYsaCP.mjs} +6 -32
  131. package/.output/server/_ssr/{createSsrRpc-DjWNJ0uc.mjs → sidebar-Cw1VuC7d.mjs} +117 -63
  132. package/.output/server/_ssr/ssr.mjs +1 -1
  133. package/.output/server/_ssr/table-q0P9wz7x.mjs +53 -0
  134. package/.output/server/_ssr/updateFailures-DMU9f0pK.mjs +24 -0
  135. package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-BzSO-fr-.mjs} +2 -2
  136. package/.output/server/_tanstack-start-manifest_v-Bb0gKDbb.mjs +124 -0
  137. package/.output/server/index.mjs +273 -168
  138. package/README.md +71 -65
  139. package/lib/index.d.mts +13 -11
  140. package/lib/vite-internal.mjs +6 -3
  141. package/package.json +8 -8
  142. package/src/components/AppSidebar.tsx +91 -71
  143. package/src/components/ConsoleAccessPage.tsx +5 -1
  144. package/src/components/ConsoleFeatureUnavailable.tsx +82 -0
  145. package/src/components/NotFoundPage.tsx +7 -7
  146. package/src/components/features/FeatureSlots.tsx +99 -0
  147. package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
  148. package/src/components/features/bundles/BundleMetadata.tsx +7 -4
  149. package/src/components/features/channels/ChannelManagementDialog.tsx +2 -5
  150. package/src/components/features/insights/AppUsage.tsx +370 -0
  151. package/src/components/features/insights/EstimatedCount.tsx +18 -0
  152. package/src/components/features/insights/EventDetails.tsx +117 -37
  153. package/src/components/features/insights/EventHistoryCard.tsx +112 -26
  154. package/src/components/features/insights/EventHistoryList.tsx +2 -2
  155. package/src/components/features/insights/InsightsControls.tsx +265 -102
  156. package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
  157. package/src/components/features/insights/InsightsInfo.tsx +48 -0
  158. package/src/components/features/insights/InsightsOverview.tsx +176 -173
  159. package/src/components/features/insights/InsightsPageHeader.tsx +35 -20
  160. package/src/components/features/insights/InsightsPeriodSelector.tsx +89 -0
  161. package/src/components/features/insights/InstallationHistoryCard.tsx +52 -10
  162. package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
  163. package/src/components/features/insights/ReleaseActivity.tsx +188 -0
  164. package/src/components/features/insights/ReportingDevicesSummary.tsx +65 -0
  165. package/src/components/features/insights/UpdateFailures.tsx +319 -0
  166. package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
  167. package/src/components/features/releases/ReleaseEditorSheet.tsx +24 -1
  168. package/src/components/ui/card.tsx +1 -1
  169. package/src/components/ui/empty.tsx +101 -0
  170. package/src/components/ui/scroll-area.tsx +52 -0
  171. package/src/components/ui/sidebar.tsx +22 -29
  172. package/src/components/ui/tabs.tsx +81 -0
  173. package/src/index.ts +12 -17
  174. package/src/lib/api-keys-api.ts +0 -28
  175. package/src/lib/api-keys-rpc.ts +27 -38
  176. package/src/lib/api-rpc.ts +197 -221
  177. package/src/lib/api.ts +11 -13
  178. package/src/lib/bundle-activity.ts +31 -0
  179. package/src/lib/console-access.ts +20 -0
  180. package/src/lib/console-features-api.ts +68 -0
  181. package/src/lib/console-features-rpc.ts +13 -0
  182. package/src/lib/console-features.ts +91 -0
  183. package/src/lib/insights-api.ts +37 -1
  184. package/src/lib/insights-failures-rpc.ts +21 -0
  185. package/src/lib/insights-failures.ts +129 -0
  186. package/src/lib/insights-recovery-rpc.ts +51 -0
  187. package/src/lib/insights-recovery.ts +68 -0
  188. package/src/lib/insights-retention.ts +21 -0
  189. package/src/lib/insights-rpc.ts +30 -12
  190. package/src/lib/insights-search.ts +58 -0
  191. package/src/lib/insights-usage-rpc.ts +29 -0
  192. package/src/lib/insights-usage.ts +74 -0
  193. package/src/lib/insights-view.ts +38 -2
  194. package/src/lib/scroll-restoration.ts +21 -0
  195. package/src/lib/server/adminInsights.ts +124 -0
  196. package/src/lib/server/auth.server.ts +13 -5
  197. package/src/lib/server/bundleActivity.ts +37 -0
  198. package/src/lib/server/config.server.ts +16 -32
  199. package/src/lib/server/console-feature-apis.ts +59 -0
  200. package/src/lib/server/console-runtime.server.ts +6 -40
  201. package/src/lib/server/deleteBundle.ts +16 -25
  202. package/src/lib/server/downloadBundle.ts +7 -10
  203. package/src/lib/server/getBundleChildren.ts +31 -122
  204. package/src/lib/server/insightsRecovery.ts +55 -0
  205. package/src/lib/server/insightsUsage.ts +63 -0
  206. package/src/lib/server/listReleases.ts +109 -44
  207. package/src/lib/server/releaseReachability.ts +4 -3
  208. package/src/lib/server/runtime.server.ts +132 -31
  209. package/src/lib/server/updateFailures.ts +31 -0
  210. package/src/routeTree.gen.ts +21 -21
  211. package/src/router.tsx +3 -2
  212. package/src/routes/-installations-search.ts +32 -8
  213. package/src/routes/-releases-search.ts +76 -29
  214. package/src/routes/__root.tsx +10 -4
  215. package/src/routes/api/bundles/$bundleId/download.ts +2 -5
  216. package/src/routes/api-keys.tsx +5 -2
  217. package/src/routes/index.tsx +167 -104
  218. package/src/routes/insights.tsx +100 -59
  219. package/src/routes/insights_.distribution.tsx +398 -0
  220. package/src/routes/installations.tsx +98 -41
  221. package/src/vite-internal.ts +6 -3
  222. package/.output/public/assets/HashValueDisplay-CB0Eskit.js +0 -1
  223. package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +0 -1
  224. package/.output/public/assets/api-keys-BzKocqRy.js +0 -1
  225. package/.output/public/assets/api-keys-api-BHcODB7q.js +0 -1
  226. package/.output/public/assets/card-Dhr_eFYj.js +0 -1
  227. package/.output/public/assets/chart-no-axes-combined-Dy4WJv2U.js +0 -1
  228. package/.output/public/assets/composite-Bp98A0Ld.js +0 -1
  229. package/.output/public/assets/createServerFn-CA8fs7QD.js +0 -3
  230. package/.output/public/assets/dialog-CUTrcPlB.js +0 -1
  231. package/.output/public/assets/dist-C_NydL0e.js +0 -1
  232. package/.output/public/assets/index-DdAz-CXv.js +0 -10
  233. package/.output/public/assets/input-group-cSOG4wh_.js +0 -1
  234. package/.output/public/assets/insights-C0PBSZ-n.js +0 -1
  235. package/.output/public/assets/installations-CE33wgbY.js +0 -2
  236. package/.output/public/assets/installations-CStZja8x.js +0 -1
  237. package/.output/public/assets/lazyRouteComponent-Ccp3bwBY.js +0 -1
  238. package/.output/public/assets/link-CI8idAUi.js +0 -1
  239. package/.output/public/assets/loader-circle-BoxLrsOu.js +0 -1
  240. package/.output/public/assets/preload-helper-CQ36nxok.js +0 -1
  241. package/.output/public/assets/refresh-cw-Bqc72UZG.js +0 -1
  242. package/.output/public/assets/routes-DGVXdzpw.js +0 -2
  243. package/.output/public/assets/routes-DTlwOr8I.js +0 -1
  244. package/.output/public/assets/shield-check-uK3MHWJZ.js +0 -1
  245. package/.output/public/assets/signing-CMf4aqDO.js +0 -1
  246. package/.output/public/assets/styles-BCvbtKsm.css +0 -2
  247. package/.output/public/assets/table-2vcV89QB.js +0 -1
  248. package/.output/public/assets/useCompositeListItem-CHLITE_4.js +0 -1
  249. package/.output/public/assets/x-DCd0j8c6.js +0 -1
  250. package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +0 -484
  251. package/.output/server/_ssr/api-keys-api-BUPQVSpk.mjs +0 -60
  252. package/.output/server/_ssr/api-keys-rpc-Cs7tS5_j.mjs +0 -136
  253. package/.output/server/_ssr/api-rpc-tAupfGQm.mjs +0 -1399
  254. package/.output/server/_ssr/auth.server-DW71WzsD.mjs +0 -47
  255. package/.output/server/_ssr/bundle-signing-rpc-BhnBw0-d.mjs +0 -16
  256. package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +0 -12
  257. package/.output/server/_ssr/card-BRiPmi0C.mjs +0 -108
  258. package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
  259. package/.output/server/_ssr/config.server-afDuAwaG.mjs +0 -368
  260. package/.output/server/_ssr/databaseJsonValue-d6I3nAS4.mjs +0 -45
  261. package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
  262. package/.output/server/_ssr/getBundleChildren-C0vh4ZvE.mjs +0 -50
  263. package/.output/server/_ssr/insights-BdS364Xu.mjs +0 -460
  264. package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +0 -303
  265. package/.output/server/_ssr/installations-CtA59MQG.mjs +0 -29
  266. package/.output/server/_ssr/routes-CKrrS2q2.mjs +0 -37
  267. package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +0 -438
  268. package/.output/server/_ssr/signing-Dz1WkZOf.mjs +0 -133
  269. package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +0 -97
  270. package/src/components/features/insights/InsightsBundleReports.tsx +0 -51
  271. package/src/components/features/signing/BundleSigningPage.tsx +0 -139
  272. package/src/lib/bundle-signing-api.ts +0 -14
  273. package/src/lib/bundle-signing-rpc.ts +0 -16
  274. package/src/lib/server/bundle-signing.server.ts +0 -23
  275. package/src/routes/signing.tsx +0 -37
@@ -1,438 +0,0 @@
1
- import { x as isUUIDv7 } from "./dist-CyzPaI5v.mjs";
2
- import { t as createUUIDv7 } from "./uuidv7-D0QFkPL_.mjs";
3
- import { i as toInsightsInstallationRow, n as isInsightsMovementEvent, t as compareInsightsText } from "./insightsContract-fjJDBeEE.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/runtime.server-DacU1TBV.js
5
- var InsightsBadRequestError = class extends Error {
6
- name = "InsightsBadRequestError";
7
- };
8
- var MAX_EVENT_STRING_LENGTH = 1024;
9
- var MAX_IDENTITY_LENGTH$1 = 255;
10
- var eventKeys = /* @__PURE__ */ new Set([
11
- "type",
12
- "installId",
13
- "toBundleId",
14
- "userId",
15
- "username",
16
- "platform",
17
- "appVersion",
18
- "channel",
19
- "cohort",
20
- "fingerprintHash",
21
- "fromBundleId",
22
- "fromReleaseId",
23
- "toReleaseId",
24
- "updateStrategy",
25
- "sdkVersion"
26
- ]);
27
- function isRecord$1(value) {
28
- return typeof value === "object" && value !== null && !Array.isArray(value);
29
- }
30
- function requireStringField(payload, key) {
31
- const value = payload[key];
32
- if (typeof value !== "string" || value.length === 0 || value.length > MAX_EVENT_STRING_LENGTH || new TextDecoder("utf-8", { ignoreBOM: true }).decode(new TextEncoder().encode(value)) !== value) throw new InsightsBadRequestError(`Invalid event field: ${key}`);
33
- return value;
34
- }
35
- function requireNullableStringField(payload, key) {
36
- if (payload[key] === null) return null;
37
- return requireStringField(payload, key);
38
- }
39
- function requireIdentityField(payload, key) {
40
- const value = requireStringField(payload, key);
41
- if (value.length > MAX_IDENTITY_LENGTH$1) throw new InsightsBadRequestError(`Invalid event field: ${key}`);
42
- return value;
43
- }
44
- function requireEvent(payload) {
45
- if (!isRecord$1(payload) || Object.keys(payload).some((key) => !eventKeys.has(key))) throw new InsightsBadRequestError("Invalid event payload");
46
- const platform = requireStringField(payload, "platform");
47
- if (platform !== "ios" && platform !== "android") throw new InsightsBadRequestError("Invalid event field: platform");
48
- const base = {
49
- installId: requireIdentityField(payload, "installId"),
50
- toBundleId: requireStringField(payload, "toBundleId"),
51
- ...payload.userId === void 0 ? {} : { userId: requireIdentityField(payload, "userId") },
52
- ...payload.username === void 0 ? {} : { username: requireStringField(payload, "username") },
53
- platform,
54
- appVersion: requireStringField(payload, "appVersion"),
55
- channel: requireStringField(payload, "channel"),
56
- cohort: requireStringField(payload, "cohort"),
57
- fingerprintHash: requireNullableStringField(payload, "fingerprintHash"),
58
- sdkVersion: payload.sdkVersion === void 0 ? null : requireNullableStringField(payload, "sdkVersion"),
59
- fromReleaseId: requireNullableStringField(payload, "fromReleaseId"),
60
- toReleaseId: requireNullableStringField(payload, "toReleaseId")
61
- };
62
- const type = requireStringField(payload, "type");
63
- switch (type) {
64
- case "UPDATE_APPLIED":
65
- case "RECOVERED":
66
- case "RELEASE_ADOPTED": {
67
- const updateStrategy = requireStringField(payload, "updateStrategy");
68
- if (updateStrategy !== "fingerprint" && updateStrategy !== "appVersion") throw new InsightsBadRequestError("Invalid event field: updateStrategy");
69
- return {
70
- ...base,
71
- type,
72
- fromBundleId: requireStringField(payload, "fromBundleId"),
73
- updateStrategy
74
- };
75
- }
76
- case "UNCHANGED":
77
- if (payload.fromBundleId !== null || payload.updateStrategy !== null) throw new InsightsBadRequestError("Invalid unchanged event shape");
78
- return {
79
- ...base,
80
- type,
81
- fromBundleId: null,
82
- updateStrategy: null
83
- };
84
- default: throw new InsightsBadRequestError("Invalid event field: type");
85
- }
86
- }
87
- function createBundleEventRow(input) {
88
- input = requireEvent(input);
89
- const base = {
90
- app_version: input.appVersion,
91
- channel: input.channel,
92
- cohort: input.cohort,
93
- fingerprint_hash: input.fingerprintHash,
94
- from_release_id: input.fromReleaseId,
95
- id: createUUIDv7(),
96
- install_id: input.installId,
97
- platform: input.platform,
98
- received_at_ms: Date.now(),
99
- sdk_version: input.sdkVersion ?? null,
100
- to_bundle_id: input.toBundleId,
101
- to_release_id: input.toReleaseId,
102
- user_id: input.userId ?? null,
103
- username: input.username ?? null
104
- };
105
- switch (input.type) {
106
- case "UPDATE_APPLIED":
107
- case "RECOVERED":
108
- case "RELEASE_ADOPTED": return {
109
- ...base,
110
- from_bundle_id: input.fromBundleId,
111
- type: input.type,
112
- update_strategy: input.updateStrategy
113
- };
114
- case "UNCHANGED": return {
115
- ...base,
116
- from_bundle_id: null,
117
- type: input.type,
118
- update_strategy: null
119
- };
120
- }
121
- }
122
- var DEFAULT_PAGE_LIMIT = 50;
123
- var MAX_PAGE_LIMIT = 100;
124
- var MAX_EVENT_ID_LENGTH = 1024;
125
- var MAX_IDENTITY_LENGTH = 255;
126
- var MAX_CURSOR_LENGTH = 8192;
127
- var WINDOW_MS = {
128
- "24h": 864e5,
129
- "7d": 6048e5,
130
- "30d": 2592e6
131
- };
132
- var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
133
- var requireString = (value, label, maximumLength) => {
134
- if (typeof value !== "string" || value.length === 0 || value.length > maximumLength || new TextDecoder("utf-8", { ignoreBOM: true }).decode(new TextEncoder().encode(value)) !== value) throw new InsightsBadRequestError(`Invalid ${label}.`);
135
- return value;
136
- };
137
- var requireTimestamp = (value, label) => {
138
- if (!Number.isSafeInteger(value) || Number(value) < 0) throw new InsightsBadRequestError(`Invalid ${label}.`);
139
- return Number(value);
140
- };
141
- var readLimit = (value) => {
142
- const limit = value ?? DEFAULT_PAGE_LIMIT;
143
- if (!Number.isSafeInteger(limit) || limit < 1 || limit > MAX_PAGE_LIMIT) throw new InsightsBadRequestError("Invalid page limit.");
144
- return limit;
145
- };
146
- var encodeBase64Url = (value) => {
147
- const bytes = new TextEncoder().encode(value);
148
- let binary = "";
149
- for (const byte of bytes) binary += String.fromCharCode(byte);
150
- return btoa(binary).replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/u, "");
151
- };
152
- var decodeBase64Url = (value) => {
153
- if (value.length === 0 || value.length > MAX_CURSOR_LENGTH) throw new InsightsBadRequestError("Invalid Insights cursor.");
154
- try {
155
- const base64 = value.replaceAll("-", "+").replaceAll("_", "/");
156
- const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, "=");
157
- const binary = atob(padded);
158
- const bytes = Uint8Array.from(binary, (character) => character.charCodeAt(0));
159
- return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
160
- } catch {
161
- throw new InsightsBadRequestError("Invalid Insights cursor.");
162
- }
163
- };
164
- var encodeCursor = (value) => encodeBase64Url(JSON.stringify(value));
165
- var decodeCursor = (value) => {
166
- try {
167
- return JSON.parse(decodeBase64Url(value));
168
- } catch (error) {
169
- if (error instanceof InsightsBadRequestError) throw error;
170
- throw new InsightsBadRequestError("Invalid Insights cursor.");
171
- }
172
- };
173
- var readScope = (input) => {
174
- if (input.platform !== "ios" && input.platform !== "android") throw new InsightsBadRequestError("Invalid Insights platform.");
175
- return {
176
- platform: input.platform,
177
- channel: requireString(input.channel, "channel", MAX_EVENT_ID_LENGTH)
178
- };
179
- };
180
- var bundleFilter = (input) => {
181
- const scope = readScope(input);
182
- const bundleId = requireString(input.bundleId, "bundle ID", MAX_EVENT_ID_LENGTH);
183
- switch (input.outcome) {
184
- case "applied": return {
185
- ...scope,
186
- type: "UPDATE_APPLIED",
187
- toBundleId: bundleId
188
- };
189
- case "recovered": return {
190
- ...scope,
191
- type: "RECOVERED",
192
- fromBundleId: bundleId
193
- };
194
- case "adopted": return {
195
- ...scope,
196
- type: "RELEASE_ADOPTED",
197
- toBundleId: bundleId
198
- };
199
- default: throw new InsightsBadRequestError("Invalid Insights outcome.");
200
- }
201
- };
202
- var sameFilter = (left, right) => {
203
- if (!isRecord(left) || left.kind !== right.kind) return false;
204
- switch (right.kind) {
205
- case "all": return true;
206
- case "installationMovement": return left.installId === right.installId;
207
- case "bundle": return left.platform === right.platform && left.channel === right.channel && left.type === right.type && (right.type === "RECOVERED" ? left.fromBundleId === right.fromBundleId : left.toBundleId === right.toBundleId);
208
- }
209
- };
210
- var readEventCursor = (value, filter) => {
211
- const cursor = decodeCursor(value);
212
- if (!isRecord(cursor) || cursor.version !== 2 || cursor.kind !== "events" || !isRecord(cursor.filter) || !isRecord(cursor.after)) throw new InsightsBadRequestError("Invalid Insights cursor.");
213
- if (!sameFilter(cursor.filter, filter)) throw new InsightsBadRequestError("Insights cursor does not match the requested events.");
214
- if (typeof cursor.after.id !== "string" || !isUUIDv7(cursor.after.id)) throw new InsightsBadRequestError("Invalid Insights event cursor ID.");
215
- return {
216
- after: {
217
- id: cursor.after.id,
218
- receivedAtMs: requireTimestamp(cursor.after.receivedAtMs, "event cursor")
219
- },
220
- beforeReceivedAtMs: requireTimestamp(cursor.beforeReceivedAtMs, "event cutoff"),
221
- kind: "events",
222
- sinceMs: requireTimestamp(cursor.sinceMs, "event start"),
223
- filter,
224
- version: 2
225
- };
226
- };
227
- var readUserInstallationCursor = (value, userId) => {
228
- const cursor = decodeCursor(value);
229
- if (!isRecord(cursor) || cursor.version !== 1 || cursor.kind !== "user-installations" || cursor.userId !== userId) throw new InsightsBadRequestError("Insights cursor does not match the requested user ID.");
230
- return {
231
- afterInstallId: requireString(cursor.afterInstallId, "installation cursor", MAX_IDENTITY_LENGTH),
232
- kind: "user-installations",
233
- userId,
234
- version: 1
235
- };
236
- };
237
- var compareEventNewest = (left, right) => right.received_at_ms - left.received_at_ms || compareInsightsText(right.id, left.id);
238
- var isAfterEventCursor = (row, after) => row.received_at_ms < after.receivedAtMs || row.received_at_ms === after.receivedAtMs && compareInsightsText(row.id, after.id) < 0;
239
- var assertEventRows = (rows, input) => {
240
- if (rows.length > input.limit) throw new Error("Insights database returned too many event rows.");
241
- for (let index = 0; index < rows.length; index += 1) {
242
- const row = rows[index];
243
- const previous = rows[index - 1];
244
- if (!row || typeof row.id !== "string" || !isUUIDv7(row.id) || !Number.isSafeInteger(row.received_at_ms) || row.received_at_ms >= input.beforeReceivedAtMs || row.received_at_ms < input.sinceMs || previous !== void 0 && compareEventNewest(previous, row) >= 0 || input.after !== void 0 && !isAfterEventCursor(row, input.after) || input.filter.kind === "installationMovement" && (row.install_id !== input.filter.installId || !isInsightsMovementEvent(row)) || input.filter.kind === "bundle" && (row.platform !== input.filter.platform || row.channel !== input.filter.channel || row.type !== input.filter.type || (input.filter.type === "RECOVERED" ? row.from_bundle_id !== input.filter.fromBundleId : row.to_bundle_id !== input.filter.toBundleId))) throw new Error("Insights database returned invalid event rows.");
245
- }
246
- };
247
- var toEventHistoryRow = (row) => ({
248
- appVersion: row.app_version,
249
- channel: row.channel,
250
- cohort: row.cohort,
251
- fromBundleId: row.from_bundle_id,
252
- id: row.id,
253
- installId: row.install_id,
254
- platform: row.platform,
255
- receivedAtMs: row.received_at_ms,
256
- toBundleId: row.to_bundle_id,
257
- type: row.type,
258
- userId: row.user_id,
259
- username: row.username
260
- });
261
- var toInstallationRow = (row) => ({
262
- appVersion: row.app_version,
263
- channel: row.channel,
264
- cohort: row.cohort,
265
- installId: row.install_id,
266
- lastKnownBundleId: row.to_bundle_id,
267
- latestStatus: row.type,
268
- platform: row.platform,
269
- receivedAtMs: row.received_at_ms,
270
- userId: row.user_id,
271
- username: row.username
272
- });
273
- var pageEventRows = async (model, input, filter, map) => {
274
- const limit = readLimit(input.limit);
275
- const cursor = input.cursor === void 0 ? void 0 : readEventCursor(input.cursor, filter);
276
- const beforeReceivedAtMs = cursor?.beforeReceivedAtMs ?? (input.beforeReceivedAtMs === void 0 ? Date.now() : requireTimestamp(input.beforeReceivedAtMs, "event cutoff"));
277
- if (cursor !== void 0 && input.beforeReceivedAtMs !== void 0 && input.beforeReceivedAtMs !== beforeReceivedAtMs) throw new InsightsBadRequestError("Insights cursor does not match the requested event cutoff.");
278
- const sinceMs = cursor?.sinceMs ?? (input.sinceMs === void 0 ? 0 : requireTimestamp(input.sinceMs, "event start"));
279
- if (sinceMs > beforeReceivedAtMs || input.sinceMs !== void 0 && input.sinceMs !== sinceMs || cursor !== void 0 && (cursor.after.receivedAtMs < sinceMs || cursor.after.receivedAtMs >= beforeReceivedAtMs)) throw new InsightsBadRequestError("Insights cursor or range does not match the requested event start.");
280
- const databaseInput = {
281
- filter,
282
- sinceMs,
283
- beforeReceivedAtMs,
284
- ...cursor === void 0 ? {} : { after: cursor.after },
285
- limit: limit + 1
286
- };
287
- const rows = await model.listEvents(databaseInput);
288
- assertEventRows(rows, databaseInput);
289
- const pageRows = rows.slice(0, limit);
290
- const last = pageRows.at(-1);
291
- return {
292
- beforeReceivedAtMs,
293
- data: pageRows.map(map),
294
- nextCursor: rows.length > limit && last ? encodeCursor({
295
- after: {
296
- id: last.id,
297
- receivedAtMs: last.received_at_ms
298
- },
299
- beforeReceivedAtMs,
300
- kind: "events",
301
- filter,
302
- sinceMs,
303
- version: 2
304
- }) : null
305
- };
306
- };
307
- var assertInstallationRows = (rows, input) => {
308
- if (rows.length > input.limit) throw new Error("Insights database returned too many installation rows.");
309
- for (let index = 0; index < rows.length; index += 1) {
310
- const row = rows[index];
311
- const previous = rows[index - 1];
312
- if (!row || row.user_id !== input.userId || input.afterInstallId !== void 0 && compareInsightsText(row.install_id, input.afterInstallId) <= 0 || previous !== void 0 && compareInsightsText(previous.install_id, row.install_id) >= 0) throw new Error("Insights database returned invalid installation rows.");
313
- }
314
- };
315
- var createInsightsProvider = (model) => Object.freeze({
316
- async appendBundleEvent(input) {
317
- const event = createBundleEventRow(input);
318
- await model.record({
319
- event,
320
- installation: toInsightsInstallationRow(event)
321
- });
322
- },
323
- listEvents(input) {
324
- return pageEventRows(model, input, input.bundle === void 0 ? { kind: "all" } : {
325
- kind: "bundle",
326
- ...bundleFilter(input.bundle)
327
- }, toEventHistoryRow);
328
- },
329
- async listInstallationEvents(input) {
330
- if ("bundle" in input && input.bundle !== void 0) throw new InsightsBadRequestError("Installation movement queries cannot include a bundle filter.");
331
- return pageEventRows(model, input, {
332
- kind: "installationMovement",
333
- installId: requireString(input.installId, "install ID", MAX_IDENTITY_LENGTH)
334
- }, (row) => toEventHistoryRow(row));
335
- },
336
- async getInstallation({ installId }) {
337
- const normalizedInstallId = requireString(installId, "install ID", MAX_IDENTITY_LENGTH);
338
- const rows = await model.findInstallations({ installId: normalizedInstallId });
339
- const row = rows[0] ?? null;
340
- if (rows.length > 1 || row !== null && row.install_id !== normalizedInstallId) throw new Error("Insights database returned an invalid installation.");
341
- return row === null ? null : toInstallationRow(row);
342
- },
343
- async pageInstallationsByCurrentUserId(input) {
344
- const userId = requireString(input.userId, "user ID", MAX_IDENTITY_LENGTH);
345
- const limit = readLimit(input.limit);
346
- const cursor = input.cursor === void 0 ? void 0 : readUserInstallationCursor(input.cursor, userId);
347
- const databaseInput = {
348
- userId,
349
- ...cursor === void 0 ? {} : { afterInstallId: cursor.afterInstallId },
350
- limit: limit + 1
351
- };
352
- const rows = await model.findInstallations(databaseInput);
353
- assertInstallationRows(rows, databaseInput);
354
- const pageRows = rows.slice(0, limit);
355
- const last = pageRows.at(-1);
356
- return {
357
- data: pageRows.map(toInstallationRow),
358
- nextCursor: rows.length > limit && last ? encodeCursor({
359
- afterInstallId: last.install_id,
360
- kind: "user-installations",
361
- userId,
362
- version: 1
363
- }) : null
364
- };
365
- },
366
- async getReportingOverview(input) {
367
- const scope = readScope(input);
368
- const { window } = input;
369
- if (!Object.hasOwn(WINDOW_MS, window)) throw new InsightsBadRequestError("Invalid reporting installation window.");
370
- const beforeReceivedAtMs = Date.now();
371
- const sinceMs = Math.max(0, beforeReceivedAtMs - WINDOW_MS[window]);
372
- const measure = async (count) => {
373
- const value = await count;
374
- if (!Number.isSafeInteger(value) || value < 0) throw new Error("Insights database returned an invalid count.");
375
- return {
376
- count: value,
377
- measuredAtMs: Date.now()
378
- };
379
- };
380
- const bundleId = input.bundleId === void 0 ? void 0 : requireString(input.bundleId, "bundle ID", MAX_EVENT_ID_LENGTH);
381
- const reporting = measure(model.countInstallations({
382
- ...scope,
383
- sinceMs
384
- }));
385
- if (bundleId === void 0) return {
386
- ...scope,
387
- window,
388
- sinceMs,
389
- beforeReceivedAtMs,
390
- reportingInstallations: await reporting
391
- };
392
- const countOutcome = (outcome) => measure(model.countEvents({
393
- filter: bundleFilter({
394
- ...scope,
395
- bundleId,
396
- outcome
397
- }),
398
- sinceMs,
399
- beforeReceivedAtMs
400
- }));
401
- const [reportingInstallations, bundleInstallations, appliedReports, recoveredReports, adoptedReports] = await Promise.all([
402
- reporting,
403
- measure(model.countInstallations({
404
- ...scope,
405
- sinceMs,
406
- bundleId
407
- })),
408
- countOutcome("applied"),
409
- countOutcome("recovered"),
410
- countOutcome("adopted")
411
- ]);
412
- return {
413
- ...scope,
414
- window,
415
- sinceMs,
416
- beforeReceivedAtMs,
417
- reportingInstallations,
418
- bundle: {
419
- bundleId,
420
- reportingInstallations: bundleInstallations,
421
- appliedReports,
422
- recoveredReports,
423
- adoptedReports
424
- }
425
- };
426
- }
427
- });
428
- function createRuntimeHotUpdater(config) {
429
- return createInsightsProvider(config.database.models.insights);
430
- }
431
- function createApiKeyStore(config) {
432
- const models = Reflect.get(config.database, "models");
433
- const apiKeys = typeof models === "object" && models !== null ? Reflect.get(models, "apiKeys") : void 0;
434
- if (typeof apiKeys !== "object" || apiKeys === null || typeof Reflect.get(apiKeys, "create") !== "function" || typeof Reflect.get(apiKeys, "findByHash") !== "function" || typeof Reflect.get(apiKeys, "list") !== "function" || typeof Reflect.get(apiKeys, "revoke") !== "function") return null;
435
- return apiKeys;
436
- }
437
- //#endregion
438
- export { createApiKeyStore, createRuntimeHotUpdater };
@@ -1,133 +0,0 @@
1
- import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
2
- import { q as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
- import { S as Info, c as ShieldCheck, d as RefreshCw, k as CircleCheck, n as TriangleAlert } from "../_libs/lucide-react.mjs";
4
- import { _ as Skeleton, g as SidebarTrigger, t as Button$1, w as createSsrRpc } from "./createSsrRpc-DjWNJ0uc.mjs";
5
- import { n as useQuery } from "../_libs/tanstack__react-query.mjs";
6
- import { a as Badge, c as CardDescription, d as CardTitle, i as AlertTitle, n as AlertAction, o as Card, r as AlertDescription, s as CardContent, t as Alert, u as CardHeader } from "./card-BRiPmi0C.mjs";
7
- //#region node_modules/.nitro/vite/services/ssr/assets/signing-Dz1WkZOf.js
8
- var import_jsx_runtime = require_jsx_runtime();
9
- var getBundleSigningInspectionRpc = createServerFn({ method: "GET" }).handler(createSsrRpc("662034966679a6d29db2b55e7ba665e26e6c9a58a5529f33aa857a2049616233"));
10
- var bundleSigningQueryKey = ["bundle-signing"];
11
- var getBundleSigningInspectionQueryOptions = () => ({
12
- queryFn: () => getBundleSigningInspectionRpc(),
13
- queryKey: bundleSigningQueryKey,
14
- staleTime: 3e4
15
- });
16
- var useBundleSigningInspectionQuery = () => useQuery(getBundleSigningInspectionQueryOptions());
17
- function InspectionLoading() {
18
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
19
- "aria-label": "Loading bundle signing",
20
- className: "flex flex-col gap-6",
21
- 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, {
22
- className: "flex flex-col gap-4",
23
- 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" })]
24
- })] }), /* @__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" }) })] })]
25
- });
26
- }
27
- function InspectionError({ refetch }) {
28
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
29
- variant: "destructive",
30
- children: [
31
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, { "aria-hidden": "true" }),
32
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Bundle signing couldn't be loaded" }),
33
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "Check the Console connection and try again." }),
34
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertAction, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
35
- onClick: refetch,
36
- size: "xs",
37
- variant: "outline",
38
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RefreshCw, { "data-icon": "inline-start" }), "Retry"]
39
- }) })
40
- ]
41
- });
42
- }
43
- function SigningStatusCard({ inspection }) {
44
- const enabled = inspection.status === "enabled";
45
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
46
- className: "flex flex-wrap items-center justify-between gap-2",
47
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
48
- className: "text-sm font-medium",
49
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Signing status" })
50
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, {
51
- variant: enabled ? "default" : "outline",
52
- children: enabled ? "Enabled" : "Disabled"
53
- })]
54
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardDescription, { children: enabled ? "Bundle signing is enabled in the current Hot Updater configuration." : "Bundle signing is disabled in the current Hot Updater configuration." })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, {
55
- className: "flex flex-col gap-5",
56
- children: inspection.status === "disabled" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, { children: [
57
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, { "aria-hidden": "true" }),
58
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Configure signing outside the Console" }),
59
- /* @__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." })
60
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
61
- className: "grid gap-4 sm:grid-cols-2",
62
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
63
- className: "flex min-w-0 flex-col gap-1",
64
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
65
- className: "text-xs text-muted-foreground",
66
- children: "Provider"
67
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
68
- className: "truncate text-sm font-medium",
69
- children: inspection.provider
70
- })]
71
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
72
- className: "flex min-w-0 flex-col gap-1",
73
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
74
- className: "text-xs text-muted-foreground",
75
- children: "Algorithm"
76
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
77
- className: "text-sm font-medium",
78
- children: inspection.algorithm
79
- })]
80
- })]
81
- })
82
- })] });
83
- }
84
- function BundleSigningPage() {
85
- const inspection = useBundleSigningInspectionQuery();
86
- if (inspection.isLoading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InspectionLoading, {});
87
- if (inspection.isError || !inspection.data) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InspectionError, { refetch: () => void inspection.refetch() });
88
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
89
- className: "flex flex-col gap-6",
90
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SigningStatusCard, { inspection: inspection.data }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, { children: [
91
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleCheck, { "aria-hidden": "true" }),
92
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Read-only inspection" }),
93
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "Configure or rotate signing keys through the provider or Hot Updater CLI. The Console never accesses signing credentials." })
94
- ] })]
95
- });
96
- }
97
- function BundleSigningRoute() {
98
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
99
- className: "flex h-svh min-h-0 flex-col",
100
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
101
- 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",
102
- children: [
103
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarTrigger, { className: "-ml-1" }),
104
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
105
- className: "flex items-center gap-1.5",
106
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShieldCheck, {
107
- "aria-hidden": "true",
108
- className: "size-3.5 text-muted-foreground"
109
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
110
- className: "text-sm font-medium",
111
- children: "Bundle signing"
112
- })]
113
- }),
114
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, {
115
- variant: "outline",
116
- children: "Read-only"
117
- }),
118
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
119
- className: "basis-full pl-9 text-xs text-muted-foreground sm:basis-auto sm:pl-0",
120
- children: "Inspect the public key used to verify signed updates."
121
- })
122
- ]
123
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
124
- className: "min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6",
125
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
126
- className: "mx-auto w-full max-w-5xl",
127
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BundleSigningPage, {})
128
- })
129
- })]
130
- });
131
- }
132
- //#endregion
133
- export { BundleSigningRoute as component };
@@ -1,97 +0,0 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-2MjTyxil.js
2
- var tsrStartManifest = () => ({ routes: {
3
- __root__: {
4
- filePath: "/home/runner/work/hot-updater/hot-updater/packages/console/src/routes/__root.tsx",
5
- children: [
6
- "/",
7
- "/api-keys",
8
- "/insights",
9
- "/installations",
10
- "/signing",
11
- "/api/auth/$",
12
- "/api/bundles/$bundleId/download"
13
- ],
14
- preloads: [
15
- "/assets/index-DdAz-CXv.js",
16
- "/assets/createServerFn-CA8fs7QD.js",
17
- "/assets/preload-helper-CQ36nxok.js",
18
- "/assets/installations-CE33wgbY.js",
19
- "/assets/loader-circle-BoxLrsOu.js",
20
- "/assets/link-CI8idAUi.js",
21
- "/assets/lazyRouteComponent-Ccp3bwBY.js",
22
- "/assets/chart-no-axes-combined-Dy4WJv2U.js",
23
- "/assets/shield-check-uK3MHWJZ.js",
24
- "/assets/api-keys-api-BHcODB7q.js",
25
- "/assets/routes-DGVXdzpw.js",
26
- "/assets/dist-C_NydL0e.js"
27
- ],
28
- scripts: [{ attrs: {
29
- type: "module",
30
- async: !0,
31
- src: "/assets/index-DdAz-CXv.js"
32
- } }]
33
- },
34
- "/": {
35
- filePath: "/home/runner/work/hot-updater/hot-updater/packages/console/src/routes/index.tsx",
36
- children: void 0,
37
- preloads: [
38
- "/assets/routes-DTlwOr8I.js",
39
- "/assets/dialog-CUTrcPlB.js",
40
- "/assets/composite-Bp98A0Ld.js",
41
- "/assets/useCompositeListItem-CHLITE_4.js",
42
- "/assets/table-2vcV89QB.js",
43
- "/assets/HashValueDisplay-CB0Eskit.js",
44
- "/assets/x-DCd0j8c6.js",
45
- "/assets/card-Dhr_eFYj.js",
46
- "/assets/input-group-cSOG4wh_.js"
47
- ]
48
- },
49
- "/api-keys": {
50
- filePath: "/home/runner/work/hot-updater/hot-updater/packages/console/src/routes/api-keys.tsx",
51
- children: void 0,
52
- preloads: [
53
- "/assets/api-keys-BzKocqRy.js",
54
- "/assets/dialog-CUTrcPlB.js",
55
- "/assets/table-2vcV89QB.js",
56
- "/assets/refresh-cw-Bqc72UZG.js",
57
- "/assets/card-Dhr_eFYj.js"
58
- ]
59
- },
60
- "/insights": {
61
- filePath: "/home/runner/work/hot-updater/hot-updater/packages/console/src/routes/insights.tsx",
62
- children: void 0,
63
- preloads: [
64
- "/assets/insights-C0PBSZ-n.js",
65
- "/assets/composite-Bp98A0Ld.js",
66
- "/assets/useCompositeListItem-CHLITE_4.js",
67
- "/assets/InsightsPageHeader-Car5LNiZ.js",
68
- "/assets/table-2vcV89QB.js",
69
- "/assets/card-Dhr_eFYj.js"
70
- ]
71
- },
72
- "/installations": {
73
- filePath: "/home/runner/work/hot-updater/hot-updater/packages/console/src/routes/installations.tsx",
74
- children: void 0,
75
- preloads: [
76
- "/assets/installations-CStZja8x.js",
77
- "/assets/InsightsPageHeader-Car5LNiZ.js",
78
- "/assets/table-2vcV89QB.js",
79
- "/assets/HashValueDisplay-CB0Eskit.js",
80
- "/assets/refresh-cw-Bqc72UZG.js",
81
- "/assets/x-DCd0j8c6.js",
82
- "/assets/card-Dhr_eFYj.js",
83
- "/assets/input-group-cSOG4wh_.js"
84
- ]
85
- },
86
- "/signing": {
87
- filePath: "/home/runner/work/hot-updater/hot-updater/packages/console/src/routes/signing.tsx",
88
- children: void 0,
89
- preloads: [
90
- "/assets/signing-CMf4aqDO.js",
91
- "/assets/refresh-cw-Bqc72UZG.js",
92
- "/assets/card-Dhr_eFYj.js"
93
- ]
94
- }
95
- } });
96
- //#endregion
97
- export { tsrStartManifest };