@hot-updater/console 1.2.0-rc.31 → 1.2.0-rc.33
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-CyQoQkYs.js} +1 -1
- package/.output/public/assets/{ConsoleFeatureUnavailable-Be-0iTww.js → ConsoleFeatureUnavailable-C0iDIboF.js} +1 -1
- package/.output/public/assets/{EventDetails-bDOYte1z.js → EventDetails-DFWS-HcW.js} +1 -1
- package/.output/public/assets/{HashValueDisplay-D2f0HmyU.js → HashValueDisplay-DKziWjEg.js} +1 -1
- package/.output/public/assets/{InsightsPageHeader-Cj2ROSQO.js → InsightsPageHeader-BATHTZWn.js} +1 -1
- package/.output/public/assets/IosInstall-DsKczesK.js +1 -0
- package/.output/public/assets/NativeBuildsNav-D3FIlSu0.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-C_u_ZmPS.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-BZVWufH3.js +10 -0
- package/.output/public/assets/input-group-DNfVeeYZ.js +1 -0
- package/.output/public/assets/{insights-_j_ieOyh.js → insights-Bm4Kua5R.js} +2 -2
- package/.output/public/assets/insights-CpnFoyo5.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-Bjo0aQE4.js} +1 -1
- package/.output/public/assets/insights_.distribution-Dd2mYz8D.js +2 -0
- package/.output/public/assets/insights_.distribution-REbBAqgL.js +1 -0
- package/.output/public/assets/{installations-BsD6LgNc.js → installations-DYT2mSjX.js} +2 -2
- package/.output/public/assets/installations-Di02gX_V.js +1 -0
- package/.output/public/assets/{installations-CYTzndfP.js → installations-iqDa8KPW.js} +1 -1
- 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-7sC78eTq.js +1 -0
- package/.output/public/assets/native-builds-BOSmoLed.js +1 -0
- package/.output/public/assets/native-builds-CXDwW54k.js +2 -0
- package/.output/public/assets/native-builds_._buildId-C7-yUwvH.js +2 -0
- package/.output/public/assets/native-builds_._buildId-u5dG7ej5.js +1 -0
- package/.output/public/assets/native-builds_.devices-CQ_tB3SO.js +1 -0
- package/.output/public/assets/native-builds_.devices-C_YZoRxB.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-BbiN7bGR.js +6 -0
- package/.output/public/assets/remote-config-BhdrBpLM.js +1 -0
- package/.output/public/assets/remote-config-Dmuqm9xx.js +1 -0
- package/.output/public/assets/{rotate-cw-Ba-slJea.js → rotate-cw-Bn3fIWmY.js} +1 -1
- package/.output/public/assets/routes-C4MTDNA3.js +2 -0
- package/.output/public/assets/routes-Cjjfwbs_.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-CQNxu86i.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-BBfg-c0h.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-DBw1tYEH.mjs} +58 -62
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
- 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-DsNg19E8.mjs} +2 -2
- package/.output/server/_ssr/{ChannelBadge-DdrhdvMM.mjs → ChannelBadge-DWQcxohs.mjs} +3 -3
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-DPX24kXX.mjs → ConsoleFeatureUnavailable-CfcFJ4k4.mjs} +6 -6
- package/.output/server/_ssr/{EventDetails-6jBbGcbN.mjs → EventDetails-DJYShaIG.mjs} +6 -6
- package/.output/server/_ssr/{HashValueDisplay-B4--TU87.mjs → HashValueDisplay-B7FFJcIK.mjs} +2 -2
- package/.output/server/_ssr/{InsightsPageHeader-CuJ8N3TQ.mjs → InsightsPageHeader-CaceslcD.mjs} +6 -6
- package/.output/server/_ssr/{IosInstall-CHC-d6NT.mjs → IosInstall-gEVi9PFl.mjs} +164 -72
- package/.output/server/_ssr/{NativeBuildsNav-C69l7uNo.mjs → NativeBuildsNav-DoB6DGO2.mjs} +5 -5
- package/.output/server/_ssr/{NotFoundPage-ZsHGzoLS.mjs → NotFoundPage-Bu3yot-M.mjs} +2 -2
- package/.output/server/_ssr/{PlatformIcon-BXcpYcrO.mjs → PlatformIcon-X18AN8Yp.mjs} +1 -1
- package/.output/server/_ssr/QrCode-DkmvYkKS.mjs +50 -0
- package/.output/server/_ssr/{RelativeTime-7vOoIT4P.mjs → RelativeTime-Dg47Cmmt.mjs} +3 -3
- package/.output/server/_ssr/{RolloutPercentageBadge--MojdSYZ.mjs → RolloutPercentageBadge-CcEZuUxL.mjs} +3 -3
- package/.output/server/_ssr/{RowReason-CIaGuzr1.mjs → RowReason-CbKEYA9N.mjs} +4 -4
- package/.output/server/_ssr/{SandboxBadge-BqBSRE2-.mjs → SandboxBadge-CuTOlGaF.mjs} +2 -2
- package/.output/server/_ssr/{TargetDisplay-CLn4k3f5.mjs → TargetDisplay-DkRZwhNW.mjs} +3 -3
- package/.output/server/_ssr/{alert-dialog-DihcZr0y.mjs → alert-dialog-Ckdomw6e.mjs} +3 -3
- package/.output/server/_ssr/{api-nFsUxTG1.mjs → api-BIDpAoY0.mjs} +4 -4
- package/.output/server/_ssr/{api-keys-DExjZkdx.mjs → api-keys-BStTPcTe.mjs} +11 -9
- package/.output/server/_ssr/{api-keys-CN5wpM3R.mjs → api-keys-MdcfK9Zw.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-CClIn3D8.mjs → api-keys-rpc-FwkHHfJL.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-DLRzLoop.mjs → api-rpc-DI164kWO.mjs} +13 -13
- package/.output/server/_ssr/{auth-rpc-U46OWsbS.mjs → auth-rpc-DOONC4Xw.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-iIXxFs8t.mjs → auth.server-MkFb8t-c.mjs} +2 -2
- package/.output/server/_ssr/{badge-jnl4Ajh1.mjs → badge-MGJQ5WNb.mjs} +1 -1
- package/.output/server/_ssr/{card-BEfQk5Ei.mjs → card-st1F0w5g.mjs} +1 -1
- package/.output/server/_ssr/{config.server-Ig1eUxaf.mjs → config.server-A4yZxfTn.mjs} +4 -4
- package/.output/server/_ssr/{console-access-BOTh4-fO.mjs → console-access-Cj95NxRZ.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-WvvE114Q.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-B_V68MjF.mjs → console-features-rpc-DxhmScBd.mjs} +3 -3
- package/.output/server/_ssr/{deviceProfileToken-BbLKmrUb.mjs → deviceProfileToken-xzDLfE0T.mjs} +21 -5
- package/.output/server/_ssr/{dialog-DuyJ0HsU.mjs → dialog-jxN7lCij.mjs} +4 -4
- package/.output/server/_ssr/{empty-BDBZwsuM.mjs → empty-Dfmlc-7_.mjs} +2 -2
- package/.output/server/_ssr/{field-CX6srGIn.mjs → field-BrPlhj0S.mjs} +2 -2
- package/.output/server/_ssr/{input-group-CV_H0YX7.mjs → input-group-Ckaa4ML0.mjs} +2 -2
- package/.output/server/_ssr/{insights-CBoiq6pK.mjs → insights-BX9okQmy.mjs} +2 -2
- package/.output/server/_ssr/{insights-DQmsr9I4.mjs → insights-CmbOo4Er.mjs} +29 -24
- package/.output/server/_ssr/{insights-Td2VtKJZ.mjs → insights-DHvN6knB.mjs} +5 -5
- package/.output/server/_ssr/{insights-api-G8ZOyKKA.mjs → insights-api-t8rcSzVu.mjs} +3 -3
- package/.output/server/_ssr/{insights-failures-rpc-Ba4YSjbA.mjs → insights-failures-rpc-DadwsaxJ.mjs} +7 -7
- package/.output/server/_ssr/{insights-recovery-rpc-LKbOLo-_.mjs → insights-recovery-rpc-BK-RELe9.mjs} +4 -4
- package/.output/server/_ssr/{insights-rpc-TkflAi0Z.mjs → insights-rpc-BmDuFOYA.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-aCzmEqnq.mjs → insights-search-CQ0aMRHX.mjs} +2 -2
- package/.output/server/_ssr/{insights-usage-rpc-Cbk3jKjA.mjs → insights-usage-rpc-CkeNir2v.mjs} +4 -4
- package/.output/server/_ssr/{insights-usage-rpc-NoT-iWyp.mjs → insights-usage-rpc-JhBWMZfn.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-Bo1WRLKV.mjs → insights_.distribution-BtGiM-F8.mjs} +15 -15
- package/.output/server/_ssr/{insights_.distribution-Vt7W1Xw7.mjs → insights_.distribution-CEldmJz1.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-Y3uFkJMX.mjs → insights_.distribution-DlBTOrjk.mjs} +5 -5
- package/.output/server/_ssr/{installations-BEUOlOQs.mjs → installations-3fgKUnRv.mjs} +11 -11
- package/.output/server/_ssr/{installations-BpcY3NSj.mjs → installations-DHbd6gfU.mjs} +2 -2
- package/.output/server/_ssr/{installations-DClqNAQn.mjs → installations-oBJc0TH1.mjs} +4 -4
- package/.output/server/_ssr/{ios-devices-rpc-DmjO2Cbe.mjs → ios-devices-rpc-DjlS64L9.mjs} +9 -21
- package/.output/server/_ssr/iosDeviceCookie-Ccxr1MR8.mjs +155 -0
- package/.output/server/_ssr/{iosDeviceProfile-CseUPyC3.mjs → iosDeviceProfile-nEW-zQnl.mjs} +13 -14
- package/.output/server/_ssr/{iosDevices-BcM0YdL8.mjs → iosDevices-gG7HCnCL.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-Be2Ga-eY.mjs} +17 -17
- package/.output/server/_ssr/{native-builds-B31AnQ0z.mjs → native-builds-mq_fr3k0.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-Cq-3MWHV.mjs} +3 -3
- package/.output/server/_ssr/{native-builds_._buildId-xNxhulXv.mjs → native-builds_._buildId-Du028raJ.mjs} +20 -27
- package/.output/server/_ssr/{native-builds_.devices-BBWNnbAj.mjs → native-builds_.devices-CWOFxrsg.mjs} +120 -68
- package/.output/server/_ssr/{native-builds_.devices-DpYGqdjz.mjs → native-builds_.devices-DVBT3gKp.mjs} +3 -3
- package/.output/server/_ssr/{nativeBuildDownloadLink-CMo_0eeE.mjs → nativeBuildDownloadLink-BXFMIxJ8.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildInstall-BlT6X49f.mjs → nativeBuildInstall-CjG3sJmP.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-BiUppdo3.mjs} +7 -7
- package/.output/server/_ssr/{releaseAdoption-COlUf2W5.mjs → releaseAdoption-DfEYq7I4.mjs} +1 -1
- package/.output/server/_ssr/{remote-config-D1X_UwRB.mjs → remote-config-8SDPC3Ex.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-7NN5w0OC.mjs → remote-config-CKjwym6Y.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-DdcrliiZ.mjs → remote-config-MgYpLVNI.mjs} +19 -19
- package/.output/server/_ssr/{remote-config-rpc-oR3e-Ixt.mjs → remote-config-rpc-RoH5hIma.mjs} +3 -3
- package/.output/server/_ssr/{router-DxsgaBqH.mjs → router-DaSGo-53.mjs} +101 -61
- package/.output/server/_ssr/{routes-BXne94ak.mjs → routes-2wXfjE3q.mjs} +37 -33
- package/.output/server/_ssr/{routes-DdZw0VC5.mjs → routes-Y7SrNegl.mjs} +11 -10
- 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-C302GUdI.mjs} +3 -3
- package/.output/server/_ssr/{select-DcWzmCb3.mjs → select-DsWMUB9T.mjs} +1 -1
- package/.output/server/_ssr/{server-DA_rB8Ch.mjs → server-Bx_Shfka.mjs} +4 -4
- package/.output/server/_ssr/{sidebar-BsFYs26D.mjs → sidebar-S1E-7aSS.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-DMCgvrFu.mjs} +3 -3
- package/.output/server/_ssr/{table-SLiL-w8T.mjs → table-BN3AmMyY.mjs} +1 -1
- package/.output/server/_ssr/{tabs-BCG8AAvJ.mjs → tabs-D3tzMdsj.mjs} +3 -3
- package/.output/server/_ssr/{updateFailures-Cl1Fxj4J.mjs → updateFailures-BwDwIoNu.mjs} +1 -1
- package/.output/server/_tanstack-start-manifest_v-DcKFR9bk.mjs +225 -0
- package/.output/server/index.mjs +431 -431
- package/package.json +7 -7
- package/src/components/AppSidebar.tsx +11 -2
- package/src/components/features/api-keys/ApiKeysPage.tsx +4 -2
- 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 +3 -2
- package/src/components/features/insights/InsightsOverview.tsx +7 -1
- package/src/components/features/insights/ReleaseActivity.tsx +5 -1
- package/src/components/features/insights/ReleaseCombobox.tsx +1 -1
- package/src/components/features/insights/UpdateFailures.tsx +1 -0
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +1 -1
- package/src/components/features/native-builds/IosDevicesPage.tsx +120 -34
- package/src/components/features/native-builds/IosInstall.tsx +85 -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/NativeBuildsTable.tsx +1 -1
- 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/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/lib/ios-devices-api.ts +170 -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
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
|
+
};
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import type { HotUpdaterCoreApi, IosDeviceRow } from "@hot-updater/plugin-core";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
createKeptDeviceReceipt,
|
|
5
|
+
type DeviceReceipt,
|
|
6
|
+
KEPT_DEVICE_RECEIPT_TTL_MS,
|
|
7
|
+
verifyDeviceReceipt,
|
|
8
|
+
verifyKeptDeviceReceipt,
|
|
9
|
+
} from "./deviceProfileToken";
|
|
10
|
+
import { deviceName, type IosDeviceViewer } from "./iosDevices";
|
|
11
|
+
import { readConsoleSecret } from "./nativeBuildDownloadLink";
|
|
12
|
+
import { publicConsoleBase } from "./publicConsoleBase";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* This iPhone's proof, kept by Safari: after the profile's answer, the page
|
|
16
|
+
* trades the fragment's one-hour receipt for a 30-day one in an HttpOnly
|
|
17
|
+
* cookie, so the same person can request this iPhone again, after a removal,
|
|
18
|
+
* without the profile. The Console stores nothing: the cookie is a receipt
|
|
19
|
+
* signed with its secret, checked against the session on every use.
|
|
20
|
+
*
|
|
21
|
+
* The cookie is `Secure`, `SameSite=Strict`, and scoped to these routes, so
|
|
22
|
+
* no other request carries it and no other site's request does either. Every
|
|
23
|
+
* route here needs the Console's session, and a POST or DELETE only from this
|
|
24
|
+
* Console's own pages.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
export const IOS_DEVICE_COOKIE = "hot-updater-ios-device";
|
|
28
|
+
|
|
29
|
+
/** The routes the cookie is sent to, under the Console's path. */
|
|
30
|
+
export const IOS_DEVICE_COOKIE_ROUTES = "/_hot-updater/devices";
|
|
31
|
+
|
|
32
|
+
export const IOS_DEVICE_RECEIPT_ROUTE = `${IOS_DEVICE_COOKIE_ROUTES}/receipt`;
|
|
33
|
+
export const IOS_DEVICE_REQUEST_ROUTE = `${IOS_DEVICE_COOKIE_ROUTES}/request`;
|
|
34
|
+
|
|
35
|
+
const json = (body: unknown, status = 200, headers: HeadersInit = {}) =>
|
|
36
|
+
new Response(JSON.stringify(body), {
|
|
37
|
+
status,
|
|
38
|
+
headers: {
|
|
39
|
+
"cache-control": "no-store",
|
|
40
|
+
"content-type": "application/json; charset=utf-8",
|
|
41
|
+
...headers,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const refusal = (status: number, message: string) =>
|
|
46
|
+
json({ error: message }, status);
|
|
47
|
+
|
|
48
|
+
const cookieOf = (request: Request): string | null => {
|
|
49
|
+
for (const part of (request.headers.get("cookie") ?? "").split(";")) {
|
|
50
|
+
const [name, ...value] = part.trim().split("=");
|
|
51
|
+
if (name === IOS_DEVICE_COOKIE) return value.join("=") || null;
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** The cookie's `Path`: these routes, under the Console's own path. */
|
|
57
|
+
const cookiePath = (request: Request, route: string) =>
|
|
58
|
+
`${new URL(publicConsoleBase(request, route)).pathname.replace(/\/$/u, "")}${IOS_DEVICE_COOKIE_ROUTES}`;
|
|
59
|
+
|
|
60
|
+
const setCookie = (request: Request, route: string, value: string) =>
|
|
61
|
+
[
|
|
62
|
+
`${IOS_DEVICE_COOKIE}=${value}`,
|
|
63
|
+
`Path=${cookiePath(request, route)}`,
|
|
64
|
+
`Max-Age=${value === "" ? 0 : Math.floor(KEPT_DEVICE_RECEIPT_TTL_MS / 1000)}`,
|
|
65
|
+
"HttpOnly",
|
|
66
|
+
"Secure",
|
|
67
|
+
"SameSite=Strict",
|
|
68
|
+
].join("; ");
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Whether a request that changes something comes from this Console's own
|
|
72
|
+
* pages: a browser says so in `Sec-Fetch-Site` and `Origin`. With the
|
|
73
|
+
* cookie's `SameSite=Strict`, another site's form or script gets nowhere.
|
|
74
|
+
*/
|
|
75
|
+
const sameOrigin = (request: Request, route: string) => {
|
|
76
|
+
const site = request.headers.get("sec-fetch-site");
|
|
77
|
+
if (site !== null && site !== "same-origin") return false;
|
|
78
|
+
const origin = request.headers.get("origin");
|
|
79
|
+
if (origin === null) return site === "same-origin";
|
|
80
|
+
return (
|
|
81
|
+
origin === new URL(request.url).origin ||
|
|
82
|
+
origin === new URL(publicConsoleBase(request, route)).origin
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const readJson = async (request: Request) => {
|
|
87
|
+
if (
|
|
88
|
+
!(request.headers.get("content-type") ?? "").startsWith("application/json")
|
|
89
|
+
) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
const body: unknown = await request.json();
|
|
94
|
+
return typeof body === "object" && body !== null
|
|
95
|
+
? (body as Record<string, unknown>)
|
|
96
|
+
: null;
|
|
97
|
+
} catch {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/** The cookie's receipt, for this person only; null when it holds none. */
|
|
103
|
+
const keptReceipt = async (
|
|
104
|
+
request: Request,
|
|
105
|
+
secret: string,
|
|
106
|
+
viewer: IosDeviceViewer,
|
|
107
|
+
now: number,
|
|
108
|
+
): Promise<DeviceReceipt | null> => {
|
|
109
|
+
const cookie = cookieOf(request);
|
|
110
|
+
if (cookie === null) return null;
|
|
111
|
+
const receipt = await verifyKeptDeviceReceipt(secret, cookie, now);
|
|
112
|
+
return typeof receipt === "string" || receipt.e !== viewer.email
|
|
113
|
+
? null
|
|
114
|
+
: receipt;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export interface IosDeviceCookieDeps {
|
|
118
|
+
/** The signed-in viewer, or the access check's 401/403. */
|
|
119
|
+
readonly viewer: () => Promise<IosDeviceViewer>;
|
|
120
|
+
readonly core: () => Promise<Pick<HotUpdaterCoreApi, "requestIosDevice">>;
|
|
121
|
+
readonly now?: number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const withViewer = async (
|
|
125
|
+
deps: IosDeviceCookieDeps,
|
|
126
|
+
run: (viewer: IosDeviceViewer) => Promise<Response>,
|
|
127
|
+
) => {
|
|
128
|
+
let viewer: IosDeviceViewer;
|
|
129
|
+
try {
|
|
130
|
+
viewer = await deps.viewer();
|
|
131
|
+
} catch (error) {
|
|
132
|
+
if (error instanceof Response) return error;
|
|
133
|
+
throw error;
|
|
134
|
+
}
|
|
135
|
+
return run(viewer);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* `/_hot-updater/devices/receipt`:
|
|
140
|
+
*
|
|
141
|
+
* - GET: the UDID this Safari proved for this person, or null.
|
|
142
|
+
* - POST `{ receipt }`: trades the fragment's receipt, for this person, for
|
|
143
|
+
* the cookie; 403 for anyone else's, an expired one, or a forged one.
|
|
144
|
+
* - DELETE: forgets the cookie, as sign-out does.
|
|
145
|
+
*/
|
|
146
|
+
export const handleIosDeviceReceipt = async (
|
|
147
|
+
request: Request,
|
|
148
|
+
deps: IosDeviceCookieDeps,
|
|
149
|
+
): Promise<Response> =>
|
|
150
|
+
withViewer(deps, async (viewer) => {
|
|
151
|
+
const now = deps.now ?? Date.now();
|
|
152
|
+
const route = IOS_DEVICE_RECEIPT_ROUTE;
|
|
153
|
+
if (request.method === "DELETE") {
|
|
154
|
+
if (!sameOrigin(request, route)) return refusal(403, "Forbidden");
|
|
155
|
+
return json({ udid: null }, 200, {
|
|
156
|
+
"set-cookie": setCookie(request, route, ""),
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
const secret = readConsoleSecret(request);
|
|
160
|
+
if (request.method === "GET") {
|
|
161
|
+
const receipt =
|
|
162
|
+
secret === undefined
|
|
163
|
+
? null
|
|
164
|
+
: await keptReceipt(request, secret, viewer, now);
|
|
165
|
+
return json({ udid: receipt?.u ?? null });
|
|
166
|
+
}
|
|
167
|
+
if (request.method !== "POST") {
|
|
168
|
+
return new Response(null, {
|
|
169
|
+
status: 405,
|
|
170
|
+
headers: { allow: "GET, POST, DELETE" },
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
if (!sameOrigin(request, route)) return refusal(403, "Forbidden");
|
|
174
|
+
if (secret === undefined) {
|
|
175
|
+
return refusal(409, "This Console has no secret to sign with.");
|
|
176
|
+
}
|
|
177
|
+
const body = await readJson(request);
|
|
178
|
+
if (body === null || typeof body.receipt !== "string") {
|
|
179
|
+
return refusal(400, "Send this iPhone's receipt.");
|
|
180
|
+
}
|
|
181
|
+
const receipt = await verifyDeviceReceipt(secret, body.receipt, now);
|
|
182
|
+
if (typeof receipt === "string" || receipt.e !== viewer.email) {
|
|
183
|
+
return refusal(403, "Check this iPhone again from this account.");
|
|
184
|
+
}
|
|
185
|
+
return json({ udid: receipt.u }, 200, {
|
|
186
|
+
"set-cookie": setCookie(
|
|
187
|
+
request,
|
|
188
|
+
route,
|
|
189
|
+
await createKeptDeviceReceipt(secret, receipt, now),
|
|
190
|
+
),
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* `/_hot-updater/devices/request`, POST `{ name, receipt? }`: requests the
|
|
196
|
+
* iPhone a receipt names, for the signed-in person, under `name`. The UDID
|
|
197
|
+
* comes from the fragment's receipt when the page has one, else from the
|
|
198
|
+
* cookie, never from the request's own words.
|
|
199
|
+
*/
|
|
200
|
+
export const handleIosDeviceRequest = async (
|
|
201
|
+
request: Request,
|
|
202
|
+
deps: IosDeviceCookieDeps,
|
|
203
|
+
): Promise<Response> =>
|
|
204
|
+
withViewer(deps, async (viewer) => {
|
|
205
|
+
const now = deps.now ?? Date.now();
|
|
206
|
+
const route = IOS_DEVICE_REQUEST_ROUTE;
|
|
207
|
+
if (request.method !== "POST") {
|
|
208
|
+
return new Response(null, { status: 405, headers: { allow: "POST" } });
|
|
209
|
+
}
|
|
210
|
+
if (!sameOrigin(request, route)) return refusal(403, "Forbidden");
|
|
211
|
+
const secret = readConsoleSecret(request);
|
|
212
|
+
const body = await readJson(request);
|
|
213
|
+
if (body === null) return refusal(400, "Send this iPhone's name.");
|
|
214
|
+
let name: string;
|
|
215
|
+
try {
|
|
216
|
+
name = deviceName(body.name);
|
|
217
|
+
} catch (error) {
|
|
218
|
+
return refusal(400, (error as Error).message);
|
|
219
|
+
}
|
|
220
|
+
let udid: string | null = null;
|
|
221
|
+
if (secret !== undefined) {
|
|
222
|
+
if (typeof body.receipt === "string") {
|
|
223
|
+
const receipt = await verifyDeviceReceipt(secret, body.receipt, now);
|
|
224
|
+
udid =
|
|
225
|
+
typeof receipt === "string" || receipt.e !== viewer.email
|
|
226
|
+
? null
|
|
227
|
+
: receipt.u;
|
|
228
|
+
}
|
|
229
|
+
// A page left open past its fragment's hour still has the cookie.
|
|
230
|
+
udid ??= (await keptReceipt(request, secret, viewer, now))?.u ?? null;
|
|
231
|
+
}
|
|
232
|
+
if (udid === null) {
|
|
233
|
+
return refusal(403, "Check this iPhone again from this account.");
|
|
234
|
+
}
|
|
235
|
+
const core = await deps.core();
|
|
236
|
+
const result: { device: IosDeviceRow; created: boolean } =
|
|
237
|
+
await core.requestIosDevice({ udid, name, requestedBy: viewer.email });
|
|
238
|
+
return json(result);
|
|
239
|
+
});
|
|
@@ -205,6 +205,9 @@ export const receiveDeviceResponse = async (
|
|
|
205
205
|
const { grant, secret } = checked;
|
|
206
206
|
const base = publicConsoleBase(request, IOS_DEVICE_RESPONSE_PATH);
|
|
207
207
|
let location: string;
|
|
208
|
+
// Either answer hands the page a receipt, which it trades for the cookie
|
|
209
|
+
// that lets this Safari request the iPhone again without the profile.
|
|
210
|
+
const receipt = await createDeviceReceipt(secret, { u: udid, e: grant.e });
|
|
208
211
|
if (grant.m === "register") {
|
|
209
212
|
const core = await loadCore();
|
|
210
213
|
await core.requestIosDevice({
|
|
@@ -212,9 +215,8 @@ export const receiveDeviceResponse = async (
|
|
|
212
215
|
name: grant.n ?? "iPhone",
|
|
213
216
|
requestedBy: grant.e,
|
|
214
217
|
});
|
|
215
|
-
location = `${base}${IOS_DEVICES_PATH}#udid=${encodeURIComponent(udid)}&requested=1`;
|
|
218
|
+
location = `${base}${IOS_DEVICES_PATH}#udid=${encodeURIComponent(udid)}&r=${encodeURIComponent(receipt)}&requested=1`;
|
|
216
219
|
} else {
|
|
217
|
-
const receipt = await createDeviceReceipt(secret, { u: udid, e: grant.e });
|
|
218
220
|
const page =
|
|
219
221
|
grant.b === undefined ? IOS_DEVICES_PATH : nativeBuildDetailPath(grant.b);
|
|
220
222
|
location = `${base}${page}#udid=${encodeURIComponent(udid)}&r=${encodeURIComponent(receipt)}`;
|
|
@@ -8,7 +8,6 @@ import type { ConsolePrincipal } from "../../index";
|
|
|
8
8
|
import {
|
|
9
9
|
createDeviceProfileToken,
|
|
10
10
|
DEVICE_PROFILE_TOKEN_TTL_MS,
|
|
11
|
-
verifyDeviceReceipt,
|
|
12
11
|
} from "./deviceProfileToken";
|
|
13
12
|
import {
|
|
14
13
|
CONSOLE_SECRET_ENV,
|
|
@@ -165,35 +164,6 @@ export const issueDeviceProfileLink = async (
|
|
|
165
164
|
};
|
|
166
165
|
};
|
|
167
166
|
|
|
168
|
-
/**
|
|
169
|
-
* Requests the iPhone a receipt names, for the person whose profile made it:
|
|
170
|
-
* the UDID comes from the receipt alone. Another person's receipt, an expired
|
|
171
|
-
* one, or none, is refused.
|
|
172
|
-
*/
|
|
173
|
-
export const requestIosDeviceAccess = async (
|
|
174
|
-
request: Request,
|
|
175
|
-
core: Pick<HotUpdaterCoreApi, "requestIosDevice">,
|
|
176
|
-
viewer: IosDeviceViewer,
|
|
177
|
-
input: { readonly receipt: string; readonly name: string },
|
|
178
|
-
) => {
|
|
179
|
-
const secret = readConsoleSecret(request);
|
|
180
|
-
const receipt =
|
|
181
|
-
secret === undefined
|
|
182
|
-
? "invalid"
|
|
183
|
-
: await verifyDeviceReceipt(secret, input.receipt);
|
|
184
|
-
if (receipt === "expired") {
|
|
185
|
-
throw forbidden("Check this iPhone again: its check has expired.");
|
|
186
|
-
}
|
|
187
|
-
if (receipt === "invalid" || receipt.e !== viewer.email) {
|
|
188
|
-
throw forbidden("Check this iPhone again from this account.");
|
|
189
|
-
}
|
|
190
|
-
return core.requestIosDevice({
|
|
191
|
-
udid: receipt.u,
|
|
192
|
-
name: deviceName(input.name),
|
|
193
|
-
requestedBy: viewer.email,
|
|
194
|
-
});
|
|
195
|
-
};
|
|
196
|
-
|
|
197
167
|
/**
|
|
198
168
|
* Removes a device from the registry, as read now: an approver removes any,
|
|
199
169
|
* and the person who asked withdraws their own while it is still requested.
|
package/src/routeTree.gen.ts
CHANGED
|
@@ -20,6 +20,8 @@ import { Route as NativeBuildsBuildIdRouteImport } from './routes/native-builds_
|
|
|
20
20
|
import { Route as NativeBuildsDevicesRouteImport } from './routes/native-builds_.devices'
|
|
21
21
|
import { Route as HotUpdaterDevicesDeviceResponseRouteImport } from './routes/[_]hot-updater/devices/device-response'
|
|
22
22
|
import { Route as HotUpdaterDevicesDeviceDotmobileconfigRouteImport } from './routes/[_]hot-updater/devices/device[.]mobileconfig'
|
|
23
|
+
import { Route as HotUpdaterDevicesReceiptRouteImport } from './routes/[_]hot-updater/devices/receipt'
|
|
24
|
+
import { Route as HotUpdaterDevicesRequestRouteImport } from './routes/[_]hot-updater/devices/request'
|
|
23
25
|
import { Route as ApiAuthSplatRouteImport } from './routes/api/auth/$'
|
|
24
26
|
import { Route as HotUpdaterNativeBuildsBuildIdManifestDotplistRouteImport } from './routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist'
|
|
25
27
|
import { Route as ApiBundlesBundleIdDownloadRouteImport } from './routes/api/bundles/$bundleId/download'
|
|
@@ -82,6 +84,18 @@ const HotUpdaterDevicesDeviceDotmobileconfigRoute =
|
|
|
82
84
|
path: '/_hot-updater/devices/device.mobileconfig',
|
|
83
85
|
getParentRoute: () => rootRouteImport,
|
|
84
86
|
} as any)
|
|
87
|
+
const HotUpdaterDevicesReceiptRoute =
|
|
88
|
+
HotUpdaterDevicesReceiptRouteImport.update({
|
|
89
|
+
id: '/_hot-updater/devices/receipt',
|
|
90
|
+
path: '/_hot-updater/devices/receipt',
|
|
91
|
+
getParentRoute: () => rootRouteImport,
|
|
92
|
+
} as any)
|
|
93
|
+
const HotUpdaterDevicesRequestRoute =
|
|
94
|
+
HotUpdaterDevicesRequestRouteImport.update({
|
|
95
|
+
id: '/_hot-updater/devices/request',
|
|
96
|
+
path: '/_hot-updater/devices/request',
|
|
97
|
+
getParentRoute: () => rootRouteImport,
|
|
98
|
+
} as any)
|
|
85
99
|
const ApiAuthSplatRoute = ApiAuthSplatRouteImport.update({
|
|
86
100
|
id: '/api/auth/$',
|
|
87
101
|
path: '/api/auth/$',
|
|
@@ -118,6 +132,8 @@ export interface FileRoutesByFullPath {
|
|
|
118
132
|
'/native-builds/devices': typeof NativeBuildsDevicesRoute
|
|
119
133
|
'/_hot-updater/devices/device-response': typeof HotUpdaterDevicesDeviceResponseRoute
|
|
120
134
|
'/_hot-updater/devices/device.mobileconfig': typeof HotUpdaterDevicesDeviceDotmobileconfigRoute
|
|
135
|
+
'/_hot-updater/devices/receipt': typeof HotUpdaterDevicesReceiptRoute
|
|
136
|
+
'/_hot-updater/devices/request': typeof HotUpdaterDevicesRequestRoute
|
|
121
137
|
'/api/auth/$': typeof ApiAuthSplatRoute
|
|
122
138
|
'/_hot-updater/native-builds/$buildId/manifest.plist': typeof HotUpdaterNativeBuildsBuildIdManifestDotplistRoute
|
|
123
139
|
'/api/bundles/$bundleId/download': typeof ApiBundlesBundleIdDownloadRoute
|
|
@@ -135,6 +151,8 @@ export interface FileRoutesByTo {
|
|
|
135
151
|
'/native-builds/devices': typeof NativeBuildsDevicesRoute
|
|
136
152
|
'/_hot-updater/devices/device-response': typeof HotUpdaterDevicesDeviceResponseRoute
|
|
137
153
|
'/_hot-updater/devices/device.mobileconfig': typeof HotUpdaterDevicesDeviceDotmobileconfigRoute
|
|
154
|
+
'/_hot-updater/devices/receipt': typeof HotUpdaterDevicesReceiptRoute
|
|
155
|
+
'/_hot-updater/devices/request': typeof HotUpdaterDevicesRequestRoute
|
|
138
156
|
'/api/auth/$': typeof ApiAuthSplatRoute
|
|
139
157
|
'/_hot-updater/native-builds/$buildId/manifest.plist': typeof HotUpdaterNativeBuildsBuildIdManifestDotplistRoute
|
|
140
158
|
'/api/bundles/$bundleId/download': typeof ApiBundlesBundleIdDownloadRoute
|
|
@@ -153,6 +171,8 @@ export interface FileRoutesById {
|
|
|
153
171
|
'/native-builds_/devices': typeof NativeBuildsDevicesRoute
|
|
154
172
|
'/_hot-updater/devices/device-response': typeof HotUpdaterDevicesDeviceResponseRoute
|
|
155
173
|
'/_hot-updater/devices/device.mobileconfig': typeof HotUpdaterDevicesDeviceDotmobileconfigRoute
|
|
174
|
+
'/_hot-updater/devices/receipt': typeof HotUpdaterDevicesReceiptRoute
|
|
175
|
+
'/_hot-updater/devices/request': typeof HotUpdaterDevicesRequestRoute
|
|
156
176
|
'/api/auth/$': typeof ApiAuthSplatRoute
|
|
157
177
|
'/_hot-updater/native-builds/$buildId/manifest.plist': typeof HotUpdaterNativeBuildsBuildIdManifestDotplistRoute
|
|
158
178
|
'/api/bundles/$bundleId/download': typeof ApiBundlesBundleIdDownloadRoute
|
|
@@ -172,6 +192,8 @@ export interface FileRouteTypes {
|
|
|
172
192
|
| '/native-builds/devices'
|
|
173
193
|
| '/_hot-updater/devices/device-response'
|
|
174
194
|
| '/_hot-updater/devices/device.mobileconfig'
|
|
195
|
+
| '/_hot-updater/devices/receipt'
|
|
196
|
+
| '/_hot-updater/devices/request'
|
|
175
197
|
| '/api/auth/$'
|
|
176
198
|
| '/_hot-updater/native-builds/$buildId/manifest.plist'
|
|
177
199
|
| '/api/bundles/$bundleId/download'
|
|
@@ -189,6 +211,8 @@ export interface FileRouteTypes {
|
|
|
189
211
|
| '/native-builds/devices'
|
|
190
212
|
| '/_hot-updater/devices/device-response'
|
|
191
213
|
| '/_hot-updater/devices/device.mobileconfig'
|
|
214
|
+
| '/_hot-updater/devices/receipt'
|
|
215
|
+
| '/_hot-updater/devices/request'
|
|
192
216
|
| '/api/auth/$'
|
|
193
217
|
| '/_hot-updater/native-builds/$buildId/manifest.plist'
|
|
194
218
|
| '/api/bundles/$bundleId/download'
|
|
@@ -206,6 +230,8 @@ export interface FileRouteTypes {
|
|
|
206
230
|
| '/native-builds_/devices'
|
|
207
231
|
| '/_hot-updater/devices/device-response'
|
|
208
232
|
| '/_hot-updater/devices/device.mobileconfig'
|
|
233
|
+
| '/_hot-updater/devices/receipt'
|
|
234
|
+
| '/_hot-updater/devices/request'
|
|
209
235
|
| '/api/auth/$'
|
|
210
236
|
| '/_hot-updater/native-builds/$buildId/manifest.plist'
|
|
211
237
|
| '/api/bundles/$bundleId/download'
|
|
@@ -224,6 +250,8 @@ export interface RootRouteChildren {
|
|
|
224
250
|
NativeBuildsDevicesRoute: typeof NativeBuildsDevicesRoute
|
|
225
251
|
HotUpdaterDevicesDeviceResponseRoute: typeof HotUpdaterDevicesDeviceResponseRoute
|
|
226
252
|
HotUpdaterDevicesDeviceDotmobileconfigRoute: typeof HotUpdaterDevicesDeviceDotmobileconfigRoute
|
|
253
|
+
HotUpdaterDevicesReceiptRoute: typeof HotUpdaterDevicesReceiptRoute
|
|
254
|
+
HotUpdaterDevicesRequestRoute: typeof HotUpdaterDevicesRequestRoute
|
|
227
255
|
ApiAuthSplatRoute: typeof ApiAuthSplatRoute
|
|
228
256
|
HotUpdaterNativeBuildsBuildIdManifestDotplistRoute: typeof HotUpdaterNativeBuildsBuildIdManifestDotplistRoute
|
|
229
257
|
ApiBundlesBundleIdDownloadRoute: typeof ApiBundlesBundleIdDownloadRoute
|
|
@@ -309,6 +337,20 @@ declare module '@tanstack/react-router' {
|
|
|
309
337
|
preLoaderRoute: typeof HotUpdaterDevicesDeviceDotmobileconfigRouteImport
|
|
310
338
|
parentRoute: typeof rootRouteImport
|
|
311
339
|
}
|
|
340
|
+
'/_hot-updater/devices/receipt': {
|
|
341
|
+
id: '/_hot-updater/devices/receipt'
|
|
342
|
+
path: '/_hot-updater/devices/receipt'
|
|
343
|
+
fullPath: '/_hot-updater/devices/receipt'
|
|
344
|
+
preLoaderRoute: typeof HotUpdaterDevicesReceiptRouteImport
|
|
345
|
+
parentRoute: typeof rootRouteImport
|
|
346
|
+
}
|
|
347
|
+
'/_hot-updater/devices/request': {
|
|
348
|
+
id: '/_hot-updater/devices/request'
|
|
349
|
+
path: '/_hot-updater/devices/request'
|
|
350
|
+
fullPath: '/_hot-updater/devices/request'
|
|
351
|
+
preLoaderRoute: typeof HotUpdaterDevicesRequestRouteImport
|
|
352
|
+
parentRoute: typeof rootRouteImport
|
|
353
|
+
}
|
|
312
354
|
'/api/auth/$': {
|
|
313
355
|
id: '/api/auth/$'
|
|
314
356
|
path: '/api/auth/$'
|
|
@@ -353,6 +395,8 @@ const rootRouteChildren: RootRouteChildren = {
|
|
|
353
395
|
HotUpdaterDevicesDeviceResponseRoute: HotUpdaterDevicesDeviceResponseRoute,
|
|
354
396
|
HotUpdaterDevicesDeviceDotmobileconfigRoute:
|
|
355
397
|
HotUpdaterDevicesDeviceDotmobileconfigRoute,
|
|
398
|
+
HotUpdaterDevicesReceiptRoute: HotUpdaterDevicesReceiptRoute,
|
|
399
|
+
HotUpdaterDevicesRequestRoute: HotUpdaterDevicesRequestRoute,
|
|
356
400
|
ApiAuthSplatRoute: ApiAuthSplatRoute,
|
|
357
401
|
HotUpdaterNativeBuildsBuildIdManifestDotplistRoute:
|
|
358
402
|
HotUpdaterNativeBuildsBuildIdManifestDotplistRoute,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createFileRoute } from "@tanstack/react-router";
|
|
2
|
+
|
|
3
|
+
// This iPhone's kept proof, an HttpOnly cookie scoped to these routes: see
|
|
4
|
+
// iosDeviceCookie.ts. Every method needs the Console's session.
|
|
5
|
+
export const Route = createFileRoute("/_hot-updater/devices/receipt")({
|
|
6
|
+
server: {
|
|
7
|
+
handlers: {
|
|
8
|
+
ANY: async ({ request }) => {
|
|
9
|
+
const [cookie, { iosDeviceViewer }, { requireConsoleAccess }, config] =
|
|
10
|
+
await Promise.all([
|
|
11
|
+
import("@/lib/server/iosDeviceCookie"),
|
|
12
|
+
import("@/lib/server/iosDevices"),
|
|
13
|
+
import("@/lib/server/auth.server"),
|
|
14
|
+
import("@/lib/server/config.server"),
|
|
15
|
+
]);
|
|
16
|
+
const loaded = () => config.prepareConfig(request);
|
|
17
|
+
return cookie.handleIosDeviceReceipt(request, {
|
|
18
|
+
viewer: async () =>
|
|
19
|
+
iosDeviceViewer(
|
|
20
|
+
await requireConsoleAccess(request),
|
|
21
|
+
(await loaded()).config.deviceApprovers,
|
|
22
|
+
),
|
|
23
|
+
core: async () => (await loaded()).core,
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createFileRoute } from "@tanstack/react-router";
|
|
2
|
+
|
|
3
|
+
// This iPhone's kept proof, an HttpOnly cookie scoped to these routes: see
|
|
4
|
+
// iosDeviceCookie.ts. Every method needs the Console's session.
|
|
5
|
+
export const Route = createFileRoute("/_hot-updater/devices/request")({
|
|
6
|
+
server: {
|
|
7
|
+
handlers: {
|
|
8
|
+
ANY: async ({ request }) => {
|
|
9
|
+
const [cookie, { iosDeviceViewer }, { requireConsoleAccess }, config] =
|
|
10
|
+
await Promise.all([
|
|
11
|
+
import("@/lib/server/iosDeviceCookie"),
|
|
12
|
+
import("@/lib/server/iosDevices"),
|
|
13
|
+
import("@/lib/server/auth.server"),
|
|
14
|
+
import("@/lib/server/config.server"),
|
|
15
|
+
]);
|
|
16
|
+
const loaded = () => config.prepareConfig(request);
|
|
17
|
+
return cookie.handleIosDeviceRequest(request, {
|
|
18
|
+
viewer: async () =>
|
|
19
|
+
iosDeviceViewer(
|
|
20
|
+
await requireConsoleAccess(request),
|
|
21
|
+
(await loaded()).config.deviceApprovers,
|
|
22
|
+
),
|
|
23
|
+
core: async () => (await loaded()).core,
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Vr as e}from"./sidebar-yC7KdImc.js";import{d as t}from"./uuidv7-DAoOOpz9.js";var n=e(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),r=e=>typeof e==`string`&&e.length>0?e:void 0,i=e=>{let n=r(e);if(n!==void 0)try{return t(n),n}catch{return}},a=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)),o=e=>{let t=r(e.before);return a({channel:i(e.channel),before:t,after:t===void 0?r(e.after):void 0})},s=e=>{let t=r(e.patchesBefore);return a({patchesBefore:t,patchesAfter:t===void 0?r(e.patchesAfter):void 0})},c=[`pending`,`approved`,`registered`],l=e=>typeof e.status==`string`&&c.includes(e.status)?{status:e.status}:{};export{n as i,s as n,o as r,l as t};
|