@hot-updater/console 1.2.0-rc.2 → 1.2.0-rc.20
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-DTYDM38B.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-CA0kGlEh.mjs} +2 -2
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-DFrogDwc.mjs → ConsoleFeatureUnavailable-CPXtj5iM.mjs} +7 -7
- package/.output/server/_ssr/{EventDetails-BOJR7vO-.mjs → EventDetails-HqLCY8fr.mjs} +8 -8
- package/.output/server/_ssr/{HashValueDisplay-d4OxpYG1.mjs → HashValueDisplay-Cm0TME9s.mjs} +6 -6
- package/.output/server/_ssr/{InsightsPageHeader-D_ON_oXO.mjs → InsightsPageHeader-C5zPO5UV.mjs} +8 -8
- package/.output/server/_ssr/{NotFoundPage-BJKqYxfO.mjs → NotFoundPage-B6lkMCZL.mjs} +2 -2
- package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-Cuhy0CIO.mjs} +12 -2
- package/.output/server/_ssr/RelativeTime-CH7AZeY_.mjs +209 -0
- package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-CQG5jqY-.mjs} +19 -3
- package/.output/server/_ssr/StoreSubmission-DVzs6Nyl.mjs +65 -0
- package/.output/server/_ssr/TargetDisplay-QRaZlmGC.mjs +100 -0
- package/.output/server/_ssr/{alert-dialog-BU7QeAL9.mjs → alert-dialog-iQioHwFW.mjs} +1 -1
- package/.output/server/_ssr/{api-Dn2NwWiq.mjs → api-D1RQfXCc.mjs} +99 -22
- package/.output/server/_ssr/{api-keys-D5rW-eAH.mjs → api-keys-C-aGylLh.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-Ckoc4av7.mjs → api-keys-DrIZkdQh.mjs} +10 -9
- package/.output/server/_ssr/{api-keys-rpc-Bf2x7mQb.mjs → api-keys-rpc-k5dAmAfj.mjs} +4 -4
- package/.output/server/_ssr/{api-rpc-Bg7CTu5A.mjs → api-rpc-CifgIAGx.mjs} +43 -18
- package/.output/server/_ssr/{auth-rpc-C41fl9Q5.mjs → auth-rpc-owQK39Uq.mjs} +5 -5
- package/.output/server/_ssr/{auth.server-Dfa8DroN.mjs → auth.server-DJVi8oWE.mjs} +165 -149
- package/.output/server/_ssr/{badge-B-YGm4ng.mjs → badge-CI3HXaiX.mjs} +2 -44
- package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-BGVvqWx7.mjs} +1 -1
- package/.output/server/_ssr/card-BFx4V7Oi.mjs +49 -0
- package/.output/server/_ssr/{config.server-DBX318ww.mjs → config.server-Be_iwIfs.mjs} +4 -4
- package/.output/server/_ssr/{console-access-CwSkUsOn.mjs → console-access--BE44gg5.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-B92Tkd-I.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-3bq2wS5U.mjs → console-features-rpc-CUNPQEb8.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-uvI4WgO6.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-CuGWZObY.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-BhFsCMog.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-DFKB3ocq.mjs} +1 -1
- package/.output/server/_ssr/{insights-DF0SkYDy.mjs → insights-C20r9u1W.mjs} +2 -2
- package/.output/server/_ssr/{insights-DVvFyEOH.mjs → insights-D4ZDmMz8.mjs} +5 -5
- package/.output/server/_ssr/{insights-BGzKbtLf.mjs → insights-DzSEAeQ3.mjs} +28 -27
- package/.output/server/_ssr/{insights-api-Bw_ZEDUY.mjs → insights-api-CbJZivUT.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-BP9iTzdb.mjs} +11 -11
- 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-Bcf1cQlj.mjs} +7 -7
- package/.output/server/_ssr/{insights-rpc-CD5VaLy2.mjs → insights-rpc-NKpFvHYb.mjs} +4 -4
- package/.output/server/_ssr/{insights-search-C3R6mzW-.mjs → insights-search-BCUMkmw-.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-DTEKbWnD.mjs} +7 -7
- package/.output/server/_ssr/{insights-usage-rpc-Duqu3q-H.mjs → insights-usage-rpc-Dn14pwSF.mjs} +4 -4
- package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-DmQdJZqT.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-DIA0Gi7f.mjs → insights_.distribution-DZr2GnxG.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-DH_9B5XU.mjs → insights_.distribution-JUKaiTBo.mjs} +16 -15
- package/.output/server/_ssr/{insights_.distribution-HZrwJteU.mjs → insights_.distribution-y17VBRCM.mjs} +5 -5
- package/.output/server/_ssr/{installations-SuuoQ-xH.mjs → installations-B0MTnKbz.mjs} +12 -12
- package/.output/server/_ssr/{installations-Ct7njvit.mjs → installations-bBoKWHfY.mjs} +4 -4
- package/.output/server/_ssr/{installations-D-O92-Nr.mjs → installations-nKYHU7Cw.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-B3B2HUeu.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-Cgj_KUG2.mjs} +3 -3
- package/.output/server/_ssr/{native-builds_._buildId-dDLkfNFZ.mjs → native-builds_._buildId-CBNMvWjM.mjs} +3 -3
- package/.output/server/_ssr/native-builds_._buildId-Fna85Z9b.mjs +1294 -0
- package/.output/server/_ssr/nativeBuildDevice-Dn16gNmZ.mjs +230 -0
- package/.output/server/_ssr/nativeBuildDownloadLink-CdTkZWfX.mjs +96 -0
- package/.output/server/_ssr/nativeBuildInstall-BRKqafos.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-C_VyJFU7.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-CTZ_zxNg.mjs → remote-config-CUEAdK4C.mjs} +20 -19
- package/.output/server/_ssr/{remote-config-DvMHWxja.mjs → remote-config-CpmDX9J1.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-BYyQFBG8.mjs → remote-config-DYyKkJSw.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-DibiGuw7.mjs → remote-config-rpc-CLrQKB7x.mjs} +5 -5
- package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
- package/.output/server/_ssr/{router-Da0sMVN2.mjs → router-D_EkvCZy.mjs} +103 -52
- package/.output/server/_ssr/{routes-CHl0_VK3.mjs → routes-Cd29G-My.mjs} +260 -383
- package/.output/server/_ssr/{routes-FE2SJgBr.mjs → routes-nG6l3orX.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-_tArX07K.mjs} +4 -4
- package/.output/server/_ssr/{select-BhPCNdHx.mjs → select-Dvp4b6e0.mjs} +2 -2
- package/.output/server/_ssr/{server-BjkQXKZR.mjs → server-DIO4VBjE.mjs} +6 -6
- package/.output/server/_ssr/{sidebar-B7OTpt-8.mjs → sidebar-Dm0O051V.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-Dtspx2CO.mjs} +2 -2
- package/.output/server/_ssr/{table-BIzH49v-.mjs → table-BmLgy9z-.mjs} +1 -1
- package/.output/server/_ssr/{tabs-WDYlrXEm.mjs → tabs-CpD9w0LY.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 +332 -311
- 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
|
@@ -124,8 +124,9 @@ export function PatchesCard({
|
|
|
124
124
|
<EmptyTitle>No patches from this build</EmptyTitle>
|
|
125
125
|
<EmptyDescription>
|
|
126
126
|
A deploy adds a patch from this build's bundle while it is its
|
|
127
|
-
scope's
|
|
128
|
-
|
|
127
|
+
scope's store build, or its newest build with none marked, and
|
|
128
|
+
the deploy config turns patches on, with{" "}
|
|
129
|
+
<code className="font-mono">patch</code> in{" "}
|
|
129
130
|
<code className="font-mono">hot-updater.config.ts</code>.
|
|
130
131
|
</EmptyDescription>
|
|
131
132
|
</EmptyHeader>
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
} from "@/lib/native-builds";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* The native build a release's
|
|
16
|
-
* a patch from its built-in bundle: the
|
|
17
|
-
*
|
|
18
|
-
* so it shows none and reads nothing.
|
|
15
|
+
* The native build new deploys to a release's scope patch from, and whether
|
|
16
|
+
* this bundle has a patch from its built-in bundle: the scope's store build,
|
|
17
|
+
* or with none its newest, in two reads at most. A release of an app version
|
|
18
|
+
* range targets many builds, so it shows none and reads nothing.
|
|
19
19
|
*/
|
|
20
20
|
export function ReleaseNativeBuildLink({
|
|
21
21
|
release,
|
|
@@ -25,6 +25,9 @@ import {
|
|
|
25
25
|
} from "@/components/ui/table";
|
|
26
26
|
import { formatByteSize } from "@/lib/native-builds";
|
|
27
27
|
import type { NativeBuildDetail } from "@/lib/server/nativeBuilds";
|
|
28
|
+
import { shellQuote } from "@/lib/shell";
|
|
29
|
+
|
|
30
|
+
import { CopyableText } from "./CopyableText";
|
|
28
31
|
|
|
29
32
|
/** How the first OTA to a bundle downloads on this build. */
|
|
30
33
|
export type FirstDownload =
|
|
@@ -86,7 +89,27 @@ export function ServedNowCard({
|
|
|
86
89
|
}: {
|
|
87
90
|
readonly detail: NativeBuildDetail;
|
|
88
91
|
}) {
|
|
89
|
-
const { servedNow, patches, catalogScopeKey } = detail;
|
|
92
|
+
const { build, channel, servedNow, patches, catalogScopeKey } = detail;
|
|
93
|
+
// A hosted Console runs no diff, so a marked build whose first OTA has no
|
|
94
|
+
// patch from it gets the command that adds one. The first OTA is the newest
|
|
95
|
+
// release that serves anyone: one at 0% with no cohort serves no install.
|
|
96
|
+
const firstOta = servedNow.find(
|
|
97
|
+
({ rolloutCohortCount, targetCohorts }) =>
|
|
98
|
+
rolloutCohortCount > 0 || targetCohorts.length > 0,
|
|
99
|
+
)?.bundleId;
|
|
100
|
+
const missingPatch =
|
|
101
|
+
build.store_build === true &&
|
|
102
|
+
firstOta !== undefined &&
|
|
103
|
+
firstOta !== null &&
|
|
104
|
+
firstDownloadOf(patches, firstOta).kind === "full"
|
|
105
|
+
? [
|
|
106
|
+
"npx hot-updater patch",
|
|
107
|
+
`-p ${build.platform}`,
|
|
108
|
+
`-c ${shellQuote(channel)}`,
|
|
109
|
+
`-b ${shellQuote(firstOta)}`,
|
|
110
|
+
`--base-artifact-id ${shellQuote(build.min_bundle_id)}`,
|
|
111
|
+
].join(" ")
|
|
112
|
+
: null;
|
|
90
113
|
const scopeLink = (
|
|
91
114
|
<Link
|
|
92
115
|
className="inline-flex items-center gap-0.5 underline-offset-4 hover:underline"
|
|
@@ -202,6 +225,15 @@ export function ServedNowCard({
|
|
|
202
225
|
})}
|
|
203
226
|
</TableBody>
|
|
204
227
|
</Table>
|
|
228
|
+
{missingPatch === null ? null : (
|
|
229
|
+
<div className="flex flex-col gap-2 border-t px-4 py-3 text-xs">
|
|
230
|
+
<p>
|
|
231
|
+
The OTA fresh installs get first has no patch from this store
|
|
232
|
+
build, so they download all of it. Add one from your project:
|
|
233
|
+
</p>
|
|
234
|
+
<CopyableText label="the patch command" value={missingPatch} />
|
|
235
|
+
</div>
|
|
236
|
+
)}
|
|
205
237
|
<p className="border-t px-4 py-3 text-xs text-muted-foreground">
|
|
206
238
|
What the update check serves an install of this build now, newest
|
|
207
239
|
first: not the history. {scopeLink}
|
|
@@ -26,7 +26,7 @@ export function ShortHash({
|
|
|
26
26
|
return (
|
|
27
27
|
<button
|
|
28
28
|
aria-label={`Copy the ${label} ${value}`}
|
|
29
|
-
className="cursor-copy rounded-sm font-mono text-xs whitespace-nowrap tabular-nums underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none"
|
|
29
|
+
className="relative cursor-copy rounded-sm font-mono after:absolute after:-inset-x-2 after:-inset-y-4 sm:after:hidden text-xs whitespace-nowrap tabular-nums underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none"
|
|
30
30
|
onClick={(event) => {
|
|
31
31
|
event.stopPropagation();
|
|
32
32
|
void copy();
|
|
@@ -16,7 +16,7 @@ export const storeTrackLabels = {
|
|
|
16
16
|
string
|
|
17
17
|
>;
|
|
18
18
|
|
|
19
|
-
type Submitted = NativeBuildRow & {
|
|
19
|
+
export type Submitted = NativeBuildRow & {
|
|
20
20
|
readonly submitted_to: NonNullable<NativeBuildRow["submitted_to"]>;
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -39,9 +39,18 @@ function SubmittedAt({ ms }: { readonly ms: number | null }) {
|
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/** When the submission was recorded, as a tooltip says it. */
|
|
43
|
+
const submittedTitle = (build: Submitted) => {
|
|
44
|
+
const destination = `Submitted to ${storeTrackLabels[build.submitted_to]}`;
|
|
45
|
+
if (build.submitted_at_ms === null) return destination;
|
|
46
|
+
const date = dayjs(build.submitted_at_ms);
|
|
47
|
+
return `${destination} ${date.fromNow()}, ${date.format("YYYY-MM-DD HH:mm:ss")}`;
|
|
48
|
+
};
|
|
49
|
+
|
|
42
50
|
/**
|
|
43
51
|
* The store track a build went to, with the store's label of it, such as
|
|
44
|
-
* "TestFlight 1.7.0 (66)": none for a build no store took.
|
|
52
|
+
* "TestFlight 1.7.0 (66)": none for a build no store took. Its tooltip says
|
|
53
|
+
* when it was submitted.
|
|
45
54
|
*/
|
|
46
55
|
export function StoreSubmissionBadge({
|
|
47
56
|
build,
|
|
@@ -56,7 +65,7 @@ export function StoreSubmissionBadge({
|
|
|
56
65
|
<span className="inline-flex flex-wrap items-center gap-1.5">
|
|
57
66
|
<Badge
|
|
58
67
|
className="gap-1"
|
|
59
|
-
title={
|
|
68
|
+
title={submittedTitle(build)}
|
|
60
69
|
variant="secondary"
|
|
61
70
|
>
|
|
62
71
|
<Send aria-hidden="true" className="size-3" />
|
package/src/lib/api-rpc.ts
CHANGED
|
@@ -305,9 +305,9 @@ export const getNativeBuildPatches = createServerFn({ method: "GET" })
|
|
|
305
305
|
});
|
|
306
306
|
|
|
307
307
|
/**
|
|
308
|
-
* The
|
|
309
|
-
*
|
|
310
|
-
* reads nothing.
|
|
308
|
+
* The native build new deploys to a release's scope patch from: the scope's
|
|
309
|
+
* store build in one read, or with no mark its newest build in one more. A
|
|
310
|
+
* release of an app version range has no one build, and reads nothing.
|
|
311
311
|
*/
|
|
312
312
|
export const getReleaseNativeBuild = createServerFn({ method: "GET" })
|
|
313
313
|
.middleware([consoleAccess])
|
|
@@ -322,12 +322,30 @@ export const getReleaseNativeBuild = createServerFn({ method: "GET" })
|
|
|
322
322
|
.handler(async ({ data }) => {
|
|
323
323
|
const scope = releaseNativeBuildScope(data);
|
|
324
324
|
if (scope === null) return null;
|
|
325
|
-
|
|
325
|
+
const { core } = await prepare();
|
|
326
|
+
return (
|
|
327
|
+
(await core.findNativeBuild(scope, { storeBuild: true })) ??
|
|
328
|
+
core.findNativeBuild(scope)
|
|
329
|
+
);
|
|
326
330
|
});
|
|
327
331
|
|
|
328
332
|
/**
|
|
329
|
-
*
|
|
330
|
-
*
|
|
333
|
+
* Marks a build as what the store sells, replacing its scope's mark, or clears
|
|
334
|
+
* its mark: only for a signed-in caller. It creates no patch: a hosted Console
|
|
335
|
+
* doesn't run the diff.
|
|
336
|
+
*/
|
|
337
|
+
export const markNativeBuild = createServerFn({ method: "POST" })
|
|
338
|
+
.middleware([consoleAccess])
|
|
339
|
+
.validator((input: { id: string; storeBuild: boolean }) => input)
|
|
340
|
+
.handler(async ({ data }) =>
|
|
341
|
+
(await prepare()).core.markNativeBuild(data.id, {
|
|
342
|
+
storeBuild: data.storeBuild,
|
|
343
|
+
}),
|
|
344
|
+
);
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* The URL a phone downloads a build from when the Console can't sign a link,
|
|
348
|
+
* or null when the storage gives none: the storage's download URL, resolved
|
|
331
349
|
* again each time it is read, since it may expire.
|
|
332
350
|
*/
|
|
333
351
|
export const getNativeBuildDownloadUrl = createServerFn({ method: "GET" })
|
|
@@ -340,3 +358,34 @@ export const getNativeBuildDownloadUrl = createServerFn({ method: "GET" })
|
|
|
340
358
|
]);
|
|
341
359
|
return { url: await resolveNativeBuildDownloadUrl(data.id, deps) };
|
|
342
360
|
});
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* A new signed link to one build's download, which works without the
|
|
364
|
+
* console's sign-in until it expires: only for a signed-in caller.
|
|
365
|
+
*/
|
|
366
|
+
export const createNativeBuildDownloadLink = createServerFn({ method: "POST" })
|
|
367
|
+
.middleware([consoleAccess])
|
|
368
|
+
.validator((input: { id: string }) => input)
|
|
369
|
+
.handler(async ({ data }) => {
|
|
370
|
+
const { issueNativeBuildDownloadLink } =
|
|
371
|
+
await import("./server/nativeBuildDownloadLink");
|
|
372
|
+
return issueNativeBuildDownloadLink(data.id);
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* What an iPhone can do with one build: read from the IPA on demand, one row
|
|
377
|
+
* and a few storage requests, with the Install button's link when it can
|
|
378
|
+
* install. A POST, since it signs that link, and only for a signed-in caller.
|
|
379
|
+
*/
|
|
380
|
+
export const getNativeBuildInstallEligibility = createServerFn({
|
|
381
|
+
method: "POST",
|
|
382
|
+
})
|
|
383
|
+
.middleware([consoleAccess])
|
|
384
|
+
.validator((input: { id: string; udid?: string }) => input)
|
|
385
|
+
.handler(async ({ data }) => {
|
|
386
|
+
const [deps, { checkNativeBuildInstall }] = await Promise.all([
|
|
387
|
+
prepare(),
|
|
388
|
+
import("./server/nativeBuildInstall"),
|
|
389
|
+
]);
|
|
390
|
+
return checkNativeBuildInstall(data.id, data.udid, deps);
|
|
391
|
+
});
|
package/src/lib/api.ts
CHANGED
|
@@ -14,7 +14,10 @@ import {
|
|
|
14
14
|
getChannels,
|
|
15
15
|
getConfig,
|
|
16
16
|
getNativeBuildDetail,
|
|
17
|
+
markNativeBuild as markNativeBuildApi,
|
|
18
|
+
createNativeBuildDownloadLink,
|
|
17
19
|
getNativeBuildDownloadUrl,
|
|
20
|
+
getNativeBuildInstallEligibility,
|
|
18
21
|
getNativeBuildPatches,
|
|
19
22
|
getNativeBuilds,
|
|
20
23
|
getRelease,
|
|
@@ -54,6 +57,10 @@ export const queryKeys = {
|
|
|
54
57
|
["native-build-patches", minBundleId, page] as const,
|
|
55
58
|
nativeBuildDownloadUrl: (id: string) =>
|
|
56
59
|
["native-build-download-url", id] as const,
|
|
60
|
+
nativeBuildDownloadLink: (id: string) =>
|
|
61
|
+
["native-build-download-link", id] as const,
|
|
62
|
+
nativeBuildInstallEligibility: (id: string, udid: string | null) =>
|
|
63
|
+
["native-build-install-eligibility", id, udid] as const,
|
|
57
64
|
releaseNativeBuild: (release: ReleaseNativeBuildInput) =>
|
|
58
65
|
["release-native-build", release] as const,
|
|
59
66
|
};
|
|
@@ -78,11 +85,24 @@ export type ReleaseNativeBuildInput = {
|
|
|
78
85
|
};
|
|
79
86
|
|
|
80
87
|
/**
|
|
81
|
-
* How
|
|
82
|
-
*
|
|
83
|
-
*
|
|
88
|
+
* How long a storage download URL counts as fresh. Storage gives no lifetime
|
|
89
|
+
* with the URL, and adapters let it be configured down to minutes, so a
|
|
90
|
+
* person coming back to the page after this gets a new one.
|
|
84
91
|
*/
|
|
85
|
-
const
|
|
92
|
+
const DOWNLOAD_URL_STALE_MS = 60_000;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* How long a build page's signed link counts as fresh: far inside its 30 days,
|
|
96
|
+
* so a page left open never shows an expired one, and it costs one request
|
|
97
|
+
* a day.
|
|
98
|
+
*/
|
|
99
|
+
const DOWNLOAD_LINK_STALE_MS = 24 * 60 * 60 * 1000;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* How long an iPhone keeps a build's install details and Install link, which
|
|
103
|
+
* lasts an hour: past this, an open page reads and signs again.
|
|
104
|
+
*/
|
|
105
|
+
const INSTALL_ELIGIBILITY_STALE_MS = 30 * 60 * 1000;
|
|
86
106
|
|
|
87
107
|
export type ReleaseFilters = {
|
|
88
108
|
/** One of the filter sets the release indexes serve; none lists every release. */
|
|
@@ -230,18 +250,48 @@ export function useReleaseNativeBuildQuery(
|
|
|
230
250
|
}
|
|
231
251
|
|
|
232
252
|
/**
|
|
233
|
-
* The
|
|
234
|
-
*
|
|
253
|
+
* The signed link of a build's page, which its QR code, download button, and
|
|
254
|
+
* copyable link all use: one request when the page opens.
|
|
235
255
|
*/
|
|
236
|
-
export function
|
|
256
|
+
export function useNativeBuildDownloadLinkQuery(id: string) {
|
|
257
|
+
return useQuery({
|
|
258
|
+
queryKey: queryKeys.nativeBuildDownloadLink(id),
|
|
259
|
+
queryFn: () => createNativeBuildDownloadLink({ data: { id } }),
|
|
260
|
+
staleTime: DOWNLOAD_LINK_STALE_MS,
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* What this iPhone can do with a build, and the link Install opens: requested
|
|
266
|
+
* only by an iPhone on the page of an IPA, and again before that link, which
|
|
267
|
+
* lasts about an hour, runs out.
|
|
268
|
+
*/
|
|
269
|
+
export function useNativeBuildInstallEligibilityQuery(
|
|
270
|
+
id: string,
|
|
271
|
+
udid: string | null,
|
|
272
|
+
) {
|
|
273
|
+
return useQuery({
|
|
274
|
+
queryKey: queryKeys.nativeBuildInstallEligibility(id, udid),
|
|
275
|
+
queryFn: () =>
|
|
276
|
+
getNativeBuildInstallEligibility({
|
|
277
|
+
data: { id, ...(udid === null ? {} : { udid }) },
|
|
278
|
+
}),
|
|
279
|
+
staleTime: INSTALL_ELIGIBILITY_STALE_MS,
|
|
280
|
+
// A page left open never holds an expired link. It reads nothing while the
|
|
281
|
+
// tab is hidden, and coming back reads again once this has passed.
|
|
282
|
+
refetchInterval: INSTALL_ELIGIBILITY_STALE_MS,
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* The storage URL a phone downloads a build from when the Console can't sign
|
|
288
|
+
* a link: read once, and again only when someone comes back to the page.
|
|
289
|
+
*/
|
|
290
|
+
export function useNativeBuildDownloadUrlQuery(id: string) {
|
|
237
291
|
return useQuery({
|
|
238
292
|
queryKey: queryKeys.nativeBuildDownloadUrl(id),
|
|
239
293
|
queryFn: () => getNativeBuildDownloadUrl({ data: { id } }),
|
|
240
|
-
|
|
241
|
-
staleTime: DOWNLOAD_URL_REFRESH_MS,
|
|
242
|
-
// A storage without download URLs has none to refresh.
|
|
243
|
-
refetchInterval: (query) =>
|
|
244
|
-
query.state.data?.url === null ? false : DOWNLOAD_URL_REFRESH_MS,
|
|
294
|
+
staleTime: DOWNLOAD_URL_STALE_MS,
|
|
245
295
|
});
|
|
246
296
|
}
|
|
247
297
|
|
|
@@ -270,6 +320,29 @@ export function useDeleteChannelMutation() {
|
|
|
270
320
|
});
|
|
271
321
|
}
|
|
272
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Marks a build as its scope's store build, or clears it. The mark it replaced
|
|
325
|
+
* is on another build's page, in the list and in a release sheet's link, so
|
|
326
|
+
* they read again.
|
|
327
|
+
*/
|
|
328
|
+
export function useMarkNativeBuildMutation() {
|
|
329
|
+
const queryClient = useQueryClient();
|
|
330
|
+
return useMutation({
|
|
331
|
+
mutationFn: (input: { id: string; storeBuild: boolean }) =>
|
|
332
|
+
markNativeBuildApi({ data: input }),
|
|
333
|
+
onSettled: async () => {
|
|
334
|
+
await Promise.all([
|
|
335
|
+
queryClient.invalidateQueries({ queryKey: ["native-build"] }),
|
|
336
|
+
queryClient.invalidateQueries({
|
|
337
|
+
queryKey: queryKeys.nativeBuilds.all,
|
|
338
|
+
}),
|
|
339
|
+
// A release sheet links the build new deploys patch from.
|
|
340
|
+
queryClient.invalidateQueries({ queryKey: ["release-native-build"] }),
|
|
341
|
+
]);
|
|
342
|
+
},
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
|
|
273
346
|
export function useUpdateReleaseMutation() {
|
|
274
347
|
const queryClient = useQueryClient();
|
|
275
348
|
return useMutation({
|
package/src/lib/native-builds.ts
CHANGED
|
@@ -27,14 +27,104 @@ export const nativeBuildArtifacts: Record<
|
|
|
27
27
|
export const platformLabel = (platform: "ios" | "android") =>
|
|
28
28
|
platform === "ios" ? "iOS" : "Android";
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* A build as the CLI names it, such as `iOS 1.7.0 (66)`: the store's label
|
|
32
|
+
* when a store took it, else its app version and build number. Null when it
|
|
33
|
+
* reports neither, for the caller to name it another way.
|
|
34
|
+
*/
|
|
35
|
+
export const nativeBuildLabel = (
|
|
36
|
+
build: Pick<
|
|
37
|
+
NativeBuildRow,
|
|
38
|
+
"platform" | "submitted_version" | "app_version" | "build_number"
|
|
39
|
+
>,
|
|
40
|
+
): string | null => {
|
|
41
|
+
const label =
|
|
42
|
+
build.submitted_version ??
|
|
43
|
+
[
|
|
44
|
+
build.app_version,
|
|
45
|
+
build.build_number === null ? null : `(${build.build_number})`,
|
|
46
|
+
]
|
|
47
|
+
.filter((part) => part !== null)
|
|
48
|
+
.join(" ");
|
|
49
|
+
return label === "" ? null : `${platformLabel(build.platform)} ${label}`;
|
|
50
|
+
};
|
|
51
|
+
|
|
30
52
|
/** The console route that redirects to a build's artifact in storage. */
|
|
31
53
|
export const nativeBuildDownloadPath = (id: string) =>
|
|
32
54
|
`/api/native-builds/${encodeURIComponent(id)}/download`;
|
|
33
55
|
|
|
56
|
+
/** The query parameter of a signed download link: its token. */
|
|
57
|
+
export const NATIVE_BUILD_DOWNLOAD_TOKEN_PARAM = "t";
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* A build's signed download link, under the console's path on the page's own
|
|
61
|
+
* address, whatever the page, so it opens where the person who copied it
|
|
62
|
+
* reached the console.
|
|
63
|
+
*/
|
|
64
|
+
export const nativeBuildSignedDownloadUrl = (
|
|
65
|
+
location: { readonly origin: string; readonly pathname: string },
|
|
66
|
+
id: string,
|
|
67
|
+
token: string,
|
|
68
|
+
) => {
|
|
69
|
+
return `${location.origin}${consolePathOf(location, id)}${nativeBuildDownloadPath(id)}?${NATIVE_BUILD_DOWNLOAD_TOKEN_PARAM}=${encodeURIComponent(token)}`;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The console's own path, from a page of build `id` under it: empty at the
|
|
74
|
+
* root of its host.
|
|
75
|
+
*/
|
|
76
|
+
export const consolePathOf = (
|
|
77
|
+
location: { readonly pathname: string },
|
|
78
|
+
id: string,
|
|
79
|
+
) => {
|
|
80
|
+
const page = nativeBuildDetailPath(id);
|
|
81
|
+
return location.pathname.endsWith(page)
|
|
82
|
+
? location.pathname.slice(0, -page.length)
|
|
83
|
+
: "";
|
|
84
|
+
};
|
|
85
|
+
|
|
34
86
|
/** The console page of one native build. */
|
|
35
87
|
export const nativeBuildDetailPath = (id: string) =>
|
|
36
88
|
`/native-builds/${encodeURIComponent(id)}`;
|
|
37
89
|
|
|
90
|
+
/**
|
|
91
|
+
* How long an Install button's link works. It sits in the `itms-services` URL,
|
|
92
|
+
* Safari's history and the installer's logs, and its holder can fetch the IPA
|
|
93
|
+
* with every UDID in its profile, so it lasts only as long as an install takes.
|
|
94
|
+
*/
|
|
95
|
+
export const NATIVE_BUILD_INSTALL_LINK_TTL_MS = 60 * 60 * 1000;
|
|
96
|
+
|
|
97
|
+
/** The phone's own copy of its UDID, which the Console's server never keeps. */
|
|
98
|
+
export const IOS_UDID_STORAGE_KEY = "hot-updater-ios-udid";
|
|
99
|
+
|
|
100
|
+
/** A device's UDID: 40 hex digits, or 8 and 16 joined by a hyphen. */
|
|
101
|
+
export const IOS_UDID_PATTERN = /^(?:[0-9a-f]{40}|[0-9a-f]{8}-[0-9a-f]{16})$/iu;
|
|
102
|
+
|
|
103
|
+
/** The route that hands an iPhone the profile that reads its UDID. */
|
|
104
|
+
export const nativeBuildDeviceProfilePath = (id: string) =>
|
|
105
|
+
`/_hot-updater/native-builds/${encodeURIComponent(id)}/device.mobileconfig`;
|
|
106
|
+
|
|
107
|
+
/** The route of a build's install manifest, as `itms-services` opens it. */
|
|
108
|
+
export const nativeBuildManifestPath = (id: string) =>
|
|
109
|
+
`/_hot-updater/native-builds/${encodeURIComponent(id)}/manifest.plist`;
|
|
110
|
+
|
|
111
|
+
/** The command a maintainer runs to register an iPhone. */
|
|
112
|
+
export const nativeBuildDeviceAddCommand = (udid: string) =>
|
|
113
|
+
`npx hot-updater native-build devices add --udid ${udid} --name "Teammate's iPhone"`;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* What an iPhone opens to install a build: the manifest's URL, signed with a
|
|
117
|
+
* token that also lets the installer download the IPA.
|
|
118
|
+
*/
|
|
119
|
+
export const nativeBuildItmsUrl = (
|
|
120
|
+
location: { readonly origin: string; readonly pathname: string },
|
|
121
|
+
id: string,
|
|
122
|
+
token: string,
|
|
123
|
+
) => {
|
|
124
|
+
const manifest = `${location.origin}${consolePathOf(location, id)}${nativeBuildManifestPath(id)}?${NATIVE_BUILD_DOWNLOAD_TOKEN_PARAM}=${encodeURIComponent(token)}`;
|
|
125
|
+
return `itms-services://?action=download-manifest&url=${encodeURIComponent(manifest)}`;
|
|
126
|
+
};
|
|
127
|
+
|
|
38
128
|
const CHANNEL_ID_PREFIX = "channel:";
|
|
39
129
|
|
|
40
130
|
/** A channel row's ID, `channel:` and its channel key. */
|
|
@@ -128,12 +218,6 @@ export const nativeBuildFileName = (build: NativeBuildRow): string => {
|
|
|
128
218
|
}
|
|
129
219
|
};
|
|
130
220
|
|
|
131
|
-
/** What the build compiled in: its app version, or its fingerprint. */
|
|
132
|
-
export const nativeBuildTarget = (build: NativeBuildRow) =>
|
|
133
|
-
build.app_version === null
|
|
134
|
-
? { label: "Fingerprint", value: build.fingerprint_hash ?? "" }
|
|
135
|
-
: { label: "App version", value: build.app_version };
|
|
136
|
-
|
|
137
221
|
const UNITS = ["B", "KB", "MB", "GB"] as const;
|
|
138
222
|
|
|
139
223
|
/** A byte count in the largest unit that keeps it at or above 1. */
|
|
@@ -148,15 +232,9 @@ export const formatByteSize = (bytes: number): string => {
|
|
|
148
232
|
};
|
|
149
233
|
|
|
150
234
|
/**
|
|
151
|
-
* The
|
|
152
|
-
*
|
|
235
|
+
* The command that downloads a simulator build or an APK, installs it on the
|
|
236
|
+
* booted simulator or the connected device, and opens it, in the project with
|
|
237
|
+
* its `hot-updater.config.ts`.
|
|
153
238
|
*/
|
|
154
|
-
export const
|
|
155
|
-
|
|
156
|
-
const app = archive.replace(/\.zip$/, "");
|
|
157
|
-
return `unzip -o ${shellQuote(archive)} && xcrun simctl install booted ${shellQuote(app)}`;
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
/** The command that installs a downloaded APK on an Android device or emulator. */
|
|
161
|
-
export const apkInstallCommand = (build: NativeBuildRow) =>
|
|
162
|
-
`adb install -r ${shellQuote(nativeBuildFileName(build))}`;
|
|
239
|
+
export const nativeBuildInstallCommand = (build: NativeBuildRow) =>
|
|
240
|
+
`npx hot-updater native-build install ${shellQuote(build.id)}`;
|
|
@@ -25,7 +25,7 @@ export interface LocalConsoleGuardOptions {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/** Compares in time that depends only on the lengths. */
|
|
28
|
-
const sameSecret = (given: string, expected: string): boolean => {
|
|
28
|
+
export const sameSecret = (given: string, expected: string): boolean => {
|
|
29
29
|
if (given.length !== expected.length) return false;
|
|
30
30
|
let difference = 0;
|
|
31
31
|
for (let index = 0; index < given.length; index += 1) {
|