@hot-updater/console 1.1.4 → 1.2.0-rc.1

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 (273) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/-native-builds-search-C-TGpFAm.js +1 -0
  3. package/.output/public/assets/{ConsoleFeatureUnavailable-C0KfsKWL.js → ConsoleFeatureUnavailable-CUtcXuY2.js} +1 -1
  4. package/.output/public/assets/EventDetails-Dl2RvPAk.js +1 -0
  5. package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +1 -0
  6. package/.output/public/assets/InsightsPageHeader-DHhqY3DT.js +1 -0
  7. package/.output/public/assets/NotFoundPage-DZ3DxyRA.js +1 -0
  8. package/.output/public/assets/PlatformIcon-BBWQlWm9.js +1 -0
  9. package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +1 -0
  10. package/.output/public/assets/StoreSubmission-JpngSvHS.js +1 -0
  11. package/.output/public/assets/alert-dialog-BqYScr9y.js +1 -0
  12. package/.output/public/assets/api-P2g8dCNg.js +1 -0
  13. package/.output/public/assets/api-keys-DWQC2q6y.js +1 -0
  14. package/.output/public/assets/api-keys-FueRkF9q.js +1 -0
  15. package/.output/public/assets/arrow-left-g9cKqXuC.js +1 -0
  16. package/.output/public/assets/arrow-right-CNII8TYn.js +1 -0
  17. package/.output/public/assets/arrow-up-right-DK8Zdg40.js +1 -0
  18. package/.output/public/assets/badge-DWFcDWho.js +1 -0
  19. package/.output/public/assets/check-CXVR3s3X.js +1 -0
  20. package/.output/public/assets/chevron-right-BoUXo82O.js +1 -0
  21. package/.output/public/assets/circle-off-C7Muo0ss.js +1 -0
  22. package/.output/public/assets/{clipboard-DTkrlIMn.js → clipboard-DQbOcrL7.js} +1 -1
  23. package/.output/public/assets/console-features-api-DEXSwFtc.js +1 -0
  24. package/.output/public/assets/copy-DsuLj3oj.js +1 -0
  25. package/.output/public/assets/dialog-CNUPxNxH.js +1 -0
  26. package/.output/public/assets/{dist-dDj-R6uh.js → dist-CPlO6ko9.js} +1 -1
  27. package/.output/public/assets/download-Cf24LBde.js +1 -0
  28. package/.output/public/assets/{empty-Bf4DanOL.js → empty-B3Uwdd6k.js} +1 -1
  29. package/.output/public/assets/{field-GxF9SyUo.js → field-D-2-mnNh.js} +1 -1
  30. package/.output/public/assets/history-DqHlgSuV.js +1 -0
  31. package/.output/public/assets/index-BWU6owTG.js +10 -0
  32. package/.output/public/assets/{input-group-B4nrqIh0.js → input-group-D3OUBk4n.js} +1 -1
  33. package/.output/public/assets/insights-B-0odqpt.js +42 -0
  34. package/.output/public/assets/insights-BSVGfxSL.js +1 -0
  35. package/.output/public/assets/insights-NK5B6ReS.js +2 -0
  36. package/.output/public/assets/insights-api-BVCXJsoV.js +1 -0
  37. package/.output/public/assets/insights-search-DghCbEnk.js +1 -0
  38. package/.output/public/assets/insights-usage-rpc-CKQH0pUS.js +1 -0
  39. package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +2 -0
  40. package/.output/public/assets/insights_.distribution-DblZM0mO.js +1 -0
  41. package/.output/public/assets/insights_.distribution-dvk6vYDM.js +1 -0
  42. package/.output/public/assets/installations-B674P5Z5.js +2 -0
  43. package/.output/public/assets/installations-BWxczZ2t.js +1 -0
  44. package/.output/public/assets/installations-Dv4kWQYz.js +1 -0
  45. package/.output/public/assets/{key-round-B4fI1psK.js → key-round-DwNKkHhy.js} +1 -1
  46. package/.output/public/assets/link-DTEyW70e.js +2 -0
  47. package/.output/public/assets/{list-Dtj7TtzV.js → list--NIee1FZ.js} +1 -1
  48. package/.output/public/assets/native-builds-BOC71grI.js +1 -0
  49. package/.output/public/assets/native-builds-BswZazmc.js +1 -0
  50. package/.output/public/assets/native-builds-c4BpOLAe.js +2 -0
  51. package/.output/public/assets/native-builds_._buildId-D_Spjl10.js +1 -0
  52. package/.output/public/assets/native-builds_._buildId-DtoXD8rz.js +2 -0
  53. package/.output/public/assets/plus-BReVKct-.js +1 -0
  54. package/.output/public/assets/preload-helper-B44EvKhG.js +1 -0
  55. package/.output/public/assets/{refresh-cw-DjIKjmrS.js → refresh-cw-B9HHjLej.js} +1 -1
  56. package/.output/public/assets/relativeTime-YQt84dYr.js +1 -0
  57. package/.output/public/assets/remote-config-B7ujqhLa.js +6 -0
  58. package/.output/public/assets/remote-config-WjpozBG5.js +1 -0
  59. package/.output/public/assets/remote-config-gXeH6PBW.js +1 -0
  60. package/.output/public/assets/rotate-cw-Cv2aVbYr.js +1 -0
  61. package/.output/public/assets/routes-BDdBIxYS.js +1 -0
  62. package/.output/public/assets/routes-CCD33Azv.js +2 -0
  63. package/.output/public/assets/search-BCel4Oy6.js +1 -0
  64. package/.output/public/assets/select-CBIU0_M1.js +1 -0
  65. package/.output/public/assets/{sidebar-BqX460IW.js → sidebar-Di9SN47G.js} +1 -1
  66. package/.output/public/assets/smartphone-CMaSy_ir.js +1 -0
  67. package/.output/public/assets/styles-Ccxthuz1.css +2 -0
  68. package/.output/public/assets/switch-BpdiHL_t.js +1 -0
  69. package/.output/public/assets/{table-ek1DmRHq.js → table-Bpy3SvSo.js} +1 -1
  70. package/.output/public/assets/{tabs-CgEH_fMT.js → tabs-Xmt7tZeG.js} +1 -1
  71. package/.output/public/assets/{undo-2-DxXx9Zvr.js → undo-2-CUX96_BG.js} +1 -1
  72. package/.output/public/assets/useCompositeListItem-JmyDfo3-.js +1 -0
  73. package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +1 -0
  74. package/.output/public/assets/useMutation-DbYw7boA.js +1 -0
  75. package/.output/public/assets/uuidv7-zXMtwR9Q.js +1 -0
  76. package/.output/public/assets/{valueToPercent-B44vDssN.js → valueToPercent-BLwGy_xK.js} +1 -1
  77. package/.output/server/{__23tanstack-start-server-fn-resolver-KpQ5Z_24.mjs → __23tanstack-start-server-fn-resolver-CygMPYHZ.mjs} +64 -40
  78. package/.output/server/_chunks/ssr-renderer.mjs +2 -2
  79. package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
  80. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
  81. package/.output/server/_libs/lucide-react.mjs +88 -1
  82. package/.output/server/_libs/uqr.mjs +858 -0
  83. package/.output/server/_ssr/-native-builds-search-CwNcoXf4.mjs +37 -0
  84. package/.output/server/_ssr/{BundleIdDisplay-CjSnY65J.mjs → BundleIdDisplay-DOPz4pUS.mjs} +2 -2
  85. package/.output/server/_ssr/{ConsoleFeatureUnavailable-CHxn9f-w.mjs → ConsoleFeatureUnavailable-Xb1JKqcc.mjs} +7 -7
  86. package/.output/server/_ssr/{EventDetails-l6dF54zp.mjs → EventDetails-D7MejFCN.mjs} +8 -8
  87. package/.output/server/_ssr/{HashValueDisplay-Zs7ABoOi.mjs → HashValueDisplay-Dd-wu5rY.mjs} +2 -2
  88. package/.output/server/_ssr/{InsightsPageHeader-ZlAlDxQy.mjs → InsightsPageHeader-CWf1n4Vt.mjs} +13 -11
  89. package/.output/server/_ssr/{NotFoundPage-u28ndvp1.mjs → NotFoundPage-C5rFdUpg.mjs} +2 -2
  90. package/.output/server/_ssr/PlatformIcon-CFLiTjh1.mjs +29 -0
  91. package/.output/server/_ssr/RolloutPercentageBadge-g0Bhfl3M.mjs +21 -0
  92. package/.output/server/_ssr/StoreSubmission-JZ2Zltak.mjs +139 -0
  93. package/.output/server/_ssr/{alert-dialog-B8AqlJwo.mjs → alert-dialog-CvNvTvIJ.mjs} +1 -1
  94. package/.output/server/_ssr/{api-C_0B7NXM.mjs → api-0vtwA5vY.mjs} +126 -7
  95. package/.output/server/_ssr/{api-keys-pRNvn2-9.mjs → api-keys-D5dyA4D1.mjs} +10 -10
  96. package/.output/server/_ssr/{api-keys-rpc-wecWs0nA.mjs → api-keys-rpc-BOIUHhDi.mjs} +5 -5
  97. package/.output/server/_ssr/{api-keys-CLH38u9B.mjs → api-keys-yFlQDwQF.mjs} +2 -2
  98. package/.output/server/_ssr/{api-rpc-DWN8eOHS.mjs → api-rpc-COeFOpYi.mjs} +79 -12
  99. package/.output/server/_ssr/{auth-UP0wXs4i.mjs → auth-Z-wLddzh.mjs} +1 -1
  100. package/.output/server/_ssr/{auth-rpc-CLRArbIl.mjs → auth-rpc-D1ss2GUI.mjs} +6 -6
  101. package/.output/server/_ssr/{auth.server-DR9zc0EU.mjs → auth.server-DYS1OJ6P.mjs} +771 -641
  102. package/.output/server/_ssr/{badge-BpT7r-ng.mjs → badge-CEdVRgyl.mjs} +1 -1
  103. package/.output/server/_ssr/{bundleActivity-0qFIcvqt.mjs → bundleActivity-MLrjNJCT.mjs} +1 -1
  104. package/.output/server/_ssr/{config-WVX4IxSR.mjs → config-CjIBFhJX.mjs} +1 -1
  105. package/.output/server/_ssr/config.server-NnMFjMFX.mjs +43 -0
  106. package/.output/server/_ssr/{console-access-aUpQs49I.mjs → console-access-33BNlH97.mjs} +3 -3
  107. package/.output/server/_ssr/{console-features-4xAGfZHw.mjs → console-features-BTV-XuhQ.mjs} +1 -1
  108. package/.output/server/_ssr/{console-features-api-DSSgCV3v.mjs → console-features-api-v1fSycue.mjs} +6 -6
  109. package/.output/server/_ssr/{console-features-rpc-D6kMlR2A.mjs → console-features-rpc-C7XNVqm0.mjs} +5 -5
  110. package/.output/server/_ssr/createCsrfMiddleware-BwHbC8n-.mjs +159 -0
  111. package/.output/server/_ssr/createMiddleware-C3ACsfuG.mjs +24 -0
  112. package/.output/server/_ssr/{createMiddleware-B1iPez7u.mjs → createServerFn-AQvBMBjJ.mjs} +2 -23
  113. package/.output/server/_ssr/{createServerRpc-BaDJLGBx.mjs → createServerRpc-BVvRVOz5.mjs} +2 -2
  114. package/.output/server/_ssr/{databaseConfig-C5SkAyUy.mjs → databaseConfig-B_Bg7qS5.mjs} +1 -1
  115. package/.output/server/_ssr/{databaseJsonValue-Csbuzc9Q.mjs → databaseJsonValue-kS7cvEtz.mjs} +1 -1
  116. package/.output/server/_ssr/{databaseRows-CPphvbag.mjs → databaseRows-B6H8Cmgq.mjs} +3 -3
  117. package/.output/server/_ssr/{dialog-B4ALf7NJ.mjs → dialog-C8CS8RMt.mjs} +1 -1
  118. package/.output/server/_ssr/{dist-CbQbBIw-.mjs → dist-TEpM_UAD.mjs} +125 -125
  119. package/.output/server/_ssr/{downloadBundle-94jPBGSO.mjs → downloadBundle-DCmr7vsj.mjs} +1 -1
  120. package/.output/server/_ssr/{empty-Bh1FEeYF.mjs → empty-CkdEAvCY.mjs} +2 -2
  121. package/.output/server/_ssr/{empty-plugin-adapters-CpCHi1TV.mjs → empty-plugin-adapters-zrZ0xs6n.mjs} +1 -1
  122. package/.output/server/_ssr/{failureReports-Bh22wois.mjs → failureReports-Cn_zU9S8.mjs} +3 -3
  123. package/.output/server/_ssr/{field-HKCaPH3e.mjs → field-CW08sZXd.mjs} +2 -2
  124. package/.output/server/_ssr/{getBundleChildren-DfxB2K8D.mjs → getBundleChildren-rtkEEJw5.mjs} +2 -2
  125. package/.output/server/_ssr/git-CTA8Aqr0.mjs +56 -0
  126. package/.output/server/_ssr/{input-group-xm3LzDuq.mjs → input-group-D-TpFPuG.mjs} +1 -1
  127. package/.output/server/_ssr/{insights-BKZpJ_K4.mjs → insights-CMyzPs8l.mjs} +28 -27
  128. package/.output/server/_ssr/{insights-CCyTACIw.mjs → insights-CYeBl8N9.mjs} +5 -5
  129. package/.output/server/_ssr/{insights-CNqWQLJR.mjs → insights-DAi9KknT.mjs} +2 -2
  130. package/.output/server/_ssr/{insights-api-DtRFz5X3.mjs → insights-api-BFARQ5ct.mjs} +6 -6
  131. package/.output/server/_ssr/{insights-errors-Iy-lBaM7.mjs → insights-errors-7BCwFybo.mjs} +2 -2
  132. package/.output/server/_ssr/{insights-failures-BJN3RfLu.mjs → insights-failures-B9VPkzZE.mjs} +2 -2
  133. package/.output/server/_ssr/{insights-failures-rpc-DLZ91uOG.mjs → insights-failures-rpc-Q4WNNJkU.mjs} +12 -12
  134. package/.output/server/_ssr/{insights-recovery-BUuQdlA3.mjs → insights-recovery-BtXVU3ro.mjs} +1 -1
  135. package/.output/server/_ssr/{insights-recovery-rpc-BQHUhPi7.mjs → insights-recovery-rpc-CY5RYJKa.mjs} +8 -8
  136. package/.output/server/_ssr/{insights-rpc-C6Vukyn7.mjs → insights-rpc-BO7_evvs.mjs} +5 -5
  137. package/.output/server/_ssr/{insights-search-CBYoxT7v.mjs → insights-search-DKfxgHD3.mjs} +5 -5
  138. package/.output/server/_ssr/{insights-usage-CHqvtehH.mjs → insights-usage-DiGnuxW8.mjs} +1 -1
  139. package/.output/server/_ssr/{insights-usage-rpc-BJ7a-xco.mjs → insights-usage-rpc-B4czku50.mjs} +8 -8
  140. package/.output/server/_ssr/{insights-usage-rpc-C-lNUIsD.mjs → insights-usage-rpc-CUCTFska.mjs} +5 -5
  141. package/.output/server/_ssr/{insightsUsage-COUG-_-U.mjs → insightsUsage-ClAmoUz8.mjs} +3 -3
  142. package/.output/server/_ssr/{insights_.distribution-DmLW8I8a.mjs → insights_.distribution-BDeUhZGj.mjs} +2 -2
  143. package/.output/server/_ssr/{insights_.distribution-CTwilMPm.mjs → insights_.distribution-BRrbZN1X.mjs} +5 -5
  144. package/.output/server/_ssr/{insights_.distribution-DztDyrBj.mjs → insights_.distribution-C2MXpzKd.mjs} +15 -14
  145. package/.output/server/_ssr/{installations-Bct7ag5y.mjs → installations-BVk7okiY.mjs} +4 -4
  146. package/.output/server/_ssr/{installations-B6MK5iA8.mjs → installations-BjLMgBoH.mjs} +2 -2
  147. package/.output/server/_ssr/{installations-_N4PtYFl.mjs → installations-DxGZEC5G.mjs} +12 -12
  148. package/.output/server/_ssr/{listReleases-BfUBlCHo.mjs → listReleases-D_GY00SQ.mjs} +1 -1
  149. package/.output/server/_ssr/native-builds-CSCgFB21.mjs +10 -0
  150. package/.output/server/_ssr/native-builds-CdlyAldW.mjs +569 -0
  151. package/.output/server/_ssr/native-builds-DhXL5zf_.mjs +137 -0
  152. package/.output/server/_ssr/native-builds_._buildId-CMp1h8dT.mjs +10 -0
  153. package/.output/server/_ssr/native-builds_._buildId-GHpGaYyE.mjs +813 -0
  154. package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +59 -0
  155. package/.output/server/_ssr/nativeBuilds-B_7BPjt_.mjs +133 -0
  156. package/.output/server/_ssr/{plugins-BaD1slHx.mjs → plugins-RIryUNWj.mjs} +6 -5
  157. package/.output/server/_ssr/qr-code-C7kNRIDX.mjs +22 -0
  158. package/.output/server/_ssr/{release-adoption-DuYJTGuX.mjs → release-adoption-DoAtNPED.mjs} +2 -2
  159. package/.output/server/_ssr/{release-adoption-rpc-CHl7G_Zy.mjs → release-adoption-rpc-BJXZvtoQ.mjs} +10 -10
  160. package/.output/server/_ssr/{releaseAdoption-B39cpvfo.mjs → releaseAdoption-a2byXMfz.mjs} +4 -4
  161. package/.output/server/_ssr/releaseCatalogCompiler-DLcean2k.mjs +364 -0
  162. package/.output/server/_ssr/{releaseManagement-DFMUnDF5.mjs → releaseManagement-DHUux2az.mjs} +1 -1
  163. package/.output/server/_ssr/{releaseReachability-bFsuElSS.mjs → releaseReachability-DZOK_dH-.mjs} +2 -2
  164. package/.output/server/_ssr/{remote-config-Mj05qVYZ.mjs → remote-config-DjsEl270.mjs} +20 -19
  165. package/.output/server/_ssr/{remote-config-10-obSZ0.mjs → remote-config-DlyyohL2.mjs} +2 -2
  166. package/.output/server/_ssr/{remote-config-Dj1eTYi4.mjs → remote-config-XdYuByHz.mjs} +2 -2
  167. package/.output/server/_ssr/{remote-config-rpc-lteqDSLn.mjs → remote-config-rpc-GMLPb-90.mjs} +6 -6
  168. package/.output/server/_ssr/request-guard-CPdRBuGW.mjs +108 -0
  169. package/.output/server/_ssr/{router-Dr4jjjhx.mjs → router-vpxd56RW.mjs} +317 -71
  170. package/.output/server/_ssr/{routes-BZbrY_qw.mjs → routes-DyEM4b3x.mjs} +14 -14
  171. package/.output/server/_ssr/{routes-B5KrCDwk.mjs → routes-dQe3XhiS.mjs} +99 -81
  172. package/.output/server/_ssr/{runtime.server-DsHqVqTr.mjs → runtime.server-BdMY1blX.mjs} +4 -4
  173. package/.output/server/_ssr/schema-ChlRtZIo.mjs +23 -0
  174. package/.output/server/_ssr/schema-migration-rpc-BfGzEK_o.mjs +65 -0
  175. package/.output/server/_ssr/{select-BtdGNSmp.mjs → select-DM1uwtk9.mjs} +3 -27
  176. package/.output/server/_ssr/{server-BxaHSwHh.mjs → server-BUUKNSPI.mjs} +7 -161
  177. package/.output/server/_ssr/{sidebar-CVsgosaD.mjs → sidebar-DB2YQlok.mjs} +4 -4
  178. package/.output/server/_ssr/ssr.mjs +1 -1
  179. package/.output/server/_ssr/start-BvDsQehg.mjs +49 -0
  180. package/.output/server/_ssr/{switch-BmARgkUP.mjs → switch-DLD58zLy.mjs} +2 -2
  181. package/.output/server/_ssr/{table-M5P3YUfY.mjs → table-P4TnAZhl.mjs} +1 -1
  182. package/.output/server/_ssr/{tabs-CrmfOlJj.mjs → tabs-B7ZeLicF.mjs} +2 -2
  183. package/.output/server/_ssr/{updateFailures-z1IQy_4q.mjs → updateFailures-n-tGv90S.mjs} +3 -3
  184. package/.output/server/_ssr/{uuidv7-C88s9jWF.mjs → uuidv7-BIF4nb_q.mjs} +2 -2
  185. package/.output/server/_ssr/{schema-BiAVyEj2.mjs → version-CQ98ZBpL-CWSkTT9J.mjs} +2 -22
  186. package/.output/server/_tanstack-start-manifest_v-C-KC63Zq.mjs +184 -0
  187. package/.output/server/index.mjs +432 -271
  188. package/lib/vite-internal.mjs +32 -1
  189. package/package.json +8 -7
  190. package/src/components/AppSidebar.tsx +12 -1
  191. package/src/components/ConsoleAccessPage.tsx +49 -3
  192. package/src/components/QrCode.tsx +35 -0
  193. package/src/components/SchemaMigrationRequired.tsx +139 -0
  194. package/src/components/features/insights/BuiltinBundle.tsx +5 -3
  195. package/src/components/features/native-builds/BuiltInBundleCard.tsx +163 -0
  196. package/src/components/features/native-builds/CommitLink.tsx +30 -0
  197. package/src/components/features/native-builds/CopyableText.tsx +48 -0
  198. package/src/components/features/native-builds/ImportBuild.tsx +91 -0
  199. package/src/components/features/native-builds/InstallCard.tsx +205 -0
  200. package/src/components/features/native-builds/NativeBuildDetailPage.tsx +175 -0
  201. package/src/components/features/native-builds/NativeBuildsPage.tsx +151 -0
  202. package/src/components/features/native-builds/NativeBuildsTable.tsx +426 -0
  203. package/src/components/features/native-builds/PatchesCard.tsx +222 -0
  204. package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +101 -0
  205. package/src/components/features/native-builds/ServedNowCard.tsx +214 -0
  206. package/src/components/features/native-builds/ShortHash.tsx +41 -0
  207. package/src/components/features/native-builds/StoreSubmission.tsx +73 -0
  208. package/src/components/features/releases/ReleaseEditorSheet.tsx +8 -0
  209. package/src/lib/api-rpc.ts +98 -0
  210. package/src/lib/api.ts +120 -0
  211. package/src/lib/native-builds.ts +162 -0
  212. package/src/lib/qr-code.ts +16 -0
  213. package/src/lib/schema-migration-api.ts +54 -0
  214. package/src/lib/schema-migration-rpc.ts +26 -0
  215. package/src/lib/schema-migration.ts +101 -0
  216. package/src/lib/server/config.server.ts +23 -14
  217. package/src/lib/server/console-runtime.server.ts +4 -6
  218. package/src/lib/server/local-console.ts +164 -0
  219. package/src/lib/server/nativeBuildQr.ts +73 -0
  220. package/src/lib/server/nativeBuilds.ts +288 -0
  221. package/src/lib/shell.ts +9 -0
  222. package/src/routeTree.gen.ts +88 -1
  223. package/src/router.tsx +11 -1
  224. package/src/routes/-native-builds-search.ts +51 -0
  225. package/src/routes/[_]hot-updater/native-builds/qr.ts +14 -0
  226. package/src/routes/__root.tsx +11 -1
  227. package/src/routes/api/native-builds/$buildId/download.ts +50 -0
  228. package/src/routes/native-builds.tsx +21 -0
  229. package/src/routes/native-builds_.$buildId.tsx +23 -0
  230. package/src/start.ts +33 -0
  231. package/src/virtual-modules.d.ts +18 -0
  232. package/src/vite-internal.ts +57 -1
  233. package/.output/public/assets/EventDetails-gbD_fCqc.js +0 -1
  234. package/.output/public/assets/HashValueDisplay-BGkDPaYi.js +0 -1
  235. package/.output/public/assets/InsightsPageHeader-BRw8XkJW.js +0 -1
  236. package/.output/public/assets/NotFoundPage-Cei6W2lm.js +0 -1
  237. package/.output/public/assets/alert-dialog-BtVg50WQ.js +0 -1
  238. package/.output/public/assets/api-DoicFJfd.js +0 -1
  239. package/.output/public/assets/api-keys-D81VHHNM.js +0 -1
  240. package/.output/public/assets/api-keys-Dia6i8K1.js +0 -1
  241. package/.output/public/assets/arrow-left-DsivSewE.js +0 -1
  242. package/.output/public/assets/arrow-up-right-B5aM0F7f.js +0 -1
  243. package/.output/public/assets/badge-Bqf3UDee.js +0 -1
  244. package/.output/public/assets/circle-off-BsbZQtsF.js +0 -1
  245. package/.output/public/assets/console-features-api-DPE4C06Y.js +0 -2
  246. package/.output/public/assets/dialog-CGKPxz3n.js +0 -1
  247. package/.output/public/assets/index-DrkdiRIn.js +0 -10
  248. package/.output/public/assets/insights-C-5t8wh2.js +0 -2
  249. package/.output/public/assets/insights-D_ngQdiz.js +0 -1
  250. package/.output/public/assets/insights-KigRBDgC.js +0 -42
  251. package/.output/public/assets/insights-api-1ZjVu3Sb.js +0 -1
  252. package/.output/public/assets/insights-search-aT8BVCci.js +0 -1
  253. package/.output/public/assets/insights-usage-rpc-DqTiXI1_.js +0 -1
  254. package/.output/public/assets/insights_.distribution-Bzl6RFBR.js +0 -2
  255. package/.output/public/assets/insights_.distribution-Cthgttqb.js +0 -1
  256. package/.output/public/assets/insights_.distribution-D2c2v1bu.js +0 -1
  257. package/.output/public/assets/installations-2Nx8Htf-.js +0 -1
  258. package/.output/public/assets/installations-BskJ1xQr.js +0 -2
  259. package/.output/public/assets/installations-K2iJ_r0h.js +0 -1
  260. package/.output/public/assets/remote-config-D9X3NiwV.js +0 -6
  261. package/.output/public/assets/remote-config-DzOOiBIO.js +0 -1
  262. package/.output/public/assets/remote-config-ikg7kak0.js +0 -1
  263. package/.output/public/assets/routes-9rb9P5Y7.js +0 -2
  264. package/.output/public/assets/routes-P7683vKQ.js +0 -1
  265. package/.output/public/assets/search-DuI1FBpg.js +0 -1
  266. package/.output/public/assets/select-M3H2gxCc.js +0 -1
  267. package/.output/public/assets/smartphone-CtsHuiIC.js +0 -1
  268. package/.output/public/assets/styles-CpiW_YdW.css +0 -2
  269. package/.output/public/assets/switch-By_vfm8I.js +0 -1
  270. package/.output/public/assets/useCompositeListItem-B-UkrDlu.js +0 -1
  271. package/.output/server/_ssr/config.server-DTdsG47T.mjs +0 -35
  272. package/.output/server/_ssr/start-B6ECIE_7.mjs +0 -4
  273. package/.output/server/_tanstack-start-manifest_v-_BY9hYTm.mjs +0 -136
@@ -0,0 +1,59 @@
1
+ import { w as isUUIDv7 } from "./dist-TEpM_UAD.mjs";
2
+ import { s as nativeBuildDownloadPath } from "./native-builds-DhXL5zf_.mjs";
3
+ import { t as qrCodePath } from "./qr-code-C7kNRIDX.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/nativeBuildQr-84cnFQPX.js
5
+ /** The header that carries the download URL the QR code holds. */
6
+ var DOWNLOAD_URL_HEADER = "x-hot-updater-download-url";
7
+ /** The pixel size of one module, so the image is legible at its own size. */
8
+ var MODULE_PX = 6;
9
+ var refusal = (status, message) => new Response(message, {
10
+ status,
11
+ headers: {
12
+ "cache-control": "no-store",
13
+ "content-type": "text/plain; charset=utf-8"
14
+ }
15
+ });
16
+ /**
17
+ * The URL of a native build's console download, under the console path the
18
+ * QR request came to: the console answers it with a fresh storage URL on
19
+ * each request, so it never expires.
20
+ */
21
+ var nativeBuildDownloadUrl = (request, id) => {
22
+ const url = new URL(request.url);
23
+ const base = url.pathname.endsWith("/_hot-updater/native-builds/qr") ? url.pathname.slice(0, -30) : "";
24
+ return `${url.origin}${base}${nativeBuildDownloadPath(id)}`;
25
+ };
26
+ /**
27
+ * The QR code of a native build's download URL, `<console>/api/native-builds/
28
+ * <id>/download`, as an SVG image, served at
29
+ * `/_hot-updater/native-builds/qr?build=<id>` without a session: a pull
30
+ * request comment shows it, and GitHub fetches a comment's images
31
+ * anonymously. It reads nothing, no database and no storage, so it says
32
+ * nothing about whether the build exists; the download itself asks for the
33
+ * session. The response's `x-hot-updater-download-url` header is the URL.
34
+ *
35
+ * - 400: `build` is missing or not a UUIDv7;
36
+ * - 405: a method other than GET or HEAD.
37
+ */
38
+ var serveNativeBuildQr = (request) => {
39
+ if (request.method !== "GET" && request.method !== "HEAD") {
40
+ const response = refusal(405, "Method Not Allowed");
41
+ response.headers.set("allow", "GET, HEAD");
42
+ return response;
43
+ }
44
+ const id = new URL(request.url).searchParams.get("build");
45
+ if (id === null || !isUUIDv7(id)) return refusal(400, "Pass ?build=<native build ID>.");
46
+ const downloadUrl = nativeBuildDownloadUrl(request, id);
47
+ const { size, path } = qrCodePath(downloadUrl);
48
+ const pixels = size * MODULE_PX;
49
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${pixels}" height="${pixels}" viewBox="0 0 ${size} ${size}" shape-rendering="crispEdges"><rect fill="#fff" width="${size}" height="${size}"/><path fill="#000" d="${path}"/></svg>`;
50
+ return new Response(request.method === "HEAD" ? null : svg, { headers: {
51
+ "cache-control": "public, max-age=86400",
52
+ "content-type": "image/svg+xml",
53
+ "content-security-policy": "default-src 'none'",
54
+ "x-content-type-options": "nosniff",
55
+ [DOWNLOAD_URL_HEADER]: downloadUrl
56
+ } });
57
+ };
58
+ //#endregion
59
+ export { serveNativeBuildQr };
@@ -0,0 +1,133 @@
1
+ import { a as nativeBuildCatalogScopeKey, l as nativeBuildScope, o as nativeBuildChannel } from "./native-builds-DhXL5zf_.mjs";
2
+ import { n as projectCompiledCatalog } from "./releaseCatalogCompiler-DLcean2k.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/nativeBuilds-B_7BPjt_.js
4
+ /**
5
+ * One page newest first, from one keyset read: newest first for the next
6
+ * page, oldest first (then reversed) for the previous one. `next` is set
7
+ * for a full page, so the last page may lead to an empty one.
8
+ */
9
+ async function keysetPage(read, keyOf, { before, after, limit }) {
10
+ const data = after === void 0 ? await read({
11
+ order: "desc",
12
+ limit,
13
+ ...before === void 0 ? {} : { after: before }
14
+ }) : [...await read({
15
+ order: "asc",
16
+ after,
17
+ limit
18
+ })].reverse();
19
+ const first = data[0];
20
+ const last = data.at(-1);
21
+ const full = data.length === limit;
22
+ return {
23
+ data,
24
+ ...last !== void 0 && (after !== void 0 || full) ? { next: keyOf(last) } : {},
25
+ ...first !== void 0 && (after === void 0 ? before : full) ? { previous: keyOf(first) } : {}
26
+ };
27
+ }
28
+ /**
29
+ * One page of native builds, newest first: one read of the registry's ID
30
+ * index, or of its channel index for one channel's builds.
31
+ */
32
+ function listNativeBuilds(core, { channelId, ...page }) {
33
+ return keysetPage((input) => core.listNativeBuilds({
34
+ ...input,
35
+ ...channelId === void 0 ? {} : { channelId }
36
+ }), ({ id }) => id, page);
37
+ }
38
+ /** How many patches one page of a build's patches lists. */
39
+ var NATIVE_BUILD_PATCH_PAGE_SIZE = 20;
40
+ /**
41
+ * One page of the patches from a built-in bundle, newest target first: one
42
+ * read of the patches index. The patch rows carry what the page shows, so
43
+ * no bundle is read.
44
+ */
45
+ function listNativeBuildPatches(core, minBundleId, page) {
46
+ return keysetPage(async (input) => (await core.listPatchesFromBase(minBundleId, input)).map(({ bundle_id, byte_size }) => ({
47
+ bundleId: bundle_id,
48
+ byteSize: byte_size
49
+ })), ({ bundleId }) => bundleId, page);
50
+ }
51
+ /**
52
+ * Everything a native build's page shows, in five reads whatever the
53
+ * build: the build, then its built-in bundle, its scope's newest build, its
54
+ * scope's catalog, and one page of patches from it. Null for an unknown ID.
55
+ */
56
+ async function getNativeBuildDetail(core, id) {
57
+ const build = await core.getNativeBuild(id);
58
+ if (build === null) return null;
59
+ const catalogScopeKey = nativeBuildCatalogScopeKey(build);
60
+ const [builtIn, newestInScope, catalog, patches] = await Promise.all([
61
+ core.getBundle(build.min_bundle_id),
62
+ core.findNativeBuild(nativeBuildScope(build)),
63
+ core.getReleaseCatalogRow(catalogScopeKey),
64
+ listNativeBuildPatches(core, build.min_bundle_id, { limit: 20 })
65
+ ]);
66
+ const servedNow = catalog === null || catalog.is_tombstone ? [] : projectCompiledCatalog(JSON.parse(catalog.payload), build.app_version ?? void 0).filter(({ bundleId }) => bundleId !== null && bundleId >= build.min_bundle_id);
67
+ return {
68
+ build,
69
+ channel: nativeBuildChannel(build),
70
+ catalogScopeKey,
71
+ builtInBundle: builtIn === null ? null : { childCount: builtIn.childCount },
72
+ newestInScope,
73
+ servedNow,
74
+ patches
75
+ };
76
+ }
77
+ var protocolOf = (storageUri) => new URL(storageUri).protocol.replace(":", "");
78
+ /** The storage that holds `storageUri`, by its protocol. */
79
+ var storageFor = (storage, storageUri) => storage.protocol === protocolOf(storageUri) ? storage : void 0;
80
+ /** A public URL no storage owns, which is its own download URL. */
81
+ var isPublicUrl = (storageUri) => ["http", "https"].includes(protocolOf(storageUri));
82
+ /**
83
+ * The URL a phone downloads a native build's artifact from, without the
84
+ * console's sign-in: the storage's download URL, which may expire. Null
85
+ * when the storage gives none, or the build is gone.
86
+ */
87
+ async function resolveNativeBuildDownloadUrl(id, { core, storage }) {
88
+ const build = await core.getNativeBuild(id);
89
+ if (build === null) return null;
90
+ const storageUri = build.artifact_storage_uri;
91
+ const adapter = storageFor(storage, storageUri);
92
+ if (adapter?.getDownloadUrl !== void 0) return (await adapter.getDownloadUrl({ storageUri })).url;
93
+ return adapter === void 0 && isPublicUrl(storageUri) ? storageUri : null;
94
+ }
95
+ /**
96
+ * Downloads a native build's artifact: a redirect to the storage's download
97
+ * URL, or the object streamed through the console when the storage gives
98
+ * no URL. The redirect is resolved on each request, so the console's link
99
+ * never expires.
100
+ */
101
+ async function downloadNativeBuild(id, { core, storage }) {
102
+ const build = await core.getNativeBuild(id);
103
+ if (build === null) return new Response("Build not found", { status: 404 });
104
+ const storageUri = build.artifact_storage_uri;
105
+ const adapter = storageFor(storage, storageUri);
106
+ if (adapter?.getDownloadUrl !== void 0) {
107
+ const { url } = await adapter.getDownloadUrl({ storageUri });
108
+ return new Response(null, {
109
+ headers: {
110
+ "cache-control": "private, no-store",
111
+ location: url
112
+ },
113
+ status: 302
114
+ });
115
+ }
116
+ if (adapter?.get !== void 0) {
117
+ const { response } = await adapter.get({ storageUri });
118
+ if (!response) return new Response("Storage object not found", { status: 404 });
119
+ const fileName = decodeURIComponent(storageUri.split("/").at(-1) ?? "");
120
+ const headers = new Headers(response.headers);
121
+ headers.set("cache-control", "private, no-store");
122
+ headers.set("content-disposition", `attachment; filename*=UTF-8''${encodeURIComponent(fileName)}`);
123
+ return new Response(response.body, {
124
+ headers,
125
+ status: response.status,
126
+ statusText: response.statusText
127
+ });
128
+ }
129
+ if (adapter === void 0 && isPublicUrl(storageUri)) return Response.redirect(storageUri, 302);
130
+ return new Response(`No storage adapter for protocol: ${protocolOf(storageUri)}`, { status: 503 });
131
+ }
132
+ //#endregion
133
+ export { NATIVE_BUILD_PATCH_PAGE_SIZE, downloadNativeBuild, getNativeBuildDetail, listNativeBuildPatches, listNativeBuilds, resolveNativeBuildDownloadUrl };
@@ -1,10 +1,11 @@
1
- import { i as isDatabaseJsonObject, t as DatabaseAdapterInputError } from "./databaseJsonValue-Csbuzc9Q.mjs";
2
- import { C as isUUIDv7, T as normalizeCohortValue, g as getNumericCohortValue, h as getNumericCohortRolloutPosition, w as isValidCohort } from "./dist-CbQbBIw-.mjs";
1
+ import { i as isDatabaseJsonObject, t as DatabaseAdapterInputError } from "./databaseJsonValue-kS7cvEtz.mjs";
2
+ import { E as normalizeCohortValue, T as isValidCohort, _ as getNumericCohortValue, g as getNumericCohortRolloutPosition, w as isUUIDv7 } from "./dist-TEpM_UAD.mjs";
3
3
  import { t as __exportAll } from "./rolldown-runtime-rSIU-vHC.mjs";
4
- import { t as createUUIDv7 } from "./uuidv7-C88s9jWF.mjs";
5
- import { c as satisfies, i as defineTable, r as defineAggregate, t as coerce } from "./schema-BiAVyEj2.mjs";
4
+ import { t as createUUIDv7 } from "./uuidv7-BIF4nb_q.mjs";
5
+ import { o as satisfies, t as coerce } from "./version-CQ98ZBpL-CWSkTT9J.mjs";
6
+ import { n as defineTable, t as defineAggregate } from "./schema-ChlRtZIo.mjs";
6
7
  import { t as isValidRange } from "../_libs/verkit.mjs";
7
- //#region node_modules/.nitro/vite/services/ssr/assets/plugins-BaD1slHx.js
8
+ //#region node_modules/.nitro/vite/services/ssr/assets/plugins-RIryUNWj.js
8
9
  var semverSatisfies = (targetAppVersion, currentVersion) => {
9
10
  const currentCoerce = coerce(currentVersion);
10
11
  if (!currentCoerce) return false;
@@ -0,0 +1,22 @@
1
+ import { t as encode } from "../_libs/uqr.mjs";
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/qr-code-C7kNRIDX.js
3
+ /**
4
+ * A QR code of `value` as one SVG path of unit squares, with the standard
5
+ * four-module quiet zone: `size` is the side of its viewBox.
6
+ */
7
+ var qrCodePath = (value) => {
8
+ const { data, size } = encode(value, {
9
+ ecc: "M",
10
+ border: 4
11
+ });
12
+ let path = "";
13
+ data.forEach((row, y) => row.forEach((dark, x) => {
14
+ if (dark) path += `M${x} ${y}h1v1h-1z`;
15
+ }));
16
+ return {
17
+ size,
18
+ path
19
+ };
20
+ };
21
+ //#endregion
22
+ export { qrCodePath as t };
@@ -1,5 +1,5 @@
1
- import { r as recoveryWindows } from "./insights-recovery-BUuQdlA3.mjs";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/release-adoption-DuYJTGuX.js
1
+ import { r as recoveryWindows } from "./insights-recovery-BtXVU3ro.mjs";
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/release-adoption-DoAtNPED.js
3
3
  /** A crash rate at which Release health recommends rolling a bundle back. */
4
4
  var CRASH_RATE_THRESHOLD = .05;
5
5
  var HOUR_MS = 36e5;
@@ -1,15 +1,15 @@
1
- import { u as createServerFn } from "./createMiddleware-B1iPez7u.mjs";
2
- import { t as consoleAccess } from "./console-access-aUpQs49I.mjs";
3
- import { t as createServerRpc } from "./createServerRpc-BaDJLGBx.mjs";
4
- import { a as readAdoptionReleasesInput, i as readAdoptionReleaseInput, o as readBundleEventsInput } from "./release-adoption-DuYJTGuX.mjs";
5
- //#region node_modules/.nitro/vite/services/ssr/assets/release-adoption-rpc-CHl7G_Zy.js
1
+ import { l as createServerFn } from "./createServerFn-AQvBMBjJ.mjs";
2
+ import { t as consoleAccess } from "./console-access-33BNlH97.mjs";
3
+ import { t as createServerRpc } from "./createServerRpc-BVvRVOz5.mjs";
4
+ import { a as readAdoptionReleasesInput, i as readAdoptionReleaseInput, o as readBundleEventsInput } from "./release-adoption-DoAtNPED.mjs";
5
+ //#region node_modules/.nitro/vite/services/ssr/assets/release-adoption-rpc-BJXZvtoQ.js
6
6
  var listAdoptionReleasesRpc_createServerFn_handler = createServerRpc({
7
7
  id: "d11a48f7251928b7819e2376aed4902fa66277bf6d30312d87ca53468332f256",
8
8
  name: "listAdoptionReleasesRpc",
9
9
  filename: "src/lib/release-adoption-rpc.ts"
10
10
  }, (opts) => listAdoptionReleasesRpc.__executeServer(opts));
11
11
  var listAdoptionReleasesRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator(readAdoptionReleasesInput).handler(listAdoptionReleasesRpc_createServerFn_handler, async ({ data }) => {
12
- const [{ prepareConfig }, { listAdoptionReleases }] = await Promise.all([import("./config.server-DTdsG47T.mjs"), import("./releaseAdoption-B39cpvfo.mjs")]);
12
+ const [{ prepareConfig }, { listAdoptionReleases }] = await Promise.all([import("./config.server-NnMFjMFX.mjs"), import("./releaseAdoption-a2byXMfz.mjs")]);
13
13
  const { core } = await prepareConfig();
14
14
  return listAdoptionReleases(core, data);
15
15
  });
@@ -19,7 +19,7 @@ var getAdoptionReleaseRpc_createServerFn_handler = createServerRpc({
19
19
  filename: "src/lib/release-adoption-rpc.ts"
20
20
  }, (opts) => getAdoptionReleaseRpc.__executeServer(opts));
21
21
  var getAdoptionReleaseRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator(readAdoptionReleaseInput).handler(getAdoptionReleaseRpc_createServerFn_handler, async ({ data }) => {
22
- const [{ prepareConfig }, { getAdoptionRelease }] = await Promise.all([import("./config.server-DTdsG47T.mjs"), import("./releaseAdoption-B39cpvfo.mjs")]);
22
+ const [{ prepareConfig }, { getAdoptionRelease }] = await Promise.all([import("./config.server-NnMFjMFX.mjs"), import("./releaseAdoption-a2byXMfz.mjs")]);
23
23
  const { core } = await prepareConfig();
24
24
  return getAdoptionRelease(core, data);
25
25
  });
@@ -30,9 +30,9 @@ var getBundleEventsRpc_createServerFn_handler = createServerRpc({
30
30
  }, (opts) => getBundleEventsRpc.__executeServer(opts));
31
31
  var getBundleEventsRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator(readBundleEventsInput).handler(getBundleEventsRpc_createServerFn_handler, async ({ data }) => {
32
32
  const [{ prepareConfig }, { getBundleEvents }, { requireFeature }] = await Promise.all([
33
- import("./config.server-DTdsG47T.mjs"),
34
- import("./releaseAdoption-B39cpvfo.mjs"),
35
- import("./runtime.server-DsHqVqTr.mjs")
33
+ import("./config.server-NnMFjMFX.mjs"),
34
+ import("./releaseAdoption-a2byXMfz.mjs"),
35
+ import("./runtime.server-BdMY1blX.mjs")
36
36
  ]);
37
37
  const { runtime } = await prepareConfig();
38
38
  return getBundleEvents(await requireFeature(runtime, "insightsAnalytics"), data);
@@ -1,7 +1,7 @@
1
- import { t as addReleaseReachability } from "./releaseReachability-bFsuElSS.mjs";
2
- import { r as recoveryWindows, t as insightsPeriodEnd } from "./insights-recovery-BUuQdlA3.mjs";
3
- import { a as readAdoptionReleasesInput, i as readAdoptionReleaseInput, o as readBundleEventsInput } from "./release-adoption-DuYJTGuX.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/releaseAdoption-B39cpvfo.js
1
+ import { t as addReleaseReachability } from "./releaseReachability-DZOK_dH-.mjs";
2
+ import { r as recoveryWindows, t as insightsPeriodEnd } from "./insights-recovery-BtXVU3ro.mjs";
3
+ import { a as readAdoptionReleasesInput, i as readAdoptionReleaseInput, o as readBundleEventsInput } from "./release-adoption-DoAtNPED.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/releaseAdoption-a2byXMfz.js
5
5
  /** Rows read past a focused release to find the bundle before it. */
6
6
  var PREVIOUS_ROWS = 4;
7
7
  var platformsOf = (platform) => platform === "all" ? ["ios", "android"] : [platform];
@@ -0,0 +1,364 @@
1
+ import { D as normalizeRolloutCohortCount, E as normalizeCohortValue, S as isCustomCohort, _ as getNumericCohortValue, a as RELEASE_CATALOG_FALLBACK_POLICY, n as MAX_COMPILED_CATALOG_BYTES, s as canonicalizeAppVersion, w as isUUIDv7, x as getRolledOutNumericCohorts } from "./dist-TEpM_UAD.mjs";
2
+ import { a as parseRange, n as compare, r as normalize } from "./version-CQ98ZBpL-CWSkTT9J.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/releaseCatalogCompiler-DLcean2k.js
4
+ var ReleaseCatalogCompilationError = class extends Error {
5
+ code;
6
+ constructor(code, message) {
7
+ super(message);
8
+ this.name = "ReleaseCatalogCompilationError";
9
+ this.code = code;
10
+ }
11
+ };
12
+ function compareBounds(left, right) {
13
+ return compare(left, right);
14
+ }
15
+ function strongerLower(current, candidate) {
16
+ if (current === null) return candidate;
17
+ const compared = compareBounds(candidate.version, current.version);
18
+ if (compared > 0) return candidate;
19
+ if (compared < 0) return current;
20
+ return {
21
+ version: current.version,
22
+ inclusive: current.inclusive && candidate.inclusive
23
+ };
24
+ }
25
+ function strongerUpper(current, candidate) {
26
+ if (current === null) return candidate;
27
+ const compared = compareBounds(candidate.version, current.version);
28
+ if (compared < 0) return candidate;
29
+ if (compared > 0) return current;
30
+ return {
31
+ version: current.version,
32
+ inclusive: current.inclusive && candidate.inclusive
33
+ };
34
+ }
35
+ function comparatorVersion(comparator) {
36
+ const version = comparator.version && normalize(comparator.version);
37
+ if (version === null) throw new ReleaseCatalogCompilationError("INVALID_TARGET_RANGE", `Invalid comparator: ${comparator.value}`);
38
+ return version;
39
+ }
40
+ function comparatorSetToInterval(comparators) {
41
+ let lower = null;
42
+ let upper = null;
43
+ for (const comparator of comparators) {
44
+ if (comparator.version === null) continue;
45
+ const version = comparatorVersion(comparator);
46
+ if (comparator.operator === "") {
47
+ lower = strongerLower(lower, {
48
+ inclusive: true,
49
+ version
50
+ });
51
+ upper = strongerUpper(upper, {
52
+ inclusive: true,
53
+ version
54
+ });
55
+ } else if (comparator.operator === ">") lower = strongerLower(lower, {
56
+ inclusive: false,
57
+ version
58
+ });
59
+ else if (comparator.operator === ">=") lower = strongerLower(lower, {
60
+ inclusive: true,
61
+ version
62
+ });
63
+ else if (comparator.operator === "<") upper = strongerUpper(upper, {
64
+ inclusive: false,
65
+ version
66
+ });
67
+ else if (comparator.operator === "<=") upper = strongerUpper(upper, {
68
+ inclusive: true,
69
+ version
70
+ });
71
+ }
72
+ if (lower !== null && upper !== null) {
73
+ const compared = compareBounds(lower.version, upper.version);
74
+ if (compared > 0 || compared === 0 && (!lower.inclusive || !upper.inclusive)) return null;
75
+ }
76
+ return {
77
+ lower,
78
+ upper
79
+ };
80
+ }
81
+ function rangeToIntervals(range) {
82
+ try {
83
+ return parseRange(range).sets.flatMap((comparators) => {
84
+ const interval = comparatorSetToInterval(comparators);
85
+ return interval === null ? [] : [interval];
86
+ });
87
+ } catch {
88
+ throw new ReleaseCatalogCompilationError("INVALID_TARGET_RANGE", `Invalid target app-version range: ${range}`);
89
+ }
90
+ }
91
+ function releaseDescriptor(release) {
92
+ return {
93
+ releaseId: release.id,
94
+ kind: release.kind,
95
+ bundleId: release.bundleId,
96
+ rolloutCohortCount: release.rolloutCohortCount,
97
+ targetCohorts: [...new Set(release.targetCohorts)].sort(),
98
+ shouldForceUpdate: release.shouldForceUpdate,
99
+ message: release.message
100
+ };
101
+ }
102
+ function validateReleases(releases, strategy) {
103
+ const enabled = releases.filter((release) => release.enabled).sort((left, right) => right.id.localeCompare(left.id));
104
+ const seenIds = /* @__PURE__ */ new Set();
105
+ for (const release of enabled) {
106
+ if (!isUUIDv7(release.id)) throw new ReleaseCatalogCompilationError("INVALID_RELEASE", `Release ${release.id} must use a canonical lowercase UUIDv7 ID`);
107
+ if (seenIds.has(release.id)) throw new ReleaseCatalogCompilationError("INVALID_RELEASE", `Duplicate Release ID: ${release.id}`);
108
+ seenIds.add(release.id);
109
+ if (release.strategy !== strategy) throw new ReleaseCatalogCompilationError("INVALID_RELEASE", `Release ${release.id} has the wrong strategy`);
110
+ if (release.bundleId === null) throw new ReleaseCatalogCompilationError("INVALID_RELEASE", `Release ${release.id} has no Bundle`);
111
+ if (release.targetCohorts.length > 100) throw new ReleaseCatalogCompilationError("TARGET_COHORT_LIMIT", `Release ${release.id} exceeds 100 target cohorts`);
112
+ if (strategy === "APP_VERSION" && (release.targetAppVersion === null || release.fingerprintHash !== null)) throw new ReleaseCatalogCompilationError("INVALID_RELEASE", `Release ${release.id} has an invalid app-version target`);
113
+ if (strategy === "FINGERPRINT" && (release.fingerprintHash === null || release.targetAppVersion !== null)) throw new ReleaseCatalogCompilationError("INVALID_RELEASE", `Release ${release.id} has an invalid fingerprint target`);
114
+ }
115
+ return enabled;
116
+ }
117
+ function collectFrontierReleaseIds(releases) {
118
+ if (releases.every((release) => normalizeRolloutCohortCount(release.rolloutCohortCount) >= 1e3)) {
119
+ const retained = /* @__PURE__ */ new Set();
120
+ const bundleIds = /* @__PURE__ */ new Set();
121
+ for (const release of releases) {
122
+ if (release.bundleId !== null && !bundleIds.has(release.bundleId)) {
123
+ bundleIds.add(release.bundleId);
124
+ retained.add(release.id);
125
+ }
126
+ if (bundleIds.size >= 11) break;
127
+ }
128
+ return retained;
129
+ }
130
+ const explicitTargetCohorts = new Set(releases.flatMap((release) => release.targetCohorts));
131
+ const cohortStates = [
132
+ void 0,
133
+ ...Array.from({ length: 1e3 }, (_, index) => String(index + 1)),
134
+ ...[...explicitTargetCohorts].sort(),
135
+ "release-catalog-non-targeted-cohort"
136
+ ].map((cohort) => {
137
+ const normalized = cohort === void 0 ? void 0 : normalizeCohortValue(cohort);
138
+ return {
139
+ isCustom: normalized !== void 0 && isCustomCohort(normalized),
140
+ normalized,
141
+ numeric: normalized === void 0 ? null : getNumericCohortValue(normalized),
142
+ bundleIds: /* @__PURE__ */ new Set(),
143
+ complete: false
144
+ };
145
+ });
146
+ const stateIndexesByCohort = /* @__PURE__ */ new Map();
147
+ const fullRolloutStateIndexes = [];
148
+ for (const [index, state] of cohortStates.entries()) {
149
+ if (state.normalized !== void 0) {
150
+ const indexes = stateIndexesByCohort.get(state.normalized) ?? [];
151
+ indexes.push(index);
152
+ stateIndexesByCohort.set(state.normalized, indexes);
153
+ }
154
+ if (state.normalized === void 0 || state.numeric !== null || state.isCustom) fullRolloutStateIndexes.push(index);
155
+ }
156
+ const retained = /* @__PURE__ */ new Set();
157
+ let incompleteStateCount = cohortStates.length;
158
+ for (const release of releases) {
159
+ const rolloutCohortCount = normalizeRolloutCohortCount(release.rolloutCohortCount);
160
+ const eligibleStateIndexes = /* @__PURE__ */ new Set();
161
+ if (rolloutCohortCount >= 1e3) for (const index of fullRolloutStateIndexes) eligibleStateIndexes.add(index);
162
+ else if (rolloutCohortCount > 0) for (const numericCohort of getRolledOutNumericCohorts(release.id, rolloutCohortCount)) for (const index of stateIndexesByCohort.get(String(numericCohort)) ?? []) eligibleStateIndexes.add(index);
163
+ for (const targetCohort of new Set(release.targetCohorts.map(normalizeCohortValue))) for (const index of stateIndexesByCohort.get(targetCohort) ?? []) eligibleStateIndexes.add(index);
164
+ for (const index of eligibleStateIndexes) {
165
+ const state = cohortStates[index];
166
+ if (state.complete) continue;
167
+ if (release.bundleId !== null && !state.bundleIds.has(release.bundleId)) {
168
+ state.bundleIds.add(release.bundleId);
169
+ retained.add(release.id);
170
+ }
171
+ if (state.bundleIds.size >= 11) {
172
+ state.complete = true;
173
+ incompleteStateCount -= 1;
174
+ }
175
+ }
176
+ if (incompleteStateCount === 0) break;
177
+ }
178
+ return retained;
179
+ }
180
+ function intervalContainsSegment(interval, segment) {
181
+ if (interval.lower !== null) {
182
+ if (segment.lower === null) return false;
183
+ const compared = compareBounds(segment.lower.version, interval.lower.version);
184
+ if (compared < 0 || compared === 0 && segment.lower.inclusive && !interval.lower.inclusive) return false;
185
+ }
186
+ if (interval.upper !== null) {
187
+ if (segment.upper === null) return false;
188
+ const compared = compareBounds(segment.upper.version, interval.upper.version);
189
+ if (compared > 0 || compared === 0 && segment.upper.inclusive && !interval.upper.inclusive) return false;
190
+ }
191
+ return true;
192
+ }
193
+ function atomicVersionSegments(intervals) {
194
+ const endpoints = [...new Set(intervals.flatMap((interval) => [interval.lower?.version, interval.upper?.version].filter((version) => version !== void 0)))].sort(compareBounds);
195
+ if (endpoints.length === 0) return [{
196
+ lower: null,
197
+ upper: null
198
+ }];
199
+ const segments = [{
200
+ lower: null,
201
+ upper: {
202
+ inclusive: false,
203
+ version: endpoints[0]
204
+ }
205
+ }];
206
+ for (let index = 0; index < endpoints.length; index += 1) {
207
+ const endpoint = endpoints[index];
208
+ segments.push({
209
+ lower: {
210
+ inclusive: true,
211
+ version: endpoint
212
+ },
213
+ upper: {
214
+ inclusive: true,
215
+ version: endpoint
216
+ }
217
+ });
218
+ const next = endpoints[index + 1];
219
+ if (next !== void 0) segments.push({
220
+ lower: {
221
+ inclusive: false,
222
+ version: endpoint
223
+ },
224
+ upper: {
225
+ inclusive: false,
226
+ version: next
227
+ }
228
+ });
229
+ }
230
+ segments.push({
231
+ lower: {
232
+ inclusive: false,
233
+ version: endpoints.at(-1)
234
+ },
235
+ upper: null
236
+ });
237
+ return segments;
238
+ }
239
+ function sameIndexes(left, right) {
240
+ return left.length === right.length && left.every((value, index) => value === right[index]);
241
+ }
242
+ function mergeSegments(segments) {
243
+ const merged = [];
244
+ for (const segment of segments) {
245
+ const previous = merged.at(-1);
246
+ if (previous && sameIndexes(previous.releaseIndexes, segment.releaseIndexes) && sameIndexes(previous.rollbackReleaseIndexes, segment.rollbackReleaseIndexes)) merged[merged.length - 1] = {
247
+ ...previous,
248
+ upper: segment.upper
249
+ };
250
+ else merged.push(segment);
251
+ }
252
+ return merged;
253
+ }
254
+ function compileAppVersion(releases) {
255
+ const ranges = /* @__PURE__ */ new Map();
256
+ for (const release of releases) ranges.set(release.id, rangeToIntervals(release.targetAppVersion));
257
+ const segmentReleases = atomicVersionSegments([...ranges.values()].flat()).map((segment) => {
258
+ const applicable = releases.filter((release) => ranges.get(release.id).some((range) => intervalContainsSegment(range, segment)));
259
+ return {
260
+ rollbackIds: new Set(applicable.map(({ id }) => id)),
261
+ segment,
262
+ retainedIds: collectFrontierReleaseIds(applicable)
263
+ };
264
+ });
265
+ const retainedIds = new Set(segmentReleases.flatMap(({ retainedIds, rollbackIds }) => [...retainedIds, ...rollbackIds]));
266
+ const retainedReleases = releases.filter((release) => retainedIds.has(release.id));
267
+ const descriptorIndex = new Map(retainedReleases.map((release, index) => [release.id, index]));
268
+ return {
269
+ envelope: {
270
+ fallbackPolicy: RELEASE_CATALOG_FALLBACK_POLICY,
271
+ schemaVersion: 1,
272
+ segments: mergeSegments(segmentReleases.map(({ segment, retainedIds, rollbackIds }) => ({
273
+ ...segment,
274
+ releaseIndexes: releases.filter((release) => retainedIds.has(release.id)).map((release) => descriptorIndex.get(release.id)).filter((index) => index !== void 0),
275
+ rollbackReleaseIndexes: releases.filter((release) => rollbackIds.has(release.id)).map((release) => descriptorIndex.get(release.id)).filter((index) => index !== void 0)
276
+ }))).filter((segment) => segment.releaseIndexes.length > 0 || segment.rollbackReleaseIndexes.length > 0),
277
+ strategy: "APP_VERSION"
278
+ },
279
+ retainedReleases
280
+ };
281
+ }
282
+ function compileFingerprint(releases) {
283
+ const retainedIds = collectFrontierReleaseIds(releases);
284
+ const retainedReleases = releases;
285
+ return {
286
+ envelope: {
287
+ fallbackPolicy: RELEASE_CATALOG_FALLBACK_POLICY,
288
+ releaseIndexes: retainedReleases.map((release, index) => retainedIds.has(release.id) ? index : -1).filter((index) => index >= 0),
289
+ rollbackReleaseIndexes: retainedReleases.map((_, index) => index),
290
+ schemaVersion: 1,
291
+ strategy: "FINGERPRINT"
292
+ },
293
+ retainedReleases
294
+ };
295
+ }
296
+ async function sha256(value) {
297
+ const digest = await globalThis.crypto.subtle.digest("SHA-256", new TextEncoder().encode(value));
298
+ return `sha256:${[...new Uint8Array(digest)].map((byte) => byte.toString(16).padStart(2, "0")).join("")}`;
299
+ }
300
+ function canonicalStringify(value) {
301
+ if (value === null || typeof value !== "object") return JSON.stringify(value);
302
+ if (Array.isArray(value)) return `[${value.map(canonicalStringify).join(",")}]`;
303
+ const record = value;
304
+ return `{${Object.keys(record).sort().map((key) => `${JSON.stringify(key)}:${canonicalStringify(record[key])}`).join(",")}}`;
305
+ }
306
+ async function compileReleaseCatalog(input) {
307
+ const releases = validateReleases(input.releases, input.strategy);
308
+ const targetCohorts = new Set(releases.flatMap((release) => release.targetCohorts));
309
+ if (targetCohorts.size > 512) throw new ReleaseCatalogCompilationError("DISTINCT_TARGET_COHORT_LIMIT", `Scope exceeds 512 distinct target cohorts`);
310
+ const { envelope, retainedReleases } = input.strategy === "APP_VERSION" ? compileAppVersion(releases) : compileFingerprint(releases);
311
+ const payload = {
312
+ ...envelope,
313
+ releaseDescriptors: retainedReleases.map(releaseDescriptor)
314
+ };
315
+ const canonicalPayload = canonicalStringify(payload);
316
+ const byteSize = new TextEncoder().encode(canonicalPayload).byteLength;
317
+ if (byteSize > 262144) throw new ReleaseCatalogCompilationError("CATALOG_OVERSIZE", `Compiled Release catalog is ${byteSize} bytes; maximum is ${MAX_COMPILED_CATALOG_BYTES}`);
318
+ return {
319
+ byteSize,
320
+ canonicalPayload,
321
+ catalogHash: await sha256(canonicalPayload),
322
+ diagnostics: {
323
+ byteSize,
324
+ descriptorCount: payload.releaseDescriptors.length,
325
+ distinctTargetCohortCount: targetCohorts.size,
326
+ releaseCount: releases.length,
327
+ segmentCount: payload.strategy === "APP_VERSION" ? payload.segments.length : 1
328
+ },
329
+ payload
330
+ };
331
+ }
332
+ function versionInSegment(version, segment) {
333
+ if (segment.lower !== null) {
334
+ const compared = compareBounds(version, segment.lower.version);
335
+ if (compared < 0 || compared === 0 && !segment.lower.inclusive) return false;
336
+ }
337
+ if (segment.upper !== null) {
338
+ const compared = compareBounds(version, segment.upper.version);
339
+ if (compared > 0 || compared === 0 && !segment.upper.inclusive) return false;
340
+ }
341
+ return true;
342
+ }
343
+ function projectCompiledCatalog(catalog, appVersion) {
344
+ let indexes;
345
+ if (catalog.strategy === "FINGERPRINT") indexes = catalog.releaseIndexes;
346
+ else {
347
+ const canonicalVersion = appVersion && canonicalizeAppVersion(appVersion);
348
+ if (!canonicalVersion) return [];
349
+ indexes = catalog.segments.find((segment) => versionInSegment(canonicalVersion, segment))?.releaseIndexes ?? [];
350
+ }
351
+ return indexes.map((index) => catalog.releaseDescriptors[index]);
352
+ }
353
+ function projectCompiledRollbackCatalog(catalog, appVersion) {
354
+ let indexes;
355
+ if (catalog.strategy === "FINGERPRINT") indexes = catalog.rollbackReleaseIndexes;
356
+ else {
357
+ const canonicalVersion = appVersion && canonicalizeAppVersion(appVersion);
358
+ if (!canonicalVersion) return [];
359
+ indexes = catalog.segments.find((segment) => versionInSegment(canonicalVersion, segment))?.rollbackReleaseIndexes ?? [];
360
+ }
361
+ return indexes.map((index) => catalog.releaseDescriptors[index]);
362
+ }
363
+ //#endregion
364
+ export { projectCompiledCatalog as n, projectCompiledRollbackCatalog as r, compileReleaseCatalog as t };
@@ -1,4 +1,4 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/releaseManagement-DFMUnDF5.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/releaseManagement-DHUux2az.js
2
2
  var ReleaseManagementError = class extends Error {
3
3
  code;
4
4
  name = "ReleaseManagementError";