@hot-updater/console 1.2.0-rc.50 → 1.2.0-rc.52
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/BundleIdDisplay-CtbmyR7f.js +1 -0
- package/.output/public/assets/{FoldedRows-1NvB9gAS.js → FoldedRows-ClHLI-NM.js} +1 -1
- package/.output/public/assets/{IosInstall-BRuSakxm.js → IosInstall-1a_GRSNg.js} +1 -1
- package/.output/public/assets/{RelativeTime-m-FKh1Jb.js → RelativeTime-BQErgQRj.js} +1 -1
- package/.output/public/assets/{TargetDisplay-Ctuz3qIp.js → TargetDisplay-D0dVdFCk.js} +1 -1
- package/.output/public/assets/{index-oTXLdUR-.js → index-B8BpJ73Y.js} +2 -2
- package/.output/public/assets/{insights-BL6Z8zFv.js → insights-BrdBpqda.js} +2 -2
- package/.output/public/assets/{insights-BMjBMtJU.js → insights-DsmTCDix.js} +2 -2
- package/.output/public/assets/{insights_.distribution-C4E-JuVI.js → insights_.distribution-BHmK7ufZ.js} +1 -1
- package/.output/public/assets/{insights_.distribution-Br_CW9s9.js → insights_.distribution-BNNw0whH.js} +2 -2
- package/.output/public/assets/native-builds-B6t0ZxKP.js +1 -0
- package/.output/public/assets/{native-builds-BC0sjxPC.js → native-builds-CgPSpNsA.js} +2 -2
- package/.output/public/assets/native-builds-TF9BhYrQ.js +1 -0
- package/.output/public/assets/{native-builds_._buildId-GPlkI_2m.js → native-builds_._buildId-2rPrtz9-.js} +2 -2
- package/.output/public/assets/native-builds_._buildId-BqUOY1Az.js +1 -0
- package/.output/public/assets/{native-builds_.devices-Cox001IR.js → native-builds_.devices-B9kLHngv.js} +2 -2
- package/.output/public/assets/{native-builds_.devices-DAW19hcQ.js → native-builds_.devices-COFYZcaA.js} +1 -1
- package/.output/public/assets/{routes-C7Pv3Cfg.js → routes-DMooqgLf.js} +1 -1
- package/.output/public/assets/{routes-JJGRGqsf.js → routes-Z2IGj8MK.js} +2 -2
- package/.output/server/{__23tanstack-start-server-fn-resolver-DY-niJR4.mjs → __23tanstack-start-server-fn-resolver-5-sH58Zz.mjs} +58 -58
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
- package/.output/server/_libs/_.mjs +1 -1
- package/.output/server/_ssr/BundleIdDisplay-BckrkdA8.mjs +26 -0
- package/.output/server/_ssr/{ChannelPicker-J5HfKxSS.mjs → ChannelPicker-D6t_05Qj.mjs} +4 -4
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-C52o4oew.mjs → ConsoleFeatureUnavailable-DO9N_oMb.mjs} +6 -6
- package/.output/server/_ssr/{EventDetails-CDLSkVNA.mjs → EventDetails-eHJBruoj.mjs} +6 -6
- package/.output/server/_ssr/{FoldedRows-CrRYEVkd.mjs → FoldedRows-CVbAvnm9.mjs} +4 -4
- package/.output/server/_ssr/{HashValueDisplay-BrT2wgxk.mjs → HashValueDisplay-B8AYphB-.mjs} +2 -2
- package/.output/server/_ssr/{InsightsPageHeader-DVrudLMJ.mjs → InsightsPageHeader-BFzDTBgX.mjs} +6 -6
- package/.output/server/_ssr/{IosInstall-DcKlZU_q.mjs → IosInstall-BlvkrktH.mjs} +8 -8
- package/.output/server/_ssr/{NativeBuildsNav-BC1WIQ1W.mjs → NativeBuildsNav-AfTTpjkh.mjs} +3 -3
- package/.output/server/_ssr/{NotFoundPage-CEhZtcst.mjs → NotFoundPage-r-7WnJzQ.mjs} +2 -2
- package/.output/server/_ssr/{QrCode-Dj9BKV3l.mjs → QrCode-DEZJJw2v.mjs} +2 -2
- package/.output/server/_ssr/{RelativeTime-Dgbh4UPb.mjs → RelativeTime-D31YzeJa.mjs} +3 -3
- package/.output/server/_ssr/{RolloutPercentageBadge-BYEDUW1d.mjs → RolloutPercentageBadge-DGQCzLwL.mjs} +3 -3
- package/.output/server/_ssr/{RowReason-BweNBWkA.mjs → RowReason-XXsqcV8M.mjs} +3 -3
- package/.output/server/_ssr/{SandboxBadge-O8-kbXAw.mjs → SandboxBadge-Dsbfs84l.mjs} +2 -2
- package/.output/server/_ssr/{TargetDisplay-D3JAXwcF.mjs → TargetDisplay-Cnnda7gi.mjs} +3 -3
- package/.output/server/_ssr/{alert-dialog-CxEcyUb6.mjs → alert-dialog-CeW-6rPj.mjs} +1 -1
- package/.output/server/_ssr/{api-IIqxWeDx.mjs → api-BCfNV622.mjs} +4 -4
- package/.output/server/_ssr/{api-keys-wFak2vKN.mjs → api-keys-D41INr2x.mjs} +9 -9
- package/.output/server/_ssr/{api-keys-CYefExfc.mjs → api-keys-Pl9fE3ov.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-qkGQ3Sp3.mjs → api-keys-rpc-Dc63Z5sL.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-3NKc545A.mjs → api-rpc-CBxVNmSb.mjs} +16 -16
- package/.output/server/_ssr/{auth-rpc-PCSJzNJf.mjs → auth-rpc-DUiSq0md.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-NGj7G3bq.mjs → auth.server-COR78Byc.mjs} +532 -31
- package/.output/server/_ssr/{badge-CxSJ-pjU.mjs → badge-jJUdKmgf.mjs} +1 -1
- package/.output/server/_ssr/{card-BDXDcrk_.mjs → card-lbRho9mB.mjs} +1 -1
- package/.output/server/_ssr/{config.server-CwUGPk-F.mjs → config.server-C72Rcb2P.mjs} +3 -3
- package/.output/server/_ssr/{console-access-BOt-Xxd7.mjs → console-access-B6GCF0Pq.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-Dw_Tktev.mjs → console-features-api-GXe67Tju.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-D8VFHwYj.mjs → console-features-rpc-BB8bGBmb.mjs} +3 -3
- package/.output/server/_ssr/{databaseRows-BZMFl5QV.mjs → databaseRows-D6bc51Xq.mjs} +3 -2
- package/.output/server/_ssr/{dialog-CJ4zMagm.mjs → dialog-DLiITzNb.mjs} +1 -1
- package/.output/server/_ssr/{empty-DYy36pwa.mjs → empty-CRonI6yG.mjs} +2 -2
- package/.output/server/_ssr/{field-MI8oNc5n.mjs → field-CPlXgkpQ.mjs} +2 -2
- package/.output/server/_ssr/{getBundleChildren-CnOf4Frp.mjs → getBundleChildren-DDqsd1pL.mjs} +2 -2
- package/.output/server/_ssr/{input-group-Bf7wHa21.mjs → input-group-B0s6OlWV.mjs} +1 -1
- package/.output/server/_ssr/{insights-b3XeQlzF.mjs → insights-Bukk9Qg8.mjs} +52 -33
- package/.output/server/_ssr/{insights-CbGG5htV.mjs → insights-CVUqkV9I.mjs} +2 -2
- package/.output/server/_ssr/{insights-CKTR62Ox.mjs → insights-ToswhUey.mjs} +5 -5
- package/.output/server/_ssr/{insights-api-CqjIxe1A.mjs → insights-api-CA17vWZa.mjs} +3 -3
- package/.output/server/_ssr/{insights-failures-rpc-fmWHkLhL.mjs → insights-failures-rpc-DQ15P_rm.mjs} +4 -4
- package/.output/server/_ssr/{insights-recovery-rpc-BpwoS9XL.mjs → insights-recovery-rpc-CW4mfXig.mjs} +3 -3
- package/.output/server/_ssr/{insights-rpc-qwXzuBUQ.mjs → insights-rpc-C4Xpuj96.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-B_8PizlM.mjs → insights-search-BULxEDkP.mjs} +2 -2
- package/.output/server/_ssr/{insights-usage-rpc-D8lgk1Sk.mjs → insights-usage-rpc-BJXlIwCd.mjs} +3 -3
- package/.output/server/_ssr/{insights-usage-rpc-Cbg82l2g.mjs → insights-usage-rpc-BO2bIBYf.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-Ed2vqrwP.mjs → insights_.distribution-DRI0VBdO.mjs} +5 -5
- package/.output/server/_ssr/{insights_.distribution--XTBM-oT.mjs → insights_.distribution-PeRcluc-.mjs} +14 -14
- package/.output/server/_ssr/{insights_.distribution-DTaKryjw.mjs → insights_.distribution-SGWggxSh.mjs} +2 -2
- package/.output/server/_ssr/{installations-Ce_9dNq0.mjs → installations-B2QcWG6B.mjs} +2 -2
- package/.output/server/_ssr/{installations-W8W7AYwn.mjs → installations-C692ehbS.mjs} +4 -4
- package/.output/server/_ssr/{installations-DyfuFp3L.mjs → installations-CJjMPoSX.mjs} +11 -11
- package/.output/server/_ssr/{ios-devices-rpc-5kZM1bgU.mjs → ios-devices-rpc-C0ksMG0_.mjs} +7 -7
- package/.output/server/_ssr/{iosDeviceCookie-BTfPOUhS.mjs → iosDeviceCookie-D32VPfkD.mjs} +3 -3
- package/.output/server/_ssr/{iosDeviceProfile-BAoo32s_.mjs → iosDeviceProfile-Ci_-qRZG.mjs} +3 -3
- package/.output/server/_ssr/{iosDevices-DuNmS3td.mjs → iosDevices-Bk-459x2.mjs} +3 -3
- package/.output/server/_ssr/{native-builds-1s5DIHa2.mjs → native-builds-2zov7e9h.mjs} +2 -2
- package/.output/server/_ssr/{native-builds-lEyKQemV.mjs → native-builds-C2xGyB-t.mjs} +19 -8
- package/.output/server/_ssr/{native-builds-DEyFHKDa.mjs → native-builds-D8wSoxxF.mjs} +21 -19
- package/.output/server/_ssr/{native-builds_._buildId-mJ8i0pL8.mjs → native-builds_._buildId-B3rk9gG4.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_._buildId-ElCXKaXI.mjs → native-builds_._buildId-Do6W7jm2.mjs} +50 -40
- package/.output/server/_ssr/{native-builds_.devices-Dz8b48Fo.mjs → native-builds_.devices-KlAzG0Zy.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_.devices-DNWZLCra.mjs → native-builds_.devices-lv3e5WXD.mjs} +17 -17
- package/.output/server/_ssr/{nativeBuildDownloadLink-D8Se_CCi.mjs → nativeBuildDownloadLink-C9WaekZx.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildInstall-DemC_4Zc.mjs → nativeBuildInstall-SCpQShAb.mjs} +5 -5
- package/.output/server/_ssr/{nativeBuilds-BFSeuC75.mjs → nativeBuilds-yTOa0vdF.mjs} +5 -5
- package/.output/server/_ssr/{release-adoption-rpc-1mKibOdV.mjs → release-adoption-rpc-CC35TIiN.mjs} +6 -6
- package/.output/server/_ssr/{releaseAdoption-DfEYq7I4.mjs → releaseAdoption-BNp2LKR5.mjs} +2 -1
- package/.output/server/_ssr/{releaseCatalogCompiler-CuL3ptgg.mjs → releaseCatalogCompiler-B7k_Eask.mjs} +90 -9
- package/.output/server/_ssr/{remote-config-q9fegj-G.mjs → remote-config-B3udiYoT.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-D2Cohnwn.mjs → remote-config-Erbkr_jI.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-6hfHFrO6.mjs → remote-config-rpc-BNwGDXiU.mjs} +3 -3
- package/.output/server/_ssr/{remote-config-C_HNYPZ_.mjs → remote-config-u5wKgmdI.mjs} +18 -18
- package/.output/server/_ssr/{router-DODxASKG.mjs → router-BdIR78Dg.mjs} +35 -35
- package/.output/server/_ssr/{routes-C-nYThl0.mjs → routes-DiZ2ak9R.mjs} +10 -10
- package/.output/server/_ssr/{routes-BJjTUNSe.mjs → routes-DsdrQwy2.mjs} +31 -27
- package/.output/server/_ssr/{schema-migration-rpc-C31JquTn.mjs → schema-migration-rpc-C1KyK4Vo.mjs} +3 -3
- package/.output/server/_ssr/{select-CjACvu9s.mjs → select-E27bwyIg.mjs} +1 -1
- package/.output/server/_ssr/{server-Dyw2qgSR.mjs → server-3Oa4eaU_.mjs} +3 -3
- package/.output/server/_ssr/{sidebar-DQkRAO_e.mjs → sidebar-Di_cdJt9.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{switch-DZJSRVl3.mjs → switch-BYzRl3rt.mjs} +2 -2
- package/.output/server/_ssr/{table-BA-6GQFs.mjs → table-BbpblfLX.mjs} +1 -1
- package/.output/server/_ssr/{tabs-CtB3PIts.mjs → tabs-CUBGKQ4v.mjs} +2 -2
- package/.output/server/{_tanstack-start-manifest_v-Bfv6fYk6.mjs → _tanstack-start-manifest_v-MJAIGQWT.mjs} +30 -30
- package/.output/server/index.mjs +177 -177
- package/package.json +7 -7
- package/src/components/BundleIdDisplay.tsx +30 -3
- package/src/components/features/insights/ComparedBundlesChart.tsx +1 -0
- package/src/components/features/insights/InsightsControls.tsx +28 -4
- package/src/components/features/insights/InsightsOverview.tsx +3 -1
- package/src/components/features/insights/ReleaseCombobox.tsx +7 -2
- package/src/components/features/insights/RollbackButton.tsx +1 -1
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +3 -2
- package/src/components/features/native-builds/NativeBuildDetailPage.tsx +9 -0
- package/src/components/features/native-builds/NativeBuildsTable.tsx +7 -4
- package/src/components/features/native-builds/ServedNowCard.tsx +6 -3
- package/src/components/features/releases/ReleaseEditorSheet.tsx +6 -3
- package/src/lib/native-builds.ts +28 -20
- package/src/lib/release-adoption.ts +2 -0
- package/src/lib/server/releaseAdoption.ts +1 -0
- package/src/routes/index.tsx +5 -1
- package/.output/public/assets/BundleIdDisplay-C0X-k49t.js +0 -1
- package/.output/public/assets/native-builds-B0zJ4wjg.js +0 -1
- package/.output/public/assets/native-builds-B_pQ4D5H.js +0 -1
- package/.output/public/assets/native-builds_._buildId-CSyC7YAA.js +0 -1
- package/.output/server/_ssr/BundleIdDisplay-CGdSiouM.mjs +0 -13
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.52",
|
|
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/bsdiff": "1.2.0-rc.
|
|
63
|
-
"@hot-updater/
|
|
64
|
-
"@hot-updater/protocol": "1.2.0-rc.
|
|
65
|
-
"@hot-updater/
|
|
62
|
+
"@hot-updater/bsdiff": "1.2.0-rc.52",
|
|
63
|
+
"@hot-updater/plugin-core": "1.2.0-rc.52",
|
|
64
|
+
"@hot-updater/protocol": "1.2.0-rc.52",
|
|
65
|
+
"@hot-updater/server": "1.2.0-rc.52"
|
|
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.52",
|
|
90
|
+
"@hot-updater/mock": "1.2.0-rc.52"
|
|
91
91
|
},
|
|
92
92
|
"description": "React Native OTA solution for self-hosted",
|
|
93
93
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -2,17 +2,44 @@ import { cn } from "@/lib/utils";
|
|
|
2
2
|
|
|
3
3
|
interface BundleIdDisplayProps {
|
|
4
4
|
bundleId: string;
|
|
5
|
+
/**
|
|
6
|
+
* The release's label, shown `v12` before its ID: the name people use for
|
|
7
|
+
* it. Left out, or null for a release without one, shows the ID alone.
|
|
8
|
+
*/
|
|
9
|
+
label?: number | null;
|
|
5
10
|
maxLength?: number;
|
|
6
11
|
className?: string;
|
|
7
12
|
fullOnMobile?: boolean;
|
|
8
13
|
}
|
|
9
|
-
export function BundleIdDisplay({
|
|
10
|
-
|
|
14
|
+
export function BundleIdDisplay({
|
|
15
|
+
bundleId,
|
|
16
|
+
label,
|
|
17
|
+
className,
|
|
18
|
+
}: BundleIdDisplayProps) {
|
|
19
|
+
const id = (
|
|
11
20
|
<span
|
|
12
21
|
translate="no"
|
|
13
|
-
className={cn(
|
|
22
|
+
className={cn(
|
|
23
|
+
"break-all font-mono text-xs tabular-nums",
|
|
24
|
+
typeof label === "number" ? "text-muted-foreground" : null,
|
|
25
|
+
typeof label === "number" ? null : className,
|
|
26
|
+
)}
|
|
14
27
|
>
|
|
15
28
|
{bundleId}
|
|
16
29
|
</span>
|
|
17
30
|
);
|
|
31
|
+
if (typeof label !== "number") return id;
|
|
32
|
+
return (
|
|
33
|
+
<span
|
|
34
|
+
className={cn("inline-flex min-w-0 items-baseline gap-1.5", className)}
|
|
35
|
+
>
|
|
36
|
+
<span
|
|
37
|
+
translate="no"
|
|
38
|
+
className="shrink-0 font-medium text-sm text-foreground tabular-nums"
|
|
39
|
+
>
|
|
40
|
+
v{label}
|
|
41
|
+
</span>
|
|
42
|
+
{/* Read and copied as "v12 <id>"; the flex gap draws the space. */} {id}
|
|
43
|
+
</span>
|
|
44
|
+
);
|
|
18
45
|
}
|
|
@@ -206,7 +206,7 @@ export function InsightsControls({
|
|
|
206
206
|
candidates={releases}
|
|
207
207
|
excluded={filters.releaseId ? [filters.releaseId] : []}
|
|
208
208
|
label="Search releases"
|
|
209
|
-
placeholder="Search by ID or app version…"
|
|
209
|
+
placeholder="Search by label, ID or app version…"
|
|
210
210
|
onPick={(release) =>
|
|
211
211
|
onFiltersChange({ releaseId: release.releaseId })
|
|
212
212
|
}
|
|
@@ -218,9 +218,14 @@ export function InsightsControls({
|
|
|
218
218
|
>
|
|
219
219
|
<span className="text-muted-foreground">Release</span>
|
|
220
220
|
{filters.releaseId ? (
|
|
221
|
-
<
|
|
222
|
-
{filters.releaseId}
|
|
223
|
-
|
|
221
|
+
<PickedRelease
|
|
222
|
+
releaseId={filters.releaseId}
|
|
223
|
+
label={
|
|
224
|
+
releases.find(
|
|
225
|
+
({ releaseId }) => releaseId === filters.releaseId,
|
|
226
|
+
)?.label ?? null
|
|
227
|
+
}
|
|
228
|
+
/>
|
|
224
229
|
) : (
|
|
225
230
|
"All"
|
|
226
231
|
)}
|
|
@@ -241,3 +246,22 @@ export function InsightsControls({
|
|
|
241
246
|
</div>
|
|
242
247
|
);
|
|
243
248
|
}
|
|
249
|
+
|
|
250
|
+
/** The picked release: its label when the loaded releases have it, else its ID. */
|
|
251
|
+
function PickedRelease({
|
|
252
|
+
releaseId,
|
|
253
|
+
label,
|
|
254
|
+
}: {
|
|
255
|
+
readonly releaseId: string;
|
|
256
|
+
readonly label: number | null;
|
|
257
|
+
}) {
|
|
258
|
+
return label === null ? (
|
|
259
|
+
<span className="max-w-36 truncate font-mono" translate="no">
|
|
260
|
+
{releaseId}
|
|
261
|
+
</span>
|
|
262
|
+
) : (
|
|
263
|
+
<span className="tabular-nums" title={releaseId} translate="no">
|
|
264
|
+
v{label}
|
|
265
|
+
</span>
|
|
266
|
+
);
|
|
267
|
+
}
|
|
@@ -430,6 +430,7 @@ export function InsightsOverview({
|
|
|
430
430
|
<BundleIdDisplay
|
|
431
431
|
bundleId={bundle.release.releaseId}
|
|
432
432
|
className="text-sm"
|
|
433
|
+
label={bundle.release.label}
|
|
433
434
|
/>
|
|
434
435
|
</AlertTitle>
|
|
435
436
|
<AlertDescription className="flex flex-col items-start gap-3">
|
|
@@ -524,6 +525,7 @@ export function InsightsOverview({
|
|
|
524
525
|
<BundleIdDisplay
|
|
525
526
|
bundleId={release.releaseId}
|
|
526
527
|
className="min-w-0"
|
|
528
|
+
label={release.label}
|
|
527
529
|
/>
|
|
528
530
|
{release.enabled ? null : (
|
|
529
531
|
<Badge variant="outline">Disabled</Badge>
|
|
@@ -640,7 +642,7 @@ export function InsightsOverview({
|
|
|
640
642
|
placeholder={
|
|
641
643
|
full
|
|
642
644
|
? `Up to ${MAX_ADOPTION_RELEASES} bundles`
|
|
643
|
-
: "Add a bundle by ID or app version…"
|
|
645
|
+
: "Add a bundle by label, ID or app version…"
|
|
644
646
|
}
|
|
645
647
|
onPick={(release) =>
|
|
646
648
|
onReleasesChange([...ids, release.releaseId])
|
|
@@ -31,9 +31,10 @@ type ReleaseGroup = {
|
|
|
31
31
|
readonly items: readonly AdoptionRelease[];
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
/** Whether a bundle deployment matches what was typed: its IDs or target app version. */
|
|
34
|
+
/** Whether a bundle deployment matches what was typed: its label, IDs or target app version. */
|
|
35
35
|
const matches = (release: AdoptionRelease, typed: string) =>
|
|
36
36
|
typed === "" ||
|
|
37
|
+
(release.label !== null && `v${release.label}` === typed) ||
|
|
37
38
|
release.releaseId.includes(typed) ||
|
|
38
39
|
release.bundleId.toLowerCase().includes(typed) ||
|
|
39
40
|
(release.targetAppVersion ?? "").toLowerCase().includes(typed);
|
|
@@ -49,7 +50,11 @@ export function ReleaseOption({
|
|
|
49
50
|
<span className="flex min-w-0 items-center gap-1.5">
|
|
50
51
|
<PlatformIcon platform={release.platform} className="size-3 shrink-0" />
|
|
51
52
|
<span className="sr-only">{platformLabel(release.platform)}</span>
|
|
52
|
-
<BundleIdDisplay
|
|
53
|
+
<BundleIdDisplay
|
|
54
|
+
bundleId={release.releaseId}
|
|
55
|
+
className="min-w-0"
|
|
56
|
+
label={release.label}
|
|
57
|
+
/>
|
|
53
58
|
</span>
|
|
54
59
|
<span className="text-xs text-muted-foreground">
|
|
55
60
|
Deployed {formatDeployedAt(release.deployedAtMs)}
|
|
@@ -92,7 +92,7 @@ export function RollbackButton({
|
|
|
92
92
|
<AlertDialogContent>
|
|
93
93
|
<AlertDialogHeader>
|
|
94
94
|
<AlertDialogTitle>Roll back this bundle?</AlertDialogTitle>
|
|
95
|
-
<BundleIdDisplay bundleId={id} />
|
|
95
|
+
<BundleIdDisplay bundleId={id} label={release.label} />
|
|
96
96
|
<AlertDialogDescription>
|
|
97
97
|
It crashed for {percent(rate)} of the installations that tried it (
|
|
98
98
|
{crashes.toLocaleString()} of {attempts.toLocaleString()}). Rolling
|
|
@@ -12,6 +12,7 @@ import { useMarkNativeBuildMutation } from "@/lib/api";
|
|
|
12
12
|
import {
|
|
13
13
|
nativeBuildArtifacts,
|
|
14
14
|
nativeBuildLabel,
|
|
15
|
+
nativeBuildVersionLabel,
|
|
15
16
|
platformLabel,
|
|
16
17
|
SANDBOX_NO_PATCH_BASE,
|
|
17
18
|
} from "@/lib/native-builds";
|
|
@@ -198,10 +199,10 @@ export function BuiltInBundleCard({
|
|
|
198
199
|
<BuildKeyDisplay value={build.build_key} />
|
|
199
200
|
</span>
|
|
200
201
|
</Row>
|
|
201
|
-
{
|
|
202
|
+
{nativeBuildVersionLabel(build) === null ? null : (
|
|
202
203
|
<Row label="Build">
|
|
203
204
|
<span className="font-mono text-xs tabular-nums" translate="no">
|
|
204
|
-
{build
|
|
205
|
+
{nativeBuildVersionLabel(build)}
|
|
205
206
|
</span>
|
|
206
207
|
</Row>
|
|
207
208
|
)}
|
|
@@ -25,6 +25,7 @@ import { ALL_CHANNELS } from "@/lib/constants";
|
|
|
25
25
|
import {
|
|
26
26
|
formatByteSize,
|
|
27
27
|
nativeBuildArtifacts,
|
|
28
|
+
nativeBuildVersionLabel,
|
|
28
29
|
platformLabel,
|
|
29
30
|
} from "@/lib/native-builds";
|
|
30
31
|
|
|
@@ -105,6 +106,14 @@ export function NativeBuildDetailPage({
|
|
|
105
106
|
{nativeBuildArtifacts[detail.build.artifact_kind].label}
|
|
106
107
|
<SandboxBadge build={detail.build} />
|
|
107
108
|
</span>
|
|
109
|
+
{nativeBuildVersionLabel(detail.build) ? (
|
|
110
|
+
<span
|
|
111
|
+
className="font-mono whitespace-nowrap tabular-nums"
|
|
112
|
+
translate="no"
|
|
113
|
+
>
|
|
114
|
+
{nativeBuildVersionLabel(detail.build)}
|
|
115
|
+
</span>
|
|
116
|
+
) : null}
|
|
108
117
|
<span className="min-w-0 [overflow-wrap:anywhere]">
|
|
109
118
|
· <span translate="no">{detail.channel}</span>
|
|
110
119
|
</span>
|
|
@@ -57,6 +57,7 @@ import { ALL_CHANNELS } from "@/lib/constants";
|
|
|
57
57
|
import {
|
|
58
58
|
formatByteSize,
|
|
59
59
|
nativeBuildArtifacts,
|
|
60
|
+
nativeBuildVersionLabel,
|
|
60
61
|
nativeBuildChannel,
|
|
61
62
|
platformLabel,
|
|
62
63
|
} from "@/lib/native-builds";
|
|
@@ -292,10 +293,12 @@ function StoreBadges({
|
|
|
292
293
|
);
|
|
293
294
|
}
|
|
294
295
|
|
|
296
|
+
/** The build as the stores show it, such as `1.7.0 (66)`. */
|
|
295
297
|
function BuildNumber({ build }: { readonly build: NativeBuildRow }) {
|
|
296
|
-
|
|
298
|
+
const label = nativeBuildVersionLabel(build);
|
|
299
|
+
return label ? (
|
|
297
300
|
<span className="font-mono tabular-nums" translate="no">
|
|
298
|
-
{
|
|
301
|
+
{label}
|
|
299
302
|
</span>
|
|
300
303
|
) : (
|
|
301
304
|
<NoValue />
|
|
@@ -416,12 +419,12 @@ function BuildCard({
|
|
|
416
419
|
</div>
|
|
417
420
|
<p className="flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground">
|
|
418
421
|
<span className="sr-only">{platformLabel(build.platform)}</span>
|
|
419
|
-
{build
|
|
422
|
+
{nativeBuildVersionLabel(build) ? (
|
|
420
423
|
<>
|
|
421
424
|
<span translate="no">
|
|
422
425
|
Build{" "}
|
|
423
426
|
<span className="font-mono tabular-nums text-foreground">
|
|
424
|
-
{build
|
|
427
|
+
{nativeBuildVersionLabel(build)}
|
|
425
428
|
</span>
|
|
426
429
|
</span>
|
|
427
430
|
<span aria-hidden="true">·</span>
|
|
@@ -2,6 +2,7 @@ import { NUMERIC_COHORT_SIZE } from "@hot-updater/protocol";
|
|
|
2
2
|
import { Link } from "@tanstack/react-router";
|
|
3
3
|
import { ArrowUpRight, PackageOpen } from "lucide-react";
|
|
4
4
|
|
|
5
|
+
import { BundleIdDisplay } from "@/components/BundleIdDisplay";
|
|
5
6
|
import { RolloutPercentageBadge } from "@/components/RolloutPercentageBadge";
|
|
6
7
|
import { TimestampDisplay } from "@/components/TimestampDisplay";
|
|
7
8
|
import { Badge } from "@/components/ui/badge";
|
|
@@ -181,13 +182,15 @@ export function ServedNowCard({
|
|
|
181
182
|
<TableCell className="py-3 whitespace-normal">
|
|
182
183
|
<div className="flex min-w-0 flex-col gap-1">
|
|
183
184
|
<Link
|
|
184
|
-
className="
|
|
185
|
+
className="underline-offset-4 hover:underline"
|
|
185
186
|
search={{ releaseId: release.releaseId }}
|
|
186
187
|
title={bundleId}
|
|
187
188
|
to="/"
|
|
188
|
-
translate="no"
|
|
189
189
|
>
|
|
190
|
-
|
|
190
|
+
<BundleIdDisplay
|
|
191
|
+
bundleId={bundleId}
|
|
192
|
+
label={release.label}
|
|
193
|
+
/>
|
|
191
194
|
</Link>
|
|
192
195
|
{release.message ? (
|
|
193
196
|
<span className="text-xs text-muted-foreground">
|
|
@@ -370,6 +370,7 @@ export function ReleaseEditorSheet({
|
|
|
370
370
|
<BundleIdDisplay
|
|
371
371
|
bundleId={release.id}
|
|
372
372
|
fullOnMobile
|
|
373
|
+
label={release.label}
|
|
373
374
|
maxLength={18}
|
|
374
375
|
/>
|
|
375
376
|
{!release.bundle_id ? (
|
|
@@ -888,17 +889,19 @@ export function ReleaseEditorSheet({
|
|
|
888
889
|
onClick={async () => {
|
|
889
890
|
if (!release) return;
|
|
890
891
|
try {
|
|
891
|
-
await promote.mutateAsync({
|
|
892
|
+
const promoted = await promote.mutateAsync({
|
|
892
893
|
action: promoteAction,
|
|
893
894
|
expectedRevision: release.revision,
|
|
894
895
|
releaseId: release.id,
|
|
895
896
|
targetChannel: normalizedTargetChannel,
|
|
896
897
|
});
|
|
897
898
|
handlePromoteOpenChange(false);
|
|
899
|
+
const label = promoted.target.release?.label;
|
|
900
|
+
const as = typeof label === "number" ? ` as v${label}` : "";
|
|
898
901
|
toast.success(
|
|
899
902
|
isCopyPromotion
|
|
900
|
-
? `Bundle copied to ${normalizedTargetChannel}`
|
|
901
|
-
: `Bundle moved to ${normalizedTargetChannel}`,
|
|
903
|
+
? `Bundle copied to ${normalizedTargetChannel}${as}`
|
|
904
|
+
: `Bundle moved to ${normalizedTargetChannel}${as}`,
|
|
902
905
|
);
|
|
903
906
|
} catch (caught) {
|
|
904
907
|
toast.error(
|
package/src/lib/native-builds.ts
CHANGED
|
@@ -70,31 +70,39 @@ export const nativeBuildPathKey = (
|
|
|
70
70
|
export const platformLabel = (platform: "ios" | "android") =>
|
|
71
71
|
platform === "ios" ? "iOS" : "Android";
|
|
72
72
|
|
|
73
|
+
type NativeBuildVersionFields = Pick<
|
|
74
|
+
NativeBuildRow,
|
|
75
|
+
"submitted_version" | "app_version" | "native_app_version" | "build_number"
|
|
76
|
+
>;
|
|
77
|
+
|
|
73
78
|
/**
|
|
74
|
-
* A build as the
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
79
|
+
* A build's label as the stores show it, such as `1.7.0 (66)`: the store's
|
|
80
|
+
* own label once a store took it, else the version its artifact reports and
|
|
81
|
+
* its build number, or the build number alone when the version can't be read.
|
|
82
|
+
* Null without a build number. The CLI prints the same string.
|
|
83
|
+
*/
|
|
84
|
+
export const nativeBuildVersionLabel = (
|
|
85
|
+
build: NativeBuildVersionFields,
|
|
86
|
+
): string | null => {
|
|
87
|
+
if (build.submitted_version) return build.submitted_version;
|
|
88
|
+
if (build.build_number === null) return null;
|
|
89
|
+
const version = build.native_app_version ?? build.app_version;
|
|
90
|
+
return version ? `${version} (${build.build_number})` : build.build_number;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* A build as the CLI names it, such as `iOS 1.7.0 (66)`: its platform and
|
|
95
|
+
* `nativeBuildVersionLabel`, or its version without a build number. Null when
|
|
96
|
+
* it reports neither, for the caller to name it another way.
|
|
78
97
|
*/
|
|
79
98
|
export const nativeBuildLabel = (
|
|
80
|
-
build: Pick<
|
|
81
|
-
NativeBuildRow,
|
|
82
|
-
| "platform"
|
|
83
|
-
| "submitted_version"
|
|
84
|
-
| "app_version"
|
|
85
|
-
| "native_app_version"
|
|
86
|
-
| "build_number"
|
|
87
|
-
>,
|
|
99
|
+
build: NativeBuildVersionFields & Pick<NativeBuildRow, "platform">,
|
|
88
100
|
): string | null => {
|
|
89
101
|
const label =
|
|
90
|
-
build
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
]
|
|
95
|
-
.filter((part) => part !== null)
|
|
96
|
-
.join(" ");
|
|
97
|
-
return label === "" ? null : `${platformLabel(build.platform)} ${label}`;
|
|
102
|
+
nativeBuildVersionLabel(build) ??
|
|
103
|
+
build.native_app_version ??
|
|
104
|
+
build.app_version;
|
|
105
|
+
return label ? `${platformLabel(build.platform)} ${label}` : null;
|
|
98
106
|
};
|
|
99
107
|
|
|
100
108
|
/** The console route that redirects to a build's artifact in storage. */
|
|
@@ -24,6 +24,8 @@ export type HealthPlatform = "all" | "ios" | "android";
|
|
|
24
24
|
/** A deployed bundle, as Release health labels and rolls it back. */
|
|
25
25
|
export type AdoptionRelease = {
|
|
26
26
|
readonly releaseId: string;
|
|
27
|
+
/** The release's label, shown `v12`; null for a release without one. */
|
|
28
|
+
readonly label: number | null;
|
|
27
29
|
readonly bundleId: string;
|
|
28
30
|
readonly platform: "ios" | "android";
|
|
29
31
|
readonly deployedAtMs: number;
|
package/src/routes/index.tsx
CHANGED
|
@@ -332,7 +332,11 @@ function BundleEntry({
|
|
|
332
332
|
title={release.id}
|
|
333
333
|
type="button"
|
|
334
334
|
>
|
|
335
|
-
<BundleIdDisplay
|
|
335
|
+
<BundleIdDisplay
|
|
336
|
+
bundleId={release.id}
|
|
337
|
+
fullOnMobile
|
|
338
|
+
label={release.label}
|
|
339
|
+
/>
|
|
336
340
|
{!release.bundle_id ? (
|
|
337
341
|
<span className="inline-flex items-center gap-1.5 text-sm">
|
|
338
342
|
<RotateCcw className="size-3.5" /> Built-in bundle
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Di as e,vr as t}from"./sidebar-BmzmPGuv.js";var n=e();function r({bundleId:e,className:r}){return(0,n.jsx)(`span`,{translate:`no`,className:t(`break-all font-mono text-xs tabular-nums`,r),children:e})}export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Di as e,Vr as t,_r as n,gr as r,h as i,p as a}from"./sidebar-BmzmPGuv.js";import{t as o}from"./link-CRMwpc7-.js";import{u as s}from"./useCompositeListItem-BEDqZ9Ni.js";import{t as c}from"./arrow-up-right-C_1ALUCD.js";import{i as l,n as u,r as d,t as f}from"./TargetDisplay-Ctuz3qIp.js";import{o as p,t as ee}from"./-native-builds-search-6aptbS4G.js";import{t as m}from"./history-Ci4dhphE.js";import{C as h,d as g,g as _,h as v,x as y}from"./native-builds-B_pQ4D5H.js";import{r as b}from"./dist-BEmib-ZM.js";import{a as x,i as S,n as C,o as w,r as T,t as te}from"./badge-zMibJGR5.js";import{i as ne}from"./constants-yj-e3ahf.js";import{g as re,i as ie,p as ae}from"./api-znPyglTl.js";import{t as E}from"./native-builds-BC0sjxPC.js";import{n as oe,t as se}from"./PlatformIcon-D4KPXCHL.js";import{a as ce,n as le,o as ue,r as de,s as fe,t as pe}from"./dialog-BvZDZzdQ.js";import{i as D,r as O}from"./table-DbZPkzdz.js";import{n as me,t as he}from"./RowReason-BvIxbpPP.js";import{t as ge}from"./ChannelPicker-DPR-7lqV.js";import{a as _e,c as ve,d as ye,f as be,i as xe,l as Se,n as k,o as A,p as j,r as Ce,s as M,t as N,u as we}from"./RelativeTime-m-FKh1Jb.js";import{a as Te,c as Ee,i as P,n as De,o as Oe,r as F,s as ke,t as Ae}from"./FoldedRows-1NvB9gAS.js";import{n as I}from"./NativeBuildsNav-ChBahvFN.js";import{i as je,n as Me,r as L,t as R}from"./SandboxBadge-DPmJn40v.js";var Ne=t(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),z=e(),B=`npx hot-updater native-build import <file>`,V=`https://hot-updater.dev/docs/guides/native-build#import-a-build-made-elsewhere`;function Pe(){return(0,z.jsxs)(pe,{children:[(0,z.jsxs)(fe,{render:(0,z.jsx)(r,{"aria-label":`Import a build`,className:`min-h-11 min-w-11 sm:min-h-7 sm:min-w-0`,size:`sm`,variant:`outline`}),children:[(0,z.jsx)(Ne,{"data-icon":`inline-start`}),(0,z.jsx)(`span`,{className:`hidden sm:inline`,children:`Import a build`})]}),(0,z.jsxs)(le,{className:`sm:max-w-lg`,children:[(0,z.jsxs)(ce,{children:[(0,z.jsx)(ue,{children:`Import a build`}),(0,z.jsx)(de,{children:`Track an .ipa, .aab, .apk or .app built elsewhere as a patch base.`})]}),(0,z.jsx)(l,{label:`the import command`,value:B,wrap:!0}),(0,z.jsxs)(`a`,{className:n({className:`min-h-11 w-full sm:min-h-8 sm:w-fit`,variant:`outline`}),href:V,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,z.jsx)(c,{"data-icon":`inline-end`})]})]})]})}var Fe={"app-store":`App Store`,"ad-hoc":`ad hoc`,development:`development`,enterprise:`enterprise`},H=e=>{let t=v[e.artifact_kind].label,n=e.submitted_to===null?e.artifact_kind===`ipa`&&e.export_method!==null?`${Fe[e.export_method]} ${t}`:t:`${je[e.submitted_to]} build`;return e.is_sandbox?`sandbox ${n}`:n},Ie=e=>{if(e===void 0)return{sentence:`A newer build on its channel reaches people the same way.`,label:`Older: a newer build on its channel reaches people the same way`};let t=y(e);return{sentence:`A newer ${H(e)} exists${t===null?`.`:`: ${t}`}`,label:`Older: a newer ${H(e)} exists${t===null?``:`, ${t}`}`}};function U({newer:e}){let t=Ie(e);return(0,z.jsx)(he,{icon:m,label:t.label,reason:t.sentence,children:`Older`})}var Le=`https://hot-updater.dev/docs/guides/native-build#how-a-build-is-tracked`,W=9,G=e=>e===void 0?{channels:`all`}:{channel:e},Re={one:`older build`,other:`older builds`};function ze({channel:e,paged:t,folded:i,onClearChannel:a}){return t||i?(0,z.jsx)(M,{icon:p,title:i?`Each build here has a newer one`:`No more native builds`,children:(0,z.jsx)(o,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),search:G(e),to:`/native-builds`,children:`Show the newest builds`})}):e===void 0?(0,z.jsxs)(M,{icon:p,title:`No native builds`,children:[(0,z.jsxs)(`p`,{children:[`Build one with`,` `,(0,z.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build android`}),` or`,` `,(0,z.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build ios`}),`, or import one built elsewhere:`]}),(0,z.jsx)(`div`,{className:`w-full text-left`,children:(0,z.jsx)(l,{label:`the import command`,value:B,wrap:!0})}),(0,z.jsxs)(`a`,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),href:Le,rel:`noreferrer`,target:`_blank`,children:[`Native build guide`,(0,z.jsx)(c,{"data-icon":`inline-end`})]}),(0,z.jsxs)(`a`,{className:n({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:V,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,z.jsx)(c,{"data-icon":`inline-end`})]})]}):(0,z.jsxs)(M,{icon:p,title:(0,z.jsxs)(z.Fragment,{children:[`No native build embeds `,(0,z.jsx)(`span`,{translate:`no`,children:e})]}),children:[(0,z.jsx)(`p`,{children:`A build embeds the channel it was built on. Build one on this channel, or list every channel's builds.`}),(0,z.jsx)(r,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:a,variant:`outline`,children:`Show all channels`})]})}var K=e=>`${h(e.platform)} ${v[e.artifact_kind].label}`;function q({build:e}){return(0,z.jsx)(o,{"aria-label":K(e),className:`relative rounded-sm font-medium whitespace-nowrap text-foreground transition-colors underline-offset-4 after:absolute after:-inset-x-[10px] after:-inset-y-[10px] hover:text-primary hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:after:hidden`,params:{buildId:e.id},to:`/native-builds/$buildId`,children:v[e.artifact_kind].label})}function J({build:e,inTable:t=!1,older:n=!1,newer:r}){return t?(0,z.jsxs)(`span`,{className:`flex max-w-24 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,z.jsx)(q,{build:e}),(0,z.jsx)(R,{build:e}),n?(0,z.jsx)(U,{newer:r}):null]}):(0,z.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,z.jsx)(q,{build:e}),(0,z.jsx)(R,{build:e})]})}function Y({channel:e,onChannel:t}){return(0,z.jsx)(`button`,{"aria-label":`Show the builds that embed ${e}`,className:`relative flex max-w-full min-w-0 rounded-md text-left after:absolute after:-inset-x-1 after:-inset-y-[11px] focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:after:hidden`,onClick:()=>t(e),title:e,type:`button`,children:(0,z.jsx)(me,{channel:e,className:`block max-w-32 truncate`})})}function Be({build:e}){return!L(e)&&!e.is_store_build?(0,z.jsx)(u,{}):(0,z.jsx)(X,{build:e,className:`flex flex-col items-start gap-1`})}function X({build:e,className:t}){return(0,z.jsxs)(`span`,{className:t,children:[(0,z.jsx)(Me,{build:e}),e.is_store_build?(0,z.jsx)(te,{className:`px-1.5`,variant:`muted`,children:`Store build`}):null]})}function Ve({build:e}){return e.build_number?(0,z.jsx)(`span`,{className:`font-mono tabular-nums`,translate:`no`,children:e.build_number}):(0,z.jsx)(u,{})}var Z=e=>ne(e.id);function Q({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=_(e);return(0,z.jsxs)(ye,{"aria-label":`Open native build ${e.id}`,className:`data-[older=true]:bg-muted/60 data-[older=true]:saturate-50 data-[older=true]:hover:bg-muted/60 data-[older=true]:hover:saturate-100 data-[older=true]:focus-within:saturate-100`,"data-older":t?!0:void 0,onOpen:()=>void i({to:`/native-builds/$buildId`,params:{buildId:e.id}}),children:[(0,z.jsx)(O,{children:(0,z.jsx)(J,{build:e,inTable:!0,newer:n,older:t})}),(0,z.jsx)(O,{children:(0,z.jsx)(Y,{channel:a,onChannel:r})}),(0,z.jsx)(O,{className:`whitespace-nowrap`,children:(0,z.jsx)(oe,{platform:e.platform})}),(0,z.jsx)(O,{children:(0,z.jsx)(Ve,{build:e})}),(0,z.jsx)(O,{children:(0,z.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})}),(0,z.jsx)(O,{children:(0,z.jsx)(f,{value:e.build_key})}),(0,z.jsx)(O,{children:(0,z.jsx)(Be,{build:e})}),(0,z.jsx)(O,{className:`whitespace-nowrap text-muted-foreground tabular-nums`,children:g(e.byte_size)}),(0,z.jsx)(O,{className:`text-xs text-muted-foreground`,children:(0,z.jsx)(N,{ms:Z(e)})})]})}function $({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=_(e),o=L(e)||e.is_store_build;return(0,z.jsxs)(k,{"aria-label":`Native build ${K(e)} ${e.id}`,className:`gap-3 border-b-0 data-[older=true]:bg-muted/60 data-[older=true]:saturate-50 data-[older=true]:hover:bg-muted/60 data-[older=true]:hover:saturate-100 data-[older=true]:focus-within:saturate-100`,"data-older":t?!0:void 0,onClick:j(()=>void i({to:`/native-builds/$buildId`,params:{buildId:e.id}})),children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-x-2.5`,children:[(0,z.jsx)(se,{className:`size-4 shrink-0 text-muted-foreground`,platform:e.platform}),(0,z.jsx)(J,{build:e}),t?(0,z.jsx)(U,{newer:n}):null]}),(0,z.jsx)(`div`,{className:`flex min-w-0`,children:(0,z.jsx)(Y,{channel:a,onChannel:r})}),(0,z.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,z.jsx)(`span`,{className:`sr-only`,children:h(e.platform)}),e.build_number?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`span`,{translate:`no`,children:[`Build`,` `,(0,z.jsx)(`span`,{className:`font-mono tabular-nums text-foreground`,children:e.build_number})]}),(0,z.jsx)(`span`,{"aria-hidden":`true`,children:`·`})]}):null,(0,z.jsx)(`span`,{className:`tabular-nums`,children:g(e.byte_size)}),(0,z.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,z.jsx)(N,{ms:Z(e)})]}),(0,z.jsxs)(`div`,{className:`flex flex-wrap items-end gap-x-4 gap-y-6 text-xs`,children:[(0,z.jsxs)(`span`,{className:`flex items-center`,children:[(0,z.jsx)(`span`,{className:`sr-only`,children:`Target `}),(0,z.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})]}),e.build_key?(0,z.jsxs)(`span`,{className:`flex items-center`,children:[(0,z.jsx)(`span`,{className:`sr-only`,children:`Build key `}),(0,z.jsx)(f,{value:e.build_key})]}):null]}),o?(0,z.jsx)(X,{build:e,className:`flex flex-wrap items-center gap-1.5`}):null]})}function He({fold:e,channel:t,isMobile:n,open:r,onOpenChange:i,onChannel:a}){let o=ae(t,{...e.from===void 0?{}:{from:e.from},to:e.to},r),s=o.data?.pages??[],c=Object.assign({},...s.map(e=>e.newer)),l=s.flatMap(e=>e.rows),u=n?void 0:W,d=o.isError?(0,z.jsx)(F,{columns:u,label:`Older builds`,onRetry:()=>void o.refetch(),state:`error`}):o.isPending||o.isFetchingNextPage?(0,z.jsx)(F,{columns:u,label:`Loading older builds`,state:`loading`}):o.hasNextPage?(0,z.jsx)(F,{columns:u,label:`Older builds`,onMore:()=>void o.fetchNextPage(),state:`more`}):null,f={label:Te(e,Re),open:r,onOpenChange:i,panelId:`native-build-fold-${e.to}`};return n?(0,z.jsxs)(Ae,{...f,inList:!0,children:[l.map(e=>(0,z.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,z.jsx)($,{build:e,newer:c[e.id],older:!0,onChannel:a})},e.id)),d]}):(0,z.jsxs)(De,{...f,columns:W,children:[l.map(e=>(0,z.jsx)(Q,{build:e,newer:c[e.id],older:!0,onChannel:a},e.id)),d]})}function Ue({builds:e,channel:t,paged:n,onChannel:a}){let o=i(),s=Ee(),c=e.data?.entries,{next:l,previous:u}=e.data??{},d=c?.filter(({kind:e})=>e===`row`).length??0;if(e.isError)return(0,z.jsxs)(C,{variant:`destructive`,children:[(0,z.jsx)(w,{}),(0,z.jsx)(x,{children:`Native builds couldn't be loaded`}),(0,z.jsx)(S,{children:`Check your connection and try again.`}),(0,z.jsx)(T,{children:(0,z.jsxs)(r,{onClick:()=>void e.refetch(),size:`xs`,variant:`outline`,children:[(0,z.jsx)(b,{"data-icon":`inline-start`}),`Retry`]})})]});let f=(0,z.jsx)(ze,{channel:t,folded:(c?.length??0)>0,onClearChannel:()=>a(void 0),paged:n}),p=e=>(0,z.jsx)(He,{channel:t,fold:e,isMobile:o,onChannel:a,onOpenChange:t=>s.set(P(e),t),open:s.isOpen(P(e))},`fold-${e.to}`);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(ve,{children:o?(0,z.jsx)(`div`,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`h-full overflow-y-auto aria-busy:opacity-60`,role:`list`,children:e.isPending?(0,z.jsx)(Ce,{label:`Loading native builds`}):(0,z.jsxs)(z.Fragment,{children:[d===0?(0,z.jsx)(xe,{children:f}):null,c?.map(e=>e.kind===`fold`?p(e):(0,z.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,z.jsx)($,{build:e.row,onChannel:a})},e.row.id))]})}):(0,z.jsx)(_e,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`aria-busy:opacity-60 [&_td]:px-1.5 [&_th]:px-1.5`,header:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(D,{children:`Artifact`}),(0,z.jsx)(D,{children:`Channel`}),(0,z.jsx)(D,{children:`Platform`}),(0,z.jsx)(D,{children:`Build`}),(0,z.jsx)(D,{children:`Target`}),(0,z.jsx)(D,{children:`Build key`}),(0,z.jsx)(D,{children:`Store`}),(0,z.jsx)(D,{children:`Size`}),(0,z.jsx)(D,{children:`Created`})]}),rowGroups:!0,children:e.isPending?(0,z.jsx)(A,{children:(0,z.jsx)(be,{columns:W,label:`Loading native builds`})}):(0,z.jsxs)(z.Fragment,{children:[d===0?(0,z.jsx)(A,{children:(0,z.jsx)(Se,{columns:W,children:f})}):null,ke(c??[]).map(e=>e.kind===`fold`?p(e.fold):(0,z.jsx)(A,{children:e.rows.map(e=>(0,z.jsx)(Q,{build:e,onChannel:a},e.id))},`rows-${e.rows[0].id}`))]})})}),e.isPending||c===void 0?null:(0,z.jsx)(we,{count:d,folded:{...Oe(c),label:`older`},label:`Native build pages`,noun:[`build`,`builds`],pending:e.isPlaceholderData,newest:n?{search:G(t),to:`/native-builds`}:void 0,next:l===void 0?void 0:{search:{...G(t),before:l},to:`/native-builds`},previous:u===void 0?void 0:{search:{...G(t),...u},to:`/native-builds`}})]})}var We={data:void 0,isError:!1,isPending:!0,isPlaceholderData:!1,refetch:()=>void 0};function Ge({search:e,onSearchChange:t}){let n=ie(),i=n.data?.map(({name:e})=>e)??[],o=ee(e,n.data&&i),s=o===void 0,c=s&&n.isError,{channel:l,before:u,after:d}=o??e,f=re(o??{},{enabled:!s}),m=s?We:f,h=e=>t(e===void 0?{channels:`all`}:{channel:e});return(0,z.jsxs)(`div`,{className:`flex h-svh min-h-0 min-w-0 flex-col`,children:[(0,z.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b bg-background px-3 py-3 sm:min-h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,z.jsx)(a,{className:`-ml-1 size-11 lg:size-7`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,z.jsx)(p,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,z.jsx)(`h1`,{className:`text-sm font-medium`,children:`Native builds`})]}),(0,z.jsx)(`p`,{className:`basis-full pl-12 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`Store and test builds, each the built-in bundle its OTAs patch from.`})]}),(0,z.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4 bg-muted/5 p-3 sm:p-6`,children:[(0,z.jsx)(I,{current:`builds`}),(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,z.jsx)(ge,{allChannels:!0,className:`max-sm:min-w-0 max-sm:basis-full`,onValueChange:h,pending:s,value:l}),(0,z.jsx)(`div`,{className:`ml-auto`,children:(0,z.jsx)(Pe,{})}),(0,z.jsx)(r,{"aria-label":`Refresh native builds`,className:`size-11 sm:size-7`,disabled:m.isPending,onClick:()=>void m.refetch(),size:`icon-sm`,variant:`ghost`,children:(0,z.jsx)(b,{"aria-hidden":`true`})})]}),c?(0,z.jsxs)(C,{variant:`destructive`,children:[(0,z.jsx)(w,{}),(0,z.jsx)(x,{children:`Channels couldn't be loaded`}),(0,z.jsx)(S,{children:`Native builds show once the channels load.`}),(0,z.jsx)(T,{children:(0,z.jsxs)(r,{className:`min-h-11 sm:min-h-7`,onClick:()=>void n.refetch(),size:`xs`,variant:`outline`,children:[(0,z.jsx)(b,{"data-icon":`inline-start`}),`Retry`]})})]}):(0,z.jsx)(Ue,{builds:m,channel:l,onChannel:h,paged:u!==void 0||d!==void 0})]})]})}function Ke(){let e=E.useSearch(),t=E.useNavigate();return(0,z.jsx)(Ge,{onSearchChange:e=>void t({search:e}),search:e})}export{Ke as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Vr as e}from"./sidebar-BmzmPGuv.js";import{g as t,h as n}from"./constants-yj-e3ahf.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=>t(e.channel_id.slice(8)),j=`Deploys make no patches from a sandbox build's built-in bundle.`,M=e=>{if(e.fingerprintHash!==null)return{platform:e.platform,channel:e.channel,fingerprintHash:e.fingerprintHash,appVersion:null};let t=e.targetAppVersion;return t===null||n(t)!==t?null:{platform:e.platform,channel:e.channel,fingerprintHash:null,appVersion:t}},N=e=>{let t=(e.artifact_storage_uri.split(/[?#]/,1)[0]??``).split(`/`).at(-1)??``;try{return decodeURIComponent(t)}catch{return t}},P=[`B`,`KB`,`MB`,`GB`],F=e=>{let t=e,n=0;for(;t>=1024&&n<P.length-1;)t/=1024,n+=1;return`${n===0?t:t.toFixed(1)} ${P[n]}`},I=e=>`npx hot-updater native-build install ${i(e.id)}`;export{o as C,i as D,x as E,r as O,l as S,M as T,c as _,h as a,k as b,d as c,F as d,b as f,A as g,a as h,S as i,u as l,D as m,C as n,m as o,T as p,g as r,j as s,E as t,f as u,N as v,y as w,s as x,I 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,vr as c}from"./sidebar-BmzmPGuv.js";import{t as l}from"./link-CRMwpc7-.js";import{t as u}from"./arrow-up-right-C_1ALUCD.js";import{a as d,i as f,n as p,r as ee,t as te}from"./TargetDisplay-Ctuz3qIp.js";import{t as m}from"./chevron-right-RAuPv9r1.js";import{n as ne,t as h}from"./native-builds_._buildId-GPlkI_2m.js";import{t as re}from"./download-CgpaZb23.js";import{t as ie}from"./git-branch-BGatQV8Q.js";import{o as ae}from"./-native-builds-search-6aptbS4G.js";import{t as oe}from"./history-Ci4dhphE.js";import{C as g,D as _,S as se,_ as v,d as y,h as ce,m as le,s as b,v as x,x as ue,y as S}from"./native-builds-B_pQ4D5H.js";import{n as C,r as w}from"./dist-BEmib-ZM.js";import{t as de}from"./smartphone-Dy13ukaU.js";import{a as T,i as E,n as D,o as O,r as k,t as A}from"./badge-zMibJGR5.js";import{a as j,n as M,o as N,t as P}from"./card-BAs80yql.js";import{o as fe}from"./constants-yj-e3ahf.js";import{n as pe}from"./relativeTime-RUNbaMyO.js";import{a as me,d as he,f as ge,h as _e,l as ve,u as ye}from"./api-znPyglTl.js";import{a as be,m as xe,n as Se}from"./IosInstall-BRuSakxm.js";import{a as F,i as I,n as L,o as R,r as z,t as B}from"./empty-C5GqArX9.js";import{a as Ce}from"./tabs-Byfy8Qls.js";import{t as we}from"./PlatformIcon-D4KPXCHL.js";import{a as V,i as H,n as U,o as W,r as G,t as K}from"./table-DbZPkzdz.js";import{t as Te}from"./BundleIdDisplay-C0X-k49t.js";import{n as Ee,t as De}from"./RowReason-BvIxbpPP.js";import{n as Oe,r as q,t as ke}from"./RolloutPercentageBadge-DF4EeZIJ.js";import{t as Ae}from"./NativeBuildsNav-ChBahvFN.js";import{n as je,r as J,t as Me}from"./SandboxBadge-DPmJn40v.js";import{t as Y}from"./QrCode-BFSCkbPj.js";var Ne=i(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Pe=i(`circle-slash`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]),Fe=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`}]]),X=r(n(),1),Z=t();function Q({value:e,length:t,shown:n=e.slice(0,t),label:r}){let i=async()=>{try{await navigator.clipboard.writeText(e),C.success(`Copied to clipboard`,{description:e})}catch{C.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 Ie({hash:e}){let t=me();if(e===null)return(0,Z.jsx)(p,{});let n=Oe(t.data?.console.gitUrl,e);return n===null?(0,Z.jsx)(Q,{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 $({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 Le({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:()=>{C.success(r?`Marked as the store build`:`Mark cleared`)},onError:e=>{C.error(`Could not change the mark`,{description:e.message})}}),size:`sm`,type:`button`,variant:`outline`,children:r?`Mark as store build`:`Clear mark`})}function Re({detail:e}){let{build:t,newestInScope:n,storeBuildInScope:r}=e;if(t.is_sandbox)return(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border bg-muted/40 p-3 text-xs`,children:[(0,Z.jsx)(Pe,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsxs)(`p`,{children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`No patch base.`}),` `,b]})]});let 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?ne:oe,{"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)(l,{className:`inline-flex items-center gap-0.5 font-medium underline underline-offset-4`,params:{buildId:i.id},to:`/native-builds/$buildId`,children:[ue(i)??(0,Z.jsxs)(Z.Fragment,{children:[g(i.platform),` `,ce[i.artifact_kind].label,` ·`,` `,(0,Z.jsx)(q,{uuid:i.id})]}),(0,Z.jsx)(u,{"aria-hidden":`true`,className:`size-3`})]}),`, so this one gets no new patches.`]})]}),(0,Z.jsx)(Le,{detail:e})]})}function ze({detail:e}){let{build:t,builtInBundle:n,channel:r}=e,i=n?.childCount??0;return(0,Z.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(j,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(N,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Built-in bundle`})})}),(0,Z.jsxs)(M,{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)($,{label:`Bundle ID`,children:(0,Z.jsx)(Te,{bundleId:t.min_bundle_id})}),(0,Z.jsx)($,{label:`OTAs patching from it`,children:(0,Z.jsx)(`span`,{className:`tabular-nums`,children:i===1?`1 bundle`:`${i} bundles`})}),(0,Z.jsx)($,{label:`Scope`,children:(0,Z.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,Z.jsx)(l,{"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)(Ee,{channel:r})}),(0,Z.jsx)(`span`,{className:`text-xs`,children:g(t.platform)})]})}),(0,Z.jsx)($,{label:`Target`,children:(0,Z.jsx)(`span`,{className:`text-xs`,children:(0,Z.jsx)(ee,{appVersion:t.app_version,fingerprintHash:t.fingerprint_hash,nativeAppVersion:t.native_app_version})})}),(0,Z.jsx)($,{label:`Build key`,children:(0,Z.jsx)(`span`,{className:`text-xs`,children:(0,Z.jsx)(te,{value:t.build_key})})}),t.build_number?(0,Z.jsx)($,{label:`Build`,children:(0,Z.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,translate:`no`,children:t.build_number})}):null,(0,Z.jsx)($,{label:`Commit`,children:(0,Z.jsx)(Ie,{hash:t.git_commit_hash})}),(0,Z.jsx)($,{label:`Created`,children:(0,Z.jsx)(q,{format:`both`,uuid:t.id})})]}),(0,Z.jsx)(Re,{detail:e}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t.is_sandbox?`An install of this build runs this bundle until it opens an OTA.`:`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 Be=r(pe(),1),Ve=`The .ipa installs only on devices its signing profile allows (development or ad hoc)`,He=e=>{switch(e.artifact_kind){case`ipa`:return e.is_sandbox?`${Ve}.`:`${Ve}; an App Store export reaches testers through TestFlight.`;case`aab`:return`The .aab installs through Google Play or bundletool, not from the file.`;default:return}},Ue=e=>{switch(e.artifact_kind){case`apk`:return`Scan with an Android phone's camera, then open the APK to install it.`;case`app`:return`Scan to download the .app.zip on a Mac.`;default:return`Scan to download. ${He(e)}`}};function We(){let{origin:e,pathname:t}=window.location;return(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,Z.jsx)(Y,{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 Ge({build:e,url:t,note:n}){return(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,Z.jsx)(Y,{className:`size-48`,label:`Download ${x(e)}`,value:t}),(0,Z.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:Ue(e)}),n?(0,Z.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:n}):null]})}function Ke({message:e}){return(0,Z.jsxs)(D,{variant:`destructive`,children:[(0,Z.jsx)(O,{}),(0,Z.jsx)(T,{children:`The download link couldn't be created`}),(0,Z.jsx)(E,{children:e})]})}function qe({build:t}){let n=ge(t.id),r=n.data?.url;if(r===null){let e=He(t);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)(Ke,{message:n.error.message}):(0,Z.jsx)(e,{className:`size-48`}):(0,Z.jsx)(Ge,{build:t,note:`This link expires. If the download fails, reload this page.`,url:r})}function Je({build:e,href:t}){return(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:e.artifact_kind===`ipa`?`ghost`:`outline`}),download:!0,href:t,children:[(0,Z.jsx)(re,{"data-icon":`inline-start`}),(0,Z.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,x(e)]})]})}function Ye({build:e}){return(0,Z.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(j,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(N,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Install`})})}),(0,Z.jsxs)(M,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,Z.jsx)(je,{build:e,withTime:!0}),(0,Z.jsx)(Xe,{build:e}),(0,Z.jsx)(Je,{build:e,href:v(e.id)})]})]})}function Xe({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)(f,{label:`the install command`,value:S(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)(f,{label:`the install command`,value:S(e)})]});case`aab`:return J(e)?(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[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)(f,{label:`the Google Play command`,value:`npx hot-updater google-play upload`})]});case`ipa`:return J(e)?(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Internal testers install it from the TestFlight app once App Store Connect has processed it.`}):(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Over USB, Xcode or Apple Configurator installs it.`})}}function Ze({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)(f,{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,Be.default)(e.expiresAt).format(`YYYY-MM-DD`),`.`]})]})]})}function Qe({build:e,sibling:t=null}){return J(e)&&(e.artifact_kind===`ipa`||e.artifact_kind===`aab`)?(0,Z.jsx)(Ye,{build:e}):(0,Z.jsx)(nt,{build:e,sibling:t})}var $e={ipa:`iPhone`,app:`Simulator`};function et({build:e,sibling:t}){let n=e.artifact_kind===`ipa`?[e,t]:[t,e];return(0,Z.jsx)(`nav`,{"aria-label":`Install target`,className:c(Ce(),`h-auto min-h-11 shrink-0 sm:h-8 sm:min-h-0 [&>a]:min-h-11 sm:[&>a]:min-h-0`),children:n.map(t=>(0,Z.jsx)(l,{"aria-current":t.id===e.id?`page`:void 0,className:Ae,params:{buildId:t.id},to:`/native-builds/$buildId`,children:$e[t.artifact_kind]},t.id))})}function tt({children:e}){let[t,n]=(0,X.useState)(!1),r=(0,X.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 nt({build:t,sibling:n}){let r=he(t.id),i=r.data?.status===`issued`?se(window.location,t.id,r.data.token):null,a=be(),o=t.artifact_kind===`ipa`,s=o&&a?.ios===!0,c=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,Z.jsx)(Xe,{build:t}),(0,Z.jsx)(Je,{build:t,href:i??v(t.id)}),(0,Z.jsx)(Ze,{link:r.data,url:i})]});return(0,Z.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsxs)(j,{className:`flex flex-row items-center justify-between gap-3 border-b px-4 py-3`,children:[(0,Z.jsx)(N,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Install`})}),n===null?null:(0,Z.jsx)(et,{build:t,sibling:n})]}),s?(0,Z.jsxs)(M,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,Z.jsx)(Se,{build:t,device:a}),(0,Z.jsx)(tt,{children:c})]}):(0,Z.jsxs)(M,{className:`grid gap-6 p-4 sm:grid-cols-[12rem_minmax(0,1fr)] sm:p-6`,children:[o&&i!==null?(0,Z.jsx)(We,{}):i===null?r.data===void 0?r.isError?(0,Z.jsx)(Ke,{message:r.error.message}):(0,Z.jsx)(e,{className:`size-48`}):(0,Z.jsx)(qe,{build:t}):(0,Z.jsx)(Ge,{build:t,url:i}),c]})]})}var rt=`In your Apple account, but not in Hot Updater. Open iOS devices on that iPhone to register it.`;function it({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)(P,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsxs)(j,{className:`flex flex-row items-center gap-2 border-b px-4 py-3`,children:[(0,Z.jsx)(N,{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)(l,{className:a({className:`ml-auto h-11 sm:h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds/devices`,children:`iOS devices`})]}),(0,Z.jsx)(M,{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)(w,{"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:[e.name===null?(0,Z.jsx)(De,{className:`text-sm`,icon:Ne,label:`Unknown device: ${rt}`,reason:rt,children:`Unknown device`}):(0,Z.jsx)(`span`,{className:`truncate`,children:e.name}),(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(Q,{label:`UDID`,shown:le(e.udid),value:e.udid})})]})]},e.udid))})})]})}var at=`https://hot-updater.dev/docs/guides/bundle-diffing#first-ota-update`;function ot({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),c=i?s.data:t.patches,{next:f,previous:p}=c??{};return(0,Z.jsxs)(P,{className:`overflow-hidden shadow-sm`,id:`patches`,children:[(0,Z.jsx)(j,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(N,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Patches from this build`})})}),(0,Z.jsxs)(M,{className:`p-0`,children:[i&&s.isError?(0,Z.jsx)(`div`,{className:`p-4`,children:(0,Z.jsxs)(D,{variant:`destructive`,children:[(0,Z.jsx)(O,{}),(0,Z.jsx)(T,{children:`Patches couldn't be loaded`}),(0,Z.jsx)(E,{children:s.error.message}),(0,Z.jsx)(k,{children:(0,Z.jsxs)(o,{onClick:()=>void s.refetch(),size:`xs`,variant:`outline`,children:[(0,Z.jsx)(w,{"data-icon":`inline-start`}),`Retry`]})})]})}):c===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`})]}):c.data.length===0?i?(0,Z.jsxs)(B,{className:`py-10`,children:[(0,Z.jsx)(I,{children:(0,Z.jsx)(R,{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)(B,{className:`py-10`,children:[(0,Z.jsxs)(I,{children:[(0,Z.jsx)(F,{variant:`icon`,children:(0,Z.jsx)(ie,{})}),(0,Z.jsx)(R,{children:`No patches from this build`}),(0,Z.jsx)(z,{children:t.build.is_sandbox?b:(0,Z.jsxs)(Z.Fragment,{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`}),`.`]})})]}),t.build.is_sandbox?null:(0,Z.jsx)(L,{children:(0,Z.jsxs)(`a`,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:at,rel:`noreferrer`,target:`_blank`,children:[`Bundle diffing guide`,(0,Z.jsx)(u,{"data-icon":`inline-end`})]})})]}):(0,Z.jsxs)(K,{"aria-busy":i&&s.isPlaceholderData,"aria-label":`Patches from this build`,className:`table-fixed`,children:[(0,Z.jsx)(V,{children:(0,Z.jsxs)(W,{children:[(0,Z.jsx)(H,{children:`Target bundle`}),(0,Z.jsx)(H,{className:`w-28`,children:`Patch size`}),(0,Z.jsx)(H,{className:`hidden w-32 sm:table-cell`,children:`Created`})]})}),(0,Z.jsx)(U,{children:c.data.map(e=>(0,Z.jsxs)(W,{children:[(0,Z.jsx)(G,{className:`py-3 whitespace-normal`,children:(0,Z.jsx)(l,{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)(G,{className:`text-xs tabular-nums`,children:y(e.byteSize)}),(0,Z.jsx)(G,{className:`hidden sm:table-cell`,children:(0,Z.jsx)(q,{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)(d,{"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 st=(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 ct({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:[`(`,y(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 lt({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,c=t.is_store_build&&s!=null&&st(i,s).kind===`full`?[`npx hot-updater patch`,`-p ${t.platform}`,`-c ${_(n)}`,`-b ${_(s)}`,`--base-artifact-id ${_(t.min_bundle_id)}`].join(` `):null,d=(0,Z.jsxs)(l,{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)(u,{"aria-hidden":`true`,className:`size-3`})]});return(0,Z.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(j,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(N,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Served now`})})}),(0,Z.jsx)(M,{className:`p-0`,children:r.length===0?(0,Z.jsxs)(B,{className:`py-10`,children:[(0,Z.jsxs)(I,{children:[(0,Z.jsx)(F,{variant:`icon`,children:(0,Z.jsx)(Fe,{})}),(0,Z.jsx)(R,{children:`No OTA for this build yet`}),(0,Z.jsxs)(z,{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)(L,{children:(0,Z.jsx)(l,{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)(K,{"aria-label":`Served now`,className:`table-fixed`,children:[(0,Z.jsx)(V,{children:(0,Z.jsxs)(W,{children:[(0,Z.jsx)(H,{children:`Bundle`}),(0,Z.jsx)(H,{className:`hidden w-40 md:table-cell`,children:`Rollout`}),(0,Z.jsx)(H,{className:`hidden w-32 sm:table-cell`,children:`Created`}),(0,Z.jsx)(H,{className:`w-32`,children:`First OTA download`})]})}),(0,Z.jsx)(U,{children:r.map(e=>{let t=e.bundleId,n=e.rolloutCohortCount/fe*100;return(0,Z.jsxs)(W,{children:[(0,Z.jsx)(G,{className:`py-3 whitespace-normal`,children:(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(l,{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)(G,{className:`hidden md:table-cell`,children:(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.targetCohorts.length>0?(0,Z.jsx)(A,{variant:`secondary`,children:e.targetCohorts.length===1?`1 cohort`:`${e.targetCohorts.length} cohorts`}):(0,Z.jsx)(ke,{percentage:n}),e.shouldForceUpdate?(0,Z.jsx)(A,{variant:`outline`,children:`Forced`}):null]})}),(0,Z.jsx)(G,{className:`hidden sm:table-cell`,children:(0,Z.jsx)(q,{uuid:t})}),(0,Z.jsx)(G,{children:(0,Z.jsx)(ct,{download:st(i,t)})})]},e.releaseId)})})]}),c===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)(f,{label:`the patch command`,value:c})]}),(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. `,d]})]})})]})}function ut({buildId:t,search:n,onSearchChange:r}){let i=ye(t),c=i.data,u={...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)(l,{className:a({className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`ghost`}),search:c?{channel:c.channel}:{channels:`all`},to:`/native-builds`,children:[(0,Z.jsx)(d,{"data-icon":`inline-start`}),`Native builds`]}),c?(0,Z.jsxs)(`h1`,{className:`flex min-w-0 items-center gap-1.5 text-sm font-medium`,children:[(0,Z.jsx)(we,{className:`size-3.5 shrink-0 text-muted-foreground`,platform:c.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:[g(c.build.platform),` `]}),ce[c.build.artifact_kind].label,(0,Z.jsx)(Me,{build:c.build})]}),(0,Z.jsxs)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[`· `,(0,Z.jsx)(`span`,{translate:`no`,children:c.channel})]})]}),(0,Z.jsx)(`span`,{className:`hidden text-xs font-normal text-muted-foreground tabular-nums sm:inline`,children:y(c.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)(D,{variant:`destructive`,children:[(0,Z.jsx)(O,{}),(0,Z.jsx)(T,{children:`The native build couldn't be loaded`}),(0,Z.jsx)(E,{children:i.error.message}),(0,Z.jsx)(k,{children:(0,Z.jsxs)(o,{onClick:()=>void i.refetch(),size:`xs`,variant:`outline`,children:[(0,Z.jsx)(w,{"data-icon":`inline-start`}),`Retry`]})})]}):c===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`})]}):c===null?(0,Z.jsxs)(B,{className:`border py-16`,children:[(0,Z.jsxs)(I,{children:[(0,Z.jsx)(F,{variant:`icon`,children:(0,Z.jsx)(ae,{})}),(0,Z.jsx)(R,{children:`Native build not found`}),(0,Z.jsx)(z,{children:`No native build has this ID. It may have been deleted, or be from another console.`})]}),(0,Z.jsx)(L,{children:(0,Z.jsx)(l,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),search:{channels:`all`},to:`/native-builds`,children:`Show all native builds`})})]}):(0,Z.jsxs)(X.Fragment,{children:[(0,Z.jsx)(Qe,{build:c.build,sibling:c.sibling}),c.build.artifact_kind===`ipa`&&!J(c.build)?(0,Z.jsx)(it,{build:c.build}):null,(0,Z.jsx)(ze,{detail:c}),(0,Z.jsx)(lt,{detail:c}),(0,Z.jsx)(ot,{detail:c,onPage:e=>r({...e.before===void 0?{}:{patchesBefore:e.before},...e.after===void 0?{}:{patchesAfter:e.after}}),page:u})]},c.build.id)})})]})}function dt(){let{buildId:e}=h.useParams(),t=h.useSearch(),n=h.useNavigate();return(0,Z.jsx)(ut,{buildId:e,onSearchChange:e=>void n({search:e,replace:!0}),search:t})}export{dt as component};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Tt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { k as cn } from "./sidebar-DQkRAO_e.mjs";
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/BundleIdDisplay-CGdSiouM.js
|
|
4
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
5
|
-
function BundleIdDisplay({ bundleId, className }) {
|
|
6
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
7
|
-
translate: "no",
|
|
8
|
-
className: cn("break-all font-mono text-xs tabular-nums", className),
|
|
9
|
-
children: bundleId
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { BundleIdDisplay as t };
|