@hot-updater/console 1.2.0-rc.27 → 1.2.0-rc.28

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 (286) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{-native-builds-search-OlRj4Jz0.js → -native-builds-search-7blX2yQW.js} +1 -1
  3. package/.output/public/assets/BundleIdDisplay-B0gAH01c.js +1 -0
  4. package/.output/public/assets/CompositeItem-Dy4xgOMg.js +1 -0
  5. package/.output/public/assets/{ConsoleFeatureUnavailable-DUqlpHCp.js → ConsoleFeatureUnavailable-cy_snb33.js} +1 -1
  6. package/.output/public/assets/{EventDetails-DZsRlDHk.js → EventDetails-sxag8Hfc.js} +1 -1
  7. package/.output/public/assets/{HashValueDisplay-MoZMmTeP.js → HashValueDisplay-DMweha_0.js} +1 -1
  8. package/.output/public/assets/{InsightsPageHeader-2bTrjXln.js → InsightsPageHeader-D5TJspVe.js} +1 -1
  9. package/.output/public/assets/IosInstall-B5NspihF.js +1 -0
  10. package/.output/public/assets/NativeBuildsNav-CjOOlbEu.js +1 -0
  11. package/.output/public/assets/{NotFoundPage-Ckb5GMhh.js → NotFoundPage-DDOJarFa.js} +1 -1
  12. package/.output/public/assets/{PlatformIcon-CJ69KopR.js → PlatformIcon-BBvlg6JY.js} +1 -1
  13. package/.output/public/assets/RelativeTime-CY1dKZpv.js +1 -0
  14. package/.output/public/assets/{RolloutPercentageBadge-G6qt8rVb.js → RolloutPercentageBadge-BHgHkBGB.js} +1 -1
  15. package/.output/public/assets/RowReason-BMx_vclu.js +1 -0
  16. package/.output/public/assets/SandboxBadge-irEkMf1P.js +1 -0
  17. package/.output/public/assets/TargetDisplay-DB8D019f.js +1 -0
  18. package/.output/public/assets/{alert-dialog-DiRLrFVe.js → alert-dialog-CLC_h1fL.js} +1 -1
  19. package/.output/public/assets/api-DLryz9hA.js +1 -0
  20. package/.output/public/assets/api-keys-Cd-aNt-v.js +1 -0
  21. package/.output/public/assets/api-keys-D3tAc4Uu.js +1 -0
  22. package/.output/public/assets/arrow-left-DQjHJAnT.js +1 -0
  23. package/.output/public/assets/arrow-right-CXp_K3xK.js +1 -0
  24. package/.output/public/assets/arrow-up-right-BFafIOrq.js +1 -0
  25. package/.output/public/assets/{badge-D0NFvUY5.js → badge-DJMW4YVM.js} +1 -1
  26. package/.output/public/assets/card-C4sBAMU-.js +1 -0
  27. package/.output/public/assets/check-CqWNyG93.js +1 -0
  28. package/.output/public/assets/chevron-right-DNbYTBX1.js +1 -0
  29. package/.output/public/assets/{circle-off-C7Muo0ss.js → circle-off-BCkZpskJ.js} +1 -1
  30. package/.output/public/assets/{clipboard-DQbOcrL7.js → clipboard-DZrZK5gR.js} +1 -1
  31. package/.output/public/assets/{console-features-api-DEXSwFtc.js → console-features-api-BO5V64P3.js} +1 -1
  32. package/.output/public/assets/{copy-DsuLj3oj.js → copy-CH1__JAW.js} +1 -1
  33. package/.output/public/assets/dialog-tCTZmAo8.js +1 -0
  34. package/.output/public/assets/{dist-Bf1BPKMs.js → dist-Bw_uSBJn.js} +1 -1
  35. package/.output/public/assets/empty-DsbLxQ1w.js +1 -0
  36. package/.output/public/assets/field-DL4OXTJ7.js +1 -0
  37. package/.output/public/assets/git-branch-ByZMEBxZ.js +1 -0
  38. package/.output/public/assets/history-wYnPoVmT.js +1 -0
  39. package/.output/public/assets/index-CAnjb7M2.js +10 -0
  40. package/.output/public/assets/{input-group-D_NfhUbX.js → input-group-B7jx0icS.js} +1 -1
  41. package/.output/public/assets/insights-DIs4nJI9.js +2 -0
  42. package/.output/public/assets/insights-DTF7C4jb.js +42 -0
  43. package/.output/public/assets/insights-api-B6Gj74n5.js +1 -0
  44. package/.output/public/assets/insights-bUk3ChoU.js +1 -0
  45. package/.output/public/assets/{insights-search-CYPrQVUC.js → insights-search-TfRz5kGG.js} +1 -1
  46. package/.output/public/assets/insights-usage-rpc-B4V-Qqo4.js +1 -0
  47. package/.output/public/assets/insights_.distribution-BPl5oRt4.js +2 -0
  48. package/.output/public/assets/{insights_.distribution-_dZi1_ay.js → insights_.distribution-BqfzAuAf.js} +1 -1
  49. package/.output/public/assets/insights_.distribution-BqtmnGTt.js +1 -0
  50. package/.output/public/assets/installations-6U8c_03X.js +1 -0
  51. package/.output/public/assets/{installations-Y_7QW_p8.js → installations-BU65zztK.js} +1 -1
  52. package/.output/public/assets/installations-D3MbzcFb.js +2 -0
  53. package/.output/public/assets/{key-round-DzBe6DHr.js → key-round-B-P_hhUB.js} +1 -1
  54. package/.output/public/assets/{link-DTEyW70e.js → link-CN3iHC4A.js} +2 -2
  55. package/.output/public/assets/{list-B6GeoQ_b.js → list-fFsS8Wxe.js} +1 -1
  56. package/.output/public/assets/loader-circle-GWIgH0fo.js +1 -0
  57. package/.output/public/assets/native-builds-BdzfAFnF.js +1 -0
  58. package/.output/public/assets/native-builds-CWwvuOXr.js +2 -0
  59. package/.output/public/assets/native-builds-Eh72Vr2G.js +1 -0
  60. package/.output/public/assets/native-builds_._buildId-33ksAlnZ.js +1 -0
  61. package/.output/public/assets/native-builds_._buildId-BVA5GnZP.js +2 -0
  62. package/.output/public/assets/native-builds_.devices-CElovmwq.js +1 -0
  63. package/.output/public/assets/native-builds_.devices-DWtcOVYO.js +2 -0
  64. package/.output/public/assets/{package-ytYrywZH.js → package-CXSDZsME.js} +1 -1
  65. package/.output/public/assets/plus-Cx-yFNd9.js +1 -0
  66. package/.output/public/assets/preload-helper-CRQjUQaZ.js +1 -0
  67. package/.output/public/assets/{refresh-cw-C-tvoCcE.js → refresh-cw-BgiOaFX3.js} +1 -1
  68. package/.output/public/assets/{relativeTime-DvyxGIsm.js → relativeTime-CBmDq8wh.js} +1 -1
  69. package/.output/public/assets/remote-config-B3oq9qR0.js +1 -0
  70. package/.output/public/assets/remote-config-CGbqsPh_.js +6 -0
  71. package/.output/public/assets/remote-config-D1OkfQKt.js +1 -0
  72. package/.output/public/assets/{rotate-cw-Clk5xTeE.js → rotate-cw-C1v7YuN7.js} +1 -1
  73. package/.output/public/assets/{routes-gQXSzO_n.js → routes-BTG3rg0l.js} +2 -2
  74. package/.output/public/assets/routes-CVbPjRKo.js +1 -0
  75. package/.output/public/assets/search-DiOSjaYL.js +1 -0
  76. package/.output/public/assets/select-CA8r-UUe.js +1 -0
  77. package/.output/public/assets/send-BgXZNiEA.js +1 -0
  78. package/.output/public/assets/{sidebar-Di9SN47G.js → sidebar-yC7KdImc.js} +1 -1
  79. package/.output/public/assets/smartphone-CxP0GGT6.js +1 -0
  80. package/.output/public/assets/styles-B0kzy3kp.css +2 -0
  81. package/.output/public/assets/switch-BTHWmKQ5.js +1 -0
  82. package/.output/public/assets/table-CwF7yxj4.js +1 -0
  83. package/.output/public/assets/tabs-CHNnCyvw.js +1 -0
  84. package/.output/public/assets/trash-2-CYISg7ZF.js +1 -0
  85. package/.output/public/assets/{undo-2-Bt0YXG26.js → undo-2-Bod3vw7x.js} +1 -1
  86. package/.output/public/assets/{useCompositeListItem-JmyDfo3-.js → useCompositeListItem-lAmUsXcc.js} +1 -1
  87. package/.output/public/assets/{useMutation-DbYw7boA.js → useMutation-w3qYaU2L.js} +1 -1
  88. package/.output/server/{__23tanstack-start-server-fn-resolver-CIN7Hpjl.mjs → __23tanstack-start-server-fn-resolver-BFiPs5uv.mjs} +85 -49
  89. package/.output/server/_libs/@base-ui/react+[...].mjs +1488 -183
  90. package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
  91. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +2 -2
  92. package/.output/server/_libs/_.mjs +1 -1
  93. package/.output/server/_libs/lucide-react.mjs +22 -2
  94. package/.output/server/_libs/next-themes.mjs +1 -1
  95. package/.output/server/_libs/react-redux+[...].mjs +1 -1
  96. package/.output/server/_libs/recharts+[...].mjs +1 -1
  97. package/.output/server/_libs/sonner.mjs +1 -1
  98. package/.output/server/_libs/tanstack__react-query.mjs +1 -1
  99. package/.output/server/_ssr/{-native-builds-search-M6t7EIt4.mjs → -native-builds-search-Mm_AZoRU.mjs} +8 -2
  100. package/.output/server/_ssr/{BundleIdDisplay-BaFPllhZ.mjs → BundleIdDisplay-BSBR5eJ3.mjs} +3 -3
  101. package/.output/server/_ssr/{ConsoleFeatureUnavailable-C-1Ls1sm.mjs → ConsoleFeatureUnavailable-DcZ4JBVq.mjs} +8 -8
  102. package/.output/server/_ssr/CopyableText-DgNEsByt.mjs +33 -0
  103. package/.output/server/_ssr/{EventDetails-jVM6sD8m.mjs → EventDetails-CUHZuwei.mjs} +9 -9
  104. package/.output/server/_ssr/{HashValueDisplay-C7nja_fn.mjs → HashValueDisplay-B9ORaCcP.mjs} +3 -3
  105. package/.output/server/_ssr/{InsightsPageHeader-CDJhClRy.mjs → InsightsPageHeader-C0bJqC-n.mjs} +9 -9
  106. package/.output/server/_ssr/IosInstall-C5Y5gnDY.mjs +574 -0
  107. package/.output/server/_ssr/NativeBuildsNav-hFiyBaFW.mjs +38 -0
  108. package/.output/server/_ssr/{NotFoundPage-DclXpGzY.mjs → NotFoundPage-D4xRjmIA.mjs} +3 -3
  109. package/.output/server/_ssr/{PlatformIcon-CMLs3Wez.mjs → PlatformIcon-BpGOEXjU.mjs} +2 -2
  110. package/.output/server/_ssr/{RelativeTime-DUr_cgha.mjs → RelativeTime-DnvxB666.mjs} +20 -9
  111. package/.output/server/_ssr/{RolloutPercentageBadge-Mg4g25Gf.mjs → RolloutPercentageBadge-NBnIOzY9.mjs} +4 -4
  112. package/.output/server/_ssr/RowReason-B_jZN48d.mjs +169 -0
  113. package/.output/server/_ssr/{StoreSubmission-CUIg6WXQ.mjs → SandboxBadge-CFtTG1ZJ.mjs} +17 -17
  114. package/.output/server/_ssr/{TargetDisplay-C-C8MKuf.mjs → TargetDisplay-0sb03v_6.mjs} +7 -33
  115. package/.output/server/_ssr/{alert-dialog-CiN6BFHg.mjs → alert-dialog-SLr1Q_AI.mjs} +2 -2
  116. package/.output/server/_ssr/{api-BeWenjNl.mjs → api-CkgOQzSb.mjs} +74 -17
  117. package/.output/server/_ssr/{api-keys-DzWwXpi5.mjs → api-keys-BP7NJtoX.mjs} +2 -2
  118. package/.output/server/_ssr/{api-keys-Bzaj1vWD.mjs → api-keys-BcSzq0TA.mjs} +11 -11
  119. package/.output/server/_ssr/{api-keys-rpc-BRnZWUpw.mjs → api-keys-rpc-IWPOq5vn.mjs} +3 -3
  120. package/.output/server/_ssr/{api-rpc-B87QoJwB.mjs → api-rpc-cNJTB3v4.mjs} +48 -32
  121. package/.output/server/_ssr/{auth-rpc-CO1_TL1b.mjs → auth-rpc-oaBbtxSP.mjs} +4 -4
  122. package/.output/server/_ssr/{auth.server-BWTHsAlW.mjs → auth.server-WQw9JjMm.mjs} +587 -19
  123. package/.output/server/_ssr/{badge-C7PdVtoH.mjs → badge-n3c0OTBQ.mjs} +2 -2
  124. package/.output/server/_ssr/{bundleActivity-BGVvqWx7.mjs → bundleActivity-BP40zYSt.mjs} +1 -1
  125. package/.output/server/_ssr/{card-BkxhOkGp.mjs → card-CYgCcRUd.mjs} +2 -2
  126. package/.output/server/_ssr/{config.server-Bvqyj9Ec.mjs → config.server-R3KQbcML.mjs} +4 -4
  127. package/.output/server/_ssr/{console-access-CHD7-b3E.mjs → console-access-BLVi82IN.mjs} +2 -2
  128. package/.output/server/_ssr/{console-features-api-Btkz_ZEj.mjs → console-features-api-B2JvJOlE.mjs} +5 -5
  129. package/.output/server/_ssr/{console-features-rpc-DYf3xbak.mjs → console-features-rpc-LAxQoSNw.mjs} +3 -3
  130. package/.output/server/_ssr/{console-features-CRP-pfov.mjs → console-features-xaGDhRC9.mjs} +1 -1
  131. package/.output/server/_ssr/deviceProfileToken-CwWb1lPq.mjs +82 -0
  132. package/.output/server/_ssr/{dialog-fnm03nlH.mjs → dialog-eru_h5oK.mjs} +2 -2
  133. package/.output/server/_ssr/{downloadBundle-BX8ODCZT.mjs → downloadBundle-DnoYpi36.mjs} +1 -1
  134. package/.output/server/_ssr/{empty-BzjaWjuQ.mjs → empty-Bu4qodCx.mjs} +3 -3
  135. package/.output/server/_ssr/{failureReports-C_CmBF4x.mjs → failureReports-BA2eg11O.mjs} +3 -3
  136. package/.output/server/_ssr/{field-C2GZCygB.mjs → field-DA5lwO5U.mjs} +3 -3
  137. package/.output/server/_ssr/foldedPage-CqpVk31Q.mjs +176 -0
  138. package/.output/server/_ssr/{getBundleChildren-BJTufthT.mjs → getBundleChildren-CdqFonhl.mjs} +1 -1
  139. package/.output/server/_ssr/{input-group-Cu6TtdYb.mjs → input-group-VV5E3q78.mjs} +2 -2
  140. package/.output/server/_ssr/{insights-DZZsKfdZ.mjs → insights-BJIt1xuT.mjs} +2 -2
  141. package/.output/server/_ssr/{insights-D_XXiwXz.mjs → insights-C23mopzv.mjs} +5 -5
  142. package/.output/server/_ssr/{insights-DuQB3_VX.mjs → insights-Ci82qdkq.mjs} +28 -28
  143. package/.output/server/_ssr/{insights-api-a8B90BHl.mjs → insights-api-BwXMKUSe.mjs} +5 -5
  144. package/.output/server/_ssr/{insights-errors-Bz3sWNZm.mjs → insights-errors-CXHg1lLV.mjs} +2 -2
  145. package/.output/server/_ssr/{insights-failures-DNQ9qVVf.mjs → insights-failures-7zH97WOO.mjs} +2 -2
  146. package/.output/server/_ssr/{insights-failures-rpc-DM5dPfnS.mjs → insights-failures-rpc-BuZ-jnby.mjs} +10 -10
  147. package/.output/server/_ssr/{insights-recovery-DOkpqnQ8.mjs → insights-recovery-BhOg6kz2.mjs} +1 -1
  148. package/.output/server/_ssr/{insights-recovery-rpc-C81f-2Xa.mjs → insights-recovery-rpc-DrXSy9aA.mjs} +6 -6
  149. package/.output/server/_ssr/{insights-rpc-DVbg0dsI.mjs → insights-rpc-DyrIZg3a.mjs} +3 -3
  150. package/.output/server/_ssr/{insights-search-sCdCd-8P.mjs → insights-search-CNkNB-aa.mjs} +3 -3
  151. package/.output/server/_ssr/{insights-usage-4KDIN3Kg.mjs → insights-usage-h8fipPTv.mjs} +1 -1
  152. package/.output/server/_ssr/{insights-usage-rpc-CKfXb-tc.mjs → insights-usage-rpc-C7UC1lom.mjs} +6 -6
  153. package/.output/server/_ssr/{insights-usage-rpc-DAwc4FE6.mjs → insights-usage-rpc-cTgmD-Ej.mjs} +5 -5
  154. package/.output/server/_ssr/{insightsUsage-DmQdJZqT.mjs → insightsUsage-BjSiV_X_.mjs} +3 -3
  155. package/.output/server/_ssr/{insights_.distribution-Bq52kUtA.mjs → insights_.distribution-BauOpBTE.mjs} +2 -2
  156. package/.output/server/_ssr/{insights_.distribution-FhZMnsNm.mjs → insights_.distribution-CIY_IGmh.mjs} +17 -17
  157. package/.output/server/_ssr/{insights_.distribution-CvPrNh8j.mjs → insights_.distribution-wfFKEv-Z.mjs} +5 -5
  158. package/.output/server/_ssr/{installations-B2anrEwv.mjs → installations-Ba3YVrAf.mjs} +13 -13
  159. package/.output/server/_ssr/{installations-BjOaol_w.mjs → installations-VzacOKHp.mjs} +2 -2
  160. package/.output/server/_ssr/{installations-CKe2Srtx.mjs → installations-jGW7nvEV.mjs} +4 -4
  161. package/.output/server/_ssr/ios-devices-rpc-Bhn7VVIh.mjs +138 -0
  162. package/.output/server/_ssr/iosDeviceProfile-_XT8TpgZ.mjs +176 -0
  163. package/.output/server/_ssr/iosDevices-Bc27J72d.mjs +129 -0
  164. package/.output/server/_ssr/listReleases-DYYA5alS.mjs +94 -0
  165. package/.output/server/_ssr/{native-builds-OUdRtp6m.mjs → native-builds-BXBkklfA.mjs} +28 -6
  166. package/.output/server/_ssr/{native-builds-DSOAh1CX.mjs → native-builds-DZFJGcHy.mjs} +3 -3
  167. package/.output/server/_ssr/{native-builds-BsfydODe.mjs → native-builds-DiNkKHly.mjs} +221 -86
  168. package/.output/server/_ssr/{native-builds_._buildId-BOedzqOS.mjs → native-builds_._buildId-CuM1PsT6.mjs} +109 -295
  169. package/.output/server/_ssr/{native-builds_._buildId-DSfes24H.mjs → native-builds_._buildId-D0n4QZY6.mjs} +3 -3
  170. package/.output/server/_ssr/native-builds_.devices-D0JJlX8E.mjs +689 -0
  171. package/.output/server/_ssr/native-builds_.devices-DiM2FdcW.mjs +10 -0
  172. package/.output/server/_ssr/{nativeBuildDownloadLink-D-yCU-H7.mjs → nativeBuildDownloadLink-CvvWuhh0.mjs} +3 -3
  173. package/.output/server/_ssr/{nativeBuildInstall-szlEt-t_.mjs → nativeBuildInstall-BqcVHBaD.mjs} +54 -7
  174. package/.output/server/_ssr/{nativeBuilds-CRLmvFaO.mjs → nativeBuilds-Cub0EUGN.mjs} +135 -13
  175. package/.output/server/_ssr/{publicConsoleBase-DvHYxDaG.mjs → publicConsoleBase-f67NLLXZ.mjs} +11 -3
  176. package/.output/server/_ssr/{release-adoption-C7sUFDwa.mjs → release-adoption-DeICczY7.mjs} +2 -2
  177. package/.output/server/_ssr/{release-adoption-rpc-DHqnRw73.mjs → release-adoption-rpc-Dm-5yAJG.mjs} +8 -8
  178. package/.output/server/_ssr/{releaseAdoption-D6ScSu-W.mjs → releaseAdoption-kHZo8P90.mjs} +3 -3
  179. package/.output/server/_ssr/{remote-config-D2wHSNjm.mjs → remote-config-D1BhIBKu.mjs} +3 -3
  180. package/.output/server/_ssr/{remote-config-Byc4JHkB.mjs → remote-config-D7RruPiO.mjs} +2 -2
  181. package/.output/server/_ssr/{remote-config-DkrjdfMC.mjs → remote-config-ZFm-l4Gi.mjs} +21 -21
  182. package/.output/server/_ssr/{remote-config-rpc-ZOfBMLtE.mjs → remote-config-rpc-C7AZy37o.mjs} +3 -3
  183. package/.output/server/_ssr/{router-D0GDdWkI.mjs → router-BGkGFMsT.mjs} +73 -76
  184. package/.output/server/_ssr/{routes-C10oCddR.mjs → routes-CJJxz-Ak.mjs} +305 -231
  185. package/.output/server/_ssr/{routes-ChnyY2qP.mjs → routes-CiJ2dhL9.mjs} +15 -14
  186. package/.output/server/_ssr/{runtime.server-wcHT2Cop.mjs → runtime.server-CkSbWaZm.mjs} +2 -2
  187. package/.output/server/_ssr/{schema-migration-rpc-BKRs4MNf.mjs → schema-migration-rpc-D4YlwvGH.mjs} +3 -3
  188. package/.output/server/_ssr/{select-B9du7Z50.mjs → select-BB8GE7OZ.mjs} +3 -3
  189. package/.output/server/_ssr/{server-CApi3lVS.mjs → server-DAHTchcr.mjs} +5 -5
  190. package/.output/server/_ssr/{sidebar-BwMkm72O.mjs → sidebar-CsKVgZHa.mjs} +3 -3
  191. package/.output/server/_ssr/ssr.mjs +1 -1
  192. package/.output/server/_ssr/{start-By4wHYjG.mjs → start-D3noqqOK.mjs} +1 -1
  193. package/.output/server/_ssr/{switch-DyShvUOF.mjs → switch-BvvmP7Y3.mjs} +3 -3
  194. package/.output/server/_ssr/{table-DMj6AnqH.mjs → table-WKKzprFn.mjs} +2 -2
  195. package/.output/server/_ssr/{tabs-5a_JPYme.mjs → tabs-BJ-4SgmC.mjs} +4 -4
  196. package/.output/server/_ssr/{updateFailures-DNiv3S_y.mjs → updateFailures-D0bP_Ume.mjs} +3 -3
  197. package/.output/server/_tanstack-start-manifest_v-CSUJeG5D.mjs +219 -0
  198. package/.output/server/index.mjs +431 -361
  199. package/lib/index.d.mts +9 -0
  200. package/package.json +7 -7
  201. package/src/components/DataTable.tsx +21 -2
  202. package/src/components/FoldedRows.tsx +201 -0
  203. package/src/components/RowReason.tsx +56 -0
  204. package/src/components/features/native-builds/InstallCard.tsx +1 -1
  205. package/src/components/features/native-builds/IosDevicesPage.tsx +892 -0
  206. package/src/components/features/native-builds/IosInstall.tsx +292 -62
  207. package/src/components/features/native-builds/IpaDevicesCard.tsx +107 -0
  208. package/src/components/features/native-builds/NativeBuildDetailPage.tsx +7 -0
  209. package/src/components/features/native-builds/NativeBuildsNav.tsx +44 -0
  210. package/src/components/features/native-builds/NativeBuildsPage.tsx +2 -0
  211. package/src/components/features/native-builds/NativeBuildsTable.tsx +214 -30
  212. package/src/components/features/native-builds/OlderBuildLabel.tsx +61 -0
  213. package/src/index.ts +9 -0
  214. package/src/lib/api-rpc.ts +56 -29
  215. package/src/lib/api.ts +65 -2
  216. package/src/lib/ios-devices-api.ts +110 -0
  217. package/src/lib/ios-devices-rpc.ts +174 -0
  218. package/src/lib/native-builds.ts +72 -7
  219. package/src/lib/server/console-runtime.server.ts +9 -2
  220. package/src/lib/server/deviceProfileToken.ts +187 -0
  221. package/src/lib/server/foldedPage.ts +360 -0
  222. package/src/lib/server/iosDeviceProfile.ts +230 -0
  223. package/src/lib/server/iosDevices.ts +223 -0
  224. package/src/lib/server/listReleases.ts +101 -62
  225. package/src/lib/server/nativeBuildInstall.ts +138 -7
  226. package/src/lib/server/nativeBuilds.ts +221 -26
  227. package/src/routeTree.gen.ts +64 -67
  228. package/src/routes/-native-builds-search.ts +20 -0
  229. package/src/routes/[_]hot-updater/devices/device-response.ts +21 -0
  230. package/src/routes/[_]hot-updater/devices/device[.]mobileconfig.ts +17 -0
  231. package/src/routes/index.tsx +444 -299
  232. package/src/routes/native-builds_.devices.tsx +21 -0
  233. package/.output/public/assets/BundleIdDisplay-CP6rsdFO.js +0 -1
  234. package/.output/public/assets/RelativeTime-TCmpOVPg.js +0 -1
  235. package/.output/public/assets/StoreSubmission-CqSg880n.js +0 -1
  236. package/.output/public/assets/TargetDisplay-DwOaMOiI.js +0 -1
  237. package/.output/public/assets/api-LQJH44FU.js +0 -1
  238. package/.output/public/assets/api-keys-4w2-ofii.js +0 -1
  239. package/.output/public/assets/api-keys-uFY8FsN9.js +0 -1
  240. package/.output/public/assets/arrow-left-g9cKqXuC.js +0 -1
  241. package/.output/public/assets/arrow-right-CNII8TYn.js +0 -1
  242. package/.output/public/assets/arrow-up-right-DK8Zdg40.js +0 -1
  243. package/.output/public/assets/card-ulgg5xHn.js +0 -1
  244. package/.output/public/assets/check-CXVR3s3X.js +0 -1
  245. package/.output/public/assets/chevron-right-BoUXo82O.js +0 -1
  246. package/.output/public/assets/dialog-CLIaC82_.js +0 -1
  247. package/.output/public/assets/empty-Bhlj8PEo.js +0 -1
  248. package/.output/public/assets/field-q4sTYzNU.js +0 -1
  249. package/.output/public/assets/history-DakJoeSM.js +0 -1
  250. package/.output/public/assets/index-CJclLsbG.js +0 -10
  251. package/.output/public/assets/insights-0TUItqwh.js +0 -1
  252. package/.output/public/assets/insights-B75txQ_F.js +0 -42
  253. package/.output/public/assets/insights-C17Z0whn.js +0 -2
  254. package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
  255. package/.output/public/assets/insights-usage-rpc-BbFllvi_.js +0 -1
  256. package/.output/public/assets/insights_.distribution-AZcfvK7x.js +0 -1
  257. package/.output/public/assets/insights_.distribution-gDqNqI5E.js +0 -2
  258. package/.output/public/assets/installations-Ap2G2tDs.js +0 -1
  259. package/.output/public/assets/installations-D0g3xvw8.js +0 -2
  260. package/.output/public/assets/native-builds-Ba6cEZfm.js +0 -2
  261. package/.output/public/assets/native-builds-C3_-21we.js +0 -1
  262. package/.output/public/assets/native-builds_._buildId-BnP31v32.js +0 -1
  263. package/.output/public/assets/native-builds_._buildId-Cp9LJiMP.js +0 -2
  264. package/.output/public/assets/plus-BVhOauU3.js +0 -1
  265. package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
  266. package/.output/public/assets/remote-config-BRdy8QFR.js +0 -1
  267. package/.output/public/assets/remote-config-C9p5Pcdj.js +0 -6
  268. package/.output/public/assets/remote-config-CIAEArwq.js +0 -1
  269. package/.output/public/assets/routes-BLTF7nwe.js +0 -1
  270. package/.output/public/assets/search-nnvSOTEB.js +0 -1
  271. package/.output/public/assets/select-CBIU0_M1.js +0 -1
  272. package/.output/public/assets/smartphone-r0rRdPas.js +0 -1
  273. package/.output/public/assets/styles-BdlrKlVs.css +0 -2
  274. package/.output/public/assets/switch-CP6GsHmN.js +0 -1
  275. package/.output/public/assets/table-TUtVz-2l.js +0 -1
  276. package/.output/public/assets/tabs-CP3CSmtI.js +0 -1
  277. package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
  278. package/.output/server/_ssr/listReleases-CQEceg8j.mjs +0 -79
  279. package/.output/server/_ssr/nativeBuildDevice-DJUAzAIj.mjs +0 -210
  280. package/.output/server/_tanstack-start-manifest_v-8M7ggCuB.mjs +0 -192
  281. package/src/lib/server/nativeBuildDevice.ts +0 -253
  282. package/src/routes/[_]hot-updater/native-builds/$buildId/device-response.ts +0 -17
  283. package/src/routes/[_]hot-updater/native-builds/$buildId/device.ts +0 -17
  284. package/src/routes/[_]hot-updater/native-builds/$buildId/device[.]mobileconfig.ts +0 -17
  285. /package/.output/public/assets/{uuidv7-cI6C63Fm.js → uuidv7-CVJ09bBG.js} +0 -0
  286. /package/.output/public/assets/{valueToPercent-B6X9rUJM.js → valueToPercent-Db73Kirz.js} +0 -0
package/src/lib/api.ts CHANGED
@@ -2,7 +2,12 @@ import type {
2
2
  ReleaseFilter,
3
3
  ReleasePolicyPatch,
4
4
  } from "@hot-updater/plugin-core";
5
- import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
5
+ import {
6
+ useInfiniteQuery,
7
+ useMutation,
8
+ useQuery,
9
+ useQueryClient,
10
+ } from "@tanstack/react-query";
6
11
 
7
12
  import {
8
13
  createChannel as createChannelApi,
@@ -14,6 +19,7 @@ import {
14
19
  getChannels,
15
20
  getConfig,
16
21
  getNativeBuildDetail,
22
+ getNativeBuildFold,
17
23
  markNativeBuild as markNativeBuildApi,
18
24
  createNativeBuildDownloadLink,
19
25
  getNativeBuildDownloadUrl,
@@ -23,6 +29,7 @@ import {
23
29
  getRelease,
24
30
  getReleaseCatalogDiagnostics,
25
31
  getReleaseNativeBuild,
32
+ getReleaseFold,
26
33
  getReleases,
27
34
  preflightRelease as preflightReleaseApi,
28
35
  promoteRelease as promoteReleaseApi,
@@ -38,6 +45,8 @@ export const queryKeys = {
38
45
  all: releaseListQueryKey,
39
46
  list: (filters?: ReleaseFilters) =>
40
47
  [...releaseListQueryKey, filters ?? {}] as const,
48
+ fold: (filter: ReleaseFilter | undefined, fold: FoldBounds) =>
49
+ [...releaseListQueryKey, "fold", filter ?? {}, fold] as const,
41
50
  },
42
51
  release: (releaseId: string) => ["release", releaseId] as const,
43
52
  releaseCatalog: (scopeKey: string) => ["release-catalog", scopeKey] as const,
@@ -51,6 +60,8 @@ export const queryKeys = {
51
60
  nativeBuilds: {
52
61
  all: ["native-builds"] as const,
53
62
  list: (page: NativeBuildPage) => ["native-builds", page] as const,
63
+ fold: (channel: string | undefined, fold: FoldBounds) =>
64
+ ["native-builds", "fold", channel ?? null, fold] as const,
54
65
  },
55
66
  nativeBuild: (id: string) => ["native-build", id] as const,
56
67
  nativeBuildPatches: (minBundleId: string, page: KeysetPage) =>
@@ -104,6 +115,9 @@ const DOWNLOAD_LINK_STALE_MS = 24 * 60 * 60 * 1000;
104
115
  */
105
116
  const INSTALL_ELIGIBILITY_STALE_MS = 30 * 60 * 1000;
106
117
 
118
+ /** Where a fold of a list's page lies: its bounds, as the page gave them. */
119
+ export type FoldBounds = { readonly from?: string; readonly to: string };
120
+
107
121
  export type ReleaseFilters = {
108
122
  /** One of the filter sets the release indexes serve; none lists every release. */
109
123
  filter?: ReleaseFilter;
@@ -111,7 +125,8 @@ export type ReleaseFilters = {
111
125
  beforeReleaseId?: string;
112
126
  /** Releases newer than this id: the previous page. */
113
127
  afterReleaseId?: string;
114
- limit?: number;
128
+ /** The selected release, which the page never folds. */
129
+ releaseId?: string;
115
130
  };
116
131
 
117
132
  // Query Hooks
@@ -139,6 +154,31 @@ export function useReleasesQuery(filters?: ReleaseFilters) {
139
154
  });
140
155
  }
141
156
 
157
+ /**
158
+ * A fold's releases, a chunk at a time, read once it opens: the page that
159
+ * folded them reads nothing more when one opens.
160
+ */
161
+ export function useReleaseFoldQuery(
162
+ filter: ReleaseFilter | undefined,
163
+ fold: FoldBounds,
164
+ enabled: boolean,
165
+ ) {
166
+ return useInfiniteQuery({
167
+ queryKey: queryKeys.releases.fold(filter, fold),
168
+ queryFn: ({ pageParam }) =>
169
+ getReleaseFold({
170
+ data: {
171
+ ...fold,
172
+ ...(filter === undefined ? {} : { filter }),
173
+ ...(pageParam === undefined ? {} : { after: pageParam }),
174
+ },
175
+ }),
176
+ initialPageParam: undefined as string | undefined,
177
+ getNextPageParam: (last) => last.next,
178
+ enabled,
179
+ });
180
+ }
181
+
142
182
  export function useReleaseQuery(releaseId: string) {
143
183
  return useQuery({
144
184
  enabled: releaseId.length > 0,
@@ -187,6 +227,29 @@ export function useBundleChildCountsQuery(bundleIds: string[]) {
187
227
  });
188
228
  }
189
229
 
230
+ /** A fold's native builds, a chunk at a time, read once it opens. */
231
+ export function useNativeBuildFoldQuery(
232
+ channel: string | undefined,
233
+ fold: FoldBounds,
234
+ enabled: boolean,
235
+ ) {
236
+ return useInfiniteQuery({
237
+ queryKey: queryKeys.nativeBuilds.fold(channel, fold),
238
+ queryFn: ({ pageParam }) =>
239
+ getNativeBuildFold({
240
+ data: {
241
+ ...fold,
242
+ ...(channel === undefined ? {} : { channel }),
243
+ ...(pageParam === undefined ? {} : { after: pageParam }),
244
+ },
245
+ }),
246
+ initialPageParam: undefined as string | undefined,
247
+ getNextPageParam: (last) => last.next,
248
+ enabled,
249
+ staleTime: 60_000,
250
+ });
251
+ }
252
+
190
253
  /** One page of native builds, newest first, kept on screen while the next loads. */
191
254
  export function useNativeBuildsQuery(page: NativeBuildPage) {
192
255
  return useQuery({
@@ -0,0 +1,110 @@
1
+ import type { IosDeviceStatus } from "@hot-updater/plugin-core";
2
+ import {
3
+ keepPreviousData,
4
+ useMutation,
5
+ useQuery,
6
+ useQueryClient,
7
+ } from "@tanstack/react-query";
8
+
9
+ import {
10
+ approveIosDevice,
11
+ createIosDeviceProfileLink,
12
+ getIosDevices,
13
+ getNativeBuildIpaDevices,
14
+ removeIosDevice,
15
+ renameIosDevice,
16
+ requestIosDeviceAccess,
17
+ } from "./ios-devices-rpc";
18
+
19
+ export const iosDeviceKeys = {
20
+ all: ["ios-devices"] as const,
21
+ list: (status?: IosDeviceStatus) => ["ios-devices", status ?? "all"] as const,
22
+ ipa: (buildId: string) => ["native-build-ipa-devices", buildId] as const,
23
+ };
24
+
25
+ /**
26
+ * How long a profile link is used before the page signs a new one: its
27
+ * capability works 15 minutes, and a tester may leave the page open.
28
+ */
29
+ export const PROFILE_LINK_REFRESH_MS = 10 * 60 * 1000;
30
+
31
+ /**
32
+ * The registry, one status or all, kept on screen while it reloads, so a
33
+ * filter change never blanks the table.
34
+ */
35
+ export function useIosDevicesQuery(status?: IosDeviceStatus) {
36
+ return useQuery({
37
+ queryKey: iosDeviceKeys.list(status),
38
+ queryFn: () =>
39
+ getIosDevices({ data: status === undefined ? {} : { status } }),
40
+ placeholderData: keepPreviousData,
41
+ });
42
+ }
43
+
44
+ /**
45
+ * A signed link to this iPhone's profile, signed again before it expires:
46
+ * the link stays a plain `<a href>`, so nothing waits on a request when it is
47
+ * tapped. The token signs its input, the name to register or the build to
48
+ * return to, so it has no data while another input's token loads: keeping
49
+ * the previous one would register the old name.
50
+ */
51
+ export function useIosDeviceProfileLinkQuery(
52
+ input:
53
+ | { readonly mode: "register"; readonly name: string }
54
+ | { readonly mode: "identify"; readonly buildId: string },
55
+ enabled = true,
56
+ ) {
57
+ return useQuery({
58
+ queryKey: ["ios-device-profile-link", input] as const,
59
+ queryFn: () => createIosDeviceProfileLink({ data: input }),
60
+ enabled,
61
+ staleTime: PROFILE_LINK_REFRESH_MS,
62
+ refetchInterval: PROFILE_LINK_REFRESH_MS,
63
+ });
64
+ }
65
+
66
+ /** The devices an IPA lists, by registry name where it has one. */
67
+ export function useNativeBuildIpaDevicesQuery(buildId: string) {
68
+ return useQuery({
69
+ queryKey: iosDeviceKeys.ipa(buildId),
70
+ queryFn: () => getNativeBuildIpaDevices({ data: { id: buildId } }),
71
+ });
72
+ }
73
+
74
+ const useInvalidatingMutation = <TInput, TResult>(
75
+ mutationFn: (input: TInput) => Promise<TResult>,
76
+ ) => {
77
+ const queryClient = useQueryClient();
78
+ return useMutation({
79
+ mutationFn,
80
+ onSettled: async () => {
81
+ await Promise.all([
82
+ queryClient.invalidateQueries({ queryKey: iosDeviceKeys.all }),
83
+ // A build page reads the registry row of a device it lacks.
84
+ queryClient.invalidateQueries({
85
+ queryKey: ["native-build-install-eligibility"],
86
+ }),
87
+ ]);
88
+ },
89
+ });
90
+ };
91
+
92
+ export const useApproveIosDeviceMutation = () =>
93
+ useInvalidatingMutation((input: { id: string; name: string }) =>
94
+ approveIosDevice({ data: input }),
95
+ );
96
+
97
+ export const useRenameIosDeviceMutation = () =>
98
+ useInvalidatingMutation((input: { id: string; name: string }) =>
99
+ renameIosDevice({ data: input }),
100
+ );
101
+
102
+ export const useRemoveIosDeviceMutation = () =>
103
+ useInvalidatingMutation((input: { udid: string }) =>
104
+ removeIosDevice({ data: input }),
105
+ );
106
+
107
+ export const useRequestIosDeviceAccessMutation = () =>
108
+ useInvalidatingMutation((input: { receipt: string; name: string }) =>
109
+ requestIosDeviceAccess({ data: input }),
110
+ );
@@ -0,0 +1,174 @@
1
+ import type { IosDeviceRow, IosDeviceStatus } from "@hot-updater/plugin-core";
2
+ import { createServerFn } from "@tanstack/react-start";
3
+
4
+ import { consoleAccess } from "./console-access";
5
+
6
+ const STATUSES: readonly IosDeviceStatus[] = [
7
+ "pending",
8
+ "approved",
9
+ "registered",
10
+ ];
11
+
12
+ const record = (input: unknown): Record<string, unknown> => {
13
+ if (typeof input !== "object" || input === null) {
14
+ throw new TypeError("Invalid input.");
15
+ }
16
+ return input as Record<string, unknown>;
17
+ };
18
+
19
+ const text = (input: unknown, field: string, max = 2048): string => {
20
+ const value = record(input)[field];
21
+ if (typeof value !== "string" || value.length === 0 || value.length > max) {
22
+ throw new TypeError(`Invalid ${field}.`);
23
+ }
24
+ return value;
25
+ };
26
+
27
+ /**
28
+ * The registry over the Console's own assembly, with the signed-in viewer's
29
+ * rights: the access check runs first, in the middleware and again here.
30
+ */
31
+ const registry = async () => {
32
+ const [{ getRequest }, { prepareConfig }, { requireConsoleAccess }, devices] =
33
+ await Promise.all([
34
+ import("@tanstack/react-start/server"),
35
+ import("./server/config.server"),
36
+ import("./server/auth.server"),
37
+ import("./server/iosDevices"),
38
+ ]);
39
+ const request = getRequest();
40
+ const [{ core, config }, principal] = await Promise.all([
41
+ prepareConfig(request),
42
+ requireConsoleAccess(request),
43
+ ]);
44
+ const viewer = await devices.iosDeviceViewer(
45
+ principal,
46
+ config.deviceApprovers,
47
+ );
48
+ return { request, core, principal, viewer, devices };
49
+ };
50
+
51
+ export interface IosDevicesView {
52
+ readonly devices: IosDeviceRow[];
53
+ readonly viewer: {
54
+ readonly email: string;
55
+ readonly canApprove: boolean;
56
+ readonly approversConfigured: boolean;
57
+ };
58
+ /** The name a new iPhone gets until its owner types one. */
59
+ readonly defaultName: string;
60
+ /** Whether iPhones can register through this Console. */
61
+ readonly registration: "ready" | "local-console" | "no-secret";
62
+ }
63
+
64
+ /** The registry, or one status of it, with what the viewer may do. */
65
+ export const getIosDevices = createServerFn({ method: "GET" })
66
+ .middleware([consoleAccess])
67
+ .validator((input: { status?: IosDeviceStatus } | undefined) => {
68
+ const status = input?.status;
69
+ if (status !== undefined && !STATUSES.includes(status)) {
70
+ throw new TypeError("Invalid status.");
71
+ }
72
+ return status === undefined ? {} : { status };
73
+ })
74
+ .handler(async ({ data }): Promise<IosDevicesView> => {
75
+ const { request, core, principal, viewer, devices } = await registry();
76
+ return {
77
+ devices: await devices.listIosDevices(core, data.status),
78
+ viewer,
79
+ defaultName: devices.defaultDeviceName(principal),
80
+ registration: await devices.deviceRegistration(request),
81
+ };
82
+ });
83
+
84
+ /**
85
+ * A new link to the profile that reads this iPhone's UDID: `register` saves
86
+ * it as requested under `name`, `identify` tells build `buildId`'s page which
87
+ * iPhone it is. A POST, since it signs the link.
88
+ */
89
+ export const createIosDeviceProfileLink = createServerFn({ method: "POST" })
90
+ .middleware([consoleAccess])
91
+ .validator((input: unknown) => {
92
+ const mode = record(input).mode;
93
+ if (mode === "register") {
94
+ return { mode, name: text(input, "name", 100) } as const;
95
+ }
96
+ if (mode === "identify") {
97
+ return { mode, buildId: text(input, "buildId", 36) } as const;
98
+ }
99
+ throw new TypeError("Invalid mode.");
100
+ })
101
+ .handler(async ({ data }) => {
102
+ const { request, viewer, devices } = await registry();
103
+ return devices.issueDeviceProfileLink(request, viewer, data);
104
+ });
105
+
106
+ /** Requests the iPhone this person's receipt names, for the next ad hoc build. */
107
+ export const requestIosDeviceAccess = createServerFn({ method: "POST" })
108
+ .middleware([consoleAccess])
109
+ .validator((input: unknown) => ({
110
+ receipt: text(input, "receipt"),
111
+ name: text(input, "name", 100),
112
+ }))
113
+ .handler(async ({ data }) => {
114
+ const { request, core, viewer, devices } = await registry();
115
+ return devices.requestIosDeviceAccess(request, core, viewer, data);
116
+ });
117
+
118
+ /** Approves a requested device, with its name: approvers only. */
119
+ export const approveIosDevice = createServerFn({ method: "POST" })
120
+ .middleware([consoleAccess])
121
+ .validator((input: unknown) => ({
122
+ id: text(input, "id", 36),
123
+ name: text(input, "name", 100),
124
+ }))
125
+ .handler(async ({ data }) => {
126
+ const { core, viewer, devices } = await registry();
127
+ devices.requireDeviceApprover(viewer);
128
+ return core.approveIosDevice(data.id, {
129
+ name: devices.deviceName(data.name),
130
+ approvedBy: viewer.email,
131
+ });
132
+ });
133
+
134
+ /** Renames a device in the registry: approvers only. */
135
+ export const renameIosDevice = createServerFn({ method: "POST" })
136
+ .middleware([consoleAccess])
137
+ .validator((input: unknown) => ({
138
+ id: text(input, "id", 36),
139
+ name: text(input, "name", 100),
140
+ }))
141
+ .handler(async ({ data }) => {
142
+ const { core, viewer, devices } = await registry();
143
+ devices.requireDeviceApprover(viewer);
144
+ return core.renameIosDevice(data.id, devices.deviceName(data.name));
145
+ });
146
+
147
+ /**
148
+ * Removes a device from the registry: an approver any, the person who asked
149
+ * their own requested one. Apple keeps it.
150
+ */
151
+ export const removeIosDevice = createServerFn({ method: "POST" })
152
+ .middleware([consoleAccess])
153
+ .validator((input: unknown) => ({ udid: text(input, "udid", 40) }))
154
+ .handler(async ({ data }) => {
155
+ const { core, viewer, devices } = await registry();
156
+ return devices.removeIosDevice(core, viewer, data.udid);
157
+ });
158
+
159
+ /**
160
+ * The devices an ad hoc build's IPA lists, read from its profile in storage,
161
+ * each with its registry name when the registry knows it: one row read, the
162
+ * IPA's few parts, and one page of the registry.
163
+ */
164
+ export const getNativeBuildIpaDevices = createServerFn({ method: "GET" })
165
+ .middleware([consoleAccess])
166
+ .validator((input: { id: string }) => ({ id: text(input, "id", 36) }))
167
+ .handler(async ({ data }) => {
168
+ const [{ prepareConfig }, { readNativeBuildIpaDevices }] =
169
+ await Promise.all([
170
+ import("./server/config.server"),
171
+ import("./server/nativeBuildInstall"),
172
+ ]);
173
+ return readNativeBuildIpaDevices(data.id, await prepareConfig());
174
+ });
@@ -23,6 +23,49 @@ export const nativeBuildArtifacts: Record<
23
23
  ipa: { label: "IPA", installs: "registered iOS devices" },
24
24
  };
25
25
 
26
+ /**
27
+ * How a native build reaches people: the store track it was submitted to,
28
+ * else its artifact, an `.ipa` by its export method when the registry has
29
+ * it. Builds of one channel, platform and sandbox flag with one
30
+ * distribution form a distribution path; a newer build on it is the one
31
+ * people get there.
32
+ */
33
+ export type NativeBuildDistribution =
34
+ | NonNullable<NativeBuildRow["submitted_to"]>
35
+ | NativeBuildArtifactKind
36
+ | `ipa-${NonNullable<NativeBuildRow["export_method"]>}`;
37
+
38
+ /** A build's distribution, from its row. */
39
+ export const nativeBuildDistribution = (
40
+ build: Pick<
41
+ NativeBuildRow,
42
+ "submitted_to" | "artifact_kind" | "export_method"
43
+ >,
44
+ ): NativeBuildDistribution =>
45
+ build.submitted_to ??
46
+ (build.artifact_kind === "ipa" && build.export_method !== null
47
+ ? `ipa-${build.export_method}`
48
+ : build.artifact_kind);
49
+
50
+ /** The distribution path a build is on, as one key. */
51
+ export const nativeBuildPathKey = (
52
+ build: Pick<
53
+ NativeBuildRow,
54
+ | "channel_id"
55
+ | "platform"
56
+ | "is_sandbox"
57
+ | "submitted_to"
58
+ | "artifact_kind"
59
+ | "export_method"
60
+ >,
61
+ ): string =>
62
+ JSON.stringify([
63
+ build.channel_id,
64
+ build.platform,
65
+ build.is_sandbox,
66
+ nativeBuildDistribution(build),
67
+ ]);
68
+
26
69
  /** A platform's name as the console shows it. */
27
70
  export const platformLabel = (platform: "ios" | "android") =>
28
71
  platform === "ios" ? "iOS" : "Android";
@@ -94,24 +137,46 @@ export const nativeBuildDetailPath = (id: string) =>
94
137
  */
95
138
  export const NATIVE_BUILD_INSTALL_LINK_TTL_MS = 60 * 60 * 1000;
96
139
 
97
- /** The phone's own copy of its UDID, which the Console's server never keeps. */
140
+ /** This iPhone's own copy of its UDID, as its profile reported it. */
98
141
  export const IOS_UDID_STORAGE_KEY = "hot-updater-ios-udid";
99
142
 
143
+ /**
144
+ * This iPhone's receipt of its UDID: what its profile's answer signed for the
145
+ * signed-in person, which Request access takes.
146
+ */
147
+ export const IOS_DEVICE_RECEIPT_STORAGE_KEY = "hot-updater-ios-device-receipt";
148
+
100
149
  /** A device's UDID: 40 hex digits, or 8 and 16 joined by a hyphen. */
101
150
  export const IOS_UDID_PATTERN = /^(?:[0-9a-f]{40}|[0-9a-f]{8}-[0-9a-f]{16})$/iu;
102
151
 
152
+ /** The Console page of the iOS device registry, inside Native builds. */
153
+ export const IOS_DEVICES_PATH = "/native-builds/devices";
154
+
103
155
  /** The route that hands an iPhone the profile that reads its UDID. */
104
- export const nativeBuildDeviceProfilePath = (id: string) =>
105
- `/_hot-updater/native-builds/${encodeURIComponent(id)}/device.mobileconfig`;
156
+ export const IOS_DEVICE_PROFILE_PATH =
157
+ "/_hot-updater/devices/device.mobileconfig";
158
+
159
+ /** Where iOS posts the profile's answer. */
160
+ export const IOS_DEVICE_RESPONSE_PATH = "/_hot-updater/devices/device-response";
161
+
162
+ /** The query parameter of the profile routes: the capability that signs them. */
163
+ export const IOS_DEVICE_TOKEN_PARAM = "t";
164
+
165
+ /** A device profile's link, under the Console's path on the page's own address. */
166
+ export const iosDeviceProfileUrl = (consolePath: string, token: string) =>
167
+ `${consolePath}${IOS_DEVICE_PROFILE_PATH}?${IOS_DEVICE_TOKEN_PARAM}=${encodeURIComponent(token)}`;
168
+
169
+ /** The command that registers requested iPhones from a terminal. */
170
+ export const IOS_DEVICES_ADD_COMMAND =
171
+ "npx hot-updater native-build devices add";
172
+
173
+ /** The UDID as the iOS devices page shows it: its last six characters. */
174
+ export const maskIosUdid = (udid: string) => `…${udid.slice(-6)}`;
106
175
 
107
176
  /** The route of a build's install manifest, as `itms-services` opens it. */
108
177
  export const nativeBuildManifestPath = (id: string) =>
109
178
  `/_hot-updater/native-builds/${encodeURIComponent(id)}/manifest.plist`;
110
179
 
111
- /** The command a maintainer runs to register an iPhone. */
112
- export const nativeBuildDeviceAddCommand = (udid: string) =>
113
- `npx hot-updater native-build devices add --udid ${udid} --name "Teammate's iPhone"`;
114
-
115
180
  /**
116
181
  * What an iPhone opens to install a build: the manifest's URL, signed with a
117
182
  * token that also lets the installer download the IPA.
@@ -17,6 +17,8 @@ import type {
17
17
  /** What the console runs on, assembled from its config as the server is. */
18
18
  export interface ResolvedConsoleConfig {
19
19
  readonly gitUrl?: string;
20
+ /** Who may approve iOS devices, trimmed and lower-cased: none when empty. */
21
+ readonly deviceApprovers: readonly string[];
20
22
  /** The server's database, or its admin API. */
21
23
  readonly database: ConfiguredDatabase;
22
24
  /**
@@ -72,8 +74,13 @@ export const resolveConsoleConfig = async (
72
74
 
73
75
  const config = typeof source === "function" ? await source(request) : source;
74
76
  const { database, storage, plugins = [] } = config;
75
- const { gitUrl } = config.console ?? {};
76
- const consoleOptions = gitUrl === undefined ? {} : { gitUrl };
77
+ const { gitUrl, deviceApprovers = [] } = config.console ?? {};
78
+ const consoleOptions = {
79
+ ...(gitUrl === undefined ? {} : { gitUrl }),
80
+ deviceApprovers: deviceApprovers
81
+ .map((email) => email.trim().toLowerCase())
82
+ .filter((email) => email.length > 0),
83
+ };
77
84
  // A self-hosted server runs the plugins itself: core is its admin API.
78
85
  // The plugins are still checked as the server checks them, on a database
79
86
  // nothing reads, so one the server would refuse is refused here too.