@hot-updater/console 1.1.16 → 1.1.17
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/{EventDetails-gbD_fCqc.js → EventDetails-Bsa_tO26.js} +1 -1
- package/.output/public/assets/HashValueDisplay-Dbmvvu_Z.js +1 -0
- package/.output/public/assets/{index-C83dZaQw.js → index-Yhuo-5CC.js} +2 -2
- package/.output/public/assets/{insights-C-5t8wh2.js → insights-CDaHmPLH.js} +2 -2
- package/.output/public/assets/{insights-KigRBDgC.js → insights-D8lUTlfV.js} +1 -1
- package/.output/public/assets/{installations-K2iJ_r0h.js → installations-CKvlapZ_.js} +1 -1
- package/.output/public/assets/{installations-BskJ1xQr.js → installations-D-jBJZdy.js} +2 -2
- package/.output/public/assets/{routes-D2PhnxCg.js → routes-DGDyRuBO.js} +2 -2
- package/.output/public/assets/routes-D__bl2-N.js +1 -0
- package/.output/public/assets/styles-llBVC-wU.css +2 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-CecGmlTU.mjs → __23tanstack-start-server-fn-resolver-BV89hFG6.mjs} +40 -40
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
- package/.output/server/_ssr/{BundleIdDisplay-D4pyPNyZ.mjs → BundleIdDisplay-Brv3HmMC.mjs} +2 -2
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-DlYKYy2U.mjs → ConsoleFeatureUnavailable-DBgNuqZn.mjs} +6 -6
- package/.output/server/_ssr/{EventDetails-CXw407-0.mjs → EventDetails-BuAsPvHQ.mjs} +6 -6
- package/.output/server/_ssr/HashValueDisplay-EK85YuH4.mjs +65 -0
- package/.output/server/_ssr/{InsightsPageHeader-Dfvtbf7V.mjs → InsightsPageHeader-DDj2xwD8.mjs} +6 -6
- package/.output/server/_ssr/{NotFoundPage-BrpcywL5.mjs → NotFoundPage-CaXrlpP6.mjs} +2 -2
- package/.output/server/_ssr/{alert-dialog-JYGUk0WF.mjs → alert-dialog-DKl3ZJk6.mjs} +1 -1
- package/.output/server/_ssr/{api-u3YQ6eJ-.mjs → api-LKdyvkpU.mjs} +4 -4
- package/.output/server/_ssr/{api-keys-Cha1jRJ4.mjs → api-keys-BEJK2sLo.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-C_319C3q.mjs → api-keys-Bn2_7nDy.mjs} +8 -8
- package/.output/server/_ssr/{api-keys-rpc-BhvvhRyQ.mjs → api-keys-rpc-CoqOL_Fg.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-wywThmmg.mjs → api-rpc-p75iBVDS.mjs} +4 -4
- package/.output/server/_ssr/{auth-rpc-CCmehCTC.mjs → auth-rpc-k0Tcry71.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-CSQjf0yN.mjs → auth.server-Cs8MR8yf.mjs} +2 -2
- package/.output/server/_ssr/{badge-wbyQffo0.mjs → badge-CsjpijFf.mjs} +1 -1
- package/.output/server/_ssr/{config.server-C8fR6mvH.mjs → config.server-B_rXBeVR.mjs} +3 -3
- package/.output/server/_ssr/{console-access-BG-Ivs66.mjs → console-access-CAUYjrQV.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-Ce-DK182.mjs → console-features-api-BJvOz5xc.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-aIKfH81E.mjs → console-features-rpc-3JZlQfRT.mjs} +3 -3
- package/.output/server/_ssr/{dialog-LNB0SjZV.mjs → dialog-DpDIp_ym.mjs} +1 -1
- package/.output/server/_ssr/{empty-qUvT7Pba.mjs → empty-0UVfn2Oa.mjs} +2 -2
- package/.output/server/_ssr/{field-BLeMxV0J.mjs → field-DQVx_tbZ.mjs} +2 -2
- package/.output/server/_ssr/{input-group-d7_ld_a_.mjs → input-group-DpHcWHRy.mjs} +1 -1
- package/.output/server/_ssr/{insights-BSAGK25_.mjs → insights-BZf9Sj9i.mjs} +19 -19
- package/.output/server/_ssr/{insights-uwovZTtF.mjs → insights-Dd0WXu-8.mjs} +5 -5
- package/.output/server/_ssr/{insights-CRK38jG8.mjs → insights-Ds9Q-8lU.mjs} +2 -2
- package/.output/server/_ssr/{insights-api-Bc9D4qft.mjs → insights-api-CG-dVIiC.mjs} +3 -3
- package/.output/server/_ssr/{insights-failures-rpc-DXQsUt7C.mjs → insights-failures-rpc-Bq2M90vP.mjs} +4 -4
- package/.output/server/_ssr/{insights-recovery-rpc-DBqNdiBf.mjs → insights-recovery-rpc-C4d8XQDB.mjs} +3 -3
- package/.output/server/_ssr/{insights-rpc-Da75AN8b.mjs → insights-rpc-BkeVca1Y.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-B4-SXcCH.mjs → insights-search-CTKW2IGw.mjs} +2 -2
- package/.output/server/_ssr/{insights-usage-rpc-D3CGRSmp.mjs → insights-usage-rpc-C2LM8bPZ.mjs} +3 -3
- package/.output/server/_ssr/{insights-usage-rpc-g7ozSHUJ.mjs → insights-usage-rpc-CNslbgI0.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-P7wqOqOT.mjs → insights_.distribution-CgOUh0Qr.mjs} +13 -13
- package/.output/server/_ssr/{insights_.distribution-W7XkAMpc.mjs → insights_.distribution-IhXVERQd.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-DjiknYwI.mjs → insights_.distribution-TGxnjZi9.mjs} +5 -5
- package/.output/server/_ssr/{installations-CHYhhq9k.mjs → installations-D-ysze7n.mjs} +2 -2
- package/.output/server/_ssr/{installations-BpgWdoKu.mjs → installations-Dsq_z8N-.mjs} +4 -4
- package/.output/server/_ssr/{installations-CObS2PM0.mjs → installations-Jb6JCrpI.mjs} +11 -11
- package/.output/server/_ssr/{listReleases-BfUBlCHo.mjs → listReleases-CqSrm0HE.mjs} +3 -2
- package/.output/server/_ssr/{release-adoption-rpc-B5HMc8Yd.mjs → release-adoption-rpc-5M89UyR0.mjs} +5 -5
- package/.output/server/_ssr/{remote-config-D_369oat.mjs → remote-config-BCmNLuiH.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-DaaR--H5.mjs → remote-config-BfSiFYHi.mjs} +17 -17
- package/.output/server/_ssr/{remote-config-B_XvSG5c.mjs → remote-config-DOk_sHQ0.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-Du4GSGmv.mjs → remote-config-rpc-COoz9SqF.mjs} +3 -3
- package/.output/server/_ssr/{router-DYuJ0L1t.mjs → router-Bh21qcpm.mjs} +15 -15
- package/.output/server/_ssr/{routes-C0VdZpYN.mjs → routes-BBqtSP5F.mjs} +10 -10
- package/.output/server/_ssr/{routes-CAPJwwBA.mjs → routes-zGnRKfHt.mjs} +35 -16
- package/.output/server/_ssr/{select-DDBhOGhk.mjs → select-B-WYWlnd.mjs} +1 -1
- package/.output/server/_ssr/{server-yvDBg72O.mjs → server-8fm0iura.mjs} +3 -3
- package/.output/server/_ssr/{sidebar-CKddYGvq.mjs → sidebar-B_GDqHcb.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{switch-zPQydpuN.mjs → switch--NW-CMWA.mjs} +2 -2
- package/.output/server/_ssr/{table-T7Zz7eiu.mjs → table-CzeI0z7n.mjs} +1 -1
- package/.output/server/_ssr/{tabs-C4tgrtY4.mjs → tabs-D4ZRUFEl.mjs} +2 -2
- package/.output/server/{_tanstack-start-manifest_v-Ch7hhxra.mjs → _tanstack-start-manifest_v-BiLQUQTD.mjs} +18 -18
- package/.output/server/index.mjs +128 -128
- package/package.json +7 -7
- package/src/components/HashValueDisplay.tsx +21 -5
- package/src/components/features/bundles/BundleMetadata.tsx +21 -0
- package/src/lib/constants.ts +3 -0
- package/.output/public/assets/HashValueDisplay-BGkDPaYi.js +0 -1
- package/.output/public/assets/routes-CdST5uVt.js +0 -1
- package/.output/public/assets/styles-CpiW_YdW.css +0 -2
- package/.output/server/_ssr/HashValueDisplay-BoDFsgr-.mjs +0 -55
package/.output/nitro.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fn as e,Ur as t,_ as n,ar as r,b as i,ei as a,g as o,ri as s,v as c,x as l,y as u}from"./sidebar-BqX460IW.js";import{o as d}from"./useCompositeListItem-B-UkrDlu.js";import{f}from"./insights-api-1ZjVu3Sb.js";import{p,t as m}from"./badge-Bqf3UDee.js";import{r as h,t as g}from"./HashValueDisplay-BGkDPaYi.js";import{s as _}from"./input-group-B4nrqIh0.js";import{t as v}from"./smartphone-CtsHuiIC.js";import{n as y}from"./dist-dDj-R6uh.js";import{i as b,o as x,r as S,t as C}from"./empty-Bf4DanOL.js";import{n as w,r as T}from"./InsightsPageHeader-BRw8XkJW.js";var E=r(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),D=r(`arrow-right-left`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),O=r(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),k=r(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),A=r(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),j=s(a(),1),M=t(),N={UPDATE_DOWNLOADED:{label:`Downloaded`,description:`Downloaded. It launches when the app restarts.`,variant:`default`,icon:h},UPDATE_APPLIED:{label:`Launched`,description:`The app restarted into the downloaded bundle.`,variant:`success`,icon:p},RECOVERED:{label:`Crashed`,description:`Crashed on the bundle and rolled back.`,variant:`warning`,icon:_},UPDATE_FAILED:{label:`Update failed`,description:`An update check, download, or install failed.`,variant:`destructive`,icon:O},UNCHANGED:{label:`Launch`,description:`The app launched; the report changed nothing.`,variant:`secondary`,icon:E}},P=e=>{let{kinds:t=[],previous:n}=e.change??{};return t.includes(`first_seen`)?{label:`First seen`,description:`The installation's first report to this server.`,variant:`secondary`,icon:A}:t.includes(`app_version`)||t.includes(`native_build`)?{label:`App updated`,description:n&&n.appVersion!==e.appVersion?`From app ${n.appVersion} to ${e.appVersion}.`:`A new build of the same app version.`,variant:`secondary`,icon:v}:t.includes(`bundle`)?{label:`Launched`,description:`Seen running this bundle; the report of the restart into it never arrived.`,variant:`success`,icon:p}:t.includes(`release`)?{label:`Release adopted`,description:`The bundle it runs now ships under another release.`,variant:`secondary`,icon:D}:t.includes(`channel`)?{label:`Channel changed`,description:n?`From ${n.channel} to ${e.channel}.`:`It reports on another channel.`,variant:`secondary`,icon:D}:N.UNCHANGED},F=e=>e.type===`UNCHANGED`&&e.change?P({change:e.change,appVersion:e.appVersion??``,channel:e.channel??``}):N[e.type];function I(){let[e,t]=(0,j.useState)(`UTC`);return(0,j.useEffect)(()=>{t(Intl.DateTimeFormat().resolvedOptions().timeZone)},[]),new Intl.DateTimeFormat(`en`,{timeZone:e,timeZoneName:`shortOffset`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`})}function L(e,t){let n=Object.fromEntries(t.formatToParts(new Date(e)).map(({type:e,value:t})=>[e,t])),r=n.timeZoneName===`GMT`?`GMT+0`:n.timeZoneName;return`${n.year}/${n.month}/${n.day} ${n.hour}:${n.minute}:${n.second} ${r}`}function R({value:e,formatter:t,touch:n=!1}){let r=new Date(e),i=L(e,t);return(0,M.jsxs)(`details`,{className:`group/time`,children:[(0,M.jsx)(`summary`,{className:`cursor-pointer list-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/30 [&::-webkit-details-marker]:hidden ${n?`flex min-h-11 items-center`:``}`,children:(0,M.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,M.jsx)(`time`,{dateTime:r.toISOString(),className:`whitespace-nowrap`,children:i}),(0,M.jsx)(d,{"aria-hidden":`true`,className:`size-3 text-muted-foreground group-open/time:rotate-180`})]})}),(0,M.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:r.toISOString().replace(`T`,` `).replace(`Z`,` UTC`)})]})}var z={patch:`A patch delivered it.`,manifest:`Only the changed files were downloaded.`,archive:`The full archive was downloaded.`},B=e=>{if(e.late)return`Counted nothing: the installation had already downloaded or run this bundle.`;if(e.impliedDownload)return`Its download report never arrived; the download counted with it.`;if(e.type===`UPDATE_FAILED`&&e.failure)return f(e.failure);if(e.type===`UPDATE_DOWNLOADED`&&e.delivery){let t=z[e.delivery]??null;return e.patchFallback?`The patch failed. ${t??``}`.trim():t}return null};function V({response:t}){let n=async()=>{try{await navigator.clipboard.writeText(t.body),y.success(`Response body copied`)}catch{y.error(`Could not copy the response body`)}};return(0,M.jsxs)(`section`,{"aria-label":`Response body`,className:`flex min-w-0 flex-col gap-3`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,M.jsx)(`h3`,{className:`text-sm font-medium`,children:`Response body`}),(0,M.jsxs)(e,{variant:`outline`,className:`min-h-11`,disabled:t.body===null||t.body===``,onClick:()=>void n(),children:[(0,M.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),` Copy body`]})]}),t.bodyTruncated?(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Truncated to the 4 KiB reporting limit. Copy includes only the stored text.`}):null,t.body?(0,M.jsx)(`pre`,{className:`rounded-md border bg-muted/30 p-4 font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere`,children:t.body}):(0,M.jsx)(C,{children:(0,M.jsxs)(b,{children:[(0,M.jsx)(x,{children:t.body===null?`Response body unavailable`:`Empty response body`}),(0,M.jsx)(S,{children:t.body===null?`The client received the HTTP status but could not read the body.`:t.status===304?`The server returned no body. The client can reuse its cached catalog.`:`The server returned no text in this response.`})]})})]})}function H({event:t}){let r=t.httpResponse,a=I(),s=r.status===304?`Not modified`:r.status>=500?`Server error`:r.status>=400?`Request error`:r.status>=300?`Redirect`:`Success`,d=r.resource===`catalog`?`Catalog`:`Artifact`,f=[[`App`,t.platform&&`${t.platform===`ios`?`iOS`:`Android`} ${t.appVersion}`],[`Channel`,t.channel],[`SDK`,t.sdkVersion],[`Installation`,t.installId]].filter(([,e])=>e!=null);return(0,M.jsxs)(o,{children:[(0,M.jsxs)(l,{"aria-label":`View ${d.toLowerCase()} response: HTTP ${r.status}`,render:(0,M.jsx)(e,{variant:`ghost`,className:`-ml-2 h-auto min-h-11 justify-start`}),children:[(0,M.jsxs)(m,{variant:r.status>=400?`destructive`:`secondary`,children:[`HTTP `,r.status]}),(0,M.jsxs)(`span`,{children:[d,` response`]})]}),(0,M.jsxs)(n,{className:`data-[side=right]:w-full data-[side=right]:sm:max-w-2xl`,children:[(0,M.jsxs)(u,{className:`border-b pr-14`,children:[(0,M.jsx)(i,{children:`HTTP response`}),(0,M.jsxs)(c,{children:[d,` · HTTP `,r.status,` · `,s,`. Most recent response available when this report was created.`]})]}),(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-6`,children:[(0,M.jsxs)(`section`,{"aria-label":`Request`,className:`flex min-w-0 flex-col gap-2`,children:[(0,M.jsx)(`h3`,{className:`text-sm font-medium`,children:`Request`}),(0,M.jsxs)(`p`,{className:`font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere`,children:[`GET `,r.path]}),r.receivedAtMs==null?null:(0,M.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`Response received`,` `,(0,M.jsx)(R,{value:r.receivedAtMs,formatter:a})]})]}),(0,M.jsx)(V,{response:r}),f.length?(0,M.jsxs)(`section`,{"aria-label":`Response context`,className:`flex flex-col gap-3`,children:[(0,M.jsx)(`h3`,{className:`text-sm font-medium`,children:`Response context`}),(0,M.jsx)(`dl`,{className:`grid grid-cols-2 gap-x-6 gap-y-4`,children:f.map(([e,t])=>(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:e}),(0,M.jsx)(`dd`,{className:`mt-1 text-sm wrap-anywhere`,children:t})]},e))})]}):null]})]})]})}function U({event:e}){let t=F(e),n=t.icon,r=B(e);return(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col items-start gap-2`,children:[(0,M.jsxs)(m,{variant:t.variant,className:`gap-1 whitespace-nowrap [&_svg]:size-3`,children:[(0,M.jsx)(n,{"aria-hidden":`true`}),t.label]}),(0,M.jsx)(`p`,{className:`max-w-56 whitespace-pre-wrap wrap-anywhere text-xs text-muted-foreground`,children:e.type===`UPDATE_FAILED`&&r?r:t.description}),e.httpResponse?(0,M.jsx)(H,{event:e}):null,e.type===`UPDATE_FAILED`&&e.failure?.errorStack?(0,M.jsxs)(`details`,{className:`w-full max-w-56 text-xs`,children:[(0,M.jsx)(`summary`,{className:`cursor-pointer text-muted-foreground`,children:`Stack trace`}),(0,M.jsx)(`pre`,{className:`mt-2 max-h-64 overflow-auto whitespace-pre-wrap wrap-anywhere font-mono`,children:e.failure.errorStack})]}):null,e.type!==`UPDATE_FAILED`&&r?(0,M.jsx)(`p`,{className:`max-w-56 whitespace-normal text-xs text-muted-foreground`,children:r}):null]})}function W({event:e,touch:t=!1}){let n=e.type===`UPDATE_DOWNLOADED`,r=e.type===`UPDATE_FAILED`,i=!r||e.failure?.stage!==`check`,a=e.type===`UNCHANGED`&&e.change?.kinds.includes(`bundle`)===!0&&e.change.previous!==void 0,o=a?e.change.previous.bundleId:e.fromBundleId,s=n||r||a||e.type===`UPDATE_APPLIED`||e.type===`RECOVERED`;return(0,M.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2 gap-y-2`,children:[o&&s?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`dt`,{className:`text-muted-foreground`,children:n||r?`Running`:`From`}),(0,M.jsxs)(`dd`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,M.jsx)(g,{value:o,buttonClassName:t?`min-h-11 px-3`:void 0}),T(o,a?e.change.previous.minBundleId:e.minBundleId)?(0,M.jsx)(w,{}):null]})]}):null,i?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`dt`,{className:`text-muted-foreground`,children:n?`Pending`:r?`Target`:s?`To`:`Current`}),(0,M.jsxs)(`dd`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,M.jsx)(g,{value:e.toBundleId,buttonClassName:t?`min-h-11 px-3`:void 0}),T(e.toBundleId,e.minBundleId)?(0,M.jsx)(w,{}):null]})]}):null]})}export{H as a,V as i,R as n,I as o,U as r,k as s,W as t};
|
|
1
|
+
import{Fn as e,Ur as t,_ as n,ar as r,b as i,ei as a,g as o,ri as s,v as c,x as l,y as u}from"./sidebar-BqX460IW.js";import{o as d}from"./useCompositeListItem-B-UkrDlu.js";import{f}from"./insights-api-1ZjVu3Sb.js";import{p,t as m}from"./badge-Bqf3UDee.js";import{r as h,t as g}from"./HashValueDisplay-Dbmvvu_Z.js";import{s as _}from"./input-group-B4nrqIh0.js";import{t as v}from"./smartphone-CtsHuiIC.js";import{n as y}from"./dist-dDj-R6uh.js";import{i as b,o as x,r as S,t as C}from"./empty-Bf4DanOL.js";import{n as w,r as T}from"./InsightsPageHeader-BRw8XkJW.js";var E=r(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),D=r(`arrow-right-left`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),O=r(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),k=r(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),A=r(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),j=s(a(),1),M=t(),N={UPDATE_DOWNLOADED:{label:`Downloaded`,description:`Downloaded. It launches when the app restarts.`,variant:`default`,icon:h},UPDATE_APPLIED:{label:`Launched`,description:`The app restarted into the downloaded bundle.`,variant:`success`,icon:p},RECOVERED:{label:`Crashed`,description:`Crashed on the bundle and rolled back.`,variant:`warning`,icon:_},UPDATE_FAILED:{label:`Update failed`,description:`An update check, download, or install failed.`,variant:`destructive`,icon:O},UNCHANGED:{label:`Launch`,description:`The app launched; the report changed nothing.`,variant:`secondary`,icon:E}},P=e=>{let{kinds:t=[],previous:n}=e.change??{};return t.includes(`first_seen`)?{label:`First seen`,description:`The installation's first report to this server.`,variant:`secondary`,icon:A}:t.includes(`app_version`)||t.includes(`native_build`)?{label:`App updated`,description:n&&n.appVersion!==e.appVersion?`From app ${n.appVersion} to ${e.appVersion}.`:`A new build of the same app version.`,variant:`secondary`,icon:v}:t.includes(`bundle`)?{label:`Launched`,description:`Seen running this bundle; the report of the restart into it never arrived.`,variant:`success`,icon:p}:t.includes(`release`)?{label:`Release adopted`,description:`The bundle it runs now ships under another release.`,variant:`secondary`,icon:D}:t.includes(`channel`)?{label:`Channel changed`,description:n?`From ${n.channel} to ${e.channel}.`:`It reports on another channel.`,variant:`secondary`,icon:D}:N.UNCHANGED},F=e=>e.type===`UNCHANGED`&&e.change?P({change:e.change,appVersion:e.appVersion??``,channel:e.channel??``}):N[e.type];function I(){let[e,t]=(0,j.useState)(`UTC`);return(0,j.useEffect)(()=>{t(Intl.DateTimeFormat().resolvedOptions().timeZone)},[]),new Intl.DateTimeFormat(`en`,{timeZone:e,timeZoneName:`shortOffset`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`})}function L(e,t){let n=Object.fromEntries(t.formatToParts(new Date(e)).map(({type:e,value:t})=>[e,t])),r=n.timeZoneName===`GMT`?`GMT+0`:n.timeZoneName;return`${n.year}/${n.month}/${n.day} ${n.hour}:${n.minute}:${n.second} ${r}`}function R({value:e,formatter:t,touch:n=!1}){let r=new Date(e),i=L(e,t);return(0,M.jsxs)(`details`,{className:`group/time`,children:[(0,M.jsx)(`summary`,{className:`cursor-pointer list-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/30 [&::-webkit-details-marker]:hidden ${n?`flex min-h-11 items-center`:``}`,children:(0,M.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,M.jsx)(`time`,{dateTime:r.toISOString(),className:`whitespace-nowrap`,children:i}),(0,M.jsx)(d,{"aria-hidden":`true`,className:`size-3 text-muted-foreground group-open/time:rotate-180`})]})}),(0,M.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:r.toISOString().replace(`T`,` `).replace(`Z`,` UTC`)})]})}var z={patch:`A patch delivered it.`,manifest:`Only the changed files were downloaded.`,archive:`The full archive was downloaded.`},B=e=>{if(e.late)return`Counted nothing: the installation had already downloaded or run this bundle.`;if(e.impliedDownload)return`Its download report never arrived; the download counted with it.`;if(e.type===`UPDATE_FAILED`&&e.failure)return f(e.failure);if(e.type===`UPDATE_DOWNLOADED`&&e.delivery){let t=z[e.delivery]??null;return e.patchFallback?`The patch failed. ${t??``}`.trim():t}return null};function V({response:t}){let n=async()=>{try{await navigator.clipboard.writeText(t.body),y.success(`Response body copied`)}catch{y.error(`Could not copy the response body`)}};return(0,M.jsxs)(`section`,{"aria-label":`Response body`,className:`flex min-w-0 flex-col gap-3`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,M.jsx)(`h3`,{className:`text-sm font-medium`,children:`Response body`}),(0,M.jsxs)(e,{variant:`outline`,className:`min-h-11`,disabled:t.body===null||t.body===``,onClick:()=>void n(),children:[(0,M.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),` Copy body`]})]}),t.bodyTruncated?(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Truncated to the 4 KiB reporting limit. Copy includes only the stored text.`}):null,t.body?(0,M.jsx)(`pre`,{className:`rounded-md border bg-muted/30 p-4 font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere`,children:t.body}):(0,M.jsx)(C,{children:(0,M.jsxs)(b,{children:[(0,M.jsx)(x,{children:t.body===null?`Response body unavailable`:`Empty response body`}),(0,M.jsx)(S,{children:t.body===null?`The client received the HTTP status but could not read the body.`:t.status===304?`The server returned no body. The client can reuse its cached catalog.`:`The server returned no text in this response.`})]})})]})}function H({event:t}){let r=t.httpResponse,a=I(),s=r.status===304?`Not modified`:r.status>=500?`Server error`:r.status>=400?`Request error`:r.status>=300?`Redirect`:`Success`,d=r.resource===`catalog`?`Catalog`:`Artifact`,f=[[`App`,t.platform&&`${t.platform===`ios`?`iOS`:`Android`} ${t.appVersion}`],[`Channel`,t.channel],[`SDK`,t.sdkVersion],[`Installation`,t.installId]].filter(([,e])=>e!=null);return(0,M.jsxs)(o,{children:[(0,M.jsxs)(l,{"aria-label":`View ${d.toLowerCase()} response: HTTP ${r.status}`,render:(0,M.jsx)(e,{variant:`ghost`,className:`-ml-2 h-auto min-h-11 justify-start`}),children:[(0,M.jsxs)(m,{variant:r.status>=400?`destructive`:`secondary`,children:[`HTTP `,r.status]}),(0,M.jsxs)(`span`,{children:[d,` response`]})]}),(0,M.jsxs)(n,{className:`data-[side=right]:w-full data-[side=right]:sm:max-w-2xl`,children:[(0,M.jsxs)(u,{className:`border-b pr-14`,children:[(0,M.jsx)(i,{children:`HTTP response`}),(0,M.jsxs)(c,{children:[d,` · HTTP `,r.status,` · `,s,`. Most recent response available when this report was created.`]})]}),(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-6`,children:[(0,M.jsxs)(`section`,{"aria-label":`Request`,className:`flex min-w-0 flex-col gap-2`,children:[(0,M.jsx)(`h3`,{className:`text-sm font-medium`,children:`Request`}),(0,M.jsxs)(`p`,{className:`font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere`,children:[`GET `,r.path]}),r.receivedAtMs==null?null:(0,M.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`Response received`,` `,(0,M.jsx)(R,{value:r.receivedAtMs,formatter:a})]})]}),(0,M.jsx)(V,{response:r}),f.length?(0,M.jsxs)(`section`,{"aria-label":`Response context`,className:`flex flex-col gap-3`,children:[(0,M.jsx)(`h3`,{className:`text-sm font-medium`,children:`Response context`}),(0,M.jsx)(`dl`,{className:`grid grid-cols-2 gap-x-6 gap-y-4`,children:f.map(([e,t])=>(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:e}),(0,M.jsx)(`dd`,{className:`mt-1 text-sm wrap-anywhere`,children:t})]},e))})]}):null]})]})]})}function U({event:e}){let t=F(e),n=t.icon,r=B(e);return(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col items-start gap-2`,children:[(0,M.jsxs)(m,{variant:t.variant,className:`gap-1 whitespace-nowrap [&_svg]:size-3`,children:[(0,M.jsx)(n,{"aria-hidden":`true`}),t.label]}),(0,M.jsx)(`p`,{className:`max-w-56 whitespace-pre-wrap wrap-anywhere text-xs text-muted-foreground`,children:e.type===`UPDATE_FAILED`&&r?r:t.description}),e.httpResponse?(0,M.jsx)(H,{event:e}):null,e.type===`UPDATE_FAILED`&&e.failure?.errorStack?(0,M.jsxs)(`details`,{className:`w-full max-w-56 text-xs`,children:[(0,M.jsx)(`summary`,{className:`cursor-pointer text-muted-foreground`,children:`Stack trace`}),(0,M.jsx)(`pre`,{className:`mt-2 max-h-64 overflow-auto whitespace-pre-wrap wrap-anywhere font-mono`,children:e.failure.errorStack})]}):null,e.type!==`UPDATE_FAILED`&&r?(0,M.jsx)(`p`,{className:`max-w-56 whitespace-normal text-xs text-muted-foreground`,children:r}):null]})}function W({event:e,touch:t=!1}){let n=e.type===`UPDATE_DOWNLOADED`,r=e.type===`UPDATE_FAILED`,i=!r||e.failure?.stage!==`check`,a=e.type===`UNCHANGED`&&e.change?.kinds.includes(`bundle`)===!0&&e.change.previous!==void 0,o=a?e.change.previous.bundleId:e.fromBundleId,s=n||r||a||e.type===`UPDATE_APPLIED`||e.type===`RECOVERED`;return(0,M.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2 gap-y-2`,children:[o&&s?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`dt`,{className:`text-muted-foreground`,children:n||r?`Running`:`From`}),(0,M.jsxs)(`dd`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,M.jsx)(g,{value:o,buttonClassName:t?`min-h-11 px-3`:void 0}),T(o,a?e.change.previous.minBundleId:e.minBundleId)?(0,M.jsx)(w,{}):null]})]}):null,i?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`dt`,{className:`text-muted-foreground`,children:n?`Pending`:r?`Target`:s?`To`:`Current`}),(0,M.jsxs)(`dd`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,M.jsx)(g,{value:e.toBundleId,buttonClassName:t?`min-h-11 px-3`:void 0}),T(e.toBundleId,e.minBundleId)?(0,M.jsx)(w,{}):null]})]}):null]})}export{H as a,V as i,R as n,I as o,U as r,k as s,W as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ln as e,Ur as t,ar as n,ei as r,it as i,nt as a,ri as o,tt as s}from"./sidebar-BqX460IW.js";import{n as c}from"./dist-dDj-R6uh.js";var l=n(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),u=o(r(),1),d=t(),f=(e,t=12)=>e.length>t?`${e.slice(0,Math.max(1,t-4))}…${e.slice(-4)}`:e;function p({value:t,maxLength:n=12,className:r,buttonClassName:o,hint:l}){let[p,m]=(0,u.useState)(!1),h=t.length>n,g=f(t,n),_=async()=>{try{await navigator.clipboard.writeText(t),c.success(`Copied to clipboard`,{description:t})}catch{c.error(`Failed to copy value`)}},v=e=>{e.preventDefault(),e.stopPropagation(),l&&m(!0),_()},y=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),_())},b=(0,d.jsx)(`span`,{translate:`no`,className:e(`font-mono text-xs tabular-nums whitespace-nowrap`,r),children:g});return(0,d.jsxs)(s,{open:p,onOpenChange:m,children:[(0,d.jsx)(i,{closeOnClick:!l,render:(0,d.jsx)(`button`,{type:`button`,"aria-label":`Copy full value: ${t}`,translate:`no`,className:e(`ring-ring/30 bg-muted/40 border-border/70 inline-flex min-w-0 max-w-full cursor-pointer items-center rounded-md border px-1.5 py-0.5 align-top shadow-xs outline-none transition-[background-color,border-color,transform,box-shadow]`,`hover:bg-muted/70 active:scale-[0.98] active:bg-muted/85 focus-visible:ring-[2px]`,`touch-manipulation select-none motion-reduce:transition-none motion-reduce:active:scale-100`,!h&&`cursor-copy`,o),onClick:v,onKeyDown:y}),children:b}),(0,d.jsxs)(a,{className:l?`max-w-64 flex-col items-start`:void 0,hidden:!h&&!l,children:[h?(0,d.jsx)(`p`,{translate:`no`,className:`break-all font-mono text-xs tabular-nums`,children:t}):null,l?(0,d.jsx)(`p`,{children:l}):null]})]})}export{f as n,l as r,p as t};
|