@hot-updater/console 1.2.0-rc.2 → 1.2.0-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{-native-builds-search-C-TGpFAm.js → -native-builds-search-OlRj4Jz0.js} +1 -1
- package/.output/public/assets/BundleIdDisplay-CP6rsdFO.js +1 -0
- package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-DUqlpHCp.js} +1 -1
- package/.output/public/assets/EventDetails-Dcpdu7re.js +1 -0
- package/.output/public/assets/HashValueDisplay-MoZMmTeP.js +1 -0
- package/.output/public/assets/{InsightsPageHeader-DHhqY3DT.js → InsightsPageHeader-CSas9gM0.js} +1 -1
- package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-CJ69KopR.js} +1 -1
- package/.output/public/assets/RelativeTime-CiZ7yXNJ.js +1 -0
- package/.output/public/assets/RolloutPercentageBadge-D-tZKnX7.js +1 -0
- package/.output/public/assets/StoreSubmission-F00RL5rI.js +1 -0
- package/.output/public/assets/TargetDisplay-CoYY8Fs4.js +1 -0
- package/.output/public/assets/api-LQJH44FU.js +1 -0
- package/.output/public/assets/api-keys-3IL4dIHe.js +1 -0
- package/.output/public/assets/api-keys-4w2-ofii.js +1 -0
- package/.output/public/assets/badge-laIuYW1U.js +1 -0
- package/.output/public/assets/card-ulgg5xHn.js +1 -0
- package/.output/public/assets/{index-CqP5HPV6.js → index-Cde2QQJq.js} +3 -3
- package/.output/public/assets/insights-0TUItqwh.js +1 -0
- package/.output/public/assets/insights-DDRfERph.js +2 -0
- package/.output/public/assets/insights-_6iMn8GR.js +42 -0
- package/.output/public/assets/{insights-search-DghCbEnk.js → insights-search-CYPrQVUC.js} +1 -1
- package/.output/public/assets/{insights-usage-rpc-CKQH0pUS.js → insights-usage-rpc-BbFllvi_.js} +1 -1
- package/.output/public/assets/insights_.distribution-AZcfvK7x.js +1 -0
- package/.output/public/assets/insights_.distribution-BGAqgPi0.js +1 -0
- package/.output/public/assets/insights_.distribution-CjYkDRA4.js +2 -0
- package/.output/public/assets/installations-Ap2G2tDs.js +1 -0
- package/.output/public/assets/{installations-B674P5Z5.js → installations-CSZfo1rG.js} +2 -2
- package/.output/public/assets/installations-CwQYwQ6K.js +1 -0
- package/.output/public/assets/native-builds-cT9Ha-jZ.js +1 -0
- package/.output/public/assets/native-builds-v5wez34c.js +2 -0
- package/.output/public/assets/native-builds_._buildId-BBwE8Pcc.js +2 -0
- package/.output/public/assets/native-builds_._buildId-DZPcR_up.js +1 -0
- package/.output/public/assets/package-ytYrywZH.js +1 -0
- package/.output/public/assets/remote-config-CIAEArwq.js +1 -0
- package/.output/public/assets/{remote-config-WjpozBG5.js → remote-config-Dwdc-sij.js} +1 -1
- package/.output/public/assets/remote-config-ZJ_IRSKE.js +6 -0
- package/.output/public/assets/routes-BUWLcUqW.js +1 -0
- package/.output/public/assets/routes-Rtz-KcQO.js +2 -0
- package/.output/public/assets/styles-bNNic0NS.css +2 -0
- package/.output/public/assets/valueToPercent-B6X9rUJM.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-BcDgi7Q7.mjs → __23tanstack-start-server-fn-resolver-C-9gAWtP.mjs} +58 -46
- package/.output/server/_chunks/ssr-renderer.mjs +2 -2
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
- package/.output/server/_libs/_.mjs +2 -0
- package/.output/server/_libs/lucide-react.mjs +1 -27
- package/.output/server/_ssr/{-native-builds-search-CwNcoXf4.mjs → -native-builds-search-Cl8EZ0Ud.mjs} +2 -2
- package/.output/server/_ssr/{BundleIdDisplay-ys5eRBiX.mjs → BundleIdDisplay-gVoZLoqU.mjs} +2 -2
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-DFrogDwc.mjs → ConsoleFeatureUnavailable-Dcibk9QQ.mjs} +7 -7
- package/.output/server/_ssr/{EventDetails-BOJR7vO-.mjs → EventDetails-CCZ9mS_F.mjs} +8 -8
- package/.output/server/_ssr/{HashValueDisplay-d4OxpYG1.mjs → HashValueDisplay-BxHC8iAG.mjs} +6 -6
- package/.output/server/_ssr/{InsightsPageHeader-D_ON_oXO.mjs → InsightsPageHeader-CqJqdi-m.mjs} +8 -8
- package/.output/server/_ssr/{NotFoundPage-BJKqYxfO.mjs → NotFoundPage-BLIrdxfa.mjs} +2 -2
- package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-Cuhy0CIO.mjs} +12 -2
- package/.output/server/_ssr/RelativeTime-B1Sy1q_O.mjs +209 -0
- package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-BmWPR_Tb.mjs} +19 -3
- package/.output/server/_ssr/StoreSubmission-DIsoEgf-.mjs +65 -0
- package/.output/server/_ssr/TargetDisplay-C2ROSppY.mjs +100 -0
- package/.output/server/_ssr/{alert-dialog-BU7QeAL9.mjs → alert-dialog-C1y2G90R.mjs} +1 -1
- package/.output/server/_ssr/{api-Dn2NwWiq.mjs → api-D8gN7V0h.mjs} +99 -22
- package/.output/server/_ssr/{api-keys-D5rW-eAH.mjs → api-keys-DybL9aTC.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-Ckoc4av7.mjs → api-keys-W6eabF-V.mjs} +10 -9
- package/.output/server/_ssr/{api-keys-rpc-Bf2x7mQb.mjs → api-keys-rpc-CEaSDqVK.mjs} +4 -4
- package/.output/server/_ssr/{api-rpc-Bg7CTu5A.mjs → api-rpc-DloD35JY.mjs} +43 -18
- package/.output/server/_ssr/{auth-rpc-C41fl9Q5.mjs → auth-rpc-DOGHWAlV.mjs} +5 -5
- package/.output/server/_ssr/{auth.server-Dfa8DroN.mjs → auth.server-BO8fBOxh.mjs} +165 -149
- package/.output/server/_ssr/{badge-B-YGm4ng.mjs → badge-DFQ0dCIK.mjs} +2 -44
- package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-BGVvqWx7.mjs} +1 -1
- package/.output/server/_ssr/card-Ec0pJUEs.mjs +49 -0
- package/.output/server/_ssr/{config.server-DBX318ww.mjs → config.server-AfVsZPlA.mjs} +4 -4
- package/.output/server/_ssr/{console-access-CwSkUsOn.mjs → console-access-fb0N6Nkh.mjs} +2 -2
- package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-CgdQJQlX.mjs} +1 -1
- package/.output/server/_ssr/{console-features-api-BbojT91g.mjs → console-features-api-VIcoTdNC.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-3bq2wS5U.mjs → console-features-rpc-BNjlCLLR.mjs} +4 -4
- package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
- package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-XAvDetmn.mjs} +1 -1
- package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
- package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BtRVBD0C.mjs} +3 -3
- package/.output/server/_ssr/{dialog-RPz_4IaA.mjs → dialog-CqqX-d24.mjs} +1 -1
- package/.output/server/_ssr/{dist-TEpM_UAD.mjs → dist-B6-irDRA.mjs} +1 -1
- package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-BX8ODCZT.mjs} +1 -1
- package/.output/server/_ssr/{empty-BE1Gn6IB.mjs → empty-o55VPF-m.mjs} +2 -2
- package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
- package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-C_CmBF4x.mjs} +3 -3
- package/.output/server/_ssr/{field-DUwSBic5.mjs → field-yKSsJRQo.mjs} +2 -2
- package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-BJTufthT.mjs} +2 -2
- package/.output/server/_ssr/{input-group-BHI0ziHT.mjs → input-group-DlSVwRKN.mjs} +1 -1
- package/.output/server/_ssr/{insights-DVvFyEOH.mjs → insights-D1hSSSnf.mjs} +5 -5
- package/.output/server/_ssr/{insights-BGzKbtLf.mjs → insights-DmskI16o.mjs} +28 -27
- package/.output/server/_ssr/{insights-api-Bw_ZEDUY.mjs → insights-api-BedUQeHn.mjs} +5 -5
- package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-Bz3sWNZm.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-DNQ9qVVf.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-rpc-BuRU2I5g.mjs → insights-failures-rpc-pyvkJiMW.mjs} +11 -11
- package/.output/server/_ssr/{insights-DF0SkYDy.mjs → insights-oydyzlp4.mjs} +2 -2
- package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-DOkpqnQ8.mjs} +1 -1
- package/.output/server/_ssr/{insights-recovery-rpc-CsWe72mW.mjs → insights-recovery-rpc-C8oSWMSL.mjs} +7 -7
- package/.output/server/_ssr/{insights-rpc-CD5VaLy2.mjs → insights-rpc-Bt3dM8UW.mjs} +4 -4
- package/.output/server/_ssr/{insights-search-C3R6mzW-.mjs → insights-search-CH_Q2pPQ.mjs} +4 -4
- package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-4KDIN3Kg.mjs} +1 -1
- package/.output/server/_ssr/{insights-usage-rpc-Bbg14JFS.mjs → insights-usage-rpc-CTZ63vhq.mjs} +7 -7
- package/.output/server/_ssr/{insights-usage-rpc-Duqu3q-H.mjs → insights-usage-rpc-CTt1yIIY.mjs} +4 -4
- package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-DmQdJZqT.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-HZrwJteU.mjs → insights_.distribution-CxB6jrKu.mjs} +5 -5
- package/.output/server/_ssr/{insights_.distribution-DH_9B5XU.mjs → insights_.distribution-DG4pvrB8.mjs} +16 -15
- package/.output/server/_ssr/{insights_.distribution-DIA0Gi7f.mjs → insights_.distribution-DS8Dc6_5.mjs} +2 -2
- package/.output/server/_ssr/{installations-SuuoQ-xH.mjs → installations-BgVrlTdW.mjs} +12 -12
- package/.output/server/_ssr/{installations-Ct7njvit.mjs → installations-ChOjrcPZ.mjs} +4 -4
- package/.output/server/_ssr/{installations-D-O92-Nr.mjs → installations-_PSpNZM6.mjs} +2 -2
- package/.output/server/_ssr/{listReleases-D_GY00SQ.mjs → listReleases-CQEceg8j.mjs} +1 -1
- package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
- package/.output/server/_ssr/native-artifact-H1MDP0Jz.mjs +593 -0
- package/.output/server/_ssr/native-builds-CHOxmjmm.mjs +548 -0
- package/.output/server/_ssr/{native-builds-DhXL5zf_.mjs → native-builds-CWA9Y__P.mjs} +58 -20
- package/.output/server/_ssr/{native-builds-DhVG-4du.mjs → native-builds-DqJ41IA-.mjs} +3 -3
- package/.output/server/_ssr/{native-builds_._buildId-dDLkfNFZ.mjs → native-builds_._buildId-Bb-mVQnh.mjs} +3 -3
- package/.output/server/_ssr/native-builds_._buildId-C1lMUjaj.mjs +1294 -0
- package/.output/server/_ssr/nativeBuildDevice-Dn16gNmZ.mjs +230 -0
- package/.output/server/_ssr/nativeBuildDownloadLink-wyUj7Oyi.mjs +96 -0
- package/.output/server/_ssr/nativeBuildInstall-i5f-2-qd.mjs +203 -0
- package/.output/server/_ssr/nativeBuildQr-P9qKcI7l.mjs +115 -0
- package/.output/server/_ssr/{nativeBuilds-B_7BPjt_.mjs → nativeBuilds-ByQdDnHG.mjs} +61 -29
- package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-CX7wutet.mjs} +6 -6
- package/.output/server/_ssr/publicConsoleBase-3IHSHvqd.mjs +27 -0
- package/.output/server/_ssr/{qr-code-C7kNRIDX.mjs → qr-code-pENFuyy9.mjs} +1 -1
- package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-C7sUFDwa.mjs} +2 -2
- package/.output/server/_ssr/{release-adoption-rpc-Cc2AJ-yS.mjs → release-adoption-rpc-BUPLEJYw.mjs} +9 -9
- package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-LLYlRnUB.mjs} +4 -4
- package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-D9dAMI17.mjs} +3 -3
- package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-EPhok_Py.mjs} +1 -1
- package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-DaZ7ifUF.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-BYyQFBG8.mjs → remote-config-BMdoiYuB.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-CTZ_zxNg.mjs → remote-config-DvM_KKl6.mjs} +20 -19
- package/.output/server/_ssr/{remote-config-DvMHWxja.mjs → remote-config-XmtJFUKn.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-DibiGuw7.mjs → remote-config-rpc-DFRsn7f8.mjs} +5 -5
- package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
- package/.output/server/_ssr/{router-Da0sMVN2.mjs → router-KM_t8okm.mjs} +103 -52
- package/.output/server/_ssr/{routes-CHl0_VK3.mjs → routes-Beckr53C.mjs} +260 -383
- package/.output/server/_ssr/{routes-FE2SJgBr.mjs → routes-MrSajWvI.mjs} +14 -18
- package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-BsTTLV-B.mjs} +4 -4
- package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-3oDJJFWa.mjs} +1 -1
- package/.output/server/_ssr/{schema-migration-rpc-Bh7oEZEG.mjs → schema-migration-rpc-BqNKpOrg.mjs} +4 -4
- package/.output/server/_ssr/{select-BhPCNdHx.mjs → select-CUCLbsEW.mjs} +2 -2
- package/.output/server/_ssr/{server-BjkQXKZR.mjs → server-DpE_idiZ.mjs} +6 -6
- package/.output/server/_ssr/{sidebar-B7OTpt-8.mjs → sidebar-xs2XmYh9.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{start-BvDsQehg.mjs → start-C0XSSCq4.mjs} +2 -2
- package/.output/server/_ssr/{switch-CIkMfFrN.mjs → switch-CWp_RWCq.mjs} +2 -2
- package/.output/server/_ssr/{table-BIzH49v-.mjs → table-DtPvFx_v.mjs} +1 -1
- package/.output/server/_ssr/{tabs-WDYlrXEm.mjs → tabs-D0Jdy8v4.mjs} +2 -2
- package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-DPYzv9bE.mjs} +3 -3
- package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-CmHbryZT.mjs} +2 -2
- package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-NmbU0MD2.mjs} +1 -1
- package/.output/server/_tanstack-start-manifest_v-AYP07Vaf.mjs +194 -0
- package/.output/server/index.mjs +318 -297
- package/package.json +7 -7
- package/src/components/ChannelBadge.tsx +9 -9
- package/src/components/DataTable.tsx +303 -0
- package/src/components/HashValueDisplay.tsx +6 -3
- package/src/components/PlatformIcon.tsx +10 -0
- package/src/components/RelativeTime.tsx +31 -0
- package/src/components/TargetDisplay.tsx +69 -0
- package/src/components/features/channels/ChannelManagementDialog.tsx +3 -8
- package/src/components/features/insights/ReleaseActivity.tsx +1 -1
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +108 -58
- package/src/components/features/native-builds/CommitLink.tsx +1 -1
- package/src/components/features/native-builds/ImportBuild.tsx +1 -1
- package/src/components/features/native-builds/InstallCard.tsx +246 -46
- package/src/components/features/native-builds/IosInstall.tsx +300 -0
- package/src/components/features/native-builds/NativeBuildDetailPage.tsx +4 -1
- package/src/components/features/native-builds/NativeBuildsPage.tsx +63 -76
- package/src/components/features/native-builds/NativeBuildsTable.tsx +436 -315
- package/src/components/features/native-builds/PatchesCard.tsx +3 -2
- package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +4 -4
- package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
- package/src/components/features/native-builds/ShortHash.tsx +1 -1
- package/src/components/features/native-builds/StoreSubmission.tsx +12 -3
- package/src/lib/api-rpc.ts +55 -6
- package/src/lib/api.ts +85 -12
- package/src/lib/native-builds.ts +95 -17
- package/src/lib/server/local-console.ts +1 -1
- package/src/lib/server/nativeBuildDevice.ts +274 -0
- package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
- package/src/lib/server/nativeBuildInstall.ts +355 -0
- package/src/lib/server/nativeBuildQr.ts +114 -24
- package/src/lib/server/nativeBuilds.ts +87 -33
- package/src/lib/server/plistText.ts +17 -0
- package/src/lib/server/publicConsoleBase.ts +17 -0
- package/src/routeTree.gen.ts +114 -0
- package/src/routes/[_]hot-updater/native-builds/$buildId/device-response.ts +17 -0
- package/src/routes/[_]hot-updater/native-builds/$buildId/device.ts +17 -0
- package/src/routes/[_]hot-updater/native-builds/$buildId/device[.]mobileconfig.ts +17 -0
- package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
- package/src/routes/[_]hot-updater/native-builds/preview-qr.ts +14 -0
- package/src/routes/api/native-builds/$buildId/download.ts +22 -1
- package/src/routes/index.tsx +290 -429
- package/src/styles.css +16 -0
- package/.output/public/assets/EventDetails-Dl2RvPAk.js +0 -1
- package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +0 -1
- package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
- package/.output/public/assets/StoreSubmission-ViTkW4eJ.js +0 -1
- package/.output/public/assets/api-P2g8dCNg.js +0 -1
- package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
- package/.output/public/assets/api-keys-FueRkF9q.js +0 -1
- package/.output/public/assets/badge-DWFcDWho.js +0 -1
- package/.output/public/assets/download-Cf24LBde.js +0 -1
- package/.output/public/assets/insights-B-0odqpt.js +0 -42
- package/.output/public/assets/insights-BSVGfxSL.js +0 -1
- package/.output/public/assets/insights-NK5B6ReS.js +0 -2
- package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
- package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
- package/.output/public/assets/insights_.distribution-dvk6vYDM.js +0 -1
- package/.output/public/assets/installations-BWxczZ2t.js +0 -1
- package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
- package/.output/public/assets/native-builds-BOC71grI.js +0 -1
- package/.output/public/assets/native-builds-D6rldpSh.js +0 -2
- package/.output/public/assets/native-builds-DAy2678K.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
- package/.output/public/assets/remote-config-B7ujqhLa.js +0 -6
- package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
- package/.output/public/assets/routes-BDdBIxYS.js +0 -1
- package/.output/public/assets/routes-CCD33Azv.js +0 -2
- package/.output/public/assets/styles-uK-0vUMk.css +0 -2
- package/.output/public/assets/valueToPercent-BLwGy_xK.js +0 -1
- package/.output/server/_ssr/RolloutPercentageBadge-BpI_iTsm.mjs +0 -21
- package/.output/server/_ssr/StoreSubmission-CXMFpHyp.mjs +0 -139
- package/.output/server/_ssr/native-builds-bTSKsvYp.mjs +0 -510
- package/.output/server/_ssr/native-builds_._buildId-D20tGR3l.mjs +0 -813
- package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
- package/.output/server/_tanstack-start-manifest_v-B5nsO5L4.mjs +0 -184
- /package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-Ckb5GMhh.js} +0 -0
- /package/.output/public/assets/{alert-dialog-BqYScr9y.js → alert-dialog-DiRLrFVe.js} +0 -0
- /package/.output/public/assets/{dialog-CNUPxNxH.js → dialog-CLIaC82_.js} +0 -0
- /package/.output/public/assets/{dist-CPlO6ko9.js → dist-Bf1BPKMs.js} +0 -0
- /package/.output/public/assets/{empty-B3Uwdd6k.js → empty-Bhlj8PEo.js} +0 -0
- /package/.output/public/assets/{field-D-2-mnNh.js → field-q4sTYzNU.js} +0 -0
- /package/.output/public/assets/{history-DqHlgSuV.js → history-DakJoeSM.js} +0 -0
- /package/.output/public/assets/{input-group-D3OUBk4n.js → input-group-D_NfhUbX.js} +0 -0
- /package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-DzBe6DHr.js} +0 -0
- /package/.output/public/assets/{list--NIee1FZ.js → list-B6GeoQ_b.js} +0 -0
- /package/.output/public/assets/{plus-BReVKct-.js → plus-BVhOauU3.js} +0 -0
- /package/.output/public/assets/{refresh-cw-B9HHjLej.js → refresh-cw-C-tvoCcE.js} +0 -0
- /package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-DvyxGIsm.js} +0 -0
- /package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-Clk5xTeE.js} +0 -0
- /package/.output/public/assets/{search-BCel4Oy6.js → search-nnvSOTEB.js} +0 -0
- /package/.output/public/assets/{smartphone-CMaSy_ir.js → smartphone-r0rRdPas.js} +0 -0
- /package/.output/public/assets/{switch-BpdiHL_t.js → switch-CP6GsHmN.js} +0 -0
- /package/.output/public/assets/{table-Bpy3SvSo.js → table-TUtVz-2l.js} +0 -0
- /package/.output/public/assets/{tabs-Xmt7tZeG.js → tabs-CP3CSmtI.js} +0 -0
- /package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-Bt0YXG26.js} +0 -0
- /package/.output/public/assets/{uuidv7-zXMtwR9Q.js → uuidv7-cI6C63Fm.js} +0 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { w as isUUIDv7 } from "./dist-B6-irDRA.mjs";
|
|
2
|
+
import { d as nativeBuildDeviceAddCommand, f as nativeBuildDeviceProfilePath, n as IOS_UDID_STORAGE_KEY, t as IOS_UDID_PATTERN } from "./native-builds-CWA9Y__P.mjs";
|
|
3
|
+
import { i as readProfileServiceUdid } from "./native-artifact-H1MDP0Jz.mjs";
|
|
4
|
+
import { n as publicConsoleBase, t as escapePlistText } from "./publicConsoleBase-3IHSHvqd.mjs";
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/nativeBuildDevice-Dn16gNmZ.js
|
|
6
|
+
/** The most a Profile Service answer holds: a plist and a device's certificates. */
|
|
7
|
+
var MAX_RESPONSE_BYTES = 64 * 1024;
|
|
8
|
+
var devicePagePath = (id) => `/_hot-updater/native-builds/${encodeURIComponent(id)}/device`;
|
|
9
|
+
var deviceResponsePath = (id) => `${devicePagePath(id)}-response`;
|
|
10
|
+
var refusal = (status, message) => new Response(message, {
|
|
11
|
+
status,
|
|
12
|
+
headers: {
|
|
13
|
+
"cache-control": "no-store",
|
|
14
|
+
"content-type": "text/plain; charset=utf-8"
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
var methodRefusal = (allow) => {
|
|
18
|
+
const response = refusal(405, "Method Not Allowed");
|
|
19
|
+
response.headers.set("allow", allow);
|
|
20
|
+
return response;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The profile an iPhone installs to report its UDID, at `/_hot-updater/
|
|
24
|
+
* native-builds/<id>/device.mobileconfig`, without a session, since Settings
|
|
25
|
+
* has none. It reads nothing, so it says nothing about the build: the ID is only
|
|
26
|
+
* where the callback's page links back to. It asks for the UDID alone, and iOS
|
|
27
|
+
* keeps no profile afterwards. Anyone can fetch it and learn only their own UDID.
|
|
28
|
+
*
|
|
29
|
+
* - 400: the ID isn't a UUIDv7, or the Console isn't on HTTPS, which iOS needs;
|
|
30
|
+
* - 405: a method other than GET or HEAD.
|
|
31
|
+
*/
|
|
32
|
+
var serveDeviceProfile = (request, id) => {
|
|
33
|
+
if (request.method !== "GET" && request.method !== "HEAD") return methodRefusal("GET, HEAD");
|
|
34
|
+
if (!isUUIDv7(id)) return refusal(400, "Open this from a build's page.");
|
|
35
|
+
const base = publicConsoleBase(request, nativeBuildDeviceProfilePath(id));
|
|
36
|
+
if (!base.startsWith("https://")) return refusal(400, "An iPhone needs this Console on HTTPS with a certificate it trusts.");
|
|
37
|
+
const host = new URL(base).host;
|
|
38
|
+
const profile = `<?xml version="1.0" encoding="UTF-8"?>
|
|
39
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
40
|
+
<plist version="1.0">
|
|
41
|
+
<dict>
|
|
42
|
+
<key>PayloadContent</key>
|
|
43
|
+
<dict>
|
|
44
|
+
<key>URL</key>
|
|
45
|
+
<string>${escapePlistText(`${base}${deviceResponsePath(id)}`)}</string>
|
|
46
|
+
<key>DeviceAttributes</key>
|
|
47
|
+
<array>
|
|
48
|
+
<string>UDID</string>
|
|
49
|
+
</array>
|
|
50
|
+
<key>Challenge</key>
|
|
51
|
+
<string>hot-updater</string>
|
|
52
|
+
</dict>
|
|
53
|
+
<key>PayloadOrganization</key>
|
|
54
|
+
<string>Hot Updater</string>
|
|
55
|
+
<key>PayloadDisplayName</key>
|
|
56
|
+
<string>Check this iPhone</string>
|
|
57
|
+
<key>PayloadDescription</key>
|
|
58
|
+
<string>Sends this iPhone's ID (UDID) to ${escapePlistText(host)}, to check whether a build can install on it. Nothing stays installed.</string>
|
|
59
|
+
<key>PayloadIdentifier</key>
|
|
60
|
+
<string>dev.hot-updater.check-this-iphone</string>
|
|
61
|
+
<key>PayloadUUID</key>
|
|
62
|
+
<string>6D3F4C0E-52C4-4C8B-9E0A-7B1E5A0C2F11</string>
|
|
63
|
+
<key>PayloadVersion</key>
|
|
64
|
+
<integer>1</integer>
|
|
65
|
+
<key>PayloadType</key>
|
|
66
|
+
<string>Profile Service</string>
|
|
67
|
+
</dict>
|
|
68
|
+
</plist>
|
|
69
|
+
`;
|
|
70
|
+
return new Response(request.method === "HEAD" ? null : profile, { headers: {
|
|
71
|
+
"cache-control": "no-store",
|
|
72
|
+
"content-type": "application/x-apple-aspen-config",
|
|
73
|
+
"x-content-type-options": "nosniff"
|
|
74
|
+
} });
|
|
75
|
+
};
|
|
76
|
+
/** A request's body, or null past `limit` bytes, which are never buffered. */
|
|
77
|
+
var readBoundedBody = async (request, limit) => {
|
|
78
|
+
if (Number(request.headers.get("content-length") ?? 0) > limit) {
|
|
79
|
+
await request.body?.cancel().catch(() => {});
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const reader = request.body?.getReader();
|
|
83
|
+
if (reader === void 0) return new Uint8Array(0);
|
|
84
|
+
const body = new Uint8Array(limit);
|
|
85
|
+
let length = 0;
|
|
86
|
+
try {
|
|
87
|
+
for (;;) {
|
|
88
|
+
const { done, value } = await reader.read();
|
|
89
|
+
if (done) return body.subarray(0, length);
|
|
90
|
+
if (length + value.byteLength > limit) return null;
|
|
91
|
+
body.set(value, length);
|
|
92
|
+
length += value.byteLength;
|
|
93
|
+
}
|
|
94
|
+
} finally {
|
|
95
|
+
await reader.cancel().catch(() => {});
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Where iOS posts the device's answer, without a session, since Settings has
|
|
100
|
+
* none. It takes the UDID's text and verifies no signature: nothing automated
|
|
101
|
+
* trusts it, and a forged one only shows on the forger's own screen. A maintainer
|
|
102
|
+
* decides whether a UDID is registered. It reads and stores nothing, and sends
|
|
103
|
+
* the UDID in a fragment, which never reaches a server again. iOS asks for a 301.
|
|
104
|
+
*
|
|
105
|
+
* - 400: no well-formed UDID;
|
|
106
|
+
* - 405: a method other than POST;
|
|
107
|
+
* - 413: a body over 64 KiB.
|
|
108
|
+
*/
|
|
109
|
+
var receiveDeviceResponse = async (request, id) => {
|
|
110
|
+
if (request.method !== "POST") return methodRefusal("POST");
|
|
111
|
+
if (!isUUIDv7(id)) return refusal(400, "Open this from a build's page.");
|
|
112
|
+
const body = await readBoundedBody(request, MAX_RESPONSE_BYTES);
|
|
113
|
+
if (body === null) return refusal(413, "This answer is too large.");
|
|
114
|
+
const udid = readProfileServiceUdid(body);
|
|
115
|
+
if (udid === null) return refusal(400, "This answer has no device ID.");
|
|
116
|
+
const base = publicConsoleBase(request, deviceResponsePath(id));
|
|
117
|
+
return new Response(null, {
|
|
118
|
+
status: 301,
|
|
119
|
+
headers: {
|
|
120
|
+
"cache-control": "no-store",
|
|
121
|
+
location: `${base}${devicePagePath(id)}#udid=${encodeURIComponent(udid)}`
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
var page = ({ buildId, nonce }) => {
|
|
126
|
+
const [commandStart, commandEnd] = nativeBuildDeviceAddCommand("UDID").split("UDID");
|
|
127
|
+
const script = JSON.stringify({
|
|
128
|
+
pattern: IOS_UDID_PATTERN.source,
|
|
129
|
+
key: IOS_UDID_STORAGE_KEY,
|
|
130
|
+
commandStart,
|
|
131
|
+
commandEnd
|
|
132
|
+
}).replaceAll("<", "\\u003c");
|
|
133
|
+
return `<!doctype html>
|
|
134
|
+
<html lang="en">
|
|
135
|
+
<head>
|
|
136
|
+
<meta charset="utf-8">
|
|
137
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
138
|
+
<meta name="color-scheme" content="dark light">
|
|
139
|
+
<meta name="robots" content="noindex">
|
|
140
|
+
<title>This iPhone's ID</title>
|
|
141
|
+
<style nonce="${nonce}">
|
|
142
|
+
:root { color-scheme: dark light; --bg: oklch(1 0 0); --fg: oklch(0.147 0.004 49.25); --muted: oklch(0.553 0.013 58.071); --line: oklch(0.923 0.003 48.717); --panel: oklch(0.97 0.001 106.424); --primary: oklch(0.646 0.222 41.116); --on-primary: oklch(0.98 0.016 73.684); --radius: 0.45rem; }
|
|
143
|
+
@media (prefers-color-scheme: dark) { :root { --bg: oklch(0.147 0.004 49.25); --fg: oklch(0.985 0.001 106.423); --muted: oklch(0.709 0.01 56.259); --line: oklch(1 0 0 / 10%); --panel: oklch(0.268 0.007 34.298); --primary: oklch(0.705 0.213 47.604); } }
|
|
144
|
+
* { box-sizing: border-box; }
|
|
145
|
+
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 -apple-system, system-ui, sans-serif; }
|
|
146
|
+
main { display: flex; flex-direction: column; gap: 16px; max-width: 32rem; margin: 0 auto; padding: 32px 16px calc(32px + env(safe-area-inset-bottom)); }
|
|
147
|
+
h1 { margin: 0; font-size: 22px; line-height: 1.25; }
|
|
148
|
+
p { margin: 0; color: var(--muted); font-size: 15px; }
|
|
149
|
+
.warning { color: var(--fg); font-weight: 600; }
|
|
150
|
+
code { display: block; padding: 12px; overflow-wrap: anywhere; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font: 14px/1.4 ui-monospace, Menlo, monospace; }
|
|
151
|
+
button, a.action { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 8px 16px; border-radius: var(--radius); font: inherit; font-weight: 600; text-decoration: none; }
|
|
152
|
+
button { border: 0; background: var(--primary); color: var(--on-primary); }
|
|
153
|
+
a.action { border: 1px solid var(--line); color: var(--fg); }
|
|
154
|
+
[hidden] { display: none; }
|
|
155
|
+
</style>
|
|
156
|
+
</head>
|
|
157
|
+
<body>
|
|
158
|
+
<main>
|
|
159
|
+
<div id="found" hidden>
|
|
160
|
+
<h1>This iPhone's ID</h1>
|
|
161
|
+
</div>
|
|
162
|
+
<div id="missing" hidden>
|
|
163
|
+
<h1>No iPhone ID here</h1>
|
|
164
|
+
</div>
|
|
165
|
+
<code id="udid" hidden translate="no"></code>
|
|
166
|
+
<p class="warning" id="warning" hidden>Send this only if this is your iPhone.</p>
|
|
167
|
+
<p id="next" hidden>A maintainer runs this command to register the iPhone, then rebuilds. Open the build again afterwards to install it.</p>
|
|
168
|
+
<code id="command" hidden translate="no"></code>
|
|
169
|
+
<button id="copy" type="button" hidden>Copy command</button>
|
|
170
|
+
<p id="retry" hidden>Open the build's page in Safari and check this iPhone again. On a Mac, Finder shows an iPhone's ID, which a maintainer can register with native-build devices add.</p>
|
|
171
|
+
<a class="action" href="../../../native-builds/${encodeURIComponent(buildId)}">Back to the build</a>
|
|
172
|
+
</main>
|
|
173
|
+
<script nonce="${nonce}">
|
|
174
|
+
(function () {
|
|
175
|
+
var c = ${script};
|
|
176
|
+
var pattern = new RegExp(c.pattern, "i");
|
|
177
|
+
var show = function (id) { document.getElementById(id).hidden = false; };
|
|
178
|
+
var stored = function () { try { return localStorage.getItem(c.key); } catch (e) { return null; } };
|
|
179
|
+
var fromLink = new URLSearchParams(location.hash.slice(1)).get("udid");
|
|
180
|
+
var udid = fromLink && pattern.test(fromLink) ? fromLink : stored();
|
|
181
|
+
if (location.hash) history.replaceState(null, "", location.pathname);
|
|
182
|
+
if (!udid || !pattern.test(udid)) { show("missing"); show("retry"); return; }
|
|
183
|
+
try { localStorage.setItem(c.key, udid); } catch (e) {}
|
|
184
|
+
var command = c.commandStart + udid + c.commandEnd;
|
|
185
|
+
document.getElementById("udid").textContent = udid;
|
|
186
|
+
document.getElementById("command").textContent = command;
|
|
187
|
+
["found", "udid", "warning", "next", "command", "copy"].forEach(show);
|
|
188
|
+
var button = document.getElementById("copy");
|
|
189
|
+
button.addEventListener("click", function () {
|
|
190
|
+
navigator.clipboard.writeText(command).then(function () {
|
|
191
|
+
button.textContent = "Copied";
|
|
192
|
+
}, function () {
|
|
193
|
+
getSelection().selectAllChildren(document.getElementById("command"));
|
|
194
|
+
button.textContent = "Select and copy above";
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
})();
|
|
198
|
+
<\/script>
|
|
199
|
+
</body>
|
|
200
|
+
</html>
|
|
201
|
+
`;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* The page the callback lands on: the UDID, one command and a copy button,
|
|
205
|
+
* kept in the phone's `localStorage` for the build's page. It takes no session
|
|
206
|
+
* and reads nothing, so Safari with no Console sign-in shows it too, and it
|
|
207
|
+
* works however long a rebuild takes. The UDID comes from the fragment and stays
|
|
208
|
+
* in the browser; a crafted link can show any text, which is why the page asks
|
|
209
|
+
* who the iPhone belongs to.
|
|
210
|
+
*
|
|
211
|
+
* - 400: the ID isn't a UUIDv7;
|
|
212
|
+
* - 405: a method other than GET or HEAD.
|
|
213
|
+
*/
|
|
214
|
+
var serveDevicePage = (request, id) => {
|
|
215
|
+
if (request.method !== "GET" && request.method !== "HEAD") return methodRefusal("GET, HEAD");
|
|
216
|
+
if (!isUUIDv7(id)) return refusal(400, "Open this from a build's page.");
|
|
217
|
+
const nonce = btoa(String.fromCharCode(...crypto.getRandomValues(new Uint8Array(16))));
|
|
218
|
+
return new Response(request.method === "HEAD" ? null : page({
|
|
219
|
+
buildId: id,
|
|
220
|
+
nonce
|
|
221
|
+
}), { headers: {
|
|
222
|
+
"cache-control": "no-store",
|
|
223
|
+
"content-security-policy": `default-src 'none'; script-src 'nonce-${nonce}'; style-src 'nonce-${nonce}'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'`,
|
|
224
|
+
"content-type": "text/html; charset=utf-8",
|
|
225
|
+
"referrer-policy": "no-referrer",
|
|
226
|
+
"x-content-type-options": "nosniff"
|
|
227
|
+
} });
|
|
228
|
+
};
|
|
229
|
+
//#endregion
|
|
230
|
+
export { receiveDeviceResponse, serveDevicePage, serveDeviceProfile };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { i as getRequest } from "./server-DpE_idiZ.mjs";
|
|
2
|
+
import { n as sameSecret } from "./local-console-Dtxlsav0.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/nativeBuildDownloadLink-wyUj7Oyi.js
|
|
4
|
+
/**
|
|
5
|
+
* How long a signed download link works. A link holds its own expiry and the
|
|
6
|
+
* Console stores nothing, so a new one never ends an older one.
|
|
7
|
+
*/
|
|
8
|
+
var NATIVE_BUILD_DOWNLOAD_LINK_TTL_MS = 720 * 60 * 60 * 1e3;
|
|
9
|
+
/**
|
|
10
|
+
* The Console's secret, which a hosted Console already has for its sessions:
|
|
11
|
+
* a host's guide lists it. Links sign with a key derived from it, so a link
|
|
12
|
+
* is never a signature the sessions could take, and rotating it ends both.
|
|
13
|
+
*/
|
|
14
|
+
var CONSOLE_SECRET_ENV = "BETTER_AUTH_SECRET";
|
|
15
|
+
/** The length the Console's deployment guide asks of the secret. */
|
|
16
|
+
var MIN_SECRET_LENGTH = 32;
|
|
17
|
+
/** Separates the links' key from every other use of the Console's secret. */
|
|
18
|
+
var KEY_CONTEXT = "hot-updater/console/signed-links/v1";
|
|
19
|
+
/** What a link grants, so a token for anything else never verifies as one. */
|
|
20
|
+
var DOWNLOAD_PURPOSE = "native-build-download";
|
|
21
|
+
/** `<expiry in Unix seconds>.<HMAC-SHA256, base64url>`. */
|
|
22
|
+
var TOKEN_PATTERN = /^(\d{1,12})\.([A-Za-z0-9_-]{43})$/u;
|
|
23
|
+
var encoder = new TextEncoder();
|
|
24
|
+
var hmac = async (key, message) => new Uint8Array(await crypto.subtle.sign("HMAC", await crypto.subtle.importKey("raw", key, {
|
|
25
|
+
name: "HMAC",
|
|
26
|
+
hash: "SHA-256"
|
|
27
|
+
}, false, ["sign"]), encoder.encode(message)));
|
|
28
|
+
var base64Url = (bytes) => btoa(String.fromCharCode(...bytes)).replaceAll("+", "-").replaceAll("/", "_").replaceAll("=", "");
|
|
29
|
+
var signatureOf = async (secret, buildId, expiresAtSeconds) => base64Url(await hmac(await hmac(encoder.encode(secret), KEY_CONTEXT), `${DOWNLOAD_PURPOSE}\n${buildId}\n${expiresAtSeconds}`));
|
|
30
|
+
/**
|
|
31
|
+
* The Console's secret from the host's environment, or undefined without one
|
|
32
|
+
* long enough to sign with. A Worker's secrets come with the request.
|
|
33
|
+
*/
|
|
34
|
+
var readConsoleSecret = (request) => {
|
|
35
|
+
const { runtime } = request;
|
|
36
|
+
const value = runtime?.cloudflare?.env?.["BETTER_AUTH_SECRET"] ?? (typeof process === "undefined" ? void 0 : process.env["BETTER_AUTH_SECRET"]);
|
|
37
|
+
const secret = typeof value === "string" ? value.trim() : "";
|
|
38
|
+
return secret.length >= MIN_SECRET_LENGTH ? secret : void 0;
|
|
39
|
+
};
|
|
40
|
+
/** A token that lets its bearer download one build until `expiresAtMs`. */
|
|
41
|
+
var createNativeBuildDownloadToken = async (secret, buildId, expiresAtMs) => {
|
|
42
|
+
const expiresAtSeconds = String(Math.floor(expiresAtMs / 1e3));
|
|
43
|
+
return `${expiresAtSeconds}.${await signatureOf(secret, buildId, expiresAtSeconds)}`;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Whether a token lets its bearer download `buildId` now. The expiry counts
|
|
47
|
+
* only under a signature that holds, so `expired` says nothing to a forger.
|
|
48
|
+
*/
|
|
49
|
+
var verifyNativeBuildDownloadToken = async (secret, buildId, token, now = Date.now()) => {
|
|
50
|
+
const match = TOKEN_PATTERN.exec(token);
|
|
51
|
+
if (match === null) return "invalid";
|
|
52
|
+
const [, expiresAtSeconds, signature] = match;
|
|
53
|
+
if (!sameSecret(signature, await signatureOf(secret, buildId, expiresAtSeconds))) return "invalid";
|
|
54
|
+
return now >= Number(expiresAtSeconds) * 1e3 ? "expired" : "valid";
|
|
55
|
+
};
|
|
56
|
+
var refusal = (message) => new Response(message, {
|
|
57
|
+
status: 403,
|
|
58
|
+
headers: {
|
|
59
|
+
"cache-control": "no-store",
|
|
60
|
+
"content-type": "text/plain; charset=utf-8"
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* The 403 for a download link's token, or undefined when it lets its bearer
|
|
65
|
+
* download `buildId`. The answer never repeats the token.
|
|
66
|
+
*/
|
|
67
|
+
var refuseNativeBuildDownloadToken = async (request, buildId, token) => {
|
|
68
|
+
const secret = readConsoleSecret(request);
|
|
69
|
+
if (secret === void 0) return refusal(`This Console can't check download links. Set ${CONSOLE_SECRET_ENV} on it.`);
|
|
70
|
+
switch (await verifyNativeBuildDownloadToken(secret, buildId, token)) {
|
|
71
|
+
case "valid": return;
|
|
72
|
+
case "expired": return refusal("This download link has expired. Open the build's Console page for a new one.");
|
|
73
|
+
case "invalid": return refusal("This download link isn't valid. Open the build's Console page for a new one.");
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* A new signed download link's token, for a caller the Console already let
|
|
78
|
+
* in. It reads nothing and stores nothing.
|
|
79
|
+
*/
|
|
80
|
+
var issueNativeBuildDownloadLink = async (buildId, request = getRequest(), now = Date.now(), ttlMs = NATIVE_BUILD_DOWNLOAD_LINK_TTL_MS) => {
|
|
81
|
+
const { default: localConsoleGuard } = await import("./request-guard-BPLyogIN.mjs");
|
|
82
|
+
if (localConsoleGuard !== void 0) return { status: "local-console" };
|
|
83
|
+
const secret = readConsoleSecret(request);
|
|
84
|
+
if (secret === void 0) return {
|
|
85
|
+
status: "no-secret",
|
|
86
|
+
secretName: CONSOLE_SECRET_ENV
|
|
87
|
+
};
|
|
88
|
+
const expiresAt = now + ttlMs;
|
|
89
|
+
return {
|
|
90
|
+
status: "issued",
|
|
91
|
+
token: await createNativeBuildDownloadToken(secret, buildId, expiresAt),
|
|
92
|
+
expiresAt: new Date(expiresAt).toISOString()
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
export { issueNativeBuildDownloadLink, refuseNativeBuildDownloadToken };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { p as nativeBuildDownloadPath, r as NATIVE_BUILD_INSTALL_LINK_TTL_MS, v as nativeBuildManifestPath } from "./native-builds-CWA9Y__P.mjs";
|
|
2
|
+
import { n as normalizeIosUdid, r as readIpaInstallInfo } from "./native-artifact-H1MDP0Jz.mjs";
|
|
3
|
+
import { n as publicConsoleBase, t as escapePlistText } from "./publicConsoleBase-3IHSHvqd.mjs";
|
|
4
|
+
import { issueNativeBuildDownloadLink, refuseNativeBuildDownloadToken } from "./nativeBuildDownloadLink-wyUj7Oyi.mjs";
|
|
5
|
+
import { nativeBuildArtifactUrl } from "./nativeBuilds-ByQdDnHG.mjs";
|
|
6
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/nativeBuildInstall-i5f-2-qd.js
|
|
7
|
+
var KiB = 1024;
|
|
8
|
+
var MiB = 1024 * KiB;
|
|
9
|
+
/**
|
|
10
|
+
* What one request asks for at least: a zip entry's local header and, for
|
|
11
|
+
* something the size of a profile, its data, so reading one takes one request.
|
|
12
|
+
*/
|
|
13
|
+
var READ_AHEAD_BYTES = 64 * KiB;
|
|
14
|
+
/** How many requests' bytes stay at hand: the archive's tail, and its entries. */
|
|
15
|
+
var KEPT_BLOCKS = 4;
|
|
16
|
+
/** The most one IPA's reading downloads: a directory and a few small files. */
|
|
17
|
+
var MAX_BYTES = 16 * MiB;
|
|
18
|
+
/** The most requests one IPA's reading makes, past a dozen extensions' profiles. */
|
|
19
|
+
var MAX_REQUESTS = 24;
|
|
20
|
+
var REQUEST_TIMEOUT_MS = 15e3;
|
|
21
|
+
/** Why a remote artifact can't be read in parts. */
|
|
22
|
+
var RangeSourceError = class extends Error {
|
|
23
|
+
name = "RangeSourceError";
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The bytes of `url` by HTTP Range requests, without ever downloading the
|
|
27
|
+
* file: a server that answers a Range request with the whole file (200) is
|
|
28
|
+
* cut off at once, as is one that sends more than it was asked for. Reading
|
|
29
|
+
* stops at `MAX_BYTES` and `MAX_REQUESTS`.
|
|
30
|
+
*/
|
|
31
|
+
var httpRangeSource = ({ url, size, fetch = globalThis.fetch }) => {
|
|
32
|
+
const blocks = [];
|
|
33
|
+
let requests = 0;
|
|
34
|
+
let downloaded = 0;
|
|
35
|
+
const request = async (start, end) => {
|
|
36
|
+
if (requests === MAX_REQUESTS) throw new RangeSourceError("Reading the artifact took too many requests.");
|
|
37
|
+
const length = end - start;
|
|
38
|
+
if (downloaded + length > MAX_BYTES) throw new RangeSourceError("Reading the artifact would download too much.");
|
|
39
|
+
requests += 1;
|
|
40
|
+
const response = await fetch(url, {
|
|
41
|
+
headers: {
|
|
42
|
+
range: `bytes=${start}-${end - 1}`,
|
|
43
|
+
"accept-encoding": "identity"
|
|
44
|
+
},
|
|
45
|
+
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
|
|
46
|
+
});
|
|
47
|
+
const contentRange = /^bytes (\d+)-(\d+)\/(\d+|\*)$/u.exec(response.headers.get("content-range") ?? "");
|
|
48
|
+
if (response.status !== 206 || Number(contentRange?.[1]) !== start || Number(contentRange?.[2]) !== end - 1 || contentRange?.[3] !== "*" && Number(contentRange?.[3]) !== size || response.body === null) {
|
|
49
|
+
await response.body?.cancel().catch(() => {});
|
|
50
|
+
throw new RangeSourceError(`The storage answered ${response.status} to a Range request.`);
|
|
51
|
+
}
|
|
52
|
+
const bytes = new Uint8Array(length);
|
|
53
|
+
const reader = response.body.getReader();
|
|
54
|
+
let written = 0;
|
|
55
|
+
try {
|
|
56
|
+
for (;;) {
|
|
57
|
+
const { done, value } = await reader.read();
|
|
58
|
+
if (done) break;
|
|
59
|
+
if (written + value.byteLength > length) throw new RangeSourceError("The storage sent more than it was asked.");
|
|
60
|
+
bytes.set(value, written);
|
|
61
|
+
written += value.byteLength;
|
|
62
|
+
}
|
|
63
|
+
} finally {
|
|
64
|
+
await reader.cancel().catch(() => {});
|
|
65
|
+
}
|
|
66
|
+
if (written !== length) throw new RangeSourceError("The storage sent less than it was asked.");
|
|
67
|
+
downloaded += length;
|
|
68
|
+
return bytes;
|
|
69
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
size,
|
|
72
|
+
async read(offset, length) {
|
|
73
|
+
const end = Math.min(size, offset + length);
|
|
74
|
+
if (offset >= end) return new Uint8Array(0);
|
|
75
|
+
for (const block of blocks) if (block.start <= offset && end <= block.start + block.bytes.length) return block.bytes.subarray(offset - block.start, end - block.start);
|
|
76
|
+
const bytes = await request(offset, Math.min(size, Math.max(end, offset + READ_AHEAD_BYTES)));
|
|
77
|
+
blocks.push({
|
|
78
|
+
start: offset,
|
|
79
|
+
bytes
|
|
80
|
+
});
|
|
81
|
+
if (blocks.length > KEPT_BLOCKS) blocks.splice(1, 1);
|
|
82
|
+
return bytes.subarray(0, end - offset);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* What an IPA in storage installs as, or null when that can't be read in parts:
|
|
88
|
+
* a storage with no HTTPS download URL, one that ignores Range requests, or an
|
|
89
|
+
* artifact that isn't what it should be. It reads only the storage, and never
|
|
90
|
+
* logs the URL, which may be signed.
|
|
91
|
+
*/
|
|
92
|
+
var readNativeBuildInstallInfo = async (build, storage, fetch = globalThis.fetch) => {
|
|
93
|
+
if (build.artifact_kind !== "ipa") return null;
|
|
94
|
+
try {
|
|
95
|
+
const url = await nativeBuildArtifactUrl(build, storage);
|
|
96
|
+
if (url === null || new URL(url).protocol !== "https:") return null;
|
|
97
|
+
return await readIpaInstallInfo(httpRangeSource({
|
|
98
|
+
url,
|
|
99
|
+
size: build.byte_size,
|
|
100
|
+
fetch
|
|
101
|
+
}));
|
|
102
|
+
} catch (error) {
|
|
103
|
+
console.warn(`Installation details unavailable: ${error instanceof Error ? error.message : String(error)}`);
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
var isExpired = ({ expiresAtMs }, now) => expiresAtMs !== null && expiresAtMs <= now;
|
|
108
|
+
/**
|
|
109
|
+
* What an iPhone can do with a build, for a caller the Console already let in:
|
|
110
|
+
* one read of the build's row, and the IPA's few parts from storage. App Store
|
|
111
|
+
* Connect isn't asked, so this says what the IPA's bytes allow, which is what
|
|
112
|
+
* iOS enforces; registering a device changes nothing until a new IPA has it.
|
|
113
|
+
*/
|
|
114
|
+
var checkNativeBuildInstall = async (id, udid, { core, storage }, { request, now = Date.now(), fetch = globalThis.fetch } = {}) => {
|
|
115
|
+
const build = await core.getNativeBuild(id);
|
|
116
|
+
if (build === null) return { status: "unavailable" };
|
|
117
|
+
const info = await readNativeBuildInstallInfo(build, storage, fetch);
|
|
118
|
+
if (info === null) return { status: "unavailable" };
|
|
119
|
+
if (info.distribution === "store") return { status: "store" };
|
|
120
|
+
const expiresAt = info.expiresAtMs === null ? null : new Date(info.expiresAtMs).toISOString();
|
|
121
|
+
if (expiresAt !== null && isExpired(info, now)) return {
|
|
122
|
+
status: "expired",
|
|
123
|
+
expiresAt
|
|
124
|
+
};
|
|
125
|
+
const key = udid === void 0 ? null : normalizeIosUdid(udid);
|
|
126
|
+
return {
|
|
127
|
+
status: "installable",
|
|
128
|
+
device: key === null ? "unknown" : info.distribution === "enterprise" || info.devices.includes(key) ? "included" : "not-included",
|
|
129
|
+
expiresAt,
|
|
130
|
+
link: await issueNativeBuildDownloadLink(id, request, now, NATIVE_BUILD_INSTALL_LINK_TTL_MS)
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
var installRefusal = (status, message) => new Response(message, {
|
|
134
|
+
status,
|
|
135
|
+
headers: {
|
|
136
|
+
"cache-control": "no-store",
|
|
137
|
+
"content-type": "text/plain; charset=utf-8"
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
/**
|
|
141
|
+
* The manifest iOS installs a build from, at `/_hot-updater/native-builds/
|
|
142
|
+
* <id>/manifest.plist?t=<download token>`. The installer has no session, so the
|
|
143
|
+
* token is all it answers to, and it is checked before anything is read. It
|
|
144
|
+
* mints nothing: the manifest's IPA URL carries the same token.
|
|
145
|
+
*
|
|
146
|
+
* - 403: no token, or one that isn't this build's, or has expired;
|
|
147
|
+
* - 404: no such build, or not an IPA;
|
|
148
|
+
* - 409: an IPA that can't install this way (App Store export, expired profile);
|
|
149
|
+
* - 503: the IPA can't be read in parts.
|
|
150
|
+
*/
|
|
151
|
+
var serveNativeBuildManifest = async (request, id, loadDeps, fetch = globalThis.fetch) => {
|
|
152
|
+
const token = new URL(request.url).searchParams.get("t");
|
|
153
|
+
if (token === null) return installRefusal(403, "This install link isn't valid. Open the build's Console page for a new one.");
|
|
154
|
+
const refused = await refuseNativeBuildDownloadToken(request, id, token);
|
|
155
|
+
if (refused !== void 0) return refused;
|
|
156
|
+
const { core, storage } = await loadDeps();
|
|
157
|
+
const build = await core.getNativeBuild(id);
|
|
158
|
+
if (build === null || build.artifact_kind !== "ipa") return installRefusal(404, "This build has no IPA to install.");
|
|
159
|
+
const info = await readNativeBuildInstallInfo(build, storage, fetch);
|
|
160
|
+
if (info === null) return installRefusal(503, "Installation details unavailable.");
|
|
161
|
+
if (info.distribution === "store") return installRefusal(409, "This IPA is an App Store export, which installs through TestFlight.");
|
|
162
|
+
if (isExpired(info, Date.now())) return installRefusal(409, "This IPA's provisioning profile has expired. Rebuild it.");
|
|
163
|
+
const manifest = `<?xml version="1.0" encoding="UTF-8"?>
|
|
164
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
165
|
+
<plist version="1.0">
|
|
166
|
+
<dict>
|
|
167
|
+
<key>items</key>
|
|
168
|
+
<array>
|
|
169
|
+
<dict>
|
|
170
|
+
<key>assets</key>
|
|
171
|
+
<array>
|
|
172
|
+
<dict>
|
|
173
|
+
<key>kind</key>
|
|
174
|
+
<string>software-package</string>
|
|
175
|
+
<key>url</key>
|
|
176
|
+
<string>${escapePlistText(`${publicConsoleBase(request, nativeBuildManifestPath(id))}${nativeBuildDownloadPath(id)}?t=${encodeURIComponent(token)}`)}</string>
|
|
177
|
+
</dict>
|
|
178
|
+
</array>
|
|
179
|
+
<key>metadata</key>
|
|
180
|
+
<dict>
|
|
181
|
+
<key>bundle-identifier</key>
|
|
182
|
+
<string>${escapePlistText(info.bundleId)}</string>
|
|
183
|
+
<key>bundle-version</key>
|
|
184
|
+
<string>${escapePlistText(info.bundleVersion)}</string>
|
|
185
|
+
<key>kind</key>
|
|
186
|
+
<string>software</string>
|
|
187
|
+
<key>title</key>
|
|
188
|
+
<string>${escapePlistText(info.title)}</string>
|
|
189
|
+
</dict>
|
|
190
|
+
</dict>
|
|
191
|
+
</array>
|
|
192
|
+
</dict>
|
|
193
|
+
</plist>
|
|
194
|
+
`;
|
|
195
|
+
return new Response(manifest, { headers: {
|
|
196
|
+
"cache-control": "private, no-store",
|
|
197
|
+
"content-type": "text/xml; charset=utf-8",
|
|
198
|
+
"referrer-policy": "no-referrer",
|
|
199
|
+
"x-content-type-options": "nosniff"
|
|
200
|
+
} });
|
|
201
|
+
};
|
|
202
|
+
//#endregion
|
|
203
|
+
export { RangeSourceError, checkNativeBuildInstall, httpRangeSource, readNativeBuildInstallInfo, serveNativeBuildManifest };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { w as isUUIDv7 } from "./dist-B6-irDRA.mjs";
|
|
2
|
+
import { p as nativeBuildDownloadPath, u as nativeBuildDetailPath } from "./native-builds-CWA9Y__P.mjs";
|
|
3
|
+
import { t as qrCodePath } from "./qr-code-pENFuyy9.mjs";
|
|
4
|
+
import { t as createPreviewLink } from "./native-artifact-H1MDP0Jz.mjs";
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/nativeBuildQr-P9qKcI7l.js
|
|
6
|
+
/** The header that carries the download URL the QR code holds. */
|
|
7
|
+
var DOWNLOAD_URL_HEADER = "x-hot-updater-download-url";
|
|
8
|
+
/** The header that carries the sandbox link the QR code holds. */
|
|
9
|
+
var PREVIEW_LINK_HEADER = "x-hot-updater-preview-link";
|
|
10
|
+
/** The pixel size of one module, so the image is legible at its own size. */
|
|
11
|
+
var MODULE_PX = 6;
|
|
12
|
+
var refusal = (status, message) => new Response(message, {
|
|
13
|
+
status,
|
|
14
|
+
headers: {
|
|
15
|
+
"cache-control": "no-store",
|
|
16
|
+
"content-type": "text/plain; charset=utf-8"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
/** The image of a QR code, with the header that says what it holds. */
|
|
20
|
+
var qrImage = (request, value, header, cacheControl) => {
|
|
21
|
+
const { size, path } = qrCodePath(value);
|
|
22
|
+
const pixels = size * MODULE_PX;
|
|
23
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${pixels}" height="${pixels}" viewBox="0 0 ${size} ${size}" shape-rendering="crispEdges"><rect fill="#fff" width="${size}" height="${size}"/><path fill="#000" d="${path}"/></svg>`;
|
|
24
|
+
return new Response(request.method === "HEAD" ? null : svg, { headers: {
|
|
25
|
+
"cache-control": cacheControl,
|
|
26
|
+
"content-type": "image/svg+xml",
|
|
27
|
+
"content-security-policy": "default-src 'none'",
|
|
28
|
+
"x-content-type-options": "nosniff",
|
|
29
|
+
[header]: value
|
|
30
|
+
} });
|
|
31
|
+
};
|
|
32
|
+
var refuseMethod = (request) => {
|
|
33
|
+
if (request.method === "GET" || request.method === "HEAD") return null;
|
|
34
|
+
const response = refusal(405, "Method Not Allowed");
|
|
35
|
+
response.headers.set("allow", "GET, HEAD");
|
|
36
|
+
return response;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The URL of a native build's console download, under the console path the
|
|
40
|
+
* QR request came to: the console answers it with a fresh storage URL on
|
|
41
|
+
* each request, so it never expires.
|
|
42
|
+
*/
|
|
43
|
+
var nativeBuildDownloadUrl = (request, id, path = nativeBuildDownloadPath) => {
|
|
44
|
+
const url = new URL(request.url);
|
|
45
|
+
const base = url.pathname.endsWith("/_hot-updater/native-builds/qr") ? url.pathname.slice(0, -30) : "";
|
|
46
|
+
return `${url.origin}${base}${path(id)}`;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The QR code of a native build's download URL, `<console>/api/native-builds/
|
|
50
|
+
* <id>/download`, as an SVG image, served at
|
|
51
|
+
* `/_hot-updater/native-builds/qr?build=<id>` without a session: a pull
|
|
52
|
+
* request comment shows it, and GitHub fetches a comment's images
|
|
53
|
+
* anonymously. It reads nothing, no database and no storage, so it says
|
|
54
|
+
* nothing about whether the build exists; the download itself asks for the
|
|
55
|
+
* session. Anyone can ask for this image, so it never holds a signed link:
|
|
56
|
+
* those come only to a caller the console let in. The response's
|
|
57
|
+
* `x-hot-updater-download-url` header is the URL.
|
|
58
|
+
*
|
|
59
|
+
* With `target=page` the code holds the build's console page instead, where an
|
|
60
|
+
* iPhone checks whether the IPA includes it before anything downloads. The
|
|
61
|
+
* caller chooses, since telling an IPA from anything else would take a read.
|
|
62
|
+
*
|
|
63
|
+
* - 400: `build` is missing or not a UUIDv7;
|
|
64
|
+
* - 405: a method other than GET or HEAD.
|
|
65
|
+
*/
|
|
66
|
+
var serveNativeBuildQr = (request) => {
|
|
67
|
+
const refused = refuseMethod(request);
|
|
68
|
+
if (refused) return refused;
|
|
69
|
+
const { searchParams } = new URL(request.url);
|
|
70
|
+
const id = searchParams.get("build");
|
|
71
|
+
if (id === null || !isUUIDv7(id)) return refusal(400, "Pass ?build=<native build ID>.");
|
|
72
|
+
return qrImage(request, nativeBuildDownloadUrl(request, id, searchParams.get("target") === "page" ? nativeBuildDetailPath : nativeBuildDownloadPath), DOWNLOAD_URL_HEADER, "public, max-age=86400");
|
|
73
|
+
};
|
|
74
|
+
/** An app ID as `bundleIdentifier` and `packageName` hold one. */
|
|
75
|
+
var APP_ID = /^[A-Za-z][A-Za-z0-9._-]{0,254}$/;
|
|
76
|
+
/** A channel a pull request previews on, such as `pr-12` or `pr-12-tv`. */
|
|
77
|
+
var CHANNEL = /^[A-Za-z0-9._-]{1,128}$/;
|
|
78
|
+
/** A fingerprint hash: `@expo/fingerprint`'s SHA-1, or cli-tools' SHA-256. */
|
|
79
|
+
var FINGERPRINT = /^[a-f0-9]{40,64}$/;
|
|
80
|
+
/**
|
|
81
|
+
* The QR code of a sandbox preview link, `hu-sandbox-<app ID>://hot-updater/
|
|
82
|
+
* preview?channel=<channel>&fingerprint=<hash>`, as an SVG image, served at
|
|
83
|
+
* `/_hot-updater/native-builds/preview-qr?app=&channel=&fingerprint=` without a
|
|
84
|
+
* session, as a pull request comment shows it. The link holds no secret, this
|
|
85
|
+
* reads nothing, and it mints nothing. It takes the link's three parts rather
|
|
86
|
+
* than the link: each has a narrow alphabet, and `createPreviewLink` writes the
|
|
87
|
+
* rest, so no request gets any other text into a QR code. The response's
|
|
88
|
+
* `x-hot-updater-preview-link` header is the link.
|
|
89
|
+
*
|
|
90
|
+
* - 400: a part is missing or isn't what a sandbox build has;
|
|
91
|
+
* - 405: a method other than GET or HEAD.
|
|
92
|
+
*/
|
|
93
|
+
var serveSandboxPreviewQr = (request) => {
|
|
94
|
+
const refused = refuseMethod(request);
|
|
95
|
+
if (refused) return refused;
|
|
96
|
+
const query = new URL(request.url).searchParams;
|
|
97
|
+
const appId = query.get("app");
|
|
98
|
+
const channel = query.get("channel");
|
|
99
|
+
const fingerprintHash = query.get("fingerprint");
|
|
100
|
+
const usage = "Pass ?app=<app ID>&channel=<channel>&fingerprint=<hash>.";
|
|
101
|
+
if (appId === null || channel === null || fingerprintHash === null || !APP_ID.test(appId) || !CHANNEL.test(channel) || !FINGERPRINT.test(fingerprintHash)) return refusal(400, usage);
|
|
102
|
+
let link;
|
|
103
|
+
try {
|
|
104
|
+
link = createPreviewLink({
|
|
105
|
+
appId,
|
|
106
|
+
channel,
|
|
107
|
+
fingerprintHash
|
|
108
|
+
});
|
|
109
|
+
} catch {
|
|
110
|
+
return refusal(400, usage);
|
|
111
|
+
}
|
|
112
|
+
return qrImage(request, link, PREVIEW_LINK_HEADER, "public, max-age=86400");
|
|
113
|
+
};
|
|
114
|
+
//#endregion
|
|
115
|
+
export { serveNativeBuildQr, serveSandboxPreviewQr };
|