@hot-updater/console 1.2.0-rc.11 → 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 (209) 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-rwcxgBkE.mjs → __23tanstack-start-server-fn-resolver-DI0OnlQe.mjs} +58 -46
  35. package/.output/server/_libs/_.mjs +2 -0
  36. package/.output/server/_ssr/{-native-builds-search-CwNcoXf4.mjs → -native-builds-search-Cl8EZ0Ud.mjs} +2 -2
  37. package/.output/server/_ssr/{BundleIdDisplay-Ck9PKmwH.mjs → BundleIdDisplay-SAvC-NlE.mjs} +2 -2
  38. package/.output/server/_ssr/{ConsoleFeatureUnavailable-BWB1D2Wi.mjs → ConsoleFeatureUnavailable-BgHEoZ36.mjs} +6 -6
  39. package/.output/server/_ssr/{EventDetails-BHaDqOa9.mjs → EventDetails-VaS25yjE.mjs} +7 -7
  40. package/.output/server/_ssr/{HashValueDisplay-BiDyA9rL.mjs → HashValueDisplay-BGc-x_l8.mjs} +2 -2
  41. package/.output/server/_ssr/{InsightsPageHeader-CF0EsQxx.mjs → InsightsPageHeader-gMuNJt-f.mjs} +7 -7
  42. package/.output/server/_ssr/{NotFoundPage-B9lpP9Tl.mjs → NotFoundPage-DsRI-J4h.mjs} +2 -2
  43. package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-BsU0d0jN.mjs} +1 -1
  44. package/.output/server/_ssr/{RolloutPercentageBadge-zMqf1PpF.mjs → RolloutPercentageBadge-axz7VuIZ.mjs} +3 -3
  45. package/.output/server/_ssr/{StoreSubmission-Q-Bs-WZz.mjs → StoreSubmission-BqXKtpqW.mjs} +5 -5
  46. package/.output/server/_ssr/{alert-dialog-BEim4Utq.mjs → alert-dialog-lury59vV.mjs} +1 -1
  47. package/.output/server/_ssr/{api-DmYUr3JH.mjs → api-BQ8ztUgU.mjs} +99 -22
  48. package/.output/server/_ssr/{api-keys-BeIyFPrN.mjs → api-keys-CHATVpa9.mjs} +2 -2
  49. package/.output/server/_ssr/{api-keys-COYxx0WD.mjs → api-keys-DVChzF3r.mjs} +8 -8
  50. package/.output/server/_ssr/{api-keys-rpc-B3suM06f.mjs → api-keys-rpc-DXPJTfdr.mjs} +4 -4
  51. package/.output/server/_ssr/{api-rpc-WN63B4Fl.mjs → api-rpc-BexxmTM9.mjs} +43 -18
  52. package/.output/server/_ssr/{auth-rpc-DzFn-A4B.mjs → auth-rpc-BgNCvy2L.mjs} +5 -5
  53. package/.output/server/_ssr/{auth.server-CFohc_4Q.mjs → auth.server-43UW34Rd.mjs} +165 -149
  54. package/.output/server/_ssr/{badge-BJLGAEnB.mjs → badge-BYB825vl.mjs} +1 -1
  55. package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-BGVvqWx7.mjs} +1 -1
  56. package/.output/server/_ssr/{config.server-DD38oozj.mjs → config.server-QRTmD4Hf.mjs} +4 -4
  57. package/.output/server/_ssr/{console-access-D0n051M-.mjs → console-access-E91fYTIB.mjs} +2 -2
  58. package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-CgdQJQlX.mjs} +1 -1
  59. package/.output/server/_ssr/{console-features-api-Dydnlqb0.mjs → console-features-api-CLRjxvy2.mjs} +4 -4
  60. package/.output/server/_ssr/{console-features-rpc-ByDxxOoW.mjs → console-features-rpc-C2rJ0u6i.mjs} +4 -4
  61. package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
  62. package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-XAvDetmn.mjs} +1 -1
  63. package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
  64. package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BtRVBD0C.mjs} +3 -3
  65. package/.output/server/_ssr/{dialog-Bh8kyYWS.mjs → dialog-CcF1pxfR.mjs} +1 -1
  66. package/.output/server/_ssr/{dist-TEpM_UAD.mjs → dist-B6-irDRA.mjs} +1 -1
  67. package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-BX8ODCZT.mjs} +1 -1
  68. package/.output/server/_ssr/{empty-DpOPjAFI.mjs → empty-DkiJ7nWt.mjs} +2 -2
  69. package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
  70. package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-C_CmBF4x.mjs} +3 -3
  71. package/.output/server/_ssr/{field-Ql8YHerV.mjs → field-CHlDI06h.mjs} +2 -2
  72. package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-BJTufthT.mjs} +2 -2
  73. package/.output/server/_ssr/{git-CTA8Aqr0.mjs → git-WSg7LY17.mjs} +2 -2
  74. package/.output/server/_ssr/{input-group-Dd_2GFRH.mjs → input-group-BPZ4UtB5.mjs} +1 -1
  75. package/.output/server/_ssr/{insights-cJyup70V.mjs → insights-B3YetvBK.mjs} +5 -5
  76. package/.output/server/_ssr/{insights-BhJl-2pB.mjs → insights-CEABWFk4.mjs} +25 -25
  77. package/.output/server/_ssr/{insights-CqZSyEjz.mjs → insights-Dn32lJ18.mjs} +2 -2
  78. package/.output/server/_ssr/{insights-api-DRYBk0R6.mjs → insights-api-CYPf5853.mjs} +5 -5
  79. package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-Bz3sWNZm.mjs} +2 -2
  80. package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-DNQ9qVVf.mjs} +2 -2
  81. package/.output/server/_ssr/{insights-failures-rpc-D-9CBKdE.mjs → insights-failures-rpc-CxPpBR1K.mjs} +11 -11
  82. package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-DOkpqnQ8.mjs} +1 -1
  83. package/.output/server/_ssr/{insights-recovery-rpc-DLmf6moc.mjs → insights-recovery-rpc-CwnQMTE3.mjs} +7 -7
  84. package/.output/server/_ssr/{insights-rpc-y2kQKXNp.mjs → insights-rpc-CKd5ATFI.mjs} +4 -4
  85. package/.output/server/_ssr/{insights-search-BNYxloOl.mjs → insights-search-B_92_iEj.mjs} +4 -4
  86. package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-4KDIN3Kg.mjs} +1 -1
  87. package/.output/server/_ssr/{insights-usage-rpc-DYu9RF-g.mjs → insights-usage-rpc-D90uHpJJ.mjs} +7 -7
  88. package/.output/server/_ssr/{insights-usage-rpc-kRcZzXgq.mjs → insights-usage-rpc-RIMNhPtj.mjs} +4 -4
  89. package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-DmQdJZqT.mjs} +3 -3
  90. package/.output/server/_ssr/{insights_.distribution-DNzQrLmx.mjs → insights_.distribution-D42mHSe0.mjs} +13 -13
  91. package/.output/server/_ssr/{insights_.distribution-Bej6b0WB.mjs → insights_.distribution-D4QWsHNo.mjs} +5 -5
  92. package/.output/server/_ssr/{insights_.distribution-B9OZSH_r.mjs → insights_.distribution-DwjIdjQi.mjs} +2 -2
  93. package/.output/server/_ssr/{installations-skInTxKu.mjs → installations-BIu66J6Q.mjs} +2 -2
  94. package/.output/server/_ssr/{installations-CBiH9Wwn.mjs → installations-CfmO_V_R.mjs} +4 -4
  95. package/.output/server/_ssr/{installations-DlSYGvr8.mjs → installations-DyzKzWuv.mjs} +11 -11
  96. package/.output/server/_ssr/{listReleases-D_GY00SQ.mjs → listReleases-CQEceg8j.mjs} +1 -1
  97. package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
  98. package/.output/server/_ssr/native-artifact-H1MDP0Jz.mjs +593 -0
  99. package/.output/server/_ssr/{native-builds-DAB0xa_Q.mjs → native-builds-BCp8ICrn.mjs} +3 -3
  100. package/.output/server/_ssr/{native-builds-CnI8MTbb.mjs → native-builds-CqFeXByK.mjs} +17 -13
  101. package/.output/server/_ssr/{native-builds-DhXL5zf_.mjs → native-builds-qj346atQ.mjs} +49 -12
  102. package/.output/server/_ssr/{native-builds_._buildId-DZDjrHBe.mjs → native-builds_._buildId-BAxkkEFo.mjs} +600 -168
  103. package/.output/server/_ssr/{native-builds_._buildId-DLZ6nB36.mjs → native-builds_._buildId-C8gsW-Rh.mjs} +3 -3
  104. package/.output/server/_ssr/nativeBuildDevice-nU480p5A.mjs +230 -0
  105. package/.output/server/_ssr/nativeBuildDownloadLink-c3tcq3G5.mjs +96 -0
  106. package/.output/server/_ssr/nativeBuildInstall-B-_lHDsS.mjs +203 -0
  107. package/.output/server/_ssr/nativeBuildQr-C5AFtpmE.mjs +115 -0
  108. package/.output/server/_ssr/{nativeBuilds-B_7BPjt_.mjs → nativeBuilds-CbxOJDhO.mjs} +61 -29
  109. package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-CX7wutet.mjs} +6 -6
  110. package/.output/server/_ssr/publicConsoleBase-3IHSHvqd.mjs +27 -0
  111. package/.output/server/_ssr/{qr-code-C7kNRIDX.mjs → qr-code-pENFuyy9.mjs} +1 -1
  112. package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-C7sUFDwa.mjs} +2 -2
  113. package/.output/server/_ssr/{release-adoption-rpc-zmiN6xmA.mjs → release-adoption-rpc-BBwJO2hu.mjs} +9 -9
  114. package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-LLYlRnUB.mjs} +4 -4
  115. package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-D9dAMI17.mjs} +3 -3
  116. package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-EPhok_Py.mjs} +1 -1
  117. package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-DaZ7ifUF.mjs} +2 -2
  118. package/.output/server/_ssr/{remote-config-Dg413xDC.mjs → remote-config-B1g7vrQD.mjs} +2 -2
  119. package/.output/server/_ssr/{remote-config-wIu0mSXk.mjs → remote-config-BDijmvj1.mjs} +2 -2
  120. package/.output/server/_ssr/{remote-config-DARJ7wRc.mjs → remote-config-DjeXVIcr.mjs} +17 -17
  121. package/.output/server/_ssr/{remote-config-rpc-DChi0vbN.mjs → remote-config-rpc-B7bzKw4N.mjs} +5 -5
  122. package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
  123. package/.output/server/_ssr/{router-PzDqC7iK.mjs → router-DhxgFNWn.mjs} +100 -49
  124. package/.output/server/_ssr/{routes-BJ3Qa9M2.mjs → routes-BC-rBuu_.mjs} +24 -24
  125. package/.output/server/_ssr/{routes-FJf2TN1y.mjs → routes-BDriEBtF.mjs} +11 -11
  126. package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-BsTTLV-B.mjs} +4 -4
  127. package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-3oDJJFWa.mjs} +1 -1
  128. package/.output/server/_ssr/{schema-migration-rpc-BZPnIX5Y.mjs → schema-migration-rpc-CNMqY0RE.mjs} +4 -4
  129. package/.output/server/_ssr/{select-BVFaL5Ut.mjs → select-hFD2e3Bh.mjs} +1 -1
  130. package/.output/server/_ssr/{server-odRE3NM6.mjs → server-D_hG9iIq.mjs} +6 -6
  131. package/.output/server/_ssr/{sidebar-BJdj38Te.mjs → sidebar-Dmq4j1qr.mjs} +2 -2
  132. package/.output/server/_ssr/ssr.mjs +1 -1
  133. package/.output/server/_ssr/{start-BvDsQehg.mjs → start-RjhaPVFE.mjs} +2 -2
  134. package/.output/server/_ssr/{switch-sw0ti4p4.mjs → switch-CkNsEp9k.mjs} +2 -2
  135. package/.output/server/_ssr/{table-D-ou6_wJ.mjs → table-CTtXogFJ.mjs} +1 -1
  136. package/.output/server/_ssr/{tabs-DKuPano8.mjs → tabs-BTKDM4AJ.mjs} +2 -2
  137. package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-DPYzv9bE.mjs} +3 -3
  138. package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-CmHbryZT.mjs} +2 -2
  139. package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-NmbU0MD2.mjs} +1 -1
  140. package/.output/server/_tanstack-start-manifest_v-BuGAtKIu.mjs +189 -0
  141. package/.output/server/index.mjs +284 -284
  142. package/package.json +7 -7
  143. package/src/components/features/native-builds/BuiltInBundleCard.tsx +82 -33
  144. package/src/components/features/native-builds/InstallCard.tsx +246 -46
  145. package/src/components/features/native-builds/IosInstall.tsx +300 -0
  146. package/src/components/features/native-builds/NativeBuildsTable.tsx +3 -0
  147. package/src/components/features/native-builds/PatchesCard.tsx +3 -2
  148. package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +4 -4
  149. package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
  150. package/src/components/features/native-builds/StoreSubmission.tsx +1 -1
  151. package/src/lib/api-rpc.ts +55 -6
  152. package/src/lib/api.ts +85 -12
  153. package/src/lib/native-builds.ts +73 -11
  154. package/src/lib/server/local-console.ts +1 -1
  155. package/src/lib/server/nativeBuildDevice.ts +274 -0
  156. package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
  157. package/src/lib/server/nativeBuildInstall.ts +355 -0
  158. package/src/lib/server/nativeBuildQr.ts +114 -24
  159. package/src/lib/server/nativeBuilds.ts +87 -33
  160. package/src/lib/server/plistText.ts +17 -0
  161. package/src/lib/server/publicConsoleBase.ts +17 -0
  162. package/src/routeTree.gen.ts +114 -0
  163. package/src/routes/[_]hot-updater/native-builds/$buildId/device-response.ts +17 -0
  164. package/src/routes/[_]hot-updater/native-builds/$buildId/device.ts +17 -0
  165. package/src/routes/[_]hot-updater/native-builds/$buildId/device[.]mobileconfig.ts +17 -0
  166. package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
  167. package/src/routes/[_]hot-updater/native-builds/preview-qr.ts +14 -0
  168. package/src/routes/api/native-builds/$buildId/download.ts +22 -1
  169. package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
  170. package/.output/public/assets/api-P2g8dCNg.js +0 -1
  171. package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
  172. package/.output/public/assets/insights-BSVGfxSL.js +0 -1
  173. package/.output/public/assets/insights-NK5B6ReS.js +0 -2
  174. package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
  175. package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
  176. package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
  177. package/.output/public/assets/native-builds-BGgFQTDW.js +0 -2
  178. package/.output/public/assets/native-builds-BOC71grI.js +0 -1
  179. package/.output/public/assets/native-builds-CxomzFqe.js +0 -1
  180. package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
  181. package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
  182. package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
  183. package/.output/public/assets/routes-BDdBIxYS.js +0 -1
  184. package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
  185. package/.output/server/_tanstack-start-manifest_v-uhJWytDm.mjs +0 -184
  186. /package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-fiaucvsO.js} +0 -0
  187. /package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-DCTtCP5t.js} +0 -0
  188. /package/.output/public/assets/{alert-dialog-BqYScr9y.js → alert-dialog-Z_RNBrFc.js} +0 -0
  189. /package/.output/public/assets/{badge-DWFcDWho.js → badge-UNnTz4Dl.js} +0 -0
  190. /package/.output/public/assets/{dialog-CNUPxNxH.js → dialog-C2U9bINi.js} +0 -0
  191. /package/.output/public/assets/{dist-CPlO6ko9.js → dist-UQUhRoJi.js} +0 -0
  192. /package/.output/public/assets/{empty-B3Uwdd6k.js → empty-PAp07lsC.js} +0 -0
  193. /package/.output/public/assets/{field-D-2-mnNh.js → field-DhKRWFG5.js} +0 -0
  194. /package/.output/public/assets/{history-DqHlgSuV.js → history-DakJoeSM.js} +0 -0
  195. /package/.output/public/assets/{input-group-D3OUBk4n.js → input-group-BJfBVqeI.js} +0 -0
  196. /package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-DzBe6DHr.js} +0 -0
  197. /package/.output/public/assets/{list--NIee1FZ.js → list-B6GeoQ_b.js} +0 -0
  198. /package/.output/public/assets/{plus-BReVKct-.js → plus-BVhOauU3.js} +0 -0
  199. /package/.output/public/assets/{refresh-cw-B9HHjLej.js → refresh-cw-C6svDMfM.js} +0 -0
  200. /package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-BscR0TsX.js} +0 -0
  201. /package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-CxFW64IG.js} +0 -0
  202. /package/.output/public/assets/{search-BCel4Oy6.js → search-bIYGuFCt.js} +0 -0
  203. /package/.output/public/assets/{smartphone-CMaSy_ir.js → smartphone-Bn5FtEwt.js} +0 -0
  204. /package/.output/public/assets/{switch-BpdiHL_t.js → switch-DtUu1RCw.js} +0 -0
  205. /package/.output/public/assets/{table-Bpy3SvSo.js → table-B22H8-RL.js} +0 -0
  206. /package/.output/public/assets/{tabs-Xmt7tZeG.js → tabs-Fgz3sA51.js} +0 -0
  207. /package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-7gOxArtb.js} +0 -0
  208. /package/.output/public/assets/{uuidv7-zXMtwR9Q.js → uuidv7-BLyD3pAM.js} +0 -0
  209. /package/.output/public/assets/{valueToPercent-BLwGy_xK.js → valueToPercent-DRLgSP0P.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { l as createServerFn } from "./createServerFn-AQvBMBjJ.mjs";
2
- import { t as consoleAccess } from "./console-access-D0n051M-.mjs";
3
- import { t as createServerRpc } from "./createServerRpc-BVvRVOz5.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/api-keys-rpc-B3suM06f.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/api-keys-rpc-DXPJTfdr.js
5
5
  var parseName = (input) => {
6
6
  const name = typeof input === "object" && input !== null ? Reflect.get(input, "name") : void 0;
7
7
  if (typeof name !== "string") throw new TypeError("API key name must be a string.");
@@ -14,7 +14,7 @@ var parseId = (input) => {
14
14
  };
15
15
  /** API key management, once the console's access check and the feature guard pass. */
16
16
  var apiKeyManagement = async () => {
17
- const [{ prepareConfig }, { requireFeature }] = await Promise.all([import("./config.server-DD38oozj.mjs"), import("./runtime.server-BdMY1blX.mjs")]);
17
+ const [{ prepareConfig }, { requireFeature }] = await Promise.all([import("./config.server-QRTmD4Hf.mjs"), import("./runtime.server-BsTTLV-B.mjs")]);
18
18
  const { runtime } = await prepareConfig();
19
19
  return requireFeature(runtime, "apiKeys");
20
20
  };
@@ -1,13 +1,13 @@
1
1
  import { l as createServerFn } from "./createServerFn-AQvBMBjJ.mjs";
2
- import { t as consoleAccess } from "./console-access-D0n051M-.mjs";
3
- import { t as createServerRpc } from "./createServerRpc-BVvRVOz5.mjs";
4
- import { o as assertCanonicalChannelName } from "./dist-TEpM_UAD.mjs";
5
- import { i as rowToBundle } from "./databaseRows-B6H8Cmgq.mjs";
6
- import { t as ReleaseManagementError } from "./releaseManagement-DHUux2az.mjs";
7
- import { f as releaseNativeBuildScope, n as channelIdOf } from "./native-builds-DhXL5zf_.mjs";
8
- import { n as readReleaseFilter, t as listReleases } from "./listReleases-D_GY00SQ.mjs";
9
- import { t as addReleaseReachability } from "./releaseReachability-DZOK_dH-.mjs";
10
- //#region node_modules/.nitro/vite/services/ssr/assets/api-rpc-WN63B4Fl.js
2
+ import { t as consoleAccess } from "./console-access-E91fYTIB.mjs";
3
+ import { t as createServerRpc } from "./createServerRpc-DJZel12M.mjs";
4
+ import { o as assertCanonicalChannelName } from "./dist-B6-irDRA.mjs";
5
+ import { i as rowToBundle } from "./databaseRows-BtRVBD0C.mjs";
6
+ import { t as ReleaseManagementError } from "./releaseManagement-EPhok_Py.mjs";
7
+ import { S as releaseNativeBuildScope, i as channelIdOf } from "./native-builds-qj346atQ.mjs";
8
+ import { n as readReleaseFilter, t as listReleases } from "./listReleases-CQEceg8j.mjs";
9
+ import { t as addReleaseReachability } from "./releaseReachability-DaZ7ifUF.mjs";
10
+ //#region node_modules/.nitro/vite/services/ssr/assets/api-rpc-BexxmTM9.js
11
11
  var withPublicBundleMutationErrors = async (action) => {
12
12
  try {
13
13
  return await action();
@@ -23,7 +23,7 @@ var pageLimit = (limit) => {
23
23
  return value;
24
24
  };
25
25
  var prepare = async () => {
26
- const { prepareConfig } = await import("./config.server-DD38oozj.mjs");
26
+ const { prepareConfig } = await import("./config.server-QRTmD4Hf.mjs");
27
27
  return prepareConfig();
28
28
  };
29
29
  var getReleases_createServerFn_handler = createServerRpc({
@@ -179,7 +179,7 @@ var getBundleChildren_createServerFn_handler = createServerRpc({
179
179
  }, (opts) => getBundleChildren.__executeServer(opts));
180
180
  var getBundleChildren = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => input).handler(getBundleChildren_createServerFn_handler, async ({ data }) => {
181
181
  try {
182
- const [{ core }, { getBundleChildren: readBundleChildren }] = await Promise.all([prepare(), import("./getBundleChildren-rtkEEJw5.mjs")]);
182
+ const [{ core }, { getBundleChildren: readBundleChildren }] = await Promise.all([prepare(), import("./getBundleChildren-BJTufthT.mjs")]);
183
183
  return await readBundleChildren(core, data.baseBundleId);
184
184
  } catch (error) {
185
185
  console.error("Error during bundle children retrieval:", error);
@@ -196,7 +196,7 @@ var getBundleChildCounts = createServerFn({ method: "GET" }).middleware([console
196
196
  return input;
197
197
  }).handler(getBundleChildCounts_createServerFn_handler, async ({ data }) => {
198
198
  try {
199
- const [{ core }, { getBundleChildCounts: readBundleChildCounts }] = await Promise.all([prepare(), import("./getBundleChildren-rtkEEJw5.mjs")]);
199
+ const [{ core }, { getBundleChildCounts: readBundleChildCounts }] = await Promise.all([prepare(), import("./getBundleChildren-BJTufthT.mjs")]);
200
200
  return await readBundleChildCounts(core, data.bundleIds);
201
201
  } catch (error) {
202
202
  console.error("Error during bundle child count retrieval:", error);
@@ -221,7 +221,7 @@ var getNativeBuilds = createServerFn({ method: "GET" }).middleware([consoleAcces
221
221
  ...channelIdFilter(input?.channel),
222
222
  limit: pageLimit(input?.limit)
223
223
  })).handler(getNativeBuilds_createServerFn_handler, async ({ data }) => {
224
- const [{ core }, { listNativeBuilds }] = await Promise.all([prepare(), import("./nativeBuilds-B_7BPjt_.mjs")]);
224
+ const [{ core }, { listNativeBuilds }] = await Promise.all([prepare(), import("./nativeBuilds-CbxOJDhO.mjs")]);
225
225
  return listNativeBuilds(core, data);
226
226
  });
227
227
  var getNativeBuildDetail_createServerFn_handler = createServerRpc({
@@ -230,7 +230,7 @@ var getNativeBuildDetail_createServerFn_handler = createServerRpc({
230
230
  filename: "src/lib/api-rpc.ts"
231
231
  }, (opts) => getNativeBuildDetail.__executeServer(opts));
232
232
  var getNativeBuildDetail = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => input).handler(getNativeBuildDetail_createServerFn_handler, async ({ data }) => {
233
- const [{ core }, { getNativeBuildDetail: readNativeBuildDetail }] = await Promise.all([prepare(), import("./nativeBuilds-B_7BPjt_.mjs")]);
233
+ const [{ core }, { getNativeBuildDetail: readNativeBuildDetail }] = await Promise.all([prepare(), import("./nativeBuilds-CbxOJDhO.mjs")]);
234
234
  return readNativeBuildDetail(core, data.id);
235
235
  });
236
236
  var getNativeBuildPatches_createServerFn_handler = createServerRpc({
@@ -243,7 +243,7 @@ var getNativeBuildPatches = createServerFn({ method: "GET" }).middleware([consol
243
243
  ...input.before === void 0 ? {} : { before: input.before },
244
244
  ...input.after === void 0 ? {} : { after: input.after }
245
245
  })).handler(getNativeBuildPatches_createServerFn_handler, async ({ data: { minBundleId, ...page } }) => {
246
- const [{ core }, { listNativeBuildPatches, NATIVE_BUILD_PATCH_PAGE_SIZE }] = await Promise.all([prepare(), import("./nativeBuilds-B_7BPjt_.mjs")]);
246
+ const [{ core }, { listNativeBuildPatches, NATIVE_BUILD_PATCH_PAGE_SIZE }] = await Promise.all([prepare(), import("./nativeBuilds-CbxOJDhO.mjs")]);
247
247
  return listNativeBuildPatches(core, minBundleId, {
248
248
  ...page,
249
249
  limit: NATIVE_BUILD_PATCH_PAGE_SIZE
@@ -257,16 +257,41 @@ var getReleaseNativeBuild_createServerFn_handler = createServerRpc({
257
257
  var getReleaseNativeBuild = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => input).handler(getReleaseNativeBuild_createServerFn_handler, async ({ data }) => {
258
258
  const scope = releaseNativeBuildScope(data);
259
259
  if (scope === null) return null;
260
- return (await prepare()).core.findNativeBuild(scope);
260
+ const { core } = await prepare();
261
+ return await core.findNativeBuild(scope, { storeBuild: true }) ?? core.findNativeBuild(scope);
261
262
  });
263
+ var markNativeBuild_createServerFn_handler = createServerRpc({
264
+ id: "a6c8cfa907e2f75bf69aa90044bd52a3ee684d1a0462d23781161a1a3531aa33",
265
+ name: "markNativeBuild",
266
+ filename: "src/lib/api-rpc.ts"
267
+ }, (opts) => markNativeBuild.__executeServer(opts));
268
+ var markNativeBuild = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => input).handler(markNativeBuild_createServerFn_handler, async ({ data }) => (await prepare()).core.markNativeBuild(data.id, { storeBuild: data.storeBuild }));
262
269
  var getNativeBuildDownloadUrl_createServerFn_handler = createServerRpc({
263
270
  id: "936ef8582ff49d97077d1d80e8403d0b4106831c955591c5c471a88f96007fe9",
264
271
  name: "getNativeBuildDownloadUrl",
265
272
  filename: "src/lib/api-rpc.ts"
266
273
  }, (opts) => getNativeBuildDownloadUrl.__executeServer(opts));
267
274
  var getNativeBuildDownloadUrl = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => input).handler(getNativeBuildDownloadUrl_createServerFn_handler, async ({ data }) => {
268
- const [deps, { resolveNativeBuildDownloadUrl }] = await Promise.all([prepare(), import("./nativeBuilds-B_7BPjt_.mjs")]);
275
+ const [deps, { resolveNativeBuildDownloadUrl }] = await Promise.all([prepare(), import("./nativeBuilds-CbxOJDhO.mjs")]);
269
276
  return { url: await resolveNativeBuildDownloadUrl(data.id, deps) };
270
277
  });
278
+ var createNativeBuildDownloadLink_createServerFn_handler = createServerRpc({
279
+ id: "c6ff40bd8faad0b2d7aba3e94179c18e02a918a76bff25849d771ff31f688208",
280
+ name: "createNativeBuildDownloadLink",
281
+ filename: "src/lib/api-rpc.ts"
282
+ }, (opts) => createNativeBuildDownloadLink.__executeServer(opts));
283
+ var createNativeBuildDownloadLink = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => input).handler(createNativeBuildDownloadLink_createServerFn_handler, async ({ data }) => {
284
+ const { issueNativeBuildDownloadLink } = await import("./nativeBuildDownloadLink-c3tcq3G5.mjs");
285
+ return issueNativeBuildDownloadLink(data.id);
286
+ });
287
+ var getNativeBuildInstallEligibility_createServerFn_handler = createServerRpc({
288
+ id: "67cea9f69773d83e69e68e20b81116a2bee9ee4ab3e378698ff74149f1d59ad0",
289
+ name: "getNativeBuildInstallEligibility",
290
+ filename: "src/lib/api-rpc.ts"
291
+ }, (opts) => getNativeBuildInstallEligibility.__executeServer(opts));
292
+ var getNativeBuildInstallEligibility = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => input).handler(getNativeBuildInstallEligibility_createServerFn_handler, async ({ data }) => {
293
+ const [deps, { checkNativeBuildInstall }] = await Promise.all([prepare(), import("./nativeBuildInstall-B-_lHDsS.mjs")]);
294
+ return checkNativeBuildInstall(data.id, data.udid, deps);
295
+ });
271
296
  //#endregion
272
- export { createChannel_createServerFn_handler, deleteChannel_createServerFn_handler, deleteRelease_createServerFn_handler, getBundleChildCounts_createServerFn_handler, getBundleChildren_createServerFn_handler, getBundle_createServerFn_handler, getChannels_createServerFn_handler, getConfig_createServerFn_handler, getNativeBuildDetail_createServerFn_handler, getNativeBuildDownloadUrl_createServerFn_handler, getNativeBuildPatches_createServerFn_handler, getNativeBuilds_createServerFn_handler, getReleaseCatalogDiagnostics_createServerFn_handler, getReleaseNativeBuild_createServerFn_handler, getRelease_createServerFn_handler, getReleases_createServerFn_handler, preflightRelease_createServerFn_handler, promoteRelease_createServerFn_handler, updateRelease_createServerFn_handler };
297
+ export { createChannel_createServerFn_handler, createNativeBuildDownloadLink_createServerFn_handler, deleteChannel_createServerFn_handler, deleteRelease_createServerFn_handler, getBundleChildCounts_createServerFn_handler, getBundleChildren_createServerFn_handler, getBundle_createServerFn_handler, getChannels_createServerFn_handler, getConfig_createServerFn_handler, getNativeBuildDetail_createServerFn_handler, getNativeBuildDownloadUrl_createServerFn_handler, getNativeBuildInstallEligibility_createServerFn_handler, getNativeBuildPatches_createServerFn_handler, getNativeBuilds_createServerFn_handler, getReleaseCatalogDiagnostics_createServerFn_handler, getReleaseNativeBuild_createServerFn_handler, getRelease_createServerFn_handler, getReleases_createServerFn_handler, markNativeBuild_createServerFn_handler, preflightRelease_createServerFn_handler, promoteRelease_createServerFn_handler, updateRelease_createServerFn_handler };
@@ -1,14 +1,14 @@
1
1
  import { l as createServerFn } from "./createServerFn-AQvBMBjJ.mjs";
2
- import { t as createServerRpc } from "./createServerRpc-BVvRVOz5.mjs";
3
- import { i as getRequest } from "./server-odRE3NM6.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/auth-rpc-DzFn-A4B.js
2
+ import { t as createServerRpc } from "./createServerRpc-DJZel12M.mjs";
3
+ import { i as getRequest } from "./server-D_hG9iIq.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/auth-rpc-BgNCvy2L.js
5
5
  var getConsoleAccessRpc_createServerFn_handler = createServerRpc({
6
6
  id: "c504696e68ba764b48c48aa8a40275938640941e473cf9cfdd7b2322d99f9d13",
7
7
  name: "getConsoleAccessRpc",
8
8
  filename: "src/lib/auth-rpc.ts"
9
9
  }, (opts) => getConsoleAccessRpc.__executeServer(opts));
10
10
  var getConsoleAccessRpc = createServerFn({ method: "GET" }).handler(getConsoleAccessRpc_createServerFn_handler, async () => {
11
- const { getConsoleAccess } = await import("./auth.server-CFohc_4Q.mjs");
11
+ const { getConsoleAccess } = await import("./auth.server-43UW34Rd.mjs");
12
12
  return getConsoleAccess(getRequest());
13
13
  });
14
14
  var getConsoleAuthProvidersRpc_createServerFn_handler = createServerRpc({
@@ -17,7 +17,7 @@ var getConsoleAuthProvidersRpc_createServerFn_handler = createServerRpc({
17
17
  filename: "src/lib/auth-rpc.ts"
18
18
  }, (opts) => getConsoleAuthProvidersRpc.__executeServer(opts));
19
19
  var getConsoleAuthProvidersRpc = createServerFn({ method: "GET" }).handler(getConsoleAuthProvidersRpc_createServerFn_handler, async () => {
20
- const { getConsoleAuthProviders } = await import("./auth.server-CFohc_4Q.mjs");
20
+ const { getConsoleAuthProviders } = await import("./auth.server-43UW34Rd.mjs");
21
21
  return getConsoleAuthProviders(getRequest());
22
22
  });
23
23
  //#endregion
@@ -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-CFohc_4Q.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.11";
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",