@hot-updater/console 1.2.0-rc.34 → 1.2.0-rc.35
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/{IosInstall-DsKczesK.js → IosInstall-CyBFeLGv.js} +1 -1
- package/.output/public/assets/{RelativeTime-CP7nosYx.js → RelativeTime-BvgGWfXM.js} +1 -1
- package/.output/public/assets/{RowReason-D7TZ2xwW.js → RowReason-7dIWPxhy.js} +1 -1
- package/.output/public/assets/{TargetDisplay-DzSkf5yP.js → TargetDisplay-CiU6ZsDl.js} +1 -1
- package/.output/public/assets/{index-CccnEzaa.js → index-CQDGK7Fg.js} +1 -1
- package/.output/public/assets/{native-builds-CXDwW54k.js → native-builds-CkaoQZVh.js} +2 -2
- package/.output/public/assets/{native-builds-7sC78eTq.js → native-builds-CtqBGw8a.js} +1 -1
- package/.output/public/assets/native-builds-hOC_V15R.js +1 -0
- package/.output/public/assets/{native-builds_._buildId-C7-yUwvH.js → native-builds_._buildId-CAnF7xPa.js} +2 -2
- package/.output/public/assets/native-builds_._buildId-DSbzVVI5.js +1 -0
- package/.output/public/assets/{native-builds_.devices-CQ_tB3SO.js → native-builds_.devices-CCmLAkXG.js} +1 -1
- package/.output/public/assets/{native-builds_.devices-C_YZoRxB.js → native-builds_.devices-D-8DVNRB.js} +2 -2
- package/.output/public/assets/{routes-Dj_ukxU_.js → routes-BMbT1Qdm.js} +2 -2
- package/.output/public/assets/{routes-DvCD6Kib.js → routes-D8reVBSx.js} +1 -1
- package/.output/server/{__23tanstack-start-server-fn-resolver-CUEijItf.mjs → __23tanstack-start-server-fn-resolver-BkmGm73S.mjs} +58 -58
- package/.output/server/_libs/_.mjs +1 -1
- package/.output/server/_libs/lucide-react.mjs +13 -1
- package/.output/server/_ssr/{BundleIdDisplay-C2Yhau3H.mjs → BundleIdDisplay-B90reloJ.mjs} +2 -2
- package/.output/server/_ssr/{ChannelBadge-BTUSgvbr.mjs → ChannelBadge-Dbmjpe-k.mjs} +3 -3
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-BDSJSs7U.mjs → ConsoleFeatureUnavailable-BX6uKVMH.mjs} +6 -6
- package/.output/server/_ssr/{EventDetails-wqpPsSDt.mjs → EventDetails-DiO0Njqj.mjs} +8 -8
- package/.output/server/_ssr/{HashValueDisplay-yosN9R32.mjs → HashValueDisplay-CicukMPP.mjs} +2 -2
- package/.output/server/_ssr/{InsightsPageHeader-DUvHESff.mjs → InsightsPageHeader-Bu88jQMD.mjs} +7 -7
- package/.output/server/_ssr/{IosInstall-DAZxDeBB.mjs → IosInstall-qOwrZE2v.mjs} +8 -8
- package/.output/server/_ssr/{NativeBuildsNav-JvQo5YkG.mjs → NativeBuildsNav-D20VrrNx.mjs} +3 -3
- package/.output/server/_ssr/{NotFoundPage-Z48ip8aB.mjs → NotFoundPage-_rXA1M7U.mjs} +2 -2
- package/.output/server/_ssr/{QrCode-NrGOfAPX.mjs → QrCode-DmEsrduv.mjs} +2 -2
- package/.output/server/_ssr/{RelativeTime-BiGH0j0S.mjs → RelativeTime-nw54zYAf.mjs} +4 -4
- package/.output/server/_ssr/{RolloutPercentageBadge-O0jbSRuI.mjs → RolloutPercentageBadge-DlRrxKdg.mjs} +3 -3
- package/.output/server/_ssr/{RowReason-DneEz--P.mjs → RowReason-D46cFeQO.mjs} +5 -5
- package/.output/server/_ssr/{SandboxBadge-ujAuQ6FN.mjs → SandboxBadge-DXM9RKlS.mjs} +2 -2
- package/.output/server/_ssr/{TargetDisplay-DFV5VpPn.mjs → TargetDisplay-CIU-9UqJ.mjs} +3 -3
- package/.output/server/_ssr/{alert-dialog-B2IG3q93.mjs → alert-dialog-CAb_7ZLL.mjs} +1 -1
- package/.output/server/_ssr/{api-keys-DpSj11mK.mjs → api-keys-CebW6Olm.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-ZufcGzhb.mjs → api-keys-DY3XY8gz.mjs} +10 -10
- package/.output/server/_ssr/{api-keys-rpc-N3V7gkvv.mjs → api-keys-rpc-D0rQ5vvV.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-DXvqIbGs.mjs → api-rpc-OTsF60lZ.mjs} +16 -16
- package/.output/server/_ssr/{api-CHpFJ_c4.mjs → api-v-mDt0z9.mjs} +7 -6
- package/.output/server/_ssr/{auth-rpc-Cx72ajwL.mjs → auth-rpc-Cga9IGo3.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-DT4SuI6u.mjs → auth.server-BVqW4FSJ.mjs} +25 -8
- package/.output/server/_ssr/{badge-DNrlMwwO.mjs → badge-Cy4z0pH1.mjs} +1 -1
- package/.output/server/_ssr/{bundleActivity-a-pEDiqu.mjs → bundleActivity-CjE9yslP.mjs} +1 -1
- package/.output/server/_ssr/{card-BSFwWT9T.mjs → card-UaEWfeRI.mjs} +1 -1
- package/.output/server/_ssr/{config.server-BEg-Ln3t.mjs → config.server-OJdvjs7r.mjs} +3 -3
- package/.output/server/_ssr/{console-access-CPYdc4mK.mjs → console-access-BM4TLI4g.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-D_KFX0JV.mjs → console-features-api-BmiP0aaD.mjs} +3 -3
- package/.output/server/_ssr/{console-features-rpc-CSogovr5.mjs → console-features-rpc-DPcZcHSW.mjs} +3 -3
- package/.output/server/_ssr/{deviceProfileToken-xzDLfE0T.mjs → deviceProfileToken-Eeltr-o0.mjs} +1 -1
- package/.output/server/_ssr/{dialog-BE-0BoPu.mjs → dialog-DWlZVg5y.mjs} +1 -1
- package/.output/server/_ssr/{downloadBundle-C1KOnpiF.mjs → downloadBundle-DLkb7A7E.mjs} +1 -1
- package/.output/server/_ssr/{empty-DVeNY_6z.mjs → empty-BPB71w6i.mjs} +2 -2
- package/.output/server/_ssr/{failureReports-BVufgM3l.mjs → failureReports-Bd7CaadE.mjs} +3 -3
- package/.output/server/_ssr/{field-C_NBjv_7.mjs → field-Bx8FKYuu.mjs} +2 -2
- package/.output/server/_ssr/{foldedPage-CUjJqtlF.mjs → foldedPage-DrxWt5XS.mjs} +1 -1
- package/.output/server/_ssr/{getBundleChildren-CnOf4Frp.mjs → getBundleChildren-DA9zbUBD.mjs} +1 -1
- package/.output/server/_ssr/{input-group-CGiryg7I.mjs → input-group-BzfbjZEj.mjs} +1 -1
- package/.output/server/_ssr/{insights-DNNsxJlD.mjs → insights-CBOTZToQ.mjs} +5 -5
- package/.output/server/_ssr/{insights-ECnoz9jp.mjs → insights-CFbpYpMy.mjs} +2 -2
- package/.output/server/_ssr/{insights-hDsGL-yq.mjs → insights-DaGJDccC.mjs} +25 -25
- package/.output/server/_ssr/{insights-api-DvbUK1vp.mjs → insights-api-b2wrxjFK.mjs} +5 -5
- package/.output/server/_ssr/{insights-errors-DwUaDs0Z.mjs → insights-errors-BrToSfI9.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-DGO2_3Vx.mjs → insights-failures-lmcxwKb3.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-rpc-DCu8iR4V.mjs → insights-failures-rpc-DLo_DEAi.mjs} +8 -8
- package/.output/server/_ssr/{insights-recovery-Cdg3Msrj.mjs → insights-recovery-Dhg3WGpC.mjs} +1 -1
- package/.output/server/_ssr/{insights-recovery-rpc-Bla1PuCq.mjs → insights-recovery-rpc-rpNu1Y8O.mjs} +5 -5
- package/.output/server/_ssr/{insights-rpc-ViJh0Q-s.mjs → insights-rpc-C2u-cHw2.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-DfEqsfAa.mjs → insights-search-BBOEGM68.mjs} +2 -2
- package/.output/server/_ssr/{insights-usage-BVm7CDw9.mjs → insights-usage-gW3T5N6N.mjs} +1 -1
- package/.output/server/_ssr/{insights-usage-rpc-DWSPBftd.mjs → insights-usage-rpc-6VNQ-ZVG.mjs} +5 -5
- package/.output/server/_ssr/{insights-usage-rpc-CLsYlcnO.mjs → insights-usage-rpc-BOfXGKaq.mjs} +4 -4
- package/.output/server/_ssr/{insightsUsage-lPKyRC2o.mjs → insightsUsage-B_7pM9wp.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-CbZmys6X.mjs → insights_.distribution-DrY2XK92.mjs} +14 -14
- package/.output/server/_ssr/{insights_.distribution-6t26Hce4.mjs → insights_.distribution-a1c7v5MP.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-Bj054JTo.mjs → insights_.distribution-kX-VlU6s.mjs} +5 -5
- package/.output/server/_ssr/{installations-CL-nVRbZ.mjs → installations-B5-uJU9A.mjs} +4 -4
- package/.output/server/_ssr/{installations-BOzetKfl.mjs → installations-BG3Mf569.mjs} +2 -2
- package/.output/server/_ssr/{installations-ARFvJMie.mjs → installations-uML6v5Uo.mjs} +12 -12
- package/.output/server/_ssr/{ios-devices-rpc-Xln3pLFJ.mjs → ios-devices-rpc-DqTNHbdN.mjs} +8 -8
- package/.output/server/_ssr/{iosDeviceCookie-BG4X3Kbt.mjs → iosDeviceCookie-DNXjIPeF.mjs} +5 -5
- package/.output/server/_ssr/{iosDeviceProfile-C8NvflH9.mjs → iosDeviceProfile-Cl32eCmk.mjs} +6 -6
- package/.output/server/_ssr/{iosDevices-Ck5ko5IX.mjs → iosDevices-BQ0RaNWs.mjs} +3 -3
- package/.output/server/_ssr/{listReleases-QF91GLE7.mjs → listReleases-B2Q9xwFv.mjs} +3 -3
- package/.output/server/_ssr/{native-artifact-BRNP_q-y.mjs → native-artifact-BurROe05.mjs} +43 -2
- package/.output/server/_ssr/{native-builds-B70NqL0z.mjs → native-builds-BBOmHVsH.mjs} +16 -16
- package/.output/server/_ssr/{native-builds-nRuXKypG.mjs → native-builds-Bnx0fVWs.mjs} +10 -5
- package/.output/server/_ssr/{native-builds-6Kq2Pamq.mjs → native-builds-BuYIAi2p.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_._buildId-B4uQUP7t.mjs → native-builds_._buildId-BUdWhQaH.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_._buildId-zbXBoGs8.mjs → native-builds_._buildId-DZSLPTef.mjs} +58 -43
- package/.output/server/_ssr/{native-builds_.devices-DcgdiEiK.mjs → native-builds_.devices-QK5Z4ACD.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_.devices-OLR3gTfc.mjs → native-builds_.devices-phkJgI1w.mjs} +17 -17
- package/.output/server/_ssr/{nativeBuildDownloadLink-DHsPiwsg.mjs → nativeBuildDownloadLink-BVtopV-4.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildInstall-DnpC3dUR.mjs → nativeBuildInstall-CVQLkYrX.mjs} +8 -8
- package/.output/server/_ssr/{nativeBuilds-DaF-TcfO.mjs → nativeBuilds-WKdqgemR.mjs} +7 -7
- package/.output/server/_ssr/{publicConsoleBase-wTKw3_iB.mjs → publicConsoleBase-C3sNbafy.mjs} +1 -1
- package/.output/server/_ssr/{release-adoption-gfhE5tz5.mjs → release-adoption-D2719HVh.mjs} +2 -2
- package/.output/server/_ssr/{release-adoption-rpc-C8oj79w3.mjs → release-adoption-rpc-DSlOL5v7.mjs} +7 -7
- package/.output/server/_ssr/{releaseAdoption-DfEYq7I4.mjs → releaseAdoption-CxGKmUXx.mjs} +4 -4
- package/.output/server/_ssr/{releaseReachability-Ch1JpJkY.mjs → releaseReachability-sWr0bLRk.mjs} +1 -1
- package/.output/server/_ssr/{remote-config-ClsnMl5Y.mjs → remote-config-9VJWDosm.mjs} +18 -18
- package/.output/server/_ssr/{remote-config-DOinV02U.mjs → remote-config-C4PKU5_z.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-MEFtxtmM.mjs → remote-config-DPHJyAHV.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-CCPIk5TC.mjs → remote-config-rpc-DxQ0jW52.mjs} +3 -3
- package/.output/server/_ssr/{router-jomm2ZkW.mjs → router-C1FV3SPc.mjs} +36 -36
- package/.output/server/_ssr/{routes-D0sAXxvj.mjs → routes-DDzrfaZr.mjs} +23 -23
- package/.output/server/_ssr/{routes-YuEmTB66.mjs → routes-Dg1cG9-d.mjs} +11 -11
- package/.output/server/_ssr/{schema-migration-rpc-CzOI4qIc.mjs → schema-migration-rpc-DdijfSjx.mjs} +3 -3
- package/.output/server/_ssr/{select-jxef2GHj.mjs → select-CQvxbdec.mjs} +2 -2
- package/.output/server/_ssr/{server-DowlVz8B.mjs → server-CGStUbwn.mjs} +3 -3
- package/.output/server/_ssr/{sidebar-DbK9IOE6.mjs → sidebar-zjbq02-o.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{switch-PuW4wKem.mjs → switch-_XoBaA1s.mjs} +2 -2
- package/.output/server/_ssr/{table-CTjtU7u0.mjs → table-FoAc6s3r.mjs} +1 -1
- package/.output/server/_ssr/{tabs-CYGM4B-P.mjs → tabs-BgUZHny1.mjs} +2 -2
- package/.output/server/_ssr/{updateFailures-BwDwIoNu.mjs → updateFailures-DGuFoK6A.mjs} +3 -3
- package/.output/server/{_tanstack-start-manifest_v-Dzfgn9EO.mjs → _tanstack-start-manifest_v-wLJ-tAN0.mjs} +22 -22
- package/.output/server/index.mjs +167 -167
- package/package.json +7 -7
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +21 -5
- package/src/components/features/native-builds/InstallCard.tsx +32 -24
- package/src/components/features/native-builds/IosInstall.tsx +3 -2
- package/src/components/features/native-builds/PatchesCard.tsx +28 -20
- package/src/lib/api-rpc.ts +2 -1
- package/src/lib/native-builds.ts +10 -3
- package/src/lib/server/nativeBuildInstall.ts +3 -1
- package/src/lib/server/nativeBuilds.ts +15 -8
- package/.output/public/assets/native-builds-BOSmoLed.js +0 -1
- package/.output/public/assets/native-builds_._buildId-u5dG7ej5.js +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/console",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.0-rc.
|
|
4
|
+
"version": "1.2.0-rc.35",
|
|
5
5
|
"files": [
|
|
6
6
|
".output",
|
|
7
7
|
"lib",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"tw-animate-css": "^1.4.0",
|
|
60
60
|
"uqr": "^0.1.3",
|
|
61
61
|
"verkit": "0.4.0",
|
|
62
|
-
"@hot-updater/
|
|
63
|
-
"@hot-updater/
|
|
64
|
-
"@hot-updater/
|
|
65
|
-
"@hot-updater/
|
|
62
|
+
"@hot-updater/server": "1.2.0-rc.35",
|
|
63
|
+
"@hot-updater/plugin-core": "1.2.0-rc.35",
|
|
64
|
+
"@hot-updater/bsdiff": "1.2.0-rc.35",
|
|
65
|
+
"@hot-updater/protocol": "1.2.0-rc.35"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@tanstack/devtools-vite": "^0.6.0",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"vite-tsconfig-paths": "^6.1.1",
|
|
87
87
|
"vitest": "4.1.4",
|
|
88
88
|
"web-vitals": "^5.1.0",
|
|
89
|
-
"@hot-updater/cli-tools": "1.2.0-rc.
|
|
90
|
-
"@hot-updater/mock": "1.2.0-rc.
|
|
89
|
+
"@hot-updater/cli-tools": "1.2.0-rc.35",
|
|
90
|
+
"@hot-updater/mock": "1.2.0-rc.35"
|
|
91
91
|
},
|
|
92
92
|
"description": "React Native OTA solution for self-hosted",
|
|
93
93
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Link } from "@tanstack/react-router";
|
|
2
|
-
import { ArrowUpRight, CircleCheck, History } from "lucide-react";
|
|
2
|
+
import { ArrowUpRight, CircleCheck, CircleSlash, History } from "lucide-react";
|
|
3
3
|
import { toast } from "sonner";
|
|
4
4
|
|
|
5
5
|
import { BundleIdDisplay } from "@/components/BundleIdDisplay";
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
nativeBuildArtifacts,
|
|
14
14
|
nativeBuildLabel,
|
|
15
15
|
platformLabel,
|
|
16
|
+
SANDBOX_NO_PATCH_BASE,
|
|
16
17
|
} from "@/lib/native-builds";
|
|
17
18
|
import type { NativeBuildDetail } from "@/lib/server/nativeBuilds";
|
|
18
19
|
|
|
@@ -73,10 +74,25 @@ function StoreBuildAction({ detail }: { readonly detail: NativeBuildDetail }) {
|
|
|
73
74
|
|
|
74
75
|
/**
|
|
75
76
|
* Which build new deploys patch from: this one, as the store build or as the
|
|
76
|
-
* newest with no mark, or another, which it links to.
|
|
77
|
+
* newest with no mark, or another, which it links to. A sandbox build is never
|
|
78
|
+
* one, whatever its scope holds.
|
|
77
79
|
*/
|
|
78
80
|
function BaselineStatus({ detail }: { readonly detail: NativeBuildDetail }) {
|
|
79
81
|
const { build, newestInScope, storeBuildInScope } = detail;
|
|
82
|
+
if (build.is_sandbox) {
|
|
83
|
+
return (
|
|
84
|
+
<div className="flex items-start gap-2 rounded-md border bg-muted/40 p-3 text-xs">
|
|
85
|
+
<CircleSlash
|
|
86
|
+
aria-hidden="true"
|
|
87
|
+
className="mt-0.5 size-3.5 shrink-0 text-muted-foreground"
|
|
88
|
+
/>
|
|
89
|
+
<p>
|
|
90
|
+
<span className="font-medium">No patch base.</span>{" "}
|
|
91
|
+
{SANDBOX_NO_PATCH_BASE}
|
|
92
|
+
</p>
|
|
93
|
+
</div>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
80
96
|
const base = storeBuildInScope ?? newestInScope;
|
|
81
97
|
if (base === null) return null;
|
|
82
98
|
const isBase = base.id === build.id;
|
|
@@ -204,9 +220,9 @@ export function BuiltInBundleCard({
|
|
|
204
220
|
</dl>
|
|
205
221
|
<BaselineStatus detail={detail} />
|
|
206
222
|
<p className="text-xs text-muted-foreground">
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
223
|
+
{build.is_sandbox
|
|
224
|
+
? "An install of this build runs this bundle until it opens an OTA."
|
|
225
|
+
: "A store or test install of this build runs this bundle until its first OTA. That OTA downloads as a patch from this bundle when one exists, and as the full bundle otherwise."}
|
|
210
226
|
</p>
|
|
211
227
|
</CardContent>
|
|
212
228
|
</Card>
|
|
@@ -30,25 +30,40 @@ import { IosInstall, useIosDevice } from "./IosInstall";
|
|
|
30
30
|
import { PLAY_TRACKS } from "./playTracks";
|
|
31
31
|
import { isSubmitted, type Submitted } from "./StoreSubmission";
|
|
32
32
|
|
|
33
|
+
const IPA_LIMIT =
|
|
34
|
+
"The .ipa installs only on devices its signing profile allows (development or ad hoc)";
|
|
35
|
+
|
|
33
36
|
/**
|
|
34
37
|
* What an artifact installs on, where the file alone isn't enough: the card
|
|
35
|
-
* says it once, under the QR code, or without one, in its place.
|
|
38
|
+
* says it once, under the QR code, or without one, in its place. A sandbox
|
|
39
|
+
* build gets no TestFlight advice.
|
|
36
40
|
*/
|
|
37
|
-
const
|
|
38
|
-
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
const installLimit = (build: NativeBuildRow): string | undefined => {
|
|
42
|
+
switch (build.artifact_kind) {
|
|
43
|
+
case "ipa":
|
|
44
|
+
return build.is_sandbox
|
|
45
|
+
? `${IPA_LIMIT}.`
|
|
46
|
+
: `${IPA_LIMIT}; an App Store export reaches testers through TestFlight.`;
|
|
47
|
+
case "aab":
|
|
48
|
+
return "The .aab installs through Google Play or bundletool, not from the file.";
|
|
49
|
+
default:
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
42
53
|
|
|
43
54
|
/**
|
|
44
55
|
* What scanning a build's QR code gets, by its artifact. The install steps
|
|
45
56
|
* beside it add only what this doesn't say, so the card says each thing once.
|
|
46
57
|
*/
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
58
|
+
const qrCaption = (build: NativeBuildRow): string => {
|
|
59
|
+
switch (build.artifact_kind) {
|
|
60
|
+
case "apk":
|
|
61
|
+
return "Scan with an Android phone's camera, then open the APK to install it.";
|
|
62
|
+
case "app":
|
|
63
|
+
return "Scan to download the .app.zip on a Mac.";
|
|
64
|
+
default:
|
|
65
|
+
return `Scan to download. ${installLimit(build)}`;
|
|
66
|
+
}
|
|
52
67
|
};
|
|
53
68
|
|
|
54
69
|
/**
|
|
@@ -90,7 +105,7 @@ function ScannableUrl({
|
|
|
90
105
|
value={url}
|
|
91
106
|
/>
|
|
92
107
|
<p className="max-w-56 text-center text-xs text-muted-foreground">
|
|
93
|
-
{
|
|
108
|
+
{qrCaption(build)}
|
|
94
109
|
</p>
|
|
95
110
|
{note ? (
|
|
96
111
|
<p className="max-w-56 text-center text-xs text-muted-foreground">
|
|
@@ -122,7 +137,7 @@ function StorageQrCode({ build }: { readonly build: NativeBuildRow }) {
|
|
|
122
137
|
// A storage without download URLs serves the build only through the
|
|
123
138
|
// console, which a phone that scans isn't signed in to.
|
|
124
139
|
if (url === null) {
|
|
125
|
-
const limits =
|
|
140
|
+
const limits = installLimit(build);
|
|
126
141
|
return (
|
|
127
142
|
<div className="flex flex-col gap-2 text-xs text-muted-foreground">
|
|
128
143
|
<p>
|
|
@@ -292,16 +307,9 @@ function InstallSteps({ build }: { readonly build: NativeBuildRow }) {
|
|
|
292
307
|
processed it, and a preview's pull request comment shows that state.
|
|
293
308
|
</p>
|
|
294
309
|
) : (
|
|
295
|
-
<
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
without a registered device:
|
|
299
|
-
</p>
|
|
300
|
-
<CopyableText
|
|
301
|
-
label="the TestFlight command"
|
|
302
|
-
value="npx hot-updater testflight"
|
|
303
|
-
/>
|
|
304
|
-
</div>
|
|
310
|
+
<p className="text-xs text-muted-foreground">
|
|
311
|
+
Over USB, Xcode or Apple Configurator installs it.
|
|
312
|
+
</p>
|
|
305
313
|
);
|
|
306
314
|
}
|
|
307
315
|
}
|
|
@@ -358,7 +366,7 @@ export function InstallCard({ build }: { readonly build: NativeBuildRow }) {
|
|
|
358
366
|
|
|
359
367
|
/**
|
|
360
368
|
* On the iPhone, what installs the IPA from a computer, closed under the one
|
|
361
|
-
* action this phone takes: over USB,
|
|
369
|
+
* action this phone takes: over USB, the download, and its link.
|
|
362
370
|
*/
|
|
363
371
|
function OtherWaysToInstall({ children }: { readonly children: ReactNode }) {
|
|
364
372
|
const [open, setOpen] = useState(false);
|
|
@@ -662,8 +662,9 @@ export function IosInstall({
|
|
|
662
662
|
if (result.status === "store") {
|
|
663
663
|
return (
|
|
664
664
|
<p className="text-xs text-muted-foreground">
|
|
665
|
-
|
|
666
|
-
|
|
665
|
+
{build.is_sandbox
|
|
666
|
+
? "This IPA is an App Store export, which doesn't install from this page."
|
|
667
|
+
: "This IPA is an App Store export, which installs through TestFlight, not from this page."}
|
|
667
668
|
</p>
|
|
668
669
|
);
|
|
669
670
|
}
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
TableRow,
|
|
36
36
|
} from "@/components/ui/table";
|
|
37
37
|
import { type KeysetPage, useNativeBuildPatchesQuery } from "@/lib/api";
|
|
38
|
-
import { formatByteSize } from "@/lib/native-builds";
|
|
38
|
+
import { formatByteSize, SANDBOX_NO_PATCH_BASE } from "@/lib/native-builds";
|
|
39
39
|
import type {
|
|
40
40
|
NativeBuildDetail,
|
|
41
41
|
NativeBuildPatchPage,
|
|
@@ -123,27 +123,35 @@ export function PatchesCard({
|
|
|
123
123
|
</EmptyMedia>
|
|
124
124
|
<EmptyTitle>No patches from this build</EmptyTitle>
|
|
125
125
|
<EmptyDescription>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
{detail.build.is_sandbox ? (
|
|
127
|
+
SANDBOX_NO_PATCH_BASE
|
|
128
|
+
) : (
|
|
129
|
+
<>
|
|
130
|
+
A deploy adds a patch from this build's bundle while it is
|
|
131
|
+
its scope's store build, or its newest build with none
|
|
132
|
+
marked, and the deploy config turns patches on, with{" "}
|
|
133
|
+
<code className="font-mono">patch</code> in{" "}
|
|
134
|
+
<code className="font-mono">hot-updater.config.ts</code>.
|
|
135
|
+
</>
|
|
136
|
+
)}
|
|
131
137
|
</EmptyDescription>
|
|
132
138
|
</EmptyHeader>
|
|
133
|
-
|
|
134
|
-
<
|
|
135
|
-
|
|
136
|
-
className
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
139
|
+
{detail.build.is_sandbox ? null : (
|
|
140
|
+
<EmptyContent>
|
|
141
|
+
<a
|
|
142
|
+
className={buttonVariants({
|
|
143
|
+
className: "min-h-11 sm:min-h-8",
|
|
144
|
+
variant: "outline",
|
|
145
|
+
})}
|
|
146
|
+
href={BUNDLE_DIFFING_GUIDE_URL}
|
|
147
|
+
rel="noreferrer"
|
|
148
|
+
target="_blank"
|
|
149
|
+
>
|
|
150
|
+
Bundle diffing guide
|
|
151
|
+
<ArrowUpRight data-icon="inline-end" />
|
|
152
|
+
</a>
|
|
153
|
+
</EmptyContent>
|
|
154
|
+
)}
|
|
147
155
|
</Empty>
|
|
148
156
|
)
|
|
149
157
|
) : (
|
package/src/lib/api-rpc.ts
CHANGED
|
@@ -334,7 +334,8 @@ export const getNativeBuildPatches = createServerFn({ method: "GET" })
|
|
|
334
334
|
/**
|
|
335
335
|
* The native build new deploys to a release's scope patch from: the scope's
|
|
336
336
|
* store build in one read, or with no mark its newest build in one more. A
|
|
337
|
-
* release of an app version range has no one build, and
|
|
337
|
+
* release of an app version range has no one build, and a sandbox channel's
|
|
338
|
+
* builds are no patch base: those read nothing.
|
|
338
339
|
*/
|
|
339
340
|
export const getReleaseNativeBuild = createServerFn({ method: "GET" })
|
|
340
341
|
.middleware([consoleAccess])
|
package/src/lib/native-builds.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
decodeChannelKey,
|
|
10
10
|
encodeChannelKey,
|
|
11
11
|
} from "@hot-updater/protocol";
|
|
12
|
+
import { isSandboxChannel } from "@hot-updater/protocol/native-artifact";
|
|
12
13
|
|
|
13
14
|
import { shellQuote } from "./shell";
|
|
14
15
|
|
|
@@ -331,10 +332,15 @@ export const nativeBuildCatalogScopeKey = (build: NativeBuildRow): string => {
|
|
|
331
332
|
});
|
|
332
333
|
};
|
|
333
334
|
|
|
335
|
+
/** What a sandbox build's page says of its built-in bundle as a patch base. */
|
|
336
|
+
export const SANDBOX_NO_PATCH_BASE =
|
|
337
|
+
"Deploys make no patches from a sandbox build's built-in bundle.";
|
|
338
|
+
|
|
334
339
|
/**
|
|
335
|
-
* The native build scope
|
|
336
|
-
* it: a release of an app version range, rather than one
|
|
337
|
-
* targets many builds
|
|
340
|
+
* The native build scope whose base new deploys of a release patch from, or
|
|
341
|
+
* null when it has none: a release of an app version range, rather than one
|
|
342
|
+
* exact version, targets many builds, and a sandbox channel's builds are no
|
|
343
|
+
* patch base.
|
|
338
344
|
*/
|
|
339
345
|
export const releaseNativeBuildScope = (release: {
|
|
340
346
|
readonly platform: "ios" | "android";
|
|
@@ -342,6 +348,7 @@ export const releaseNativeBuildScope = (release: {
|
|
|
342
348
|
readonly fingerprintHash: string | null;
|
|
343
349
|
readonly targetAppVersion: string | null;
|
|
344
350
|
}): NativeBuildScope | null => {
|
|
351
|
+
if (isSandboxChannel(release.channel)) return null;
|
|
345
352
|
if (release.fingerprintHash !== null) {
|
|
346
353
|
return {
|
|
347
354
|
platform: release.platform,
|
|
@@ -389,7 +389,9 @@ export const serveNativeBuildManifest = async (
|
|
|
389
389
|
if (info.distribution === "store") {
|
|
390
390
|
return installRefusal(
|
|
391
391
|
409,
|
|
392
|
-
|
|
392
|
+
build.is_sandbox
|
|
393
|
+
? "This IPA is an App Store export, which doesn't install from a link."
|
|
394
|
+
: "This IPA is an App Store export, which installs through TestFlight.",
|
|
393
395
|
);
|
|
394
396
|
}
|
|
395
397
|
if (isExpired(info, Date.now())) {
|
|
@@ -114,11 +114,14 @@ export interface NativeBuildDetail {
|
|
|
114
114
|
readonly catalogScopeKey: string;
|
|
115
115
|
/** How many bundles patch from the built-in bundle, or null when its row is gone. */
|
|
116
116
|
readonly builtInBundle: { readonly childCount: number } | null;
|
|
117
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* The newest build of the build's scope: this build or a later one. Null for
|
|
119
|
+
* a sandbox build, whose scope has no patch base.
|
|
120
|
+
*/
|
|
118
121
|
readonly newestInScope: NativeBuildRow | null;
|
|
119
122
|
/**
|
|
120
123
|
* The build marked as the store build in the scope. New deploys patch from it,
|
|
121
|
-
* or with no mark from the newest build.
|
|
124
|
+
* or with no mark from the newest build. Null for a sandbox build.
|
|
122
125
|
*/
|
|
123
126
|
readonly storeBuildInScope: NativeBuildRow | null;
|
|
124
127
|
/**
|
|
@@ -134,8 +137,8 @@ export interface NativeBuildDetail {
|
|
|
134
137
|
/**
|
|
135
138
|
* Everything a native build's page shows, in six reads at most: the build,
|
|
136
139
|
* then its built-in bundle, its scope's newest build and its mark, which a
|
|
137
|
-
* marked build's own row answers, its scope's
|
|
138
|
-
* from it. Null for an unknown ID.
|
|
140
|
+
* marked build's own row answers and a sandbox build skips, its scope's
|
|
141
|
+
* catalog, and one page of patches from it. Null for an unknown ID.
|
|
139
142
|
*/
|
|
140
143
|
export async function getNativeBuildDetail(
|
|
141
144
|
core: Pick<
|
|
@@ -152,13 +155,17 @@ export async function getNativeBuildDetail(
|
|
|
152
155
|
if (build === null) return null;
|
|
153
156
|
const catalogScopeKey = nativeBuildCatalogScopeKey(build);
|
|
154
157
|
const scope = nativeBuildScope(build);
|
|
158
|
+
// A sandbox build's built-in bundle is no patch base, so its page names
|
|
159
|
+
// none and reads none.
|
|
155
160
|
const [builtIn, newestInScope, storeBuildInScope, catalog, patches] =
|
|
156
161
|
await Promise.all([
|
|
157
162
|
core.getBundle(build.min_bundle_id),
|
|
158
|
-
core.findNativeBuild(scope),
|
|
159
|
-
build.
|
|
160
|
-
?
|
|
161
|
-
:
|
|
163
|
+
build.is_sandbox ? null : core.findNativeBuild(scope),
|
|
164
|
+
build.is_sandbox
|
|
165
|
+
? null
|
|
166
|
+
: build.is_store_build
|
|
167
|
+
? build
|
|
168
|
+
: core.findNativeBuild(scope, { storeBuild: true }),
|
|
162
169
|
core.getReleaseCatalogRow(catalogScopeKey),
|
|
163
170
|
listNativeBuildPatches(core, build.min_bundle_id, {
|
|
164
171
|
limit: NATIVE_BUILD_PATCH_PAGE_SIZE,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Vr as e}from"./sidebar-UnsNYOry.js";import{f as t,p as n}from"./uuidv7-DgXZ1zRR.js";var r=e(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),i=e=>/^[\w@%+=:,./-]+$/.test(e)?e:`'${e.replaceAll(`'`,`'\\''`)}'`,a={apk:{label:`APK`,installs:`Android device or emulator`},aab:{label:`AAB`,installs:`Google Play or bundletool`},app:{label:`Simulator app`,installs:`iOS Simulator`},ipa:{label:`IPA`,installs:`registered iOS devices`}},o=e=>e===`ios`?`iOS`:`Android`,s=e=>{let t=e.submitted_version??[e.app_version??e.native_app_version??null,e.build_number===null?null:`(${e.build_number})`].filter(e=>e!==null).join(` `);return t===``?null:`${o(e.platform)} ${t}`},c=e=>`/api/native-builds/${encodeURIComponent(e)}/download`,l=(e,t,n)=>`${e.origin}${u(e,t)}${c(t)}?t=${encodeURIComponent(n)}`,u=(e,t)=>{let n=p(t);return e.pathname.endsWith(n)?e.pathname.slice(0,-n.length):``},d=(e,t)=>{let n=e.pathname.replace(/\/$/u,``),r=t.replace(/\/$/u,``);return n.endsWith(r)?n.slice(0,n.length-r.length):``},f=e=>{let t=e.pathname.lastIndexOf(`/native-builds`);return t<0?``:e.pathname.slice(0,t)},p=e=>`/native-builds/${encodeURIComponent(e)}`,m=3600*1e3,h=`hot-updater-ios-udid`,g=`hot-updater-ios-device-receipt`,_=`hot-updater-ios-device-pending-receipt`,v=e=>{try{let t=e.split(`.`)[0].replaceAll(`-`,`+`).replaceAll(`_`,`/`),n=JSON.parse(atob(t)).x;return typeof n==`number`?n:0}catch{return 0}},y=e=>{try{let t=JSON.parse(window.sessionStorage.getItem(`hot-updater-ios-device-pending-receipt`)??`null`);return typeof t?.receipt==`string`?v(t.receipt)<=Date.now()?(window.sessionStorage.removeItem(_),null):e!==null&&t.udid===e?t.receipt:null:null}catch{return null}},b=(e,t)=>{try{window.sessionStorage.setItem(_,JSON.stringify({udid:e,receipt:t}))}catch{}},x=e=>{try{JSON.parse(window.sessionStorage.getItem(`hot-updater-ios-device-pending-receipt`)??`null`)?.receipt===e&&window.sessionStorage.removeItem(_)}catch{}},S=/^(?:[0-9a-f]{40}|[0-9a-f]{8}-[0-9a-f]{16})$/iu,C=`/native-builds/devices`,w=`/_hot-updater/devices/device.mobileconfig`,T=(e,t)=>`${e}${w}?t=${encodeURIComponent(t)}`,E=`npx hot-updater native-build devices add`,D=e=>`…${e.slice(-6)}`,O=e=>`/_hot-updater/native-builds/${encodeURIComponent(e)}/manifest.plist`,k=(e,t,n)=>{let r=`${e.origin}${u(e,t)}${O(t)}?t=${encodeURIComponent(n)}`;return`itms-services://?action=download-manifest&url=${encodeURIComponent(r)}`},A=e=>n(e.channel_id.slice(8)),j=e=>{if(e.fingerprintHash!==null)return{platform:e.platform,channel:e.channel,fingerprintHash:e.fingerprintHash,appVersion:null};let n=e.targetAppVersion;return n===null||t(n)!==n?null:{platform:e.platform,channel:e.channel,fingerprintHash:null,appVersion:n}},M=e=>{let t=(e.artifact_storage_uri.split(/[?#]/,1)[0]??``).split(`/`).at(-1)??``;try{return decodeURIComponent(t)}catch{return t}},N=[`B`,`KB`,`MB`,`GB`],P=e=>{let t=e,n=0;for(;t>=1024&&n<N.length-1;)t/=1024,n+=1;return`${n===0?t:t.toFixed(1)} ${N[n]}`},F=e=>`npx hot-updater native-build install ${i(e.id)}`;export{y as C,r as D,i as E,o as S,x as T,M as _,h as a,s as b,u as c,b as d,T as f,c as g,A as h,S as i,f as l,a as m,C as n,m as o,D as p,g as r,d as s,E as t,P as u,F as v,j as w,l as x,k as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Di as t,Ri as n,Vi as r,Vr as i,_r as a,gr as o,p as s}from"./sidebar-UnsNYOry.js";import{t as c}from"./link-D95E0fwF.js";import{t as l}from"./arrow-up-right-BPRe5soE.js";import{a as u,i as d,n as f,r as p,t as ee}from"./TargetDisplay-DzSkf5yP.js";import{t as m}from"./chevron-right-CuYrscDY.js";import{n as te,t as h}from"./native-builds_._buildId-C7-yUwvH.js";import{t as g}from"./download-ekENI2Sw.js";import{i as ne,n as re,r as _,t as ie}from"./RolloutPercentageBadge-DnmU8XbU.js";import{t as ae}from"./git-branch-BWrvONjc.js";import{a as oe}from"./-native-builds-search-BvCftqF2.js";import{t as se}from"./history-DwdBLzJP.js";import{E as v,S as y,_ as b,b as ce,g as x,m as S,p as le,u as C,v as w,x as ue}from"./native-builds-BOSmoLed.js";import{t as T}from"./refresh-cw-CpCxPYma.js";import{t as de}from"./smartphone-lSZWrqxx.js";import{a as E,i as D,n as O,o as k,r as A,t as j}from"./badge-D4Tiwei-.js";import{n as M}from"./dist-BEIz5ojx.js";import{a as N,n as P,o as F,t as I}from"./card-BfeRlTvj.js";import{r as fe}from"./uuidv7-DgXZ1zRR.js";import{n as pe}from"./relativeTime-D_aYJRc7.js";import{a as me,d as he,f as ge,h as _e,l as ve,u as ye}from"./api-B1z_XXrQ.js";import{a as be,m as xe,n as Se}from"./IosInstall-DsKczesK.js";import{a as L,i as R,n as z,o as B,r as V,t as H}from"./empty-DpSPWLc2.js";import{t as Ce}from"./PlatformIcon-Kq3q98tU.js";import{a as U,i as W,n as G,o as K,r as q,t as J}from"./table-r_sYqKTQ.js";import{t as we}from"./BundleIdDisplay-D8oR8mcP.js";import{t as Te}from"./ChannelBadge-Do-lWsLM.js";import{a as Y,n as Ee,r as X,t as De}from"./SandboxBadge-BPf2uve4.js";import{t as Oe}from"./QrCode-D3-Vuudy.js";var ke=i(`package-open`,[[`path`,{d:`M12 22v-9`,key:`x3hkom`}],[`path`,{d:`M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z`,key:`2ntwy6`}],[`path`,{d:`M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13`,key:`1pmm1c`}],[`path`,{d:`M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z`,key:`12ttoo`}]]),Z=t();function Ae({value:e,length:t,shown:n=e.slice(0,t),label:r}){let i=async()=>{try{await navigator.clipboard.writeText(e),M.success(`Copied to clipboard`,{description:e})}catch{M.error(`Could not copy the ${r}`)}};return(0,Z.jsx)(`button`,{"aria-label":`Copy the ${r} ${e}`,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`,onClick:e=>{e.stopPropagation(),i()},title:e,translate:`no`,type:`button`,children:n})}function je({hash:e}){let t=me();if(e===null)return(0,Z.jsx)(f,{});let n=re(t.data?.console.gitUrl,e);return n===null?(0,Z.jsx)(Ae,{label:`commit`,length:7,value:e}):(0,Z.jsx)(`a`,{className:`relative font-mono text-xs whitespace-nowrap underline-offset-4 after:absolute after:-inset-x-2 after:-inset-y-4 hover:underline sm:after:hidden`,href:n,onClick:e=>e.stopPropagation(),rel:`noreferrer`,target:`_blank`,title:e,translate:`no`,children:e.slice(0,7)})}function Q({label:e,children:t}){return(0,Z.jsxs)(`div`,{className:`grid gap-1 sm:grid-cols-[10rem_minmax(0,1fr)] sm:gap-4`,children:[(0,Z.jsx)(`dt`,{className:`text-xs font-medium text-muted-foreground`,children:e}),(0,Z.jsx)(`dd`,{className:`min-w-0 text-sm`,children:t})]})}function Me({detail:e}){let{build:t}=e,n=ve();if(t.is_sandbox)return null;let r=!t.is_store_build;return(0,Z.jsx)(o,{className:`min-h-11 shrink-0 sm:min-h-8`,disabled:n.isPending,onClick:()=>n.mutate({id:t.id,storeBuild:r},{onSuccess:()=>{M.success(r?`Marked as the store build`:`Mark cleared`)},onError:e=>{M.error(`Could not change the mark`,{description:e.message})}}),size:`sm`,type:`button`,variant:`outline`,children:r?`Mark as store build`:`Clear mark`})}function Ne({detail:e}){let{build:t,newestInScope:n,storeBuildInScope:r}=e,i=r??n;if(i===null)return null;let a=i.id===t.id;return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-md border bg-muted/40 p-3 text-xs sm:flex-row sm:items-center sm:justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(a?te:se,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),r?.id===t.id?(0,Z.jsxs)(`p`,{children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Store build.`}),` New deploys to this scope patch from this build.`]}):a?(0,Z.jsxs)(`p`,{children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Current baseline.`}),` The newest build, and no store build is marked. New deploys to this scope patch from this build.`]}):(0,Z.jsxs)(`p`,{children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Not the base.`}),` New deploys patch from`,` `,(0,Z.jsxs)(c,{className:`inline-flex items-center gap-0.5 font-medium underline underline-offset-4`,params:{buildId:i.id},to:`/native-builds/$buildId`,children:[ce(i)??(0,Z.jsxs)(Z.Fragment,{children:[y(i.platform),` `,S[i.artifact_kind].label,` ·`,` `,(0,Z.jsx)(_,{uuid:i.id})]}),(0,Z.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]}),`, so this one gets no new patches.`]})]}),(0,Z.jsx)(Me,{detail:e})]})}function Pe({detail:e}){let{build:t,builtInBundle:n,channel:r}=e,i=n?.childCount??0;return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Built-in bundle`})})}),(0,Z.jsxs)(P,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,Z.jsxs)(`dl`,{className:`flex flex-col gap-3`,children:[(0,Z.jsx)(Q,{label:`Bundle ID`,children:(0,Z.jsx)(we,{bundleId:t.min_bundle_id})}),(0,Z.jsx)(Q,{label:`OTAs patching from it`,children:(0,Z.jsx)(`span`,{className:`tabular-nums`,children:i===1?`1 bundle`:`${i} bundles`})}),(0,Z.jsx)(Q,{label:`Scope`,children:(0,Z.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,Z.jsx)(c,{"aria-label":`Show the builds that embed ${r}`,className:`relative rounded-md after:absolute after:-inset-x-1 after:-inset-y-[11px] sm:after:hidden`,search:{channel:r},to:`/native-builds`,children:(0,Z.jsx)(Te,{channel:r})}),(0,Z.jsx)(`span`,{className:`text-xs`,children:y(t.platform)})]})}),(0,Z.jsx)(Q,{label:`Target`,children:(0,Z.jsx)(`span`,{className:`text-xs`,children:(0,Z.jsx)(p,{appVersion:t.app_version,fingerprintHash:t.fingerprint_hash,nativeAppVersion:t.native_app_version})})}),(0,Z.jsx)(Q,{label:`Build key`,children:(0,Z.jsx)(`span`,{className:`text-xs`,children:(0,Z.jsx)(ee,{value:t.build_key})})}),t.build_number?(0,Z.jsx)(Q,{label:`Build`,children:(0,Z.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,translate:`no`,children:t.build_number})}):null,X(t)?(0,Z.jsx)(Q,{label:`Store`,children:(0,Z.jsx)(Ee,{build:t,withTime:!0})}):null,(0,Z.jsx)(Q,{label:`Commit`,children:(0,Z.jsx)(je,{hash:t.git_commit_hash})}),(0,Z.jsx)(Q,{label:`Created`,children:(0,Z.jsx)(_,{format:`both`,uuid:t.id})})]}),(0,Z.jsx)(Ne,{detail:e}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A store or test install of this build runs this bundle until its first OTA. That OTA downloads as a patch from this bundle when one exists, and as the full bundle otherwise.`})]})]})}var Fe=r(pe(),1),Ie=r(n(),1),$={ipa:`The .ipa installs only on devices its signing profile allows (development or ad hoc); an App Store export reaches testers through TestFlight.`,aab:`The .aab installs through Google Play or bundletool, not from the file.`},Le={apk:`Scan with an Android phone's camera, then open the APK to install it.`,ipa:`Scan to download. ${$.ipa}`,aab:`Scan to download. ${$.aab}`,app:`Scan to download the .app.zip on a Mac.`};function Re(){let{origin:e,pathname:t}=window.location;return(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,Z.jsx)(Oe,{className:`size-48`,label:`Open this page on an iPhone`,value:`${e}${t}`}),(0,Z.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:`Scan with an iPhone to install this build from here. The phone signs in to the Console first.`})]})}function ze({build:e,url:t,note:n}){return(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,Z.jsx)(Oe,{className:`size-48`,label:`Download ${b(e)}`,value:t}),(0,Z.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:Le[e.artifact_kind]}),n?(0,Z.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:n}):null]})}function Be({message:e}){return(0,Z.jsxs)(O,{variant:`destructive`,children:[(0,Z.jsx)(k,{}),(0,Z.jsx)(E,{children:`The download link couldn't be created`}),(0,Z.jsx)(D,{children:e})]})}function Ve({build:t}){let n=ge(t.id),r=n.data?.url;if(r===null){let e=$[t.artifact_kind];return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,Z.jsx)(`p`,{children:`This storage gives no download link a phone can open without signing in, so there is no QR code. Download the build here, or open this page on the phone signed in to the console.`}),e?(0,Z.jsx)(`p`,{children:e}):null]})}return r===void 0?n.isError?(0,Z.jsx)(Be,{message:n.error.message}):(0,Z.jsx)(e,{className:`size-48`}):(0,Z.jsx)(ze,{build:t,note:`This link expires. If the download fails, reload this page.`,url:r})}function He({build:e}){return(0,Z.jsx)(`span`,{className:`font-mono text-foreground`,translate:`no`,children:e.submitted_version??`this build`})}function Ue({build:e}){let t=e.submitted_to===`testflight`?{name:`App Store Connect`,url:`https://appstoreconnect.apple.com/apps`}:{name:`Play Console`,url:`https://play.google.com/console`};return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Install`})})}),(0,Z.jsxs)(P,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,Z.jsx)(We,{build:e}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[(0,Z.jsxs)(`a`,{className:a({className:`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`}),href:t.url,rel:`noreferrer`,target:`_blank`,children:[(0,Z.jsx)(ne,{"data-icon":`inline-start`}),`Open `,t.name]}),(0,Z.jsxs)(`a`,{className:a({className:`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`,variant:`outline`}),download:!0,href:x(e.id),children:[(0,Z.jsx)(g,{"data-icon":`inline-start`}),(0,Z.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,b(e)]})]})]})]})]})}function We({build:e}){switch(e.artifact_kind){case`apk`:return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Your browser needs the "Install unknown apps" permission.`}),e.is_sandbox?(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Its .sandbox ID installs it beside a Play copy.`}):(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`If this package is already installed with another signing key, such as a Play copy, the install fails. Uninstall that copy first, or build with sandbox: true, whose .sandbox ID installs beside it.`}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`On an emulator or a phone over USB, install and open it from your project:`}),(0,Z.jsx)(d,{label:`the install command`,value:w(e)})]});case`app`:return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`It runs only in the iOS Simulator. In your project, install and open it on the booted one:`}),(0,Z.jsx)(d,{label:`the install command`,value:w(e)})]});case`aab`:return X(e)?(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Submitted to`,` `,e.submitted_to===`play-internal`?Y[`play-internal`].name:Y[e.submitted_to].label,` `,`as `,(0,Z.jsx)(He,{build:e}),`.`,` `,e.submitted_to===`play-production`?`Users`:`Testers`,` get it once its release is rolled out; on an app Play Console hasn't published, the release is a draft you roll out in Play Console.`]}):(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`For testers, build and release to internal testing:`}),(0,Z.jsx)(d,{label:`the Google Play command`,value:`npx hot-updater google-play upload`})]});case`ipa`:return X(e)?(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`On TestFlight as `,(0,Z.jsx)(He,{build:e}),`. Internal testers install it from the TestFlight app once App Store Connect has processed it, and a preview's pull request comment shows that state.`]}):(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Over USB, Xcode or Apple Configurator installs it. For testers without a registered device:`}),(0,Z.jsx)(d,{label:`the TestFlight command`,value:`npx hot-updater testflight`})]})}}function Ge({link:e,url:t}){return e?.status===`no-secret`?(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`Set `,e.secretName,` on the Console to create links.`]}):e?.status!==`issued`||t===null?null:(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(d,{label:`the download link`,value:t}),(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Anyone with this link can download this build until`,` `,(0,Z.jsxs)(`span`,{className:`whitespace-nowrap`,children:[(0,Fe.default)(e.expiresAt).format(`YYYY-MM-DD`),`.`]})]})]})}function Ke({build:e}){return X(e)&&(e.artifact_kind===`ipa`||e.artifact_kind===`aab`)?(0,Z.jsx)(Ue,{build:e}):(0,Z.jsx)(Je,{build:e})}function qe({children:e}){let[t,n]=(0,Ie.useState)(!1),r=(0,Ie.useId)();return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 border-t pt-3`,children:[(0,Z.jsxs)(`button`,{"aria-controls":r,"aria-expanded":t,className:`group/other -mx-1 flex min-h-11 items-center gap-1.5 self-start rounded-md px-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none motion-reduce:transition-none sm:min-h-8`,onClick:()=>n(e=>!e),type:`button`,children:[(0,Z.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 shrink-0 transition-transform group-aria-expanded/other:rotate-90 motion-reduce:transition-none`}),`Other ways to install`]}),(0,Z.jsx)(`div`,{hidden:!t,id:r,children:e})]})}function Je({build:t}){let n=b(t),r=he(t.id),i=r.data?.status===`issued`?ue(window.location,t.id,r.data.token):null,o=be(),s=t.artifact_kind===`ipa`,c=s&&o?.ios===!0,l=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,Z.jsx)(We,{build:t}),(0,Z.jsxs)(`a`,{className:a({className:`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`,variant:`outline`}),download:!0,href:i??x(t.id),children:[(0,Z.jsx)(g,{"data-icon":`inline-start`}),(0,Z.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,n]})]}),(0,Z.jsx)(Ge,{link:r.data,url:i})]});return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Install`})})}),c?(0,Z.jsxs)(P,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,Z.jsx)(Se,{build:t,device:o}),(0,Z.jsx)(qe,{children:l})]}):(0,Z.jsxs)(P,{className:`grid gap-6 p-4 sm:grid-cols-[12rem_minmax(0,1fr)] sm:p-6`,children:[s&&i!==null?(0,Z.jsx)(Re,{}):i===null?r.data===void 0?r.isError?(0,Z.jsx)(Be,{message:r.error.message}):(0,Z.jsx)(e,{className:`size-48`}):(0,Z.jsx)(Ve,{build:t}):(0,Z.jsx)(ze,{build:t,url:i}),l]})]})}function Ye({build:t}){let n=xe(t.id),r=n.data;if(r?.status===`store`||r?.status===`enterprise`)return null;let i=r?.status===`listed`?r.devices:null;return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsxs)(N,{className:`flex flex-row items-center gap-2 border-b px-4 py-3`,children:[(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Devices in this build`})}),i===null?null:(0,Z.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:i.length}),(0,Z.jsx)(c,{className:a({className:`ml-auto h-11 sm:h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds/devices`,children:`iOS devices`})]}),(0,Z.jsx)(P,{className:`p-0`,children:n.isPending?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:`Reading this IPA's devices`}),(0,Z.jsx)(e,{className:`h-8 w-full`}),(0,Z.jsx)(e,{className:`h-8 w-full`})]}):n.isError||r?.status===`unavailable`?(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 p-4 text-xs text-muted-foreground`,children:[(0,Z.jsx)(`p`,{className:`min-w-0 flex-1`,children:`The Console couldn't read this IPA's devices from storage.`}),(0,Z.jsxs)(o,{className:`h-11 sm:h-7`,onClick:()=>void n.refetch(),size:`sm`,variant:`outline`,children:[(0,Z.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})]}):i?.length===0?(0,Z.jsx)(`p`,{className:`p-4 text-xs text-muted-foreground`,children:`This IPA lists no devices.`}):(0,Z.jsx)(`ul`,{"aria-label":`Devices in this build`,className:`divide-y`,children:i?.map(e=>(0,Z.jsxs)(`li`,{className:`flex min-h-11 min-w-0 items-center gap-3 px-4 py-2 text-sm`,children:[(0,Z.jsx)(de,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-col items-start`,children:[(0,Z.jsx)(`span`,{className:e.name===null?`truncate text-muted-foreground`:`truncate`,children:e.name??`Unknown device`}),(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(Ae,{label:`UDID`,shown:le(e.udid),value:e.udid})})]})]},e.udid))})})]})}var Xe=`https://hot-updater.dev/docs/guides/bundle-diffing#first-ota-update`;function Ze({detail:t,page:n,onPage:r}){let i=n.before!==void 0||n.after!==void 0,s=_e(t.build.min_bundle_id,n,i),d=i?s.data:t.patches,{next:f,previous:p}=d??{};return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,id:`patches`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Patches from this build`})})}),(0,Z.jsxs)(P,{className:`p-0`,children:[i&&s.isError?(0,Z.jsx)(`div`,{className:`p-4`,children:(0,Z.jsxs)(O,{variant:`destructive`,children:[(0,Z.jsx)(k,{}),(0,Z.jsx)(E,{children:`Patches couldn't be loaded`}),(0,Z.jsx)(D,{children:s.error.message}),(0,Z.jsx)(A,{children:(0,Z.jsxs)(o,{onClick:()=>void s.refetch(),size:`xs`,variant:`outline`,children:[(0,Z.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})})]})}):d===void 0?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:`Loading patches`}),(0,Z.jsx)(e,{className:`h-4 w-full`}),(0,Z.jsx)(e,{className:`h-4 w-2/3`})]}):d.data.length===0?i?(0,Z.jsxs)(H,{className:`py-10`,children:[(0,Z.jsx)(R,{children:(0,Z.jsx)(B,{children:`No more patches`})}),(0,Z.jsx)(o,{className:`min-h-11 sm:min-h-8`,onClick:()=>r({}),variant:`outline`,children:`Show the newest patches`})]}):(0,Z.jsxs)(H,{className:`py-10`,children:[(0,Z.jsxs)(R,{children:[(0,Z.jsx)(L,{variant:`icon`,children:(0,Z.jsx)(ae,{})}),(0,Z.jsx)(B,{children:`No patches from this build`}),(0,Z.jsxs)(V,{children:[`A deploy adds a patch from this build's bundle while it is its scope's store build, or its newest build with none marked, and the deploy config turns patches on, with`,` `,(0,Z.jsx)(`code`,{className:`font-mono`,children:`patch`}),` in`,` `,(0,Z.jsx)(`code`,{className:`font-mono`,children:`hot-updater.config.ts`}),`.`]})]}),(0,Z.jsx)(z,{children:(0,Z.jsxs)(`a`,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:Xe,rel:`noreferrer`,target:`_blank`,children:[`Bundle diffing guide`,(0,Z.jsx)(l,{"data-icon":`inline-end`})]})})]}):(0,Z.jsxs)(J,{"aria-busy":i&&s.isPlaceholderData,"aria-label":`Patches from this build`,className:`table-fixed`,children:[(0,Z.jsx)(U,{children:(0,Z.jsxs)(K,{children:[(0,Z.jsx)(W,{children:`Target bundle`}),(0,Z.jsx)(W,{className:`w-28`,children:`Patch size`}),(0,Z.jsx)(W,{className:`hidden w-32 sm:table-cell`,children:`Created`})]})}),(0,Z.jsx)(G,{children:d.data.map(e=>(0,Z.jsxs)(K,{children:[(0,Z.jsx)(q,{className:`py-3 whitespace-normal`,children:(0,Z.jsx)(c,{className:`block font-mono text-xs [overflow-wrap:anywhere] underline-offset-4 hover:underline`,search:{bundleId:e.bundleId},title:e.bundleId,to:`/`,translate:`no`,children:e.bundleId})}),(0,Z.jsx)(q,{className:`text-xs tabular-nums`,children:C(e.byteSize)}),(0,Z.jsx)(q,{className:`hidden sm:table-cell`,children:(0,Z.jsx)(_,{uuid:e.bundleId})})]},e.bundleId))})]}),f!==void 0||p!==void 0?(0,Z.jsxs)(`nav`,{"aria-label":`Patch pages`,className:`flex items-center justify-end gap-2 border-t px-4 py-2`,children:[(0,Z.jsxs)(o,{className:`min-h-11 sm:min-h-7`,disabled:p===void 0||i&&s.isPlaceholderData,onClick:()=>r({after:p}),size:`sm`,variant:`ghost`,children:[(0,Z.jsx)(u,{"data-icon":`inline-start`}),`Newer`]}),(0,Z.jsxs)(o,{className:`min-h-11 sm:min-h-7`,disabled:f===void 0||i&&s.isPlaceholderData,onClick:()=>r({before:f}),size:`sm`,variant:`ghost`,children:[`Older`,(0,Z.jsx)(m,{"data-icon":`inline-end`})]})]}):null]})]})}var Qe=(e,t)=>{let n=e.data.find(e=>e.bundleId===t);if(n!==void 0)return{kind:`patch`,byteSize:n.byteSize};let r=e.data.at(-1)?.bundleId;return e.next!==void 0&&r!==void 0&&t<r?{kind:`unknown`}:{kind:`full`}};function $e({download:e}){switch(e.kind){case`patch`:return(0,Z.jsxs)(`span`,{className:`text-xs`,children:[`Patch`,` `,(0,Z.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[`(`,C(e.byteSize),`)`]})]});case`full`:return(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Full bundle`});case`unknown`:return(0,Z.jsx)(`a`,{className:`text-xs underline-offset-4 hover:underline`,href:`#patches`,children:`See patches`})}}function et({detail:e}){let{build:t,channel:n,servedNow:r,patches:i,catalogScopeKey:o}=e,s=r.find(({rolloutCohortCount:e,targetCohorts:t})=>e>0||t.length>0)?.bundleId,u=t.is_store_build&&s!=null&&Qe(i,s).kind===`full`?[`npx hot-updater patch`,`-p ${t.platform}`,`-c ${v(n)}`,`-b ${v(s)}`,`--base-artifact-id ${v(t.min_bundle_id)}`].join(` `):null,f=(0,Z.jsxs)(c,{className:`inline-flex items-center gap-0.5 underline-offset-4 hover:underline`,search:{scopeKey:o},to:`/`,children:[`All releases in this scope`,(0,Z.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]});return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Served now`})})}),(0,Z.jsx)(P,{className:`p-0`,children:r.length===0?(0,Z.jsxs)(H,{className:`py-10`,children:[(0,Z.jsxs)(R,{children:[(0,Z.jsx)(L,{variant:`icon`,children:(0,Z.jsx)(ke,{})}),(0,Z.jsx)(B,{children:`No OTA for this build yet`}),(0,Z.jsxs)(V,{children:[`No release in this build's scope is newer than its built-in bundle. Deploy one with`,` `,(0,Z.jsx)(`code`,{className:`font-mono`,children:`hot-updater deploy`}),`, and it shows here.`]})]}),(0,Z.jsx)(z,{children:(0,Z.jsx)(c,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),search:{scopeKey:o},to:`/`,children:`All releases in this scope`})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(J,{"aria-label":`Served now`,className:`table-fixed`,children:[(0,Z.jsx)(U,{children:(0,Z.jsxs)(K,{children:[(0,Z.jsx)(W,{children:`Bundle`}),(0,Z.jsx)(W,{className:`hidden w-40 md:table-cell`,children:`Rollout`}),(0,Z.jsx)(W,{className:`hidden w-32 sm:table-cell`,children:`Created`}),(0,Z.jsx)(W,{className:`w-32`,children:`First OTA download`})]})}),(0,Z.jsx)(G,{children:r.map(e=>{let t=e.bundleId,n=e.rolloutCohortCount/fe*100;return(0,Z.jsxs)(K,{children:[(0,Z.jsx)(q,{className:`py-3 whitespace-normal`,children:(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(c,{className:`font-mono text-xs [overflow-wrap:anywhere] underline-offset-4 hover:underline`,search:{releaseId:e.releaseId},title:t,to:`/`,translate:`no`,children:t}),e.message?(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.message}):null]})}),(0,Z.jsx)(q,{className:`hidden md:table-cell`,children:(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.targetCohorts.length>0?(0,Z.jsx)(j,{variant:`secondary`,children:e.targetCohorts.length===1?`1 cohort`:`${e.targetCohorts.length} cohorts`}):(0,Z.jsx)(ie,{percentage:n}),e.shouldForceUpdate?(0,Z.jsx)(j,{variant:`outline`,children:`Forced`}):null]})}),(0,Z.jsx)(q,{className:`hidden sm:table-cell`,children:(0,Z.jsx)(_,{uuid:t})}),(0,Z.jsx)(q,{children:(0,Z.jsx)($e,{download:Qe(i,t)})})]},e.releaseId)})})]}),u===null?null:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 border-t px-4 py-3 text-xs`,children:[(0,Z.jsx)(`p`,{children:`The OTA fresh installs get first has no patch from this store build, so they download all of it. Add one from your project:`}),(0,Z.jsx)(d,{label:`the patch command`,value:u})]}),(0,Z.jsxs)(`p`,{className:`border-t px-4 py-3 text-xs text-muted-foreground`,children:[`What the update check serves an install of this build now, newest first: not the history. `,f]})]})})]})}function tt({buildId:t,search:n,onSearchChange:r}){let i=ye(t),l=i.data,d={...n.patchesBefore===void 0?{}:{before:n.patchesBefore},...n.patchesAfter===void 0?{}:{after:n.patchesAfter}};return(0,Z.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Z.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 items-center gap-x-2 border-b bg-background px-3 py-3 sm:min-h-12 sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,Z.jsx)(s,{className:`-ml-1 size-11 lg:size-7`}),(0,Z.jsxs)(c,{className:a({className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds`,children:[(0,Z.jsx)(u,{"data-icon":`inline-start`}),`Native builds`]}),l?(0,Z.jsxs)(`h1`,{className:`flex min-w-0 items-center gap-1.5 text-sm font-medium`,children:[(0,Z.jsx)(Ce,{className:`size-3.5 shrink-0 text-muted-foreground`,platform:l.build.platform}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5`,children:[(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 whitespace-nowrap`,children:[(0,Z.jsxs)(`span`,{className:`sr-only`,children:[y(l.build.platform),` `]}),S[l.build.artifact_kind].label,(0,Z.jsx)(De,{build:l.build})]}),(0,Z.jsxs)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[`· `,(0,Z.jsx)(`span`,{translate:`no`,children:l.channel})]})]}),(0,Z.jsx)(`span`,{className:`hidden text-xs font-normal text-muted-foreground tabular-nums sm:inline`,children:C(l.build.byte_size)})]}):(0,Z.jsx)(`h1`,{className:`sr-only`,children:`Native build`})]}),(0,Z.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,Z.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6`,children:i.isError?(0,Z.jsxs)(O,{variant:`destructive`,children:[(0,Z.jsx)(k,{}),(0,Z.jsx)(E,{children:`The native build couldn't be loaded`}),(0,Z.jsx)(D,{children:i.error.message}),(0,Z.jsx)(A,{children:(0,Z.jsxs)(o,{onClick:()=>void i.refetch(),size:`xs`,variant:`outline`,children:[(0,Z.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})})]}):l===void 0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:`Loading the native build`}),(0,Z.jsx)(e,{className:`h-56 w-full rounded-xl`}),(0,Z.jsx)(e,{className:`h-64 w-full rounded-xl`})]}):l===null?(0,Z.jsxs)(H,{className:`border py-16`,children:[(0,Z.jsxs)(R,{children:[(0,Z.jsx)(L,{variant:`icon`,children:(0,Z.jsx)(oe,{})}),(0,Z.jsx)(B,{children:`Native build not found`}),(0,Z.jsx)(V,{children:`No native build has this ID. It may have been deleted, or be from another console.`})]}),(0,Z.jsx)(z,{children:(0,Z.jsx)(c,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),to:`/native-builds`,children:`Show all native builds`})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ke,{build:l.build}),l.build.artifact_kind===`ipa`&&!X(l.build)?(0,Z.jsx)(Ye,{build:l.build}):null,(0,Z.jsx)(Pe,{detail:l}),(0,Z.jsx)(et,{detail:l}),(0,Z.jsx)(Ze,{detail:l,onPage:e=>r({...e.before===void 0?{}:{patchesBefore:e.before},...e.after===void 0?{}:{patchesAfter:e.after}}),page:d})]})})})]})}function nt(){let{buildId:e}=h.useParams(),t=h.useSearch(),n=h.useNavigate();return(0,Z.jsx)(tt,{buildId:e,onSearchChange:e=>void n({search:e,replace:!0}),search:t})}export{nt as component};
|