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

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 (285) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/ConsoleFeatureUnavailable-D0LPL1Gy.js +1 -0
  3. package/.output/public/assets/HashValueDisplay-BmuB4FW-.js +1 -0
  4. package/.output/public/assets/InsightsInfo--v4SC07c.js +1 -0
  5. package/.output/public/assets/InsightsPageHeader-dU83CAQY.js +1 -0
  6. package/.output/public/assets/NotFoundPage-B5mhGG2a.js +1 -0
  7. package/.output/public/assets/api-D-vOVlQ4.js +1 -0
  8. package/.output/public/assets/api-keys-Csh8ARKU.js +1 -0
  9. package/.output/public/assets/api-keys-OMPUoA_A.js +1 -0
  10. package/.output/public/assets/arrow-left-Bwq9X1eS.js +1 -0
  11. package/.output/public/assets/arrow-up-right-BkOVn4if.js +1 -0
  12. package/.output/public/assets/card-C_7d6O9a.js +1 -0
  13. package/.output/public/assets/console-features-api-C1jRZTGw.js +1 -0
  14. package/.output/public/assets/dialog-DE8wFN_P.js +1 -0
  15. package/.output/public/assets/dist-C7ENGzpS.js +1 -0
  16. package/.output/public/assets/empty-CVd5NlQD.js +1 -0
  17. package/.output/public/assets/field-C06q1iC9.js +1 -0
  18. package/.output/public/assets/index-BeWlQtO6.js +11 -0
  19. package/.output/public/assets/input-group-Bi61biIA.js +1 -0
  20. package/.output/public/assets/insights-BjnAtC0f.js +2 -0
  21. package/.output/public/assets/insights-D86m11yH.js +42 -0
  22. package/.output/public/assets/insights-DpYstMoY.js +1 -0
  23. package/.output/public/assets/insights-recovery-rpc-BIm5_ALc.js +1 -0
  24. package/.output/public/assets/insights-search-KIF7mRtB.js +1 -0
  25. package/.output/public/assets/insights-usage-rpc-VHj8vyBt.js +1 -0
  26. package/.output/public/assets/insights_.distribution-ADcrX48c.js +2 -0
  27. package/.output/public/assets/insights_.distribution-CuuJUN6Y.js +1 -0
  28. package/.output/public/assets/insights_.distribution-DJRjuXsO.js +1 -0
  29. package/.output/public/assets/installations-BSBBzqWs.js +2 -0
  30. package/.output/public/assets/installations-DqIE6WcO.js +1 -0
  31. package/.output/public/assets/installations-UsELbDvw.js +1 -0
  32. package/.output/public/assets/loader-circle-CnCBxzHp.js +1 -0
  33. package/.output/public/assets/mutation-Csp7xUNh.js +1 -0
  34. package/.output/public/assets/preload-helper-B-cOmpLH.js +1 -0
  35. package/.output/public/assets/refresh-cw-FF1NtzlQ.js +1 -0
  36. package/.output/public/assets/routes-CoN9XHP_.js +2 -0
  37. package/.output/public/assets/routes-DT1jB0Zi.js +1 -0
  38. package/.output/public/assets/sidebar-D8mJRF15.js +3 -0
  39. package/.output/public/assets/styles-Bwt7v6U5.css +2 -0
  40. package/.output/public/assets/table-WBgfvgXg.js +1 -0
  41. package/.output/public/assets/useCompositeListItem-CloBmDwn.js +1 -0
  42. package/.output/public/assets/useMutation-DO8cvsTx.js +1 -0
  43. package/.output/public/assets/useOpenInteractionType-ReGr9GzJ.js +1 -0
  44. package/.output/public/assets/valueToPercent-BvPAi4bP.js +1 -0
  45. package/.output/server/{__23tanstack-start-server-fn-resolver-B7ioJhtE.mjs → __23tanstack-start-server-fn-resolver-DMRD4e4f.mjs} +51 -47
  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 +3803 -4023
  49. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +141 -98
  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__history.mjs +68 -41
  67. package/.output/server/_libs/tanstack__query-core.mjs +1618 -309
  68. package/.output/server/_libs/tanstack__react-query.mjs +262 -22
  69. package/.output/server/_libs/verkit.mjs +99 -1
  70. package/.output/server/_runtime.mjs +10 -1
  71. package/.output/server/_ssr/ConsoleFeatureUnavailable-Du7jNPNS.mjs +58 -0
  72. package/.output/server/_ssr/{HashValueDisplay-DwpGLfrl.mjs → HashValueDisplay-GQvFkXoi.mjs} +3 -3
  73. package/.output/server/_ssr/InsightsInfo-Do7QSaFR.mjs +37 -0
  74. package/.output/server/_ssr/InsightsPageHeader-DSUWUWRc.mjs +154 -0
  75. package/.output/server/_ssr/NotFoundPage-DsF4Vrhg.mjs +37 -0
  76. package/.output/server/_ssr/api-BEiVs0H7.mjs +203 -0
  77. package/.output/server/_ssr/api-keys-BrvBWGRf.mjs +5 -0
  78. package/.output/server/_ssr/{api-keys-CZeTPQys.mjs → api-keys-K5v32nf7.mjs} +49 -9
  79. package/.output/server/_ssr/api-keys-rpc-B96bBllm.mjs +52 -0
  80. package/.output/server/_ssr/api-rpc-DcUe280B.mjs +296 -0
  81. package/.output/server/_ssr/{auth-rpc-DUaeOWKK.mjs → auth-rpc-C68W56DP.mjs} +6 -6
  82. package/.output/server/_ssr/auth.server-DM1J6NwR.mjs +5712 -0
  83. package/.output/server/_ssr/bundleActivity-CpuY9CTP.mjs +19 -0
  84. package/.output/server/_ssr/card-CPAEKx0w.mjs +49 -0
  85. package/.output/server/_ssr/config-nsIcsHh8.mjs +15 -0
  86. package/.output/server/_ssr/config.server-DDCZk3Sq.mjs +36 -0
  87. package/.output/server/_ssr/console-access-Da-2Qd7q.mjs +17 -0
  88. package/.output/server/_ssr/console-features-Dzu2iUGD.mjs +55 -0
  89. package/.output/server/_ssr/console-features-api-xAsSgFa_.mjs +43 -0
  90. package/.output/server/_ssr/console-features-rpc-qARGpB24.mjs +19 -0
  91. package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-BdBf_ezN.mjs} +67 -56
  92. package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-B_y2lrwA.mjs} +2 -2
  93. package/.output/server/_ssr/{databaseJsonValue-d6I3nAS4.mjs → databaseJsonValue-Bhxciy7Z.mjs} +28 -5
  94. package/.output/server/_ssr/databaseRows-DwMAjaF8.mjs +74 -0
  95. package/.output/server/_ssr/{dialog-DS-nw-pA.mjs → dialog-q__BJ7mQ.mjs} +2 -2
  96. package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-Cxo9ghYv.mjs} +140 -6
  97. package/.output/server/_ssr/{downloadBundle-CNnYxYO2.mjs → downloadBundle-BW9I-pMQ.mjs} +10 -10
  98. package/.output/server/_ssr/empty-DcBTAooP.mjs +49 -0
  99. package/.output/server/_ssr/{empty-plugin-adapters-B5QvGpEl.mjs → empty-plugin-adapters-CYdinE-i.mjs} +1 -1
  100. package/.output/server/_ssr/{table-CnZmon_Z.mjs → field-QCDBVpXA.mjs} +63 -51
  101. package/.output/server/_ssr/getBundleChildren-DIAGCF4a.mjs +22 -0
  102. package/.output/server/_ssr/{input-group-BpsnmvZw.mjs → input-group-hCk2nUoU.mjs} +2 -2
  103. package/.output/server/_ssr/insights-BfBO0RFr.mjs +1238 -0
  104. package/.output/server/_ssr/insights-DsAU3-TB.mjs +14 -0
  105. package/.output/server/_ssr/insights-RIfg447W.mjs +5 -0
  106. package/.output/server/_ssr/insights-api-CDn-QQHU.mjs +105 -0
  107. package/.output/server/_ssr/insights-failures-BBGMhuUr.mjs +44 -0
  108. package/.output/server/_ssr/insights-failures-rpc-rA2dctK2.mjs +21 -0
  109. package/.output/server/_ssr/insights-recovery-Dpk6Mfb9.mjs +28 -0
  110. package/.output/server/_ssr/insights-recovery-rpc-BCaF-xSd.mjs +46 -0
  111. package/.output/server/_ssr/insights-recovery-rpc-CcgYyUHk.mjs +20 -0
  112. package/.output/server/_ssr/{insights-rpc-38DujK0G.mjs → insights-rpc-keycmwzw.mjs} +22 -14
  113. package/.output/server/_ssr/insights-search-BRg5VsNe.mjs +25 -0
  114. package/.output/server/_ssr/insights-usage-cbw9n2Fq.mjs +29 -0
  115. package/.output/server/_ssr/insights-usage-rpc-BKgV1QDf.mjs +29 -0
  116. package/.output/server/_ssr/insights-usage-rpc-D-JYachy.mjs +41 -0
  117. package/.output/server/_ssr/insightsRecovery-B7oMc8d8.mjs +45 -0
  118. package/.output/server/_ssr/insightsUsage-Oa7kk5ek.mjs +56 -0
  119. package/.output/server/_ssr/insights_.distribution-BIqOqRW0.mjs +335 -0
  120. package/.output/server/_ssr/insights_.distribution-CuUrDa7P.mjs +5 -0
  121. package/.output/server/_ssr/insights_.distribution-RT_6x_ud.mjs +14 -0
  122. package/.output/server/_ssr/{installations-DiVKEF5T.mjs → installations-BO5CjX2z.mjs} +517 -54
  123. package/.output/server/_ssr/installations-BjaHiIfh.mjs +5 -0
  124. package/.output/server/_ssr/installations-Dt5luA-N.mjs +69 -0
  125. package/.output/server/_ssr/listReleases-BitHzOYB.mjs +79 -0
  126. package/.output/server/_ssr/releaseManagement-B3e7I8J9.mjs +11 -0
  127. package/.output/server/_ssr/{router-B9wG_9f8.mjs → router-DfVAixxe.mjs} +135 -139
  128. package/.output/server/_ssr/{routes-D7Yh_jfj.mjs → routes-C6LstNp8.mjs} +176 -455
  129. package/.output/server/_ssr/routes-Q3Uhmwwz.mjs +292 -0
  130. package/.output/server/_ssr/runtime.server-fL0o6I2b.mjs +1459 -0
  131. package/.output/server/_ssr/schema-BKY9SqaY.mjs +25 -0
  132. package/.output/server/_ssr/select-CUlInmjk.mjs +107 -0
  133. package/.output/server/_ssr/server-C43wq9ft.mjs +8330 -0
  134. package/.output/server/_ssr/{createSsrRpc-DjWNJ0uc.mjs → sidebar-DKbx2ach.mjs} +117 -63
  135. package/.output/server/_ssr/ssr.mjs +1 -1
  136. package/.output/server/_ssr/start-BXUOv_n8.mjs +4 -0
  137. package/.output/server/_ssr/table-NGWV8B-S.mjs +53 -0
  138. package/.output/server/_ssr/updateFailures-Jwe2Baab.mjs +24 -0
  139. package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-C8bwiZr8.mjs} +2 -2
  140. package/.output/server/_tanstack-start-manifest_v-WQ5qGn8n.mjs +124 -0
  141. package/.output/server/index.mjs +267 -162
  142. package/LICENSE +13 -14
  143. package/README.md +82 -72
  144. package/lib/index.d.mts +23 -11
  145. package/lib/vite-internal.mjs +13 -3
  146. package/lib/vite.d.mts +2 -0
  147. package/package.json +14 -14
  148. package/src/components/AppSidebar.tsx +100 -71
  149. package/src/components/ConsoleAccessPage.tsx +5 -1
  150. package/src/components/ConsoleFeatureUnavailable.tsx +80 -0
  151. package/src/components/NotFoundPage.tsx +7 -7
  152. package/src/components/features/FeatureSlots.tsx +99 -0
  153. package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
  154. package/src/components/features/bundles/BundleMetadata.tsx +8 -5
  155. package/src/components/features/bundles/RolloutCohortsDialog.tsx +1 -1
  156. package/src/components/features/channels/ChannelManagementDialog.tsx +2 -5
  157. package/src/components/features/insights/AppUsage.tsx +370 -0
  158. package/src/components/features/insights/EstimatedCount.tsx +18 -0
  159. package/src/components/features/insights/EventDetails.tsx +117 -37
  160. package/src/components/features/insights/EventHistoryCard.tsx +112 -26
  161. package/src/components/features/insights/EventHistoryList.tsx +2 -2
  162. package/src/components/features/insights/InsightsControls.tsx +265 -102
  163. package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
  164. package/src/components/features/insights/InsightsInfo.tsx +48 -0
  165. package/src/components/features/insights/InsightsOverview.tsx +176 -173
  166. package/src/components/features/insights/InsightsPageHeader.tsx +35 -20
  167. package/src/components/features/insights/InsightsPeriodSelector.tsx +89 -0
  168. package/src/components/features/insights/InstallationHistoryCard.tsx +52 -10
  169. package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
  170. package/src/components/features/insights/ReleaseActivity.tsx +188 -0
  171. package/src/components/features/insights/ReportingDevicesSummary.tsx +65 -0
  172. package/src/components/features/insights/UpdateFailures.tsx +319 -0
  173. package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
  174. package/src/components/features/releases/ReleaseEditorSheet.tsx +30 -7
  175. package/src/components/ui/card.tsx +1 -1
  176. package/src/components/ui/empty.tsx +101 -0
  177. package/src/components/ui/scroll-area.tsx +52 -0
  178. package/src/components/ui/sidebar.tsx +22 -29
  179. package/src/components/ui/tabs.tsx +81 -0
  180. package/src/index.ts +26 -19
  181. package/src/lib/api-keys-api.ts +0 -28
  182. package/src/lib/api-keys-rpc.ts +27 -38
  183. package/src/lib/api-rpc.ts +189 -266
  184. package/src/lib/api.ts +19 -102
  185. package/src/lib/bundle-activity.ts +31 -0
  186. package/src/lib/console-access.ts +20 -0
  187. package/src/lib/console-features-api.ts +68 -0
  188. package/src/lib/console-features-rpc.ts +13 -0
  189. package/src/lib/console-features.ts +91 -0
  190. package/src/lib/insights-api.ts +37 -1
  191. package/src/lib/insights-failures-rpc.ts +21 -0
  192. package/src/lib/insights-failures.ts +129 -0
  193. package/src/lib/insights-recovery-rpc.ts +51 -0
  194. package/src/lib/insights-recovery.ts +68 -0
  195. package/src/lib/insights-retention.ts +21 -0
  196. package/src/lib/insights-rpc.ts +30 -12
  197. package/src/lib/insights-search.ts +58 -0
  198. package/src/lib/insights-usage-rpc.ts +29 -0
  199. package/src/lib/insights-usage.ts +74 -0
  200. package/src/lib/insights-view.ts +38 -2
  201. package/src/lib/scroll-restoration.ts +21 -0
  202. package/src/lib/server/adminInsights.ts +124 -0
  203. package/src/lib/server/auth.server.ts +13 -5
  204. package/src/lib/server/bundleActivity.ts +37 -0
  205. package/src/lib/server/config.server.ts +21 -74
  206. package/src/lib/server/console-feature-apis.ts +59 -0
  207. package/src/lib/server/console-runtime.server.ts +82 -38
  208. package/src/lib/server/downloadBundle.ts +16 -15
  209. package/src/lib/server/getBundleChildren.ts +31 -122
  210. package/src/lib/server/insightsRecovery.ts +55 -0
  211. package/src/lib/server/insightsUsage.ts +63 -0
  212. package/src/lib/server/listReleases.ts +109 -44
  213. package/src/lib/server/releaseReachability.ts +8 -7
  214. package/src/lib/server/runtime.server.ts +120 -31
  215. package/src/lib/server/updateFailures.ts +31 -0
  216. package/src/routeTree.gen.ts +44 -44
  217. package/src/router.tsx +3 -2
  218. package/src/routes/-installations-search.ts +32 -8
  219. package/src/routes/-releases-search.ts +76 -29
  220. package/src/routes/__root.tsx +10 -4
  221. package/src/routes/api/bundles/$bundleId/download.ts +2 -5
  222. package/src/routes/api-keys.tsx +5 -2
  223. package/src/routes/index.tsx +167 -104
  224. package/src/routes/insights.tsx +100 -59
  225. package/src/routes/insights_.distribution.tsx +398 -0
  226. package/src/routes/installations.tsx +98 -41
  227. package/src/vite-internal.ts +15 -3
  228. package/src/vite.ts +2 -0
  229. package/.output/public/assets/HashValueDisplay-CB0Eskit.js +0 -1
  230. package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +0 -1
  231. package/.output/public/assets/api-keys-BzKocqRy.js +0 -1
  232. package/.output/public/assets/api-keys-api-BHcODB7q.js +0 -1
  233. package/.output/public/assets/card-Dhr_eFYj.js +0 -1
  234. package/.output/public/assets/chart-no-axes-combined-Dy4WJv2U.js +0 -1
  235. package/.output/public/assets/composite-Bp98A0Ld.js +0 -1
  236. package/.output/public/assets/createServerFn-CA8fs7QD.js +0 -3
  237. package/.output/public/assets/dialog-CUTrcPlB.js +0 -1
  238. package/.output/public/assets/dist-C_NydL0e.js +0 -1
  239. package/.output/public/assets/index-DdAz-CXv.js +0 -10
  240. package/.output/public/assets/input-group-cSOG4wh_.js +0 -1
  241. package/.output/public/assets/insights-C0PBSZ-n.js +0 -1
  242. package/.output/public/assets/installations-CE33wgbY.js +0 -2
  243. package/.output/public/assets/installations-CStZja8x.js +0 -1
  244. package/.output/public/assets/lazyRouteComponent-Ccp3bwBY.js +0 -1
  245. package/.output/public/assets/link-CI8idAUi.js +0 -1
  246. package/.output/public/assets/loader-circle-BoxLrsOu.js +0 -1
  247. package/.output/public/assets/preload-helper-CQ36nxok.js +0 -1
  248. package/.output/public/assets/refresh-cw-Bqc72UZG.js +0 -1
  249. package/.output/public/assets/routes-DGVXdzpw.js +0 -2
  250. package/.output/public/assets/routes-DTlwOr8I.js +0 -1
  251. package/.output/public/assets/shield-check-uK3MHWJZ.js +0 -1
  252. package/.output/public/assets/signing-CMf4aqDO.js +0 -1
  253. package/.output/public/assets/styles-BCvbtKsm.css +0 -2
  254. package/.output/public/assets/table-2vcV89QB.js +0 -1
  255. package/.output/public/assets/useCompositeListItem-CHLITE_4.js +0 -1
  256. package/.output/public/assets/x-DCd0j8c6.js +0 -1
  257. package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +0 -484
  258. package/.output/server/_ssr/api-keys-api-BUPQVSpk.mjs +0 -60
  259. package/.output/server/_ssr/api-keys-rpc-Cs7tS5_j.mjs +0 -136
  260. package/.output/server/_ssr/api-rpc-tAupfGQm.mjs +0 -1399
  261. package/.output/server/_ssr/auth.server-DW71WzsD.mjs +0 -47
  262. package/.output/server/_ssr/bundle-signing-rpc-BhnBw0-d.mjs +0 -16
  263. package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +0 -12
  264. package/.output/server/_ssr/card-BRiPmi0C.mjs +0 -108
  265. package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
  266. package/.output/server/_ssr/config.server-afDuAwaG.mjs +0 -368
  267. package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
  268. package/.output/server/_ssr/deleteBundle-BTGwBgzx.mjs +0 -66
  269. package/.output/server/_ssr/getBundleChildren-C0vh4ZvE.mjs +0 -50
  270. package/.output/server/_ssr/insights-BdS364Xu.mjs +0 -460
  271. package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +0 -303
  272. package/.output/server/_ssr/installations-CtA59MQG.mjs +0 -29
  273. package/.output/server/_ssr/routes-CKrrS2q2.mjs +0 -37
  274. package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +0 -438
  275. package/.output/server/_ssr/server-D_C2rMzf.mjs +0 -7468
  276. package/.output/server/_ssr/signing-Dz1WkZOf.mjs +0 -133
  277. package/.output/server/_ssr/start-DpViQGnt.mjs +0 -4
  278. package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +0 -97
  279. package/src/components/features/insights/InsightsBundleReports.tsx +0 -51
  280. package/src/components/features/signing/BundleSigningPage.tsx +0 -139
  281. package/src/lib/bundle-signing-api.ts +0 -14
  282. package/src/lib/bundle-signing-rpc.ts +0 -16
  283. package/src/lib/server/bundle-signing.server.ts +0 -23
  284. package/src/lib/server/deleteBundle.ts +0 -145
  285. package/src/routes/signing.tsx +0 -37
@@ -0,0 +1,5 @@
1
+ import { t as ConsoleFeatureUnavailable } from "./ConsoleFeatureUnavailable-Du7jNPNS.mjs";
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/installations-BjaHiIfh.js
3
+ var SplitNotFoundComponent = ConsoleFeatureUnavailable;
4
+ //#endregion
5
+ export { SplitNotFoundComponent as notFoundComponent };
@@ -0,0 +1,69 @@
1
+ import { f as lazyRouteComponent, p as createFileRoute } from "../_libs/@tanstack/react-router+[...].mjs";
2
+ import { r as requireConsoleFeature } from "./console-features-api-xAsSgFa_.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/installations-Dt5luA-N.js
4
+ var DAY_MS = 864e5;
5
+ /** The time ranges an event list reads, shortest first. */
6
+ var eventRanges = {
7
+ "24h": {
8
+ period: "24 hours",
9
+ durationMs: DAY_MS
10
+ },
11
+ "7d": {
12
+ period: "7 days",
13
+ durationMs: 7 * DAY_MS
14
+ },
15
+ "30d": {
16
+ period: "30 days",
17
+ durationMs: 30 * DAY_MS
18
+ },
19
+ "90d": {
20
+ period: "90 days",
21
+ durationMs: 90 * DAY_MS
22
+ }
23
+ };
24
+ var EVENT_RANGES = Object.keys(eventRanges);
25
+ /** The next longer range, or undefined for the longest. */
26
+ var widerEventRange = (range) => EVENT_RANGES[EVENT_RANGES.indexOf(range) + 1];
27
+ /**
28
+ * The receipt interval [sinceMs, beforeReceivedAtMs) a range covers. The end
29
+ * stays fixed while the list pages, so every page reads the same interval.
30
+ */
31
+ var eventRangeBounds = (range, beforeReceivedAtMs) => ({
32
+ beforeReceivedAtMs,
33
+ sinceMs: Math.max(0, beforeReceivedAtMs - eventRanges[range].durationMs)
34
+ });
35
+ var readCursor = (value) => typeof value === "string" && value.length > 0 ? value : void 0;
36
+ var readTimestamp = (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? value : void 0;
37
+ var readEventRange = (value) => EVENT_RANGES.find((range) => range === value);
38
+ /**
39
+ * The installations route's scroll-restoration key: every visit to one page
40
+ * of the event list shares its scroll position, and a lookup keeps its own
41
+ * for each history entry.
42
+ */
43
+ function installationsScrollRestorationKey(location) {
44
+ const search = validateInstallationsSearch(location.search);
45
+ return search.query === void 0 && search.installId === void 0 ? `/installations?eventsBefore=${search.eventsBefore ?? "new"}&eventsRange=${search.eventsRange ?? "7d"}&eventsCursor=${search.eventsCursor ?? "first"}` : location.state.__TSR_key;
46
+ }
47
+ function validateInstallationsSearch(search) {
48
+ return {
49
+ query: typeof search.query === "string" ? search.query : void 0,
50
+ installId: typeof search.installId === "string" ? search.installId : void 0,
51
+ eventsCursor: readCursor(search.eventsCursor),
52
+ eventsBefore: readTimestamp(search.eventsBefore),
53
+ eventsRange: readEventRange(search.eventsRange),
54
+ searchCursor: readCursor(search.searchCursor),
55
+ historyCursor: readCursor(search.historyCursor),
56
+ historyBefore: readTimestamp(search.historyBefore)
57
+ };
58
+ }
59
+ var $$splitComponentImporter = () => import("./installations-BO5CjX2z.mjs");
60
+ var $$splitNotFoundComponentImporter = () => import("./installations-BjaHiIfh.mjs");
61
+ var Route = createFileRoute("/installations")({
62
+ beforeLoad: ({ context }) => requireConsoleFeature(context.queryClient, "insights"),
63
+ notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter, "notFoundComponent"),
64
+ component: lazyRouteComponent($$splitComponentImporter, "component"),
65
+ staticData: { scrollRestorationKey: installationsScrollRestorationKey },
66
+ validateSearch: validateInstallationsSearch
67
+ });
68
+ //#endregion
69
+ export { installationsScrollRestorationKey as a, eventRanges as i, Route as n, widerEventRange as o, eventRangeBounds as r, EVENT_RANGES as t };
@@ -0,0 +1,79 @@
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/listReleases-BitHzOYB.js
2
+ var isRecord = (value) => typeof value === "object" && value !== null;
3
+ var text = (value, name) => {
4
+ if (typeof value !== "string" || value.length === 0) throw new Error(`Release filter ${name} is required.`);
5
+ return value;
6
+ };
7
+ var enabledOf = (value) => {
8
+ if (value === void 0) return {};
9
+ if (typeof value !== "boolean") throw new Error("Release filter enabled must be true or false.");
10
+ return { enabled: value };
11
+ };
12
+ /**
13
+ * A release list's filter: none, a channel with its platform (and enabled),
14
+ * a bundle, or a scope (and enabled). Those are the sets the release indexes
15
+ * serve, so any other combination is refused.
16
+ */
17
+ var readReleaseFilter = (value) => {
18
+ if (value === void 0) return { kind: "all" };
19
+ if (!isRecord(value)) throw new Error("Invalid release filter.");
20
+ switch (value.kind) {
21
+ case "all": return { kind: "all" };
22
+ case "channelPlatform":
23
+ if (value.platform !== "ios" && value.platform !== "android") throw new Error("Release filter platform must be ios or android.");
24
+ return {
25
+ kind: "channelPlatform",
26
+ channelId: text(value.channelId, "channelId"),
27
+ platform: value.platform,
28
+ ...enabledOf(value.enabled)
29
+ };
30
+ case "bundle": return {
31
+ kind: "bundle",
32
+ bundleId: text(value.bundleId, "bundleId")
33
+ };
34
+ case "scope": return {
35
+ kind: "scope",
36
+ scopeKey: text(value.scopeKey, "scopeKey"),
37
+ ...enabledOf(value.enabled)
38
+ };
39
+ default: throw new Error("Invalid release filter.");
40
+ }
41
+ };
42
+ /**
43
+ * One page of releases, newest first, through the index the filter names:
44
+ * each page reads only its own rows. `next` is set for a full page, so the
45
+ * last page may lead to an empty one.
46
+ */
47
+ async function listReleases(core, input) {
48
+ const { filter, limit } = input;
49
+ if (input.afterReleaseId !== void 0) {
50
+ const data = (await core.listReleases({
51
+ filter,
52
+ order: "asc",
53
+ after: input.afterReleaseId,
54
+ limit
55
+ })).reverse();
56
+ const first = data[0]?.id;
57
+ const last = data.at(-1)?.id;
58
+ return {
59
+ data,
60
+ ...last === void 0 ? {} : { next: last },
61
+ ...first !== void 0 && data.length === limit ? { previous: first } : {}
62
+ };
63
+ }
64
+ const data = await core.listReleases({
65
+ filter,
66
+ order: "desc",
67
+ limit,
68
+ ...input.beforeReleaseId === void 0 ? {} : { after: input.beforeReleaseId }
69
+ });
70
+ const first = data[0]?.id;
71
+ const last = data.at(-1)?.id;
72
+ return {
73
+ data,
74
+ ...last !== void 0 && data.length === limit ? { next: last } : {},
75
+ ...first !== void 0 && input.beforeReleaseId !== void 0 ? { previous: first } : {}
76
+ };
77
+ }
78
+ //#endregion
79
+ export { readReleaseFilter as n, listReleases as t };
@@ -0,0 +1,11 @@
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/releaseManagement-B3e7I8J9.js
2
+ var ReleaseManagementError = class extends Error {
3
+ code;
4
+ name = "ReleaseManagementError";
5
+ constructor(code, message) {
6
+ super(message);
7
+ this.code = code;
8
+ }
9
+ };
10
+ //#endregion
11
+ export { ReleaseManagementError as t };
@@ -1,17 +1,20 @@
1
- import { r as __toESM } from "../_runtime.mjs";
2
- import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
3
- import { J as require_react, q as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
4
- import { F as ChartNoAxesCombined, S as Info, _ as Moon, c as ShieldCheck, g as OctagonX, k as CircleCheck, m as Package, n as TriangleAlert, o as Sun, x as KeyRound, y as LoaderCircle } from "../_libs/lucide-react.mjs";
5
- import { S as buttonVariants, a as SidebarContent, b as TooltipProvider, c as SidebarGroupContent, d as SidebarInset, f as SidebarMenu, h as SidebarProvider, i as Sidebar, l as SidebarGroupLabel, m as SidebarMenuItem, o as SidebarFooter, p as SidebarMenuButton, s as SidebarGroup, t as Button$1, u as SidebarHeader, w as createSsrRpc } from "./createSsrRpc-DjWNJ0uc.mjs";
6
- import { a as HeadContent, d as lazyRouteComponent, f as createFileRoute, i as Scripts, l as createRouter, m as Link, o as useRouterState, p as createRootRouteWithContext, u as Outlet } from "../_libs/@tanstack/react-router+[...].mjs";
1
+ import { i as __toESM } from "../_runtime.mjs";
2
+ import { u as createServerFn } from "./createMiddleware-BdBf_ezN.mjs";
3
+ import { mt as require_react, pt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
4
+ import { S as Info, g as Moon, h as OctagonX, k as CircleCheck, m as Package, n as TriangleAlert, o as Sun, v as LogOut, y as LoaderCircle } from "../_libs/lucide-react.mjs";
5
+ import { T as TooltipProvider, _ as SidebarMenu, b as SidebarProvider, d as SidebarFooter, f as SidebarGroup, g as SidebarInset, h as SidebarHeader, j as useSidebar, k as createSsrRpc, l as Sidebar, m as SidebarGroupLabel, p as SidebarGroupContent, t as Button$1, u as SidebarContent, v as SidebarMenuButton, y as SidebarMenuItem } from "./sidebar-DKbx2ach.mjs";
6
+ import { a as HeadContent, d as Outlet, f as lazyRouteComponent, h as Link, i as Scripts, m as createRootRouteWithContext, p as createFileRoute, s as useRouterState, u as createRouter } from "../_libs/@tanstack/react-router+[...].mjs";
7
7
  import { t as QueryClient } from "../_libs/tanstack__query-core.mjs";
8
- import { n as useApiKeyCapabilityQuery, t as ensureApiKeyRouteAccess } from "./api-keys-api-BUPQVSpk.mjs";
9
- import { t as Toaster } from "../_libs/sonner.mjs";
10
- import { n as getInsightsScrollRestorationKey, t as Route$6 } from "./installations-CtA59MQG.mjs";
11
- import { t as Route$7 } from "./routes-CKrrS2q2.mjs";
8
+ import { r as requireConsoleFeature, t as consoleFeaturesQueryOptions } from "./console-features-api-xAsSgFa_.mjs";
9
+ import { t as NotFoundPage } from "./NotFoundPage-DsF4Vrhg.mjs";
10
+ import { n as toast, t as Toaster } from "../_libs/sonner.mjs";
11
+ import { t as Route$4 } from "./insights-DsAU3-TB.mjs";
12
+ import { t as Route$5 } from "./insights_.distribution-RT_6x_ud.mjs";
13
+ import { n as Route$6 } from "./installations-Dt5luA-N.mjs";
14
+ import { n as Route$7, o as useFeatureUi } from "./routes-Q3Uhmwwz.mjs";
12
15
  import { t as setupRouterSsrQueryIntegration } from "../_libs/@tanstack/react-router-ssr-query+[...].mjs";
13
16
  import { t as z } from "../_libs/next-themes.mjs";
14
- //#region node_modules/.nitro/vite/services/ssr/assets/router-B9wG_9f8.js
17
+ //#region node_modules/.nitro/vite/services/ssr/assets/router-DfVAixxe.js
15
18
  var import_react = /* @__PURE__ */ __toESM(require_react());
16
19
  var import_jsx_runtime = require_jsx_runtime();
17
20
  function HotUpdaterLogo({ className }) {
@@ -108,14 +111,54 @@ function useTheme$1() {
108
111
  if (context === void 0) throw new Error("useTheme must be used within a ThemeProvider");
109
112
  return context;
110
113
  }
111
- function AppSidebar() {
112
- const apiKeyCapability = useApiKeyCapabilityQuery();
114
+ function AppSidebar({ canSignOut = false }) {
115
+ const { setOpenMobile } = useSidebar();
116
+ const closeMobileSidebar = () => setOpenMobile(false);
117
+ const [signingOut, setSigningOut] = (0, import_react.useState)(false);
118
+ const featureUi = useFeatureUi();
113
119
  const { theme, setTheme } = useTheme$1();
114
120
  const currentPath = useRouterState().location.pathname;
115
- const isBundlesActive = currentPath === "/";
116
- const isInsightsActive = currentPath === "/insights" || currentPath === "/installations";
117
- const isApiKeysActive = currentPath === "/api-keys";
118
- const isSigningActive = currentPath === "/signing";
121
+ const navigation = [{
122
+ label: "Bundles",
123
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Package, {}),
124
+ active: currentPath === "/",
125
+ link: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
126
+ to: "/",
127
+ onClick: closeMobileSidebar,
128
+ search: {
129
+ afterReleaseId: void 0,
130
+ beforeReleaseId: void 0,
131
+ channelId: void 0,
132
+ enabled: void 0,
133
+ releaseId: void 0,
134
+ platform: void 0,
135
+ bundleId: void 0,
136
+ scopeKey: void 0
137
+ }
138
+ })
139
+ }, ...featureUi.flatMap(({ features, label, navigation }) => navigation === void 0 ? [] : [{
140
+ label,
141
+ icon: navigation.icon,
142
+ active: navigation.paths.includes(currentPath),
143
+ link: navigation.link({
144
+ features,
145
+ onClick: closeMobileSidebar
146
+ })
147
+ }])];
148
+ const signOut = async () => {
149
+ setSigningOut(true);
150
+ try {
151
+ if (!(await fetch("/api/auth/sign-out", {
152
+ body: "{}",
153
+ headers: { "content-type": "application/json" },
154
+ method: "POST"
155
+ })).ok) throw new Error("Sign-out failed. Please try again.");
156
+ window.location.reload();
157
+ } catch {
158
+ setSigningOut(false);
159
+ toast.error("Sign-out failed. Please try again.");
160
+ }
161
+ };
119
162
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Sidebar, {
120
163
  collapsible: "icon",
121
164
  children: [
@@ -123,6 +166,7 @@ function AppSidebar() {
123
166
  className: "h-12 justify-center",
124
167
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
125
168
  to: "/",
169
+ onClick: closeMobileSidebar,
126
170
  search: {
127
171
  afterReleaseId: void 0,
128
172
  beforeReleaseId: void 0,
@@ -130,9 +174,8 @@ function AppSidebar() {
130
174
  enabled: void 0,
131
175
  releaseId: void 0,
132
176
  platform: void 0,
133
- targetAppVersion: void 0,
134
177
  bundleId: void 0,
135
- page: void 0
178
+ scopeKey: void 0
136
179
  },
137
180
  className: "flex items-center gap-3 p-1 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:p-2",
138
181
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HotUpdaterLogo, { className: "h-7 w-7 shrink-0" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
@@ -147,50 +190,28 @@ function AppSidebar() {
147
190
  })]
148
191
  })
149
192
  }),
150
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarGroup, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarGroupLabel, { children: "Navigation" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarGroupContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenu, { children: [
151
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
152
- isActive: isBundlesActive,
153
- render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
154
- to: "/",
155
- search: {
156
- afterReleaseId: void 0,
157
- beforeReleaseId: void 0,
158
- channelId: void 0,
159
- enabled: void 0,
160
- releaseId: void 0,
161
- platform: void 0,
162
- targetAppVersion: void 0,
163
- bundleId: void 0,
164
- page: void 0
165
- }
166
- }),
167
- tooltip: "Bundles",
168
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Package, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Bundles" })]
169
- }) }),
170
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
171
- isActive: isInsightsActive,
172
- render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { to: "/insights" }),
173
- tooltip: "Insights",
174
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartNoAxesCombined, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Insights" })]
175
- }) }),
176
- apiKeyCapability.data?.apiKeys ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
177
- isActive: isApiKeysActive,
178
- render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { to: "/api-keys" }),
179
- tooltip: "API keys",
180
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyRound, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "API keys" })]
181
- }) }) : null,
182
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
183
- isActive: isSigningActive,
184
- render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { to: "/signing" }),
185
- tooltip: "Bundle signing",
186
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShieldCheck, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Bundle signing" })]
187
- }) })
188
- ] }) })] }) }),
189
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
193
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarGroup, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarGroupLabel, { children: "Navigation" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarGroupContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenu, { children: navigation.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
194
+ isActive: item.active,
195
+ render: item.link,
196
+ tooltip: item.label,
197
+ children: [item.icon, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: item.label })]
198
+ }) }, item.label)) }) })] }) }),
199
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarFooter, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenu, { children: [canSignOut ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
200
+ disabled: signingOut,
201
+ onClick: () => void signOut(),
202
+ tooltip: "Sign out",
203
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LogOut, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: signingOut ? "Signing out…" : "Sign out" })]
204
+ }) }) : null, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
190
205
  onClick: () => setTheme(theme === "dark" ? "light" : "dark"),
191
206
  tooltip: theme === "dark" ? "Light mode" : "Dark mode",
192
207
  children: [theme === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Sun, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Moon, { className: "h-4 w-4" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: theme === "dark" ? "Light mode" : "Dark mode" })]
193
- }) }) }) })
208
+ }) })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
209
+ href: "https://hot-updater.dev",
210
+ target: "_blank",
211
+ rel: "noreferrer",
212
+ className: "px-2 pb-1 text-[11px] text-sidebar-foreground/60 hover:text-sidebar-foreground group-data-[collapsible=icon]:hidden",
213
+ children: "Powered by hot-updater"
214
+ })] })
194
215
  ]
195
216
  });
196
217
  }
@@ -226,7 +247,11 @@ function ConsoleAccessPage({ access, providers }) {
226
247
  setSigningOut(true);
227
248
  setError(null);
228
249
  try {
229
- if (!(await fetch("/api/auth/sign-out", { method: "POST" })).ok) throw new Error("Sign-out failed.");
250
+ if (!(await fetch("/api/auth/sign-out", {
251
+ body: "{}",
252
+ headers: { "content-type": "application/json" },
253
+ method: "POST"
254
+ })).ok) throw new Error("Sign-out failed.");
230
255
  window.location.reload();
231
256
  } catch (cause) {
232
257
  setSigningOut(false);
@@ -291,36 +316,6 @@ function ConsoleAccessPage({ access, providers }) {
291
316
  })
292
317
  });
293
318
  }
294
- var homeSearch = {
295
- channel: void 0,
296
- platform: void 0,
297
- targetAppVersion: void 0,
298
- page: void 0,
299
- after: void 0,
300
- before: void 0,
301
- bundleId: void 0,
302
- expandedBundleId: void 0
303
- };
304
- function NotFoundPage() {
305
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
306
- className: "flex min-h-svh flex-1 items-center justify-center px-6 py-10",
307
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
308
- className: "flex max-w-md flex-col items-center text-center",
309
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
310
- className: "text-2xl font-semibold tracking-tight text-foreground",
311
- children: "Page not found"
312
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
313
- className: buttonVariants({
314
- className: "mt-6",
315
- size: "lg"
316
- }),
317
- to: "/",
318
- search: homeSearch,
319
- children: "Go to home"
320
- })]
321
- })
322
- });
323
- }
324
319
  var Toaster$1 = ({ ...props }) => {
325
320
  const { theme = "system" } = z();
326
321
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toaster, {
@@ -345,8 +340,8 @@ var Toaster$1 = ({ ...props }) => {
345
340
  };
346
341
  var getConsoleAccessRpc = createServerFn({ method: "GET" }).handler(createSsrRpc("c504696e68ba764b48c48aa8a40275938640941e473cf9cfdd7b2322d99f9d13"));
347
342
  var getConsoleAuthProvidersRpc = createServerFn({ method: "GET" }).handler(createSsrRpc("fa8c48f0489d97c62b9b68fd0caf0a61b15bad25a42b3866ec36264b4b30bb74"));
348
- var styles_default = "/assets/styles-BCvbtKsm.css";
349
- var Route$5 = createRootRouteWithContext()({
343
+ var styles_default = "/assets/styles-Bwt7v6U5.css";
344
+ var Route$3 = createRootRouteWithContext()({
350
345
  head: () => ({
351
346
  meta: [
352
347
  { charSet: "utf-8" },
@@ -369,8 +364,9 @@ var Route$5 = createRootRouteWithContext()({
369
364
  href: styles_default
370
365
  }]
371
366
  }),
372
- loader: async () => {
367
+ loader: async ({ context }) => {
373
368
  const [access, providers] = await Promise.all([getConsoleAccessRpc(), getConsoleAuthProvidersRpc()]);
369
+ if (access.status === "authorized") await context.queryClient.prefetchQuery(consoleFeaturesQueryOptions());
374
370
  return {
375
371
  access,
376
372
  providers
@@ -403,31 +399,29 @@ function RootDocument({ children }) {
403
399
  });
404
400
  }
405
401
  function RootLayout() {
406
- const { access, providers } = Route$5.useLoaderData();
402
+ const { access, providers } = Route$3.useLoaderData();
407
403
  if (access.status !== "authorized") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConsoleAccessPage, {
408
404
  access,
409
405
  providers
410
406
  });
411
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AuthorizedConsole, {});
407
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AuthorizedConsole, { canSignOut: providers.length > 0 });
412
408
  }
413
- function AuthorizedConsole() {
409
+ function AuthorizedConsole({ canSignOut }) {
414
410
  (0, import_react.useEffect)(() => {}, []);
415
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarProvider, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppSidebar, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarInset, {
411
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarProvider, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppSidebar, { canSignOut }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarInset, {
416
412
  className: "min-h-0 min-w-0 overflow-hidden",
417
413
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Outlet, {})
418
414
  })] });
419
415
  }
420
- var $$splitComponentImporter$2 = () => import("./signing-Dz1WkZOf.mjs");
421
- var Route$4 = createFileRoute("/signing")({ component: lazyRouteComponent($$splitComponentImporter$2, "component") });
422
- var $$splitComponentImporter$1 = () => import("./insights-BdS364Xu.mjs");
423
- var Route$3 = createFileRoute("/insights")({ component: lazyRouteComponent($$splitComponentImporter$1, "component") });
424
- var $$splitComponentImporter = () => import("./api-keys-CZeTPQys.mjs");
416
+ var $$splitComponentImporter = () => import("./api-keys-K5v32nf7.mjs");
417
+ var $$splitNotFoundComponentImporter = () => import("./api-keys-BrvBWGRf.mjs");
425
418
  var Route$2 = createFileRoute("/api-keys")({
426
- beforeLoad: ({ context }) => ensureApiKeyRouteAccess(context.queryClient),
419
+ beforeLoad: ({ context }) => requireConsoleFeature(context.queryClient, "apiKeys"),
420
+ notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter, "notFoundComponent"),
427
421
  component: lazyRouteComponent($$splitComponentImporter, "component")
428
422
  });
429
423
  var handleAuthRequest = async ({ request }) => {
430
- const { handleConsoleAuth } = await import("./auth.server-DW71WzsD.mjs");
424
+ const { handleConsoleAuth } = await import("./auth.server-DM1J6NwR.mjs");
431
425
  return handleConsoleAuth(request);
432
426
  };
433
427
  var Route$1 = createFileRoute("/api/auth/$")({ server: { handlers: {
@@ -435,63 +429,65 @@ var Route$1 = createFileRoute("/api/auth/$")({ server: { handlers: {
435
429
  POST: handleAuthRequest
436
430
  } } });
437
431
  var Route = createFileRoute("/api/bundles/$bundleId/download")({ server: { handlers: { GET: async ({ params, request }) => {
438
- const { prepareConfig } = await import("./config.server-afDuAwaG.mjs");
439
- const { downloadBundle } = await import("./downloadBundle-CNnYxYO2.mjs");
440
- const { databaseClient, storagePlugin } = await prepareConfig(request);
432
+ const { prepareConfig } = await import("./config.server-DDCZk3Sq.mjs");
433
+ const { downloadBundle } = await import("./downloadBundle-BW9I-pMQ.mjs");
434
+ const { core, storage } = await prepareConfig(request);
441
435
  return downloadBundle(params.bundleId, {
442
- databaseClient,
443
- storagePlugin
436
+ core,
437
+ storage
444
438
  });
445
439
  } } } });
446
- var SigningRoute = Route$4.update({
447
- id: "/signing",
448
- path: "/signing",
449
- getParentRoute: () => Route$5
450
- });
451
- var InstallationsRoute = Route$6.update({
452
- id: "/installations",
453
- path: "/installations",
454
- getParentRoute: () => Route$5
455
- });
456
- var InsightsRoute = Route$3.update({
457
- id: "/insights",
458
- path: "/insights",
459
- getParentRoute: () => Route$5
460
- });
461
- var ApiKeysRoute = Route$2.update({
462
- id: "/api-keys",
463
- path: "/api-keys",
464
- getParentRoute: () => Route$5
465
- });
466
440
  var rootRouteChildren = {
467
441
  IndexRoute: Route$7.update({
468
442
  id: "/",
469
443
  path: "/",
470
- getParentRoute: () => Route$5
444
+ getParentRoute: () => Route$3
445
+ }),
446
+ ApiKeysRoute: Route$2.update({
447
+ id: "/api-keys",
448
+ path: "/api-keys",
449
+ getParentRoute: () => Route$3
450
+ }),
451
+ InsightsRoute: Route$4.update({
452
+ id: "/insights",
453
+ path: "/insights",
454
+ getParentRoute: () => Route$3
455
+ }),
456
+ InstallationsRoute: Route$6.update({
457
+ id: "/installations",
458
+ path: "/installations",
459
+ getParentRoute: () => Route$3
460
+ }),
461
+ InsightsDistributionRoute: Route$5.update({
462
+ id: "/insights_/distribution",
463
+ path: "/insights/distribution",
464
+ getParentRoute: () => Route$3
471
465
  }),
472
- ApiKeysRoute,
473
- InsightsRoute,
474
- InstallationsRoute,
475
- SigningRoute,
476
466
  ApiAuthSplatRoute: Route$1.update({
477
467
  id: "/api/auth/$",
478
468
  path: "/api/auth/$",
479
- getParentRoute: () => Route$5
469
+ getParentRoute: () => Route$3
480
470
  }),
481
471
  ApiBundlesBundleIdDownloadRoute: Route.update({
482
472
  id: "/api/bundles/$bundleId/download",
483
473
  path: "/api/bundles/$bundleId/download",
484
- getParentRoute: () => Route$5
474
+ getParentRoute: () => Route$3
485
475
  })
486
476
  };
487
- var routeTree = Route$5._addFileChildren(rootRouteChildren)._addFileTypes();
477
+ var routeTree = Route$3._addFileChildren(rootRouteChildren)._addFileTypes();
478
+ /** A location's scroll-restoration key: its route's own, else its history entry's. */
479
+ var routeScrollRestorationKey = (router, location) => {
480
+ const [, , foundRoute] = router.getMatchedRoutes(location.pathname);
481
+ const routeKey = foundRoute?.options.staticData?.scrollRestorationKey;
482
+ return routeKey?.(location) ?? location.state.__TSR_key;
483
+ };
488
484
  var getRouter = () => {
489
485
  const queryClient = new QueryClient();
490
486
  const router = createRouter({
491
487
  routeTree,
492
488
  context: { queryClient },
493
489
  scrollRestoration: true,
494
- getScrollRestorationKey: getInsightsScrollRestorationKey,
490
+ getScrollRestorationKey: (location) => routeScrollRestorationKey(router, location),
495
491
  defaultPreloadStaleTime: 0
496
492
  });
497
493
  setupRouterSsrQueryIntegration({