@hot-updater/console 1.2.0-rc.31 → 1.2.0-rc.32
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-BvCftqF2.js +1 -0
- package/.output/public/assets/{BundleIdDisplay-CTBdtFQ8.js → BundleIdDisplay-D8oR8mcP.js} +1 -1
- package/.output/public/assets/{ChannelBadge-CEabmopB.js → ChannelBadge-Do-lWsLM.js} +1 -1
- package/.output/public/assets/{CompositeItem-KUM5yQVr.js → CompositeItem-Ci-Dvjc7.js} +1 -1
- package/.output/public/assets/{ConsoleFeatureUnavailable-Be-0iTww.js → ConsoleFeatureUnavailable-C0iDIboF.js} +1 -1
- package/.output/public/assets/{EventDetails-bDOYte1z.js → EventDetails-DglqzK6l.js} +1 -1
- package/.output/public/assets/{HashValueDisplay-D2f0HmyU.js → HashValueDisplay-DKziWjEg.js} +1 -1
- package/.output/public/assets/{InsightsPageHeader-Cj2ROSQO.js → InsightsPageHeader-DLH1MntM.js} +1 -1
- package/.output/public/assets/IosInstall-2R2o1IXd.js +1 -0
- package/.output/public/assets/NativeBuildsNav-BgeUSMqw.js +1 -0
- package/.output/public/assets/{NotFoundPage-CVBtl68B.js → NotFoundPage-CijSy63W.js} +1 -1
- package/.output/public/assets/{PlatformIcon-DVnzzGqM.js → PlatformIcon-Kq3q98tU.js} +1 -1
- package/.output/public/assets/QrCode-D3-Vuudy.js +1 -0
- package/.output/public/assets/{RelativeTime-Dz25a2yJ.js → RelativeTime-CP7nosYx.js} +1 -1
- package/.output/public/assets/{RolloutPercentageBadge-D_I0Raj2.js → RolloutPercentageBadge-DnmU8XbU.js} +1 -1
- package/.output/public/assets/{RowReason-CAkj76WL.js → RowReason-D7TZ2xwW.js} +1 -1
- package/.output/public/assets/SandboxBadge-BPf2uve4.js +1 -0
- package/.output/public/assets/TargetDisplay-DzSkf5yP.js +1 -0
- package/.output/public/assets/alert-dialog-Dihztkem.js +1 -0
- package/.output/public/assets/{api-C1OPeiG1.js → api-B1z_XXrQ.js} +1 -1
- package/.output/public/assets/api-keys-DL9HeC8e.js +1 -0
- package/.output/public/assets/api-keys-DPuPM7ag.js +1 -0
- package/.output/public/assets/arrow-left-CxxDwBQs.js +1 -0
- package/.output/public/assets/arrow-right-jHG0fJt7.js +1 -0
- package/.output/public/assets/arrow-up-right-BPRe5soE.js +1 -0
- package/.output/public/assets/{badge-FZMD5vvS.js → badge-D4Tiwei-.js} +1 -1
- package/.output/public/assets/{card-CyHYmHue.js → card-BfeRlTvj.js} +1 -1
- package/.output/public/assets/check-Dz_5aNwx.js +1 -0
- package/.output/public/assets/chevron-right-CuYrscDY.js +1 -0
- package/.output/public/assets/{circle-off-BCkZpskJ.js → circle-off-BZFOMb8J.js} +1 -1
- package/.output/public/assets/{clipboard-DZrZK5gR.js → clipboard-D8uvj6FN.js} +1 -1
- package/.output/public/assets/{console-features-api-BO5V64P3.js → console-features-api-De6tXQnd.js} +1 -1
- package/.output/public/assets/{copy-CH1__JAW.js → copy-BxI24-g-.js} +1 -1
- package/.output/public/assets/dialog-e9AF5T6h.js +1 -0
- package/.output/public/assets/{dist-DAM__Tdz.js → dist-BEIz5ojx.js} +1 -1
- package/.output/public/assets/{download-B2GjTySo.js → download-ekENI2Sw.js} +1 -1
- package/.output/public/assets/{empty--YaE5Z4p.js → empty-DpSPWLc2.js} +1 -1
- package/.output/public/assets/{field-CdhSgWhI.js → field-PkdRPD3A.js} +1 -1
- package/.output/public/assets/{git-branch-DG1VDaKq.js → git-branch-BWrvONjc.js} +1 -1
- package/.output/public/assets/{history-C0wv4htz.js → history-DwdBLzJP.js} +1 -1
- package/.output/public/assets/index-DZdzmvWS.js +10 -0
- package/.output/public/assets/input-group-DNfVeeYZ.js +1 -0
- package/.output/public/assets/{insights-_j_ieOyh.js → insights-6d-iISFa.js} +2 -2
- package/.output/public/assets/insights-DotP9eJn.js +2 -0
- package/.output/public/assets/insights-MQrx_wbP.js +1 -0
- package/.output/public/assets/{insights-api-B6Gj74n5.js → insights-api-CXXCRZhF.js} +1 -1
- package/.output/public/assets/{insights-search-Bgvg6wSP.js → insights-search-CtEcj6lz.js} +1 -1
- package/.output/public/assets/{insights-usage-rpc-BUCinjSN.js → insights-usage-rpc-DdmD1Nuy.js} +1 -1
- package/.output/public/assets/{insights_.distribution-CRkGNelG.js → insights_.distribution-DATeWpQS.js} +1 -1
- package/.output/public/assets/insights_.distribution-DYgsR7-7.js +2 -0
- package/.output/public/assets/insights_.distribution-REbBAqgL.js +1 -0
- package/.output/public/assets/installations-Di02gX_V.js +1 -0
- package/.output/public/assets/{installations-CYTzndfP.js → installations-Ds-MhfsQ.js} +1 -1
- package/.output/public/assets/{installations-BsD6LgNc.js → installations-Lm8TxrcB.js} +2 -2
- package/.output/public/assets/{key-round-D7UgdXyA.js → key-round-B-vaAsR7.js} +1 -1
- package/.output/public/assets/{link-CN3iHC4A.js → link-D95E0fwF.js} +1 -1
- package/.output/public/assets/{list-Bm-CfN5g.js → list-Dq40Mmoj.js} +1 -1
- package/.output/public/assets/loader-circle-C26cZDSM.js +1 -0
- package/.output/public/assets/native-builds-BOSmoLed.js +1 -0
- package/.output/public/assets/native-builds-Bs_JroPG.js +2 -0
- package/.output/public/assets/native-builds-Chv-kXaS.js +1 -0
- package/.output/public/assets/native-builds_._buildId-Bj24bG99.js +2 -0
- package/.output/public/assets/native-builds_._buildId-Somk3u9R.js +1 -0
- package/.output/public/assets/native-builds_.devices-afOLyzux.js +1 -0
- package/.output/public/assets/native-builds_.devices-o6LsPF9Y.js +2 -0
- package/.output/public/assets/plus-Bp6IqwOH.js +1 -0
- package/.output/public/assets/{preload-helper-CRQjUQaZ.js → preload-helper-52zhjEsw.js} +1 -1
- package/.output/public/assets/{refresh-cw-BHhBYjS8.js → refresh-cw-CpCxPYma.js} +1 -1
- package/.output/public/assets/{relativeTime-BYRt19mj.js → relativeTime-D_aYJRc7.js} +1 -1
- package/.output/public/assets/remote-config-Buy_12p7.js +1 -0
- package/.output/public/assets/remote-config-Dmuqm9xx.js +1 -0
- package/.output/public/assets/remote-config-g05054op.js +6 -0
- package/.output/public/assets/{rotate-cw-Ba-slJea.js → rotate-cw-Bn3fIWmY.js} +1 -1
- package/.output/public/assets/routes-5mt1iab-.js +2 -0
- package/.output/public/assets/routes-BxJfMpil.js +1 -0
- package/.output/public/assets/search-DeKSyo9Q.js +1 -0
- package/.output/public/assets/{select-CA8r-UUe.js → select-BAd2hAoW.js} +1 -1
- package/.output/public/assets/{sidebar-yC7KdImc.js → sidebar-UnsNYOry.js} +1 -1
- package/.output/public/assets/smartphone-lSZWrqxx.js +1 -0
- package/.output/public/assets/styles-CN7c7MGr.css +2 -0
- package/.output/public/assets/{switch-BsV3d4km.js → switch-C_s67MO4.js} +1 -1
- package/.output/public/assets/{table-D8YjT_ht.js → table-r_sYqKTQ.js} +1 -1
- package/.output/public/assets/{tabs-RdhEl9sE.js → tabs-B95QcXeT.js} +1 -1
- package/.output/public/assets/{trash-2-B5KIvrXy.js → trash-2-BPH7ydek.js} +1 -1
- package/.output/public/assets/{undo-2-CFcU9dIB.js → undo-2-CGeTBZjC.js} +1 -1
- package/.output/public/assets/{useCompositeListItem-lAmUsXcc.js → useCompositeListItem-B9ONn9qn.js} +1 -1
- package/.output/public/assets/{useMutation-w3qYaU2L.js → useMutation-BWX97JX2.js} +1 -1
- package/.output/server/{__23tanstack-start-server-fn-resolver-CPVg1lWP.mjs → __23tanstack-start-server-fn-resolver-ET1Ypyyk.mjs} +58 -62
- package/.output/server/_libs/_.mjs +1 -1
- package/.output/server/_ssr/{-native-builds-search-DD7wilC0.mjs → -native-builds-search-OJ8XmaBa.mjs} +1 -1
- package/.output/server/_ssr/{BundleIdDisplay-CHwdLSxI.mjs → BundleIdDisplay-CpaKbEYb.mjs} +2 -2
- package/.output/server/_ssr/{ChannelBadge-DdrhdvMM.mjs → ChannelBadge-dVXs-bYV.mjs} +3 -3
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-DPX24kXX.mjs → ConsoleFeatureUnavailable-DWuWwY4L.mjs} +6 -6
- package/.output/server/_ssr/{EventDetails-6jBbGcbN.mjs → EventDetails-CcuGyU26.mjs} +6 -6
- package/.output/server/_ssr/{HashValueDisplay-B4--TU87.mjs → HashValueDisplay-ClkGq5_0.mjs} +2 -2
- package/.output/server/_ssr/{InsightsPageHeader-CuJ8N3TQ.mjs → InsightsPageHeader-Bw6RVpdS.mjs} +6 -6
- package/.output/server/_ssr/{IosInstall-CHC-d6NT.mjs → IosInstall-DEceeAVT.mjs} +120 -71
- package/.output/server/_ssr/{NativeBuildsNav-C69l7uNo.mjs → NativeBuildsNav-ChqRZH4E.mjs} +5 -5
- package/.output/server/_ssr/{NotFoundPage-ZsHGzoLS.mjs → NotFoundPage-aZrAWo5n.mjs} +2 -2
- package/.output/server/_ssr/{PlatformIcon-BXcpYcrO.mjs → PlatformIcon-X18AN8Yp.mjs} +1 -1
- package/.output/server/_ssr/QrCode-pEaOdaRS.mjs +50 -0
- package/.output/server/_ssr/{RelativeTime-7vOoIT4P.mjs → RelativeTime-CFIJbj_r.mjs} +3 -3
- package/.output/server/_ssr/{RolloutPercentageBadge--MojdSYZ.mjs → RolloutPercentageBadge-BEqOJXly.mjs} +3 -3
- package/.output/server/_ssr/{RowReason-CIaGuzr1.mjs → RowReason-DXbU_Nml.mjs} +4 -4
- package/.output/server/_ssr/{SandboxBadge-BqBSRE2-.mjs → SandboxBadge-CP76AVxN.mjs} +2 -2
- package/.output/server/_ssr/{TargetDisplay-CLn4k3f5.mjs → TargetDisplay-csC-slf3.mjs} +3 -3
- package/.output/server/_ssr/{alert-dialog-DihcZr0y.mjs → alert-dialog-Dn5l3Bob.mjs} +3 -3
- package/.output/server/_ssr/{api-nFsUxTG1.mjs → api-W0WerUfm.mjs} +4 -4
- package/.output/server/_ssr/{api-keys-CN5wpM3R.mjs → api-keys-Btu37Irf.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-DExjZkdx.mjs → api-keys-D7kmFdhY.mjs} +10 -9
- package/.output/server/_ssr/{api-keys-rpc-CClIn3D8.mjs → api-keys-rpc-9o4CyzUZ.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-DLRzLoop.mjs → api-rpc-B1HnUZMu.mjs} +13 -13
- package/.output/server/_ssr/{auth-rpc-U46OWsbS.mjs → auth-rpc-BBy2L4Ah.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-iIXxFs8t.mjs → auth.server-ajvR-m99.mjs} +2 -2
- package/.output/server/_ssr/{badge-jnl4Ajh1.mjs → badge-DlEpe8yC.mjs} +1 -1
- package/.output/server/_ssr/{card-BEfQk5Ei.mjs → card-AK7Ms1Oa.mjs} +1 -1
- package/.output/server/_ssr/{config.server-Ig1eUxaf.mjs → config.server-DswyWSgG.mjs} +4 -4
- package/.output/server/_ssr/{console-access-BOTh4-fO.mjs → console-access-DM56j3dM.mjs} +2 -2
- package/.output/server/_ssr/{console-features-CzhqrCcX.mjs → console-features-DTYyXrWO.mjs} +1 -1
- package/.output/server/_ssr/{console-features-api-Dk02j_6v.mjs → console-features-api-g5s9V5sz.mjs} +4 -4
- package/.output/server/_ssr/{console-features-rpc-B_V68MjF.mjs → console-features-rpc-Cnmhvmsk.mjs} +3 -3
- package/.output/server/_ssr/{deviceProfileToken-BbLKmrUb.mjs → deviceProfileToken-xzDLfE0T.mjs} +21 -5
- package/.output/server/_ssr/{dialog-DuyJ0HsU.mjs → dialog-0oBrR9Cj.mjs} +4 -4
- package/.output/server/_ssr/{empty-BDBZwsuM.mjs → empty-tasgkoU9.mjs} +2 -2
- package/.output/server/_ssr/{field-CX6srGIn.mjs → field-phtuBLMh.mjs} +2 -2
- package/.output/server/_ssr/{input-group-CV_H0YX7.mjs → input-group-BTEoUANX.mjs} +2 -2
- package/.output/server/_ssr/{insights-CBoiq6pK.mjs → insights-BBzyKO95.mjs} +2 -2
- package/.output/server/_ssr/{insights-Td2VtKJZ.mjs → insights-CPDtpuXg.mjs} +5 -5
- package/.output/server/_ssr/{insights-DQmsr9I4.mjs → insights-D4le8l6s.mjs} +25 -20
- package/.output/server/_ssr/{insights-api-G8ZOyKKA.mjs → insights-api-D6J2HVtY.mjs} +3 -3
- package/.output/server/_ssr/{insights-failures-rpc-Ba4YSjbA.mjs → insights-failures-rpc-ChwlB9sg.mjs} +7 -7
- package/.output/server/_ssr/{insights-recovery-rpc-LKbOLo-_.mjs → insights-recovery-rpc-B6_GT-_U.mjs} +4 -4
- package/.output/server/_ssr/{insights-rpc-TkflAi0Z.mjs → insights-rpc-DG0GxsIL.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-aCzmEqnq.mjs → insights-search-LKeSNr4M.mjs} +2 -2
- package/.output/server/_ssr/{insights-usage-rpc-Cbk3jKjA.mjs → insights-usage-rpc-I0Eh5Z89.mjs} +4 -4
- package/.output/server/_ssr/{insights-usage-rpc-NoT-iWyp.mjs → insights-usage-rpc-qnQWkNn2.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-Y3uFkJMX.mjs → insights_.distribution-BF99IaZu.mjs} +5 -5
- package/.output/server/_ssr/{insights_.distribution-Vt7W1Xw7.mjs → insights_.distribution-D2dZwvqQ.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-Bo1WRLKV.mjs → insights_.distribution-Dgv-_T7g.mjs} +14 -14
- package/.output/server/_ssr/{installations-BpcY3NSj.mjs → installations-BHjU8FUI.mjs} +2 -2
- package/.output/server/_ssr/{installations-DClqNAQn.mjs → installations-C7TindNY.mjs} +4 -4
- package/.output/server/_ssr/{installations-BEUOlOQs.mjs → installations-DVTUpBGI.mjs} +11 -11
- package/.output/server/_ssr/{ios-devices-rpc-DmjO2Cbe.mjs → ios-devices-rpc-KtosHTCC.mjs} +9 -21
- package/.output/server/_ssr/iosDeviceCookie-B-8c7lMJ.mjs +155 -0
- package/.output/server/_ssr/{iosDeviceProfile-CseUPyC3.mjs → iosDeviceProfile-CIEuY_kV.mjs} +13 -14
- package/.output/server/_ssr/{iosDevices-BcM0YdL8.mjs → iosDevices-CkLgS8_U.mjs} +4 -20
- package/.output/server/_ssr/{native-artifact-C-jGiTjz.mjs → native-artifact-BRNP_q-y.mjs} +1 -1
- package/.output/server/_ssr/{native-builds-CwdDL-ag.mjs → native-builds-3WEAnb93.mjs} +16 -16
- package/.output/server/_ssr/{native-builds-B31AnQ0z.mjs → native-builds-B6rWkcHL.mjs} +3 -3
- package/.output/server/_ssr/{native-builds-DjoHvBQf.mjs → native-builds-nRuXKypG.mjs} +63 -2
- package/.output/server/_ssr/{native-builds_._buildId-Dew-f4Ox.mjs → native-builds_._buildId-BaykQRJl.mjs} +3 -3
- package/.output/server/_ssr/{native-builds_._buildId-xNxhulXv.mjs → native-builds_._buildId-RFJXyul0.mjs} +18 -25
- package/.output/server/_ssr/{native-builds_.devices-BBWNnbAj.mjs → native-builds_.devices-BzkeAX0K.mjs} +121 -67
- package/.output/server/_ssr/{native-builds_.devices-DpYGqdjz.mjs → native-builds_.devices-D9EGVV1N.mjs} +3 -3
- package/.output/server/_ssr/{nativeBuildDownloadLink-CMo_0eeE.mjs → nativeBuildDownloadLink-A1aWZBDw.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildInstall-BlT6X49f.mjs → nativeBuildInstall-XzMDX9iY.mjs} +8 -7
- package/.output/server/_ssr/{nativeBuilds-DnIRDijn.mjs → nativeBuilds-DaF-TcfO.mjs} +2 -2
- package/.output/server/_ssr/plistText-DkzlCfPI.mjs +15 -0
- package/.output/server/_ssr/{publicConsoleBase-CBG0Pv8f.mjs → publicConsoleBase-wTKw3_iB.mjs} +2 -14
- package/.output/server/_ssr/{release-adoption-rpc-CNwUfrya.mjs → release-adoption-rpc-DoDlwfWB.mjs} +7 -7
- package/.output/server/_ssr/{releaseAdoption-COlUf2W5.mjs → releaseAdoption-DfEYq7I4.mjs} +1 -1
- package/.output/server/_ssr/{remote-config-DdcrliiZ.mjs → remote-config-6lhdA4DB.mjs} +18 -18
- package/.output/server/_ssr/{remote-config-D1X_UwRB.mjs → remote-config-BMg2UurZ.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-oR3e-Ixt.mjs → remote-config-rpc-Ddg8dyxw.mjs} +3 -3
- package/.output/server/_ssr/{remote-config-7NN5w0OC.mjs → remote-config-u_T4AXyi.mjs} +2 -2
- package/.output/server/_ssr/{router-DxsgaBqH.mjs → router-CovCAswJ.mjs} +100 -60
- package/.output/server/_ssr/{routes-BXne94ak.mjs → routes-CTUvEVa6.mjs} +36 -32
- package/.output/server/_ssr/{routes-DdZw0VC5.mjs → routes-DtkONaBi.mjs} +10 -9
- package/.output/server/_ssr/{runtime.server-DImJAltO.mjs → runtime.server-BUbb281Z.mjs} +2 -2
- package/.output/server/_ssr/{schema-migration-rpc-BZueLWKW.mjs → schema-migration-rpc-DvmruDB6.mjs} +3 -3
- package/.output/server/_ssr/{select-DcWzmCb3.mjs → select-DJLTQgmc.mjs} +1 -1
- package/.output/server/_ssr/{server-DA_rB8Ch.mjs → server-BfWxoIjf.mjs} +4 -4
- package/.output/server/_ssr/{sidebar-BsFYs26D.mjs → sidebar-Bsfqid7Q.mjs} +6 -6
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{start-Ds6WPOwH.mjs → start-BaUpXI0L.mjs} +1 -1
- package/.output/server/_ssr/{switch-CByCMAau.mjs → switch-DckZkZBS.mjs} +3 -3
- package/.output/server/_ssr/{table-SLiL-w8T.mjs → table-DG8aRQBO.mjs} +1 -1
- package/.output/server/_ssr/{tabs-BCG8AAvJ.mjs → tabs-Dblh3lL2.mjs} +2 -2
- package/.output/server/_ssr/{updateFailures-Cl1Fxj4J.mjs → updateFailures-BwDwIoNu.mjs} +1 -1
- package/.output/server/_tanstack-start-manifest_v-CfDH9vVq.mjs +225 -0
- package/.output/server/index.mjs +436 -436
- package/package.json +7 -7
- package/src/components/AppSidebar.tsx +11 -2
- package/src/components/features/api-keys/ApiKeysPage.tsx +1 -1
- package/src/components/features/bundles/BundleMetadata.tsx +1 -1
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +8 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +6 -2
- package/src/components/features/insights/FailureReports.tsx +1 -0
- package/src/components/features/insights/InsightsOverview.tsx +7 -1
- package/src/components/features/insights/ReleaseActivity.tsx +5 -1
- package/src/components/features/insights/UpdateFailures.tsx +1 -0
- package/src/components/features/native-builds/IosDevicesPage.tsx +113 -34
- package/src/components/features/native-builds/IosInstall.tsx +50 -27
- package/src/components/features/native-builds/NativeBuildDetailPage.tsx +1 -2
- package/src/components/features/native-builds/NativeBuildsNav.tsx +2 -2
- package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +1 -1
- package/src/components/features/releases/ReleaseEditorSheet.tsx +6 -5
- package/src/components/ui/alert-dialog.tsx +2 -2
- package/src/components/ui/dialog.tsx +3 -3
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/sheet.tsx +1 -1
- package/src/components/ui/sidebar.tsx +2 -2
- package/src/components/ui/slider.tsx +1 -1
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/lib/ios-devices-api.ts +133 -5
- package/src/lib/ios-devices-rpc.ts +0 -12
- package/src/lib/native-builds.ts +88 -0
- package/src/lib/server/deviceProfileToken.ts +37 -3
- package/src/lib/server/iosDeviceCookie.ts +239 -0
- package/src/lib/server/iosDeviceProfile.ts +4 -2
- package/src/lib/server/iosDevices.ts +0 -30
- package/src/routeTree.gen.ts +44 -0
- package/src/routes/[_]hot-updater/devices/receipt.ts +28 -0
- package/src/routes/[_]hot-updater/devices/request.ts +28 -0
- package/.output/public/assets/-native-builds-search-DdHwfe4q.js +0 -1
- package/.output/public/assets/IosInstall-B-Yt7DUj.js +0 -1
- package/.output/public/assets/NativeBuildsNav-DaqxQPnG.js +0 -1
- package/.output/public/assets/SandboxBadge-BVxHg_HF.js +0 -1
- package/.output/public/assets/TargetDisplay-B_dqT5iw.js +0 -1
- package/.output/public/assets/alert-dialog-Ch0QxRsa.js +0 -1
- package/.output/public/assets/api-keys-DLC8jjaM.js +0 -1
- package/.output/public/assets/api-keys-eDnzgFAf.js +0 -1
- package/.output/public/assets/arrow-left-DQjHJAnT.js +0 -1
- package/.output/public/assets/arrow-right-CXp_K3xK.js +0 -1
- package/.output/public/assets/arrow-up-right-BFafIOrq.js +0 -1
- package/.output/public/assets/check-CqWNyG93.js +0 -1
- package/.output/public/assets/chevron-right-DNbYTBX1.js +0 -1
- package/.output/public/assets/dialog-BLj71-Nf.js +0 -1
- package/.output/public/assets/index-IK43LiLE.js +0 -10
- package/.output/public/assets/input-group-XKLcUGoa.js +0 -1
- package/.output/public/assets/insights-C94CdeAA.js +0 -1
- package/.output/public/assets/insights-DILMVpk8.js +0 -2
- package/.output/public/assets/insights_.distribution-Bb6_S-hD.js +0 -2
- package/.output/public/assets/insights_.distribution-CyAu3RN3.js +0 -1
- package/.output/public/assets/installations-BA01mqJE.js +0 -1
- package/.output/public/assets/loader-circle-iMqC-8ZE.js +0 -1
- package/.output/public/assets/native-builds-C-Dayo63.js +0 -2
- package/.output/public/assets/native-builds-_3SRMVOS.js +0 -1
- package/.output/public/assets/native-builds_._buildId-BPJzn5LY.js +0 -2
- package/.output/public/assets/native-builds_._buildId-DJWMBKQQ.js +0 -1
- package/.output/public/assets/native-builds_.devices-BbE0s2il.js +0 -1
- package/.output/public/assets/native-builds_.devices-BiXjrMS-.js +0 -2
- package/.output/public/assets/package-BmfoZ5Zj.js +0 -1
- package/.output/public/assets/plus-Db0KxLZp.js +0 -1
- package/.output/public/assets/remote-config-Cxkr7_BP.js +0 -1
- package/.output/public/assets/remote-config-DAOyn5xL.js +0 -1
- package/.output/public/assets/remote-config-DXv25LX1.js +0 -6
- package/.output/public/assets/routes-CH42g1N9.js +0 -1
- package/.output/public/assets/routes-_QhVAS_l.js +0 -2
- package/.output/public/assets/search-dJG2BYmx.js +0 -1
- package/.output/public/assets/send-DuMOCzbD.js +0 -1
- package/.output/public/assets/smartphone-D1C6BRd_.js +0 -1
- package/.output/public/assets/styles-BYO5PJYg.css +0 -2
- package/.output/server/_tanstack-start-manifest_v-BoMD43wU.mjs +0 -225
- /package/.output/public/assets/{uuidv7-DAoOOpz9.js → uuidv7-DgXZ1zRR.js} +0 -0
|
@@ -88,7 +88,7 @@ export function ReleaseNativeBuildLink({
|
|
|
88
88
|
<span className="text-xs text-muted-foreground">
|
|
89
89
|
None tracked for this scope ·{" "}
|
|
90
90
|
<Link
|
|
91
|
-
className="underline-offset-4 hover:text-foreground hover:underline"
|
|
91
|
+
className="relative underline-offset-4 after:absolute after:-inset-x-2 after:-inset-y-3.5 hover:text-foreground hover:underline md:after:hidden"
|
|
92
92
|
search={{ channel }}
|
|
93
93
|
to="/native-builds"
|
|
94
94
|
>
|
|
@@ -564,6 +564,7 @@ export function ReleaseEditorSheet({
|
|
|
564
564
|
/>
|
|
565
565
|
<Button
|
|
566
566
|
aria-label="Add cohort"
|
|
567
|
+
className="max-md:size-11"
|
|
567
568
|
disabled={!newCohort.trim()}
|
|
568
569
|
onClick={addCohort}
|
|
569
570
|
size="icon"
|
|
@@ -608,7 +609,7 @@ export function ReleaseEditorSheet({
|
|
|
608
609
|
</FieldGroup>
|
|
609
610
|
{error ? <FieldError>{error}</FieldError> : null}
|
|
610
611
|
<Button
|
|
611
|
-
className="w-full"
|
|
612
|
+
className="w-full max-md:h-11"
|
|
612
613
|
disabled={!dirty || busy}
|
|
613
614
|
onClick={save}
|
|
614
615
|
size="lg"
|
|
@@ -624,7 +625,7 @@ export function ReleaseEditorSheet({
|
|
|
624
625
|
<section className="flex flex-col gap-4">
|
|
625
626
|
<h3 className="text-sm font-medium">Actions</h3>
|
|
626
627
|
<Button
|
|
627
|
-
className="w-full"
|
|
628
|
+
className="w-full max-md:h-11"
|
|
628
629
|
disabled={!release.bundle_id || busy}
|
|
629
630
|
onClick={() => setShowPromote(true)}
|
|
630
631
|
size="sm"
|
|
@@ -634,7 +635,7 @@ export function ReleaseEditorSheet({
|
|
|
634
635
|
</Button>
|
|
635
636
|
{release.bundle_id ? (
|
|
636
637
|
<Button
|
|
637
|
-
className="w-full"
|
|
638
|
+
className="w-full max-md:h-11"
|
|
638
639
|
disabled={busy}
|
|
639
640
|
onClick={() => {
|
|
640
641
|
window.open(
|
|
@@ -652,7 +653,7 @@ export function ReleaseEditorSheet({
|
|
|
652
653
|
</Button>
|
|
653
654
|
) : null}
|
|
654
655
|
<Button
|
|
655
|
-
className="w-full"
|
|
656
|
+
className="w-full max-md:h-11"
|
|
656
657
|
disabled={release.enabled || busy}
|
|
657
658
|
onClick={() => setConfirmDelete(true)}
|
|
658
659
|
size="sm"
|
|
@@ -724,7 +725,7 @@ export function ReleaseEditorSheet({
|
|
|
724
725
|
</dd>
|
|
725
726
|
{onShowScope ? (
|
|
726
727
|
<Button
|
|
727
|
-
className="mt-1 h-auto px-0 text-xs"
|
|
728
|
+
className="mt-1 h-auto px-0 text-xs max-md:min-h-11"
|
|
728
729
|
onClick={() => onShowScope(release.scope_key)}
|
|
729
730
|
size="sm"
|
|
730
731
|
variant="link"
|
|
@@ -50,7 +50,7 @@ function AlertDialogContent({
|
|
|
50
50
|
data-slot="alert-dialog-content"
|
|
51
51
|
data-size={size}
|
|
52
52
|
className={cn(
|
|
53
|
-
"group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-3 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
53
|
+
"group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-3 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none max-h-[calc(100dvh-2rem)] overflow-y-auto data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
54
54
|
className,
|
|
55
55
|
)}
|
|
56
56
|
{...props}
|
|
@@ -83,7 +83,7 @@ function AlertDialogFooter({
|
|
|
83
83
|
<div
|
|
84
84
|
data-slot="alert-dialog-footer"
|
|
85
85
|
className={cn(
|
|
86
|
-
"flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
|
|
86
|
+
"flex flex-col-reverse gap-2 max-sm:*:min-h-11 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
|
|
87
87
|
className,
|
|
88
88
|
)}
|
|
89
89
|
{...props}
|
|
@@ -53,7 +53,7 @@ function DialogContent({
|
|
|
53
53
|
<DialogPrimitive.Popup
|
|
54
54
|
data-slot="dialog-content"
|
|
55
55
|
className={cn(
|
|
56
|
-
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-xs/relaxed ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
56
|
+
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-xs/relaxed ring-1 ring-foreground/10 duration-100 outline-none max-h-[calc(100dvh-2rem)] overflow-y-auto sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
57
57
|
className,
|
|
58
58
|
)}
|
|
59
59
|
{...props}
|
|
@@ -65,7 +65,7 @@ function DialogContent({
|
|
|
65
65
|
render={
|
|
66
66
|
<Button
|
|
67
67
|
variant="ghost"
|
|
68
|
-
className="absolute top-2 right-2"
|
|
68
|
+
className="absolute top-2 right-2 max-md:top-1 max-md:right-1 max-md:size-11"
|
|
69
69
|
size="icon-sm"
|
|
70
70
|
/>
|
|
71
71
|
}
|
|
@@ -101,7 +101,7 @@ function DialogFooter({
|
|
|
101
101
|
<div
|
|
102
102
|
data-slot="dialog-footer"
|
|
103
103
|
className={cn(
|
|
104
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
104
|
+
"flex flex-col-reverse gap-2 max-sm:*:min-h-11 sm:flex-row sm:justify-end",
|
|
105
105
|
className,
|
|
106
106
|
)}
|
|
107
107
|
{...props}
|
|
@@ -8,7 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
|
8
8
|
type={type}
|
|
9
9
|
data-slot="input"
|
|
10
10
|
className={cn(
|
|
11
|
-
"bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-7 rounded-md border px-2 py-0.5 text-sm transition-colors file:h-6 file:text-xs/relaxed file:font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] md:text-xs/relaxed file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
11
|
+
"bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-7 rounded-md border px-2 py-0.5 text-sm transition-colors file:h-6 file:text-xs/relaxed file:font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] md:text-xs/relaxed file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 max-md:h-11 max-md:text-base",
|
|
12
12
|
className,
|
|
13
13
|
)}
|
|
14
14
|
{...props}
|
|
@@ -315,7 +315,7 @@ function SidebarTrigger({
|
|
|
315
315
|
data-slot="sidebar-trigger"
|
|
316
316
|
variant="ghost"
|
|
317
317
|
size="icon-sm"
|
|
318
|
-
className={cn(className)}
|
|
318
|
+
className={cn("max-lg:size-11", className)}
|
|
319
319
|
onClick={(event) => {
|
|
320
320
|
onClick?.(event);
|
|
321
321
|
toggleSidebar();
|
|
@@ -535,7 +535,7 @@ const sidebarMenuButtonVariants = cva(
|
|
|
535
535
|
"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",
|
|
536
536
|
},
|
|
537
537
|
size: {
|
|
538
|
-
default: "h-8 text-xs",
|
|
538
|
+
default: "h-8 text-xs max-md:h-11",
|
|
539
539
|
sm: "h-7 text-xs",
|
|
540
540
|
lg: "h-12 text-xs group-data-[collapsible=icon]:p-0!",
|
|
541
541
|
},
|
|
@@ -45,7 +45,7 @@ function Slider({
|
|
|
45
45
|
<SliderPrimitive.Thumb
|
|
46
46
|
data-slot="slider-thumb"
|
|
47
47
|
key={index}
|
|
48
|
-
className="relative block size-4 shrink-0 rounded-full border border-primary/50 bg-background shadow transition-colors select-none after:absolute after:-inset-2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
48
|
+
className="relative block size-4 shrink-0 rounded-full border border-primary/50 bg-background shadow transition-colors select-none after:absolute after:-inset-2 max-md:after:-inset-3.5 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
49
49
|
/>
|
|
50
50
|
))}
|
|
51
51
|
</SliderPrimitive.Control>
|
|
@@ -9,7 +9,7 @@ function Switch({ className, ...props }: SwitchPrimitive.Root.Props) {
|
|
|
9
9
|
<SwitchPrimitive.Root
|
|
10
10
|
data-slot="switch"
|
|
11
11
|
className={cn(
|
|
12
|
-
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-checked:bg-primary data-unchecked:bg-input data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
12
|
+
"peer relative inline-flex h-5 w-9 shrink-0 after:absolute after:-inset-x-1 after:-inset-y-3 md:after:hidden cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-checked:bg-primary data-unchecked:bg-input data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
13
13
|
className,
|
|
14
14
|
)}
|
|
15
15
|
{...props}
|
|
@@ -7,7 +7,7 @@ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
|
7
7
|
<textarea
|
|
8
8
|
data-slot="textarea"
|
|
9
9
|
className={cn(
|
|
10
|
-
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
10
|
+
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 max-md:text-base",
|
|
11
11
|
className,
|
|
12
12
|
)}
|
|
13
13
|
{...props}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IosDeviceStatus } from "@hot-updater/plugin-core";
|
|
1
|
+
import type { IosDeviceRow, IosDeviceStatus } from "@hot-updater/plugin-core";
|
|
2
2
|
import {
|
|
3
3
|
keepPreviousData,
|
|
4
4
|
useMutation,
|
|
@@ -14,13 +14,15 @@ import {
|
|
|
14
14
|
getNativeBuildIpaDevices,
|
|
15
15
|
removeIosDevice,
|
|
16
16
|
renameIosDevice,
|
|
17
|
-
requestIosDeviceAccess,
|
|
18
17
|
} from "./ios-devices-rpc";
|
|
18
|
+
import { releasePendingReceipt } from "./native-builds";
|
|
19
19
|
|
|
20
20
|
export const iosDeviceKeys = {
|
|
21
21
|
all: ["ios-devices"] as const,
|
|
22
22
|
list: (status?: IosDeviceStatus) => ["ios-devices", status ?? "all"] as const,
|
|
23
23
|
device: (udid: string) => ["ios-devices", "device", udid] as const,
|
|
24
|
+
kept: (udid: string, receipt: string | null) =>
|
|
25
|
+
["ios-devices", "kept", udid, receipt ?? ""] as const,
|
|
24
26
|
ipa: (buildId: string) => ["native-build-ipa-devices", buildId] as const,
|
|
25
27
|
};
|
|
26
28
|
|
|
@@ -119,7 +121,133 @@ export const useRemoveIosDeviceMutation = () =>
|
|
|
119
121
|
removeIosDevice({ data: input }),
|
|
120
122
|
);
|
|
121
123
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
/** The routes this iPhone's kept proof is sent to, under the Console's path. */
|
|
125
|
+
const deviceRoute = (consolePath: string, name: "receipt" | "request") =>
|
|
126
|
+
`${consolePath}/_hot-updater/devices/${name}`;
|
|
127
|
+
|
|
128
|
+
const sendDeviceRoute = async <T>(
|
|
129
|
+
url: string,
|
|
130
|
+
init: RequestInit & { readonly json?: unknown } = {},
|
|
131
|
+
): Promise<T> => {
|
|
132
|
+
const { json, ...rest } = init;
|
|
133
|
+
const response = await fetch(url, {
|
|
134
|
+
credentials: "same-origin",
|
|
135
|
+
...rest,
|
|
136
|
+
...(json === undefined
|
|
137
|
+
? {}
|
|
138
|
+
: {
|
|
139
|
+
headers: { "content-type": "application/json" },
|
|
140
|
+
body: JSON.stringify(json),
|
|
141
|
+
}),
|
|
142
|
+
});
|
|
143
|
+
const body = (await response.json().catch(() => null)) as
|
|
144
|
+
| (T & { readonly error?: string })
|
|
145
|
+
| null;
|
|
146
|
+
if (!response.ok || body === null) {
|
|
147
|
+
throw new Error(body?.error ?? `Request failed (${response.status}).`);
|
|
148
|
+
}
|
|
149
|
+
return body;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/** Trades in flight or done, one per receipt: a failed one is forgotten. */
|
|
153
|
+
const trades = new Map<string, Promise<unknown>>();
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Trades the profile answer's fresh receipt for this Safari's HttpOnly cookie,
|
|
157
|
+
* wherever the answer lands: whatever the build page or the registry says, the
|
|
158
|
+
* proof is kept. One request per receipt while it is in flight or once it has
|
|
159
|
+
* succeeded; a failed one rejects and is forgotten, so the next refresh,
|
|
160
|
+
* refocus, or reload trades it again while it is still valid. Once traded,
|
|
161
|
+
* the receipt leaves this tab's session storage.
|
|
162
|
+
*/
|
|
163
|
+
export const keepIosDeviceReceipt = (consolePath: string, receipt: string) => {
|
|
164
|
+
let trade = trades.get(receipt);
|
|
165
|
+
if (trade === undefined) {
|
|
166
|
+
trade = sendDeviceRoute(deviceRoute(consolePath, "receipt"), {
|
|
167
|
+
method: "POST",
|
|
168
|
+
json: { receipt },
|
|
169
|
+
}).then(
|
|
170
|
+
(answer) => {
|
|
171
|
+
releasePendingReceipt(receipt);
|
|
172
|
+
return answer;
|
|
173
|
+
},
|
|
174
|
+
(error: unknown) => {
|
|
175
|
+
trades.delete(receipt);
|
|
176
|
+
throw error;
|
|
177
|
+
},
|
|
178
|
+
);
|
|
179
|
+
trades.set(receipt, trade);
|
|
180
|
+
}
|
|
181
|
+
return trade;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The UDID this Safari has proved for the signed-in person, from its HttpOnly
|
|
186
|
+
* cookie, or null, read after the page's fresh receipt, if any, is traded for
|
|
187
|
+
* it. Read on an iPhone only.
|
|
188
|
+
*/
|
|
189
|
+
export function useKeptIosDeviceQuery(
|
|
190
|
+
consolePath: string,
|
|
191
|
+
device: { readonly udid: string | null; readonly receipt: string | null },
|
|
192
|
+
enabled: boolean,
|
|
193
|
+
) {
|
|
194
|
+
const { receipt } = device;
|
|
195
|
+
return useQuery({
|
|
196
|
+
queryKey: iosDeviceKeys.kept(device.udid ?? "", receipt),
|
|
197
|
+
queryFn: async () => {
|
|
198
|
+
let failed: unknown = null;
|
|
199
|
+
if (receipt !== null) {
|
|
200
|
+
await keepIosDeviceReceipt(consolePath, receipt).catch((error) => {
|
|
201
|
+
failed = error;
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
const kept = await sendDeviceRoute<{ udid: string | null }>(
|
|
205
|
+
deviceRoute(consolePath, "receipt"),
|
|
206
|
+
);
|
|
207
|
+
// A trade that failed with no earlier proof leaves the read failed, so
|
|
208
|
+
// the next refresh or refocus trades the receipt again; no timer does.
|
|
209
|
+
if (failed !== null && kept.udid === null) throw failed;
|
|
210
|
+
return kept;
|
|
211
|
+
},
|
|
212
|
+
enabled,
|
|
213
|
+
retry: false,
|
|
214
|
+
staleTime: Number.POSITIVE_INFINITY,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Forgets this Safari's proof of its iPhone before sign-out, so the next
|
|
220
|
+
* person on this Safari starts from the profile. Only an iPhone or iPad holds
|
|
221
|
+
* one; a failure leaves the cookie, which the next email ignores anyway.
|
|
222
|
+
*/
|
|
223
|
+
export const forgetKeptIosDevice = async (consolePath: string) => {
|
|
224
|
+
await sendDeviceRoute(deviceRoute(consolePath, "receipt"), {
|
|
225
|
+
method: "DELETE",
|
|
226
|
+
}).catch(() => undefined);
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Requests this iPhone for the signed-in person, under `name`: the UDID comes
|
|
231
|
+
* from the profile's fresh receipt when the page has one, else from the
|
|
232
|
+
* cookie that proved it before.
|
|
233
|
+
*/
|
|
234
|
+
export const useRequestThisIphoneMutation = (consolePath: string) =>
|
|
235
|
+
useInvalidatingMutation(
|
|
236
|
+
(input: { readonly name: string; readonly receipt: string | null }) =>
|
|
237
|
+
sendDeviceRoute<{ device: IosDeviceRow; created: boolean }>(
|
|
238
|
+
deviceRoute(consolePath, "request"),
|
|
239
|
+
{
|
|
240
|
+
method: "POST",
|
|
241
|
+
json:
|
|
242
|
+
input.receipt === null
|
|
243
|
+
? { name: input.name }
|
|
244
|
+
: { name: input.name, receipt: input.receipt },
|
|
245
|
+
},
|
|
246
|
+
),
|
|
125
247
|
);
|
|
248
|
+
|
|
249
|
+
/** Whether the cookie's UDID is this iPhone's, whatever its case. */
|
|
250
|
+
export const keptIsThisIphone = (
|
|
251
|
+
kept: string | null | undefined,
|
|
252
|
+
udid: string | null,
|
|
253
|
+
) => kept != null && udid !== null && kept.toLowerCase() === udid.toLowerCase();
|
|
@@ -129,18 +129,6 @@ export const createIosDeviceProfileLink = createServerFn({ method: "POST" })
|
|
|
129
129
|
return devices.issueDeviceProfileLink(request, viewer, data);
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
-
/** Requests the iPhone this person's receipt names, for the next ad hoc build. */
|
|
133
|
-
export const requestIosDeviceAccess = createServerFn({ method: "POST" })
|
|
134
|
-
.middleware([consoleAccess])
|
|
135
|
-
.validator((input: unknown) => ({
|
|
136
|
-
receipt: text(input, "receipt"),
|
|
137
|
-
name: text(input, "name", 100),
|
|
138
|
-
}))
|
|
139
|
-
.handler(async ({ data }) => {
|
|
140
|
-
const { request, core, viewer, devices } = await registry();
|
|
141
|
-
return devices.requestIosDeviceAccess(request, core, viewer, data);
|
|
142
|
-
});
|
|
143
|
-
|
|
144
132
|
/** Approves a requested device, with its name: approvers only. */
|
|
145
133
|
export const approveIosDevice = createServerFn({ method: "POST" })
|
|
146
134
|
.middleware([consoleAccess])
|
package/src/lib/native-builds.ts
CHANGED
|
@@ -131,6 +131,30 @@ export const consolePathOf = (
|
|
|
131
131
|
: "";
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* The Console's own path, from where the browser is and where the router says
|
|
136
|
+
* it is: the prefix a host serves the Console under, or empty at its root.
|
|
137
|
+
*/
|
|
138
|
+
export const consolePathFromRouter = (
|
|
139
|
+
location: { readonly pathname: string },
|
|
140
|
+
routerPathname: string,
|
|
141
|
+
) => {
|
|
142
|
+
const path = location.pathname.replace(/\/$/u, "");
|
|
143
|
+
const route = routerPathname.replace(/\/$/u, "");
|
|
144
|
+
return path.endsWith(route) ? path.slice(0, path.length - route.length) : "";
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The Console's own path, from one of its Native builds pages, where the
|
|
149
|
+
* profile's answer lands: empty at the root of its host.
|
|
150
|
+
*/
|
|
151
|
+
export const consolePathOfNativeBuildsPage = (location: {
|
|
152
|
+
readonly pathname: string;
|
|
153
|
+
}) => {
|
|
154
|
+
const at = location.pathname.lastIndexOf("/native-builds");
|
|
155
|
+
return at < 0 ? "" : location.pathname.slice(0, at);
|
|
156
|
+
};
|
|
157
|
+
|
|
134
158
|
/** The console page of one native build. */
|
|
135
159
|
export const nativeBuildDetailPath = (id: string) =>
|
|
136
160
|
`/native-builds/${encodeURIComponent(id)}`;
|
|
@@ -151,6 +175,70 @@ export const IOS_UDID_STORAGE_KEY = "hot-updater-ios-udid";
|
|
|
151
175
|
*/
|
|
152
176
|
export const IOS_DEVICE_RECEIPT_STORAGE_KEY = "hot-updater-ios-device-receipt";
|
|
153
177
|
|
|
178
|
+
/**
|
|
179
|
+
* The profile answer's fresh receipt, in this tab's session storage only until
|
|
180
|
+
* the page has traded it for the HttpOnly cookie: a reload during an outage
|
|
181
|
+
* can still trade it. Gone once traded, or once it has expired.
|
|
182
|
+
*/
|
|
183
|
+
export const IOS_DEVICE_PENDING_RECEIPT_KEY =
|
|
184
|
+
"hot-updater-ios-device-pending-receipt";
|
|
185
|
+
|
|
186
|
+
/** When a signed receipt expires, from its own body, or 0 when unreadable. */
|
|
187
|
+
export const receiptExpiresAtMs = (receipt: string) => {
|
|
188
|
+
try {
|
|
189
|
+
const body = receipt
|
|
190
|
+
.split(".")[0]!
|
|
191
|
+
.replaceAll("-", "+")
|
|
192
|
+
.replaceAll("_", "/");
|
|
193
|
+
const x = (JSON.parse(atob(body)) as { x?: unknown }).x;
|
|
194
|
+
return typeof x === "number" ? x : 0;
|
|
195
|
+
} catch {
|
|
196
|
+
return 0;
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
/** The pending receipt this tab holds for `udid`, unexpired, or null. */
|
|
201
|
+
export const readPendingReceipt = (udid: string | null): string | null => {
|
|
202
|
+
try {
|
|
203
|
+
const kept = JSON.parse(
|
|
204
|
+
window.sessionStorage.getItem(IOS_DEVICE_PENDING_RECEIPT_KEY) ?? "null",
|
|
205
|
+
) as { udid?: unknown; receipt?: unknown } | null;
|
|
206
|
+
if (typeof kept?.receipt !== "string") return null;
|
|
207
|
+
if (receiptExpiresAtMs(kept.receipt) <= Date.now()) {
|
|
208
|
+
window.sessionStorage.removeItem(IOS_DEVICE_PENDING_RECEIPT_KEY);
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
return udid !== null && kept.udid === udid ? kept.receipt : null;
|
|
212
|
+
} catch {
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
export const holdPendingReceipt = (udid: string, receipt: string) => {
|
|
218
|
+
try {
|
|
219
|
+
window.sessionStorage.setItem(
|
|
220
|
+
IOS_DEVICE_PENDING_RECEIPT_KEY,
|
|
221
|
+
JSON.stringify({ udid, receipt }),
|
|
222
|
+
);
|
|
223
|
+
} catch {
|
|
224
|
+
// A browser that keeps nothing keeps it in memory for this page.
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
/** Drops the pending receipt once it is traded, if it is this one. */
|
|
229
|
+
export const releasePendingReceipt = (receipt: string) => {
|
|
230
|
+
try {
|
|
231
|
+
const kept = JSON.parse(
|
|
232
|
+
window.sessionStorage.getItem(IOS_DEVICE_PENDING_RECEIPT_KEY) ?? "null",
|
|
233
|
+
) as { receipt?: unknown } | null;
|
|
234
|
+
if (kept?.receipt === receipt) {
|
|
235
|
+
window.sessionStorage.removeItem(IOS_DEVICE_PENDING_RECEIPT_KEY);
|
|
236
|
+
}
|
|
237
|
+
} catch {
|
|
238
|
+
// Nothing kept.
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
|
|
154
242
|
/** A device's UDID: 40 hex digits, or 8 and 16 joined by a hyphen. */
|
|
155
243
|
export const IOS_UDID_PATTERN = /^(?:[0-9a-f]{40}|[0-9a-f]{8}-[0-9a-f]{16})$/iu;
|
|
156
244
|
|
|
@@ -9,9 +9,12 @@ import { sameSecret } from "./local-console";
|
|
|
9
9
|
* - The capability (`t`) lets the profile routes serve one profile and take
|
|
10
10
|
* one answer for a signed-in person: `register` saves the iPhone as
|
|
11
11
|
* requested, `identify` only tells the build page which iPhone it is.
|
|
12
|
-
* - The receipt (`r`) is what
|
|
13
|
-
* profile read and whose session asked, so
|
|
14
|
-
* from it, never from a link anyone can craft.
|
|
12
|
+
* - The receipt (`r`) is what the profile's answer hands back, in the page's
|
|
13
|
+
* fragment: it names the UDID the profile read and whose session asked, so
|
|
14
|
+
* Request access takes the UDID from it, never from a link anyone can craft.
|
|
15
|
+
* - The kept receipt says the same for 30 days, in an HttpOnly cookie the
|
|
16
|
+
* page trades the fragment's receipt for, so that Safari can request this
|
|
17
|
+
* iPhone again without the profile, for the same person only.
|
|
15
18
|
*/
|
|
16
19
|
|
|
17
20
|
/** Separates these tokens' key from every other use of the Console's secret. */
|
|
@@ -23,6 +26,9 @@ export const DEVICE_PROFILE_TOKEN_TTL_MS = 15 * 60 * 1000;
|
|
|
23
26
|
/** How long a receipt works, from the profile's answer to Request access. */
|
|
24
27
|
export const DEVICE_RECEIPT_TTL_MS = 60 * 60 * 1000;
|
|
25
28
|
|
|
29
|
+
/** How long Safari keeps the proof of this iPhone, in its cookie. */
|
|
30
|
+
export const KEPT_DEVICE_RECEIPT_TTL_MS = 30 * 24 * 60 * 60 * 1000;
|
|
31
|
+
|
|
26
32
|
/** What a capability lets its bearer do. */
|
|
27
33
|
export interface DeviceProfileGrant {
|
|
28
34
|
readonly m: "register" | "identify";
|
|
@@ -127,6 +133,9 @@ const verify = async <T extends object>(
|
|
|
127
133
|
|
|
128
134
|
const PROFILE_PURPOSE = "device-profile";
|
|
129
135
|
const RECEIPT_PURPOSE = "device-receipt";
|
|
136
|
+
// Its own purpose: a kept receipt never stands in for the fragment's, nor the
|
|
137
|
+
// other way round.
|
|
138
|
+
const KEPT_RECEIPT_PURPOSE = "device-receipt-kept";
|
|
130
139
|
|
|
131
140
|
export const createDeviceProfileToken = (
|
|
132
141
|
secret: string,
|
|
@@ -185,3 +194,28 @@ export const verifyDeviceReceipt = async (
|
|
|
185
194
|
}
|
|
186
195
|
return { u: verified.u, e: verified.e };
|
|
187
196
|
};
|
|
197
|
+
|
|
198
|
+
export const createKeptDeviceReceipt = (
|
|
199
|
+
secret: string,
|
|
200
|
+
receipt: DeviceReceipt,
|
|
201
|
+
now: number = Date.now(),
|
|
202
|
+
) =>
|
|
203
|
+
sign(secret, KEPT_RECEIPT_PURPOSE, receipt, now + KEPT_DEVICE_RECEIPT_TTL_MS);
|
|
204
|
+
|
|
205
|
+
export const verifyKeptDeviceReceipt = async (
|
|
206
|
+
secret: string,
|
|
207
|
+
token: string,
|
|
208
|
+
now: number = Date.now(),
|
|
209
|
+
): Promise<DeviceReceipt | "expired" | "invalid"> => {
|
|
210
|
+
const verified = await verify<DeviceReceipt>(
|
|
211
|
+
secret,
|
|
212
|
+
KEPT_RECEIPT_PURPOSE,
|
|
213
|
+
token,
|
|
214
|
+
now,
|
|
215
|
+
);
|
|
216
|
+
if (typeof verified === "string") return verified;
|
|
217
|
+
if (typeof verified.u !== "string" || typeof verified.e !== "string") {
|
|
218
|
+
return "invalid";
|
|
219
|
+
}
|
|
220
|
+
return { u: verified.u, e: verified.e };
|
|
221
|
+
};
|