@hot-updater/console 1.2.0-rc.1 → 1.2.0-rc.3
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/StoreSubmission-ViTkW4eJ.js +1 -0
- package/.output/public/assets/{index-BWU6owTG.js → index-CqP5HPV6.js} +2 -2
- package/.output/public/assets/{native-builds-c4BpOLAe.js → native-builds-D6rldpSh.js} +2 -2
- package/.output/public/assets/native-builds-DAy2678K.js +1 -0
- package/.output/public/assets/{native-builds_._buildId-D_Spjl10.js → native-builds_._buildId-DD58_Phd.js} +1 -1
- package/.output/public/assets/{native-builds_._buildId-DtoXD8rz.js → native-builds_._buildId-DvQDKnUQ.js} +2 -2
- package/.output/public/assets/{styles-Ccxthuz1.css → styles-uK-0vUMk.css} +1 -1
- package/.output/server/{__23tanstack-start-server-fn-resolver-CygMPYHZ.mjs → __23tanstack-start-server-fn-resolver-DJQS4eWX.mjs} +46 -46
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
- package/.output/server/_ssr/{BundleIdDisplay-DOPz4pUS.mjs → BundleIdDisplay-LdRkYdnN.mjs} +2 -2
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-Xb1JKqcc.mjs → ConsoleFeatureUnavailable-BN-FZ8eG.mjs} +6 -6
- package/.output/server/_ssr/{EventDetails-D7MejFCN.mjs → EventDetails-B77sWxgh.mjs} +6 -6
- package/.output/server/_ssr/{HashValueDisplay-Dd-wu5rY.mjs → HashValueDisplay-C4Vs4cmO.mjs} +2 -2
- package/.output/server/_ssr/{InsightsPageHeader-CWf1n4Vt.mjs → InsightsPageHeader-Dx4jJ7X0.mjs} +6 -6
- package/.output/server/_ssr/{NotFoundPage-C5rFdUpg.mjs → NotFoundPage-DB5cXeVZ.mjs} +2 -2
- package/.output/server/_ssr/{RolloutPercentageBadge-g0Bhfl3M.mjs → RolloutPercentageBadge-vmwE8iae.mjs} +3 -3
- package/.output/server/_ssr/{StoreSubmission-JZ2Zltak.mjs → StoreSubmission-DE4vgy5B.mjs} +5 -5
- package/.output/server/_ssr/{alert-dialog-CvNvTvIJ.mjs → alert-dialog-DxboqQmd.mjs} +1 -1
- package/.output/server/_ssr/{api-0vtwA5vY.mjs → api-cvzOLlTy.mjs} +3 -3
- package/.output/server/_ssr/{api-keys-yFlQDwQF.mjs → api-keys-C3QCQvpV.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-D5dyA4D1.mjs → api-keys-CrbGr02t.mjs} +8 -8
- package/.output/server/_ssr/{api-keys-rpc-BOIUHhDi.mjs → api-keys-rpc-BcTQzRLj.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-COeFOpYi.mjs → api-rpc-B48nsUak.mjs} +3 -3
- package/.output/server/_ssr/{auth-rpc-D1ss2GUI.mjs → auth-rpc-C0gtG9nJ.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-DYS1OJ6P.mjs → auth.server-B0JikHOQ.mjs} +2 -2
- package/.output/server/_ssr/{badge-CEdVRgyl.mjs → badge-oO-0mLsr.mjs} +1 -1
- package/.output/server/_ssr/{config.server-NnMFjMFX.mjs → config.server-CJVHGJtr.mjs} +3 -3
- package/.output/server/_ssr/{console-access-33BNlH97.mjs → console-access-4TW5Af_n.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-v1fSycue.mjs → console-features-api-DfzZRyXa.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-C7XNVqm0.mjs → console-features-rpc-DqNpa3U9.mjs} +3 -3
- package/.output/server/_ssr/{dialog-C8CS8RMt.mjs → dialog-DsuMZ5oh.mjs} +1 -1
- package/.output/server/_ssr/{empty-CkdEAvCY.mjs → empty-r4kJO91t.mjs} +2 -2
- package/.output/server/_ssr/{field-CW08sZXd.mjs → field-DfXmt9CS.mjs} +2 -2
- package/.output/server/_ssr/{input-group-D-TpFPuG.mjs → input-group-BCO7zTpU.mjs} +1 -1
- package/.output/server/_ssr/{insights-CYeBl8N9.mjs → insights-CRu5FUj8.mjs} +5 -5
- package/.output/server/_ssr/{insights-CMyzPs8l.mjs → insights-Csqlj6u7.mjs} +19 -19
- package/.output/server/_ssr/{insights-DAi9KknT.mjs → insights-DrrhPDER.mjs} +2 -2
- package/.output/server/_ssr/{insights-api-BFARQ5ct.mjs → insights-api-NW5VCXqg.mjs} +3 -3
- package/.output/server/_ssr/{insights-failures-rpc-Q4WNNJkU.mjs → insights-failures-rpc-CoFrAOK9.mjs} +4 -4
- package/.output/server/_ssr/{insights-recovery-rpc-CY5RYJKa.mjs → insights-recovery-rpc-sud_FyGW.mjs} +3 -3
- package/.output/server/_ssr/{insights-rpc-BO7_evvs.mjs → insights-rpc-Ce2Isz9q.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-DKfxgHD3.mjs → insights-search-B0O3YoO2.mjs} +2 -2
- package/.output/server/_ssr/{insights-usage-rpc-B4czku50.mjs → insights-usage-rpc-C-cS2F9s.mjs} +3 -3
- package/.output/server/_ssr/{insights-usage-rpc-CUCTFska.mjs → insights-usage-rpc-Cwf1t4aW.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-BRrbZN1X.mjs → insights_.distribution--3aR6Kpy.mjs} +5 -5
- package/.output/server/_ssr/{insights_.distribution-BDeUhZGj.mjs → insights_.distribution-D52TkQ2V.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-C2MXpzKd.mjs → insights_.distribution-DIkh5VqM.mjs} +13 -13
- package/.output/server/_ssr/{installations-DxGZEC5G.mjs → installations-Bu4Lb0x9.mjs} +11 -11
- package/.output/server/_ssr/{installations-BjLMgBoH.mjs → installations-C818mFCp.mjs} +2 -2
- package/.output/server/_ssr/{installations-BVk7okiY.mjs → installations-DftevpDt.mjs} +4 -4
- package/.output/server/_ssr/{native-builds-CdlyAldW.mjs → native-builds-CWjU--fI.mjs} +23 -82
- package/.output/server/_ssr/{native-builds-CSCgFB21.mjs → native-builds-DOASMwGh.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_._buildId-CMp1h8dT.mjs → native-builds_._buildId-CTytnLBB.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_._buildId-GHpGaYyE.mjs → native-builds_._buildId-D4lYJLIU.mjs} +9 -9
- package/.output/server/_ssr/{release-adoption-rpc-BJXZvtoQ.mjs → release-adoption-rpc-OizwttJD.mjs} +5 -5
- package/.output/server/_ssr/{remote-config-DlyyohL2.mjs → remote-config-DZu7gJLL.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-XdYuByHz.mjs → remote-config-DaBgnVnL.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-DjsEl270.mjs → remote-config-Dypc_nuk.mjs} +17 -17
- package/.output/server/_ssr/{remote-config-rpc-GMLPb-90.mjs → remote-config-rpc-DOfPhqli.mjs} +3 -3
- package/.output/server/_ssr/{router-vpxd56RW.mjs → router-BkRbvels.mjs} +20 -20
- package/.output/server/_ssr/{routes-DyEM4b3x.mjs → routes-BeTsUkNX.mjs} +10 -10
- package/.output/server/_ssr/{routes-dQe3XhiS.mjs → routes-D9JnXVWL.mjs} +17 -17
- package/.output/server/_ssr/{schema-migration-rpc-BfGzEK_o.mjs → schema-migration-rpc-B2VGxRY6.mjs} +3 -3
- package/.output/server/_ssr/{select-DM1uwtk9.mjs → select-Cywc0NmT.mjs} +1 -1
- package/.output/server/_ssr/{server-BUUKNSPI.mjs → server-Ds-fU1zf.mjs} +3 -3
- package/.output/server/_ssr/{sidebar-DB2YQlok.mjs → sidebar-t0NiN0-2.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{switch-DLD58zLy.mjs → switch-D1T38CnM.mjs} +2 -2
- package/.output/server/_ssr/{table-P4TnAZhl.mjs → table-L9ZQgxNF.mjs} +1 -1
- package/.output/server/_ssr/{tabs-B7ZeLicF.mjs → tabs-BiByrAnU.mjs} +2 -2
- package/.output/server/{_tanstack-start-manifest_v-C-KC63Zq.mjs → _tanstack-start-manifest_v-B5nsO5L4.mjs} +9 -9
- package/.output/server/index.mjs +157 -157
- package/package.json +7 -7
- package/src/components/features/native-builds/CopyableText.tsx +5 -2
- package/src/components/features/native-builds/ImportBuild.tsx +7 -31
- package/src/components/features/native-builds/NativeBuildsTable.tsx +3 -5
- package/.output/public/assets/StoreSubmission-JpngSvHS.js +0 -1
- package/.output/public/assets/native-builds-BswZazmc.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.3",
|
|
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/protocol": "1.2.0-rc.3",
|
|
63
|
+
"@hot-updater/plugin-core": "1.2.0-rc.3",
|
|
64
|
+
"@hot-updater/server": "1.2.0-rc.3",
|
|
65
|
+
"@hot-updater/bsdiff": "1.2.0-rc.3"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@tanstack/devtools-vite": "^0.6.0",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"vite-tsconfig-paths": "^6.1.1",
|
|
88
88
|
"vitest": "4.1.4",
|
|
89
89
|
"web-vitals": "^5.1.0",
|
|
90
|
-
"@hot-updater/cli-tools": "1.2.0-rc.
|
|
91
|
-
"@hot-updater/mock": "1.2.0-rc.
|
|
90
|
+
"@hot-updater/cli-tools": "1.2.0-rc.3",
|
|
91
|
+
"@hot-updater/mock": "1.2.0-rc.3"
|
|
92
92
|
},
|
|
93
93
|
"description": "React Native OTA solution for self-hosted",
|
|
94
94
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -12,7 +12,10 @@ export function CopyableText({
|
|
|
12
12
|
/** What the copy button copies, such as "the install command". */
|
|
13
13
|
readonly label: string;
|
|
14
14
|
readonly value: string;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Whether a value too wide for a phone breaks at its spaces there instead
|
|
17
|
+
* of scrolling, so all of it shows: one line from `sm` up.
|
|
18
|
+
*/
|
|
16
19
|
readonly wrap?: boolean;
|
|
17
20
|
}) {
|
|
18
21
|
const copy = async () => {
|
|
@@ -28,7 +31,7 @@ export function CopyableText({
|
|
|
28
31
|
<code
|
|
29
32
|
className={
|
|
30
33
|
wrap
|
|
31
|
-
? "min-w-0 flex-1 text-left font-mono text-xs
|
|
34
|
+
? "min-w-0 flex-1 text-left font-mono text-xs whitespace-normal sm:whitespace-nowrap"
|
|
32
35
|
: "min-w-0 flex-1 overflow-x-auto text-left font-mono text-xs whitespace-nowrap"
|
|
33
36
|
}
|
|
34
37
|
>
|
|
@@ -13,42 +13,18 @@ import {
|
|
|
13
13
|
import { CopyableText } from "./CopyableText";
|
|
14
14
|
|
|
15
15
|
/** The command that tracks a build made elsewhere. */
|
|
16
|
-
export const IMPORT_COMMAND =
|
|
17
|
-
"npx hot-updater native-build import <path-to-.ipa|.aab|.apk|.app|.app.zip>";
|
|
16
|
+
export const IMPORT_COMMAND = "npx hot-updater native-build import <file>";
|
|
18
17
|
|
|
19
18
|
/** `native-build import`'s section of the native build guide. */
|
|
20
19
|
export const IMPORT_GUIDE_URL =
|
|
21
20
|
"https://hot-updater.dev/docs/guides/native-build#import-a-build-made-elsewhere";
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
|
-
*
|
|
25
|
-
* artifact on the machine that has it
|
|
26
|
-
* host may cap a request's body far below an `.ipa`.
|
|
23
|
+
* The toolbar's "Import a build" button and the command it shows: the CLI
|
|
24
|
+
* reads the artifact on the machine that has it, so the Console uploads
|
|
25
|
+
* nothing, since a host may cap a request's body far below an `.ipa`. The
|
|
26
|
+
* guide has the rest, such as `--channel`.
|
|
27
27
|
*/
|
|
28
|
-
export function ImportBuildSteps() {
|
|
29
|
-
return (
|
|
30
|
-
<div className="flex min-w-0 flex-col gap-2">
|
|
31
|
-
<p className="text-xs text-muted-foreground">
|
|
32
|
-
Track an <code className="font-mono">.ipa</code>,{" "}
|
|
33
|
-
<code className="font-mono">.aab</code>,{" "}
|
|
34
|
-
<code className="font-mono">.apk</code> or simulator{" "}
|
|
35
|
-
<code className="font-mono">.app</code> (or its{" "}
|
|
36
|
-
<code className="font-mono">.app.zip</code>) built elsewhere, such as by
|
|
37
|
-
EAS, Xcode Cloud or Fastlane, so the OTAs you deploy after it patch from
|
|
38
|
-
its built-in bundle. Run in the app's project:
|
|
39
|
-
</p>
|
|
40
|
-
<CopyableText label="the import command" value={IMPORT_COMMAND} wrap />
|
|
41
|
-
<p className="text-xs text-muted-foreground">
|
|
42
|
-
Add <code className="font-mono">-c <channel></code> (
|
|
43
|
-
<code className="font-mono">--channel</code>) when the app reports
|
|
44
|
-
another channel than the one it was built with, such as one its code
|
|
45
|
-
sets or switches to at runtime.
|
|
46
|
-
</p>
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/** The toolbar's "Import a build" button and the command it shows. */
|
|
52
28
|
export function ImportBuildDialog() {
|
|
53
29
|
return (
|
|
54
30
|
<Dialog>
|
|
@@ -69,10 +45,10 @@ export function ImportBuildDialog() {
|
|
|
69
45
|
<DialogHeader>
|
|
70
46
|
<DialogTitle>Import a build</DialogTitle>
|
|
71
47
|
<DialogDescription>
|
|
72
|
-
|
|
48
|
+
Track an .ipa, .aab, .apk or .app built elsewhere as a patch base.
|
|
73
49
|
</DialogDescription>
|
|
74
50
|
</DialogHeader>
|
|
75
|
-
<
|
|
51
|
+
<CopyableText label="the import command" value={IMPORT_COMMAND} wrap />
|
|
76
52
|
<a
|
|
77
53
|
className={buttonVariants({
|
|
78
54
|
className: "min-h-11 w-full sm:min-h-8 sm:w-fit",
|
|
@@ -104,12 +104,10 @@ function EmptyRow({
|
|
|
104
104
|
<>
|
|
105
105
|
<p className="font-medium text-foreground">No native builds</p>
|
|
106
106
|
<p>
|
|
107
|
-
Build
|
|
108
|
-
<code className="font-mono text-xs">
|
|
109
|
-
hot-updater native-build android
|
|
110
|
-
</code>{" "}
|
|
107
|
+
Build one with{" "}
|
|
108
|
+
<code className="font-mono text-xs">native-build android</code>{" "}
|
|
111
109
|
or <code className="font-mono text-xs">native-build ios</code>,
|
|
112
|
-
|
|
110
|
+
or import one built elsewhere:
|
|
113
111
|
</p>
|
|
114
112
|
<div className="w-full text-left">
|
|
115
113
|
<CopyableText
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Fn as e,Wr as t,ii as n,ir as r}from"./sidebar-Di9SN47G.js";import{d as i}from"./native-builds-BOC71grI.js";import{t as a}from"./copy-DsuLj3oj.js";import{t as o}from"./badge-DWFcDWho.js";import{n as s}from"./dist-CPlO6ko9.js";import{n as c,t as l}from"./relativeTime-YQt84dYr.js";import{a as u}from"./api-P2g8dCNg.js";var d=r(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),f=t();function p({label:t,value:n,wrap:r=!1}){let i=async()=>{try{await navigator.clipboard.writeText(n),s.success(`Copied to clipboard`)}catch{s.error(`Could not copy ${t}`)}};return(0,f.jsxs)(`div`,{className:`flex w-full min-w-0 items-center gap-2 rounded-md border bg-muted/40 py-1 pr-1 pl-3`,children:[(0,f.jsx)(`code`,{className:r?`min-w-0 flex-1 text-left font-mono text-xs break-all whitespace-pre-wrap`:`min-w-0 flex-1 overflow-x-auto text-left font-mono text-xs whitespace-nowrap`,children:n}),(0,f.jsx)(e,{"aria-label":`Copy ${t}`,className:`size-11 sm:size-7`,onClick:()=>void i(),size:`icon-sm`,variant:`ghost`,children:(0,f.jsx)(a,{"aria-hidden":`true`})})]})}function m({value:e,length:t,label:n}){let r=async()=>{try{await navigator.clipboard.writeText(e),s.success(`Copied to clipboard`,{description:e})}catch{s.error(`Could not copy the ${n}`)}};return(0,f.jsx)(`button`,{"aria-label":`Copy the ${n} ${e}`,className:`cursor-copy rounded-sm font-mono text-xs whitespace-nowrap tabular-nums underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,onClick:e=>{e.stopPropagation(),r()},title:e,translate:`no`,type:`button`,children:e.slice(0,t)})}function h({hash:e}){let t=u();if(e===null)return(0,f.jsx)(`span`,{className:`text-muted-foreground`,children:`—`});let n=i(t.data?.console.gitUrl,e);return n===null?(0,f.jsx)(m,{label:`commit`,length:7,value:e}):(0,f.jsx)(`a`,{className:`font-mono text-xs whitespace-nowrap underline-offset-4 hover:underline`,href:n,onClick:e=>e.stopPropagation(),rel:`noreferrer`,target:`_blank`,title:e,translate:`no`,children:e.slice(0,7)})}var g=n(c(),1),_=n(l(),1);g.default.extend(_.default);var v={testflight:`TestFlight`,"play-internal":`Play internal`},y=e=>e.submitted_to!==null&&e.submitted_to!==void 0;function b({ms:e}){if(e===null)return null;let t=(0,g.default)(e);return(0,f.jsx)(`time`,{className:`text-xs text-muted-foreground`,dateTime:t.toISOString(),title:t.format(`YYYY-MM-DD HH:mm:ss`),children:t.fromNow()})}function x({build:e,withTime:t=!1}){return y(e)?(0,f.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-1.5`,children:[(0,f.jsxs)(o,{className:`gap-1`,title:`Submitted to ${v[e.submitted_to]}`,variant:`secondary`,children:[(0,f.jsx)(d,{"aria-hidden":`true`,className:`size-3`}),v[e.submitted_to],e.submitted_version?(0,f.jsx)(`span`,{className:`font-mono tabular-nums`,translate:`no`,children:e.submitted_version}):null]}),t?(0,f.jsx)(b,{ms:e.submitted_at_ms}):null]}):null}export{p as a,m as i,y as n,h as r,x as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Fn as t,In as n,Wr as r,ir as i,p as a}from"./sidebar-Di9SN47G.js";import{t as o}from"./link-DTEyW70e.js";import{a as s}from"./preload-helper-B44EvKhG.js";import{t as c}from"./arrow-up-right-DK8Zdg40.js";import{a as l,c as u,f as d,i as ee,n as f,o as p,p as m,r as h,s as g}from"./native-builds-BOC71grI.js";import{t as _}from"./chevron-right-BoUXo82O.js";import{a as v,i as y,n as te,o as ne,r as re,t as ie}from"./select-CBIU0_M1.js";import{t as ae}from"./download-Cf24LBde.js";import{r as oe}from"./-native-builds-search-C-TGpFAm.js";import{t as b}from"./refresh-cw-B9HHjLej.js";import{a as x,i as S,r as C,t as w}from"./StoreSubmission-JpngSvHS.js";import{a as T,f as E,i as D,n as O,o as k,r as A,s as j,t as M}from"./badge-DWFcDWho.js";import{t as N}from"./native-builds-c4BpOLAe.js";import{t as P}from"./PlatformIcon-BBWQlWm9.js";import{a as F,n as I,o as L,r as R,s as z,t as se}from"./dialog-CNUPxNxH.js";import{f as B,i as V}from"./api-P2g8dCNg.js";import{a as H,i as U,n as W,o as G,r as K,t as ce}from"./table-Bpy3SvSo.js";var le=i(`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`}]]),ue=i(`hard-drive-download`,[[`path`,{d:`M12 2v8`,key:`1q4o3n`}],[`path`,{d:`m16 6-4 4-4-4`,key:`6wukr`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,key:`w68u3i`}],[`path`,{d:`M6 18h.01`,key:`uhywen`}],[`path`,{d:`M10 18h.01`,key:`h775k`}]]),q=r(),J=`npx hot-updater native-build import <path-to-.ipa|.aab|.apk|.app|.app.zip>`,Y=`https://hot-updater.dev/docs/guides/native-build#import-a-build-made-elsewhere`;function de(){return(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Track an `,(0,q.jsx)(`code`,{className:`font-mono`,children:`.ipa`}),`,`,` `,(0,q.jsx)(`code`,{className:`font-mono`,children:`.aab`}),`,`,` `,(0,q.jsx)(`code`,{className:`font-mono`,children:`.apk`}),` or simulator`,` `,(0,q.jsx)(`code`,{className:`font-mono`,children:`.app`}),` (or its`,` `,(0,q.jsx)(`code`,{className:`font-mono`,children:`.app.zip`}),`) built elsewhere, such as by EAS, Xcode Cloud or Fastlane, so the OTAs you deploy after it patch from its built-in bundle. Run in the app's project:`]}),(0,q.jsx)(x,{label:`the import command`,value:J,wrap:!0}),(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Add `,(0,q.jsx)(`code`,{className:`font-mono`,children:`-c <channel>`}),` (`,(0,q.jsx)(`code`,{className:`font-mono`,children:`--channel`}),`) when the app reports another channel than the one it was built with, such as one its code sets or switches to at runtime.`]})]})}function fe(){return(0,q.jsxs)(se,{children:[(0,q.jsxs)(z,{render:(0,q.jsx)(t,{"aria-label":`Import a build`,className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`outline`}),children:[(0,q.jsx)(le,{"data-icon":`inline-start`}),(0,q.jsx)(`span`,{className:`hidden sm:inline`,children:`Import a build`})]}),(0,q.jsxs)(I,{className:`sm:max-w-lg`,children:[(0,q.jsxs)(F,{children:[(0,q.jsx)(L,{children:`Import a build`}),(0,q.jsx)(R,{children:`The build appears here once the command tracks it.`})]}),(0,q.jsx)(de,{}),(0,q.jsxs)(`a`,{className:n({className:`min-h-11 w-full sm:min-h-8 sm:w-fit`,variant:`outline`}),href:Y,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,q.jsx)(c,{"data-icon":`inline-end`})]})]})]})}var pe=`https://hot-updater.dev/docs/guides/native-build#register-a-build`,me=6;function he({channel:e,paged:r,onClearChannel:i,onNewest:a}){return(0,q.jsx)(G,{children:(0,q.jsx)(K,{className:`h-44 text-center text-muted-foreground`,colSpan:me,children:(0,q.jsxs)(`div`,{className:`mx-auto flex max-w-sm flex-col items-center gap-2 whitespace-normal`,children:[(0,q.jsx)(ue,{"aria-hidden":`true`,className:`size-5`}),r?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`font-medium text-foreground`,children:`No more native builds`}),(0,q.jsx)(t,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:a,variant:`outline`,children:`Show the newest builds`})]}):e===void 0?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`font-medium text-foreground`,children:`No native builds`}),(0,q.jsxs)(`p`,{children:[`Build a release app with`,` `,(0,q.jsx)(`code`,{className:`font-mono text-xs`,children:`hot-updater native-build android`}),` `,`or `,(0,q.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build ios`}),`, which tracks it here, or import one built elsewhere:`]}),(0,q.jsx)(`div`,{className:`w-full text-left`,children:(0,q.jsx)(x,{label:`the import command`,value:J,wrap:!0})}),(0,q.jsxs)(`a`,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),href:pe,rel:`noreferrer`,target:`_blank`,children:[`Native build guide`,(0,q.jsx)(c,{"data-icon":`inline-end`})]}),(0,q.jsxs)(`a`,{className:n({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:Y,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,q.jsx)(c,{"data-icon":`inline-end`})]})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`font-medium text-foreground`,children:[`No native build embeds `,(0,q.jsx)(`span`,{translate:`no`,children:e})]}),(0,q.jsx)(`p`,{children:`A build embeds the channel it was built on. Build one on this channel, or list every channel's builds.`}),(0,q.jsx)(t,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:i,variant:`outline`,children:`Show all channels`})]})]})})})}function ge(){return Array.from({length:3},(t,n)=>(0,q.jsxs)(G,{children:[(0,q.jsxs)(K,{className:`space-y-2 py-3`,children:[n===0?(0,q.jsx)(`span`,{className:`sr-only`,children:`Loading native builds`}):null,(0,q.jsx)(e,{className:`h-3.5 w-40`}),(0,q.jsx)(e,{className:`h-3 w-24`})]}),(0,q.jsx)(K,{className:`hidden md:table-cell`,children:(0,q.jsx)(e,{className:`h-5 w-20`})}),(0,q.jsx)(K,{className:`hidden xl:table-cell`,children:(0,q.jsx)(e,{className:`h-3.5 w-28`})}),(0,q.jsx)(K,{className:`hidden xl:table-cell`,children:(0,q.jsx)(e,{className:`h-3.5 w-14`})}),(0,q.jsx)(K,{className:`hidden sm:table-cell`,children:(0,q.jsx)(e,{className:`h-3.5 w-20`})}),(0,q.jsx)(K,{children:(0,q.jsx)(e,{className:`ml-auto h-6 w-16`})})]},n))}function X({build:e,onChannel:t}){let r=s(),i=g(e),a=ee(e),c=`${u(e.platform)} ${h[e.artifact_kind].label}`;return(0,q.jsxs)(G,{className:`cursor-pointer`,onClick:()=>void r({to:`/native-builds/$buildId`,params:{buildId:e.id}}),children:[(0,q.jsx)(K,{className:`py-3 whitespace-normal`,children:(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,q.jsx)(P,{className:`size-3.5 shrink-0 text-muted-foreground`,platform:e.platform}),(0,q.jsx)(o,{className:`font-medium underline-offset-4 hover:underline`,onClick:e=>e.stopPropagation(),params:{buildId:e.id},to:`/native-builds/$buildId`,children:c}),(0,q.jsx)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:f(e.byte_size)}),(0,q.jsx)(w,{build:e,withTime:!0})]}),(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,q.jsx)(`span`,{children:i.label}),e.fingerprint_hash===null?(0,q.jsx)(`span`,{className:`font-mono text-foreground`,translate:`no`,children:i.value}):(0,q.jsx)(S,{label:`fingerprint`,length:12,value:e.fingerprint_hash}),e.build_number?(0,q.jsxs)(`span`,{className:`tabular-nums`,translate:`no`,children:[`· build `,e.build_number]}):null,(0,q.jsxs)(`span`,{className:`md:hidden`,translate:`no`,children:[`· `,a]}),e.git_commit_hash===null?null:(0,q.jsxs)(`span`,{className:`inline-flex items-center gap-1 xl:hidden`,children:[`· commit `,(0,q.jsx)(C,{hash:e.git_commit_hash})]})]}),(0,q.jsxs)(`div`,{className:`text-xs text-muted-foreground xl:hidden`,children:[`Built-in bundle`,` `,(0,q.jsx)(`span`,{className:`font-mono [overflow-wrap:anywhere] text-foreground`,translate:`no`,children:e.min_bundle_id})]})]})}),(0,q.jsx)(K,{className:`hidden md:table-cell`,children:(0,q.jsx)(`button`,{"aria-label":`Show the builds that embed ${a}`,className:`rounded-md text-left focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,onClick:e=>{e.stopPropagation(),t(a)},type:`button`,children:(0,q.jsx)(M,{className:`whitespace-nowrap`,translate:`no`,variant:`outline`,children:a})})}),(0,q.jsx)(K,{className:`hidden xl:table-cell`,children:(0,q.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,translate:`no`,children:e.min_bundle_id})}),(0,q.jsx)(K,{className:`hidden xl:table-cell`,children:(0,q.jsx)(C,{hash:e.git_commit_hash})}),(0,q.jsx)(K,{className:`hidden sm:table-cell`,children:(0,q.jsx)(d,{uuid:e.id})}),(0,q.jsx)(K,{className:`text-right`,children:(0,q.jsxs)(`a`,{"aria-label":`Download ${p(e)}`,className:n({className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`outline`}),download:!0,href:l(e.id),onClick:e=>e.stopPropagation(),children:[(0,q.jsx)(ae,{"data-icon":`inline-start`}),`Download`]})})]})}function _e({builds:e,channel:n,paged:r,onChannel:i,onPage:a}){let o=e.data?.data,{next:s,previous:c}=e.data??{};return e.isError?(0,q.jsx)(`div`,{className:`p-4`,children:(0,q.jsxs)(O,{variant:`destructive`,children:[(0,q.jsx)(E,{}),(0,q.jsx)(T,{children:`Native builds couldn't be loaded`}),(0,q.jsx)(D,{children:`Check your connection and try again.`}),(0,q.jsx)(A,{children:(0,q.jsxs)(t,{onClick:()=>void e.refetch(),size:`xs`,variant:`outline`,children:[(0,q.jsx)(b,{"data-icon":`inline-start`}),`Retry`]})})]})}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(ce,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,children:[(0,q.jsx)(H,{children:(0,q.jsxs)(G,{children:[(0,q.jsx)(U,{children:`Build`}),(0,q.jsx)(U,{className:`hidden md:table-cell`,children:`Channel`}),(0,q.jsx)(U,{className:`hidden xl:table-cell`,children:`Built-in bundle`}),(0,q.jsx)(U,{className:`hidden xl:table-cell`,children:`Commit`}),(0,q.jsx)(U,{className:`hidden sm:table-cell`,children:`Created`}),(0,q.jsx)(U,{className:`text-right`,children:(0,q.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,q.jsx)(W,{children:e.isLoading?(0,q.jsx)(ge,{}):o?.length===0?(0,q.jsx)(he,{channel:n,onClearChannel:()=>i(void 0),onNewest:()=>a({}),paged:r}):o?.map(e=>(0,q.jsx)(X,{build:e,onChannel:i},e.id))})]}),s!==void 0||c!==void 0?(0,q.jsxs)(`nav`,{"aria-label":`Native build pages`,className:`flex items-center justify-end gap-2 border-t px-4 py-2`,children:[(0,q.jsxs)(t,{className:`min-h-11 sm:min-h-7`,disabled:c===void 0||e.isPlaceholderData,onClick:()=>a({after:c}),size:`sm`,variant:`ghost`,children:[(0,q.jsx)(m,{"data-icon":`inline-start`}),`Newer`]}),(0,q.jsxs)(t,{className:`min-h-11 sm:min-h-7`,disabled:s===void 0||e.isPlaceholderData,onClick:()=>a({before:s}),size:`sm`,variant:`ghost`,children:[`Older`,(0,q.jsx)(_,{"data-icon":`inline-end`})]})]}):null]})}var Z=`all`,Q=`channel:`,$=e=>`${Q}${e}`;function ve({search:e,onSearchChange:n}){let{channel:r,before:i,after:o}=e,s=B(e),c=V(),l=c.data?.map(({name:e})=>e)??[],u=r===void 0||l.includes(r)?l:[r,...l],d=e=>n(e===void 0?{}:{channel:e});return(0,q.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,q.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,q.jsx)(a,{className:`-ml-1 size-11 lg:size-7`}),(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,q.jsx)(oe,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,q.jsx)(`h1`,{className:`text-sm font-medium`,children:`Native builds`})]}),(0,q.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,q.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,q.jsxs)(k,{className:`mx-auto w-full max-w-6xl overflow-hidden shadow-sm`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 border-b px-4 py-3`,children:[(0,q.jsxs)(ie,{items:[{label:`All channels`,value:Z},...u.map(e=>({label:e,value:$(e)}))],onOpenChange:e=>{e&&c.refetch()},onValueChange:e=>d(e?.startsWith(Q)?e.slice(8):void 0),value:r===void 0?Z:$(r),children:[(0,q.jsx)(v,{"aria-label":`Channel`,className:`h-11 min-w-0 flex-1 text-xs sm:h-8 sm:w-48 sm:flex-none`,children:(0,q.jsx)(ne,{})}),(0,q.jsx)(te,{children:(0,q.jsxs)(re,{children:[(0,q.jsx)(y,{value:Z,children:`All channels`}),u.map(e=>(0,q.jsx)(y,{translate:`no`,value:$(e),children:e},e))]})})]}),(0,q.jsx)(`div`,{className:`ml-auto`,children:(0,q.jsx)(fe,{})}),(0,q.jsx)(t,{"aria-label":`Refresh native builds`,className:`size-11 sm:size-7`,disabled:s.isLoading,onClick:()=>void s.refetch(),size:`icon-sm`,variant:`ghost`,children:(0,q.jsx)(b,{"aria-hidden":`true`})})]}),(0,q.jsx)(j,{className:`p-0`,children:(0,q.jsx)(_e,{builds:s,channel:r,onChannel:d,onPage:e=>n({...r===void 0?{}:{channel:r},...e}),paged:i!==void 0||o!==void 0})})]})})]})}function ye(){let e=N.useSearch(),t=N.useNavigate();return(0,q.jsx)(ve,{onSearchChange:e=>void t({search:e}),search:e})}export{ye as component};
|