@hot-updater/console 1.2.0-rc.3 → 1.2.0-rc.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{-native-builds-search-C-TGpFAm.js → -native-builds-search-DdHwfe4q.js} +1 -1
- package/.output/public/assets/BundleIdDisplay-CTBdtFQ8.js +1 -0
- package/.output/public/assets/ChannelBadge-CEabmopB.js +1 -0
- package/.output/public/assets/CompositeItem-KUM5yQVr.js +1 -0
- package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-Be-0iTww.js} +1 -1
- package/.output/public/assets/{EventDetails-Dl2RvPAk.js → EventDetails-bDOYte1z.js} +1 -1
- package/.output/public/assets/HashValueDisplay-D2f0HmyU.js +1 -0
- package/.output/public/assets/{InsightsPageHeader-DHhqY3DT.js → InsightsPageHeader-Cj2ROSQO.js} +1 -1
- package/.output/public/assets/IosInstall-CHI2C4Yd.js +1 -0
- package/.output/public/assets/NativeBuildsNav-DaqxQPnG.js +1 -0
- package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-CVBtl68B.js} +1 -1
- package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-DVnzzGqM.js} +1 -1
- package/.output/public/assets/RelativeTime-B4PK8qDw.js +1 -0
- package/.output/public/assets/RolloutPercentageBadge-D_I0Raj2.js +1 -0
- package/.output/public/assets/RowReason-B7VM1ztc.js +1 -0
- package/.output/public/assets/SandboxBadge-BVxHg_HF.js +1 -0
- package/.output/public/assets/TargetDisplay-KU7JhIWG.js +1 -0
- package/.output/public/assets/{alert-dialog-BqYScr9y.js → alert-dialog-Ch0QxRsa.js} +1 -1
- package/.output/public/assets/api-C1OPeiG1.js +1 -0
- package/.output/public/assets/api-keys-DLC8jjaM.js +1 -0
- package/.output/public/assets/api-keys-eDnzgFAf.js +1 -0
- package/.output/public/assets/arrow-left-DQjHJAnT.js +1 -0
- package/.output/public/assets/arrow-right-CXp_K3xK.js +1 -0
- package/.output/public/assets/arrow-up-right-BFafIOrq.js +1 -0
- package/.output/public/assets/badge-FZMD5vvS.js +1 -0
- package/.output/public/assets/card-CyHYmHue.js +1 -0
- package/.output/public/assets/check-CqWNyG93.js +1 -0
- package/.output/public/assets/chevron-right-DNbYTBX1.js +1 -0
- package/.output/public/assets/{circle-off-C7Muo0ss.js → circle-off-BCkZpskJ.js} +1 -1
- package/.output/public/assets/{clipboard-DQbOcrL7.js → clipboard-DZrZK5gR.js} +1 -1
- package/.output/public/assets/{console-features-api-DEXSwFtc.js → console-features-api-BO5V64P3.js} +1 -1
- package/.output/public/assets/{copy-DsuLj3oj.js → copy-CH1__JAW.js} +1 -1
- package/.output/public/assets/dialog-BLj71-Nf.js +1 -0
- package/.output/public/assets/{dist-CPlO6ko9.js → dist-DAM__Tdz.js} +1 -1
- package/.output/public/assets/{download-Cf24LBde.js → download-B2GjTySo.js} +1 -1
- package/.output/public/assets/empty--YaE5Z4p.js +1 -0
- package/.output/public/assets/field-CdhSgWhI.js +1 -0
- package/.output/public/assets/git-branch-DG1VDaKq.js +1 -0
- package/.output/public/assets/history-C0wv4htz.js +1 -0
- package/.output/public/assets/index-CgwVUC2n.js +10 -0
- package/.output/public/assets/{input-group-D3OUBk4n.js → input-group-XKLcUGoa.js} +1 -1
- package/.output/public/assets/insights-C94CdeAA.js +1 -0
- package/.output/public/assets/insights-DILMVpk8.js +2 -0
- package/.output/public/assets/insights-_j_ieOyh.js +42 -0
- package/.output/public/assets/insights-api-B6Gj74n5.js +1 -0
- package/.output/public/assets/{insights-search-DghCbEnk.js → insights-search-Bgvg6wSP.js} +1 -1
- package/.output/public/assets/insights-usage-rpc-BUCinjSN.js +1 -0
- package/.output/public/assets/insights_.distribution-Bb6_S-hD.js +2 -0
- package/.output/public/assets/insights_.distribution-CRkGNelG.js +1 -0
- package/.output/public/assets/insights_.distribution-CyAu3RN3.js +1 -0
- package/.output/public/assets/installations-BA01mqJE.js +1 -0
- package/.output/public/assets/installations-BsD6LgNc.js +2 -0
- package/.output/public/assets/installations-CYTzndfP.js +1 -0
- package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-D7UgdXyA.js} +1 -1
- package/.output/public/assets/{link-DTEyW70e.js → link-CN3iHC4A.js} +2 -2
- package/.output/public/assets/{list--NIee1FZ.js → list-Bm-CfN5g.js} +1 -1
- package/.output/public/assets/loader-circle-iMqC-8ZE.js +1 -0
- package/.output/public/assets/native-builds-BMbws1g5.js +2 -0
- package/.output/public/assets/native-builds-xgHiHQML.js +1 -0
- package/.output/public/assets/native-builds_._buildId-B04z9yfk.js +1 -0
- package/.output/public/assets/native-builds_._buildId-DaMmTcHo.js +2 -0
- package/.output/public/assets/native-builds_.devices-CTzpCVsb.js +1 -0
- package/.output/public/assets/native-builds_.devices-D_kl2-bc.js +2 -0
- package/.output/public/assets/package-BmfoZ5Zj.js +1 -0
- package/.output/public/assets/plus-Db0KxLZp.js +1 -0
- package/.output/public/assets/preload-helper-CRQjUQaZ.js +1 -0
- package/.output/public/assets/{refresh-cw-B9HHjLej.js → refresh-cw-BHhBYjS8.js} +1 -1
- package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-BYRt19mj.js} +1 -1
- package/.output/public/assets/remote-config-Cxkr7_BP.js +1 -0
- package/.output/public/assets/remote-config-DAOyn5xL.js +1 -0
- package/.output/public/assets/remote-config-DXv25LX1.js +6 -0
- package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-Ba-slJea.js} +1 -1
- package/.output/public/assets/routes-DM3TyTLW.js +2 -0
- package/.output/public/assets/routes-Des97uK_.js +1 -0
- package/.output/public/assets/search-dJG2BYmx.js +1 -0
- package/.output/public/assets/select-CA8r-UUe.js +1 -0
- package/.output/public/assets/send-DuMOCzbD.js +1 -0
- package/.output/public/assets/{sidebar-Di9SN47G.js → sidebar-yC7KdImc.js} +1 -1
- package/.output/public/assets/smartphone-D1C6BRd_.js +1 -0
- package/.output/public/assets/styles-BHLI87EH.css +2 -0
- package/.output/public/assets/switch-BsV3d4km.js +1 -0
- package/.output/public/assets/table-D8YjT_ht.js +1 -0
- package/.output/public/assets/tabs-RdhEl9sE.js +1 -0
- package/.output/public/assets/trash-2-B5KIvrXy.js +1 -0
- package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-CFcU9dIB.js} +1 -1
- package/.output/public/assets/{useCompositeListItem-JmyDfo3-.js → useCompositeListItem-lAmUsXcc.js} +1 -1
- package/.output/public/assets/{useMutation-DbYw7boA.js → useMutation-w3qYaU2L.js} +1 -1
- package/.output/public/assets/valueToPercent-Bn8p2lng.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-DJQS4eWX.mjs → __23tanstack-start-server-fn-resolver-q4YFIDyr.mjs} +94 -46
- package/.output/server/_chunks/ssr-renderer.mjs +2 -2
- package/.output/server/_libs/@base-ui/react+[...].mjs +1488 -183
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
- package/.output/server/_libs/_.mjs +2 -0
- package/.output/server/_libs/lucide-react.mjs +22 -28
- package/.output/server/_libs/next-themes.mjs +1 -1
- package/.output/server/_libs/react-redux+[...].mjs +1 -1
- package/.output/server/_libs/recharts+[...].mjs +1 -1
- package/.output/server/_libs/sonner.mjs +1 -1
- package/.output/server/_libs/tanstack__react-query.mjs +1 -1
- package/.output/server/_ssr/{-native-builds-search-CwNcoXf4.mjs → -native-builds-search-Mm_AZoRU.mjs} +9 -3
- package/.output/server/_ssr/{BundleIdDisplay-LdRkYdnN.mjs → BundleIdDisplay-DvzlYWq8.mjs} +3 -3
- package/.output/server/_ssr/ChannelBadge-qF_Pc5Ud.mjs +23 -0
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-BN-FZ8eG.mjs → ConsoleFeatureUnavailable-DKUgr0N_.mjs} +7 -7
- package/.output/server/_ssr/{EventDetails-B77sWxgh.mjs → EventDetails-T1XtYEDD.mjs} +8 -8
- package/.output/server/_ssr/{HashValueDisplay-C4Vs4cmO.mjs → HashValueDisplay-Cas_zjIS.mjs} +7 -7
- package/.output/server/_ssr/{InsightsPageHeader-Dx4jJ7X0.mjs → InsightsPageHeader-BrllhUl2.mjs} +8 -8
- package/.output/server/_ssr/IosInstall-CEHI8F2M.mjs +615 -0
- package/.output/server/_ssr/NativeBuildsNav-2xSHyA1a.mjs +38 -0
- package/.output/server/_ssr/{NotFoundPage-DB5cXeVZ.mjs → NotFoundPage-D6H9vxj_.mjs} +3 -3
- package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-BpGOEXjU.mjs} +13 -3
- package/.output/server/_ssr/RelativeTime-DpEVzDP9.mjs +237 -0
- package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-DW8-_w30.mjs} +20 -4
- package/.output/server/_ssr/RowReason-C-PjIxzq.mjs +186 -0
- package/.output/server/_ssr/SandboxBadge-CDdNew0R.mjs +97 -0
- package/.output/server/_ssr/TargetDisplay-BBsP7IaZ.mjs +83 -0
- package/.output/server/_ssr/{alert-dialog-DxboqQmd.mjs → alert-dialog-Bd4E9xdw.mjs} +2 -2
- package/.output/server/_ssr/{api-cvzOLlTy.mjs → api-BT7aA8UM.mjs} +167 -33
- package/.output/server/_ssr/{api-keys-C3QCQvpV.mjs → api-keys-D2NvcQZv.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-CrbGr02t.mjs → api-keys-DjWpM20P.mjs} +11 -10
- package/.output/server/_ssr/{api-keys-rpc-BcTQzRLj.mjs → api-keys-rpc-nM5H7V7f.mjs} +4 -4
- package/.output/server/_ssr/{api-rpc-B48nsUak.mjs → api-rpc-DX4HynbW.mjs} +83 -35
- package/.output/server/_ssr/{auth-rpc-C0gtG9nJ.mjs → auth-rpc-LCxTtYz2.mjs} +5 -5
- package/.output/server/_ssr/{auth.server-B0JikHOQ.mjs → auth.server-CERo_xef.mjs} +797 -174
- package/.output/server/_ssr/{badge-oO-0mLsr.mjs → badge-Dpp4q7sD.mjs} +4 -45
- package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-BP40zYSt.mjs} +1 -1
- package/.output/server/_ssr/card-CFCftDfI.mjs +49 -0
- package/.output/server/_ssr/{config.server-CJVHGJtr.mjs → config.server-5W5WD8x2.mjs} +4 -4
- package/.output/server/_ssr/{console-access-4TW5Af_n.mjs → console-access-B0S5YFUa.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-DfzZRyXa.mjs → console-features-api-CV_EReEj.mjs} +4 -4
- package/.output/server/_ssr/{console-features-rpc-DqNpa3U9.mjs → console-features-rpc-D3xlQsuy.mjs} +4 -4
- package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-xaGDhRC9.mjs} +1 -1
- package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
- package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-XAvDetmn.mjs} +1 -1
- package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
- package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BtRVBD0C.mjs} +3 -3
- package/.output/server/_ssr/deviceProfileToken-CwWb1lPq.mjs +82 -0
- package/.output/server/_ssr/{dialog-DsuMZ5oh.mjs → dialog-DQR_QI_X.mjs} +2 -2
- package/.output/server/_ssr/{dist-TEpM_UAD.mjs → dist-B6-irDRA.mjs} +1 -1
- package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-DnoYpi36.mjs} +1 -1
- package/.output/server/_ssr/{empty-r4kJO91t.mjs → empty-C7PFnkCH.mjs} +3 -3
- package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
- package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-BA2eg11O.mjs} +3 -3
- package/.output/server/_ssr/{field-DfXmt9CS.mjs → field-BqYN8sZT.mjs} +3 -3
- package/.output/server/_ssr/foldedPage-CqpVk31Q.mjs +176 -0
- package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-CdqFonhl.mjs} +2 -2
- package/.output/server/_ssr/{input-group-BCO7zTpU.mjs → input-group-Brv0mmyp.mjs} +2 -2
- package/.output/server/_ssr/{insights-CRu5FUj8.mjs → insights--xI3A0KI.mjs} +5 -5
- package/.output/server/_ssr/{insights-DrrhPDER.mjs → insights-CD1e3EnW.mjs} +2 -2
- package/.output/server/_ssr/{insights-Csqlj6u7.mjs → insights-Dd0VdO-1.mjs} +27 -26
- package/.output/server/_ssr/{insights-api-NW5VCXqg.mjs → insights-api-Bt2XVa4Y.mjs} +5 -5
- package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-CXHg1lLV.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-7zH97WOO.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-rpc-CoFrAOK9.mjs → insights-failures-rpc-DBGzXP5A.mjs} +11 -11
- package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-BhOg6kz2.mjs} +1 -1
- package/.output/server/_ssr/{insights-recovery-rpc-sud_FyGW.mjs → insights-recovery-rpc-C6fAh-i_.mjs} +7 -7
- package/.output/server/_ssr/{insights-rpc-Ce2Isz9q.mjs → insights-rpc-pThKC9oj.mjs} +4 -4
- package/.output/server/_ssr/{insights-search-B0O3YoO2.mjs → insights-search-iFN4UaUv.mjs} +5 -5
- package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-h8fipPTv.mjs} +1 -1
- package/.output/server/_ssr/{insights-usage-rpc-Cwf1t4aW.mjs → insights-usage-rpc-B-RLvdLZ.mjs} +5 -5
- package/.output/server/_ssr/{insights-usage-rpc-C-cS2F9s.mjs → insights-usage-rpc-CGHZQ9jq.mjs} +7 -7
- package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-BjSiV_X_.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-DIkh5VqM.mjs → insights_.distribution-C6iXJ93Y.mjs} +15 -14
- package/.output/server/_ssr/{insights_.distribution-D52TkQ2V.mjs → insights_.distribution-E6Ns2aN7.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution--3aR6Kpy.mjs → insights_.distribution-xHmfwwa5.mjs} +5 -5
- package/.output/server/_ssr/{installations-Bu4Lb0x9.mjs → installations-7V-Xyui8.mjs} +12 -12
- package/.output/server/_ssr/{installations-DftevpDt.mjs → installations-CZnN6slr.mjs} +4 -4
- package/.output/server/_ssr/{installations-C818mFCp.mjs → installations-D6Upc9Rt.mjs} +2 -2
- package/.output/server/_ssr/ios-devices-rpc-CXuHk24G.mjs +139 -0
- package/.output/server/_ssr/iosDeviceProfile-BESi_onx.mjs +176 -0
- package/.output/server/_ssr/iosDevices-BmvvvZRo.mjs +129 -0
- package/.output/server/_ssr/listReleases-DYYA5alS.mjs +94 -0
- package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
- package/.output/server/_ssr/{native-builds-DOASMwGh.mjs → native-builds-BUojmVWC.mjs} +3 -3
- package/.output/server/_ssr/native-builds-BXBkklfA.mjs +197 -0
- package/.output/server/_ssr/native-builds-BhDCE89P.mjs +717 -0
- package/.output/server/_ssr/{native-builds_._buildId-CTytnLBB.mjs → native-builds_._buildId-DRiCNDdO.mjs} +3 -3
- package/.output/server/_ssr/native-builds_._buildId-DkMpG-OB.mjs +1176 -0
- package/.output/server/_ssr/native-builds_.devices-DSideebA.mjs +10 -0
- package/.output/server/_ssr/native-builds_.devices-DsOx1R36.mjs +702 -0
- package/.output/server/_ssr/nativeBuildDownloadLink-DDAUVU8q.mjs +96 -0
- package/.output/server/_ssr/nativeBuildInstall-CcBrfTsc.mjs +250 -0
- package/.output/server/_ssr/nativeBuilds-Cub0EUGN.mjs +287 -0
- package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-CX7wutet.mjs} +6 -6
- package/.output/server/_ssr/publicConsoleBase-f67NLLXZ.mjs +610 -0
- package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-DeICczY7.mjs} +2 -2
- package/.output/server/_ssr/{release-adoption-rpc-OizwttJD.mjs → release-adoption-rpc-BjMXMi9A.mjs} +9 -9
- package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-kHZo8P90.mjs} +4 -4
- package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-D9dAMI17.mjs} +3 -3
- package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-EPhok_Py.mjs} +1 -1
- package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-DaZ7ifUF.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-DaBgnVnL.mjs → remote-config-B1iZuZOF.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-Dypc_nuk.mjs → remote-config-C_DprbJz.mjs} +23 -22
- package/.output/server/_ssr/{remote-config-DZu7gJLL.mjs → remote-config-C_q6FBE4.mjs} +3 -3
- package/.output/server/_ssr/{remote-config-rpc-DOfPhqli.mjs → remote-config-rpc-BFTPcMfZ.mjs} +5 -5
- package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
- package/.output/server/_ssr/{router-BkRbvels.mjs → router-BDXPwfwl.mjs} +92 -59
- package/.output/server/_ssr/{routes-D9JnXVWL.mjs → routes-BJeztqpQ.mjs} +388 -432
- package/.output/server/_ssr/{routes-BeTsUkNX.mjs → routes-DpapxHLc.mjs} +14 -17
- package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-CkSbWaZm.mjs} +4 -4
- package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-3oDJJFWa.mjs} +1 -1
- package/.output/server/_ssr/{schema-migration-rpc-B2VGxRY6.mjs → schema-migration-rpc-a4bLEdaP.mjs} +4 -4
- package/.output/server/_ssr/{select-Cywc0NmT.mjs → select-C9HpIZxd.mjs} +2 -2
- package/.output/server/_ssr/{server-Ds-fU1zf.mjs → server-C8ZmMWnn.mjs} +7 -7
- package/.output/server/_ssr/{sidebar-t0NiN0-2.mjs → sidebar-BrVL3L7R.mjs} +3 -3
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{start-BvDsQehg.mjs → start-D3noqqOK.mjs} +2 -2
- package/.output/server/_ssr/{switch-D1T38CnM.mjs → switch-DtnsoZHO.mjs} +3 -3
- package/.output/server/_ssr/{table-L9ZQgxNF.mjs → table-Bg7nCnct.mjs} +2 -2
- package/.output/server/_ssr/{tabs-BiByrAnU.mjs → tabs-BEIoGLTL.mjs} +4 -4
- package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-D0bP_Ume.mjs} +3 -3
- package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-CmHbryZT.mjs} +2 -2
- package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-NmbU0MD2.mjs} +1 -1
- package/.output/server/_tanstack-start-manifest_v-C_TPyfFP.mjs +225 -0
- package/.output/server/index.mjs +479 -381
- package/lib/index.d.mts +9 -0
- package/package.json +7 -30
- package/src/components/ChannelBadge.tsx +9 -9
- package/src/components/DataTable.tsx +347 -0
- package/src/components/FoldedRows.tsx +219 -0
- package/src/components/HashValueDisplay.tsx +6 -3
- package/src/components/PlatformIcon.tsx +10 -0
- package/src/components/RelativeTime.tsx +31 -0
- package/src/components/RowReason.tsx +56 -0
- package/src/components/TargetDisplay.tsx +69 -0
- package/src/components/ThemeProvider.tsx +11 -2
- package/src/components/features/api-keys/ApiKeysPage.tsx +1 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +5 -10
- package/src/components/features/insights/ReleaseActivity.tsx +1 -1
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +108 -58
- package/src/components/features/native-builds/CommitLink.tsx +3 -2
- package/src/components/features/native-builds/ImportBuild.tsx +1 -1
- package/src/components/features/native-builds/InstallCard.tsx +310 -67
- package/src/components/features/native-builds/IosDevicesPage.tsx +944 -0
- package/src/components/features/native-builds/IosInstall.tsx +632 -0
- package/src/components/features/native-builds/IpaDevicesCard.tsx +111 -0
- package/src/components/features/native-builds/NativeBuildDetailPage.tsx +21 -4
- package/src/components/features/native-builds/NativeBuildsNav.tsx +44 -0
- package/src/components/features/native-builds/NativeBuildsPage.tsx +65 -76
- package/src/components/features/native-builds/NativeBuildsTable.tsx +668 -318
- package/src/components/features/native-builds/OlderBuildLabel.tsx +61 -0
- package/src/components/features/native-builds/PatchesCard.tsx +3 -2
- package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +4 -4
- package/src/components/features/native-builds/SandboxBadge.tsx +21 -0
- package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
- package/src/components/features/native-builds/ShortHash.tsx +6 -3
- package/src/components/features/native-builds/StoreSubmission.tsx +18 -12
- package/src/components/features/native-builds/playTracks.ts +19 -0
- package/src/components/features/remote-config/PublishDialog.tsx +4 -1
- package/src/components/features/remote-config/VersionsCard.tsx +5 -2
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/sonner.tsx +3 -1
- package/src/index.ts +9 -0
- package/src/lib/api-rpc.ts +124 -35
- package/src/lib/api.ts +150 -14
- package/src/lib/ios-devices-api.ts +110 -0
- package/src/lib/ios-devices-rpc.ts +183 -0
- package/src/lib/native-builds.ts +160 -17
- package/src/lib/server/console-runtime.server.ts +9 -2
- package/src/lib/server/deviceProfileToken.ts +187 -0
- package/src/lib/server/foldedPage.ts +360 -0
- package/src/lib/server/iosDeviceProfile.ts +230 -0
- package/src/lib/server/iosDevices.ts +223 -0
- package/src/lib/server/listReleases.ts +101 -62
- package/src/lib/server/local-console.ts +1 -1
- package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
- package/src/lib/server/nativeBuildInstall.ts +495 -0
- package/src/lib/server/nativeBuilds.ts +308 -59
- package/src/lib/server/plistText.ts +17 -0
- package/src/lib/server/publicConsoleBase.ts +17 -0
- package/src/routeTree.gen.ts +85 -18
- package/src/routes/-native-builds-search.ts +20 -0
- package/src/routes/[_]hot-updater/devices/device-response.ts +21 -0
- package/src/routes/[_]hot-updater/devices/device[.]mobileconfig.ts +17 -0
- package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
- package/src/routes/api/native-builds/$buildId/download.ts +22 -1
- package/src/routes/index.tsx +541 -532
- package/src/routes/native-builds_.devices.tsx +21 -0
- package/src/styles.css +24 -0
- package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +0 -1
- package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
- package/.output/public/assets/StoreSubmission-ViTkW4eJ.js +0 -1
- package/.output/public/assets/api-P2g8dCNg.js +0 -1
- package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
- package/.output/public/assets/api-keys-FueRkF9q.js +0 -1
- package/.output/public/assets/arrow-left-g9cKqXuC.js +0 -1
- package/.output/public/assets/arrow-right-CNII8TYn.js +0 -1
- package/.output/public/assets/arrow-up-right-DK8Zdg40.js +0 -1
- package/.output/public/assets/badge-DWFcDWho.js +0 -1
- package/.output/public/assets/check-CXVR3s3X.js +0 -1
- package/.output/public/assets/chevron-right-BoUXo82O.js +0 -1
- package/.output/public/assets/dialog-CNUPxNxH.js +0 -1
- package/.output/public/assets/empty-B3Uwdd6k.js +0 -1
- package/.output/public/assets/field-D-2-mnNh.js +0 -1
- package/.output/public/assets/history-DqHlgSuV.js +0 -1
- package/.output/public/assets/index-CqP5HPV6.js +0 -10
- package/.output/public/assets/insights-B-0odqpt.js +0 -42
- package/.output/public/assets/insights-BSVGfxSL.js +0 -1
- package/.output/public/assets/insights-NK5B6ReS.js +0 -2
- package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
- package/.output/public/assets/insights-usage-rpc-CKQH0pUS.js +0 -1
- package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
- package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
- package/.output/public/assets/insights_.distribution-dvk6vYDM.js +0 -1
- package/.output/public/assets/installations-B674P5Z5.js +0 -2
- package/.output/public/assets/installations-BWxczZ2t.js +0 -1
- package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
- package/.output/public/assets/native-builds-BOC71grI.js +0 -1
- package/.output/public/assets/native-builds-D6rldpSh.js +0 -2
- package/.output/public/assets/native-builds-DAy2678K.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
- package/.output/public/assets/plus-BReVKct-.js +0 -1
- package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
- package/.output/public/assets/remote-config-B7ujqhLa.js +0 -6
- package/.output/public/assets/remote-config-WjpozBG5.js +0 -1
- package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
- package/.output/public/assets/routes-BDdBIxYS.js +0 -1
- package/.output/public/assets/routes-CCD33Azv.js +0 -2
- package/.output/public/assets/search-BCel4Oy6.js +0 -1
- package/.output/public/assets/select-CBIU0_M1.js +0 -1
- package/.output/public/assets/smartphone-CMaSy_ir.js +0 -1
- package/.output/public/assets/styles-uK-0vUMk.css +0 -2
- package/.output/public/assets/switch-BpdiHL_t.js +0 -1
- package/.output/public/assets/table-Bpy3SvSo.js +0 -1
- package/.output/public/assets/tabs-Xmt7tZeG.js +0 -1
- package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
- package/.output/public/assets/valueToPercent-BLwGy_xK.js +0 -1
- package/.output/server/_ssr/RolloutPercentageBadge-vmwE8iae.mjs +0 -21
- package/.output/server/_ssr/StoreSubmission-DE4vgy5B.mjs +0 -139
- package/.output/server/_ssr/listReleases-D_GY00SQ.mjs +0 -79
- package/.output/server/_ssr/native-builds-CWjU--fI.mjs +0 -510
- package/.output/server/_ssr/native-builds-DhXL5zf_.mjs +0 -137
- package/.output/server/_ssr/native-builds_._buildId-D4lYJLIU.mjs +0 -813
- package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
- package/.output/server/_ssr/nativeBuilds-B_7BPjt_.mjs +0 -133
- package/.output/server/_ssr/qr-code-C7kNRIDX.mjs +0 -22
- package/.output/server/_tanstack-start-manifest_v-B5nsO5L4.mjs +0 -184
- package/src/lib/server/nativeBuildQr.ts +0 -73
- package/src/routes/[_]hot-updater/native-builds/qr.ts +0 -14
- /package/.output/public/assets/{uuidv7-zXMtwR9Q.js → uuidv7-DAoOOpz9.js} +0 -0
|
@@ -11,8 +11,17 @@ import type { ReleaseCatalogDescriptor } from "@hot-updater/protocol";
|
|
|
11
11
|
import {
|
|
12
12
|
nativeBuildCatalogScopeKey,
|
|
13
13
|
nativeBuildChannel,
|
|
14
|
+
nativeBuildPathKey,
|
|
14
15
|
nativeBuildScope,
|
|
15
16
|
} from "../native-builds";
|
|
17
|
+
import {
|
|
18
|
+
FOLDED_PAGE_CHUNK,
|
|
19
|
+
FOLDED_PAGE_READ_BUDGET,
|
|
20
|
+
type FoldedPage,
|
|
21
|
+
foldedPage,
|
|
22
|
+
type ReadBudget,
|
|
23
|
+
readFold,
|
|
24
|
+
} from "./foldedPage";
|
|
16
25
|
|
|
17
26
|
export interface KeysetPageInput {
|
|
18
27
|
/** Rows older than this key: the next page. */
|
|
@@ -63,32 +72,6 @@ async function keysetPage<T>(
|
|
|
63
72
|
};
|
|
64
73
|
}
|
|
65
74
|
|
|
66
|
-
export interface NativeBuildListInput extends KeysetPageInput {
|
|
67
|
-
/** Only the builds that embed this channel ID. */
|
|
68
|
-
readonly channelId?: string;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export type NativeBuildListResult = KeysetPage<NativeBuildRow>;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* One page of native builds, newest first: one read of the registry's ID
|
|
75
|
-
* index, or of its channel index for one channel's builds.
|
|
76
|
-
*/
|
|
77
|
-
export function listNativeBuilds(
|
|
78
|
-
core: Pick<HotUpdaterCoreApi, "listNativeBuilds">,
|
|
79
|
-
{ channelId, ...page }: NativeBuildListInput,
|
|
80
|
-
): Promise<NativeBuildListResult> {
|
|
81
|
-
return keysetPage(
|
|
82
|
-
(input) =>
|
|
83
|
-
core.listNativeBuilds({
|
|
84
|
-
...input,
|
|
85
|
-
...(channelId === undefined ? {} : { channelId }),
|
|
86
|
-
}),
|
|
87
|
-
({ id }) => id,
|
|
88
|
-
page,
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
75
|
/** A patch from a build's built-in bundle: the bundle it updates to, and its size. */
|
|
93
76
|
export interface NativeBuildPatch {
|
|
94
77
|
readonly bundleId: string;
|
|
@@ -131,11 +114,13 @@ export interface NativeBuildDetail {
|
|
|
131
114
|
readonly catalogScopeKey: string;
|
|
132
115
|
/** How many bundles patch from the built-in bundle, or null when its row is gone. */
|
|
133
116
|
readonly builtInBundle: { readonly childCount: number } | null;
|
|
117
|
+
/** The newest build of the build's scope: this build or a later one. */
|
|
118
|
+
readonly newestInScope: NativeBuildRow | null;
|
|
134
119
|
/**
|
|
135
|
-
* The
|
|
136
|
-
*
|
|
120
|
+
* The build marked as the store build in the scope. New deploys patch from it,
|
|
121
|
+
* or with no mark from the newest build.
|
|
137
122
|
*/
|
|
138
|
-
readonly
|
|
123
|
+
readonly storeBuildInScope: NativeBuildRow | null;
|
|
139
124
|
/**
|
|
140
125
|
* The releases the update check serves an install of this build now,
|
|
141
126
|
* newest first: the scope's catalog, at the build's app version, down to
|
|
@@ -147,9 +132,10 @@ export interface NativeBuildDetail {
|
|
|
147
132
|
}
|
|
148
133
|
|
|
149
134
|
/**
|
|
150
|
-
* Everything a native build's page shows, in
|
|
151
|
-
*
|
|
152
|
-
* scope's catalog, and one page of patches
|
|
135
|
+
* Everything a native build's page shows, in six reads at most: the build,
|
|
136
|
+
* then its built-in bundle, its scope's newest build and its mark, which a
|
|
137
|
+
* marked build's own row answers, its scope's catalog, and one page of patches
|
|
138
|
+
* from it. Null for an unknown ID.
|
|
153
139
|
*/
|
|
154
140
|
export async function getNativeBuildDetail(
|
|
155
141
|
core: Pick<
|
|
@@ -165,14 +151,19 @@ export async function getNativeBuildDetail(
|
|
|
165
151
|
const build = await core.getNativeBuild(id);
|
|
166
152
|
if (build === null) return null;
|
|
167
153
|
const catalogScopeKey = nativeBuildCatalogScopeKey(build);
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
154
|
+
const scope = nativeBuildScope(build);
|
|
155
|
+
const [builtIn, newestInScope, storeBuildInScope, catalog, patches] =
|
|
156
|
+
await Promise.all([
|
|
157
|
+
core.getBundle(build.min_bundle_id),
|
|
158
|
+
core.findNativeBuild(scope),
|
|
159
|
+
build.is_store_build
|
|
160
|
+
? build
|
|
161
|
+
: core.findNativeBuild(scope, { storeBuild: true }),
|
|
162
|
+
core.getReleaseCatalogRow(catalogScopeKey),
|
|
163
|
+
listNativeBuildPatches(core, build.min_bundle_id, {
|
|
164
|
+
limit: NATIVE_BUILD_PATCH_PAGE_SIZE,
|
|
165
|
+
}),
|
|
166
|
+
]);
|
|
176
167
|
const servedNow =
|
|
177
168
|
catalog === null || catalog.is_tombstone
|
|
178
169
|
? []
|
|
@@ -191,6 +182,7 @@ export async function getNativeBuildDetail(
|
|
|
191
182
|
catalogScopeKey,
|
|
192
183
|
builtInBundle: builtIn === null ? null : { childCount: builtIn.childCount },
|
|
193
184
|
newestInScope,
|
|
185
|
+
storeBuildInScope,
|
|
194
186
|
servedNow,
|
|
195
187
|
patches,
|
|
196
188
|
};
|
|
@@ -207,6 +199,22 @@ const storageFor = (storage: StorageAdapter, storageUri: string) =>
|
|
|
207
199
|
const isPublicUrl = (storageUri: string) =>
|
|
208
200
|
["http", "https"].includes(protocolOf(storageUri));
|
|
209
201
|
|
|
202
|
+
/**
|
|
203
|
+
* The URL a build's artifact downloads from without the console's sign-in: the
|
|
204
|
+
* storage's download URL, which may expire. Null when the storage gives none.
|
|
205
|
+
*/
|
|
206
|
+
export async function nativeBuildArtifactUrl(
|
|
207
|
+
build: Pick<NativeBuildRow, "artifact_storage_uri">,
|
|
208
|
+
storage: StorageAdapter,
|
|
209
|
+
): Promise<string | null> {
|
|
210
|
+
const storageUri = build.artifact_storage_uri;
|
|
211
|
+
const adapter = storageFor(storage, storageUri);
|
|
212
|
+
if (adapter?.getDownloadUrl !== undefined) {
|
|
213
|
+
return (await adapter.getDownloadUrl({ storageUri })).url;
|
|
214
|
+
}
|
|
215
|
+
return adapter === undefined && isPublicUrl(storageUri) ? storageUri : null;
|
|
216
|
+
}
|
|
217
|
+
|
|
210
218
|
/**
|
|
211
219
|
* The URL a phone downloads a native build's artifact from, without the
|
|
212
220
|
* console's sign-in: the storage's download URL, which may expire. Null
|
|
@@ -223,20 +231,50 @@ export async function resolveNativeBuildDownloadUrl(
|
|
|
223
231
|
},
|
|
224
232
|
): Promise<string | null> {
|
|
225
233
|
const build = await core.getNativeBuild(id);
|
|
226
|
-
|
|
227
|
-
const storageUri = build.artifact_storage_uri;
|
|
228
|
-
const adapter = storageFor(storage, storageUri);
|
|
229
|
-
if (adapter?.getDownloadUrl !== undefined) {
|
|
230
|
-
return (await adapter.getDownloadUrl({ storageUri })).url;
|
|
231
|
-
}
|
|
232
|
-
return adapter === undefined && isPublicUrl(storageUri) ? storageUri : null;
|
|
234
|
+
return build === null ? null : nativeBuildArtifactUrl(build, storage);
|
|
233
235
|
}
|
|
234
236
|
|
|
237
|
+
/**
|
|
238
|
+
* What Android's browser offers to install. An upload stores it, so a redirect
|
|
239
|
+
* to the storage serves it too; a streamed download sets it, for a storage
|
|
240
|
+
* whose `get` keeps no type.
|
|
241
|
+
*/
|
|
242
|
+
const APK_CONTENT_TYPE = "application/vnd.android.package-archive";
|
|
243
|
+
|
|
244
|
+
const noStoreRedirect = (url: string) =>
|
|
245
|
+
new Response(null, {
|
|
246
|
+
headers: { "cache-control": "private, no-store", location: url },
|
|
247
|
+
status: 302,
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The URL a browser or script can fetch the object from by itself, or null
|
|
252
|
+
* when the storage gives none, or gives one only it can read. When the
|
|
253
|
+
* storage can't serve the object any other way, its failure stands.
|
|
254
|
+
*/
|
|
255
|
+
const publicDownloadUrl = async (
|
|
256
|
+
adapter: StorageAdapter,
|
|
257
|
+
storageUri: string,
|
|
258
|
+
): Promise<string | null> => {
|
|
259
|
+
if (adapter.getDownloadUrl === undefined) return null;
|
|
260
|
+
try {
|
|
261
|
+
const { url } = await adapter.getDownloadUrl({ storageUri });
|
|
262
|
+
return /^https?:\/\//iu.test(url) ? url : null;
|
|
263
|
+
} catch (error) {
|
|
264
|
+
if (adapter.get === undefined) throw error;
|
|
265
|
+
console.warn(
|
|
266
|
+
`Streaming a native build through the console: ${adapter.name} gave no download URL.`,
|
|
267
|
+
error,
|
|
268
|
+
);
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
|
|
235
273
|
/**
|
|
236
274
|
* Downloads a native build's artifact: a redirect to the storage's download
|
|
237
|
-
* URL, or the
|
|
238
|
-
*
|
|
239
|
-
* never expires.
|
|
275
|
+
* URL, or, when the storage gives no URL a browser can fetch, the object
|
|
276
|
+
* streamed through the console, whose host then serves every byte. The
|
|
277
|
+
* redirect is resolved on each request, so the console's link never expires.
|
|
240
278
|
*/
|
|
241
279
|
export async function downloadNativeBuild(
|
|
242
280
|
id: string,
|
|
@@ -253,13 +291,8 @@ export async function downloadNativeBuild(
|
|
|
253
291
|
|
|
254
292
|
const storageUri = build.artifact_storage_uri;
|
|
255
293
|
const adapter = storageFor(storage, storageUri);
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
return new Response(null, {
|
|
259
|
-
headers: { "cache-control": "private, no-store", location: url },
|
|
260
|
-
status: 302,
|
|
261
|
-
});
|
|
262
|
-
}
|
|
294
|
+
const url = adapter && (await publicDownloadUrl(adapter, storageUri));
|
|
295
|
+
if (url) return noStoreRedirect(url);
|
|
263
296
|
if (adapter?.get !== undefined) {
|
|
264
297
|
const { response } = await adapter.get({ storageUri });
|
|
265
298
|
if (!response) {
|
|
@@ -268,9 +301,13 @@ export async function downloadNativeBuild(
|
|
|
268
301
|
const fileName = decodeURIComponent(storageUri.split("/").at(-1) ?? "");
|
|
269
302
|
const headers = new Headers(response.headers);
|
|
270
303
|
headers.set("cache-control", "private, no-store");
|
|
304
|
+
if (build.artifact_kind === "apk") {
|
|
305
|
+
headers.set("content-type", APK_CONTENT_TYPE);
|
|
306
|
+
}
|
|
271
307
|
headers.set(
|
|
272
308
|
"content-disposition",
|
|
273
|
-
`
|
|
309
|
+
// `filename` for the clients that don't read `filename*`, such as curl.
|
|
310
|
+
`attachment; filename="${fileName.replace(/[^\w.-]/gu, "_")}"; filename*=UTF-8''${encodeURIComponent(fileName)}`,
|
|
274
311
|
);
|
|
275
312
|
return new Response(response.body, {
|
|
276
313
|
headers,
|
|
@@ -279,10 +316,222 @@ export async function downloadNativeBuild(
|
|
|
279
316
|
});
|
|
280
317
|
}
|
|
281
318
|
if (adapter === undefined && isPublicUrl(storageUri)) {
|
|
282
|
-
return
|
|
319
|
+
return noStoreRedirect(storageUri);
|
|
283
320
|
}
|
|
284
321
|
return new Response(
|
|
285
322
|
`No storage adapter for protocol: ${protocolOf(storageUri)}`,
|
|
286
323
|
{ status: 503 },
|
|
287
324
|
);
|
|
288
325
|
}
|
|
326
|
+
|
|
327
|
+
/** A page of native builds that leads with each distribution path's newest. */
|
|
328
|
+
export type NativeBuildFoldedPage = FoldedPage<NativeBuildRow>;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* The most rows one page or fold reads looking above its own rows for a
|
|
332
|
+
* newer build on a path, of its read budget, so its own rows keep the rest.
|
|
333
|
+
*/
|
|
334
|
+
const SIBLING_READ_CAP = 100;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Finds the nearest build newer than each of some builds on its
|
|
338
|
+
* distribution path, by each channel's own index, read upward from where
|
|
339
|
+
* its caller starts and kept, so each channel's rows are read once. The
|
|
340
|
+
* channels are read side by side. Newer is the registry's order: a greater
|
|
341
|
+
* ID. A path is the channel, platform, sandbox flag and distribution
|
|
342
|
+
* (`nativeBuildPathKey`), worked out from the row, so a build registered at
|
|
343
|
+
* any time is found. It spends `budget`, at most `SIBLING_READ_CAP` rows in
|
|
344
|
+
* all, shared out among the channels: a build it can't find a newer one for
|
|
345
|
+
* within that has none it knows of.
|
|
346
|
+
*/
|
|
347
|
+
const newerOnPathFinder = (
|
|
348
|
+
core: Pick<HotUpdaterCoreApi, "listNativeBuilds">,
|
|
349
|
+
) => {
|
|
350
|
+
const channels = new Map<
|
|
351
|
+
string,
|
|
352
|
+
{ from: string; rows: NativeBuildRow[]; last?: string; ended: boolean }
|
|
353
|
+
>();
|
|
354
|
+
let spent = 0;
|
|
355
|
+
const lookUp = async (
|
|
356
|
+
build: NativeBuildRow,
|
|
357
|
+
from: string,
|
|
358
|
+
share: ReadBudget,
|
|
359
|
+
): Promise<NativeBuildRow | undefined> => {
|
|
360
|
+
let channel = channels.get(build.channel_id);
|
|
361
|
+
if (channel === undefined || from < channel.from) {
|
|
362
|
+
channel = { from, rows: [], ended: false };
|
|
363
|
+
channels.set(build.channel_id, channel);
|
|
364
|
+
}
|
|
365
|
+
const key = nativeBuildPathKey(build);
|
|
366
|
+
for (;;) {
|
|
367
|
+
// Oldest first, so the first match is the nearest newer build.
|
|
368
|
+
const newer = channel.rows.find(
|
|
369
|
+
(row) => row.id > build.id && nativeBuildPathKey(row) === key,
|
|
370
|
+
);
|
|
371
|
+
if (newer !== undefined) return newer;
|
|
372
|
+
const limit = Math.min(FOLDED_PAGE_CHUNK, share.left);
|
|
373
|
+
if (channel.ended || limit <= 0) return undefined;
|
|
374
|
+
const rows = await core.listNativeBuilds({
|
|
375
|
+
channelId: build.channel_id,
|
|
376
|
+
order: "asc",
|
|
377
|
+
after: channel.last ?? channel.from,
|
|
378
|
+
limit,
|
|
379
|
+
});
|
|
380
|
+
share.left -= rows.length;
|
|
381
|
+
channel.rows.push(...rows);
|
|
382
|
+
channel.last = rows.at(-1)?.id ?? channel.last;
|
|
383
|
+
if (rows.length < limit) channel.ended = true;
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
return async (
|
|
387
|
+
builds: readonly NativeBuildRow[],
|
|
388
|
+
from: string,
|
|
389
|
+
budget: ReadBudget,
|
|
390
|
+
): Promise<ReadonlyMap<string, NativeBuildRow | undefined>> => {
|
|
391
|
+
const byChannel = new Map<string, NativeBuildRow[]>();
|
|
392
|
+
for (const build of builds) {
|
|
393
|
+
byChannel.set(build.channel_id, [
|
|
394
|
+
...(byChannel.get(build.channel_id) ?? []),
|
|
395
|
+
build,
|
|
396
|
+
]);
|
|
397
|
+
}
|
|
398
|
+
const allowance = Math.max(
|
|
399
|
+
0,
|
|
400
|
+
Math.min(budget.left, SIBLING_READ_CAP - spent),
|
|
401
|
+
);
|
|
402
|
+
const share = Math.floor(allowance / Math.max(byChannel.size, 1));
|
|
403
|
+
const found = new Map<string, NativeBuildRow | undefined>();
|
|
404
|
+
const used = await Promise.all(
|
|
405
|
+
[...byChannel.values()].map(async (channelBuilds) => {
|
|
406
|
+
const left: ReadBudget = { left: share };
|
|
407
|
+
for (const build of channelBuilds) {
|
|
408
|
+
found.set(build.id, await lookUp(build, from, left));
|
|
409
|
+
}
|
|
410
|
+
return share - left.left;
|
|
411
|
+
}),
|
|
412
|
+
);
|
|
413
|
+
const total = used.reduce((sum, rows) => sum + rows, 0);
|
|
414
|
+
budget.left -= total;
|
|
415
|
+
spent += total;
|
|
416
|
+
return found;
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* One page of native builds, newest first, that leads with the newest build
|
|
422
|
+
* of each distribution path, and the store build: every other build folds
|
|
423
|
+
* into the runs between them. It reads the registry's ID index, or its
|
|
424
|
+
* channel index, a chunk at a time, and on a later page each path's newer
|
|
425
|
+
* builds above the page in its channel's index, at most
|
|
426
|
+
* `FOLDED_PAGE_READ_BUDGET` rows in all.
|
|
427
|
+
*/
|
|
428
|
+
export function listNativeBuildFolds(
|
|
429
|
+
core: Pick<HotUpdaterCoreApi, "listNativeBuilds">,
|
|
430
|
+
{
|
|
431
|
+
channelId,
|
|
432
|
+
before,
|
|
433
|
+
after,
|
|
434
|
+
}: {
|
|
435
|
+
readonly channelId?: string;
|
|
436
|
+
readonly before?: string;
|
|
437
|
+
readonly after?: string;
|
|
438
|
+
},
|
|
439
|
+
): Promise<NativeBuildFoldedPage> {
|
|
440
|
+
const findNewer = newerOnPathFinder(core);
|
|
441
|
+
// The newest build of each path this page has read, newest first.
|
|
442
|
+
const seen = new Map<string, NativeBuildRow>();
|
|
443
|
+
return foldedPage({
|
|
444
|
+
read: (input) =>
|
|
445
|
+
core.listNativeBuilds({
|
|
446
|
+
...input,
|
|
447
|
+
...(channelId === undefined ? {} : { channelId }),
|
|
448
|
+
}),
|
|
449
|
+
classify: async (builds, { budget, order, newerThan }) => {
|
|
450
|
+
const ordinary = new Set<string>();
|
|
451
|
+
if (order === "asc") {
|
|
452
|
+
// Oldest first, each build looks above itself.
|
|
453
|
+
const newer = await findNewer(builds, builds[0]!.id, budget);
|
|
454
|
+
for (const build of builds) {
|
|
455
|
+
if (build.is_store_build || newer.get(build.id) === undefined) {
|
|
456
|
+
ordinary.add(build.id);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return ordinary;
|
|
460
|
+
}
|
|
461
|
+
// Newest first, a path's first build on the page looks above the
|
|
462
|
+
// page, and the rest have it as their newer build.
|
|
463
|
+
const firsts: NativeBuildRow[] = [];
|
|
464
|
+
const keys = new Set(seen.keys());
|
|
465
|
+
for (const build of builds) {
|
|
466
|
+
const key = nativeBuildPathKey(build);
|
|
467
|
+
if (!keys.has(key)) {
|
|
468
|
+
keys.add(key);
|
|
469
|
+
firsts.push(build);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
const above =
|
|
473
|
+
newerThan === undefined
|
|
474
|
+
? new Map<string, NativeBuildRow | undefined>()
|
|
475
|
+
: await findNewer(firsts, newerThan, budget);
|
|
476
|
+
for (const build of builds) {
|
|
477
|
+
const key = nativeBuildPathKey(build);
|
|
478
|
+
const newer = seen.get(key) ?? above.get(build.id);
|
|
479
|
+
if (!seen.has(key)) seen.set(key, build);
|
|
480
|
+
if (build.is_store_build || newer === undefined) {
|
|
481
|
+
ordinary.add(build.id);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
return ordinary;
|
|
485
|
+
},
|
|
486
|
+
...(before === undefined ? {} : { before }),
|
|
487
|
+
...(after === undefined ? {} : { after }),
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/** One chunk of a fold's builds, each with the newer build on its path. */
|
|
492
|
+
export interface NativeBuildFoldChunk {
|
|
493
|
+
readonly rows: readonly NativeBuildRow[];
|
|
494
|
+
/** The nearest newer build on each row's path, by row ID, where one was found. */
|
|
495
|
+
readonly newer: Readonly<Record<string, NativeBuildRow>>;
|
|
496
|
+
readonly next?: string;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* One chunk of a fold's builds, as `listNativeBuildFolds` folded them: the
|
|
501
|
+
* builds under `from` down to `to`, and each one's nearest newer build,
|
|
502
|
+
* read from its channel's index upward within the read budget.
|
|
503
|
+
*/
|
|
504
|
+
export async function readNativeBuildFold(
|
|
505
|
+
core: Pick<HotUpdaterCoreApi, "listNativeBuilds">,
|
|
506
|
+
{
|
|
507
|
+
channelId,
|
|
508
|
+
...fold
|
|
509
|
+
}: {
|
|
510
|
+
readonly channelId?: string;
|
|
511
|
+
readonly from?: string;
|
|
512
|
+
readonly to: string;
|
|
513
|
+
readonly after?: string;
|
|
514
|
+
},
|
|
515
|
+
): Promise<NativeBuildFoldChunk> {
|
|
516
|
+
const chunk = await readFold({
|
|
517
|
+
read: (input) =>
|
|
518
|
+
core.listNativeBuilds({
|
|
519
|
+
...input,
|
|
520
|
+
...(channelId === undefined ? {} : { channelId }),
|
|
521
|
+
}),
|
|
522
|
+
...fold,
|
|
523
|
+
});
|
|
524
|
+
const budget: ReadBudget = {
|
|
525
|
+
left: FOLDED_PAGE_READ_BUDGET - chunk.rows.length,
|
|
526
|
+
};
|
|
527
|
+
const oldest = chunk.rows.at(-1)?.id;
|
|
528
|
+
const found =
|
|
529
|
+
oldest === undefined
|
|
530
|
+
? new Map<string, NativeBuildRow | undefined>()
|
|
531
|
+
: await newerOnPathFinder(core)(chunk.rows, oldest, budget);
|
|
532
|
+
const newer: Record<string, NativeBuildRow> = {};
|
|
533
|
+
for (const [id, row] of found) {
|
|
534
|
+
if (row !== undefined) newer[id] = row;
|
|
535
|
+
}
|
|
536
|
+
return { ...chunk, newer };
|
|
537
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const ESCAPES: Record<string, string> = {
|
|
2
|
+
"&": "&",
|
|
3
|
+
"<": "<",
|
|
4
|
+
">": ">",
|
|
5
|
+
'"': """,
|
|
6
|
+
"'": "'",
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Text as an XML plist's `<string>` holds it. Control characters have no XML
|
|
11
|
+
* form at all, even escaped, so they go.
|
|
12
|
+
*/
|
|
13
|
+
export const escapePlistText = (text: string) =>
|
|
14
|
+
[...text]
|
|
15
|
+
.filter((character) => character >= " " || "\t\n\r".includes(character))
|
|
16
|
+
.map((character) => ESCAPES[character] ?? character)
|
|
17
|
+
.join("");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The console's address and path as a phone reached it, without a trailing
|
|
3
|
+
* slash, from a request to `routePath` under it. A proxy that ends TLS says so
|
|
4
|
+
* in `x-forwarded-proto`, which only upgrades the scheme: the answer goes back
|
|
5
|
+
* to whoever sent the header, and is never cached.
|
|
6
|
+
*/
|
|
7
|
+
export const publicConsoleBase = (request: Request, routePath: string) => {
|
|
8
|
+
const url = new URL(request.url);
|
|
9
|
+
const forwarded = request.headers
|
|
10
|
+
.get("x-forwarded-proto")
|
|
11
|
+
?.split(",")[0]
|
|
12
|
+
?.trim();
|
|
13
|
+
const base = url.pathname.endsWith(routePath)
|
|
14
|
+
? url.pathname.slice(0, -routePath.length)
|
|
15
|
+
: "";
|
|
16
|
+
return `${forwarded === "https" ? "https:" : url.protocol}//${url.host}${base}`;
|
|
17
|
+
};
|