@hot-updater/console 1.2.0-rc.12 → 1.2.0-rc.13

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 (210) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{-native-builds-search-C-TGpFAm.js → -native-builds-search-DC2PutLU.js} +1 -1
  3. package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-oMmbaqF6.js} +1 -1
  4. package/.output/public/assets/{EventDetails-Dl2RvPAk.js → EventDetails-ly7ygfdH.js} +1 -1
  5. package/.output/public/assets/{HashValueDisplay-6lNRxDJX.js → HashValueDisplay-BNoXZADg.js} +1 -1
  6. package/.output/public/assets/{InsightsPageHeader-DHhqY3DT.js → InsightsPageHeader-q2FgL8xS.js} +1 -1
  7. package/.output/public/assets/RolloutPercentageBadge-frllRncE.js +1 -0
  8. package/.output/public/assets/{StoreSubmission-ViTkW4eJ.js → StoreSubmission-D8BGGGgn.js} +1 -1
  9. package/.output/public/assets/api-BEEYDSCX.js +1 -0
  10. package/.output/public/assets/{api-keys-FueRkF9q.js → api-keys-B0N3SixL.js} +1 -1
  11. package/.output/public/assets/api-keys-DFAOfU4U.js +1 -0
  12. package/.output/public/assets/{index-DH9-mB8D.js → index-t0CToN0S.js} +3 -3
  13. package/.output/public/assets/insights-B0_8xNxr.js +1 -0
  14. package/.output/public/assets/{insights-B-0odqpt.js → insights-BbIzm_QG.js} +2 -2
  15. package/.output/public/assets/insights-BtmYg4vg.js +2 -0
  16. package/.output/public/assets/{insights-search-DghCbEnk.js → insights-search-B5cZsP6C.js} +1 -1
  17. package/.output/public/assets/{insights-usage-rpc-CKQH0pUS.js → insights-usage-rpc-zut_JaSS.js} +1 -1
  18. package/.output/public/assets/insights_.distribution-DLxq-IKU.js +1 -0
  19. package/.output/public/assets/insights_.distribution-izFBYfJL.js +2 -0
  20. package/.output/public/assets/{insights_.distribution-dvk6vYDM.js → insights_.distribution-rdeyNhH2.js} +1 -1
  21. package/.output/public/assets/{installations-B674P5Z5.js → installations-BRS-vuRJ.js} +2 -2
  22. package/.output/public/assets/installations-CWx7vYY5.js +1 -0
  23. package/.output/public/assets/{installations-BWxczZ2t.js → installations-Ce_dTa35.js} +1 -1
  24. package/.output/public/assets/native-builds-Br0onFRc.js +2 -0
  25. package/.output/public/assets/native-builds-CDYL3y0I.js +1 -0
  26. package/.output/public/assets/native-builds-DEWHul-_.js +1 -0
  27. package/.output/public/assets/native-builds_._buildId-D1XEPQ-V.js +1 -0
  28. package/.output/public/assets/native-builds_._buildId-x-uu1Vbr.js +2 -0
  29. package/.output/public/assets/{remote-config-B7ujqhLa.js → remote-config-Bw6sErCV.js} +3 -3
  30. package/.output/public/assets/{remote-config-WjpozBG5.js → remote-config-DQguWTMa.js} +1 -1
  31. package/.output/public/assets/remote-config-S3xj8r3x.js +1 -0
  32. package/.output/public/assets/{routes-CCD33Azv.js → routes-Dw8zgqXz.js} +2 -2
  33. package/.output/public/assets/routes-nKCEKnhh.js +1 -0
  34. package/.output/server/{__23tanstack-start-server-fn-resolver-C19x6erS.mjs → __23tanstack-start-server-fn-resolver-DI0OnlQe.mjs} +58 -46
  35. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
  36. package/.output/server/_libs/_.mjs +2 -0
  37. package/.output/server/_ssr/{-native-builds-search-CwNcoXf4.mjs → -native-builds-search-Cl8EZ0Ud.mjs} +2 -2
  38. package/.output/server/_ssr/{BundleIdDisplay-Bf-L37zf.mjs → BundleIdDisplay-SAvC-NlE.mjs} +2 -2
  39. package/.output/server/_ssr/{ConsoleFeatureUnavailable-iNGya64h.mjs → ConsoleFeatureUnavailable-BgHEoZ36.mjs} +6 -6
  40. package/.output/server/_ssr/{EventDetails-CZofL6Hn.mjs → EventDetails-VaS25yjE.mjs} +7 -7
  41. package/.output/server/_ssr/{HashValueDisplay-DC1TLS-8.mjs → HashValueDisplay-BGc-x_l8.mjs} +2 -2
  42. package/.output/server/_ssr/{InsightsPageHeader-sVotAhl0.mjs → InsightsPageHeader-gMuNJt-f.mjs} +7 -7
  43. package/.output/server/_ssr/{NotFoundPage-COb0erGp.mjs → NotFoundPage-DsRI-J4h.mjs} +2 -2
  44. package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-BsU0d0jN.mjs} +1 -1
  45. package/.output/server/_ssr/{RolloutPercentageBadge-BFBh0QWv.mjs → RolloutPercentageBadge-axz7VuIZ.mjs} +3 -3
  46. package/.output/server/_ssr/{StoreSubmission-Bvfq8pWk.mjs → StoreSubmission-BqXKtpqW.mjs} +5 -5
  47. package/.output/server/_ssr/{alert-dialog-C-Mck8_M.mjs → alert-dialog-lury59vV.mjs} +1 -1
  48. package/.output/server/_ssr/{api-oJajV-DG.mjs → api-BQ8ztUgU.mjs} +99 -22
  49. package/.output/server/_ssr/{api-keys-CcqDkOcC.mjs → api-keys-CHATVpa9.mjs} +2 -2
  50. package/.output/server/_ssr/{api-keys-B0L1sj-W.mjs → api-keys-DVChzF3r.mjs} +8 -8
  51. package/.output/server/_ssr/{api-keys-rpc-Do6Rbl0V.mjs → api-keys-rpc-DXPJTfdr.mjs} +4 -4
  52. package/.output/server/_ssr/{api-rpc-DE0zy7iY.mjs → api-rpc-BexxmTM9.mjs} +43 -18
  53. package/.output/server/_ssr/{auth-rpc-0I_10FKy.mjs → auth-rpc-BgNCvy2L.mjs} +5 -5
  54. package/.output/server/_ssr/{auth.server-cdIC1rxo.mjs → auth.server-43UW34Rd.mjs} +165 -149
  55. package/.output/server/_ssr/{badge-BZZCX8Wn.mjs → badge-BYB825vl.mjs} +1 -1
  56. package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-BGVvqWx7.mjs} +1 -1
  57. package/.output/server/_ssr/{config.server-CydWUX0c.mjs → config.server-QRTmD4Hf.mjs} +4 -4
  58. package/.output/server/_ssr/{console-access-y52SJdFn.mjs → console-access-E91fYTIB.mjs} +2 -2
  59. package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-CgdQJQlX.mjs} +1 -1
  60. package/.output/server/_ssr/{console-features-api-BDrXaElT.mjs → console-features-api-CLRjxvy2.mjs} +5 -5
  61. package/.output/server/_ssr/{console-features-rpc-C9kKIDeK.mjs → console-features-rpc-C2rJ0u6i.mjs} +4 -4
  62. package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
  63. package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-XAvDetmn.mjs} +1 -1
  64. package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
  65. package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BtRVBD0C.mjs} +3 -3
  66. package/.output/server/_ssr/{dialog-DKsDLcYQ.mjs → dialog-CcF1pxfR.mjs} +1 -1
  67. package/.output/server/_ssr/{dist-TEpM_UAD.mjs → dist-B6-irDRA.mjs} +1 -1
  68. package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-BX8ODCZT.mjs} +1 -1
  69. package/.output/server/_ssr/{empty-D-mnqnCP.mjs → empty-DkiJ7nWt.mjs} +2 -2
  70. package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
  71. package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-C_CmBF4x.mjs} +3 -3
  72. package/.output/server/_ssr/{field-Bbw5SS9L.mjs → field-CHlDI06h.mjs} +2 -2
  73. package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-BJTufthT.mjs} +2 -2
  74. package/.output/server/_ssr/{git-CTA8Aqr0.mjs → git-WSg7LY17.mjs} +2 -2
  75. package/.output/server/_ssr/{input-group-DXofNRNJ.mjs → input-group-BPZ4UtB5.mjs} +1 -1
  76. package/.output/server/_ssr/{insights-Dm2UdEf_.mjs → insights-B3YetvBK.mjs} +5 -5
  77. package/.output/server/_ssr/{insights-C7rhyg61.mjs → insights-CEABWFk4.mjs} +26 -26
  78. package/.output/server/_ssr/{insights-D6kIjZuE.mjs → insights-Dn32lJ18.mjs} +2 -2
  79. package/.output/server/_ssr/{insights-api-DNmt4PWL.mjs → insights-api-CYPf5853.mjs} +5 -5
  80. package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-Bz3sWNZm.mjs} +2 -2
  81. package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-DNQ9qVVf.mjs} +2 -2
  82. package/.output/server/_ssr/{insights-failures-rpc-DkrdYXJk.mjs → insights-failures-rpc-CxPpBR1K.mjs} +11 -11
  83. package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-DOkpqnQ8.mjs} +1 -1
  84. package/.output/server/_ssr/{insights-recovery-rpc-DWLnLF_s.mjs → insights-recovery-rpc-CwnQMTE3.mjs} +7 -7
  85. package/.output/server/_ssr/{insights-rpc-CdYYZ7lE.mjs → insights-rpc-CKd5ATFI.mjs} +4 -4
  86. package/.output/server/_ssr/{insights-search-HVXIz64-.mjs → insights-search-B_92_iEj.mjs} +4 -4
  87. package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-4KDIN3Kg.mjs} +1 -1
  88. package/.output/server/_ssr/{insights-usage-rpc-CLHS5JhI.mjs → insights-usage-rpc-D90uHpJJ.mjs} +7 -7
  89. package/.output/server/_ssr/{insights-usage-rpc-BCMRZErp.mjs → insights-usage-rpc-RIMNhPtj.mjs} +4 -4
  90. package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-DmQdJZqT.mjs} +3 -3
  91. package/.output/server/_ssr/{insights_.distribution-zbVsH0TU.mjs → insights_.distribution-D42mHSe0.mjs} +14 -14
  92. package/.output/server/_ssr/{insights_.distribution-3NzANTBS.mjs → insights_.distribution-D4QWsHNo.mjs} +5 -5
  93. package/.output/server/_ssr/{insights_.distribution-BTbT0Z4H.mjs → insights_.distribution-DwjIdjQi.mjs} +2 -2
  94. package/.output/server/_ssr/{installations-BsCupWHx.mjs → installations-BIu66J6Q.mjs} +2 -2
  95. package/.output/server/_ssr/{installations-3XOT2V1j.mjs → installations-CfmO_V_R.mjs} +4 -4
  96. package/.output/server/_ssr/{installations-CpjqEYh_.mjs → installations-DyzKzWuv.mjs} +11 -11
  97. package/.output/server/_ssr/{listReleases-D_GY00SQ.mjs → listReleases-CQEceg8j.mjs} +1 -1
  98. package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
  99. package/.output/server/_ssr/native-artifact-H1MDP0Jz.mjs +593 -0
  100. package/.output/server/_ssr/{native-builds-CehTsEwY.mjs → native-builds-BCp8ICrn.mjs} +3 -3
  101. package/.output/server/_ssr/{native-builds-vYKOMlhp.mjs → native-builds-CqFeXByK.mjs} +17 -13
  102. package/.output/server/_ssr/{native-builds-DhXL5zf_.mjs → native-builds-qj346atQ.mjs} +49 -12
  103. package/.output/server/_ssr/{native-builds_._buildId-BHxp9NcZ.mjs → native-builds_._buildId-BAxkkEFo.mjs} +600 -168
  104. package/.output/server/_ssr/{native-builds_._buildId-euhJ0EI7.mjs → native-builds_._buildId-C8gsW-Rh.mjs} +3 -3
  105. package/.output/server/_ssr/nativeBuildDevice-nU480p5A.mjs +230 -0
  106. package/.output/server/_ssr/nativeBuildDownloadLink-c3tcq3G5.mjs +96 -0
  107. package/.output/server/_ssr/nativeBuildInstall-B-_lHDsS.mjs +203 -0
  108. package/.output/server/_ssr/nativeBuildQr-C5AFtpmE.mjs +115 -0
  109. package/.output/server/_ssr/{nativeBuilds-B_7BPjt_.mjs → nativeBuilds-CbxOJDhO.mjs} +61 -29
  110. package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-CX7wutet.mjs} +6 -6
  111. package/.output/server/_ssr/publicConsoleBase-3IHSHvqd.mjs +27 -0
  112. package/.output/server/_ssr/{qr-code-C7kNRIDX.mjs → qr-code-pENFuyy9.mjs} +1 -1
  113. package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-C7sUFDwa.mjs} +2 -2
  114. package/.output/server/_ssr/{release-adoption-rpc-BF8svHjV.mjs → release-adoption-rpc-BBwJO2hu.mjs} +9 -9
  115. package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-LLYlRnUB.mjs} +4 -4
  116. package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-D9dAMI17.mjs} +3 -3
  117. package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-EPhok_Py.mjs} +1 -1
  118. package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-DaZ7ifUF.mjs} +2 -2
  119. package/.output/server/_ssr/{remote-config-Bn-BZgDt.mjs → remote-config-B1g7vrQD.mjs} +2 -2
  120. package/.output/server/_ssr/{remote-config-ofOYh91b.mjs → remote-config-BDijmvj1.mjs} +2 -2
  121. package/.output/server/_ssr/{remote-config-DdukdePk.mjs → remote-config-DjeXVIcr.mjs} +18 -18
  122. package/.output/server/_ssr/{remote-config-rpc-CzSU_Gwg.mjs → remote-config-rpc-B7bzKw4N.mjs} +5 -5
  123. package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
  124. package/.output/server/_ssr/{router-BQikCEhb.mjs → router-DhxgFNWn.mjs} +101 -50
  125. package/.output/server/_ssr/{routes-Brx45XtQ.mjs → routes-BC-rBuu_.mjs} +25 -25
  126. package/.output/server/_ssr/{routes-CTo-A_dj.mjs → routes-BDriEBtF.mjs} +12 -12
  127. package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-BsTTLV-B.mjs} +4 -4
  128. package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-3oDJJFWa.mjs} +1 -1
  129. package/.output/server/_ssr/{schema-migration-rpc-BcwNAFZJ.mjs → schema-migration-rpc-CNMqY0RE.mjs} +4 -4
  130. package/.output/server/_ssr/{select-Dk_Yv0IG.mjs → select-hFD2e3Bh.mjs} +1 -1
  131. package/.output/server/_ssr/{server-b1jUGuT2.mjs → server-D_hG9iIq.mjs} +6 -6
  132. package/.output/server/_ssr/{sidebar-CsRdKfb2.mjs → sidebar-Dmq4j1qr.mjs} +2 -2
  133. package/.output/server/_ssr/ssr.mjs +1 -1
  134. package/.output/server/_ssr/{start-BvDsQehg.mjs → start-RjhaPVFE.mjs} +2 -2
  135. package/.output/server/_ssr/{switch-DpYvZqIf.mjs → switch-CkNsEp9k.mjs} +2 -2
  136. package/.output/server/_ssr/{table-BAP-tdNn.mjs → table-CTtXogFJ.mjs} +1 -1
  137. package/.output/server/_ssr/{tabs-DGN9JEGV.mjs → tabs-BTKDM4AJ.mjs} +2 -2
  138. package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-DPYzv9bE.mjs} +3 -3
  139. package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-CmHbryZT.mjs} +2 -2
  140. package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-NmbU0MD2.mjs} +1 -1
  141. package/.output/server/_tanstack-start-manifest_v-BuGAtKIu.mjs +189 -0
  142. package/.output/server/index.mjs +275 -275
  143. package/package.json +7 -7
  144. package/src/components/features/native-builds/BuiltInBundleCard.tsx +82 -33
  145. package/src/components/features/native-builds/InstallCard.tsx +246 -46
  146. package/src/components/features/native-builds/IosInstall.tsx +300 -0
  147. package/src/components/features/native-builds/NativeBuildsTable.tsx +3 -0
  148. package/src/components/features/native-builds/PatchesCard.tsx +3 -2
  149. package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +4 -4
  150. package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
  151. package/src/components/features/native-builds/StoreSubmission.tsx +1 -1
  152. package/src/lib/api-rpc.ts +55 -6
  153. package/src/lib/api.ts +85 -12
  154. package/src/lib/native-builds.ts +73 -11
  155. package/src/lib/server/local-console.ts +1 -1
  156. package/src/lib/server/nativeBuildDevice.ts +274 -0
  157. package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
  158. package/src/lib/server/nativeBuildInstall.ts +355 -0
  159. package/src/lib/server/nativeBuildQr.ts +114 -24
  160. package/src/lib/server/nativeBuilds.ts +87 -33
  161. package/src/lib/server/plistText.ts +17 -0
  162. package/src/lib/server/publicConsoleBase.ts +17 -0
  163. package/src/routeTree.gen.ts +114 -0
  164. package/src/routes/[_]hot-updater/native-builds/$buildId/device-response.ts +17 -0
  165. package/src/routes/[_]hot-updater/native-builds/$buildId/device.ts +17 -0
  166. package/src/routes/[_]hot-updater/native-builds/$buildId/device[.]mobileconfig.ts +17 -0
  167. package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
  168. package/src/routes/[_]hot-updater/native-builds/preview-qr.ts +14 -0
  169. package/src/routes/api/native-builds/$buildId/download.ts +22 -1
  170. package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
  171. package/.output/public/assets/api-P2g8dCNg.js +0 -1
  172. package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
  173. package/.output/public/assets/insights-BSVGfxSL.js +0 -1
  174. package/.output/public/assets/insights-NK5B6ReS.js +0 -2
  175. package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
  176. package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
  177. package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
  178. package/.output/public/assets/native-builds-BGgFQTDW.js +0 -2
  179. package/.output/public/assets/native-builds-BOC71grI.js +0 -1
  180. package/.output/public/assets/native-builds-CxomzFqe.js +0 -1
  181. package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
  182. package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
  183. package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
  184. package/.output/public/assets/routes-BDdBIxYS.js +0 -1
  185. package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
  186. package/.output/server/_tanstack-start-manifest_v-uhJWytDm.mjs +0 -184
  187. /package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-fiaucvsO.js} +0 -0
  188. /package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-DCTtCP5t.js} +0 -0
  189. /package/.output/public/assets/{alert-dialog-BqYScr9y.js → alert-dialog-Z_RNBrFc.js} +0 -0
  190. /package/.output/public/assets/{badge-DWFcDWho.js → badge-UNnTz4Dl.js} +0 -0
  191. /package/.output/public/assets/{dialog-CNUPxNxH.js → dialog-C2U9bINi.js} +0 -0
  192. /package/.output/public/assets/{dist-CPlO6ko9.js → dist-UQUhRoJi.js} +0 -0
  193. /package/.output/public/assets/{empty-B3Uwdd6k.js → empty-PAp07lsC.js} +0 -0
  194. /package/.output/public/assets/{field-D-2-mnNh.js → field-DhKRWFG5.js} +0 -0
  195. /package/.output/public/assets/{history-DqHlgSuV.js → history-DakJoeSM.js} +0 -0
  196. /package/.output/public/assets/{input-group-D3OUBk4n.js → input-group-BJfBVqeI.js} +0 -0
  197. /package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-DzBe6DHr.js} +0 -0
  198. /package/.output/public/assets/{list--NIee1FZ.js → list-B6GeoQ_b.js} +0 -0
  199. /package/.output/public/assets/{plus-BReVKct-.js → plus-BVhOauU3.js} +0 -0
  200. /package/.output/public/assets/{refresh-cw-B9HHjLej.js → refresh-cw-C6svDMfM.js} +0 -0
  201. /package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-BscR0TsX.js} +0 -0
  202. /package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-CxFW64IG.js} +0 -0
  203. /package/.output/public/assets/{search-BCel4Oy6.js → search-bIYGuFCt.js} +0 -0
  204. /package/.output/public/assets/{smartphone-CMaSy_ir.js → smartphone-Bn5FtEwt.js} +0 -0
  205. /package/.output/public/assets/{switch-BpdiHL_t.js → switch-DtUu1RCw.js} +0 -0
  206. /package/.output/public/assets/{table-Bpy3SvSo.js → table-B22H8-RL.js} +0 -0
  207. /package/.output/public/assets/{tabs-Xmt7tZeG.js → tabs-Fgz3sA51.js} +0 -0
  208. /package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-7gOxArtb.js} +0 -0
  209. /package/.output/public/assets/{uuidv7-zXMtwR9Q.js → uuidv7-BLyD3pAM.js} +0 -0
  210. /package/.output/public/assets/{valueToPercent-BLwGy_xK.js → valueToPercent-DRLgSP0P.js} +0 -0
@@ -1,14 +1,14 @@
1
- import { n as DatabaseBundleNotFoundError, r as DatabaseRowReferencedError } from "./databaseJsonValue-kS7cvEtz.mjs";
2
- import { O as parseReleaseCatalogScopeKey, a as RELEASE_CATALOG_FALLBACK_POLICY, c as createReleaseCatalogScopeKey, d as getAssetBaseStorageUri, f as getBundlePatch, h as getManifestStorageUri, l as decodeChannelKey, m as getManifestFileHash, r as NIL_UUID, s as canonicalizeAppVersion, u as encodeChannelKey, w as isUUIDv7 } from "./dist-TEpM_UAD.mjs";
3
- import { i as rowToBundle, n as bundleToRow, r as releaseRowToRelease, t as bundleToPatchRows } from "./databaseRows-B6H8Cmgq.mjs";
4
- import { t as ReleaseManagementError } from "./releaseManagement-DHUux2az.mjs";
5
- import { n as createUUIDv7After, t as createUUIDv7 } from "./uuidv7-BIF4nb_q.mjs";
6
- import { i as normalizeRange } from "./version-CQ98ZBpL-CWSkTT9J.mjs";
7
- import { n as projectCompiledCatalog, r as projectCompiledRollbackCatalog, t as compileReleaseCatalog } from "./releaseCatalogCompiler-DLcean2k.mjs";
8
- import { t as isRemoteDatabase } from "./databaseConfig-B_Bg7qS5.mjs";
9
- import { n as defineTable, t as defineAggregate } from "./schema-ChlRtZIo.mjs";
1
+ import { n as DatabaseBundleNotFoundError, r as DatabaseRowReferencedError } from "./databaseJsonValue-DuUoft8j.mjs";
2
+ import { O as parseReleaseCatalogScopeKey, a as RELEASE_CATALOG_FALLBACK_POLICY, c as createReleaseCatalogScopeKey, d as getAssetBaseStorageUri, f as getBundlePatch, h as getManifestStorageUri, l as decodeChannelKey, m as getManifestFileHash, r as NIL_UUID, s as canonicalizeAppVersion, u as encodeChannelKey, w as isUUIDv7 } from "./dist-B6-irDRA.mjs";
3
+ import { i as rowToBundle, n as bundleToRow, r as releaseRowToRelease, t as bundleToPatchRows } from "./databaseRows-BtRVBD0C.mjs";
4
+ import { t as ReleaseManagementError } from "./releaseManagement-EPhok_Py.mjs";
5
+ import { n as createUUIDv7After, t as createUUIDv7 } from "./uuidv7-CmHbryZT.mjs";
6
+ import { i as normalizeRange } from "./version-CQ98ZBpL-NmbU0MD2.mjs";
7
+ import { n as projectCompiledCatalog, r as projectCompiledRollbackCatalog, t as compileReleaseCatalog } from "./releaseCatalogCompiler-D9dAMI17.mjs";
8
+ import { t as isRemoteDatabase } from "./databaseConfig-XAvDetmn.mjs";
9
+ import { n as defineTable, t as defineAggregate } from "./schema-3oDJJFWa.mjs";
10
10
  import { r as rangesIntersect } from "../_libs/verkit.mjs";
11
- //#region node_modules/.nitro/vite/services/ssr/assets/auth.server-cdIC1rxo.js
11
+ //#region node_modules/.nitro/vite/services/ssr/assets/auth.server-43UW34Rd.js
12
12
  var SHA256_FILE_HASH_RE = /^[0-9a-f]{64}$/;
13
13
  var isContentAddressedAssetFileHash = (value) => {
14
14
  return typeof value === "string" && SHA256_FILE_HASH_RE.test(value);
@@ -1007,6 +1007,10 @@ var channels = defineTable({
1007
1007
  * or `versionCode`. `submitted_to`, `submitted_at_ms` and
1008
1008
  * `submitted_version` record the store track a build went to, when, and
1009
1009
  * the store's label of the build; they stay null for a build no store took.
1010
+ * `store_build` is true on the build a person or a job says the store sells,
1011
+ * and null on every other: deploys patch from it over the scope's newest build.
1012
+ * It is never false, so `byStoreBuild` holds one entry per scope at most, on
1013
+ * every store, and an unmarked row, older than the column or not, holds none.
1010
1014
  */
1011
1015
  var nativeBuilds = defineTable({
1012
1016
  id: {
@@ -1083,6 +1087,10 @@ var nativeBuilds = defineTable({
1083
1087
  type: "string",
1084
1088
  maxLength: 255,
1085
1089
  required: false
1090
+ },
1091
+ store_build: {
1092
+ type: "boolean",
1093
+ required: false
1086
1094
  }
1087
1095
  }, {
1088
1096
  key: ["id"],
@@ -1095,6 +1103,11 @@ var nativeBuilds = defineTable({
1095
1103
  eq: ["scope_key", "build_key"],
1096
1104
  sort: ["id"]
1097
1105
  },
1106
+ byStoreBuild: {
1107
+ eq: ["scope_key", "store_build"],
1108
+ sort: [],
1109
+ unique: true
1110
+ },
1098
1111
  byChannel: {
1099
1112
  eq: ["channel_id"],
1100
1113
  sort: ["id"],
@@ -1286,15 +1299,8 @@ var LEASE_TABLE = "aggregate_lease";
1286
1299
  var LEASE = { id: "compaction" };
1287
1300
  /** How long a compaction holds the lease before another process may take it. */
1288
1301
  var LEASE_MS = 3e4;
1289
- /**
1290
- * Default windows: log mode compacts every 60 seconds, since reads compact
1291
- * first; memory mode flushes every 15, since its window is what a crash
1292
- * loses.
1293
- */
1294
- var WINDOW_MS = {
1295
- log: 6e4,
1296
- memory: 15e3
1297
- };
1302
+ /** A commit compacts once this has passed since the last compaction. */
1303
+ var WINDOW_MS = 6e4;
1298
1304
  /** Log rows a compaction reads from each log table for one group. */
1299
1305
  var LOG_PAGE = 200;
1300
1306
  /**
@@ -1308,8 +1314,6 @@ var GROUPS = {
1308
1314
  };
1309
1315
  /** Tries per write after a conflict or a transient error. */
1310
1316
  var ATTEMPTS = 5;
1311
- /** Aggregate rows a memory buffer holds before a commit waits for a flush. */
1312
- var MAX_BUFFERED = 1e4;
1313
1317
  var log = defineTable({
1314
1318
  id: {
1315
1319
  type: "string",
@@ -1358,7 +1362,7 @@ var valuesOf = ({ deltas, sketches }) => ({
1358
1362
  /**
1359
1363
  * Merges `values` into the change for `key`'s identity as `tx.aggregate`
1360
1364
  * does: deltas add up and sketches merge. One constant `shardBy` keys each
1361
- * identity to one entry; the write picks the shard.
1365
+ * identity to one entry; `compile` writes it to shard 0.
1362
1366
  */
1363
1367
  var merge = (into, model, key, values) => recordAggregate(into, model, Object.fromEntries(shapeOf(model).key.map((field, at) => [field, key[at]])), values, "");
1364
1368
  var mergeAll = (into, changes) => {
@@ -1392,7 +1396,7 @@ var increment = ({ model, deltas }, key) => Object.values(deltas).some((delta) =
1392
1396
  /**
1393
1397
  * The guarded write that merges `change` into `current`: insert, patch, or
1394
1398
  * delete at zero. Unlike a transaction's, a gauge may go below zero here: a
1395
- * shard row holds one writer's net changes, and reads sum every shard.
1399
+ * group can hold a loss without the gain before it, and reads sum every shard.
1396
1400
  */
1397
1401
  var rewrite = (change, key, current) => {
1398
1402
  const { model } = change;
@@ -1430,12 +1434,12 @@ var rewrite = (change, key, current) => {
1430
1434
  };
1431
1435
  };
1432
1436
  /**
1433
- * The write for each change on its shard: a blind increment that creates
1434
- * the row for counters, and a guarded rewrite for gauges and sketches, whose
1435
- * rows are read in one batch per table.
1437
+ * The write for each change on shard 0, since one compaction runs at a time:
1438
+ * a blind increment that creates the row for counters, and a guarded rewrite
1439
+ * for gauges and sketches, whose rows are read in one batch per table.
1436
1440
  */
1437
- var compile = async (adapter, changes, shard) => {
1438
- const keys = changes.map(({ model, key }) => [...key.slice(0, -1), shard(model)]);
1441
+ var compile = async (adapter, changes) => {
1442
+ const keys = changes.map(({ key }) => [...key.slice(0, -1), 0]);
1439
1443
  const reads = /* @__PURE__ */ new Map();
1440
1444
  changes.forEach((change, at) => {
1441
1445
  if (rewrites(change)) reads.set(change.model, [...reads.get(change.model) ?? [], at]);
@@ -1489,14 +1493,13 @@ var encode = async (changes) => {
1489
1493
  return zipped !== void 0 && zipped.length < json.length ? `z${zipped}` : json;
1490
1494
  };
1491
1495
  /**
1492
- * Batches changes to aggregates declared `batched`. A transaction records
1493
- * them without writing their rows; once it commits, "memory" mode keeps
1494
- * them in this process until its timer flushes them, and "log" mode has
1495
- * written them as one log row in the same atomic write, which a compaction
1496
- * later merges into the aggregates and deletes, atomically again, so each
1497
- * applies exactly once. One lease row keeps compactions one at a time.
1496
+ * Batches changes to aggregates declared `batched`. A transaction writes
1497
+ * them as one log row in its own atomic write, in place of their rows; a
1498
+ * compaction later merges log rows into the aggregates and deletes them,
1499
+ * atomically again, so each applies exactly once. One lease row keeps
1500
+ * compactions one at a time.
1498
1501
  */
1499
- var createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "log", windowMs = WINDOW_MS[mode] }, now }) => {
1502
+ var createAggregateBatches = ({ engine, adapter, schema, batching: { windowMs = WINDOW_MS }, now }) => {
1500
1503
  if (!schema.models.has(LEASE_TABLE)) throw new DatabaseTransactionError("An engine that batches aggregates needs aggregateBatchingModule in its schema.");
1501
1504
  const holder = crypto.randomUUID().replaceAll("-", "");
1502
1505
  const table = (name) => schema.models.get(name).table;
@@ -1524,68 +1527,6 @@ var createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "log
1524
1527
  }
1525
1528
  return changes;
1526
1529
  };
1527
- /**
1528
- * Writes changes in atomic chunks within `fits`, and returns the ones it
1529
- * could not apply. A write whose outcome is unknown is dropped, never
1530
- * resent, so no change applies twice.
1531
- */
1532
- const apply = async (changes, shard) => {
1533
- let rest = changes;
1534
- let ops = [];
1535
- let read = true;
1536
- for (let failures = 0; rest.length > 0 && failures < ATTEMPTS;) try {
1537
- if (read) ops = await compile(adapter, rest, shard);
1538
- let size = rest.length;
1539
- const chunk = () => ops.slice(0, size).filter(isOp);
1540
- while (size > 1 && !adapter.fits(chunk())) size = Math.ceil(size / 2);
1541
- let result = { ok: true };
1542
- if (chunk().length > 0) result = await adapter.write(chunk()).catch((error) => {
1543
- warn("flush")(error);
1544
- return { ok: true };
1545
- });
1546
- read = !result.ok && !("retry" in result);
1547
- if (result.ok) {
1548
- rest = rest.slice(size);
1549
- ops = ops.slice(size);
1550
- failures = 0;
1551
- } else {
1552
- failures += 1;
1553
- if (!read) await sleep(failures);
1554
- }
1555
- } catch (error) {
1556
- warn("flush")(error);
1557
- return rest;
1558
- }
1559
- return rest;
1560
- };
1561
- let buffer = /* @__PURE__ */ new Map();
1562
- let timer;
1563
- let flushing;
1564
- const shards = /* @__PURE__ */ new Map();
1565
- /** Each process writes its own shard, so flushes of two processes rarely meet. */
1566
- const processShard = (model) => {
1567
- if (!shards.has(model)) shards.set(model, Math.floor(Math.random() * shapeOf(model).shards));
1568
- return shards.get(model);
1569
- };
1570
- const schedule = () => {
1571
- if (timer !== void 0 || buffer.size === 0) return;
1572
- timer = setTimeout(() => {
1573
- timer = void 0;
1574
- flushBuffer();
1575
- }, windowMs);
1576
- timer.unref?.();
1577
- };
1578
- /** Never rejects: what it cannot apply goes back into the buffer. */
1579
- const flushBuffer = () => flushing ??= (async () => {
1580
- clearTimeout(timer);
1581
- timer = void 0;
1582
- const pending = [...buffer.values()];
1583
- buffer = /* @__PURE__ */ new Map();
1584
- mergeAll(buffer, await apply(pending, processShard));
1585
- })().catch(warn("flush")).finally(() => {
1586
- flushing = void 0;
1587
- schedule();
1588
- });
1589
1530
  let nextDue = 0;
1590
1531
  let compacting;
1591
1532
  /** Log rows this process read, by `[log table's index, id]`, for the deletes after a group. */
@@ -1720,7 +1661,7 @@ var createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "log
1720
1661
  more
1721
1662
  };
1722
1663
  };
1723
- const rowsFor = async (changes) => (await compile(adapter, changes, () => 0)).filter(isOp);
1664
+ const rowsFor = async (changes) => (await compile(adapter, changes)).filter(isOp);
1724
1665
  /**
1725
1666
  * Applies the oldest pending log rows whose merged changes fit in one
1726
1667
  * atomic write with the lease, which lists them as applied; the rows are
@@ -1814,20 +1755,6 @@ var createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "log
1814
1755
  }))).then((pages) => pages.some((page) => page.rows.length > 0)).finally(() => {
1815
1756
  checking = void 0;
1816
1757
  });
1817
- /** Takes a committed transaction's changes; never rejects, since the transaction already committed. */
1818
- const committed = async (changes) => {
1819
- if (mode === "log") {
1820
- if (now() >= nextDue) await compact(false, GROUPS.commit);
1821
- return;
1822
- }
1823
- mergeAll(buffer, changes.values());
1824
- schedule();
1825
- if (buffer.size >= MAX_BUFFERED) await flushBuffer();
1826
- };
1827
- const flush = async () => {
1828
- await flushBuffer();
1829
- if (mode === "log" && await hasPending()) await compact(true, GROUPS.flush);
1830
- };
1831
1758
  return {
1832
1759
  async transaction(fn) {
1833
1760
  let changes = /* @__PURE__ */ new Map();
@@ -1853,7 +1780,7 @@ var createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "log
1853
1780
  aggregate
1854
1781
  });
1855
1782
  if (failure) throw failure.error;
1856
- if (mode === "log" && attempt.size > 0) {
1783
+ if (attempt.size > 0) {
1857
1784
  const id = `${now().toString(36).padStart(9, "0")}${holder.slice(0, 8)}${crypto.randomUUID().slice(0, 8)}`;
1858
1785
  const shard = Math.floor(Math.random() * LOG_TABLES.length);
1859
1786
  const merged = mergeAll(/* @__PURE__ */ new Map(), attempt.values());
@@ -1867,24 +1794,18 @@ var createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "log
1867
1794
  open = false;
1868
1795
  }
1869
1796
  });
1870
- if (changes.size > 0) await committed(changes);
1797
+ if (changes.size > 0 && now() >= nextDue) await compact(false, GROUPS.commit);
1871
1798
  return result;
1872
1799
  },
1873
1800
  async beforeRead(name) {
1874
1801
  if (!isBatched(schema.models.get(name))) return;
1875
- if (buffer.size > 0 || flushing !== void 0) await flushBuffer();
1876
- if (mode === "log") {
1877
- if (await hasPending().catch((error) => {
1878
- warn("read")(error);
1879
- return false;
1880
- })) await compact(true, GROUPS.read);
1881
- }
1802
+ if (await hasPending().catch((error) => {
1803
+ warn("read")(error);
1804
+ return false;
1805
+ })) await compact(true, GROUPS.read);
1882
1806
  },
1883
- flush,
1884
- async dispose() {
1885
- clearTimeout(timer);
1886
- timer = void 0;
1887
- await flush();
1807
+ async flush() {
1808
+ if (await hasPending()) await compact(true, GROUPS.flush);
1888
1809
  }
1889
1810
  };
1890
1811
  };
@@ -2801,9 +2722,6 @@ var createDatabaseEngine = ({ batching, now = Date.now, meter, ...options }) =>
2801
2722
  flush: async () => {
2802
2723
  await batches?.flush();
2803
2724
  },
2804
- dispose: async () => {
2805
- await batches?.dispose();
2806
- },
2807
2725
  database(module) {
2808
2726
  const name = (model) => module.namespace ? `${module.namespace}_${model}` : model;
2809
2727
  return {
@@ -2882,11 +2800,10 @@ var createEngine = (database, { plugins = [], now = Date.now } = {}) => {
2882
2800
  if (module === void 0) throw new HotUpdaterConfigError(`Plugin "${plugin.id}" is not one of this engine's plugins.`);
2883
2801
  return engine.database(module);
2884
2802
  },
2885
- flush: () => engine.flush(),
2886
- dispose: () => engine.dispose()
2803
+ flush: () => engine.flush()
2887
2804
  };
2888
2805
  };
2889
- var HOT_UPDATER_SERVER_VERSION = "1.2.0-rc.12";
2806
+ var HOT_UPDATER_SERVER_VERSION = "1.2.0-rc.13";
2890
2807
  /**
2891
2808
  * `/version` on both mounts. The admin mount also lists the ids of the
2892
2809
  * plugins the server runs, sorted; apps never learn which plugins a server
@@ -3717,8 +3634,22 @@ var pick = (row) => ({
3717
3634
  build_number: row.build_number ?? null,
3718
3635
  submitted_to: row.submitted_to ?? null,
3719
3636
  submitted_at_ms: row.submitted_at_ms ?? null,
3720
- submitted_version: row.submitted_version ?? null
3637
+ submitted_version: row.submitted_version ?? null,
3638
+ store_build: row.store_build === true ? true : null
3721
3639
  });
3640
+ /**
3641
+ * The channels only sandbox builds register on, which no store sells: the
3642
+ * registry's convention, as `@hot-updater/protocol/native-artifact` checks it
3643
+ * for a build's artifact.
3644
+ */
3645
+ var SANDBOX_CHANNEL_PREFIX = "sandbox-";
3646
+ /**
3647
+ * How many older builds of a scope one read takes, looking for one older than
3648
+ * a bundle when a build made after the bundle is the newest.
3649
+ */
3650
+ var OLDER_BUILDS_PAGE = 20;
3651
+ /** How many times a mark runs again after losing its scope's mark to another. */
3652
+ var MARK_ATTEMPTS = 8;
3722
3653
  /** The store track each platform's builds are submitted to. */
3723
3654
  var SUBMISSION_DESTINATIONS = {
3724
3655
  android: "play-internal",
@@ -3795,7 +3726,8 @@ var createNativeBuildApi = (db, { now = Date.now } = {}) => ({
3795
3726
  build_number: registration.buildNumber ?? null,
3796
3727
  submitted_to: null,
3797
3728
  submitted_at_ms: null,
3798
- submitted_version: null
3729
+ submitted_version: null,
3730
+ store_build: null
3799
3731
  };
3800
3732
  for (let attempt = 1;; attempt += 1) {
3801
3733
  await insertChannel(db, {
@@ -3833,21 +3765,45 @@ var createNativeBuildApi = (db, { now = Date.now } = {}) => ({
3833
3765
  const scopeKey = nativeBuildScopeKey(scope);
3834
3766
  const buildKey = options?.buildKey;
3835
3767
  if (buildKey !== void 0 && !BUILD_KEY.test(buildKey)) throw new NativeBuildInputError("Invalid native build key: it must be nbk1: and a SHA-256.");
3836
- const { rows } = buildKey === void 0 ? await db.findMany("native_builds", {
3837
- index: "byScope",
3838
- where: { scope_key: scopeKey },
3839
- order: "desc",
3840
- limit: 1
3841
- }) : await db.findMany("native_builds", {
3842
- index: "byBuildKey",
3843
- where: {
3768
+ if (options?.storeBuild) {
3769
+ const marked = await db.findOne("native_builds", {
3844
3770
  scope_key: scopeKey,
3845
- build_key: buildKey
3846
- },
3847
- order: "desc",
3848
- limit: 1
3849
- });
3850
- return rows[0] === void 0 ? null : pick(rows[0]);
3771
+ store_build: true
3772
+ });
3773
+ return marked === null ? null : pick(marked);
3774
+ }
3775
+ const read = (limit, before) => {
3776
+ const page = {
3777
+ order: "desc",
3778
+ limit,
3779
+ ...before === void 0 ? {} : { range: { lt: before } }
3780
+ };
3781
+ return buildKey === void 0 ? db.findMany("native_builds", {
3782
+ index: "byScope",
3783
+ where: { scope_key: scopeKey },
3784
+ ...page
3785
+ }) : db.findMany("native_builds", {
3786
+ index: "byBuildKey",
3787
+ where: {
3788
+ scope_key: scopeKey,
3789
+ build_key: buildKey
3790
+ },
3791
+ ...page
3792
+ });
3793
+ };
3794
+ const { rows } = await read(1);
3795
+ const newest = rows[0];
3796
+ if (newest === void 0) return null;
3797
+ const bundleId = options?.builtInOlderThan;
3798
+ if (bundleId === void 0 || newest.min_bundle_id < bundleId) return pick(newest);
3799
+ for (let before = newest.id;;) {
3800
+ const { rows: older } = await read(OLDER_BUILDS_PAGE, before);
3801
+ const usable = older.find(({ min_bundle_id }) => min_bundle_id < bundleId);
3802
+ if (usable !== void 0) return pick(usable);
3803
+ const last = older.at(-1);
3804
+ if (older.length < OLDER_BUILDS_PAGE || last === void 0) return null;
3805
+ before = last.id;
3806
+ }
3851
3807
  },
3852
3808
  async recordNativeBuildSubmission(id, { destination, version }) {
3853
3809
  if (version.trim().length === 0 || version.length > SUBMITTED_VERSION_MAX_LENGTH) throw new NativeBuildInputError(`Invalid native build submission: version must be the store's label of the build, up to ${SUBMITTED_VERSION_MAX_LENGTH} characters.`);
@@ -3868,6 +3824,49 @@ var createNativeBuildApi = (db, { now = Date.now } = {}) => ({
3868
3824
  };
3869
3825
  });
3870
3826
  },
3827
+ async markNativeBuild(id, { storeBuild }) {
3828
+ for (let attempt = 1;; attempt += 1) try {
3829
+ return await db.transaction(async (tx) => {
3830
+ const row = await tx.findOne("native_builds", { id });
3831
+ if (row === null) return null;
3832
+ const build = pick(row);
3833
+ if (!storeBuild) {
3834
+ if (build.store_build !== null) tx.update("native_builds", row, { store_build: null });
3835
+ return {
3836
+ nativeBuild: {
3837
+ ...build,
3838
+ store_build: null
3839
+ },
3840
+ previous: null
3841
+ };
3842
+ }
3843
+ if (decodeChannelKey(build.channel_id.slice(8)).startsWith(SANDBOX_CHANNEL_PREFIX)) throw new NativeBuildInputError("A build on a sandbox channel can't be the store build.");
3844
+ if (build.store_build !== null) return {
3845
+ nativeBuild: build,
3846
+ previous: null
3847
+ };
3848
+ const holder = await tx.findOne("native_builds", {
3849
+ scope_key: build.scope_key,
3850
+ store_build: true
3851
+ });
3852
+ if (holder !== null) tx.update("native_builds", holder, { store_build: null });
3853
+ tx.update("native_builds", row, { store_build: true });
3854
+ return {
3855
+ nativeBuild: {
3856
+ ...build,
3857
+ store_build: true
3858
+ },
3859
+ previous: holder === null ? null : {
3860
+ ...pick(holder),
3861
+ store_build: null
3862
+ }
3863
+ };
3864
+ });
3865
+ } catch (error) {
3866
+ if (attempt < MARK_ATTEMPTS && error instanceof DatabaseConstraintError && error.reason === "unique") continue;
3867
+ throw error;
3868
+ }
3869
+ },
3871
3870
  async deleteNativeBuild(id) {
3872
3871
  return db.transaction(async (tx) => {
3873
3872
  const row = await tx.findOne("native_builds", { id });
@@ -4926,7 +4925,13 @@ var createAdminRouteHandlers = () => ({
4926
4925
  const url = new URL(request.url);
4927
4926
  const scope = nativeBuildScopeOf(url);
4928
4927
  const buildKey = url.searchParams.get("buildKey");
4929
- return json({ data: await refusingInvalid(() => buildKey === null ? core.findNativeBuild(scope) : core.findNativeBuild(scope, { buildKey })) });
4928
+ const builtInOlderThan = url.searchParams.get("builtInOlderThan");
4929
+ const options = {
4930
+ ...buildKey === null ? {} : { buildKey },
4931
+ ...url.searchParams.get("storeBuild") === "true" ? { storeBuild: true } : {},
4932
+ ...builtInOlderThan === null ? {} : { builtInOlderThan }
4933
+ };
4934
+ return json({ data: await refusingInvalid(() => Object.keys(options).length === 0 ? core.findNativeBuild(scope) : core.findNativeBuild(scope, options)) });
4930
4935
  }),
4931
4936
  getNativeBuild: onCore(async (core, _request, params) => json({ data: await core.getNativeBuild(requireRouteParam(params, "id")) })),
4932
4937
  listNativeBuilds: onCore(async (core, request) => {
@@ -4947,6 +4952,12 @@ var createAdminRouteHandlers = () => ({
4947
4952
  };
4948
4953
  return json({ data: await refusingInvalid(() => core.recordNativeBuildSubmission(requireRouteParam(params, "id"), submission)) });
4949
4954
  }),
4955
+ markNativeBuild: onCore(async (core, request, params) => {
4956
+ const input = await body(request);
4957
+ if (!isRecord$1(input) || typeof input.storeBuild !== "boolean") throw new HandlerBadRequestError("A native build's store build mark needs storeBuild, true or false.");
4958
+ const mark = { storeBuild: input.storeBuild };
4959
+ return json({ data: await refusingInvalid(() => core.markNativeBuild(requireRouteParam(params, "id"), mark)) });
4960
+ }),
4950
4961
  deleteNativeBuild: onCore(async (core, _request, params) => json({ data: await core.deleteNativeBuild(requireRouteParam(params, "id")) })),
4951
4962
  deleteBundles: onCore(async (core, request) => {
4952
4963
  const { ids } = await body(request);
@@ -5092,6 +5103,11 @@ var ADMIN_ROUTES = [
5092
5103
  path: "/native-builds/:id/submission",
5093
5104
  handler: "recordNativeBuildSubmission"
5094
5105
  },
5106
+ {
5107
+ method: "POST",
5108
+ path: "/native-builds/:id/store-build",
5109
+ handler: "markNativeBuild"
5110
+ },
5095
5111
  {
5096
5112
  method: "DELETE",
5097
5113
  path: "/native-builds/:id",
@@ -1,7 +1,7 @@
1
1
  import "../_runtime.mjs";
2
2
  import { bt as require_react, ot as useRender, vt as mergeProps, yt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
3
  import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
4
- import { k as cn } from "./sidebar-CsRdKfb2.mjs";
4
+ import { k as cn } from "./sidebar-Dmq4j1qr.mjs";
5
5
  require_react();
6
6
  var import_jsx_runtime = require_jsx_runtime();
7
7
  function Card({ className, ...props }) {
@@ -1,4 +1,4 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/bundleActivity-MLrjNJCT.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/bundleActivity-BGVvqWx7.js
2
2
  async function getBundleActivity(model, inputs) {
3
3
  if (inputs.length === 0) return {};
4
4
  const releases = inputs.map((input) => ({
@@ -1,6 +1,6 @@
1
- import { i as getRequest } from "./server-b1jUGuT2.mjs";
2
- import { requireConsoleAccess, t as resolveConsoleConfig } from "./auth.server-cdIC1rxo.mjs";
3
- //#region node_modules/.nitro/vite/services/ssr/assets/config.server-CydWUX0c.js
1
+ import { i as getRequest } from "./server-D_hG9iIq.mjs";
2
+ import { requireConsoleAccess, t as resolveConsoleConfig } from "./auth.server-43UW34Rd.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/config.server-QRTmD4Hf.js
4
4
  var configPromise = null;
5
5
  var core = null;
6
6
  var runtime = null;
@@ -20,7 +20,7 @@ var loadConsole = async (request = getRequest()) => {
20
20
  const config = await loadCachedConfig(request);
21
21
  core ??= config.core;
22
22
  if (!runtime) {
23
- const { createConsoleRuntime } = await import("./runtime.server-BdMY1blX.mjs");
23
+ const { createConsoleRuntime } = await import("./runtime.server-BsTTLV-B.mjs");
24
24
  runtime = createConsoleRuntime(config);
25
25
  }
26
26
  return {
@@ -1,5 +1,5 @@
1
1
  import { t as createMiddleware } from "./createMiddleware-C3ACsfuG.mjs";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/console-access-y52SJdFn.js
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/console-access-E91fYTIB.js
3
3
  /**
4
4
  * Refuses a caller the console does not authorize before a server function
5
5
  * reads its input. TanStack Start runs a function's middleware before the
@@ -9,7 +9,7 @@ import { t as createMiddleware } from "./createMiddleware-C3ACsfuG.mjs";
9
9
  * `console-access.spec.ts` checks that.
10
10
  */
11
11
  var consoleAccess = createMiddleware({ type: "function" }).server(async ({ next }) => {
12
- const [{ getRequest }, { requireConsoleAccess }] = await Promise.all([import("./server-b1jUGuT2.mjs").then((n) => n.t), import("./auth.server-cdIC1rxo.mjs")]);
12
+ const [{ getRequest }, { requireConsoleAccess }] = await Promise.all([import("../_libs/_.mjs").then((n) => n.t), import("./auth.server-43UW34Rd.mjs")]);
13
13
  await requireConsoleAccess(getRequest());
14
14
  return next();
15
15
  });
@@ -1,4 +1,4 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/console-features-BTV-XuhQ.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/console-features-CgdQJQlX.js
2
2
  /**
3
3
  * The console's features and the server plugin each one needs. The console
4
4
  * serves a feature only when its config lists the plugin, as the server runs
@@ -1,10 +1,10 @@
1
+ import { n as consoleFeatures } from "./console-features-CgdQJQlX.mjs";
1
2
  import { l as createServerFn } from "./createServerFn-AQvBMBjJ.mjs";
2
- import { t as consoleAccess } from "./console-access-y52SJdFn.mjs";
3
- import { A as createSsrRpc } from "./sidebar-CsRdKfb2.mjs";
4
- import { i as useQuery, r as queryOptions } from "../_libs/tanstack__react-query.mjs";
5
- import { n as consoleFeatures } from "./console-features-BTV-XuhQ.mjs";
3
+ import { A as createSsrRpc } from "./sidebar-Dmq4j1qr.mjs";
4
+ import { t as consoleAccess } from "./console-access-E91fYTIB.mjs";
6
5
  import { v as notFound } from "../_libs/@tanstack/react-router+[...].mjs";
7
- //#region node_modules/.nitro/vite/services/ssr/assets/console-features-api-BDrXaElT.js
6
+ import { i as useQuery, r as queryOptions } from "../_libs/tanstack__react-query.mjs";
7
+ //#region node_modules/.nitro/vite/services/ssr/assets/console-features-api-CLRjxvy2.js
8
8
  /** The features this console serves, for navigation and route guards. */
9
9
  var getConsoleFeaturesRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).handler(createSsrRpc("82ec3500e57f9e81dac6d3f3a7bd9e34915da3121429beec87b7ad153dc6eafe"));
10
10
  var consoleFeaturesQueryKey = ["console", "features"];
@@ -1,14 +1,14 @@
1
1
  import { l as createServerFn } from "./createServerFn-AQvBMBjJ.mjs";
2
- import { t as consoleAccess } from "./console-access-y52SJdFn.mjs";
3
- import { t as createServerRpc } from "./createServerRpc-BVvRVOz5.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/console-features-rpc-C9kKIDeK.js
2
+ import { t as consoleAccess } from "./console-access-E91fYTIB.mjs";
3
+ import { t as createServerRpc } from "./createServerRpc-DJZel12M.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/console-features-rpc-C2rJ0u6i.js
5
5
  var getConsoleFeaturesRpc_createServerFn_handler = createServerRpc({
6
6
  id: "82ec3500e57f9e81dac6d3f3a7bd9e34915da3121429beec87b7ad153dc6eafe",
7
7
  name: "getConsoleFeaturesRpc",
8
8
  filename: "src/lib/console-features-rpc.ts"
9
9
  }, (opts) => getConsoleFeaturesRpc.__executeServer(opts));
10
10
  var getConsoleFeaturesRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).handler(getConsoleFeaturesRpc_createServerFn_handler, async () => {
11
- const { prepareConfig } = await import("./config.server-CydWUX0c.mjs");
11
+ const { prepareConfig } = await import("./config.server-QRTmD4Hf.mjs");
12
12
  const { runtime } = await prepareConfig();
13
13
  return {
14
14
  features: await runtime.features(),
@@ -1,5 +1,5 @@
1
1
  import { a as TSS_SERVER_FUNCTION } from "./createServerFn-AQvBMBjJ.mjs";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/createServerRpc-BVvRVOz5.js
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/createServerRpc-DJZel12M.js
3
3
  var createServerRpc = (serverFnMeta, splitImportFn) => {
4
4
  const url = "/_serverFn/" + serverFnMeta.id;
5
5
  return Object.assign(splitImportFn, {
@@ -1,4 +1,4 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/databaseConfig-B_Bg7qS5.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/databaseConfig-XAvDetmn.js
2
2
  /** Whether a configured database is a self-hosted server's. */
3
3
  var isRemoteDatabase = (value) => typeof value === "object" && value !== null && "core" in value && "fetchAdmin" in value;
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/databaseJsonValue-kS7cvEtz.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/databaseJsonValue-DuUoft8j.js
2
2
  /** A bundle an operation names is not stored. */
3
3
  var DatabaseBundleNotFoundError = class extends Error {
4
4
  bundleId;
@@ -1,6 +1,6 @@
1
- import { a as isDatabaseMetadataObject, t as DatabaseAdapterInputError } from "./databaseJsonValue-kS7cvEtz.mjs";
2
- import { d as getAssetBaseStorageUri, h as getManifestStorageUri, m as getManifestFileHash, p as getBundlePatches } from "./dist-TEpM_UAD.mjs";
3
- //#region node_modules/.nitro/vite/services/ssr/assets/databaseRows-B6H8Cmgq.js
1
+ import { a as isDatabaseMetadataObject, t as DatabaseAdapterInputError } from "./databaseJsonValue-DuUoft8j.mjs";
2
+ import { d as getAssetBaseStorageUri, h as getManifestStorageUri, m as getManifestFileHash, p as getBundlePatches } from "./dist-B6-irDRA.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/databaseRows-BtRVBD0C.js
4
4
  var bundleMetadataToRow = (metadata) => {
5
5
  if (metadata === void 0) return {};
6
6
  if (!isDatabaseMetadataObject(metadata)) throw new DatabaseAdapterInputError("invalid-data");
@@ -1,7 +1,7 @@
1
1
  import "../_runtime.mjs";
2
2
  import { $ as DialogTitle$1, Q as DialogTrigger$1, at as DialogBackdrop, bt as require_react, et as DialogRoot, it as DialogClose, nt as DialogPopup, rt as DialogDescription$1, tt as DialogPortal$1, yt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
3
  import { t as X } from "../_libs/lucide-react.mjs";
4
- import { k as cn, t as Button$1 } from "./sidebar-CsRdKfb2.mjs";
4
+ import { k as cn, t as Button$1 } from "./sidebar-Dmq4j1qr.mjs";
5
5
  require_react();
6
6
  var import_jsx_runtime = require_jsx_runtime();
7
7
  function Dialog$1({ ...props }) {
@@ -1,4 +1,4 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/dist-TEpM_UAD.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/dist-B6-irDRA.js
2
2
  var LETTER_DASH_NUMBER = "[a-zA-Z0-9-]";
3
3
  var NUMERIC_IDENTIFIER = String.raw`0|[1-9]\d*`;
4
4
  var NUMERIC_IDENTIFIER_LOOSE = String.raw`\d+`;
@@ -1,4 +1,4 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/downloadBundle-DCmr7vsj.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/downloadBundle-BX8ODCZT.js
2
2
  var downloadBundle = async (bundleId, { core, storage }) => {
3
3
  const detail = await core.getBundle(bundleId);
4
4
  if (!detail) return new Response("Bundle not found", { status: 404 });