@hot-updater/console 1.0.0-rc.9 → 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 (341) 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-CyMmr0O9.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-CKvQ4VIE.mjs → alert-dialog-C43Doa0I.mjs} +6 -83
  74. package/.output/server/_ssr/{api-keys-CzZ7Ont4.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-DH6Bhwcz.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-BrGSjz4S.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-DDKmIrpV.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-cIsU-kHG.mjs → insights_.distribution-DN9pR422.mjs} +50 -22
  120. package/.output/server/_ssr/installations-BHmbbnH8.mjs +5 -0
  121. package/.output/server/_ssr/{installations-C5anhyP0.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-BuanSsRI.mjs → router-D8NuoJ_I.mjs} +107 -134
  135. package/.output/server/_ssr/{routes-DY-vqU6R.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-DD2szs3Y.mjs → select-t3iXRwc9.mjs} +3 -3
  140. package/.output/server/_ssr/server-h4VxnExB.mjs +8325 -0
  141. package/.output/server/_ssr/{createSsrRpc-CdlfejmI.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-CTj6n-4F.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 +309 -211
  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 +69 -74
  158. package/src/components/ConsoleFeatureUnavailable.tsx +80 -0
  159. package/src/components/NotFoundPage.tsx +7 -7
  160. package/src/components/features/FeatureSlots.tsx +103 -0
  161. package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
  162. package/src/components/features/bundles/BundleMetadata.tsx +8 -5
  163. package/src/components/features/bundles/RolloutCohortsDialog.tsx +1 -1
  164. package/src/components/features/channels/ChannelManagementDialog.tsx +8 -6
  165. package/src/components/features/insights/AppUsage.tsx +41 -14
  166. package/src/components/features/insights/BuiltinBundle.tsx +36 -0
  167. package/src/components/features/insights/ComparedBundlesChart.tsx +310 -0
  168. package/src/components/features/insights/EstimatedCount.tsx +18 -0
  169. package/src/components/features/insights/EventDetails.tsx +390 -26
  170. package/src/components/features/insights/EventHistoryCard.tsx +111 -25
  171. package/src/components/features/insights/EventHistoryList.tsx +1 -1
  172. package/src/components/features/insights/FailureReports.tsx +407 -0
  173. package/src/components/features/insights/InsightsControls.tsx +240 -142
  174. package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
  175. package/src/components/features/insights/InsightsOverview.tsx +601 -403
  176. package/src/components/features/insights/InsightsPageHeader.tsx +19 -14
  177. package/src/components/features/insights/InsightsPeriodSelector.tsx +67 -12
  178. package/src/components/features/insights/InstallationHistoryCard.tsx +65 -10
  179. package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
  180. package/src/components/features/insights/ReleaseActivity.tsx +308 -0
  181. package/src/components/features/insights/ReportingDevicesSummary.tsx +13 -13
  182. package/src/components/features/insights/RollbackButton.tsx +118 -0
  183. package/src/components/features/insights/UpdateFailures.tsx +382 -0
  184. package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
  185. package/src/components/features/releases/ReleaseEditorSheet.tsx +27 -13
  186. package/src/components/features/remote-config/ConditionDialog.tsx +592 -0
  187. package/src/components/features/remote-config/ConditionsCard.tsx +247 -0
  188. package/src/components/features/remote-config/ParameterDialog.tsx +426 -0
  189. package/src/components/features/remote-config/ParametersCard.tsx +254 -0
  190. package/src/components/features/remote-config/PreviewCard.tsx +284 -0
  191. package/src/components/features/remote-config/PublishDialog.tsx +325 -0
  192. package/src/components/features/remote-config/RemoteConfigPage.tsx +353 -0
  193. package/src/components/features/remote-config/RuleSummary.tsx +21 -0
  194. package/src/components/features/remote-config/ValueInput.tsx +151 -0
  195. package/src/components/features/remote-config/VersionsCard.tsx +384 -0
  196. package/src/components/features/remote-config/remoteConfigFeatureUi.tsx +15 -0
  197. package/src/components/features/remote-config/useDateTimeText.ts +16 -0
  198. package/src/components/ui/sidebar.tsx +22 -29
  199. package/src/index.ts +26 -19
  200. package/src/lib/api-keys-api.ts +0 -28
  201. package/src/lib/api-keys-rpc.ts +27 -38
  202. package/src/lib/api-rpc.ts +125 -288
  203. package/src/lib/api.ts +15 -134
  204. package/src/lib/bundle-activity.ts +24 -4
  205. package/src/lib/console-access.ts +20 -0
  206. package/src/lib/console-features-api.ts +68 -0
  207. package/src/lib/console-features-rpc.ts +13 -0
  208. package/src/lib/console-features.ts +98 -0
  209. package/src/lib/insights-api.ts +56 -2
  210. package/src/lib/insights-errors.ts +64 -0
  211. package/src/lib/insights-failures-rpc.ts +36 -0
  212. package/src/lib/insights-failures.ts +130 -0
  213. package/src/lib/insights-recovery-rpc.ts +13 -17
  214. package/src/lib/insights-recovery.ts +12 -36
  215. package/src/lib/insights-retention.ts +21 -0
  216. package/src/lib/insights-rpc.ts +30 -12
  217. package/src/lib/insights-search.ts +50 -4
  218. package/src/lib/insights-usage-rpc.ts +15 -9
  219. package/src/lib/insights-usage.ts +41 -3
  220. package/src/lib/insights-view.ts +34 -5
  221. package/src/lib/release-adoption-api.ts +214 -0
  222. package/src/lib/release-adoption-rpc.ts +49 -0
  223. package/src/lib/release-adoption.ts +164 -0
  224. package/src/lib/remote-config-api.ts +119 -0
  225. package/src/lib/remote-config-draft.ts +666 -0
  226. package/src/lib/remote-config-rpc.ts +196 -0
  227. package/src/lib/scroll-restoration.ts +21 -0
  228. package/src/lib/server/auth.server.ts +13 -5
  229. package/src/lib/server/bundleActivity.ts +27 -28
  230. package/src/lib/server/config.server.ts +21 -76
  231. package/src/lib/server/console-feature-apis.ts +70 -0
  232. package/src/lib/server/console-runtime.server.ts +82 -38
  233. package/src/lib/server/downloadBundle.ts +14 -15
  234. package/src/lib/server/failureReports.ts +50 -0
  235. package/src/lib/server/getBundleChildren.ts +31 -122
  236. package/src/lib/server/insightsUsage.ts +52 -113
  237. package/src/lib/server/listReleases.ts +109 -44
  238. package/src/lib/server/releaseAdoption.ts +151 -0
  239. package/src/lib/server/releaseReachability.ts +8 -8
  240. package/src/lib/server/remoteConfig.ts +75 -0
  241. package/src/lib/server/runtime.server.ts +120 -31
  242. package/src/lib/server/updateFailures.ts +66 -0
  243. package/src/lib/use-dialog-target.ts +27 -0
  244. package/src/routeTree.gen.ts +44 -44
  245. package/src/router.tsx +3 -2
  246. package/src/routes/-installations-search.ts +32 -8
  247. package/src/routes/-releases-search.ts +76 -29
  248. package/src/routes/__root.tsx +7 -1
  249. package/src/routes/api/bundles/$bundleId/download.ts +2 -5
  250. package/src/routes/api-keys.tsx +5 -2
  251. package/src/routes/index.tsx +210 -152
  252. package/src/routes/insights.tsx +91 -23
  253. package/src/routes/insights_.distribution.tsx +50 -9
  254. package/src/routes/installations.tsx +97 -40
  255. package/src/routes/remote-config.tsx +42 -0
  256. package/src/styles.css +9 -0
  257. package/src/vite-internal.ts +15 -3
  258. package/src/vite.ts +2 -0
  259. package/.output/public/assets/HashValueDisplay-BpTc3Oyg.js +0 -1
  260. package/.output/public/assets/InsightsPageHeader-DC2eEst8.js +0 -1
  261. package/.output/public/assets/api-CdUyUqzR.js +0 -42
  262. package/.output/public/assets/api-keys-64PM9PwW.js +0 -1
  263. package/.output/public/assets/api-keys-api-BeaJnvY5.js +0 -1
  264. package/.output/public/assets/arrow-left-04Rh8Zgp.js +0 -1
  265. package/.output/public/assets/card-CYHs5FZv.js +0 -1
  266. package/.output/public/assets/chart-no-axes-combined-DwyMsVFW.js +0 -1
  267. package/.output/public/assets/createServerFn-DU71xucx.js +0 -3
  268. package/.output/public/assets/dialog-IVMkBRCq.js +0 -1
  269. package/.output/public/assets/dist-BR4GzeEu.js +0 -1
  270. package/.output/public/assets/field-B3CYDpjg.js +0 -1
  271. package/.output/public/assets/index-Cb_D1D6N.js +0 -10
  272. package/.output/public/assets/info-C3y9HNoU.js +0 -1
  273. package/.output/public/assets/input-group-nLZylhWF.js +0 -1
  274. package/.output/public/assets/insights-Bm9v8uO3.js +0 -2
  275. package/.output/public/assets/insights-DS3iO7Up.js +0 -1
  276. package/.output/public/assets/insights-search-Byj3g3Mp.js +0 -1
  277. package/.output/public/assets/insights-usage-rpc-BaGR3lgq.js +0 -1
  278. package/.output/public/assets/insights_.distribution-B1i6cjlQ.js +0 -1
  279. package/.output/public/assets/insights_.distribution-C1Wf27eB.js +0 -2
  280. package/.output/public/assets/installations-CkFW4fV9.js +0 -2
  281. package/.output/public/assets/installations-DxTaIcHD.js +0 -1
  282. package/.output/public/assets/lazyRouteComponent-BapzjYnb.js +0 -1
  283. package/.output/public/assets/list-Dqt53fWZ.js +0 -1
  284. package/.output/public/assets/loader-circle-CUKfUqow.js +0 -1
  285. package/.output/public/assets/preload-helper-ClBMtM1g.js +0 -1
  286. package/.output/public/assets/refresh-cw-CNE_2PnD.js +0 -1
  287. package/.output/public/assets/routes-Cgtvspjg.js +0 -2
  288. package/.output/public/assets/routes-O2r2UUN8.js +0 -1
  289. package/.output/public/assets/shield-check-BFcJ46kz.js +0 -1
  290. package/.output/public/assets/signing-BgspC-xP.js +0 -1
  291. package/.output/public/assets/styles-DnrWuBwd.css +0 -2
  292. package/.output/public/assets/table-BuWQgxJJ.js +0 -1
  293. package/.output/public/assets/useMutation-CSV9NCUl.js +0 -1
  294. package/.output/public/assets/useOpenInteractionType-D5kduCTD.js +0 -1
  295. package/.output/public/assets/valueToPercent-BAtcbSLk.js +0 -1
  296. package/.output/server/__23tanstack-start-server-fn-resolver-DBRojHaG.mjs +0 -150
  297. package/.output/server/_ssr/InsightsPageHeader-mtxVuZKK.mjs +0 -64
  298. package/.output/server/_ssr/api-BfCgYlj5.mjs +0 -332
  299. package/.output/server/_ssr/api-keys-api-C3oeq01R.mjs +0 -60
  300. package/.output/server/_ssr/api-keys-rpc-CdPFdGOx.mjs +0 -136
  301. package/.output/server/_ssr/api-rpc-B2E1ZIG5.mjs +0 -1399
  302. package/.output/server/_ssr/auth.server-CmicHh0J.mjs +0 -47
  303. package/.output/server/_ssr/bundle-signing-rpc-Di7-I6fE.mjs +0 -16
  304. package/.output/server/_ssr/bundle-signing.server-Uqt1OF49.mjs +0 -12
  305. package/.output/server/_ssr/bundleActivity-pBrPSG01.mjs +0 -28
  306. package/.output/server/_ssr/card-Bemj0dpY.mjs +0 -108
  307. package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
  308. package/.output/server/_ssr/config.server-B8WsT3s0.mjs +0 -368
  309. package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
  310. package/.output/server/_ssr/deleteBundle-8X-jq7Z7.mjs +0 -66
  311. package/.output/server/_ssr/field-BrQ2u0fT.mjs +0 -74
  312. package/.output/server/_ssr/getBundleChildren-DoL8l_AS.mjs +0 -50
  313. package/.output/server/_ssr/insights-BwQ-wF2a.mjs +0 -10
  314. package/.output/server/_ssr/insights-gr1I_dJU.mjs +0 -938
  315. package/.output/server/_ssr/insights-recovery-Cv6RSyeR.mjs +0 -21
  316. package/.output/server/_ssr/insights-recovery-rpc-DOzxfYfv.mjs +0 -37
  317. package/.output/server/_ssr/insights-search-1czJMZgk.mjs +0 -21
  318. package/.output/server/_ssr/insights-usage-rpc-4ImOq_0p.mjs +0 -184
  319. package/.output/server/_ssr/insights-usage-rpc-BUruODjE.mjs +0 -24
  320. package/.output/server/_ssr/insightsContract-B09K_Px1.mjs +0 -303
  321. package/.output/server/_ssr/insightsHistory-Ci4rYAgl.mjs +0 -41
  322. package/.output/server/_ssr/insightsRecovery-CaghWL2t.mjs +0 -113
  323. package/.output/server/_ssr/insightsUsage-DNIj6jxF.mjs +0 -71
  324. package/.output/server/_ssr/insights_.distribution-VmHuikRE.mjs +0 -10
  325. package/.output/server/_ssr/installations-HXMF_kKf.mjs +0 -29
  326. package/.output/server/_ssr/routes-Dru3IRj0.mjs +0 -37
  327. package/.output/server/_ssr/runtime.server-CsiKFp_Z.mjs +0 -436
  328. package/.output/server/_ssr/server-DJm72Kj-.mjs +0 -7468
  329. package/.output/server/_ssr/signing-H8Lg4lPe.mjs +0 -133
  330. package/.output/server/_ssr/start-DpViQGnt.mjs +0 -4
  331. package/.output/server/_tanstack-start-manifest_v-DsFcTLw_.mjs +0 -125
  332. package/src/components/features/bundles/BundleActivityChart.tsx +0 -97
  333. package/src/components/features/bundles/BundleInsightsSummary.tsx +0 -126
  334. package/src/components/features/signing/BundleSigningPage.tsx +0 -139
  335. package/src/lib/bundle-signing-api.ts +0 -14
  336. package/src/lib/bundle-signing-rpc.ts +0 -16
  337. package/src/lib/server/bundle-signing.server.ts +0 -23
  338. package/src/lib/server/deleteBundle.ts +0 -145
  339. package/src/lib/server/insightsHistory.ts +0 -52
  340. package/src/lib/server/insightsRecovery.ts +0 -187
  341. package/src/routes/signing.tsx +0 -37
@@ -0,0 +1,13 @@
1
+ import { gt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
+ import { k as cn } from "./sidebar-DJcErBMo.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/BundleIdDisplay-x94o9rlU.js
4
+ var import_jsx_runtime = require_jsx_runtime();
5
+ function BundleIdDisplay({ bundleId, className }) {
6
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
7
+ translate: "no",
8
+ className: cn("break-all font-mono text-xs tabular-nums", className),
9
+ children: bundleId
10
+ });
11
+ }
12
+ //#endregion
13
+ export { BundleIdDisplay as t };
@@ -0,0 +1,58 @@
1
+ import { gt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
+ import { X as ArrowUpRight } from "../_libs/lucide-react.mjs";
3
+ import { O as buttonVariants, S as SidebarTrigger } from "./sidebar-DJcErBMo.mjs";
4
+ import { a as unavailableReason, n as consoleFeatures } from "./console-features-Oz0q20jJ.mjs";
5
+ import { a as useConsoleFeatures, n as notFoundFeature } from "./console-features-api-C9kiKvaV.mjs";
6
+ import { t as NotFoundPage } from "./NotFoundPage-DZzOOzS3.mjs";
7
+ import { i as EmptyHeader, n as EmptyContent, o as EmptyTitle, r as EmptyDescription, t as Empty } from "./empty-CVLGfxuu.mjs";
8
+ //#region node_modules/.nitro/vite/services/ssr/assets/ConsoleFeatureUnavailable-ldW8v8-q.js
9
+ var import_jsx_runtime = require_jsx_runtime();
10
+ var CONSOLE_DEPLOYMENT_GUIDE_URL = "https://hot-updater.dev/docs/guides/console-deployment";
11
+ /**
12
+ * A feature route's not-found state: the plugin to add, or, for a feature a
13
+ * self-hosted server does not serve, the database config it needs.
14
+ */
15
+ function ConsoleFeatureUnavailable({ data }) {
16
+ const feature = notFoundFeature(data);
17
+ const remote = useConsoleFeatures().data?.remote === true;
18
+ if (feature === void 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NotFoundPage, {});
19
+ const { label, plugin } = consoleFeatures[feature];
20
+ const pluginCall = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
21
+ className: "font-mono",
22
+ children: `${plugin}()`
23
+ });
24
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
25
+ className: "flex h-svh min-h-0 flex-col",
26
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
27
+ className: "sticky top-0 z-10 flex shrink-0 items-center gap-3 border-b bg-background px-3 py-3 sm:min-h-12 sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm",
28
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarTrigger, { className: "-ml-1" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
29
+ className: "text-sm font-medium",
30
+ children: label
31
+ })]
32
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
33
+ className: "flex min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6",
34
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Empty, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyHeader, { children: unavailableReason(feature, { remote }) === "remote" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyTitle, { children: "Needs the server's database" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyDescription, { children: "This console reaches a self-hosted server through its admin API, which does not serve this page. Configure the console with the database the server uses." })] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyTitle, { children: [label, " not installed"] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyDescription, { children: [
35
+ "Add ",
36
+ pluginCall,
37
+ " to ",
38
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
39
+ className: "font-mono",
40
+ children: "plugins"
41
+ }),
42
+ " ",
43
+ "where you create the server and in the console config."
44
+ ] })] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
45
+ className: buttonVariants({ variant: "outline" }),
46
+ href: CONSOLE_DEPLOYMENT_GUIDE_URL,
47
+ rel: "noreferrer",
48
+ target: "_blank",
49
+ children: ["Console setup guide", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowUpRight, {
50
+ "aria-hidden": "true",
51
+ "data-icon": "inline-end"
52
+ })]
53
+ }) })] })
54
+ })]
55
+ });
56
+ }
57
+ //#endregion
58
+ export { ConsoleFeatureUnavailable as t };
@@ -0,0 +1,344 @@
1
+ import { i as __toESM } from "../_runtime.mjs";
2
+ import { _t as require_react, gt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
+ import { B as CircleAlert, F as Download, G as Check, I as Copy, Q as ArrowRightLeft, W as ChevronDown, h as RotateCcw, l as Sparkles, tt as Activity, u as Smartphone } from "../_libs/lucide-react.mjs";
4
+ import { a as SheetContent, c as SheetTitle, i as Sheet, l as SheetTrigger, o as SheetDescription, s as SheetHeader, t as Button$1 } from "./sidebar-DJcErBMo.mjs";
5
+ import { a as Badge } from "./field-asw83X0v.mjs";
6
+ import { n as toast } from "../_libs/sonner.mjs";
7
+ import { i as EmptyHeader, o as EmptyTitle, r as EmptyDescription, t as Empty } from "./empty-CVLGfxuu.mjs";
8
+ import { n as describeFailure } from "./insights-failures-xaa41Buf.mjs";
9
+ import { s as isBuiltinBundle, t as BuiltinBundleBadge } from "./InsightsPageHeader-BSUX3Ye9.mjs";
10
+ import { t as HashValueDisplay } from "./HashValueDisplay-n1GholGS.mjs";
11
+ //#region node_modules/.nitro/vite/services/ssr/assets/EventDetails-Q8kfj9Nr.js
12
+ var import_react = /* @__PURE__ */ __toESM(require_react());
13
+ var import_jsx_runtime = require_jsx_runtime();
14
+ var eventTypes = {
15
+ UPDATE_DOWNLOADED: {
16
+ label: "Downloaded",
17
+ description: "Downloaded. It launches when the app restarts.",
18
+ variant: "default",
19
+ icon: Download
20
+ },
21
+ UPDATE_APPLIED: {
22
+ label: "Launched",
23
+ description: "The app restarted into the downloaded bundle.",
24
+ variant: "success",
25
+ icon: Check
26
+ },
27
+ RECOVERED: {
28
+ label: "Crashed",
29
+ description: "Crashed on the bundle and rolled back.",
30
+ variant: "warning",
31
+ icon: RotateCcw
32
+ },
33
+ UPDATE_FAILED: {
34
+ label: "Update failed",
35
+ description: "An update check, download, or install failed.",
36
+ variant: "destructive",
37
+ icon: CircleAlert
38
+ },
39
+ UNCHANGED: {
40
+ label: "Launch",
41
+ description: "The app launched; the report changed nothing.",
42
+ variant: "secondary",
43
+ icon: Activity
44
+ }
45
+ };
46
+ /**
47
+ * A kept UNCHANGED report, named by what it changed: an installation first
48
+ * seen, an App Store update, a launch with no apply report, an adopted
49
+ * release, or a channel switch.
50
+ */
51
+ var changeTypeOf = (event) => {
52
+ const { kinds = [], previous } = event.change ?? {};
53
+ if (kinds.includes("first_seen")) return {
54
+ label: "First seen",
55
+ description: "The installation's first report to this server.",
56
+ variant: "secondary",
57
+ icon: Sparkles
58
+ };
59
+ if (kinds.includes("app_version") || kinds.includes("native_build")) return {
60
+ label: "App updated",
61
+ description: previous && previous.appVersion !== event.appVersion ? `From app ${previous.appVersion} to ${event.appVersion}.` : "A new build of the same app version.",
62
+ variant: "secondary",
63
+ icon: Smartphone
64
+ };
65
+ if (kinds.includes("bundle")) return {
66
+ label: "Launched",
67
+ description: "Seen running this bundle; the report of the restart into it never arrived.",
68
+ variant: "success",
69
+ icon: Check
70
+ };
71
+ if (kinds.includes("release")) return {
72
+ label: "Release adopted",
73
+ description: "The bundle it runs now ships under another release.",
74
+ variant: "secondary",
75
+ icon: ArrowRightLeft
76
+ };
77
+ if (kinds.includes("channel")) return {
78
+ label: "Channel changed",
79
+ description: previous ? `From ${previous.channel} to ${event.channel}.` : "It reports on another channel.",
80
+ variant: "secondary",
81
+ icon: ArrowRightLeft
82
+ };
83
+ return eventTypes.UNCHANGED;
84
+ };
85
+ /** How the console names an event's type. */
86
+ var eventTypeOf = (event) => event.type === "UNCHANGED" && event.change ? changeTypeOf({
87
+ change: event.change,
88
+ appVersion: event.appVersion ?? "",
89
+ channel: event.channel ?? ""
90
+ }) : eventTypes[event.type];
91
+ function useInsightsTimeFormat() {
92
+ const [timeZone, setTimeZone] = (0, import_react.useState)("UTC");
93
+ (0, import_react.useEffect)(() => {
94
+ setTimeZone(Intl.DateTimeFormat().resolvedOptions().timeZone);
95
+ }, []);
96
+ return new Intl.DateTimeFormat("en", {
97
+ timeZone,
98
+ timeZoneName: "shortOffset",
99
+ year: "numeric",
100
+ month: "2-digit",
101
+ day: "2-digit",
102
+ hour: "2-digit",
103
+ minute: "2-digit",
104
+ second: "2-digit",
105
+ hourCycle: "h23"
106
+ });
107
+ }
108
+ function formatInsightsTimestamp(value, formatter) {
109
+ const parts = Object.fromEntries(formatter.formatToParts(new Date(value)).map(({ type, value }) => [type, value]));
110
+ const offset = parts.timeZoneName === "GMT" ? "GMT+0" : parts.timeZoneName;
111
+ return `${parts.year}/${parts.month}/${parts.day} ${parts.hour}:${parts.minute}:${parts.second} ${offset}`;
112
+ }
113
+ function EventTimestamp({ value, formatter, touch = false }) {
114
+ const date = new Date(value);
115
+ const localTime = formatInsightsTimestamp(value, formatter);
116
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", {
117
+ className: "group/time",
118
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("summary", {
119
+ className: `cursor-pointer list-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/30 [&::-webkit-details-marker]:hidden ${touch ? "flex min-h-11 items-center" : ""}`,
120
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
121
+ className: "flex items-center gap-1",
122
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("time", {
123
+ dateTime: date.toISOString(),
124
+ className: "whitespace-nowrap",
125
+ children: localTime
126
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, {
127
+ "aria-hidden": "true",
128
+ className: "size-3 text-muted-foreground group-open/time:rotate-180"
129
+ })]
130
+ })
131
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
132
+ className: "mt-2 text-muted-foreground",
133
+ children: date.toISOString().replace("T", " ").replace("Z", " UTC")
134
+ })]
135
+ });
136
+ }
137
+ var deliveries = {
138
+ patch: "A patch delivered it.",
139
+ manifest: "Only the changed files were downloaded.",
140
+ archive: "The full archive was downloaded."
141
+ };
142
+ /** What the event's report added: where an update failed, or how a bundle arrived. */
143
+ var eventNote = (event) => {
144
+ if (event.late) return "Counted nothing: the installation had already downloaded or run this bundle.";
145
+ if (event.impliedDownload) return "Its download report never arrived; the download counted with it.";
146
+ if (event.type === "UPDATE_FAILED" && event.failure) return describeFailure(event.failure);
147
+ if (event.type === "UPDATE_DOWNLOADED" && event.delivery) {
148
+ const delivered = deliveries[event.delivery] ?? null;
149
+ return event.patchFallback ? `The patch failed. ${delivered ?? ""}`.trim() : delivered;
150
+ }
151
+ return null;
152
+ };
153
+ function HttpResponseBody({ response }) {
154
+ const copyBody = async () => {
155
+ try {
156
+ await navigator.clipboard.writeText(response.body);
157
+ toast.success("Response body copied");
158
+ } catch {
159
+ toast.error("Could not copy the response body");
160
+ }
161
+ };
162
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
163
+ "aria-label": "Response body",
164
+ className: "flex min-w-0 flex-col gap-3",
165
+ children: [
166
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
167
+ className: "flex flex-wrap items-center justify-between gap-3",
168
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
169
+ className: "text-sm font-medium",
170
+ children: "Response body"
171
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
172
+ variant: "outline",
173
+ className: "min-h-11",
174
+ disabled: response.body === null || response.body === "",
175
+ onClick: () => void copyBody(),
176
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Copy, {
177
+ "aria-hidden": "true",
178
+ "data-icon": "inline-start"
179
+ }), " Copy body"]
180
+ })]
181
+ }),
182
+ response.bodyTruncated ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
183
+ className: "text-xs text-muted-foreground",
184
+ children: "Truncated to the 4 KiB reporting limit. Copy includes only the stored text."
185
+ }) : null,
186
+ response.body ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
187
+ className: "rounded-md border bg-muted/30 p-4 font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere",
188
+ children: response.body
189
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Empty, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyTitle, { children: response.body === null ? "Response body unavailable" : "Empty response body" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyDescription, { children: response.body === null ? "The client received the HTTP status but could not read the body." : response.status === 304 ? "The server returned no body. The client can reuse its cached catalog." : "The server returned no text in this response." })] }) })
190
+ ]
191
+ });
192
+ }
193
+ function HttpResponseDetails({ event }) {
194
+ const response = event.httpResponse;
195
+ const formatter = useInsightsTimeFormat();
196
+ const status = response.status === 304 ? "Not modified" : response.status >= 500 ? "Server error" : response.status >= 400 ? "Request error" : response.status >= 300 ? "Redirect" : "Success";
197
+ const resource = response.resource === "catalog" ? "Catalog" : "Artifact";
198
+ const context = [
199
+ ["App", event.platform && `${event.platform === "ios" ? "iOS" : "Android"} ${event.appVersion}`],
200
+ ["Channel", event.channel],
201
+ ["SDK", event.sdkVersion],
202
+ ["Installation", event.installId]
203
+ ].filter(([, value]) => value != null);
204
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Sheet, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetTrigger, {
205
+ "aria-label": `View ${resource.toLowerCase()} response: HTTP ${response.status}`,
206
+ render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
207
+ variant: "ghost",
208
+ className: "-ml-2 h-auto min-h-11 justify-start"
209
+ }),
210
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Badge, {
211
+ variant: response.status >= 400 ? "destructive" : "secondary",
212
+ children: ["HTTP ", response.status]
213
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [resource, " response"] })]
214
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetContent, {
215
+ className: "data-[side=right]:w-full data-[side=right]:sm:max-w-2xl",
216
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetHeader, {
217
+ className: "border-b pr-14",
218
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetTitle, { children: "HTTP response" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetDescription, { children: [
219
+ resource,
220
+ " · HTTP ",
221
+ response.status,
222
+ " · ",
223
+ status,
224
+ ". Most recent response available when this report was created."
225
+ ] })]
226
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
227
+ className: "flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-6",
228
+ children: [
229
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
230
+ "aria-label": "Request",
231
+ className: "flex min-w-0 flex-col gap-2",
232
+ children: [
233
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
234
+ className: "text-sm font-medium",
235
+ children: "Request"
236
+ }),
237
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
238
+ className: "font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere",
239
+ children: ["GET ", response.path]
240
+ }),
241
+ response.receivedAtMs != null ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
242
+ className: "text-xs text-muted-foreground",
243
+ children: [
244
+ "Response received",
245
+ " ",
246
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventTimestamp, {
247
+ value: response.receivedAtMs,
248
+ formatter
249
+ })
250
+ ]
251
+ }) : null
252
+ ]
253
+ }),
254
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HttpResponseBody, { response }),
255
+ context.length ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
256
+ "aria-label": "Response context",
257
+ className: "flex flex-col gap-3",
258
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
259
+ className: "text-sm font-medium",
260
+ children: "Response context"
261
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dl", {
262
+ className: "grid grid-cols-2 gap-x-6 gap-y-4",
263
+ children: context.map(([label, value]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
264
+ className: "min-w-0",
265
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
266
+ className: "text-xs text-muted-foreground",
267
+ children: label
268
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
269
+ className: "mt-1 text-sm wrap-anywhere",
270
+ children: value
271
+ })]
272
+ }, label))
273
+ })]
274
+ }) : null
275
+ ]
276
+ })]
277
+ })] });
278
+ }
279
+ function EventTypeDetails({ event }) {
280
+ const eventType = eventTypeOf(event);
281
+ const Icon = eventType.icon;
282
+ const note = eventNote(event);
283
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
284
+ className: "flex min-w-0 flex-col items-start gap-2",
285
+ children: [
286
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Badge, {
287
+ variant: eventType.variant,
288
+ className: "gap-1 whitespace-nowrap [&_svg]:size-3",
289
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { "aria-hidden": "true" }), eventType.label]
290
+ }),
291
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
292
+ className: "max-w-56 whitespace-pre-wrap wrap-anywhere text-xs text-muted-foreground",
293
+ children: event.type === "UPDATE_FAILED" && note ? note : eventType.description
294
+ }),
295
+ event.httpResponse ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HttpResponseDetails, { event }) : null,
296
+ event.type === "UPDATE_FAILED" && event.failure?.errorStack ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", {
297
+ className: "w-full max-w-56 text-xs",
298
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("summary", {
299
+ className: "cursor-pointer text-muted-foreground",
300
+ children: "Stack trace"
301
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
302
+ className: "mt-2 max-h-64 overflow-auto whitespace-pre-wrap wrap-anywhere font-mono",
303
+ children: event.failure.errorStack
304
+ })]
305
+ }) : null,
306
+ event.type !== "UPDATE_FAILED" && note ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
307
+ className: "max-w-56 whitespace-normal text-xs text-muted-foreground",
308
+ children: note
309
+ }) : null
310
+ ]
311
+ });
312
+ }
313
+ function EventBundleTransition({ event, touch = false }) {
314
+ const downloaded = event.type === "UPDATE_DOWNLOADED";
315
+ const failed = event.type === "UPDATE_FAILED";
316
+ const targeted = !failed || event.failure?.stage !== "check";
317
+ const moved = event.type === "UNCHANGED" && event.change?.kinds.includes("bundle") === true && event.change.previous !== void 0;
318
+ const fromBundleId = moved ? event.change.previous.bundleId : event.fromBundleId;
319
+ const changed = downloaded || failed || moved || event.type === "UPDATE_APPLIED" || event.type === "RECOVERED";
320
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
321
+ className: "grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2 gap-y-2",
322
+ children: [fromBundleId && changed ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
323
+ className: "text-muted-foreground",
324
+ children: downloaded || failed ? "Running" : "From"
325
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dd", {
326
+ className: "flex min-w-0 flex-wrap items-center gap-2",
327
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HashValueDisplay, {
328
+ value: fromBundleId,
329
+ buttonClassName: touch ? "min-h-11 px-3" : void 0
330
+ }), isBuiltinBundle(fromBundleId, moved ? event.change.previous.minBundleId : event.minBundleId) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BuiltinBundleBadge, {}) : null]
331
+ })] }) : null, targeted ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
332
+ className: "text-muted-foreground",
333
+ children: downloaded ? "Pending" : failed ? "Target" : changed ? "To" : "Current"
334
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dd", {
335
+ className: "flex min-w-0 flex-wrap items-center gap-2",
336
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HashValueDisplay, {
337
+ value: event.toBundleId,
338
+ buttonClassName: touch ? "min-h-11 px-3" : void 0
339
+ }), isBuiltinBundle(event.toBundleId, event.minBundleId) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BuiltinBundleBadge, {}) : null]
340
+ })] }) : null]
341
+ });
342
+ }
343
+ //#endregion
344
+ export { HttpResponseDetails as a, HttpResponseBody as i, EventTimestamp as n, useInsightsTimeFormat as o, EventTypeDetails as r, EventBundleTransition as t };
@@ -1,7 +1,7 @@
1
- import { mt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
- import { C as cn, v as Tooltip$1, x as TooltipTrigger, y as TooltipContent } from "./createSsrRpc-CdlfejmI.mjs";
1
+ import { gt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
+ import { D as TooltipTrigger, T as TooltipContent, k as cn, w as Tooltip$1 } from "./sidebar-DJcErBMo.mjs";
3
3
  import { n as toast } from "../_libs/sonner.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/HashValueDisplay-CyMmr0O9.js
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/HashValueDisplay-n1GholGS.js
5
5
  var import_jsx_runtime = require_jsx_runtime();
6
6
  var shortenIdentifier = (value, maxLength = 12) => value.length > maxLength ? `${value.slice(0, Math.max(1, maxLength - 4))}…${value.slice(-4)}` : value;
7
7
  function HashValueDisplay({ value, maxLength = 12, className, buttonClassName }) {
@@ -0,0 +1,75 @@
1
+ import { i as __toESM } from "../_runtime.mjs";
2
+ import { _t as require_react, gt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
+ import { O as Info } from "../_libs/lucide-react.mjs";
4
+ import { D as TooltipTrigger, T as TooltipContent, t as Button$1, w as Tooltip$1 } from "./sidebar-DJcErBMo.mjs";
5
+ import { C as isUUIDv7 } from "./dist-CbQbBIw-.mjs";
6
+ import { r as extractTimestampFromUUIDv7 } from "./uuidv7-C88s9jWF.mjs";
7
+ //#region node_modules/.nitro/vite/services/ssr/assets/InsightsInfo-DuJFatQO.js
8
+ var import_react = /* @__PURE__ */ __toESM(require_react());
9
+ var import_jsx_runtime = require_jsx_runtime();
10
+ var readText = (value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1024 ? value : void 0;
11
+ var readWindow = (value) => value === "24h" || value === "7d" || value === "30d" ? value : void 0;
12
+ var readHealthChart = (value) => value === "adoption" || value === "crashes" ? value : void 0;
13
+ var readUsageWindow = (value) => value === "12m" ? value : readWindow(value);
14
+ function validateInsightsSearch(search) {
15
+ return {
16
+ platform: search.platform === "all" || search.platform === "ios" || search.platform === "android" ? search.platform : void 0,
17
+ channel: readText(search.channel),
18
+ appVersion: readText(search.appVersion),
19
+ window: readUsageWindow(search.window),
20
+ bundleWindow: readWindow(search.bundleWindow),
21
+ healthPlatform: search.healthPlatform === "ios" || search.healthPlatform === "android" ? search.healthPlatform : void 0,
22
+ healthChannel: readText(search.healthChannel),
23
+ releaseId: readText(search.releaseId),
24
+ healthChart: readHealthChart(search.healthChart),
25
+ bundles: readText(search.bundles)
26
+ };
27
+ }
28
+ function validateDistributionSearch(search) {
29
+ return {
30
+ ...validateInsightsSearch(search),
31
+ version: readText(search.version),
32
+ page: typeof search.page === "number" && Number.isSafeInteger(search.page) && search.page > 0 ? search.page : void 0
33
+ };
34
+ }
35
+ /**
36
+ * The shortest Release health period that still covers a release's first
37
+ * hours: 24h within a day of its deployment, 7d within a week, else 30d.
38
+ */
39
+ function adoptionWindow(releaseId, now = Date.now()) {
40
+ if (!isUUIDv7(releaseId)) return "7d";
41
+ const age = now - extractTimestampFromUUIDv7(releaseId);
42
+ return age <= 864e5 ? "24h" : age <= 7 * 864e5 ? "7d" : "30d";
43
+ }
44
+ /** Release health's compared bundles from the `bundles` search value. */
45
+ var comparedBundleIds = (value) => value === void 0 ? void 0 : [...new Set(value.split(",").filter((id) => id.length > 0))];
46
+ function InsightsInfo({ label, children }) {
47
+ const id = (0, import_react.useId)();
48
+ const [open, setOpen] = (0, import_react.useState)(false);
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip$1, {
50
+ open,
51
+ onOpenChange: setOpen,
52
+ triggerId: id,
53
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipTrigger, {
54
+ id,
55
+ "aria-describedby": open ? `${id}-description` : void 0,
56
+ closeOnClick: false,
57
+ onClick: () => setOpen((value) => !value),
58
+ render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
59
+ "aria-label": label,
60
+ className: "size-11 sm:size-7",
61
+ size: "icon",
62
+ variant: "ghost"
63
+ }),
64
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, {})
65
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipContent, {
66
+ id: `${id}-description`,
67
+ role: "tooltip",
68
+ className: "max-w-64",
69
+ side: "bottom",
70
+ children
71
+ })]
72
+ });
73
+ }
74
+ //#endregion
75
+ export { validateInsightsSearch as a, validateDistributionSearch as i, adoptionWindow as n, comparedBundleIds as r, InsightsInfo as t };
@@ -0,0 +1,145 @@
1
+ import { gt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
+ import { E as List, K as ChartNoAxesCombined, O as Info, i as TriangleAlert } from "../_libs/lucide-react.mjs";
3
+ import { O as buttonVariants, S as SidebarTrigger, k as cn } from "./sidebar-DJcErBMo.mjs";
4
+ import { a as Badge, i as AlertTitle, r as AlertDescription, t as Alert } from "./field-asw83X0v.mjs";
5
+ import { r as isConsoleFeatureUnavailableError } from "./console-features-Oz0q20jJ.mjs";
6
+ import { h as Link } from "../_libs/@tanstack/react-router+[...].mjs";
7
+ import { i as useConsoleFeature } from "./console-features-api-C9kiKvaV.mjs";
8
+ import { n as usageMetrics } from "./insights-usage-BpBM0U0c.mjs";
9
+ import { i as TabsTrigger, r as TabsList, t as Tabs$1 } from "./tabs-DEFnTm95.mjs";
10
+ //#region node_modules/.nitro/vite/services/ssr/assets/InsightsPageHeader-BSUX3Ye9.js
11
+ var import_jsx_runtime = require_jsx_runtime();
12
+ function InsightsErrorAlert({ error, fallbackTitle }) {
13
+ if (isConsoleFeatureUnavailableError(error)) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, { children: [
14
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, { "aria-hidden": "true" }),
15
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Insights not installed" }),
16
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: error.message })
17
+ ] });
18
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
19
+ variant: "destructive",
20
+ children: [
21
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, { "aria-hidden": "true" }),
22
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: fallbackTitle }),
23
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "Refresh to try again. If this keeps happening, check your Insights provider connection." })
24
+ ]
25
+ });
26
+ }
27
+ /** A segmented control over fixed periods, each shown by its short value. */
28
+ function PeriodSelector({ label, onPeriodChange, period, periods }) {
29
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tabs$1, {
30
+ value: period,
31
+ onValueChange: (value) => {
32
+ const next = periods.find((item) => item.value === value);
33
+ if (next) onPeriodChange(next.value);
34
+ },
35
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsList, {
36
+ "aria-label": label,
37
+ className: "min-h-11 sm:min-h-9",
38
+ children: periods.map(({ value, name }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsTrigger, {
39
+ value,
40
+ "aria-label": name,
41
+ className: "min-w-12 px-3",
42
+ children: value
43
+ }, value))
44
+ })
45
+ });
46
+ }
47
+ var reportingPeriods = [
48
+ "24h",
49
+ "7d",
50
+ "30d"
51
+ ].map((value) => ({
52
+ value,
53
+ name: usageMetrics[value].period
54
+ }));
55
+ var usagePeriods = Object.keys(usageMetrics).map((value) => ({
56
+ value,
57
+ name: usageMetrics[value].period
58
+ }));
59
+ function InsightsPeriodSelector({ window, onWindowChange }) {
60
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PeriodSelector, {
61
+ label: "Reporting period",
62
+ onPeriodChange: onWindowChange,
63
+ period: window,
64
+ periods: reportingPeriods
65
+ });
66
+ }
67
+ /** App usage's periods: the reporting periods, and 12 months where daily totals cover it. */
68
+ function UsagePeriodSelector({ window, onWindowChange, twelveMonths = true }) {
69
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PeriodSelector, {
70
+ label: "Reporting period",
71
+ onPeriodChange: onWindowChange,
72
+ period: window,
73
+ periods: usagePeriods.filter(({ value }) => twelveMonths || value !== "12m")
74
+ });
75
+ }
76
+ /**
77
+ * A built-in bundle's ID: every native build makes it from its build time with
78
+ * the random bits zeroed (the CLI's `generateMinBundleId`, and the iOS and
79
+ * Android fallbacks), or the nil UUID when iOS can't read its build time. A
80
+ * deployed bundle's ID is a random UUIDv7, so it never has this shape.
81
+ */
82
+ var BUILTIN_BUNDLE_ID = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-7000-8000-000000000000|00000000-0000-0000-0000-000000000000)$/iu;
83
+ /**
84
+ * Whether a reported bundle is one a native build shipped: the report's
85
+ * `minBundleId`, or, from an SDK that reports none, an ID in the built-in
86
+ * shape.
87
+ */
88
+ var isBuiltinBundle = (bundleId, minBundleId) => bundleId !== null && bundleId !== void 0 && (bundleId === minBundleId || BUILTIN_BUNDLE_ID.test(bundleId));
89
+ /** Marks a bundle ID as the bundle its native build shipped. */
90
+ function BuiltinBundleBadge() {
91
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, {
92
+ className: "shrink-0 font-sans font-normal",
93
+ title: "The bundle the native build shipped",
94
+ variant: "secondary",
95
+ children: "Built-in bundle"
96
+ });
97
+ }
98
+ function InsightsPageHeader({ view, overviewSearch }) {
99
+ const overview = useConsoleFeature("insightsAnalytics");
100
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
101
+ className: "sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-3 border-b bg-background px-3 py-3 sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm",
102
+ children: [
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarTrigger, { className: "-ml-1 size-11 lg:size-7" }),
104
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
105
+ className: "flex items-center gap-1.5",
106
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartNoAxesCombined, {
107
+ "aria-hidden": "true",
108
+ className: "size-3.5 text-muted-foreground"
109
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
110
+ className: "text-sm font-medium",
111
+ children: "Insights"
112
+ })]
113
+ }),
114
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("nav", {
115
+ "aria-label": "Insights views",
116
+ className: "ml-auto flex gap-2",
117
+ children: [overview ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
118
+ "aria-current": view === "overview" ? "page" : void 0,
119
+ className: cn(buttonVariants({
120
+ className: "h-11 px-3 lg:h-8 lg:px-2.5",
121
+ size: "lg",
122
+ variant: view === "overview" ? "secondary" : "ghost"
123
+ })),
124
+ search: overviewSearch,
125
+ to: "/insights",
126
+ children: "Overview"
127
+ }) : null, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
128
+ "aria-current": view === "events" ? "page" : void 0,
129
+ className: cn(buttonVariants({
130
+ className: "h-11 px-3 lg:h-8 lg:px-2.5",
131
+ size: "lg",
132
+ variant: view === "events" ? "secondary" : "ghost"
133
+ })),
134
+ to: "/installations",
135
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(List, {
136
+ "aria-hidden": "true",
137
+ "data-icon": "inline-start"
138
+ }), "All events"]
139
+ })]
140
+ })
141
+ ]
142
+ });
143
+ }
144
+ //#endregion
145
+ export { PeriodSelector as a, InsightsPeriodSelector as i, InsightsErrorAlert as n, UsagePeriodSelector as o, InsightsPageHeader as r, isBuiltinBundle as s, BuiltinBundleBadge as t };