@hot-updater/console 1.2.0-rc.27 → 1.2.0-rc.29
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-OlRj4Jz0.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-DUqlpHCp.js → ConsoleFeatureUnavailable-Be-0iTww.js} +1 -1
- package/.output/public/assets/EventDetails-bDOYte1z.js +1 -0
- package/.output/public/assets/HashValueDisplay-D2f0HmyU.js +1 -0
- package/.output/public/assets/{InsightsPageHeader-2bTrjXln.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-Ckb5GMhh.js → NotFoundPage-CVBtl68B.js} +1 -1
- package/.output/public/assets/{PlatformIcon-CJ69KopR.js → PlatformIcon-DVnzzGqM.js} +1 -1
- package/.output/public/assets/RelativeTime-B4PK8qDw.js +1 -0
- package/.output/public/assets/{RolloutPercentageBadge-G6qt8rVb.js → RolloutPercentageBadge-D_I0Raj2.js} +1 -1
- 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-DiRLrFVe.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-D0NFvUY5.js → badge-FZMD5vvS.js} +1 -1
- 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-Bf1BPKMs.js → dist-DAM__Tdz.js} +1 -1
- package/.output/public/assets/download-B2GjTySo.js +1 -0
- 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-BdyQq4-k.js +10 -0
- package/.output/public/assets/{input-group-D_NfhUbX.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-CYPrQVUC.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-_dZi1_ay.js → insights_.distribution-CRkGNelG.js} +1 -1
- 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-DzBe6DHr.js → key-round-D7UgdXyA.js} +1 -1
- package/.output/public/assets/{link-DTEyW70e.js → link-CN3iHC4A.js} +2 -2
- package/.output/public/assets/{list-B6GeoQ_b.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-B-u7uLLG.js +2 -0
- package/.output/public/assets/native-builds_.devices-CVNAQtSy.js +1 -0
- package/.output/public/assets/{package-ytYrywZH.js → package-BmfoZ5Zj.js} +1 -1
- 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-C-tvoCcE.js → refresh-cw-BHhBYjS8.js} +1 -1
- package/.output/public/assets/{relativeTime-DvyxGIsm.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-Clk5xTeE.js → rotate-cw-Ba-slJea.js} +1 -1
- package/.output/public/assets/{routes-gQXSzO_n.js → routes-DM3TyTLW.js} +2 -2
- 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-Bt0YXG26.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/server/{__23tanstack-start-server-fn-resolver-CIN7Hpjl.mjs → __23tanstack-start-server-fn-resolver-DTuNq7_z.mjs} +85 -49
- 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 +2 -2
- package/.output/server/_libs/_.mjs +1 -1
- package/.output/server/_libs/lucide-react.mjs +22 -2
- 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-M6t7EIt4.mjs → -native-builds-search-Mm_AZoRU.mjs} +8 -2
- package/.output/server/_ssr/{BundleIdDisplay-BaFPllhZ.mjs → BundleIdDisplay-BX6DLh1K.mjs} +3 -3
- package/.output/server/_ssr/ChannelBadge-D7O95Ack.mjs +23 -0
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-C-1Ls1sm.mjs → ConsoleFeatureUnavailable-Dfs3WUZf.mjs} +8 -8
- package/.output/server/_ssr/{EventDetails-jVM6sD8m.mjs → EventDetails-C1Q9caVa.mjs} +9 -9
- package/.output/server/_ssr/{HashValueDisplay-C7nja_fn.mjs → HashValueDisplay-SIEeZe0O.mjs} +3 -3
- package/.output/server/_ssr/{InsightsPageHeader-CDJhClRy.mjs → InsightsPageHeader-CAcbXSFD.mjs} +9 -9
- package/.output/server/_ssr/IosInstall-B7yxnQ7o.mjs +615 -0
- package/.output/server/_ssr/NativeBuildsNav-BwoEX7xx.mjs +38 -0
- package/.output/server/_ssr/{NotFoundPage-DclXpGzY.mjs → NotFoundPage-Cd_nKv04.mjs} +3 -3
- package/.output/server/_ssr/{PlatformIcon-CMLs3Wez.mjs → PlatformIcon-BpGOEXjU.mjs} +2 -2
- package/.output/server/_ssr/{RelativeTime-DUr_cgha.mjs → RelativeTime-B5txzq94.mjs} +40 -12
- package/.output/server/_ssr/{RolloutPercentageBadge-Mg4g25Gf.mjs → RolloutPercentageBadge-BEV8btLv.mjs} +4 -4
- package/.output/server/_ssr/RowReason-CEDEk7-N.mjs +186 -0
- package/.output/server/_ssr/{StoreSubmission-CUIg6WXQ.mjs → SandboxBadge-wlOMZIUd.mjs} +17 -17
- package/.output/server/_ssr/{TargetDisplay-C-C8MKuf.mjs → TargetDisplay-076I9qHx.mjs} +6 -23
- package/.output/server/_ssr/{alert-dialog-CiN6BFHg.mjs → alert-dialog-DrD4hAp4.mjs} +2 -2
- package/.output/server/_ssr/{api-BeWenjNl.mjs → api-C1plnjZg.mjs} +74 -17
- package/.output/server/_ssr/{api-keys-DzWwXpi5.mjs → api-keys-Bzn-P-lX.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-Bzaj1vWD.mjs → api-keys-L8_p18pO.mjs} +12 -12
- package/.output/server/_ssr/{api-keys-rpc-BRnZWUpw.mjs → api-keys-rpc-Mne2yo8z.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-B87QoJwB.mjs → api-rpc-ChVBmeca.mjs} +56 -33
- package/.output/server/_ssr/{auth-rpc-CO1_TL1b.mjs → auth-rpc-Dml8l_eq.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-BWTHsAlW.mjs → auth.server-DOShgraQ.mjs} +587 -19
- package/.output/server/_ssr/{badge-C7PdVtoH.mjs → badge-BasQflNy.mjs} +2 -2
- package/.output/server/_ssr/{bundleActivity-BGVvqWx7.mjs → bundleActivity-BP40zYSt.mjs} +1 -1
- package/.output/server/_ssr/{card-BkxhOkGp.mjs → card-BrGGQYC0.mjs} +2 -2
- package/.output/server/_ssr/{config.server-Bvqyj9Ec.mjs → config.server-CVOdMDBk.mjs} +4 -4
- package/.output/server/_ssr/{console-access-CHD7-b3E.mjs → console-access-Bi-abtY-.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-Btkz_ZEj.mjs → console-features-api-Bjxo5ur3.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-DYf3xbak.mjs → console-features-rpc-xzdodg3g.mjs} +3 -3
- package/.output/server/_ssr/{console-features-CRP-pfov.mjs → console-features-xaGDhRC9.mjs} +1 -1
- package/.output/server/_ssr/deviceProfileToken-CwWb1lPq.mjs +82 -0
- package/.output/server/_ssr/{dialog-fnm03nlH.mjs → dialog-7iMkt9l0.mjs} +2 -2
- package/.output/server/_ssr/{downloadBundle-BX8ODCZT.mjs → downloadBundle-DnoYpi36.mjs} +1 -1
- package/.output/server/_ssr/{empty-BzjaWjuQ.mjs → empty-Chb-YL3R.mjs} +3 -3
- package/.output/server/_ssr/{failureReports-C_CmBF4x.mjs → failureReports-BA2eg11O.mjs} +3 -3
- package/.output/server/_ssr/{field-C2GZCygB.mjs → field-mL_Aa6ff.mjs} +3 -3
- package/.output/server/_ssr/foldedPage-CqpVk31Q.mjs +176 -0
- package/.output/server/_ssr/{getBundleChildren-BJTufthT.mjs → getBundleChildren-CdqFonhl.mjs} +1 -1
- package/.output/server/_ssr/{input-group-Cu6TtdYb.mjs → input-group-C00_xYka.mjs} +2 -2
- package/.output/server/_ssr/{insights-DuQB3_VX.mjs → insights-BcVNQCXf.mjs} +28 -28
- package/.output/server/_ssr/{insights-DZZsKfdZ.mjs → insights-BdF3o0Yp.mjs} +2 -2
- package/.output/server/_ssr/{insights-D_XXiwXz.mjs → insights-C9sSQPMF.mjs} +5 -5
- package/.output/server/_ssr/{insights-api-a8B90BHl.mjs → insights-api-CShlv9dA.mjs} +5 -5
- package/.output/server/_ssr/{insights-errors-Bz3sWNZm.mjs → insights-errors-CXHg1lLV.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-DNQ9qVVf.mjs → insights-failures-7zH97WOO.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-rpc-DM5dPfnS.mjs → insights-failures-rpc-C-cv9bId.mjs} +10 -10
- package/.output/server/_ssr/{insights-recovery-DOkpqnQ8.mjs → insights-recovery-BhOg6kz2.mjs} +1 -1
- package/.output/server/_ssr/{insights-recovery-rpc-C81f-2Xa.mjs → insights-recovery-rpc-Ct-jIQZU.mjs} +6 -6
- package/.output/server/_ssr/{insights-rpc-DVbg0dsI.mjs → insights-rpc-Dc0I8O3n.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-sCdCd-8P.mjs → insights-search-D_vVwBwW.mjs} +3 -3
- package/.output/server/_ssr/{insights-usage-4KDIN3Kg.mjs → insights-usage-h8fipPTv.mjs} +1 -1
- package/.output/server/_ssr/{insights-usage-rpc-CKfXb-tc.mjs → insights-usage-rpc-4TR94EHa.mjs} +6 -6
- package/.output/server/_ssr/{insights-usage-rpc-DAwc4FE6.mjs → insights-usage-rpc-D60hOhzl.mjs} +5 -5
- package/.output/server/_ssr/{insightsUsage-DmQdJZqT.mjs → insightsUsage-BjSiV_X_.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-FhZMnsNm.mjs → insights_.distribution-BgnfMzw1.mjs} +17 -17
- package/.output/server/_ssr/{insights_.distribution-CvPrNh8j.mjs → insights_.distribution-DkD7uAwA.mjs} +5 -5
- package/.output/server/_ssr/{insights_.distribution-Bq52kUtA.mjs → insights_.distribution-wT1mjWsG.mjs} +2 -2
- package/.output/server/_ssr/{installations-BjOaol_w.mjs → installations-DtRbzy3N.mjs} +2 -2
- package/.output/server/_ssr/{installations-CKe2Srtx.mjs → installations-DvxMRP5u.mjs} +4 -4
- package/.output/server/_ssr/{installations-B2anrEwv.mjs → installations-tFsFnxKk.mjs} +13 -13
- package/.output/server/_ssr/ios-devices-rpc-CIPuCUQ8.mjs +139 -0
- package/.output/server/_ssr/iosDeviceProfile-WyMC1593.mjs +176 -0
- package/.output/server/_ssr/iosDevices-B0TjF_sb.mjs +129 -0
- package/.output/server/_ssr/listReleases-DYYA5alS.mjs +94 -0
- package/.output/server/_ssr/{native-builds-OUdRtp6m.mjs → native-builds-BXBkklfA.mjs} +28 -6
- package/.output/server/_ssr/{native-builds-DSOAh1CX.mjs → native-builds-C458T7Ts.mjs} +3 -3
- package/.output/server/_ssr/{native-builds-BsfydODe.mjs → native-builds-C5WxR0BT.mjs} +235 -90
- package/.output/server/_ssr/{native-builds_._buildId-BOedzqOS.mjs → native-builds_._buildId-CyCGKZ1H.mjs} +165 -323
- package/.output/server/_ssr/{native-builds_._buildId-DSfes24H.mjs → native-builds_._buildId-UsgsqKI8.mjs} +3 -3
- package/.output/server/_ssr/native-builds_.devices-BcfLIzJs.mjs +10 -0
- package/.output/server/_ssr/native-builds_.devices-BpTcIWm0.mjs +689 -0
- package/.output/server/_ssr/{nativeBuildDownloadLink-D-yCU-H7.mjs → nativeBuildDownloadLink-CtB2G7qG.mjs} +3 -3
- package/.output/server/_ssr/{nativeBuildInstall-szlEt-t_.mjs → nativeBuildInstall-PavEyZtZ.mjs} +56 -8
- package/.output/server/_ssr/{nativeBuilds-CRLmvFaO.mjs → nativeBuilds-Cub0EUGN.mjs} +135 -13
- package/.output/server/_ssr/{publicConsoleBase-DvHYxDaG.mjs → publicConsoleBase-f67NLLXZ.mjs} +11 -3
- package/.output/server/_ssr/{release-adoption-C7sUFDwa.mjs → release-adoption-DeICczY7.mjs} +2 -2
- package/.output/server/_ssr/{release-adoption-rpc-DHqnRw73.mjs → release-adoption-rpc-DkT6ui4_.mjs} +8 -8
- package/.output/server/_ssr/{releaseAdoption-D6ScSu-W.mjs → releaseAdoption-kHZo8P90.mjs} +3 -3
- package/.output/server/_ssr/{remote-config-D2wHSNjm.mjs → remote-config-BKlK0dFP.mjs} +3 -3
- package/.output/server/_ssr/{remote-config-Byc4JHkB.mjs → remote-config-D_nQT__6.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-ZOfBMLtE.mjs → remote-config-rpc-BW6lyp9Y.mjs} +3 -3
- package/.output/server/_ssr/{remote-config-DkrjdfMC.mjs → remote-config-v1hs050H.mjs} +24 -24
- package/.output/server/_ssr/{router-D0GDdWkI.mjs → router-hKO__Vrv.mjs} +74 -77
- package/.output/server/_ssr/{routes-C10oCddR.mjs → routes-DKxm5A7X.mjs} +312 -233
- package/.output/server/_ssr/{routes-ChnyY2qP.mjs → routes-OhljAvlx.mjs} +15 -14
- package/.output/server/_ssr/{runtime.server-wcHT2Cop.mjs → runtime.server-CkSbWaZm.mjs} +2 -2
- package/.output/server/_ssr/{schema-migration-rpc-BKRs4MNf.mjs → schema-migration-rpc-DrrYEFqy.mjs} +3 -3
- package/.output/server/_ssr/{select-B9du7Z50.mjs → select-M4kWGKJW.mjs} +3 -3
- package/.output/server/_ssr/{server-CApi3lVS.mjs → server-4hXySEh0.mjs} +5 -5
- package/.output/server/_ssr/{sidebar-BwMkm72O.mjs → sidebar-CFlo6lny.mjs} +3 -3
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{start-By4wHYjG.mjs → start-D3noqqOK.mjs} +1 -1
- package/.output/server/_ssr/{switch-DyShvUOF.mjs → switch-xTCGSBdC.mjs} +3 -3
- package/.output/server/_ssr/{table-DMj6AnqH.mjs → table-CqdaVMjd.mjs} +2 -2
- package/.output/server/_ssr/{tabs-5a_JPYme.mjs → tabs-DtMAFr25.mjs} +4 -4
- package/.output/server/_ssr/{updateFailures-DNiv3S_y.mjs → updateFailures-D0bP_Ume.mjs} +3 -3
- package/.output/server/_tanstack-start-manifest_v-CYfHRC4i.mjs +225 -0
- package/.output/server/index.mjs +452 -375
- package/lib/index.d.mts +9 -0
- package/package.json +7 -7
- package/src/components/DataTable.tsx +47 -3
- package/src/components/FoldedRows.tsx +219 -0
- package/src/components/RowReason.tsx +56 -0
- package/src/components/features/api-keys/ApiKeysPage.tsx +1 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +2 -2
- package/src/components/features/native-builds/CommitLink.tsx +2 -1
- package/src/components/features/native-builds/InstallCard.tsx +77 -40
- package/src/components/features/native-builds/IosDevicesPage.tsx +925 -0
- package/src/components/features/native-builds/IosInstall.tsx +375 -73
- package/src/components/features/native-builds/IpaDevicesCard.tsx +111 -0
- package/src/components/features/native-builds/NativeBuildDetailPage.tsx +7 -0
- package/src/components/features/native-builds/NativeBuildsNav.tsx +44 -0
- package/src/components/features/native-builds/NativeBuildsPage.tsx +2 -0
- package/src/components/features/native-builds/NativeBuildsTable.tsx +220 -32
- package/src/components/features/native-builds/OlderBuildLabel.tsx +61 -0
- package/src/components/features/native-builds/ShortHash.tsx +5 -2
- package/src/components/features/remote-config/PublishDialog.tsx +4 -1
- package/src/components/features/remote-config/VersionsCard.tsx +5 -2
- package/src/components/ui/sonner.tsx +3 -1
- package/src/index.ts +9 -0
- package/src/lib/api-rpc.ts +70 -30
- package/src/lib/api.ts +65 -2
- package/src/lib/ios-devices-api.ts +110 -0
- package/src/lib/ios-devices-rpc.ts +183 -0
- package/src/lib/native-builds.ts +72 -7
- 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/nativeBuildInstall.ts +147 -7
- package/src/lib/server/nativeBuilds.ts +221 -26
- package/src/routeTree.gen.ts +64 -67
- 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/index.tsx +447 -299
- package/src/routes/native-builds_.devices.tsx +21 -0
- package/src/styles.css +2 -2
- package/.output/public/assets/BundleIdDisplay-CP6rsdFO.js +0 -1
- package/.output/public/assets/EventDetails-DZsRlDHk.js +0 -1
- package/.output/public/assets/HashValueDisplay-MoZMmTeP.js +0 -1
- package/.output/public/assets/RelativeTime-TCmpOVPg.js +0 -1
- package/.output/public/assets/StoreSubmission-CqSg880n.js +0 -1
- package/.output/public/assets/TargetDisplay-DwOaMOiI.js +0 -1
- package/.output/public/assets/api-LQJH44FU.js +0 -1
- package/.output/public/assets/api-keys-4w2-ofii.js +0 -1
- package/.output/public/assets/api-keys-uFY8FsN9.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/card-ulgg5xHn.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-CLIaC82_.js +0 -1
- package/.output/public/assets/empty-Bhlj8PEo.js +0 -1
- package/.output/public/assets/field-q4sTYzNU.js +0 -1
- package/.output/public/assets/history-DakJoeSM.js +0 -1
- package/.output/public/assets/index-CJclLsbG.js +0 -10
- package/.output/public/assets/insights-0TUItqwh.js +0 -1
- package/.output/public/assets/insights-B75txQ_F.js +0 -42
- package/.output/public/assets/insights-C17Z0whn.js +0 -2
- package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
- package/.output/public/assets/insights-usage-rpc-BbFllvi_.js +0 -1
- package/.output/public/assets/insights_.distribution-AZcfvK7x.js +0 -1
- package/.output/public/assets/insights_.distribution-gDqNqI5E.js +0 -2
- package/.output/public/assets/installations-Ap2G2tDs.js +0 -1
- package/.output/public/assets/installations-D0g3xvw8.js +0 -2
- package/.output/public/assets/installations-Y_7QW_p8.js +0 -1
- package/.output/public/assets/native-builds-Ba6cEZfm.js +0 -2
- package/.output/public/assets/native-builds-C3_-21we.js +0 -1
- package/.output/public/assets/native-builds_._buildId-BnP31v32.js +0 -1
- package/.output/public/assets/native-builds_._buildId-Cp9LJiMP.js +0 -2
- package/.output/public/assets/plus-BVhOauU3.js +0 -1
- package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
- package/.output/public/assets/remote-config-BRdy8QFR.js +0 -1
- package/.output/public/assets/remote-config-C9p5Pcdj.js +0 -6
- package/.output/public/assets/remote-config-CIAEArwq.js +0 -1
- package/.output/public/assets/routes-BLTF7nwe.js +0 -1
- package/.output/public/assets/search-nnvSOTEB.js +0 -1
- package/.output/public/assets/select-CBIU0_M1.js +0 -1
- package/.output/public/assets/smartphone-r0rRdPas.js +0 -1
- package/.output/public/assets/styles-BdlrKlVs.css +0 -2
- package/.output/public/assets/switch-CP6GsHmN.js +0 -1
- package/.output/public/assets/table-TUtVz-2l.js +0 -1
- package/.output/public/assets/tabs-CP3CSmtI.js +0 -1
- package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
- package/.output/server/_ssr/listReleases-CQEceg8j.mjs +0 -79
- package/.output/server/_ssr/nativeBuildDevice-DJUAzAIj.mjs +0 -210
- package/.output/server/_tanstack-start-manifest_v-8M7ggCuB.mjs +0 -192
- package/src/lib/server/nativeBuildDevice.ts +0 -253
- package/src/routes/[_]hot-updater/native-builds/$buildId/device-response.ts +0 -17
- package/src/routes/[_]hot-updater/native-builds/$buildId/device.ts +0 -17
- package/src/routes/[_]hot-updater/native-builds/$buildId/device[.]mobileconfig.ts +0 -17
- /package/.output/public/assets/{uuidv7-cI6C63Fm.js → uuidv7-DAoOOpz9.js} +0 -0
- /package/.output/public/assets/{valueToPercent-B6X9rUJM.js → valueToPercent-Bn8p2lng.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
HotUpdaterCoreApi,
|
|
3
|
+
IosDeviceRow,
|
|
3
4
|
NativeBuildRow,
|
|
4
5
|
StorageAdapter,
|
|
5
6
|
} from "@hot-updater/plugin-core";
|
|
@@ -16,6 +17,7 @@ import {
|
|
|
16
17
|
nativeBuildDownloadPath,
|
|
17
18
|
nativeBuildManifestPath,
|
|
18
19
|
} from "../native-builds";
|
|
20
|
+
import { listIosDevices } from "./iosDevices";
|
|
19
21
|
import {
|
|
20
22
|
issueNativeBuildDownloadLink,
|
|
21
23
|
type NativeBuildDownloadLinkResult,
|
|
@@ -184,6 +186,23 @@ export type NativeBuildInstallEligibility =
|
|
|
184
186
|
readonly status: "installable";
|
|
185
187
|
/** Whether the IPA lists the device: `unknown` without a UDID to look up. */
|
|
186
188
|
readonly device: "unknown" | "included" | "not-included";
|
|
189
|
+
/**
|
|
190
|
+
* The registry's row of a device the IPA doesn't list, or null when the
|
|
191
|
+
* registry doesn't know it: read only then.
|
|
192
|
+
*/
|
|
193
|
+
readonly registry: IosDeviceRow | null;
|
|
194
|
+
/**
|
|
195
|
+
* A newer build of this app on this channel whose IPA lists the device,
|
|
196
|
+
* which `registry.build_id` names, or null. The row keeps one build per
|
|
197
|
+
* device, the newest of any ad hoc scheme the CLI checked, so the build
|
|
198
|
+
* it names may be a sandbox's or another app's.
|
|
199
|
+
*/
|
|
200
|
+
readonly newerBuild: string | null;
|
|
201
|
+
/**
|
|
202
|
+
* Whether the viewer approves devices, which decides the next step under
|
|
203
|
+
* Apple's refusal: asked only when `registry` carries one, else false.
|
|
204
|
+
*/
|
|
205
|
+
readonly canApprove: boolean;
|
|
187
206
|
readonly expiresAt: string | null;
|
|
188
207
|
/** The token of the Install button's manifest and download. */
|
|
189
208
|
readonly link: NativeBuildDownloadLinkResult;
|
|
@@ -192,6 +211,57 @@ export type NativeBuildInstallEligibility =
|
|
|
192
211
|
const isExpired = ({ expiresAtMs }: IpaInstallInfo, now: number) =>
|
|
193
212
|
expiresAtMs !== null && expiresAtMs <= now;
|
|
194
213
|
|
|
214
|
+
/**
|
|
215
|
+
* The build a registered device's row names, when it is newer than `build`,
|
|
216
|
+
* of the same app (bundle ID, read from its IPA, and sandbox or not), on the
|
|
217
|
+
* same channel, ad hoc, unexpired, and its IPA lists the device; null
|
|
218
|
+
* otherwise, and for a build gone or unreadable. Its row is read only for a
|
|
219
|
+
* registered device whose row names a newer build, and its IPA only when the
|
|
220
|
+
* row matches.
|
|
221
|
+
*/
|
|
222
|
+
const newerBuildListing = async (
|
|
223
|
+
build: NativeBuildRow,
|
|
224
|
+
info: IpaInstallInfo,
|
|
225
|
+
device: IosDeviceRow,
|
|
226
|
+
key: string,
|
|
227
|
+
{
|
|
228
|
+
core,
|
|
229
|
+
storage,
|
|
230
|
+
fetch,
|
|
231
|
+
now,
|
|
232
|
+
}: {
|
|
233
|
+
readonly core: Pick<HotUpdaterCoreApi, "getNativeBuild">;
|
|
234
|
+
readonly storage: StorageAdapter;
|
|
235
|
+
readonly fetch: typeof globalThis.fetch;
|
|
236
|
+
readonly now: number;
|
|
237
|
+
},
|
|
238
|
+
): Promise<string | null> => {
|
|
239
|
+
const id = device.build_id;
|
|
240
|
+
if (device.status !== "registered" || id === null || id <= build.id) {
|
|
241
|
+
return null;
|
|
242
|
+
}
|
|
243
|
+
const newer = await core.getNativeBuild(id).catch(() => null);
|
|
244
|
+
if (
|
|
245
|
+
newer === null ||
|
|
246
|
+
newer.artifact_kind !== "ipa" ||
|
|
247
|
+
newer.platform !== build.platform ||
|
|
248
|
+
newer.channel_id !== build.channel_id ||
|
|
249
|
+
newer.is_sandbox !== build.is_sandbox ||
|
|
250
|
+
// Null on an IPA registered before it was recorded: its profile decides.
|
|
251
|
+
(newer.export_method !== null && newer.export_method !== "ad-hoc")
|
|
252
|
+
) {
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
const listing = await readNativeBuildInstallInfo(newer, storage, fetch);
|
|
256
|
+
return listing !== null &&
|
|
257
|
+
listing.bundleId === info.bundleId &&
|
|
258
|
+
listing.distribution === "ad-hoc" &&
|
|
259
|
+
listing.devices.includes(key) &&
|
|
260
|
+
!isExpired(listing, now)
|
|
261
|
+
? id
|
|
262
|
+
: null;
|
|
263
|
+
};
|
|
264
|
+
|
|
195
265
|
/**
|
|
196
266
|
* What an iPhone can do with a build, for a caller the Console already let in:
|
|
197
267
|
* one read of the build's row, and the IPA's few parts from storage. App Store
|
|
@@ -205,17 +275,20 @@ export const checkNativeBuildInstall = async (
|
|
|
205
275
|
core,
|
|
206
276
|
storage,
|
|
207
277
|
}: {
|
|
208
|
-
readonly core: Pick<HotUpdaterCoreApi, "getNativeBuild">;
|
|
278
|
+
readonly core: Pick<HotUpdaterCoreApi, "getNativeBuild" | "findIosDevice">;
|
|
209
279
|
readonly storage: StorageAdapter;
|
|
210
280
|
},
|
|
211
281
|
{
|
|
212
282
|
request,
|
|
213
283
|
now = Date.now(),
|
|
214
284
|
fetch = globalThis.fetch,
|
|
285
|
+
canApprove = async () => false,
|
|
215
286
|
}: {
|
|
216
287
|
readonly request?: Request;
|
|
217
288
|
readonly now?: number;
|
|
218
289
|
readonly fetch?: typeof globalThis.fetch;
|
|
290
|
+
/** Whether the viewer approves devices, asked only under Apple's refusal. */
|
|
291
|
+
readonly canApprove?: () => Promise<boolean>;
|
|
219
292
|
} = {},
|
|
220
293
|
): Promise<NativeBuildInstallEligibility> => {
|
|
221
294
|
const build = await core.getNativeBuild(id);
|
|
@@ -229,14 +302,30 @@ export const checkNativeBuildInstall = async (
|
|
|
229
302
|
return { status: "expired", expiresAt };
|
|
230
303
|
}
|
|
231
304
|
const key = udid === undefined ? null : normalizeIosUdid(udid);
|
|
305
|
+
const device =
|
|
306
|
+
key === null
|
|
307
|
+
? "unknown"
|
|
308
|
+
: info.distribution === "enterprise" || info.devices.includes(key)
|
|
309
|
+
? "included"
|
|
310
|
+
: "not-included";
|
|
311
|
+
const registry =
|
|
312
|
+
device === "not-included" && key !== null
|
|
313
|
+
? await core.findIosDevice(key)
|
|
314
|
+
: null;
|
|
232
315
|
return {
|
|
233
316
|
status: "installable",
|
|
234
|
-
device
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
317
|
+
device,
|
|
318
|
+
registry,
|
|
319
|
+
newerBuild:
|
|
320
|
+
registry === null || key === null
|
|
321
|
+
? null
|
|
322
|
+
: await newerBuildListing(build, info, registry, key, {
|
|
323
|
+
core,
|
|
324
|
+
storage,
|
|
325
|
+
fetch,
|
|
326
|
+
now,
|
|
327
|
+
}),
|
|
328
|
+
canApprove: registry?.apple_error == null ? false : await canApprove(),
|
|
240
329
|
expiresAt,
|
|
241
330
|
link: await issueNativeBuildDownloadLink(
|
|
242
331
|
id,
|
|
@@ -353,3 +442,54 @@ export const serveNativeBuildManifest = async (
|
|
|
353
442
|
},
|
|
354
443
|
});
|
|
355
444
|
};
|
|
445
|
+
|
|
446
|
+
/** One device an ad hoc IPA lists, with the registry's name when it has one. */
|
|
447
|
+
export interface NativeBuildIpaDevice {
|
|
448
|
+
readonly udid: string;
|
|
449
|
+
readonly name: string | null;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export type NativeBuildIpaDevices =
|
|
453
|
+
/** The IPA can't be read in parts. */
|
|
454
|
+
| { readonly status: "unavailable" }
|
|
455
|
+
/** An App Store export or an enterprise build, which list no devices. */
|
|
456
|
+
| { readonly status: "store" | "enterprise" }
|
|
457
|
+
| { readonly status: "listed"; readonly devices: NativeBuildIpaDevice[] };
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* The devices an IPA's profile lists, read from storage as the install check
|
|
461
|
+
* reads it, each named by the device registry when it knows the UDID. The IPA
|
|
462
|
+
* decides: the registry only names what it lists. One build read, the IPA's
|
|
463
|
+
* few parts, and the registry a page at a time.
|
|
464
|
+
*/
|
|
465
|
+
export const readNativeBuildIpaDevices = async (
|
|
466
|
+
id: string,
|
|
467
|
+
{
|
|
468
|
+
core,
|
|
469
|
+
storage,
|
|
470
|
+
}: {
|
|
471
|
+
readonly core: Pick<HotUpdaterCoreApi, "getNativeBuild" | "listIosDevices">;
|
|
472
|
+
readonly storage: StorageAdapter;
|
|
473
|
+
},
|
|
474
|
+
fetch: typeof globalThis.fetch = globalThis.fetch,
|
|
475
|
+
): Promise<NativeBuildIpaDevices> => {
|
|
476
|
+
const build = await core.getNativeBuild(id);
|
|
477
|
+
if (build === null) return { status: "unavailable" };
|
|
478
|
+
const info = await readNativeBuildInstallInfo(build, storage, fetch);
|
|
479
|
+
if (info === null) return { status: "unavailable" };
|
|
480
|
+
if (info.distribution === "store" || info.distribution === "enterprise") {
|
|
481
|
+
return { status: info.distribution };
|
|
482
|
+
}
|
|
483
|
+
const names = new Map(
|
|
484
|
+
info.devices.length === 0
|
|
485
|
+
? []
|
|
486
|
+
: (await listIosDevices(core)).map((row) => [row.udid, row.name]),
|
|
487
|
+
);
|
|
488
|
+
return {
|
|
489
|
+
status: "listed",
|
|
490
|
+
devices: info.devices.map((udid) => ({
|
|
491
|
+
udid,
|
|
492
|
+
name: names.get(udid) ?? null,
|
|
493
|
+
})),
|
|
494
|
+
};
|
|
495
|
+
};
|
|
@@ -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;
|
|
@@ -340,3 +323,215 @@ export async function downloadNativeBuild(
|
|
|
340
323
|
{ status: 503 },
|
|
341
324
|
);
|
|
342
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
|
+
}
|