@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
package/src/lib/api.ts
CHANGED
|
@@ -2,7 +2,12 @@ import type {
|
|
|
2
2
|
ReleaseFilter,
|
|
3
3
|
ReleasePolicyPatch,
|
|
4
4
|
} from "@hot-updater/plugin-core";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
useInfiniteQuery,
|
|
7
|
+
useMutation,
|
|
8
|
+
useQuery,
|
|
9
|
+
useQueryClient,
|
|
10
|
+
} from "@tanstack/react-query";
|
|
6
11
|
|
|
7
12
|
import {
|
|
8
13
|
createChannel as createChannelApi,
|
|
@@ -14,12 +19,17 @@ import {
|
|
|
14
19
|
getChannels,
|
|
15
20
|
getConfig,
|
|
16
21
|
getNativeBuildDetail,
|
|
22
|
+
getNativeBuildFold,
|
|
23
|
+
markNativeBuild as markNativeBuildApi,
|
|
24
|
+
createNativeBuildDownloadLink,
|
|
17
25
|
getNativeBuildDownloadUrl,
|
|
26
|
+
getNativeBuildInstallEligibility,
|
|
18
27
|
getNativeBuildPatches,
|
|
19
28
|
getNativeBuilds,
|
|
20
29
|
getRelease,
|
|
21
30
|
getReleaseCatalogDiagnostics,
|
|
22
31
|
getReleaseNativeBuild,
|
|
32
|
+
getReleaseFold,
|
|
23
33
|
getReleases,
|
|
24
34
|
preflightRelease as preflightReleaseApi,
|
|
25
35
|
promoteRelease as promoteReleaseApi,
|
|
@@ -35,6 +45,8 @@ export const queryKeys = {
|
|
|
35
45
|
all: releaseListQueryKey,
|
|
36
46
|
list: (filters?: ReleaseFilters) =>
|
|
37
47
|
[...releaseListQueryKey, filters ?? {}] as const,
|
|
48
|
+
fold: (filter: ReleaseFilter | undefined, fold: FoldBounds) =>
|
|
49
|
+
[...releaseListQueryKey, "fold", filter ?? {}, fold] as const,
|
|
38
50
|
},
|
|
39
51
|
release: (releaseId: string) => ["release", releaseId] as const,
|
|
40
52
|
releaseCatalog: (scopeKey: string) => ["release-catalog", scopeKey] as const,
|
|
@@ -48,12 +60,18 @@ export const queryKeys = {
|
|
|
48
60
|
nativeBuilds: {
|
|
49
61
|
all: ["native-builds"] as const,
|
|
50
62
|
list: (page: NativeBuildPage) => ["native-builds", page] as const,
|
|
63
|
+
fold: (channel: string | undefined, fold: FoldBounds) =>
|
|
64
|
+
["native-builds", "fold", channel ?? null, fold] as const,
|
|
51
65
|
},
|
|
52
66
|
nativeBuild: (id: string) => ["native-build", id] as const,
|
|
53
67
|
nativeBuildPatches: (minBundleId: string, page: KeysetPage) =>
|
|
54
68
|
["native-build-patches", minBundleId, page] as const,
|
|
55
69
|
nativeBuildDownloadUrl: (id: string) =>
|
|
56
70
|
["native-build-download-url", id] as const,
|
|
71
|
+
nativeBuildDownloadLink: (id: string) =>
|
|
72
|
+
["native-build-download-link", id] as const,
|
|
73
|
+
nativeBuildInstallEligibility: (id: string, udid: string | null) =>
|
|
74
|
+
["native-build-install-eligibility", id, udid] as const,
|
|
57
75
|
releaseNativeBuild: (release: ReleaseNativeBuildInput) =>
|
|
58
76
|
["release-native-build", release] as const,
|
|
59
77
|
};
|
|
@@ -78,11 +96,27 @@ export type ReleaseNativeBuildInput = {
|
|
|
78
96
|
};
|
|
79
97
|
|
|
80
98
|
/**
|
|
81
|
-
* How
|
|
82
|
-
*
|
|
83
|
-
*
|
|
99
|
+
* How long a storage download URL counts as fresh. Storage gives no lifetime
|
|
100
|
+
* with the URL, and adapters let it be configured down to minutes, so a
|
|
101
|
+
* person coming back to the page after this gets a new one.
|
|
102
|
+
*/
|
|
103
|
+
const DOWNLOAD_URL_STALE_MS = 60_000;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* How long a build page's signed link counts as fresh: far inside its 30 days,
|
|
107
|
+
* so a page left open never shows an expired one, and it costs one request
|
|
108
|
+
* a day.
|
|
109
|
+
*/
|
|
110
|
+
const DOWNLOAD_LINK_STALE_MS = 24 * 60 * 60 * 1000;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* How long an iPhone keeps a build's install details and Install link, which
|
|
114
|
+
* lasts an hour: past this, an open page reads and signs again.
|
|
84
115
|
*/
|
|
85
|
-
const
|
|
116
|
+
const INSTALL_ELIGIBILITY_STALE_MS = 30 * 60 * 1000;
|
|
117
|
+
|
|
118
|
+
/** Where a fold of a list's page lies: its bounds, as the page gave them. */
|
|
119
|
+
export type FoldBounds = { readonly from?: string; readonly to: string };
|
|
86
120
|
|
|
87
121
|
export type ReleaseFilters = {
|
|
88
122
|
/** One of the filter sets the release indexes serve; none lists every release. */
|
|
@@ -91,7 +125,8 @@ export type ReleaseFilters = {
|
|
|
91
125
|
beforeReleaseId?: string;
|
|
92
126
|
/** Releases newer than this id: the previous page. */
|
|
93
127
|
afterReleaseId?: string;
|
|
94
|
-
|
|
128
|
+
/** The selected release, which the page never folds. */
|
|
129
|
+
releaseId?: string;
|
|
95
130
|
};
|
|
96
131
|
|
|
97
132
|
// Query Hooks
|
|
@@ -119,6 +154,31 @@ export function useReleasesQuery(filters?: ReleaseFilters) {
|
|
|
119
154
|
});
|
|
120
155
|
}
|
|
121
156
|
|
|
157
|
+
/**
|
|
158
|
+
* A fold's releases, a chunk at a time, read once it opens: the page that
|
|
159
|
+
* folded them reads nothing more when one opens.
|
|
160
|
+
*/
|
|
161
|
+
export function useReleaseFoldQuery(
|
|
162
|
+
filter: ReleaseFilter | undefined,
|
|
163
|
+
fold: FoldBounds,
|
|
164
|
+
enabled: boolean,
|
|
165
|
+
) {
|
|
166
|
+
return useInfiniteQuery({
|
|
167
|
+
queryKey: queryKeys.releases.fold(filter, fold),
|
|
168
|
+
queryFn: ({ pageParam }) =>
|
|
169
|
+
getReleaseFold({
|
|
170
|
+
data: {
|
|
171
|
+
...fold,
|
|
172
|
+
...(filter === undefined ? {} : { filter }),
|
|
173
|
+
...(pageParam === undefined ? {} : { after: pageParam }),
|
|
174
|
+
},
|
|
175
|
+
}),
|
|
176
|
+
initialPageParam: undefined as string | undefined,
|
|
177
|
+
getNextPageParam: (last) => last.next,
|
|
178
|
+
enabled,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
122
182
|
export function useReleaseQuery(releaseId: string) {
|
|
123
183
|
return useQuery({
|
|
124
184
|
enabled: releaseId.length > 0,
|
|
@@ -167,6 +227,29 @@ export function useBundleChildCountsQuery(bundleIds: string[]) {
|
|
|
167
227
|
});
|
|
168
228
|
}
|
|
169
229
|
|
|
230
|
+
/** A fold's native builds, a chunk at a time, read once it opens. */
|
|
231
|
+
export function useNativeBuildFoldQuery(
|
|
232
|
+
channel: string | undefined,
|
|
233
|
+
fold: FoldBounds,
|
|
234
|
+
enabled: boolean,
|
|
235
|
+
) {
|
|
236
|
+
return useInfiniteQuery({
|
|
237
|
+
queryKey: queryKeys.nativeBuilds.fold(channel, fold),
|
|
238
|
+
queryFn: ({ pageParam }) =>
|
|
239
|
+
getNativeBuildFold({
|
|
240
|
+
data: {
|
|
241
|
+
...fold,
|
|
242
|
+
...(channel === undefined ? {} : { channel }),
|
|
243
|
+
...(pageParam === undefined ? {} : { after: pageParam }),
|
|
244
|
+
},
|
|
245
|
+
}),
|
|
246
|
+
initialPageParam: undefined as string | undefined,
|
|
247
|
+
getNextPageParam: (last) => last.next,
|
|
248
|
+
enabled,
|
|
249
|
+
staleTime: 60_000,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
|
|
170
253
|
/** One page of native builds, newest first, kept on screen while the next loads. */
|
|
171
254
|
export function useNativeBuildsQuery(page: NativeBuildPage) {
|
|
172
255
|
return useQuery({
|
|
@@ -230,18 +313,48 @@ export function useReleaseNativeBuildQuery(
|
|
|
230
313
|
}
|
|
231
314
|
|
|
232
315
|
/**
|
|
233
|
-
* The
|
|
234
|
-
*
|
|
316
|
+
* The signed link of a build's page, which its QR code, download button, and
|
|
317
|
+
* copyable link all use: one request when the page opens.
|
|
235
318
|
*/
|
|
236
|
-
export function
|
|
319
|
+
export function useNativeBuildDownloadLinkQuery(id: string) {
|
|
320
|
+
return useQuery({
|
|
321
|
+
queryKey: queryKeys.nativeBuildDownloadLink(id),
|
|
322
|
+
queryFn: () => createNativeBuildDownloadLink({ data: { id } }),
|
|
323
|
+
staleTime: DOWNLOAD_LINK_STALE_MS,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* What this iPhone can do with a build, and the link Install opens: requested
|
|
329
|
+
* only by an iPhone on the page of an IPA, and again before that link, which
|
|
330
|
+
* lasts about an hour, runs out.
|
|
331
|
+
*/
|
|
332
|
+
export function useNativeBuildInstallEligibilityQuery(
|
|
333
|
+
id: string,
|
|
334
|
+
udid: string | null,
|
|
335
|
+
) {
|
|
336
|
+
return useQuery({
|
|
337
|
+
queryKey: queryKeys.nativeBuildInstallEligibility(id, udid),
|
|
338
|
+
queryFn: () =>
|
|
339
|
+
getNativeBuildInstallEligibility({
|
|
340
|
+
data: { id, ...(udid === null ? {} : { udid }) },
|
|
341
|
+
}),
|
|
342
|
+
staleTime: INSTALL_ELIGIBILITY_STALE_MS,
|
|
343
|
+
// A page left open never holds an expired link. It reads nothing while the
|
|
344
|
+
// tab is hidden, and coming back reads again once this has passed.
|
|
345
|
+
refetchInterval: INSTALL_ELIGIBILITY_STALE_MS,
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* The storage URL a phone downloads a build from when the Console can't sign
|
|
351
|
+
* a link: read once, and again only when someone comes back to the page.
|
|
352
|
+
*/
|
|
353
|
+
export function useNativeBuildDownloadUrlQuery(id: string) {
|
|
237
354
|
return useQuery({
|
|
238
355
|
queryKey: queryKeys.nativeBuildDownloadUrl(id),
|
|
239
356
|
queryFn: () => getNativeBuildDownloadUrl({ data: { id } }),
|
|
240
|
-
|
|
241
|
-
staleTime: DOWNLOAD_URL_REFRESH_MS,
|
|
242
|
-
// A storage without download URLs has none to refresh.
|
|
243
|
-
refetchInterval: (query) =>
|
|
244
|
-
query.state.data?.url === null ? false : DOWNLOAD_URL_REFRESH_MS,
|
|
357
|
+
staleTime: DOWNLOAD_URL_STALE_MS,
|
|
245
358
|
});
|
|
246
359
|
}
|
|
247
360
|
|
|
@@ -270,6 +383,29 @@ export function useDeleteChannelMutation() {
|
|
|
270
383
|
});
|
|
271
384
|
}
|
|
272
385
|
|
|
386
|
+
/**
|
|
387
|
+
* Marks a build as its scope's store build, or clears it. The mark it replaced
|
|
388
|
+
* is on another build's page, in the list and in a release sheet's link, so
|
|
389
|
+
* they read again.
|
|
390
|
+
*/
|
|
391
|
+
export function useMarkNativeBuildMutation() {
|
|
392
|
+
const queryClient = useQueryClient();
|
|
393
|
+
return useMutation({
|
|
394
|
+
mutationFn: (input: { id: string; storeBuild: boolean }) =>
|
|
395
|
+
markNativeBuildApi({ data: input }),
|
|
396
|
+
onSettled: async () => {
|
|
397
|
+
await Promise.all([
|
|
398
|
+
queryClient.invalidateQueries({ queryKey: ["native-build"] }),
|
|
399
|
+
queryClient.invalidateQueries({
|
|
400
|
+
queryKey: queryKeys.nativeBuilds.all,
|
|
401
|
+
}),
|
|
402
|
+
// A release sheet links the build new deploys patch from.
|
|
403
|
+
queryClient.invalidateQueries({ queryKey: ["release-native-build"] }),
|
|
404
|
+
]);
|
|
405
|
+
},
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
|
|
273
409
|
export function useUpdateReleaseMutation() {
|
|
274
410
|
const queryClient = useQueryClient();
|
|
275
411
|
return useMutation({
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { IosDeviceStatus } from "@hot-updater/plugin-core";
|
|
2
|
+
import {
|
|
3
|
+
keepPreviousData,
|
|
4
|
+
useMutation,
|
|
5
|
+
useQuery,
|
|
6
|
+
useQueryClient,
|
|
7
|
+
} from "@tanstack/react-query";
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
approveIosDevice,
|
|
11
|
+
createIosDeviceProfileLink,
|
|
12
|
+
getIosDevices,
|
|
13
|
+
getNativeBuildIpaDevices,
|
|
14
|
+
removeIosDevice,
|
|
15
|
+
renameIosDevice,
|
|
16
|
+
requestIosDeviceAccess,
|
|
17
|
+
} from "./ios-devices-rpc";
|
|
18
|
+
|
|
19
|
+
export const iosDeviceKeys = {
|
|
20
|
+
all: ["ios-devices"] as const,
|
|
21
|
+
list: (status?: IosDeviceStatus) => ["ios-devices", status ?? "all"] as const,
|
|
22
|
+
ipa: (buildId: string) => ["native-build-ipa-devices", buildId] as const,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* How long a profile link is used before the page signs a new one: its
|
|
27
|
+
* capability works 15 minutes, and a tester may leave the page open.
|
|
28
|
+
*/
|
|
29
|
+
export const PROFILE_LINK_REFRESH_MS = 10 * 60 * 1000;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The registry, one status or all, kept on screen while it reloads, so a
|
|
33
|
+
* filter change never blanks the table.
|
|
34
|
+
*/
|
|
35
|
+
export function useIosDevicesQuery(status?: IosDeviceStatus) {
|
|
36
|
+
return useQuery({
|
|
37
|
+
queryKey: iosDeviceKeys.list(status),
|
|
38
|
+
queryFn: () =>
|
|
39
|
+
getIosDevices({ data: status === undefined ? {} : { status } }),
|
|
40
|
+
placeholderData: keepPreviousData,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A signed link to this iPhone's profile, signed again before it expires:
|
|
46
|
+
* the link stays a plain `<a href>`, so nothing waits on a request when it is
|
|
47
|
+
* tapped. The token signs its input, the name to register or the build to
|
|
48
|
+
* return to, so it has no data while another input's token loads: keeping
|
|
49
|
+
* the previous one would register the old name.
|
|
50
|
+
*/
|
|
51
|
+
export function useIosDeviceProfileLinkQuery(
|
|
52
|
+
input:
|
|
53
|
+
| { readonly mode: "register"; readonly name: string }
|
|
54
|
+
| { readonly mode: "identify"; readonly buildId: string },
|
|
55
|
+
enabled = true,
|
|
56
|
+
) {
|
|
57
|
+
return useQuery({
|
|
58
|
+
queryKey: ["ios-device-profile-link", input] as const,
|
|
59
|
+
queryFn: () => createIosDeviceProfileLink({ data: input }),
|
|
60
|
+
enabled,
|
|
61
|
+
staleTime: PROFILE_LINK_REFRESH_MS,
|
|
62
|
+
refetchInterval: PROFILE_LINK_REFRESH_MS,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** The devices an IPA lists, by registry name where it has one. */
|
|
67
|
+
export function useNativeBuildIpaDevicesQuery(buildId: string) {
|
|
68
|
+
return useQuery({
|
|
69
|
+
queryKey: iosDeviceKeys.ipa(buildId),
|
|
70
|
+
queryFn: () => getNativeBuildIpaDevices({ data: { id: buildId } }),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const useInvalidatingMutation = <TInput, TResult>(
|
|
75
|
+
mutationFn: (input: TInput) => Promise<TResult>,
|
|
76
|
+
) => {
|
|
77
|
+
const queryClient = useQueryClient();
|
|
78
|
+
return useMutation({
|
|
79
|
+
mutationFn,
|
|
80
|
+
onSettled: async () => {
|
|
81
|
+
await Promise.all([
|
|
82
|
+
queryClient.invalidateQueries({ queryKey: iosDeviceKeys.all }),
|
|
83
|
+
// A build page reads the registry row of a device it lacks.
|
|
84
|
+
queryClient.invalidateQueries({
|
|
85
|
+
queryKey: ["native-build-install-eligibility"],
|
|
86
|
+
}),
|
|
87
|
+
]);
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const useApproveIosDeviceMutation = () =>
|
|
93
|
+
useInvalidatingMutation((input: { id: string; name: string }) =>
|
|
94
|
+
approveIosDevice({ data: input }),
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
export const useRenameIosDeviceMutation = () =>
|
|
98
|
+
useInvalidatingMutation((input: { id: string; name: string }) =>
|
|
99
|
+
renameIosDevice({ data: input }),
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
export const useRemoveIosDeviceMutation = () =>
|
|
103
|
+
useInvalidatingMutation((input: { udid: string }) =>
|
|
104
|
+
removeIosDevice({ data: input }),
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
export const useRequestIosDeviceAccessMutation = () =>
|
|
108
|
+
useInvalidatingMutation((input: { receipt: string; name: string }) =>
|
|
109
|
+
requestIosDeviceAccess({ data: input }),
|
|
110
|
+
);
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import type { IosDeviceRow, IosDeviceStatus } from "@hot-updater/plugin-core";
|
|
2
|
+
import { createServerFn } from "@tanstack/react-start";
|
|
3
|
+
|
|
4
|
+
import { consoleAccess } from "./console-access";
|
|
5
|
+
|
|
6
|
+
const STATUSES: readonly IosDeviceStatus[] = [
|
|
7
|
+
"pending",
|
|
8
|
+
"approved",
|
|
9
|
+
"registered",
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
const record = (input: unknown): Record<string, unknown> => {
|
|
13
|
+
if (typeof input !== "object" || input === null) {
|
|
14
|
+
throw new TypeError("Invalid input.");
|
|
15
|
+
}
|
|
16
|
+
return input as Record<string, unknown>;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const text = (input: unknown, field: string, max = 2048): string => {
|
|
20
|
+
const value = record(input)[field];
|
|
21
|
+
if (typeof value !== "string" || value.length === 0 || value.length > max) {
|
|
22
|
+
throw new TypeError(`Invalid ${field}.`);
|
|
23
|
+
}
|
|
24
|
+
return value;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The registry over the Console's own assembly, with the signed-in viewer's
|
|
29
|
+
* rights: the access check runs first, in the middleware and again here.
|
|
30
|
+
*/
|
|
31
|
+
const registry = async () => {
|
|
32
|
+
const [{ getRequest }, { prepareConfig }, { requireConsoleAccess }, devices] =
|
|
33
|
+
await Promise.all([
|
|
34
|
+
import("@tanstack/react-start/server"),
|
|
35
|
+
import("./server/config.server"),
|
|
36
|
+
import("./server/auth.server"),
|
|
37
|
+
import("./server/iosDevices"),
|
|
38
|
+
]);
|
|
39
|
+
const request = getRequest();
|
|
40
|
+
const [{ core, config }, principal] = await Promise.all([
|
|
41
|
+
prepareConfig(request),
|
|
42
|
+
requireConsoleAccess(request),
|
|
43
|
+
]);
|
|
44
|
+
const viewer = await devices.iosDeviceViewer(
|
|
45
|
+
principal,
|
|
46
|
+
config.deviceApprovers,
|
|
47
|
+
);
|
|
48
|
+
return { request, core, principal, viewer, devices };
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export interface IosDevicesView {
|
|
52
|
+
readonly devices: IosDeviceRow[];
|
|
53
|
+
readonly viewer: {
|
|
54
|
+
readonly email: string;
|
|
55
|
+
readonly canApprove: boolean;
|
|
56
|
+
readonly approversConfigured: boolean;
|
|
57
|
+
};
|
|
58
|
+
/** The name a new iPhone gets until its owner types one. */
|
|
59
|
+
readonly defaultName: string;
|
|
60
|
+
/** Whether iPhones can register through this Console. */
|
|
61
|
+
readonly registration: "ready" | "local-console" | "no-secret";
|
|
62
|
+
/** The secret that signs iPhone links, which `no-secret` asks to set. */
|
|
63
|
+
readonly secretName: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** The registry, or one status of it, with what the viewer may do. */
|
|
67
|
+
export const getIosDevices = createServerFn({ method: "GET" })
|
|
68
|
+
.middleware([consoleAccess])
|
|
69
|
+
.validator((input: { status?: IosDeviceStatus } | undefined) => {
|
|
70
|
+
const status = input?.status;
|
|
71
|
+
if (status !== undefined && !STATUSES.includes(status)) {
|
|
72
|
+
throw new TypeError("Invalid status.");
|
|
73
|
+
}
|
|
74
|
+
return status === undefined ? {} : { status };
|
|
75
|
+
})
|
|
76
|
+
.handler(async ({ data }): Promise<IosDevicesView> => {
|
|
77
|
+
const [
|
|
78
|
+
{ request, core, principal, viewer, devices },
|
|
79
|
+
{ CONSOLE_SECRET_ENV },
|
|
80
|
+
] = await Promise.all([
|
|
81
|
+
registry(),
|
|
82
|
+
import("./server/nativeBuildDownloadLink"),
|
|
83
|
+
]);
|
|
84
|
+
return {
|
|
85
|
+
devices: await devices.listIosDevices(core, data.status),
|
|
86
|
+
viewer,
|
|
87
|
+
defaultName: devices.defaultDeviceName(principal),
|
|
88
|
+
registration: await devices.deviceRegistration(request),
|
|
89
|
+
secretName: CONSOLE_SECRET_ENV,
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* A new link to the profile that reads this iPhone's UDID: `register` saves
|
|
95
|
+
* it as requested under `name`, `identify` tells build `buildId`'s page which
|
|
96
|
+
* iPhone it is. A POST, since it signs the link.
|
|
97
|
+
*/
|
|
98
|
+
export const createIosDeviceProfileLink = createServerFn({ method: "POST" })
|
|
99
|
+
.middleware([consoleAccess])
|
|
100
|
+
.validator((input: unknown) => {
|
|
101
|
+
const mode = record(input).mode;
|
|
102
|
+
if (mode === "register") {
|
|
103
|
+
return { mode, name: text(input, "name", 100) } as const;
|
|
104
|
+
}
|
|
105
|
+
if (mode === "identify") {
|
|
106
|
+
return { mode, buildId: text(input, "buildId", 36) } as const;
|
|
107
|
+
}
|
|
108
|
+
throw new TypeError("Invalid mode.");
|
|
109
|
+
})
|
|
110
|
+
.handler(async ({ data }) => {
|
|
111
|
+
const { request, viewer, devices } = await registry();
|
|
112
|
+
return devices.issueDeviceProfileLink(request, viewer, data);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
/** Requests the iPhone this person's receipt names, for the next ad hoc build. */
|
|
116
|
+
export const requestIosDeviceAccess = createServerFn({ method: "POST" })
|
|
117
|
+
.middleware([consoleAccess])
|
|
118
|
+
.validator((input: unknown) => ({
|
|
119
|
+
receipt: text(input, "receipt"),
|
|
120
|
+
name: text(input, "name", 100),
|
|
121
|
+
}))
|
|
122
|
+
.handler(async ({ data }) => {
|
|
123
|
+
const { request, core, viewer, devices } = await registry();
|
|
124
|
+
return devices.requestIosDeviceAccess(request, core, viewer, data);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
/** Approves a requested device, with its name: approvers only. */
|
|
128
|
+
export const approveIosDevice = createServerFn({ method: "POST" })
|
|
129
|
+
.middleware([consoleAccess])
|
|
130
|
+
.validator((input: unknown) => ({
|
|
131
|
+
id: text(input, "id", 36),
|
|
132
|
+
name: text(input, "name", 100),
|
|
133
|
+
}))
|
|
134
|
+
.handler(async ({ data }) => {
|
|
135
|
+
const { core, viewer, devices } = await registry();
|
|
136
|
+
devices.requireDeviceApprover(viewer);
|
|
137
|
+
return core.approveIosDevice(data.id, {
|
|
138
|
+
name: devices.deviceName(data.name),
|
|
139
|
+
approvedBy: viewer.email,
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
/** Renames a device in the registry: approvers only. */
|
|
144
|
+
export const renameIosDevice = createServerFn({ method: "POST" })
|
|
145
|
+
.middleware([consoleAccess])
|
|
146
|
+
.validator((input: unknown) => ({
|
|
147
|
+
id: text(input, "id", 36),
|
|
148
|
+
name: text(input, "name", 100),
|
|
149
|
+
}))
|
|
150
|
+
.handler(async ({ data }) => {
|
|
151
|
+
const { core, viewer, devices } = await registry();
|
|
152
|
+
devices.requireDeviceApprover(viewer);
|
|
153
|
+
return core.renameIosDevice(data.id, devices.deviceName(data.name));
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Removes a device from the registry: an approver any, the person who asked
|
|
158
|
+
* their own requested one. Apple keeps it.
|
|
159
|
+
*/
|
|
160
|
+
export const removeIosDevice = createServerFn({ method: "POST" })
|
|
161
|
+
.middleware([consoleAccess])
|
|
162
|
+
.validator((input: unknown) => ({ udid: text(input, "udid", 40) }))
|
|
163
|
+
.handler(async ({ data }) => {
|
|
164
|
+
const { core, viewer, devices } = await registry();
|
|
165
|
+
return devices.removeIosDevice(core, viewer, data.udid);
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The devices an ad hoc build's IPA lists, read from its profile in storage,
|
|
170
|
+
* each with its registry name when the registry knows it: one row read, the
|
|
171
|
+
* IPA's few parts, and one page of the registry.
|
|
172
|
+
*/
|
|
173
|
+
export const getNativeBuildIpaDevices = createServerFn({ method: "GET" })
|
|
174
|
+
.middleware([consoleAccess])
|
|
175
|
+
.validator((input: { id: string }) => ({ id: text(input, "id", 36) }))
|
|
176
|
+
.handler(async ({ data }) => {
|
|
177
|
+
const [{ prepareConfig }, { readNativeBuildIpaDevices }] =
|
|
178
|
+
await Promise.all([
|
|
179
|
+
import("./server/config.server"),
|
|
180
|
+
import("./server/nativeBuildInstall"),
|
|
181
|
+
]);
|
|
182
|
+
return readNativeBuildIpaDevices(data.id, await prepareConfig());
|
|
183
|
+
});
|