@hot-updater/console 1.2.0-rc.3 → 1.2.0-rc.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{-native-builds-search-C-TGpFAm.js → -native-builds-search-DdHwfe4q.js} +1 -1
  3. package/.output/public/assets/BundleIdDisplay-CTBdtFQ8.js +1 -0
  4. package/.output/public/assets/ChannelBadge-CEabmopB.js +1 -0
  5. package/.output/public/assets/CompositeItem-KUM5yQVr.js +1 -0
  6. package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-Be-0iTww.js} +1 -1
  7. package/.output/public/assets/{EventDetails-Dl2RvPAk.js → EventDetails-bDOYte1z.js} +1 -1
  8. package/.output/public/assets/HashValueDisplay-D2f0HmyU.js +1 -0
  9. package/.output/public/assets/{InsightsPageHeader-DHhqY3DT.js → InsightsPageHeader-Cj2ROSQO.js} +1 -1
  10. package/.output/public/assets/IosInstall-CHI2C4Yd.js +1 -0
  11. package/.output/public/assets/NativeBuildsNav-DaqxQPnG.js +1 -0
  12. package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-CVBtl68B.js} +1 -1
  13. package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-DVnzzGqM.js} +1 -1
  14. package/.output/public/assets/RelativeTime-B4PK8qDw.js +1 -0
  15. package/.output/public/assets/RolloutPercentageBadge-D_I0Raj2.js +1 -0
  16. package/.output/public/assets/RowReason-B7VM1ztc.js +1 -0
  17. package/.output/public/assets/SandboxBadge-BVxHg_HF.js +1 -0
  18. package/.output/public/assets/TargetDisplay-KU7JhIWG.js +1 -0
  19. package/.output/public/assets/{alert-dialog-BqYScr9y.js → alert-dialog-Ch0QxRsa.js} +1 -1
  20. package/.output/public/assets/api-C1OPeiG1.js +1 -0
  21. package/.output/public/assets/api-keys-DLC8jjaM.js +1 -0
  22. package/.output/public/assets/api-keys-eDnzgFAf.js +1 -0
  23. package/.output/public/assets/arrow-left-DQjHJAnT.js +1 -0
  24. package/.output/public/assets/arrow-right-CXp_K3xK.js +1 -0
  25. package/.output/public/assets/arrow-up-right-BFafIOrq.js +1 -0
  26. package/.output/public/assets/badge-FZMD5vvS.js +1 -0
  27. package/.output/public/assets/card-CyHYmHue.js +1 -0
  28. package/.output/public/assets/check-CqWNyG93.js +1 -0
  29. package/.output/public/assets/chevron-right-DNbYTBX1.js +1 -0
  30. package/.output/public/assets/{circle-off-C7Muo0ss.js → circle-off-BCkZpskJ.js} +1 -1
  31. package/.output/public/assets/{clipboard-DQbOcrL7.js → clipboard-DZrZK5gR.js} +1 -1
  32. package/.output/public/assets/{console-features-api-DEXSwFtc.js → console-features-api-BO5V64P3.js} +1 -1
  33. package/.output/public/assets/{copy-DsuLj3oj.js → copy-CH1__JAW.js} +1 -1
  34. package/.output/public/assets/dialog-BLj71-Nf.js +1 -0
  35. package/.output/public/assets/{dist-CPlO6ko9.js → dist-DAM__Tdz.js} +1 -1
  36. package/.output/public/assets/{download-Cf24LBde.js → download-B2GjTySo.js} +1 -1
  37. package/.output/public/assets/empty--YaE5Z4p.js +1 -0
  38. package/.output/public/assets/field-CdhSgWhI.js +1 -0
  39. package/.output/public/assets/git-branch-DG1VDaKq.js +1 -0
  40. package/.output/public/assets/history-C0wv4htz.js +1 -0
  41. package/.output/public/assets/index-CgwVUC2n.js +10 -0
  42. package/.output/public/assets/{input-group-D3OUBk4n.js → input-group-XKLcUGoa.js} +1 -1
  43. package/.output/public/assets/insights-C94CdeAA.js +1 -0
  44. package/.output/public/assets/insights-DILMVpk8.js +2 -0
  45. package/.output/public/assets/insights-_j_ieOyh.js +42 -0
  46. package/.output/public/assets/insights-api-B6Gj74n5.js +1 -0
  47. package/.output/public/assets/{insights-search-DghCbEnk.js → insights-search-Bgvg6wSP.js} +1 -1
  48. package/.output/public/assets/insights-usage-rpc-BUCinjSN.js +1 -0
  49. package/.output/public/assets/insights_.distribution-Bb6_S-hD.js +2 -0
  50. package/.output/public/assets/insights_.distribution-CRkGNelG.js +1 -0
  51. package/.output/public/assets/insights_.distribution-CyAu3RN3.js +1 -0
  52. package/.output/public/assets/installations-BA01mqJE.js +1 -0
  53. package/.output/public/assets/installations-BsD6LgNc.js +2 -0
  54. package/.output/public/assets/installations-CYTzndfP.js +1 -0
  55. package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-D7UgdXyA.js} +1 -1
  56. package/.output/public/assets/{link-DTEyW70e.js → link-CN3iHC4A.js} +2 -2
  57. package/.output/public/assets/{list--NIee1FZ.js → list-Bm-CfN5g.js} +1 -1
  58. package/.output/public/assets/loader-circle-iMqC-8ZE.js +1 -0
  59. package/.output/public/assets/native-builds-BMbws1g5.js +2 -0
  60. package/.output/public/assets/native-builds-xgHiHQML.js +1 -0
  61. package/.output/public/assets/native-builds_._buildId-B04z9yfk.js +1 -0
  62. package/.output/public/assets/native-builds_._buildId-DaMmTcHo.js +2 -0
  63. package/.output/public/assets/native-builds_.devices-CTzpCVsb.js +1 -0
  64. package/.output/public/assets/native-builds_.devices-D_kl2-bc.js +2 -0
  65. package/.output/public/assets/package-BmfoZ5Zj.js +1 -0
  66. package/.output/public/assets/plus-Db0KxLZp.js +1 -0
  67. package/.output/public/assets/preload-helper-CRQjUQaZ.js +1 -0
  68. package/.output/public/assets/{refresh-cw-B9HHjLej.js → refresh-cw-BHhBYjS8.js} +1 -1
  69. package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-BYRt19mj.js} +1 -1
  70. package/.output/public/assets/remote-config-Cxkr7_BP.js +1 -0
  71. package/.output/public/assets/remote-config-DAOyn5xL.js +1 -0
  72. package/.output/public/assets/remote-config-DXv25LX1.js +6 -0
  73. package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-Ba-slJea.js} +1 -1
  74. package/.output/public/assets/routes-DM3TyTLW.js +2 -0
  75. package/.output/public/assets/routes-Des97uK_.js +1 -0
  76. package/.output/public/assets/search-dJG2BYmx.js +1 -0
  77. package/.output/public/assets/select-CA8r-UUe.js +1 -0
  78. package/.output/public/assets/send-DuMOCzbD.js +1 -0
  79. package/.output/public/assets/{sidebar-Di9SN47G.js → sidebar-yC7KdImc.js} +1 -1
  80. package/.output/public/assets/smartphone-D1C6BRd_.js +1 -0
  81. package/.output/public/assets/styles-BHLI87EH.css +2 -0
  82. package/.output/public/assets/switch-BsV3d4km.js +1 -0
  83. package/.output/public/assets/table-D8YjT_ht.js +1 -0
  84. package/.output/public/assets/tabs-RdhEl9sE.js +1 -0
  85. package/.output/public/assets/trash-2-B5KIvrXy.js +1 -0
  86. package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-CFcU9dIB.js} +1 -1
  87. package/.output/public/assets/{useCompositeListItem-JmyDfo3-.js → useCompositeListItem-lAmUsXcc.js} +1 -1
  88. package/.output/public/assets/{useMutation-DbYw7boA.js → useMutation-w3qYaU2L.js} +1 -1
  89. package/.output/public/assets/valueToPercent-Bn8p2lng.js +1 -0
  90. package/.output/server/{__23tanstack-start-server-fn-resolver-DJQS4eWX.mjs → __23tanstack-start-server-fn-resolver-q4YFIDyr.mjs} +94 -46
  91. package/.output/server/_chunks/ssr-renderer.mjs +2 -2
  92. package/.output/server/_libs/@base-ui/react+[...].mjs +1488 -183
  93. package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
  94. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
  95. package/.output/server/_libs/_.mjs +2 -0
  96. package/.output/server/_libs/lucide-react.mjs +22 -28
  97. package/.output/server/_libs/next-themes.mjs +1 -1
  98. package/.output/server/_libs/react-redux+[...].mjs +1 -1
  99. package/.output/server/_libs/recharts+[...].mjs +1 -1
  100. package/.output/server/_libs/sonner.mjs +1 -1
  101. package/.output/server/_libs/tanstack__react-query.mjs +1 -1
  102. package/.output/server/_ssr/{-native-builds-search-CwNcoXf4.mjs → -native-builds-search-Mm_AZoRU.mjs} +9 -3
  103. package/.output/server/_ssr/{BundleIdDisplay-LdRkYdnN.mjs → BundleIdDisplay-DvzlYWq8.mjs} +3 -3
  104. package/.output/server/_ssr/ChannelBadge-qF_Pc5Ud.mjs +23 -0
  105. package/.output/server/_ssr/{ConsoleFeatureUnavailable-BN-FZ8eG.mjs → ConsoleFeatureUnavailable-DKUgr0N_.mjs} +7 -7
  106. package/.output/server/_ssr/{EventDetails-B77sWxgh.mjs → EventDetails-T1XtYEDD.mjs} +8 -8
  107. package/.output/server/_ssr/{HashValueDisplay-C4Vs4cmO.mjs → HashValueDisplay-Cas_zjIS.mjs} +7 -7
  108. package/.output/server/_ssr/{InsightsPageHeader-Dx4jJ7X0.mjs → InsightsPageHeader-BrllhUl2.mjs} +8 -8
  109. package/.output/server/_ssr/IosInstall-CEHI8F2M.mjs +615 -0
  110. package/.output/server/_ssr/NativeBuildsNav-2xSHyA1a.mjs +38 -0
  111. package/.output/server/_ssr/{NotFoundPage-DB5cXeVZ.mjs → NotFoundPage-D6H9vxj_.mjs} +3 -3
  112. package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-BpGOEXjU.mjs} +13 -3
  113. package/.output/server/_ssr/RelativeTime-DpEVzDP9.mjs +237 -0
  114. package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-DW8-_w30.mjs} +20 -4
  115. package/.output/server/_ssr/RowReason-C-PjIxzq.mjs +186 -0
  116. package/.output/server/_ssr/SandboxBadge-CDdNew0R.mjs +97 -0
  117. package/.output/server/_ssr/TargetDisplay-BBsP7IaZ.mjs +83 -0
  118. package/.output/server/_ssr/{alert-dialog-DxboqQmd.mjs → alert-dialog-Bd4E9xdw.mjs} +2 -2
  119. package/.output/server/_ssr/{api-cvzOLlTy.mjs → api-BT7aA8UM.mjs} +167 -33
  120. package/.output/server/_ssr/{api-keys-C3QCQvpV.mjs → api-keys-D2NvcQZv.mjs} +2 -2
  121. package/.output/server/_ssr/{api-keys-CrbGr02t.mjs → api-keys-DjWpM20P.mjs} +11 -10
  122. package/.output/server/_ssr/{api-keys-rpc-BcTQzRLj.mjs → api-keys-rpc-nM5H7V7f.mjs} +4 -4
  123. package/.output/server/_ssr/{api-rpc-B48nsUak.mjs → api-rpc-DX4HynbW.mjs} +83 -35
  124. package/.output/server/_ssr/{auth-rpc-C0gtG9nJ.mjs → auth-rpc-LCxTtYz2.mjs} +5 -5
  125. package/.output/server/_ssr/{auth.server-B0JikHOQ.mjs → auth.server-CERo_xef.mjs} +797 -174
  126. package/.output/server/_ssr/{badge-oO-0mLsr.mjs → badge-Dpp4q7sD.mjs} +4 -45
  127. package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-BP40zYSt.mjs} +1 -1
  128. package/.output/server/_ssr/card-CFCftDfI.mjs +49 -0
  129. package/.output/server/_ssr/{config.server-CJVHGJtr.mjs → config.server-5W5WD8x2.mjs} +4 -4
  130. package/.output/server/_ssr/{console-access-4TW5Af_n.mjs → console-access-B0S5YFUa.mjs} +2 -2
  131. package/.output/server/_ssr/{console-features-api-DfzZRyXa.mjs → console-features-api-CV_EReEj.mjs} +4 -4
  132. package/.output/server/_ssr/{console-features-rpc-DqNpa3U9.mjs → console-features-rpc-D3xlQsuy.mjs} +4 -4
  133. package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-xaGDhRC9.mjs} +1 -1
  134. package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
  135. package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-XAvDetmn.mjs} +1 -1
  136. package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
  137. package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BtRVBD0C.mjs} +3 -3
  138. package/.output/server/_ssr/deviceProfileToken-CwWb1lPq.mjs +82 -0
  139. package/.output/server/_ssr/{dialog-DsuMZ5oh.mjs → dialog-DQR_QI_X.mjs} +2 -2
  140. package/.output/server/_ssr/{dist-TEpM_UAD.mjs → dist-B6-irDRA.mjs} +1 -1
  141. package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-DnoYpi36.mjs} +1 -1
  142. package/.output/server/_ssr/{empty-r4kJO91t.mjs → empty-C7PFnkCH.mjs} +3 -3
  143. package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
  144. package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-BA2eg11O.mjs} +3 -3
  145. package/.output/server/_ssr/{field-DfXmt9CS.mjs → field-BqYN8sZT.mjs} +3 -3
  146. package/.output/server/_ssr/foldedPage-CqpVk31Q.mjs +176 -0
  147. package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-CdqFonhl.mjs} +2 -2
  148. package/.output/server/_ssr/{input-group-BCO7zTpU.mjs → input-group-Brv0mmyp.mjs} +2 -2
  149. package/.output/server/_ssr/{insights-CRu5FUj8.mjs → insights--xI3A0KI.mjs} +5 -5
  150. package/.output/server/_ssr/{insights-DrrhPDER.mjs → insights-CD1e3EnW.mjs} +2 -2
  151. package/.output/server/_ssr/{insights-Csqlj6u7.mjs → insights-Dd0VdO-1.mjs} +27 -26
  152. package/.output/server/_ssr/{insights-api-NW5VCXqg.mjs → insights-api-Bt2XVa4Y.mjs} +5 -5
  153. package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-CXHg1lLV.mjs} +2 -2
  154. package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-7zH97WOO.mjs} +2 -2
  155. package/.output/server/_ssr/{insights-failures-rpc-CoFrAOK9.mjs → insights-failures-rpc-DBGzXP5A.mjs} +11 -11
  156. package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-BhOg6kz2.mjs} +1 -1
  157. package/.output/server/_ssr/{insights-recovery-rpc-sud_FyGW.mjs → insights-recovery-rpc-C6fAh-i_.mjs} +7 -7
  158. package/.output/server/_ssr/{insights-rpc-Ce2Isz9q.mjs → insights-rpc-pThKC9oj.mjs} +4 -4
  159. package/.output/server/_ssr/{insights-search-B0O3YoO2.mjs → insights-search-iFN4UaUv.mjs} +5 -5
  160. package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-h8fipPTv.mjs} +1 -1
  161. package/.output/server/_ssr/{insights-usage-rpc-Cwf1t4aW.mjs → insights-usage-rpc-B-RLvdLZ.mjs} +5 -5
  162. package/.output/server/_ssr/{insights-usage-rpc-C-cS2F9s.mjs → insights-usage-rpc-CGHZQ9jq.mjs} +7 -7
  163. package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-BjSiV_X_.mjs} +3 -3
  164. package/.output/server/_ssr/{insights_.distribution-DIkh5VqM.mjs → insights_.distribution-C6iXJ93Y.mjs} +15 -14
  165. package/.output/server/_ssr/{insights_.distribution-D52TkQ2V.mjs → insights_.distribution-E6Ns2aN7.mjs} +2 -2
  166. package/.output/server/_ssr/{insights_.distribution--3aR6Kpy.mjs → insights_.distribution-xHmfwwa5.mjs} +5 -5
  167. package/.output/server/_ssr/{installations-Bu4Lb0x9.mjs → installations-7V-Xyui8.mjs} +12 -12
  168. package/.output/server/_ssr/{installations-DftevpDt.mjs → installations-CZnN6slr.mjs} +4 -4
  169. package/.output/server/_ssr/{installations-C818mFCp.mjs → installations-D6Upc9Rt.mjs} +2 -2
  170. package/.output/server/_ssr/ios-devices-rpc-CXuHk24G.mjs +139 -0
  171. package/.output/server/_ssr/iosDeviceProfile-BESi_onx.mjs +176 -0
  172. package/.output/server/_ssr/iosDevices-BmvvvZRo.mjs +129 -0
  173. package/.output/server/_ssr/listReleases-DYYA5alS.mjs +94 -0
  174. package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
  175. package/.output/server/_ssr/{native-builds-DOASMwGh.mjs → native-builds-BUojmVWC.mjs} +3 -3
  176. package/.output/server/_ssr/native-builds-BXBkklfA.mjs +197 -0
  177. package/.output/server/_ssr/native-builds-BhDCE89P.mjs +717 -0
  178. package/.output/server/_ssr/{native-builds_._buildId-CTytnLBB.mjs → native-builds_._buildId-DRiCNDdO.mjs} +3 -3
  179. package/.output/server/_ssr/native-builds_._buildId-DkMpG-OB.mjs +1176 -0
  180. package/.output/server/_ssr/native-builds_.devices-DSideebA.mjs +10 -0
  181. package/.output/server/_ssr/native-builds_.devices-DsOx1R36.mjs +702 -0
  182. package/.output/server/_ssr/nativeBuildDownloadLink-DDAUVU8q.mjs +96 -0
  183. package/.output/server/_ssr/nativeBuildInstall-CcBrfTsc.mjs +250 -0
  184. package/.output/server/_ssr/nativeBuilds-Cub0EUGN.mjs +287 -0
  185. package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-CX7wutet.mjs} +6 -6
  186. package/.output/server/_ssr/publicConsoleBase-f67NLLXZ.mjs +610 -0
  187. package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-DeICczY7.mjs} +2 -2
  188. package/.output/server/_ssr/{release-adoption-rpc-OizwttJD.mjs → release-adoption-rpc-BjMXMi9A.mjs} +9 -9
  189. package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-kHZo8P90.mjs} +4 -4
  190. package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-D9dAMI17.mjs} +3 -3
  191. package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-EPhok_Py.mjs} +1 -1
  192. package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-DaZ7ifUF.mjs} +2 -2
  193. package/.output/server/_ssr/{remote-config-DaBgnVnL.mjs → remote-config-B1iZuZOF.mjs} +2 -2
  194. package/.output/server/_ssr/{remote-config-Dypc_nuk.mjs → remote-config-C_DprbJz.mjs} +23 -22
  195. package/.output/server/_ssr/{remote-config-DZu7gJLL.mjs → remote-config-C_q6FBE4.mjs} +3 -3
  196. package/.output/server/_ssr/{remote-config-rpc-DOfPhqli.mjs → remote-config-rpc-BFTPcMfZ.mjs} +5 -5
  197. package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
  198. package/.output/server/_ssr/{router-BkRbvels.mjs → router-BDXPwfwl.mjs} +92 -59
  199. package/.output/server/_ssr/{routes-D9JnXVWL.mjs → routes-BJeztqpQ.mjs} +388 -432
  200. package/.output/server/_ssr/{routes-BeTsUkNX.mjs → routes-DpapxHLc.mjs} +14 -17
  201. package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-CkSbWaZm.mjs} +4 -4
  202. package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-3oDJJFWa.mjs} +1 -1
  203. package/.output/server/_ssr/{schema-migration-rpc-B2VGxRY6.mjs → schema-migration-rpc-a4bLEdaP.mjs} +4 -4
  204. package/.output/server/_ssr/{select-Cywc0NmT.mjs → select-C9HpIZxd.mjs} +2 -2
  205. package/.output/server/_ssr/{server-Ds-fU1zf.mjs → server-C8ZmMWnn.mjs} +7 -7
  206. package/.output/server/_ssr/{sidebar-t0NiN0-2.mjs → sidebar-BrVL3L7R.mjs} +3 -3
  207. package/.output/server/_ssr/ssr.mjs +1 -1
  208. package/.output/server/_ssr/{start-BvDsQehg.mjs → start-D3noqqOK.mjs} +2 -2
  209. package/.output/server/_ssr/{switch-D1T38CnM.mjs → switch-DtnsoZHO.mjs} +3 -3
  210. package/.output/server/_ssr/{table-L9ZQgxNF.mjs → table-Bg7nCnct.mjs} +2 -2
  211. package/.output/server/_ssr/{tabs-BiByrAnU.mjs → tabs-BEIoGLTL.mjs} +4 -4
  212. package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-D0bP_Ume.mjs} +3 -3
  213. package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-CmHbryZT.mjs} +2 -2
  214. package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-NmbU0MD2.mjs} +1 -1
  215. package/.output/server/_tanstack-start-manifest_v-C_TPyfFP.mjs +225 -0
  216. package/.output/server/index.mjs +479 -381
  217. package/lib/index.d.mts +9 -0
  218. package/package.json +7 -30
  219. package/src/components/ChannelBadge.tsx +9 -9
  220. package/src/components/DataTable.tsx +347 -0
  221. package/src/components/FoldedRows.tsx +219 -0
  222. package/src/components/HashValueDisplay.tsx +6 -3
  223. package/src/components/PlatformIcon.tsx +10 -0
  224. package/src/components/RelativeTime.tsx +31 -0
  225. package/src/components/RowReason.tsx +56 -0
  226. package/src/components/TargetDisplay.tsx +69 -0
  227. package/src/components/ThemeProvider.tsx +11 -2
  228. package/src/components/features/api-keys/ApiKeysPage.tsx +1 -1
  229. package/src/components/features/channels/ChannelManagementDialog.tsx +5 -10
  230. package/src/components/features/insights/ReleaseActivity.tsx +1 -1
  231. package/src/components/features/native-builds/BuiltInBundleCard.tsx +108 -58
  232. package/src/components/features/native-builds/CommitLink.tsx +3 -2
  233. package/src/components/features/native-builds/ImportBuild.tsx +1 -1
  234. package/src/components/features/native-builds/InstallCard.tsx +310 -67
  235. package/src/components/features/native-builds/IosDevicesPage.tsx +944 -0
  236. package/src/components/features/native-builds/IosInstall.tsx +632 -0
  237. package/src/components/features/native-builds/IpaDevicesCard.tsx +111 -0
  238. package/src/components/features/native-builds/NativeBuildDetailPage.tsx +21 -4
  239. package/src/components/features/native-builds/NativeBuildsNav.tsx +44 -0
  240. package/src/components/features/native-builds/NativeBuildsPage.tsx +65 -76
  241. package/src/components/features/native-builds/NativeBuildsTable.tsx +668 -318
  242. package/src/components/features/native-builds/OlderBuildLabel.tsx +61 -0
  243. package/src/components/features/native-builds/PatchesCard.tsx +3 -2
  244. package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +4 -4
  245. package/src/components/features/native-builds/SandboxBadge.tsx +21 -0
  246. package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
  247. package/src/components/features/native-builds/ShortHash.tsx +6 -3
  248. package/src/components/features/native-builds/StoreSubmission.tsx +18 -12
  249. package/src/components/features/native-builds/playTracks.ts +19 -0
  250. package/src/components/features/remote-config/PublishDialog.tsx +4 -1
  251. package/src/components/features/remote-config/VersionsCard.tsx +5 -2
  252. package/src/components/ui/badge.tsx +2 -0
  253. package/src/components/ui/sonner.tsx +3 -1
  254. package/src/index.ts +9 -0
  255. package/src/lib/api-rpc.ts +124 -35
  256. package/src/lib/api.ts +150 -14
  257. package/src/lib/ios-devices-api.ts +110 -0
  258. package/src/lib/ios-devices-rpc.ts +183 -0
  259. package/src/lib/native-builds.ts +160 -17
  260. package/src/lib/server/console-runtime.server.ts +9 -2
  261. package/src/lib/server/deviceProfileToken.ts +187 -0
  262. package/src/lib/server/foldedPage.ts +360 -0
  263. package/src/lib/server/iosDeviceProfile.ts +230 -0
  264. package/src/lib/server/iosDevices.ts +223 -0
  265. package/src/lib/server/listReleases.ts +101 -62
  266. package/src/lib/server/local-console.ts +1 -1
  267. package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
  268. package/src/lib/server/nativeBuildInstall.ts +495 -0
  269. package/src/lib/server/nativeBuilds.ts +308 -59
  270. package/src/lib/server/plistText.ts +17 -0
  271. package/src/lib/server/publicConsoleBase.ts +17 -0
  272. package/src/routeTree.gen.ts +85 -18
  273. package/src/routes/-native-builds-search.ts +20 -0
  274. package/src/routes/[_]hot-updater/devices/device-response.ts +21 -0
  275. package/src/routes/[_]hot-updater/devices/device[.]mobileconfig.ts +17 -0
  276. package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
  277. package/src/routes/api/native-builds/$buildId/download.ts +22 -1
  278. package/src/routes/index.tsx +541 -532
  279. package/src/routes/native-builds_.devices.tsx +21 -0
  280. package/src/styles.css +24 -0
  281. package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +0 -1
  282. package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
  283. package/.output/public/assets/StoreSubmission-ViTkW4eJ.js +0 -1
  284. package/.output/public/assets/api-P2g8dCNg.js +0 -1
  285. package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
  286. package/.output/public/assets/api-keys-FueRkF9q.js +0 -1
  287. package/.output/public/assets/arrow-left-g9cKqXuC.js +0 -1
  288. package/.output/public/assets/arrow-right-CNII8TYn.js +0 -1
  289. package/.output/public/assets/arrow-up-right-DK8Zdg40.js +0 -1
  290. package/.output/public/assets/badge-DWFcDWho.js +0 -1
  291. package/.output/public/assets/check-CXVR3s3X.js +0 -1
  292. package/.output/public/assets/chevron-right-BoUXo82O.js +0 -1
  293. package/.output/public/assets/dialog-CNUPxNxH.js +0 -1
  294. package/.output/public/assets/empty-B3Uwdd6k.js +0 -1
  295. package/.output/public/assets/field-D-2-mnNh.js +0 -1
  296. package/.output/public/assets/history-DqHlgSuV.js +0 -1
  297. package/.output/public/assets/index-CqP5HPV6.js +0 -10
  298. package/.output/public/assets/insights-B-0odqpt.js +0 -42
  299. package/.output/public/assets/insights-BSVGfxSL.js +0 -1
  300. package/.output/public/assets/insights-NK5B6ReS.js +0 -2
  301. package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
  302. package/.output/public/assets/insights-usage-rpc-CKQH0pUS.js +0 -1
  303. package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
  304. package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
  305. package/.output/public/assets/insights_.distribution-dvk6vYDM.js +0 -1
  306. package/.output/public/assets/installations-B674P5Z5.js +0 -2
  307. package/.output/public/assets/installations-BWxczZ2t.js +0 -1
  308. package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
  309. package/.output/public/assets/native-builds-BOC71grI.js +0 -1
  310. package/.output/public/assets/native-builds-D6rldpSh.js +0 -2
  311. package/.output/public/assets/native-builds-DAy2678K.js +0 -1
  312. package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
  313. package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
  314. package/.output/public/assets/plus-BReVKct-.js +0 -1
  315. package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
  316. package/.output/public/assets/remote-config-B7ujqhLa.js +0 -6
  317. package/.output/public/assets/remote-config-WjpozBG5.js +0 -1
  318. package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
  319. package/.output/public/assets/routes-BDdBIxYS.js +0 -1
  320. package/.output/public/assets/routes-CCD33Azv.js +0 -2
  321. package/.output/public/assets/search-BCel4Oy6.js +0 -1
  322. package/.output/public/assets/select-CBIU0_M1.js +0 -1
  323. package/.output/public/assets/smartphone-CMaSy_ir.js +0 -1
  324. package/.output/public/assets/styles-uK-0vUMk.css +0 -2
  325. package/.output/public/assets/switch-BpdiHL_t.js +0 -1
  326. package/.output/public/assets/table-Bpy3SvSo.js +0 -1
  327. package/.output/public/assets/tabs-Xmt7tZeG.js +0 -1
  328. package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
  329. package/.output/public/assets/valueToPercent-BLwGy_xK.js +0 -1
  330. package/.output/server/_ssr/RolloutPercentageBadge-vmwE8iae.mjs +0 -21
  331. package/.output/server/_ssr/StoreSubmission-DE4vgy5B.mjs +0 -139
  332. package/.output/server/_ssr/listReleases-D_GY00SQ.mjs +0 -79
  333. package/.output/server/_ssr/native-builds-CWjU--fI.mjs +0 -510
  334. package/.output/server/_ssr/native-builds-DhXL5zf_.mjs +0 -137
  335. package/.output/server/_ssr/native-builds_._buildId-D4lYJLIU.mjs +0 -813
  336. package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
  337. package/.output/server/_ssr/nativeBuilds-B_7BPjt_.mjs +0 -133
  338. package/.output/server/_ssr/qr-code-C7kNRIDX.mjs +0 -22
  339. package/.output/server/_tanstack-start-manifest_v-B5nsO5L4.mjs +0 -184
  340. package/src/lib/server/nativeBuildQr.ts +0 -73
  341. package/src/routes/[_]hot-updater/native-builds/qr.ts +0 -14
  342. /package/.output/public/assets/{uuidv7-zXMtwR9Q.js → uuidv7-DAoOOpz9.js} +0 -0
@@ -0,0 +1,495 @@
1
+ import type {
2
+ HotUpdaterCoreApi,
3
+ IosDeviceRow,
4
+ NativeBuildRow,
5
+ StorageAdapter,
6
+ } from "@hot-updater/plugin-core";
7
+ import {
8
+ type ByteSource,
9
+ type IpaInstallInfo,
10
+ normalizeIosUdid,
11
+ readIpaInstallInfo,
12
+ } from "@hot-updater/protocol/native-artifact";
13
+
14
+ import {
15
+ NATIVE_BUILD_DOWNLOAD_TOKEN_PARAM,
16
+ NATIVE_BUILD_INSTALL_LINK_TTL_MS,
17
+ nativeBuildDownloadPath,
18
+ nativeBuildManifestPath,
19
+ } from "../native-builds";
20
+ import { listIosDevices } from "./iosDevices";
21
+ import {
22
+ issueNativeBuildDownloadLink,
23
+ type NativeBuildDownloadLinkResult,
24
+ refuseNativeBuildDownloadToken,
25
+ } from "./nativeBuildDownloadLink";
26
+ import { nativeBuildArtifactUrl } from "./nativeBuilds";
27
+ import { escapePlistText } from "./plistText";
28
+ import { publicConsoleBase } from "./publicConsoleBase";
29
+
30
+ const KiB = 1024;
31
+ const MiB = 1024 * KiB;
32
+ /**
33
+ * What one request asks for at least: a zip entry's local header and, for
34
+ * something the size of a profile, its data, so reading one takes one request.
35
+ */
36
+ const READ_AHEAD_BYTES = 64 * KiB;
37
+ /** How many requests' bytes stay at hand: the archive's tail, and its entries. */
38
+ const KEPT_BLOCKS = 4;
39
+ /** The most one IPA's reading downloads: a directory and a few small files. */
40
+ const MAX_BYTES = 16 * MiB;
41
+ /** The most requests one IPA's reading makes, past a dozen extensions' profiles. */
42
+ const MAX_REQUESTS = 24;
43
+ const REQUEST_TIMEOUT_MS = 15_000;
44
+
45
+ /** Why a remote artifact can't be read in parts. */
46
+ export class RangeSourceError extends Error {
47
+ override readonly name = "RangeSourceError";
48
+ }
49
+
50
+ /**
51
+ * The bytes of `url` by HTTP Range requests, without ever downloading the
52
+ * file: a server that answers a Range request with the whole file (200) is
53
+ * cut off at once, as is one that sends more than it was asked for. Reading
54
+ * stops at `MAX_BYTES` and `MAX_REQUESTS`.
55
+ */
56
+ export const httpRangeSource = ({
57
+ url,
58
+ size,
59
+ fetch = globalThis.fetch,
60
+ }: {
61
+ readonly url: string;
62
+ /** The artifact's length, as its build's row records it. */
63
+ readonly size: number;
64
+ readonly fetch?: typeof globalThis.fetch;
65
+ }): ByteSource => {
66
+ const blocks: { readonly start: number; readonly bytes: Uint8Array }[] = [];
67
+ let requests = 0;
68
+ let downloaded = 0;
69
+
70
+ const request = async (start: number, end: number): Promise<Uint8Array> => {
71
+ if (requests === MAX_REQUESTS) {
72
+ throw new RangeSourceError(
73
+ "Reading the artifact took too many requests.",
74
+ );
75
+ }
76
+ const length = end - start;
77
+ if (downloaded + length > MAX_BYTES) {
78
+ throw new RangeSourceError(
79
+ "Reading the artifact would download too much.",
80
+ );
81
+ }
82
+ requests += 1;
83
+ const response = await fetch(url, {
84
+ headers: {
85
+ range: `bytes=${start}-${end - 1}`,
86
+ "accept-encoding": "identity",
87
+ },
88
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
89
+ });
90
+ const contentRange = /^bytes (\d+)-(\d+)\/(\d+|\*)$/u.exec(
91
+ response.headers.get("content-range") ?? "",
92
+ );
93
+ if (
94
+ response.status !== 206 ||
95
+ Number(contentRange?.[1]) !== start ||
96
+ Number(contentRange?.[2]) !== end - 1 ||
97
+ (contentRange?.[3] !== "*" && Number(contentRange?.[3]) !== size) ||
98
+ response.body === null
99
+ ) {
100
+ await response.body?.cancel().catch(() => {});
101
+ throw new RangeSourceError(
102
+ `The storage answered ${response.status} to a Range request.`,
103
+ );
104
+ }
105
+ const bytes = new Uint8Array(length);
106
+ const reader = response.body.getReader();
107
+ let written = 0;
108
+ try {
109
+ for (;;) {
110
+ const { done, value } = await reader.read();
111
+ if (done) break;
112
+ if (written + value.byteLength > length) {
113
+ throw new RangeSourceError(
114
+ "The storage sent more than it was asked.",
115
+ );
116
+ }
117
+ bytes.set(value, written);
118
+ written += value.byteLength;
119
+ }
120
+ } finally {
121
+ await reader.cancel().catch(() => {});
122
+ }
123
+ if (written !== length) {
124
+ throw new RangeSourceError("The storage sent less than it was asked.");
125
+ }
126
+ downloaded += length;
127
+ return bytes;
128
+ };
129
+
130
+ return {
131
+ size,
132
+ async read(offset, length) {
133
+ const end = Math.min(size, offset + length);
134
+ if (offset >= end) return new Uint8Array(0);
135
+ for (const block of blocks) {
136
+ if (block.start <= offset && end <= block.start + block.bytes.length) {
137
+ return block.bytes.subarray(offset - block.start, end - block.start);
138
+ }
139
+ }
140
+ const blockEnd = Math.min(size, Math.max(end, offset + READ_AHEAD_BYTES));
141
+ const bytes = await request(offset, blockEnd);
142
+ blocks.push({ start: offset, bytes });
143
+ // The first block is the archive's tail, which holds its directory.
144
+ if (blocks.length > KEPT_BLOCKS) blocks.splice(1, 1);
145
+ return bytes.subarray(0, end - offset);
146
+ },
147
+ };
148
+ };
149
+
150
+ /**
151
+ * What an IPA in storage installs as, or null when that can't be read in parts:
152
+ * a storage with no HTTPS download URL, one that ignores Range requests, or an
153
+ * artifact that isn't what it should be. It reads only the storage, and never
154
+ * logs the URL, which may be signed.
155
+ */
156
+ export const readNativeBuildInstallInfo = async (
157
+ build: Pick<
158
+ NativeBuildRow,
159
+ "artifact_kind" | "artifact_storage_uri" | "byte_size"
160
+ >,
161
+ storage: StorageAdapter,
162
+ fetch: typeof globalThis.fetch = globalThis.fetch,
163
+ ): Promise<IpaInstallInfo | null> => {
164
+ if (build.artifact_kind !== "ipa") return null;
165
+ try {
166
+ const url = await nativeBuildArtifactUrl(build, storage);
167
+ if (url === null || new URL(url).protocol !== "https:") return null;
168
+ return await readIpaInstallInfo(
169
+ httpRangeSource({ url, size: build.byte_size, fetch }),
170
+ );
171
+ } catch (error) {
172
+ console.warn(
173
+ `Installation details unavailable: ${error instanceof Error ? error.message : String(error)}`,
174
+ );
175
+ return null;
176
+ }
177
+ };
178
+
179
+ export type NativeBuildInstallEligibility =
180
+ /** The IPA can't be read in parts, so nothing can be said or installed. */
181
+ | { readonly status: "unavailable" }
182
+ /** An App Store export, which installs through TestFlight only. */
183
+ | { readonly status: "store" }
184
+ | { readonly status: "expired"; readonly expiresAt: string }
185
+ | {
186
+ readonly status: "installable";
187
+ /** Whether the IPA lists the device: `unknown` without a UDID to look up. */
188
+ readonly device: "unknown" | "included" | "not-included";
189
+ /**
190
+ * The registry's row of a device the IPA doesn't list, or null when the
191
+ * registry doesn't know it: read only then.
192
+ */
193
+ readonly registry: IosDeviceRow | null;
194
+ /**
195
+ * A newer build of this app on this channel whose IPA lists the device,
196
+ * which `registry.build_id` names, or null. The row keeps one build per
197
+ * device, the newest of any ad hoc scheme the CLI checked, so the build
198
+ * it names may be a sandbox's or another app's.
199
+ */
200
+ readonly newerBuild: string | null;
201
+ /**
202
+ * Whether the viewer approves devices, which decides the next step under
203
+ * Apple's refusal: asked only when `registry` carries one, else false.
204
+ */
205
+ readonly canApprove: boolean;
206
+ readonly expiresAt: string | null;
207
+ /** The token of the Install button's manifest and download. */
208
+ readonly link: NativeBuildDownloadLinkResult;
209
+ };
210
+
211
+ const isExpired = ({ expiresAtMs }: IpaInstallInfo, now: number) =>
212
+ expiresAtMs !== null && expiresAtMs <= now;
213
+
214
+ /**
215
+ * The build a registered device's row names, when it is newer than `build`,
216
+ * of the same app (bundle ID, read from its IPA, and sandbox or not), on the
217
+ * same channel, ad hoc, unexpired, and its IPA lists the device; null
218
+ * otherwise, and for a build gone or unreadable. Its row is read only for a
219
+ * registered device whose row names a newer build, and its IPA only when the
220
+ * row matches.
221
+ */
222
+ const newerBuildListing = async (
223
+ build: NativeBuildRow,
224
+ info: IpaInstallInfo,
225
+ device: IosDeviceRow,
226
+ key: string,
227
+ {
228
+ core,
229
+ storage,
230
+ fetch,
231
+ now,
232
+ }: {
233
+ readonly core: Pick<HotUpdaterCoreApi, "getNativeBuild">;
234
+ readonly storage: StorageAdapter;
235
+ readonly fetch: typeof globalThis.fetch;
236
+ readonly now: number;
237
+ },
238
+ ): Promise<string | null> => {
239
+ const id = device.build_id;
240
+ if (device.status !== "registered" || id === null || id <= build.id) {
241
+ return null;
242
+ }
243
+ const newer = await core.getNativeBuild(id).catch(() => null);
244
+ if (
245
+ newer === null ||
246
+ newer.artifact_kind !== "ipa" ||
247
+ newer.platform !== build.platform ||
248
+ newer.channel_id !== build.channel_id ||
249
+ newer.is_sandbox !== build.is_sandbox ||
250
+ // Null on an IPA registered before it was recorded: its profile decides.
251
+ (newer.export_method !== null && newer.export_method !== "ad-hoc")
252
+ ) {
253
+ return null;
254
+ }
255
+ const listing = await readNativeBuildInstallInfo(newer, storage, fetch);
256
+ return listing !== null &&
257
+ listing.bundleId === info.bundleId &&
258
+ listing.distribution === "ad-hoc" &&
259
+ listing.devices.includes(key) &&
260
+ !isExpired(listing, now)
261
+ ? id
262
+ : null;
263
+ };
264
+
265
+ /**
266
+ * What an iPhone can do with a build, for a caller the Console already let in:
267
+ * one read of the build's row, and the IPA's few parts from storage. App Store
268
+ * Connect isn't asked, so this says what the IPA's bytes allow, which is what
269
+ * iOS enforces; registering a device changes nothing until a new IPA has it.
270
+ */
271
+ export const checkNativeBuildInstall = async (
272
+ id: string,
273
+ udid: string | undefined,
274
+ {
275
+ core,
276
+ storage,
277
+ }: {
278
+ readonly core: Pick<HotUpdaterCoreApi, "getNativeBuild" | "findIosDevice">;
279
+ readonly storage: StorageAdapter;
280
+ },
281
+ {
282
+ request,
283
+ now = Date.now(),
284
+ fetch = globalThis.fetch,
285
+ canApprove = async () => false,
286
+ }: {
287
+ readonly request?: Request;
288
+ readonly now?: number;
289
+ readonly fetch?: typeof globalThis.fetch;
290
+ /** Whether the viewer approves devices, asked only under Apple's refusal. */
291
+ readonly canApprove?: () => Promise<boolean>;
292
+ } = {},
293
+ ): Promise<NativeBuildInstallEligibility> => {
294
+ const build = await core.getNativeBuild(id);
295
+ if (build === null) return { status: "unavailable" };
296
+ const info = await readNativeBuildInstallInfo(build, storage, fetch);
297
+ if (info === null) return { status: "unavailable" };
298
+ if (info.distribution === "store") return { status: "store" };
299
+ const expiresAt =
300
+ info.expiresAtMs === null ? null : new Date(info.expiresAtMs).toISOString();
301
+ if (expiresAt !== null && isExpired(info, now)) {
302
+ return { status: "expired", expiresAt };
303
+ }
304
+ const key = udid === undefined ? null : normalizeIosUdid(udid);
305
+ const device =
306
+ key === null
307
+ ? "unknown"
308
+ : info.distribution === "enterprise" || info.devices.includes(key)
309
+ ? "included"
310
+ : "not-included";
311
+ const registry =
312
+ device === "not-included" && key !== null
313
+ ? await core.findIosDevice(key)
314
+ : null;
315
+ return {
316
+ status: "installable",
317
+ device,
318
+ registry,
319
+ newerBuild:
320
+ registry === null || key === null
321
+ ? null
322
+ : await newerBuildListing(build, info, registry, key, {
323
+ core,
324
+ storage,
325
+ fetch,
326
+ now,
327
+ }),
328
+ canApprove: registry?.apple_error == null ? false : await canApprove(),
329
+ expiresAt,
330
+ link: await issueNativeBuildDownloadLink(
331
+ id,
332
+ request,
333
+ now,
334
+ NATIVE_BUILD_INSTALL_LINK_TTL_MS,
335
+ ),
336
+ };
337
+ };
338
+
339
+ const installRefusal = (status: number, message: string) =>
340
+ new Response(message, {
341
+ status,
342
+ headers: {
343
+ "cache-control": "no-store",
344
+ "content-type": "text/plain; charset=utf-8",
345
+ },
346
+ });
347
+
348
+ /**
349
+ * The manifest iOS installs a build from, at `/_hot-updater/native-builds/
350
+ * <id>/manifest.plist?t=<download token>`. The installer has no session, so the
351
+ * token is all it answers to, and it is checked before anything is read. It
352
+ * mints nothing: the manifest's IPA URL carries the same token.
353
+ *
354
+ * - 403: no token, or one that isn't this build's, or has expired;
355
+ * - 404: no such build, or not an IPA;
356
+ * - 409: an IPA that can't install this way (App Store export, expired profile);
357
+ * - 503: the IPA can't be read in parts.
358
+ */
359
+ export const serveNativeBuildManifest = async (
360
+ request: Request,
361
+ id: string,
362
+ loadDeps: () => Promise<{
363
+ readonly core: Pick<HotUpdaterCoreApi, "getNativeBuild">;
364
+ readonly storage: StorageAdapter;
365
+ }>,
366
+ fetch: typeof globalThis.fetch = globalThis.fetch,
367
+ ): Promise<Response> => {
368
+ const token = new URL(request.url).searchParams.get(
369
+ NATIVE_BUILD_DOWNLOAD_TOKEN_PARAM,
370
+ );
371
+ if (token === null) {
372
+ return installRefusal(
373
+ 403,
374
+ "This install link isn't valid. Open the build's Console page for a new one.",
375
+ );
376
+ }
377
+ const refused = await refuseNativeBuildDownloadToken(request, id, token);
378
+ if (refused !== undefined) return refused;
379
+
380
+ const { core, storage } = await loadDeps();
381
+ const build = await core.getNativeBuild(id);
382
+ if (build === null || build.artifact_kind !== "ipa") {
383
+ return installRefusal(404, "This build has no IPA to install.");
384
+ }
385
+ const info = await readNativeBuildInstallInfo(build, storage, fetch);
386
+ if (info === null) {
387
+ return installRefusal(503, "Installation details unavailable.");
388
+ }
389
+ if (info.distribution === "store") {
390
+ return installRefusal(
391
+ 409,
392
+ "This IPA is an App Store export, which installs through TestFlight.",
393
+ );
394
+ }
395
+ if (isExpired(info, Date.now())) {
396
+ return installRefusal(
397
+ 409,
398
+ "This IPA's provisioning profile has expired. Rebuild it.",
399
+ );
400
+ }
401
+
402
+ const base = publicConsoleBase(request, nativeBuildManifestPath(id));
403
+ const ipaUrl = `${base}${nativeBuildDownloadPath(id)}?${NATIVE_BUILD_DOWNLOAD_TOKEN_PARAM}=${encodeURIComponent(token)}`;
404
+ const manifest = `<?xml version="1.0" encoding="UTF-8"?>
405
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
406
+ <plist version="1.0">
407
+ <dict>
408
+ <key>items</key>
409
+ <array>
410
+ <dict>
411
+ <key>assets</key>
412
+ <array>
413
+ <dict>
414
+ <key>kind</key>
415
+ <string>software-package</string>
416
+ <key>url</key>
417
+ <string>${escapePlistText(ipaUrl)}</string>
418
+ </dict>
419
+ </array>
420
+ <key>metadata</key>
421
+ <dict>
422
+ <key>bundle-identifier</key>
423
+ <string>${escapePlistText(info.bundleId)}</string>
424
+ <key>bundle-version</key>
425
+ <string>${escapePlistText(info.bundleVersion)}</string>
426
+ <key>kind</key>
427
+ <string>software</string>
428
+ <key>title</key>
429
+ <string>${escapePlistText(info.title)}</string>
430
+ </dict>
431
+ </dict>
432
+ </array>
433
+ </dict>
434
+ </plist>
435
+ `;
436
+ return new Response(manifest, {
437
+ headers: {
438
+ "cache-control": "private, no-store",
439
+ "content-type": "text/xml; charset=utf-8",
440
+ "referrer-policy": "no-referrer",
441
+ "x-content-type-options": "nosniff",
442
+ },
443
+ });
444
+ };
445
+
446
+ /** One device an ad hoc IPA lists, with the registry's name when it has one. */
447
+ export interface NativeBuildIpaDevice {
448
+ readonly udid: string;
449
+ readonly name: string | null;
450
+ }
451
+
452
+ export type NativeBuildIpaDevices =
453
+ /** The IPA can't be read in parts. */
454
+ | { readonly status: "unavailable" }
455
+ /** An App Store export or an enterprise build, which list no devices. */
456
+ | { readonly status: "store" | "enterprise" }
457
+ | { readonly status: "listed"; readonly devices: NativeBuildIpaDevice[] };
458
+
459
+ /**
460
+ * The devices an IPA's profile lists, read from storage as the install check
461
+ * reads it, each named by the device registry when it knows the UDID. The IPA
462
+ * decides: the registry only names what it lists. One build read, the IPA's
463
+ * few parts, and the registry a page at a time.
464
+ */
465
+ export const readNativeBuildIpaDevices = async (
466
+ id: string,
467
+ {
468
+ core,
469
+ storage,
470
+ }: {
471
+ readonly core: Pick<HotUpdaterCoreApi, "getNativeBuild" | "listIosDevices">;
472
+ readonly storage: StorageAdapter;
473
+ },
474
+ fetch: typeof globalThis.fetch = globalThis.fetch,
475
+ ): Promise<NativeBuildIpaDevices> => {
476
+ const build = await core.getNativeBuild(id);
477
+ if (build === null) return { status: "unavailable" };
478
+ const info = await readNativeBuildInstallInfo(build, storage, fetch);
479
+ if (info === null) return { status: "unavailable" };
480
+ if (info.distribution === "store" || info.distribution === "enterprise") {
481
+ return { status: info.distribution };
482
+ }
483
+ const names = new Map(
484
+ info.devices.length === 0
485
+ ? []
486
+ : (await listIosDevices(core)).map((row) => [row.udid, row.name]),
487
+ );
488
+ return {
489
+ status: "listed",
490
+ devices: info.devices.map((udid) => ({
491
+ udid,
492
+ name: names.get(udid) ?? null,
493
+ })),
494
+ };
495
+ };