@hot-updater/console 1.0.0-rc.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/ConsoleFeatureUnavailable-jB4Loglh.js +1 -0
  3. package/.output/public/assets/EventDetails-B6yUsyNA.js +1 -0
  4. package/.output/public/assets/HashValueDisplay-BFX_kY3-.js +1 -0
  5. package/.output/public/assets/InsightsInfo-BNO0WznZ.js +1 -0
  6. package/.output/public/assets/InsightsPageHeader-B892oVml.js +1 -0
  7. package/.output/public/assets/NotFoundPage-DIqCpWa3.js +1 -0
  8. package/.output/public/assets/alert-dialog-Bbk_4-WJ.js +1 -0
  9. package/.output/public/assets/api-DCM0wr6O.js +1 -0
  10. package/.output/public/assets/api-keys-CIO9L_wu.js +1 -0
  11. package/.output/public/assets/api-keys-DVTL_--f.js +1 -0
  12. package/.output/public/assets/arrow-left-CnMYpqB7.js +1 -0
  13. package/.output/public/assets/arrow-up-right-BtffZA6e.js +1 -0
  14. package/.output/public/assets/chevron-right-BqD5wtFb.js +1 -0
  15. package/.output/public/assets/clipboard-DS9ucUQL.js +1 -0
  16. package/.output/public/assets/console-features-api-BH5m_PtQ.js +1 -0
  17. package/.output/public/assets/dialog-Bqbb7B0N.js +1 -0
  18. package/.output/public/assets/dist-LxKJB-Vu.js +1 -0
  19. package/.output/public/assets/empty-CuT2UhFp.js +1 -0
  20. package/.output/public/assets/field-BBDpjIqu.js +1 -0
  21. package/.output/public/assets/index-6o51GkFe.js +11 -0
  22. package/.output/public/assets/input-group-ja_30qaF.js +1 -0
  23. package/.output/public/assets/insights-CmraDzQh.js +1 -0
  24. package/.output/public/assets/insights-CxZ2GCYV.js +2 -0
  25. package/.output/public/assets/insights-api-BigAU9sZ.js +1 -0
  26. package/.output/public/assets/insights-usage-rpc-DYEhsCKT.js +1 -0
  27. package/.output/public/assets/insights-vNRCrfnS.js +42 -0
  28. package/.output/public/assets/insights_.distribution-ChOerfJt.js +1 -0
  29. package/.output/public/assets/insights_.distribution-D-e4iga8.js +1 -0
  30. package/.output/public/assets/insights_.distribution-DZtkibX1.js +2 -0
  31. package/.output/public/assets/installations-BazSJXE0.js +2 -0
  32. package/.output/public/assets/installations-ClHTqdAO.js +1 -0
  33. package/.output/public/assets/installations-DpKsBuHi.js +1 -0
  34. package/.output/public/assets/key-round-wS_SIZ6b.js +1 -0
  35. package/.output/public/assets/list-CgrYiadM.js +1 -0
  36. package/.output/public/assets/refresh-cw-BYgoNCco.js +1 -0
  37. package/.output/public/assets/remote-config-BWwHOkCK.js +1 -0
  38. package/.output/public/assets/remote-config-Br56BODb.js +6 -0
  39. package/.output/public/assets/remote-config-CXOi0LRu.js +1 -0
  40. package/.output/public/assets/routes-B88Erkpk.js +2 -0
  41. package/.output/public/assets/routes-CfzsAleC.js +1 -0
  42. package/.output/public/assets/search-DaTDPW25.js +1 -0
  43. package/.output/public/assets/select-BZZBXMkr.js +1 -0
  44. package/.output/public/assets/sidebar-DNVyJPfX.js +3 -0
  45. package/.output/public/assets/smartphone-DpTFgtKf.js +1 -0
  46. package/.output/public/assets/styles-DTGEAJFv.css +2 -0
  47. package/.output/public/assets/switch-DZ1TPwx-.js +1 -0
  48. package/.output/public/assets/table-Gm4qRWwE.js +1 -0
  49. package/.output/public/assets/tabs-C7FOEjFC.js +1 -0
  50. package/.output/public/assets/undo-2-CmrHjwFc.js +1 -0
  51. package/.output/public/assets/useCompositeListItem-9E4pj_CH.js +1 -0
  52. package/.output/public/assets/valueToPercent-CH8GCHaL.js +1 -0
  53. package/.output/server/__23tanstack-start-server-fn-resolver-BpRlos5Q.mjs +170 -0
  54. package/.output/server/_libs/@base-ui/react+[...].mjs +4389 -4207
  55. package/.output/server/_libs/@tanstack/react-router+[...].mjs +3802 -4022
  56. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +140 -97
  57. package/.output/server/_libs/lucide-react.mjs +221 -9
  58. package/.output/server/_libs/next-themes.mjs +1 -1
  59. package/.output/server/_libs/react-redux+[...].mjs +1 -1
  60. package/.output/server/_libs/recharts+[...].mjs +483 -901
  61. package/.output/server/_libs/sonner.mjs +1 -1
  62. package/.output/server/_libs/tanstack__history.mjs +68 -41
  63. package/.output/server/_libs/tanstack__query-core.mjs +2010 -309
  64. package/.output/server/_libs/tanstack__react-query.mjs +448 -21
  65. package/.output/server/_libs/verkit.mjs +102 -1
  66. package/.output/server/_ssr/BundleIdDisplay-x94o9rlU.mjs +13 -0
  67. package/.output/server/_ssr/ConsoleFeatureUnavailable-ldW8v8-q.mjs +58 -0
  68. package/.output/server/_ssr/EventDetails-Q8kfj9Nr.mjs +344 -0
  69. package/.output/server/_ssr/{HashValueDisplay-C5tS4oGo.mjs → HashValueDisplay-n1GholGS.mjs} +3 -3
  70. package/.output/server/_ssr/InsightsInfo-DuJFatQO.mjs +75 -0
  71. package/.output/server/_ssr/InsightsPageHeader-BSUX3Ye9.mjs +145 -0
  72. package/.output/server/_ssr/NotFoundPage-DZzOOzS3.mjs +37 -0
  73. package/.output/server/_ssr/{dialog-WiIAKl4L.mjs → alert-dialog-C43Doa0I.mjs} +6 -83
  74. package/.output/server/_ssr/{api-keys-aXriWrv7.mjs → api-keys-B4sYm8dM.mjs} +48 -9
  75. package/.output/server/_ssr/api-keys-CEnM9fqG.mjs +5 -0
  76. package/.output/server/_ssr/api-keys-rpc-BIFuUgMt.mjs +52 -0
  77. package/.output/server/_ssr/api-oZjRn9tP.mjs +186 -0
  78. package/.output/server/_ssr/api-rpc-BNiFRRK8.mjs +240 -0
  79. package/.output/server/_ssr/{auth-BF8mbAgF.mjs → auth-UP0wXs4i.mjs} +1 -1
  80. package/.output/server/_ssr/{auth-rpc-B7w3AdRr.mjs → auth-rpc-DnZqYxyq.mjs} +6 -6
  81. package/.output/server/_ssr/auth.server-DFpyxRDd.mjs +5374 -0
  82. package/.output/server/_ssr/bundleActivity-M5gzBFNg.mjs +18 -0
  83. package/.output/server/_ssr/config-WVX4IxSR.mjs +15 -0
  84. package/.output/server/_ssr/config.server-DskXCAyI.mjs +35 -0
  85. package/.output/server/_ssr/console-access-BJfAXknd.mjs +17 -0
  86. package/.output/server/_ssr/console-features-Oz0q20jJ.mjs +61 -0
  87. package/.output/server/_ssr/console-features-api-C9kiKvaV.mjs +43 -0
  88. package/.output/server/_ssr/console-features-rpc-P0GL7Z-R.mjs +19 -0
  89. package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-Cm6Tn0_Y.mjs} +67 -56
  90. package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-RLR4H-Fn.mjs} +2 -2
  91. package/.output/server/_ssr/databaseConfig-C5SkAyUy.mjs +5 -0
  92. package/.output/server/_ssr/{databaseJsonValue-d6I3nAS4.mjs → databaseJsonValue-Csbuzc9Q.mjs} +28 -5
  93. package/.output/server/_ssr/databaseRows-CPphvbag.mjs +73 -0
  94. package/.output/server/_ssr/dialog-BbYDMjdC.mjs +84 -0
  95. package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-CbQbBIw-.mjs} +140 -7
  96. package/.output/server/_ssr/{downloadBundle-CI7JUKvC.mjs → downloadBundle-CZysjmNW.mjs} +10 -10
  97. package/.output/server/_ssr/empty-CVLGfxuu.mjs +60 -0
  98. package/.output/server/_ssr/{empty-plugin-adapters-B5QvGpEl.mjs → empty-plugin-adapters-CPtwX8a7.mjs} +1 -1
  99. package/.output/server/_ssr/failureReports-DKDhVsXA.mjs +33 -0
  100. package/.output/server/_ssr/field-asw83X0v.mjs +189 -0
  101. package/.output/server/_ssr/getBundleChildren-Cv9iz1As.mjs +22 -0
  102. package/.output/server/_ssr/{input-group-Coj6SwVP.mjs → input-group-CuYJHosb.mjs} +2 -2
  103. package/.output/server/_ssr/insights-B55FG5fm.mjs +14 -0
  104. package/.output/server/_ssr/insights-CWnHIFUV.mjs +5 -0
  105. package/.output/server/_ssr/insights-CpLpedFZ.mjs +2315 -0
  106. package/.output/server/_ssr/insights-api-sjws23WF.mjs +122 -0
  107. package/.output/server/_ssr/insights-errors-BjnFUyZj.mjs +34 -0
  108. package/.output/server/_ssr/insights-failures-rpc-BvbWvqNf.mjs +36 -0
  109. package/.output/server/_ssr/insights-failures-xaa41Buf.mjs +46 -0
  110. package/.output/server/_ssr/insights-recovery-BWQhiZaF.mjs +28 -0
  111. package/.output/server/_ssr/insights-recovery-rpc-GiYXdkaY.mjs +32 -0
  112. package/.output/server/_ssr/{insights-rpc-l2-oBYth.mjs → insights-rpc-DP_8Rmz4.mjs} +22 -14
  113. package/.output/server/_ssr/insights-usage-BpBM0U0c.mjs +29 -0
  114. package/.output/server/_ssr/insights-usage-rpc-BiolgB8e.mjs +29 -0
  115. package/.output/server/_ssr/insights-usage-rpc-KStL0zOx.mjs +41 -0
  116. package/.output/server/_ssr/insightsUsage-CzhVjsc8.mjs +56 -0
  117. package/.output/server/_ssr/insights_.distribution-CVrnbP3R.mjs +7 -0
  118. package/.output/server/_ssr/insights_.distribution-D2HaNTAA.mjs +16 -0
  119. package/.output/server/_ssr/{insights_.distribution-INw6QxbU.mjs → insights_.distribution-DN9pR422.mjs} +50 -22
  120. package/.output/server/_ssr/installations-BHmbbnH8.mjs +5 -0
  121. package/.output/server/_ssr/{installations-DH-tQuRo.mjs → installations-BSCmFq8Q.mjs} +279 -367
  122. package/.output/server/_ssr/installations-DD1g__Nc.mjs +69 -0
  123. package/.output/server/_ssr/listReleases-BfUBlCHo.mjs +79 -0
  124. package/.output/server/_ssr/plugins-BaD1slHx.mjs +2086 -0
  125. package/.output/server/_ssr/release-adoption-005tQRpo.mjs +55 -0
  126. package/.output/server/_ssr/release-adoption-rpc-BsstqxUp.mjs +41 -0
  127. package/.output/server/_ssr/releaseAdoption-CtOFkwli.mjs +114 -0
  128. package/.output/server/_ssr/releaseManagement-DFMUnDF5.mjs +11 -0
  129. package/.output/server/_ssr/remote-config-C2Ee8lXO.mjs +5 -0
  130. package/.output/server/_ssr/remote-config-Dv1ccMo-.mjs +17 -0
  131. package/.output/server/_ssr/remote-config-of0lGQH8.mjs +2648 -0
  132. package/.output/server/_ssr/remote-config-rpc-BzX31mUS.mjs +115 -0
  133. package/.output/server/_ssr/rolldown-runtime-rSIU-vHC.mjs +13 -0
  134. package/.output/server/_ssr/{router-DfFyAp5p.mjs → router-D8NuoJ_I.mjs} +117 -136
  135. package/.output/server/_ssr/{routes-BtsfVx-p.mjs → routes-DgvnFqDy.mjs} +195 -429
  136. package/.output/server/_ssr/routes-V8sDybGf.mjs +409 -0
  137. package/.output/server/_ssr/runtime.server-De0QVWc9.mjs +104 -0
  138. package/.output/server/_ssr/schema-BiAVyEj2.mjs +361 -0
  139. package/.output/server/_ssr/{select-CyvLaMza.mjs → select-t3iXRwc9.mjs} +3 -3
  140. package/.output/server/_ssr/server-h4VxnExB.mjs +8325 -0
  141. package/.output/server/_ssr/{createSsrRpc-C-dLcQuy.mjs → sidebar-DJcErBMo.mjs} +107 -47
  142. package/.output/server/_ssr/ssr.mjs +1 -1
  143. package/.output/server/_ssr/start-BfFbHKMK.mjs +4 -0
  144. package/.output/server/_ssr/switch-E-btwMGt.mjs +43 -0
  145. package/.output/server/_ssr/{table-CkVhsNpe.mjs → table-37Dd23TN.mjs} +2 -2
  146. package/.output/server/_ssr/tabs-DEFnTm95.mjs +45 -0
  147. package/.output/server/_ssr/updateFailures-H6pnnYK4.mjs +40 -0
  148. package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-C88s9jWF.mjs} +2 -2
  149. package/.output/server/_tanstack-start-manifest_v-55AGsehh.mjs +139 -0
  150. package/.output/server/index.mjs +303 -205
  151. package/LICENSE +13 -14
  152. package/README.md +80 -71
  153. package/lib/index.d.mts +23 -11
  154. package/lib/vite-internal.mjs +13 -3
  155. package/lib/vite.d.mts +2 -0
  156. package/package.json +14 -14
  157. package/src/components/AppSidebar.tsx +74 -75
  158. package/src/components/ConsoleAccessPage.tsx +5 -1
  159. package/src/components/ConsoleFeatureUnavailable.tsx +80 -0
  160. package/src/components/NotFoundPage.tsx +7 -7
  161. package/src/components/features/FeatureSlots.tsx +103 -0
  162. package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
  163. package/src/components/features/bundles/BundleMetadata.tsx +8 -5
  164. package/src/components/features/bundles/RolloutCohortsDialog.tsx +1 -1
  165. package/src/components/features/channels/ChannelManagementDialog.tsx +8 -6
  166. package/src/components/features/insights/AppUsage.tsx +41 -14
  167. package/src/components/features/insights/BuiltinBundle.tsx +36 -0
  168. package/src/components/features/insights/ComparedBundlesChart.tsx +310 -0
  169. package/src/components/features/insights/EstimatedCount.tsx +18 -0
  170. package/src/components/features/insights/EventDetails.tsx +390 -26
  171. package/src/components/features/insights/EventHistoryCard.tsx +111 -25
  172. package/src/components/features/insights/EventHistoryList.tsx +1 -1
  173. package/src/components/features/insights/FailureReports.tsx +407 -0
  174. package/src/components/features/insights/InsightsControls.tsx +240 -142
  175. package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
  176. package/src/components/features/insights/InsightsOverview.tsx +601 -403
  177. package/src/components/features/insights/InsightsPageHeader.tsx +19 -14
  178. package/src/components/features/insights/InsightsPeriodSelector.tsx +67 -12
  179. package/src/components/features/insights/InstallationHistoryCard.tsx +65 -10
  180. package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
  181. package/src/components/features/insights/ReleaseActivity.tsx +308 -0
  182. package/src/components/features/insights/ReportingDevicesSummary.tsx +13 -13
  183. package/src/components/features/insights/RollbackButton.tsx +118 -0
  184. package/src/components/features/insights/UpdateFailures.tsx +382 -0
  185. package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
  186. package/src/components/features/releases/ReleaseEditorSheet.tsx +27 -13
  187. package/src/components/features/remote-config/ConditionDialog.tsx +592 -0
  188. package/src/components/features/remote-config/ConditionsCard.tsx +247 -0
  189. package/src/components/features/remote-config/ParameterDialog.tsx +426 -0
  190. package/src/components/features/remote-config/ParametersCard.tsx +254 -0
  191. package/src/components/features/remote-config/PreviewCard.tsx +284 -0
  192. package/src/components/features/remote-config/PublishDialog.tsx +325 -0
  193. package/src/components/features/remote-config/RemoteConfigPage.tsx +353 -0
  194. package/src/components/features/remote-config/RuleSummary.tsx +21 -0
  195. package/src/components/features/remote-config/ValueInput.tsx +151 -0
  196. package/src/components/features/remote-config/VersionsCard.tsx +384 -0
  197. package/src/components/features/remote-config/remoteConfigFeatureUi.tsx +15 -0
  198. package/src/components/features/remote-config/useDateTimeText.ts +16 -0
  199. package/src/components/ui/sidebar.tsx +22 -29
  200. package/src/index.ts +26 -19
  201. package/src/lib/api-keys-api.ts +0 -28
  202. package/src/lib/api-keys-rpc.ts +27 -38
  203. package/src/lib/api-rpc.ts +125 -288
  204. package/src/lib/api.ts +15 -134
  205. package/src/lib/bundle-activity.ts +24 -4
  206. package/src/lib/console-access.ts +20 -0
  207. package/src/lib/console-features-api.ts +68 -0
  208. package/src/lib/console-features-rpc.ts +13 -0
  209. package/src/lib/console-features.ts +98 -0
  210. package/src/lib/insights-api.ts +56 -2
  211. package/src/lib/insights-errors.ts +64 -0
  212. package/src/lib/insights-failures-rpc.ts +36 -0
  213. package/src/lib/insights-failures.ts +130 -0
  214. package/src/lib/insights-recovery-rpc.ts +13 -17
  215. package/src/lib/insights-recovery.ts +12 -36
  216. package/src/lib/insights-retention.ts +21 -0
  217. package/src/lib/insights-rpc.ts +30 -12
  218. package/src/lib/insights-search.ts +50 -4
  219. package/src/lib/insights-usage-rpc.ts +15 -9
  220. package/src/lib/insights-usage.ts +41 -3
  221. package/src/lib/insights-view.ts +34 -5
  222. package/src/lib/release-adoption-api.ts +214 -0
  223. package/src/lib/release-adoption-rpc.ts +49 -0
  224. package/src/lib/release-adoption.ts +164 -0
  225. package/src/lib/remote-config-api.ts +119 -0
  226. package/src/lib/remote-config-draft.ts +666 -0
  227. package/src/lib/remote-config-rpc.ts +196 -0
  228. package/src/lib/scroll-restoration.ts +21 -0
  229. package/src/lib/server/auth.server.ts +13 -5
  230. package/src/lib/server/bundleActivity.ts +27 -28
  231. package/src/lib/server/config.server.ts +21 -76
  232. package/src/lib/server/console-feature-apis.ts +70 -0
  233. package/src/lib/server/console-runtime.server.ts +82 -38
  234. package/src/lib/server/downloadBundle.ts +14 -15
  235. package/src/lib/server/failureReports.ts +50 -0
  236. package/src/lib/server/getBundleChildren.ts +31 -122
  237. package/src/lib/server/insightsUsage.ts +52 -113
  238. package/src/lib/server/listReleases.ts +109 -44
  239. package/src/lib/server/releaseAdoption.ts +151 -0
  240. package/src/lib/server/releaseReachability.ts +8 -8
  241. package/src/lib/server/remoteConfig.ts +75 -0
  242. package/src/lib/server/runtime.server.ts +120 -31
  243. package/src/lib/server/updateFailures.ts +66 -0
  244. package/src/lib/use-dialog-target.ts +27 -0
  245. package/src/routeTree.gen.ts +44 -44
  246. package/src/router.tsx +3 -2
  247. package/src/routes/-installations-search.ts +32 -8
  248. package/src/routes/-releases-search.ts +76 -29
  249. package/src/routes/__root.tsx +7 -1
  250. package/src/routes/api/bundles/$bundleId/download.ts +2 -5
  251. package/src/routes/api-keys.tsx +5 -2
  252. package/src/routes/index.tsx +210 -152
  253. package/src/routes/insights.tsx +91 -23
  254. package/src/routes/insights_.distribution.tsx +50 -9
  255. package/src/routes/installations.tsx +97 -40
  256. package/src/routes/remote-config.tsx +42 -0
  257. package/src/styles.css +9 -0
  258. package/src/vite-internal.ts +15 -3
  259. package/src/vite.ts +2 -0
  260. package/.output/public/assets/HashValueDisplay-BpTc3Oyg.js +0 -1
  261. package/.output/public/assets/InsightsPageHeader-DC2eEst8.js +0 -1
  262. package/.output/public/assets/api-CdUyUqzR.js +0 -42
  263. package/.output/public/assets/api-keys-64PM9PwW.js +0 -1
  264. package/.output/public/assets/api-keys-api-BeaJnvY5.js +0 -1
  265. package/.output/public/assets/arrow-left-04Rh8Zgp.js +0 -1
  266. package/.output/public/assets/card-CYHs5FZv.js +0 -1
  267. package/.output/public/assets/chart-no-axes-combined-DwyMsVFW.js +0 -1
  268. package/.output/public/assets/createServerFn-DU71xucx.js +0 -3
  269. package/.output/public/assets/dialog-IVMkBRCq.js +0 -1
  270. package/.output/public/assets/dist-BR4GzeEu.js +0 -1
  271. package/.output/public/assets/field-B3CYDpjg.js +0 -1
  272. package/.output/public/assets/index-C39o7rJH.js +0 -10
  273. package/.output/public/assets/info-C3y9HNoU.js +0 -1
  274. package/.output/public/assets/input-group-nLZylhWF.js +0 -1
  275. package/.output/public/assets/insights-Bm9v8uO3.js +0 -2
  276. package/.output/public/assets/insights-DS3iO7Up.js +0 -1
  277. package/.output/public/assets/insights-search-Byj3g3Mp.js +0 -1
  278. package/.output/public/assets/insights-usage-rpc-BaGR3lgq.js +0 -1
  279. package/.output/public/assets/insights_.distribution-B1i6cjlQ.js +0 -1
  280. package/.output/public/assets/insights_.distribution-C1Wf27eB.js +0 -2
  281. package/.output/public/assets/installations-CkFW4fV9.js +0 -2
  282. package/.output/public/assets/installations-DxTaIcHD.js +0 -1
  283. package/.output/public/assets/lazyRouteComponent-BapzjYnb.js +0 -1
  284. package/.output/public/assets/list-Dqt53fWZ.js +0 -1
  285. package/.output/public/assets/loader-circle-CUKfUqow.js +0 -1
  286. package/.output/public/assets/preload-helper-ClBMtM1g.js +0 -1
  287. package/.output/public/assets/refresh-cw-CNE_2PnD.js +0 -1
  288. package/.output/public/assets/routes-Cgtvspjg.js +0 -2
  289. package/.output/public/assets/routes-O2r2UUN8.js +0 -1
  290. package/.output/public/assets/shield-check-BFcJ46kz.js +0 -1
  291. package/.output/public/assets/signing-BgspC-xP.js +0 -1
  292. package/.output/public/assets/styles-DnrWuBwd.css +0 -2
  293. package/.output/public/assets/table-BuWQgxJJ.js +0 -1
  294. package/.output/public/assets/useMutation-CSV9NCUl.js +0 -1
  295. package/.output/public/assets/useOpenInteractionType-D5kduCTD.js +0 -1
  296. package/.output/public/assets/valueToPercent-BAtcbSLk.js +0 -1
  297. package/.output/server/__23tanstack-start-server-fn-resolver-CmYkol9D.mjs +0 -150
  298. package/.output/server/_ssr/InsightsPageHeader-Dma3dVj1.mjs +0 -64
  299. package/.output/server/_ssr/api-C3bGmgY0.mjs +0 -332
  300. package/.output/server/_ssr/api-keys-api-BRF6rbRC.mjs +0 -60
  301. package/.output/server/_ssr/api-keys-rpc-BMa1ZM6N.mjs +0 -136
  302. package/.output/server/_ssr/api-rpc-BYQ2e0z6.mjs +0 -1399
  303. package/.output/server/_ssr/auth.server-CmicHh0J.mjs +0 -47
  304. package/.output/server/_ssr/bundle-signing-rpc-DbQ4pFAX.mjs +0 -16
  305. package/.output/server/_ssr/bundle-signing.server-Uqt1OF49.mjs +0 -12
  306. package/.output/server/_ssr/bundleActivity-pBrPSG01.mjs +0 -28
  307. package/.output/server/_ssr/card-B7KSO_25.mjs +0 -108
  308. package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
  309. package/.output/server/_ssr/config.server-C-d1QaBU.mjs +0 -368
  310. package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
  311. package/.output/server/_ssr/deleteBundle-8X-jq7Z7.mjs +0 -66
  312. package/.output/server/_ssr/field-BDwuU8RE.mjs +0 -74
  313. package/.output/server/_ssr/getBundleChildren-DoL8l_AS.mjs +0 -50
  314. package/.output/server/_ssr/insights-BDJjaDLp.mjs +0 -938
  315. package/.output/server/_ssr/insights-D0FWpfOS.mjs +0 -10
  316. package/.output/server/_ssr/insights-recovery-Cv6RSyeR.mjs +0 -21
  317. package/.output/server/_ssr/insights-recovery-rpc-BE9YsK_T.mjs +0 -37
  318. package/.output/server/_ssr/insights-search-1czJMZgk.mjs +0 -21
  319. package/.output/server/_ssr/insights-usage-rpc-BE_aCnea.mjs +0 -184
  320. package/.output/server/_ssr/insights-usage-rpc-CtAolz-t.mjs +0 -24
  321. package/.output/server/_ssr/insightsContract-B09K_Px1.mjs +0 -303
  322. package/.output/server/_ssr/insightsHistory-Ci4rYAgl.mjs +0 -41
  323. package/.output/server/_ssr/insightsRecovery-CaghWL2t.mjs +0 -113
  324. package/.output/server/_ssr/insightsUsage-DNIj6jxF.mjs +0 -71
  325. package/.output/server/_ssr/insights_.distribution-Cp0kf1vW.mjs +0 -10
  326. package/.output/server/_ssr/installations-Bhyiwx8G.mjs +0 -29
  327. package/.output/server/_ssr/routes-xBkI2Fmt.mjs +0 -37
  328. package/.output/server/_ssr/runtime.server-CsiKFp_Z.mjs +0 -436
  329. package/.output/server/_ssr/server-BdkuOWe8.mjs +0 -7468
  330. package/.output/server/_ssr/signing-CQ70saFm.mjs +0 -133
  331. package/.output/server/_ssr/start-DpViQGnt.mjs +0 -4
  332. package/.output/server/_tanstack-start-manifest_v-CrBsoKQQ.mjs +0 -125
  333. package/src/components/features/bundles/BundleActivityChart.tsx +0 -97
  334. package/src/components/features/bundles/BundleInsightsSummary.tsx +0 -126
  335. package/src/components/features/signing/BundleSigningPage.tsx +0 -139
  336. package/src/lib/bundle-signing-api.ts +0 -14
  337. package/src/lib/bundle-signing-rpc.ts +0 -16
  338. package/src/lib/server/bundle-signing.server.ts +0 -23
  339. package/src/lib/server/deleteBundle.ts +0 -145
  340. package/src/lib/server/insightsHistory.ts +0 -52
  341. package/src/lib/server/insightsRecovery.ts +0 -187
  342. package/src/routes/signing.tsx +0 -37
@@ -0,0 +1,409 @@
1
+ import { u as createServerFn } from "./createMiddleware-Cm6Tn0_Y.mjs";
2
+ import { t as consoleAccess } from "./console-access-BJfAXknd.mjs";
3
+ import { gt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
4
+ import { D as KeyRound, K as ChartNoAxesCombined, d as SlidersHorizontal, q as ChartLine } from "../_libs/lucide-react.mjs";
5
+ import { A as createSsrRpc, C as Skeleton, O as buttonVariants, k as cn, r as Separator$1 } from "./sidebar-DJcErBMo.mjs";
6
+ import { d as CardTitle, l as CardFooter, o as Card, s as CardContent, u as CardHeader } from "./field-asw83X0v.mjs";
7
+ import { i as useQuery } from "../_libs/tanstack__react-query.mjs";
8
+ import { n as consoleFeatures } from "./console-features-Oz0q20jJ.mjs";
9
+ import { f as lazyRouteComponent, h as Link, p as createFileRoute } from "../_libs/@tanstack/react-router+[...].mjs";
10
+ import { a as useConsoleFeatures, i as useConsoleFeature } from "./console-features-api-C9kiKvaV.mjs";
11
+ import { n as readRecoveryInput } from "./insights-recovery-BWQhiZaF.mjs";
12
+ import { i as failureRate, s as formatRate } from "./insights-failures-xaa41Buf.mjs";
13
+ import { u as useUpdateFailuresQuery } from "./insights-api-sjws23WF.mjs";
14
+ import { n as adoptionWindow, t as InsightsInfo } from "./InsightsInfo-DuJFatQO.mjs";
15
+ //#region node_modules/.nitro/vite/services/ssr/assets/routes-V8sDybGf.js
16
+ var import_jsx_runtime = require_jsx_runtime();
17
+ /** What API key management adds: its navigation item. */
18
+ var apiKeysFeatureUi = { apiKeys: { navigation: {
19
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyRound, {}),
20
+ paths: ["/api-keys"],
21
+ link: ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
22
+ to: "/api-keys",
23
+ onClick
24
+ })
25
+ } } };
26
+ function readBundleActivityInput(inputs) {
27
+ if (!Array.isArray(inputs) || inputs.length > 20) throw new Error("Choose up to 20 bundles.");
28
+ return inputs.map((input) => {
29
+ readRecoveryInput({
30
+ ...input,
31
+ window: "30d"
32
+ });
33
+ if (!input.releaseId) throw new Error("Choose a bundle ID.");
34
+ return input;
35
+ });
36
+ }
37
+ var getBundleActivityRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator(readBundleActivityInput).handler(createSsrRpc("b4bf4c461903edcdc44eea52468c737b5b600a586f542138ff022dcbbe86c45c"));
38
+ /** Release activity for bundle rows; mounted only where the console reads it. */
39
+ function useBundleActivityQuery(inputs) {
40
+ const sorted = inputs.map(({ releaseId, platform, channel }) => ({
41
+ releaseId,
42
+ platform,
43
+ channel
44
+ })).sort((a, b) => a.releaseId.localeCompare(b.releaseId));
45
+ return useQuery({
46
+ queryKey: ["bundle-activity", sorted],
47
+ queryFn: () => getBundleActivityRpc({ data: sorted }),
48
+ enabled: sorted.length > 0,
49
+ staleTime: 3e4
50
+ });
51
+ }
52
+ var activityStats = [
53
+ {
54
+ label: "Downloaded",
55
+ field: "downloads",
56
+ color: "text-primary/85"
57
+ },
58
+ {
59
+ label: "Launched",
60
+ field: "launched",
61
+ color: "text-success/85"
62
+ },
63
+ {
64
+ label: "Crashed",
65
+ field: "failedLaunches",
66
+ color: "text-warning/85"
67
+ }
68
+ ];
69
+ var crashRate = (report) => {
70
+ const attempts = report.launched + report.failedLaunches;
71
+ return attempts === 0 ? "—" : `${(report.failedLaunches / attempts * 100).toFixed(2)}%`;
72
+ };
73
+ /** Downloads that neither launched nor crashed yet: waiting for a restart, or passed over for a newer bundle. */
74
+ var notLaunched = (report) => Math.max(0, report.downloads - report.launched - report.failedLaunches);
75
+ function ReleaseMetricsInfo() {
76
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsInfo, {
77
+ label: "About release insight metrics",
78
+ children: "Downloaded: got this bundle. Launched: ran it. Crashed: crashed on it and rolled back. Once every installation restarts, Downloaded = Launched + Crashed."
79
+ });
80
+ }
81
+ function BundleMovementSummary({ report, loading = false, input, variant = "inline" }) {
82
+ if (!report) return loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, {
83
+ "aria-label": "Loading release insights",
84
+ className: variant === "card" ? "h-16 w-full" : "h-4 w-40"
85
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
86
+ "aria-label": "Release insights unavailable",
87
+ className: "text-sm text-muted-foreground",
88
+ children: "—"
89
+ });
90
+ const builtIn = input?.builtIn === true;
91
+ const waiting = builtIn ? 0 : notLaunched(report);
92
+ const metrics = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dl", {
93
+ className: cn(variant === "card" ? "grid grid-cols-[1fr_1fr_auto] gap-4" : "flex min-w-[220px] flex-wrap items-baseline gap-x-3 gap-y-1"),
94
+ children: activityStats.map(({ label, field, color }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
95
+ className: cn("flex", variant === "card" ? "min-w-0 flex-col gap-1" : "items-baseline gap-1.5 whitespace-nowrap"),
96
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
97
+ className: "text-xs text-muted-foreground",
98
+ children: label
99
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dd", {
100
+ className: cn("flex flex-wrap items-baseline gap-x-1.5 tabular-nums", variant === "card" ? "text-xl font-semibold" : "text-sm font-medium", report[field] > 0 && !(field === "downloads" && builtIn) ? color : "text-muted-foreground"),
101
+ children: [field === "downloads" && builtIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
102
+ title: "The built-in bundle is never downloaded",
103
+ children: "—"
104
+ }) : report[field].toLocaleString(), field === "failedLaunches" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
105
+ className: "text-xs font-normal text-muted-foreground",
106
+ children: [
107
+ "(",
108
+ crashRate(report),
109
+ ")"
110
+ ]
111
+ }) : null]
112
+ })]
113
+ }, field))
114
+ });
115
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
116
+ className: cn("flex", variant === "card" ? "flex-col gap-2" : "items-center gap-1"),
117
+ children: [
118
+ input ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
119
+ className: "min-w-0 rounded-sm hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
120
+ to: "/insights",
121
+ search: {
122
+ healthPlatform: input.platform,
123
+ healthChannel: input.channel,
124
+ releaseId: input.releaseId,
125
+ bundleWindow: adoptionWindow(input.releaseId)
126
+ },
127
+ children: metrics
128
+ }) : metrics,
129
+ variant === "card" && waiting > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
130
+ className: "text-xs text-muted-foreground",
131
+ children: [waiting.toLocaleString(), " downloaded but not launched yet: waiting for a restart, or passed over for a newer bundle."]
132
+ }) : null,
133
+ variant === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReleaseMetricsInfo, {}) : null
134
+ ]
135
+ });
136
+ }
137
+ /** The release's failed downloads and installs since its first report, and their rate. */
138
+ function BundleDownloadFailures({ input }) {
139
+ const query = useUpdateFailuresQuery({
140
+ platform: input.platform,
141
+ channel: input.channel,
142
+ releaseId: input.releaseId
143
+ });
144
+ const report = query.data;
145
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
146
+ className: "flex items-center gap-1",
147
+ children: [report ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dl", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
148
+ className: "flex flex-wrap items-baseline gap-x-1.5",
149
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
150
+ className: "text-xs text-muted-foreground",
151
+ children: "Download failures"
152
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dd", {
153
+ className: cn("flex items-baseline gap-1.5 text-sm font-medium tabular-nums", report.failedUpdates > 0 ? "text-warning/85" : "text-muted-foreground"),
154
+ children: [report.failedUpdates.toLocaleString(), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
155
+ className: "text-xs font-normal text-muted-foreground",
156
+ children: [
157
+ "(",
158
+ formatRate(failureRate(report)),
159
+ ")"
160
+ ]
161
+ })]
162
+ })]
163
+ }) }) : query.isPending ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, {
164
+ "aria-label": "Loading download failures",
165
+ className: "h-4 w-40"
166
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
167
+ "aria-label": "Download failures unavailable",
168
+ className: "text-sm text-muted-foreground",
169
+ children: "—"
170
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsInfo, {
171
+ label: "About download failures",
172
+ children: "Failed downloads or installs of this bundle, at most one per installation a day. Rate = failures ÷ (failures + downloads)."
173
+ })]
174
+ });
175
+ }
176
+ /** The bundle detail's Insights card, a section of the release editor: activity and download failures. */
177
+ function BundleInsightsSummary({ input }) {
178
+ const query = useBundleActivityQuery([input]);
179
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, { children: [
180
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, {
181
+ className: "flex-row items-center justify-between px-4 pt-4 pb-3",
182
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
183
+ className: "text-sm font-medium",
184
+ children: "Insights"
185
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReleaseMetricsInfo, {})]
186
+ }),
187
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
188
+ className: "flex flex-col gap-3 px-4 pb-4",
189
+ children: [
190
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BundleMovementSummary, {
191
+ variant: "card",
192
+ input,
193
+ loading: query.isFetching,
194
+ report: query.data?.[input.releaseId]
195
+ }),
196
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Separator$1, {}),
197
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BundleDownloadFailures, { input })
198
+ ]
199
+ }),
200
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardFooter, {
201
+ className: "px-4 pb-4",
202
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
203
+ className: buttonVariants({
204
+ variant: "outline",
205
+ size: "sm"
206
+ }),
207
+ to: "/insights",
208
+ search: {
209
+ healthPlatform: input.platform,
210
+ healthChannel: input.channel,
211
+ releaseId: input.releaseId,
212
+ bundleWindow: adoptionWindow(input.releaseId),
213
+ healthChart: "adoption"
214
+ },
215
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartLine, {
216
+ "aria-hidden": "true",
217
+ "data-icon": "inline-start"
218
+ }), "View adoption"]
219
+ })
220
+ })
221
+ ] });
222
+ }
223
+ /**
224
+ * The release editor's Insights card where the console reads no release
225
+ * activity, as through a self-hosted server's admin API: download failures
226
+ * alone. With release activity, its card shows them.
227
+ */
228
+ function ReleaseFailuresSection({ input }) {
229
+ if (useConsoleFeature("insightsAnalytics")) return null;
230
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardHeader, {
231
+ className: "px-4 pt-4 pb-3",
232
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
233
+ className: "text-sm font-medium",
234
+ children: "Insights"
235
+ })
236
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, {
237
+ className: "px-4 pb-4",
238
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BundleDownloadFailures, { input })
239
+ })] });
240
+ }
241
+ /**
242
+ * One release's activity in the Bundles page's Insights column. Every cell
243
+ * asks for the page's releases under one query key, so the page makes one
244
+ * request.
245
+ */
246
+ function ReleaseActivityCell({ releaseId, releases }) {
247
+ const query = useBundleActivityQuery(releases);
248
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BundleMovementSummary, {
249
+ input: releases.find((release) => release.releaseId === releaseId),
250
+ loading: query.isFetching,
251
+ report: query.data?.[releaseId]
252
+ });
253
+ }
254
+ /**
255
+ * What the Insights features add: their navigation item, release activity on
256
+ * the Bundles page and in the release editor, and a release's download
257
+ * failures in the release editor, which a self-hosted server serves too.
258
+ */
259
+ var insightsFeatureUi = {
260
+ insights: {
261
+ navigation: {
262
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartNoAxesCombined, {}),
263
+ paths: [
264
+ "/insights",
265
+ "/insights/distribution",
266
+ "/installations"
267
+ ],
268
+ link: ({ features, onClick }) => features.insightsAnalytics ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
269
+ to: "/insights",
270
+ onClick
271
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
272
+ to: "/installations",
273
+ onClick
274
+ })
275
+ },
276
+ releaseSection: ({ release }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReleaseFailuresSection, { input: release })
277
+ },
278
+ insightsAnalytics: {
279
+ releaseColumn: { Cell: ReleaseActivityCell },
280
+ releaseSection: ({ release }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BundleInsightsSummary, { input: release })
281
+ }
282
+ };
283
+ /** What Remote Config adds: its navigation item. */
284
+ var remoteConfigFeatureUi = { remoteConfig: { navigation: {
285
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlidersHorizontal, {}),
286
+ paths: ["/remote-config"],
287
+ link: ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
288
+ to: "/remote-config",
289
+ onClick
290
+ })
291
+ } } };
292
+ var consoleFeatureUi = {
293
+ ...insightsFeatureUi,
294
+ ...apiKeysFeatureUi,
295
+ ...remoteConfigFeatureUi
296
+ };
297
+ var featureIds = Object.keys(consoleFeatures);
298
+ /**
299
+ * What the features that are on add, in the registry's order, with each
300
+ * feature's label; nothing until the features load.
301
+ */
302
+ var useFeatureUi = () => {
303
+ const features = useConsoleFeatures().data?.features;
304
+ if (features === void 0) return [];
305
+ return featureIds.flatMap((feature) => {
306
+ const ui = consoleFeatureUi[feature];
307
+ return ui !== void 0 && features[feature] ? [{
308
+ ...ui,
309
+ feature,
310
+ label: consoleFeatures[feature].label,
311
+ features
312
+ }] : [];
313
+ });
314
+ };
315
+ /** The release list's feature columns, with their headers. */
316
+ var useReleaseColumns = () => useFeatureUi().flatMap(({ feature, label, releaseColumn }) => releaseColumn === void 0 ? [] : [{
317
+ ...releaseColumn,
318
+ feature,
319
+ label
320
+ }]);
321
+ /** The release editor's feature sections, for one release. */
322
+ function ReleaseSections({ release }) {
323
+ return useFeatureUi().map(({ feature, releaseSection: Section }) => Section === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Section, { release }, feature));
324
+ }
325
+ var optionalString = (value) => typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
326
+ /**
327
+ * The search a URL holds, reduced to one of the filter sets the release
328
+ * indexes serve: a bundle, a scope (with enabled), or a channel with its
329
+ * platform (with enabled). A channel without a platform lists iOS.
330
+ */
331
+ function validateReleaseSearch(search) {
332
+ const beforeReleaseId = optionalString(search.beforeReleaseId);
333
+ const afterReleaseId = beforeReleaseId ? void 0 : optionalString(search.afterReleaseId);
334
+ const enabled = search.enabled === true || search.enabled === "true" ? true : search.enabled === false || search.enabled === "false" ? false : void 0;
335
+ const bundleId = optionalString(search.bundleId);
336
+ const scopeKey = bundleId ? void 0 : optionalString(search.scopeKey);
337
+ const channelId = bundleId || scopeKey ? void 0 : optionalString(search.channelId);
338
+ const platform = channelId === void 0 ? void 0 : search.platform === "android" ? "android" : "ios";
339
+ return {
340
+ afterReleaseId,
341
+ beforeReleaseId,
342
+ bundleId,
343
+ channelId,
344
+ enabled: scopeKey || channelId ? enabled : void 0,
345
+ platform,
346
+ releaseId: optionalString(search.releaseId),
347
+ scopeKey
348
+ };
349
+ }
350
+ function releaseFilterOf(search) {
351
+ const enabled = search.enabled === void 0 ? {} : { enabled: search.enabled };
352
+ if (search.bundleId) return {
353
+ kind: "bundle",
354
+ bundleId: search.bundleId
355
+ };
356
+ if (search.scopeKey) return {
357
+ kind: "scope",
358
+ scopeKey: search.scopeKey,
359
+ ...enabled
360
+ };
361
+ if (search.channelId && search.platform) return {
362
+ kind: "channelPlatform",
363
+ channelId: search.channelId,
364
+ platform: search.platform,
365
+ ...enabled
366
+ };
367
+ return { kind: "all" };
368
+ }
369
+ function hasReleaseFilters(search) {
370
+ return releaseFilterOf(search).kind !== "all";
371
+ }
372
+ /**
373
+ * A new filter starts from the first page. A bundle or scope filter replaces
374
+ * the others, and choosing a channel or platform clears them.
375
+ */
376
+ function updateReleaseFilters(current, filters) {
377
+ const next = {
378
+ ...current,
379
+ ...filters
380
+ };
381
+ if (filters.bundleId) return validateReleaseSearch({ bundleId: next.bundleId });
382
+ if (filters.scopeKey) return validateReleaseSearch({
383
+ scopeKey: next.scopeKey,
384
+ enabled: next.enabled
385
+ });
386
+ if ("channelId" in filters || "platform" in filters) return validateReleaseSearch({
387
+ channelId: next.channelId,
388
+ enabled: next.enabled,
389
+ platform: next.platform
390
+ });
391
+ return validateReleaseSearch({
392
+ bundleId: next.bundleId,
393
+ channelId: next.channelId,
394
+ enabled: next.enabled,
395
+ platform: next.platform,
396
+ scopeKey: next.scopeKey
397
+ });
398
+ }
399
+ var $$splitComponentImporter = () => import("./routes-DgvnFqDy.mjs");
400
+ /**
401
+ * Opens a bundle from a click anywhere on its row or card, except on a
402
+ * control inside it, which keeps its own action.
403
+ */
404
+ var Route = createFileRoute("/")({
405
+ component: lazyRouteComponent($$splitComponentImporter, "component"),
406
+ validateSearch: validateReleaseSearch
407
+ });
408
+ //#endregion
409
+ export { updateReleaseFilters as a, releaseFilterOf as i, Route as n, useFeatureUi as o, hasReleaseFilters as r, useReleaseColumns as s, ReleaseSections as t };
@@ -0,0 +1,104 @@
1
+ import { i as resolveConsoleFeatures, n as consoleFeatures, t as ConsoleFeatureUnavailableError } from "./console-features-Oz0q20jJ.mjs";
2
+ import { t as isRemoteDatabase } from "./databaseConfig-C5SkAyUy.mjs";
3
+ import { a as createInsightsReads, i as createInsightsAdminReads, n as createRemoteConfigAdminApi, o as createInsightsModel, r as RemoteConfigValidationError } from "./plugins-BaD1slHx.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/runtime.server-De0QVWc9.js
5
+ var invalidOf = (error) => {
6
+ if (error instanceof RemoteConfigValidationError) return {
7
+ status: "invalid",
8
+ issues: error.issues
9
+ };
10
+ throw error;
11
+ };
12
+ /**
13
+ * Remote Config over the `remoteConfig()` API the console assembled on the
14
+ * database, or over the admin routes, which answer as the API does.
15
+ */
16
+ var createLocalRemoteConfig = (api) => ({
17
+ getActive: () => api.getActive(),
18
+ listVersions: (input) => api.listVersions(input),
19
+ getVersion: (version) => api.getVersion(version),
20
+ publish: (input) => api.publish(input).catch(invalidOf),
21
+ rollback: (input) => api.rollback(input)
22
+ });
23
+ /**
24
+ * Remote Config over a self-hosted server's admin routes. A route the server
25
+ * does not mount answers core's 404: it runs without `remoteConfig()`.
26
+ */
27
+ var createAdminRemoteConfig = (fetchAdmin) => createLocalRemoteConfig(createRemoteConfigAdminApi(fetchAdmin, { unavailable: () => new ConsoleFeatureUnavailableError("remoteConfig", { remote: true }) }));
28
+ var featureApi = (api) => api;
29
+ /** What serves each console feature, keyed like `consoleFeatures`. */
30
+ var consoleFeatureApis = {
31
+ insights: featureApi({
32
+ local: createInsightsReads,
33
+ remote: (fetchAdmin) => createInsightsAdminReads(fetchAdmin, { unavailable: () => new ConsoleFeatureUnavailableError("insights", { remote: true }) })
34
+ }),
35
+ insightsAnalytics: featureApi({ local: (api) => createInsightsModel(api) }),
36
+ remoteConfig: featureApi({
37
+ local: (api) => createLocalRemoteConfig(api),
38
+ remote: createAdminRemoteConfig
39
+ }),
40
+ apiKeys: featureApi({ local: (api) => api })
41
+ };
42
+ var isRecord = (value) => typeof value === "object" && value !== null;
43
+ /**
44
+ * Whether one of Hot Updater's own factories made `plugin`: the brand they
45
+ * set under a registered symbol, read here with a copy of the key so the
46
+ * console imports no package's internals. Assembly refuses any other plugin
47
+ * that takes one of their ids, so features key on it.
48
+ */
49
+ var isOfficialPlugin = (plugin) => isRecord(plugin) && Reflect.get(plugin, Symbol.for("@hot-updater/server/official-plugin")) === true;
50
+ var featureIds = Object.keys(consoleFeatureApis);
51
+ /**
52
+ * What serves each feature, built by its factory: over the plugins' APIs the
53
+ * console assembled, or over a self-hosted server's admin API. A feature
54
+ * without its plugin, or without a factory for the admin API, has none.
55
+ */
56
+ var featureApis = (build) => Object.fromEntries(featureIds.flatMap((feature) => {
57
+ const api = build(feature);
58
+ return api === void 0 ? [] : [[feature, api]];
59
+ }));
60
+ /**
61
+ * The console's features and what serves them, for the plugins its config
62
+ * lists, the plugins the server runs:
63
+ * - a self-hosted server (`standaloneRepository`) runs them itself; the
64
+ * console serves what that server's admin API serves of their features,
65
+ * and nothing that needs the database;
66
+ * - otherwise the console runs them over the database, as the server does,
67
+ * and serves their features through `api`, their APIs.
68
+ */
69
+ var createConsoleRuntime = (config) => {
70
+ const { database } = config;
71
+ const official = new Set(config.plugins.filter(isOfficialPlugin).map((plugin) => plugin.id));
72
+ if (isRemoteDatabase(database)) {
73
+ const { fetchAdmin } = database;
74
+ const features = resolveConsoleFeatures([...official], { remote: true });
75
+ return {
76
+ remote: true,
77
+ features: async () => features,
78
+ apis: featureApis((feature) => consoleFeatureApis[feature].remote?.(fetchAdmin))
79
+ };
80
+ }
81
+ const api = config.api ?? {};
82
+ const features = resolveConsoleFeatures([...official], { remote: false });
83
+ return {
84
+ remote: false,
85
+ features: async () => features,
86
+ apis: featureApis((feature) => {
87
+ const { plugin } = consoleFeatures[feature];
88
+ const pluginApi = official.has(plugin) ? api[plugin] : void 0;
89
+ return pluginApi === void 0 ? void 0 : consoleFeatureApis[feature].local(pluginApi);
90
+ })
91
+ };
92
+ };
93
+ /**
94
+ * What serves `feature`. Every feature's server function asks for it first,
95
+ * so a feature the console does not serve is refused with one error the
96
+ * client recognizes, before anything is read.
97
+ */
98
+ var requireFeature = async (runtime, feature) => {
99
+ const api = runtime.apis[feature];
100
+ if (api === void 0 || !(await runtime.features())[feature]) throw new ConsoleFeatureUnavailableError(feature, { remote: runtime.remote });
101
+ return api;
102
+ };
103
+ //#endregion
104
+ export { createConsoleRuntime, requireFeature };