@hot-updater/console 1.2.0-rc.32 → 1.2.0-rc.33
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/{CompositeItem-Ci-Dvjc7.js → CompositeItem-CyQoQkYs.js} +1 -1
- package/.output/public/assets/{EventDetails-DglqzK6l.js → EventDetails-DFWS-HcW.js} +1 -1
- package/.output/public/assets/{InsightsPageHeader-DLH1MntM.js → InsightsPageHeader-BATHTZWn.js} +1 -1
- package/.output/public/assets/IosInstall-DsKczesK.js +1 -0
- package/.output/public/assets/{NativeBuildsNav-BgeUSMqw.js → NativeBuildsNav-D3FIlSu0.js} +1 -1
- package/.output/public/assets/{api-keys-DL9HeC8e.js → api-keys-C_u_ZmPS.js} +1 -1
- package/.output/public/assets/{index-DZdzmvWS.js → index-BZVWufH3.js} +3 -3
- package/.output/public/assets/{insights-6d-iISFa.js → insights-Bm4Kua5R.js} +2 -2
- package/.output/public/assets/{insights-DotP9eJn.js → insights-CpnFoyo5.js} +2 -2
- package/.output/public/assets/{insights_.distribution-DATeWpQS.js → insights_.distribution-Bjo0aQE4.js} +1 -1
- package/.output/public/assets/{insights_.distribution-DYgsR7-7.js → insights_.distribution-Dd2mYz8D.js} +2 -2
- package/.output/public/assets/{installations-Lm8TxrcB.js → installations-DYT2mSjX.js} +2 -2
- package/.output/public/assets/{installations-Ds-MhfsQ.js → installations-iqDa8KPW.js} +1 -1
- package/.output/public/assets/native-builds-7sC78eTq.js +1 -0
- package/.output/public/assets/{native-builds-Bs_JroPG.js → native-builds-CXDwW54k.js} +2 -2
- package/.output/public/assets/{native-builds_._buildId-Bj24bG99.js → native-builds_._buildId-C7-yUwvH.js} +2 -2
- package/.output/public/assets/native-builds_._buildId-u5dG7ej5.js +1 -0
- package/.output/public/assets/native-builds_.devices-CQ_tB3SO.js +1 -0
- package/.output/public/assets/{native-builds_.devices-o6LsPF9Y.js → native-builds_.devices-C_YZoRxB.js} +2 -2
- package/.output/public/assets/{remote-config-g05054op.js → remote-config-BbiN7bGR.js} +3 -3
- package/.output/public/assets/{remote-config-Buy_12p7.js → remote-config-BhdrBpLM.js} +1 -1
- package/.output/public/assets/{routes-5mt1iab-.js → routes-C4MTDNA3.js} +2 -2
- package/.output/public/assets/routes-Cjjfwbs_.js +1 -0
- package/.output/public/assets/{styles-CN7c7MGr.css → styles-CQNxu86i.css} +1 -1
- package/.output/public/assets/{tabs-B95QcXeT.js → tabs-BBfg-c0h.js} +1 -1
- package/.output/server/{__23tanstack-start-server-fn-resolver-ET1Ypyyk.mjs → __23tanstack-start-server-fn-resolver-DBw1tYEH.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-CpaKbEYb.mjs → BundleIdDisplay-DsNg19E8.mjs} +2 -2
- package/.output/server/_ssr/{ChannelBadge-dVXs-bYV.mjs → ChannelBadge-DWQcxohs.mjs} +3 -3
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-DWuWwY4L.mjs → ConsoleFeatureUnavailable-CfcFJ4k4.mjs} +6 -6
- package/.output/server/_ssr/{EventDetails-CcuGyU26.mjs → EventDetails-DJYShaIG.mjs} +6 -6
- package/.output/server/_ssr/{HashValueDisplay-ClkGq5_0.mjs → HashValueDisplay-B7FFJcIK.mjs} +2 -2
- package/.output/server/_ssr/{InsightsPageHeader-Bw6RVpdS.mjs → InsightsPageHeader-CaceslcD.mjs} +6 -6
- package/.output/server/_ssr/{IosInstall-DEceeAVT.mjs → IosInstall-gEVi9PFl.mjs} +57 -14
- package/.output/server/_ssr/{NativeBuildsNav-ChqRZH4E.mjs → NativeBuildsNav-DoB6DGO2.mjs} +3 -3
- package/.output/server/_ssr/{NotFoundPage-aZrAWo5n.mjs → NotFoundPage-Bu3yot-M.mjs} +2 -2
- package/.output/server/_ssr/{QrCode-pEaOdaRS.mjs → QrCode-DkmvYkKS.mjs} +2 -2
- package/.output/server/_ssr/{RelativeTime-CFIJbj_r.mjs → RelativeTime-Dg47Cmmt.mjs} +3 -3
- package/.output/server/_ssr/{RolloutPercentageBadge-BEqOJXly.mjs → RolloutPercentageBadge-CcEZuUxL.mjs} +3 -3
- package/.output/server/_ssr/{RowReason-DXbU_Nml.mjs → RowReason-CbKEYA9N.mjs} +4 -4
- package/.output/server/_ssr/{SandboxBadge-CP76AVxN.mjs → SandboxBadge-CuTOlGaF.mjs} +2 -2
- package/.output/server/_ssr/{TargetDisplay-csC-slf3.mjs → TargetDisplay-DkRZwhNW.mjs} +3 -3
- package/.output/server/_ssr/{alert-dialog-Dn5l3Bob.mjs → alert-dialog-Ckdomw6e.mjs} +1 -1
- package/.output/server/_ssr/{api-W0WerUfm.mjs → api-BIDpAoY0.mjs} +3 -3
- package/.output/server/_ssr/{api-keys-D7kmFdhY.mjs → api-keys-BStTPcTe.mjs} +10 -9
- package/.output/server/_ssr/{api-keys-Btu37Irf.mjs → api-keys-MdcfK9Zw.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-9o4CyzUZ.mjs → api-keys-rpc-FwkHHfJL.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-B1HnUZMu.mjs → api-rpc-DI164kWO.mjs} +7 -7
- package/.output/server/_ssr/{auth-rpc-BBy2L4Ah.mjs → auth-rpc-DOONC4Xw.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-ajvR-m99.mjs → auth.server-MkFb8t-c.mjs} +2 -2
- package/.output/server/_ssr/{badge-DlEpe8yC.mjs → badge-MGJQ5WNb.mjs} +1 -1
- package/.output/server/_ssr/{card-AK7Ms1Oa.mjs → card-st1F0w5g.mjs} +1 -1
- package/.output/server/_ssr/{config.server-DswyWSgG.mjs → config.server-A4yZxfTn.mjs} +3 -3
- package/.output/server/_ssr/{console-access-DM56j3dM.mjs → console-access-Cj95NxRZ.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-g5s9V5sz.mjs → console-features-api-WvvE114Q.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-Cnmhvmsk.mjs → console-features-rpc-DxhmScBd.mjs} +3 -3
- package/.output/server/_ssr/{dialog-0oBrR9Cj.mjs → dialog-jxN7lCij.mjs} +1 -1
- package/.output/server/_ssr/{empty-tasgkoU9.mjs → empty-Dfmlc-7_.mjs} +2 -2
- package/.output/server/_ssr/{field-phtuBLMh.mjs → field-BrPlhj0S.mjs} +2 -2
- package/.output/server/_ssr/{input-group-BTEoUANX.mjs → input-group-Ckaa4ML0.mjs} +1 -1
- package/.output/server/_ssr/{insights-BBzyKO95.mjs → insights-BX9okQmy.mjs} +2 -2
- package/.output/server/_ssr/{insights-D4le8l6s.mjs → insights-CmbOo4Er.mjs} +23 -23
- package/.output/server/_ssr/{insights-CPDtpuXg.mjs → insights-DHvN6knB.mjs} +5 -5
- package/.output/server/_ssr/{insights-api-D6J2HVtY.mjs → insights-api-t8rcSzVu.mjs} +3 -3
- package/.output/server/_ssr/{insights-failures-rpc-ChwlB9sg.mjs → insights-failures-rpc-DadwsaxJ.mjs} +4 -4
- package/.output/server/_ssr/{insights-recovery-rpc-B6_GT-_U.mjs → insights-recovery-rpc-BK-RELe9.mjs} +3 -3
- package/.output/server/_ssr/{insights-rpc-DG0GxsIL.mjs → insights-rpc-BmDuFOYA.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-LKeSNr4M.mjs → insights-search-CQ0aMRHX.mjs} +2 -2
- package/.output/server/_ssr/{insights-usage-rpc-I0Eh5Z89.mjs → insights-usage-rpc-CkeNir2v.mjs} +3 -3
- package/.output/server/_ssr/{insights-usage-rpc-qnQWkNn2.mjs → insights-usage-rpc-JhBWMZfn.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-Dgv-_T7g.mjs → insights_.distribution-BtGiM-F8.mjs} +14 -14
- package/.output/server/_ssr/{insights_.distribution-D2dZwvqQ.mjs → insights_.distribution-CEldmJz1.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-BF99IaZu.mjs → insights_.distribution-DlBTOrjk.mjs} +5 -5
- package/.output/server/_ssr/{installations-DVTUpBGI.mjs → installations-3fgKUnRv.mjs} +11 -11
- package/.output/server/_ssr/{installations-BHjU8FUI.mjs → installations-DHbd6gfU.mjs} +2 -2
- package/.output/server/_ssr/{installations-C7TindNY.mjs → installations-oBJc0TH1.mjs} +4 -4
- package/.output/server/_ssr/{ios-devices-rpc-KtosHTCC.mjs → ios-devices-rpc-DjlS64L9.mjs} +7 -7
- package/.output/server/_ssr/{iosDeviceCookie-B-8c7lMJ.mjs → iosDeviceCookie-Ccxr1MR8.mjs} +3 -3
- package/.output/server/_ssr/{iosDeviceProfile-CIEuY_kV.mjs → iosDeviceProfile-nEW-zQnl.mjs} +2 -2
- package/.output/server/_ssr/{iosDevices-CkLgS8_U.mjs → iosDevices-gG7HCnCL.mjs} +2 -2
- package/.output/server/_ssr/{native-builds-3WEAnb93.mjs → native-builds-Be2Ga-eY.mjs} +15 -15
- package/.output/server/_ssr/{native-builds-B6rWkcHL.mjs → native-builds-mq_fr3k0.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_._buildId-BaykQRJl.mjs → native-builds_._buildId-Cq-3MWHV.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_._buildId-RFJXyul0.mjs → native-builds_._buildId-Du028raJ.mjs} +17 -17
- package/.output/server/_ssr/{native-builds_.devices-BzkeAX0K.mjs → native-builds_.devices-CWOFxrsg.mjs} +18 -20
- package/.output/server/_ssr/{native-builds_.devices-D9EGVV1N.mjs → native-builds_.devices-DVBT3gKp.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildDownloadLink-A1aWZBDw.mjs → nativeBuildDownloadLink-BXFMIxJ8.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildInstall-XzMDX9iY.mjs → nativeBuildInstall-CjG3sJmP.mjs} +3 -3
- package/.output/server/_ssr/{release-adoption-rpc-DoDlwfWB.mjs → release-adoption-rpc-BiUppdo3.mjs} +5 -5
- package/.output/server/_ssr/{remote-config-BMg2UurZ.mjs → remote-config-8SDPC3Ex.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-u_T4AXyi.mjs → remote-config-CKjwym6Y.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-6lhdA4DB.mjs → remote-config-MgYpLVNI.mjs} +18 -18
- package/.output/server/_ssr/{remote-config-rpc-Ddg8dyxw.mjs → remote-config-rpc-RoH5hIma.mjs} +3 -3
- package/.output/server/_ssr/{router-CovCAswJ.mjs → router-DaSGo-53.mjs} +34 -34
- package/.output/server/_ssr/{routes-CTUvEVa6.mjs → routes-2wXfjE3q.mjs} +23 -23
- package/.output/server/_ssr/{routes-DtkONaBi.mjs → routes-Y7SrNegl.mjs} +10 -10
- package/.output/server/_ssr/{schema-migration-rpc-DvmruDB6.mjs → schema-migration-rpc-C302GUdI.mjs} +3 -3
- package/.output/server/_ssr/{select-DJLTQgmc.mjs → select-DsWMUB9T.mjs} +1 -1
- package/.output/server/_ssr/{server-BfWxoIjf.mjs → server-Bx_Shfka.mjs} +3 -3
- package/.output/server/_ssr/{sidebar-Bsfqid7Q.mjs → sidebar-S1E-7aSS.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{switch-DckZkZBS.mjs → switch-DMCgvrFu.mjs} +2 -2
- package/.output/server/_ssr/{table-DG8aRQBO.mjs → table-BN3AmMyY.mjs} +1 -1
- package/.output/server/_ssr/{tabs-Dblh3lL2.mjs → tabs-D3tzMdsj.mjs} +3 -3
- package/.output/server/{_tanstack-start-manifest_v-CfDH9vVq.mjs → _tanstack-start-manifest_v-DcKFR9bk.mjs} +30 -30
- package/.output/server/index.mjs +251 -251
- package/package.json +7 -7
- package/src/components/features/api-keys/ApiKeysPage.tsx +3 -1
- package/src/components/features/insights/FailureReports.tsx +2 -2
- package/src/components/features/insights/ReleaseCombobox.tsx +1 -1
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +1 -1
- package/src/components/features/native-builds/IosDevicesPage.tsx +11 -4
- package/src/components/features/native-builds/IosInstall.tsx +36 -1
- package/src/components/features/native-builds/NativeBuildsTable.tsx +1 -1
- package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/lib/ios-devices-api.ts +42 -5
- package/.output/public/assets/IosInstall-2R2o1IXd.js +0 -1
- package/.output/public/assets/native-builds-Chv-kXaS.js +0 -1
- package/.output/public/assets/native-builds_._buildId-Somk3u9R.js +0 -1
- package/.output/public/assets/native-builds_.devices-afOLyzux.js +0 -1
- package/.output/public/assets/routes-BxJfMpil.js +0 -1
package/.output/nitro.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Cr as e,Sr as t,Vr as n,xr as r}from"./sidebar-UnsNYOry.js";import{s as i}from"./tabs-
|
|
1
|
+
import{Cr as e,Sr as t,Vr as n,xr as r}from"./sidebar-UnsNYOry.js";import{s as i}from"./tabs-BBfg-c0h.js";var a=n(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]);function o(n){let{render:a,className:o,style:s,state:c=e,props:l=t,refs:u=t,metadata:d,stateAttributesMapping:f,tag:p=`div`,...m}=n,{compositeProps:h,compositeRef:g}=i({metadata:d});return r(p,n,{state:c,ref:[...u,g],props:[h,...l,m],stateAttributesMapping:f})}export{a as n,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Di as e,Ri as t,Vi as n,Vr as r,_ as i,b as a,g as o,gr as s,v as c,x as l,y as u}from"./sidebar-UnsNYOry.js";import{f as d}from"./insights-api-CXXCRZhF.js";import{t as f}from"./check-Dz_5aNwx.js";import{a as p}from"./useCompositeListItem-B9ONn9qn.js";import{t as m}from"./copy-BxI24-g-.js";import{t as h}from"./download-ekENI2Sw.js";import{s as g}from"./input-group-DNfVeeYZ.js";import{t as _}from"./smartphone-lSZWrqxx.js";import{t as v}from"./badge-D4Tiwei-.js";import{n as y}from"./dist-BEIz5ojx.js";import{i as b,o as x,r as S,t as C}from"./empty-DpSPWLc2.js";import{t as w}from"./HashValueDisplay-DKziWjEg.js";import{n as T,r as E}from"./InsightsPageHeader-DLH1MntM.js";var D=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`}]]),O=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`}]]),k=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`}]]),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=n(t(),1),M=e(),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:f},RECOVERED:{label:`Crashed`,description:`Crashed on the bundle and rolled back.`,variant:`warning`,icon:g},UPDATE_FAILED:{label:`Update failed`,description:`An update check, download, or install failed.`,variant:`destructive`,icon:k},UNCHANGED:{label:`Launch`,description:`The app launched; the report changed nothing.`,variant:`secondary`,icon:D}},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:_}:t.includes(`bundle`)?{label:`Launched`,description:`Seen running this bundle; the report of the restart into it never arrived.`,variant:`success`,icon:f}:t.includes(`release`)?{label:`Release adopted`,description:`The bundle it runs now ships under another release.`,variant:`secondary`,icon:O}:t.includes(`channel`)?{label:`Channel changed`,description:n?`From ${n.channel} to ${e.channel}.`:`It reports on another channel.`,variant:`secondary`,icon:O}: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)(p,{"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 d(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:e}){let t=async()=>{try{await navigator.clipboard.writeText(e.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)(s,{variant:`outline`,className:`min-h-11`,disabled:e.body===null||e.body===``,onClick:()=>void t(),children:[(0,M.jsx)(m,{"aria-hidden":`true`,"data-icon":`inline-start`}),` Copy body`]})]}),e.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,e.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:e.body}):(0,M.jsx)(C,{children:(0,M.jsxs)(b,{children:[(0,M.jsx)(x,{children:e.body===null?`Response body unavailable`:`Empty response body`}),(0,M.jsx)(S,{children:e.body===null?`The client received the HTTP status but could not read the body.`:e.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:e}){let t=e.httpResponse,n=I(),r=t.status===304?`Not modified`:t.status>=500?`Server error`:t.status>=400?`Request error`:t.status>=300?`Redirect`:`Success`,d=t.resource===`catalog`?`Catalog`:`Artifact`,f=[[`App`,e.platform&&`${e.platform===`ios`?`iOS`:`Android`} ${e.appVersion}`],[`Channel`,e.channel],[`SDK`,e.sdkVersion],[`Installation`,e.installId]].filter(([,e])=>e!=null);return(0,M.jsxs)(o,{children:[(0,M.jsxs)(l,{"aria-label":`View ${d.toLowerCase()} response: HTTP ${t.status}`,render:(0,M.jsx)(s,{variant:`ghost`,className:`-ml-2 h-auto min-h-11 justify-start`}),children:[(0,M.jsxs)(v,{variant:t.status>=400?`destructive`:`secondary`,children:[`HTTP `,t.status]}),(0,M.jsxs)(`span`,{children:[d,` response`]})]}),(0,M.jsxs)(i,{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)(a,{children:`HTTP response`}),(0,M.jsxs)(c,{children:[d,` · HTTP `,t.status,` · `,r,`. 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 `,t.path]}),t.receivedAtMs==null?null:(0,M.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`Response received`,` `,(0,M.jsx)(R,{value:t.receivedAtMs,formatter:n})]})]}),(0,M.jsx)(V,{response:t}),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)(v,{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)(w,{value:o,buttonClassName:t?`min-h-11 px-3`:void 0}),E(o,a?e.change.previous.minBundleId:e.minBundleId)?(0,M.jsx)(T,{}):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)(w,{value:e.toBundleId,buttonClassName:t?`min-h-11 px-3`:void 0}),E(e.toBundleId,e.minBundleId)?(0,M.jsx)(T,{}):null]})]}):null]})}export{H as a,V as i,R as n,I as o,U as r,W as t};
|
|
1
|
+
import{Di as e,Ri as t,Vi as n,Vr as r,_ as i,b as a,g as o,gr as s,v as c,x as l,y as u}from"./sidebar-UnsNYOry.js";import{f as d}from"./insights-api-CXXCRZhF.js";import{t as f}from"./check-Dz_5aNwx.js";import{a as p}from"./useCompositeListItem-B9ONn9qn.js";import{t as m}from"./copy-BxI24-g-.js";import{t as h}from"./download-ekENI2Sw.js";import{s as g}from"./input-group-DNfVeeYZ.js";import{t as _}from"./smartphone-lSZWrqxx.js";import{t as v}from"./badge-D4Tiwei-.js";import{n as y}from"./dist-BEIz5ojx.js";import{i as b,o as x,r as S,t as C}from"./empty-DpSPWLc2.js";import{t as w}from"./HashValueDisplay-DKziWjEg.js";import{n as T,r as E}from"./InsightsPageHeader-BATHTZWn.js";var D=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`}]]),O=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`}]]),k=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`}]]),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=n(t(),1),M=e(),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:f},RECOVERED:{label:`Crashed`,description:`Crashed on the bundle and rolled back.`,variant:`warning`,icon:g},UPDATE_FAILED:{label:`Update failed`,description:`An update check, download, or install failed.`,variant:`destructive`,icon:k},UNCHANGED:{label:`Launch`,description:`The app launched; the report changed nothing.`,variant:`secondary`,icon:D}},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:_}:t.includes(`bundle`)?{label:`Launched`,description:`Seen running this bundle; the report of the restart into it never arrived.`,variant:`success`,icon:f}:t.includes(`release`)?{label:`Release adopted`,description:`The bundle it runs now ships under another release.`,variant:`secondary`,icon:O}:t.includes(`channel`)?{label:`Channel changed`,description:n?`From ${n.channel} to ${e.channel}.`:`It reports on another channel.`,variant:`secondary`,icon:O}: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)(p,{"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 d(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:e}){let t=async()=>{try{await navigator.clipboard.writeText(e.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)(s,{variant:`outline`,className:`min-h-11`,disabled:e.body===null||e.body===``,onClick:()=>void t(),children:[(0,M.jsx)(m,{"aria-hidden":`true`,"data-icon":`inline-start`}),` Copy body`]})]}),e.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,e.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:e.body}):(0,M.jsx)(C,{children:(0,M.jsxs)(b,{children:[(0,M.jsx)(x,{children:e.body===null?`Response body unavailable`:`Empty response body`}),(0,M.jsx)(S,{children:e.body===null?`The client received the HTTP status but could not read the body.`:e.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:e}){let t=e.httpResponse,n=I(),r=t.status===304?`Not modified`:t.status>=500?`Server error`:t.status>=400?`Request error`:t.status>=300?`Redirect`:`Success`,d=t.resource===`catalog`?`Catalog`:`Artifact`,f=[[`App`,e.platform&&`${e.platform===`ios`?`iOS`:`Android`} ${e.appVersion}`],[`Channel`,e.channel],[`SDK`,e.sdkVersion],[`Installation`,e.installId]].filter(([,e])=>e!=null);return(0,M.jsxs)(o,{children:[(0,M.jsxs)(l,{"aria-label":`View ${d.toLowerCase()} response: HTTP ${t.status}`,render:(0,M.jsx)(s,{variant:`ghost`,className:`-ml-2 h-auto min-h-11 justify-start`}),children:[(0,M.jsxs)(v,{variant:t.status>=400?`destructive`:`secondary`,children:[`HTTP `,t.status]}),(0,M.jsxs)(`span`,{children:[d,` response`]})]}),(0,M.jsxs)(i,{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)(a,{children:`HTTP response`}),(0,M.jsxs)(c,{children:[d,` · HTTP `,t.status,` · `,r,`. 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 `,t.path]}),t.receivedAtMs==null?null:(0,M.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`Response received`,` `,(0,M.jsx)(R,{value:t.receivedAtMs,formatter:n})]})]}),(0,M.jsx)(V,{response:t}),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)(v,{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)(w,{value:o,buttonClassName:t?`min-h-11 px-3`:void 0}),E(o,a?e.change.previous.minBundleId:e.minBundleId)?(0,M.jsx)(T,{}):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)(w,{value:e.toBundleId,buttonClassName:t?`min-h-11 px-3`:void 0}),E(e.toBundleId,e.minBundleId)?(0,M.jsx)(T,{}):null]})]}):null]})}export{H as a,V as i,R as n,I as o,U as r,W as t};
|
package/.output/public/assets/{InsightsPageHeader-DLH1MntM.js → InsightsPageHeader-BATHTZWn.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Di as e,_r as t,p as n,vr as r}from"./sidebar-UnsNYOry.js";import{t as i}from"./link-D95E0fwF.js";import{i as a,s as o}from"./console-features-api-De6tXQnd.js";import{b as s,x as c}from"./insights-api-CXXCRZhF.js";import{t as l}from"./list-Dq40Mmoj.js";import{a as u,i as d,n as f,o as p,t as m}from"./badge-D4Tiwei-.js";import{i as h,r as g,t as _}from"./tabs-
|
|
1
|
+
import{Di as e,_r as t,p as n,vr as r}from"./sidebar-UnsNYOry.js";import{t as i}from"./link-D95E0fwF.js";import{i as a,s as o}from"./console-features-api-De6tXQnd.js";import{b as s,x as c}from"./insights-api-CXXCRZhF.js";import{t as l}from"./list-Dq40Mmoj.js";import{a as u,i as d,n as f,o as p,t as m}from"./badge-D4Tiwei-.js";import{i as h,r as g,t as _}from"./tabs-BBfg-c0h.js";var v=e();function y({error:e,fallbackTitle:t}){return o(e)?(0,v.jsxs)(f,{children:[(0,v.jsx)(s,{"aria-hidden":`true`}),(0,v.jsx)(u,{children:`Insights not installed`}),(0,v.jsx)(d,{children:e.message})]}):(0,v.jsxs)(f,{variant:`destructive`,children:[(0,v.jsx)(p,{"aria-hidden":`true`}),(0,v.jsx)(u,{children:t}),(0,v.jsx)(d,{children:`Refresh to try again. If this keeps happening, check your Insights provider connection.`})]})}var b={"24h":{label:`DAU`,period:`24 hours`,interval:`hour`},"7d":{label:`WAU`,period:`7 days`,interval:`6 hours`},"30d":{label:`MAU`,period:`30 days`,interval:`day`},"12m":{label:`YAU`,period:`12 months`,interval:`week`}};function x({label:e,onPeriodChange:t,period:n,periods:r}){return(0,v.jsx)(_,{value:n,onValueChange:e=>{let n=r.find(t=>t.value===e);n&&t(n.value)},children:(0,v.jsx)(g,{"aria-label":e,className:`min-h-11 sm:min-h-9`,children:r.map(({value:e,name:t})=>(0,v.jsx)(h,{value:e,"aria-label":t,className:`min-w-12 px-3`,children:e},e))})})}var S=[`24h`,`7d`,`30d`].map(e=>({value:e,name:b[e].period})),C=Object.keys(b).map(e=>({value:e,name:b[e].period}));function w({window:e,onWindowChange:t}){return(0,v.jsx)(x,{label:`Reporting period`,onPeriodChange:t,period:e,periods:S})}function T({window:e,onWindowChange:t,twelveMonths:n=!0}){return(0,v.jsx)(x,{label:`Reporting period`,onPeriodChange:t,period:e,periods:C.filter(({value:e})=>n||e!==`12m`)})}var E=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-7000-8000-(?:000000000000|0[12][0-9a-f]{10})|00000000-0000-0000-0000-000000000000)$/iu,D=(e,t)=>e!=null&&(e===t||E.test(e));function O(){return(0,v.jsx)(m,{className:`shrink-0 font-sans font-normal`,title:`The bundle the native build shipped`,variant:`secondary`,children:`Built-in bundle`})}function k({view:e,overviewSearch:o}){let s=a(`insightsAnalytics`);return(0,v.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-3 border-b bg-background px-3 py-3 sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,v.jsx)(n,{className:`-ml-1 size-11 lg:size-7`}),(0,v.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,v.jsx)(c,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,v.jsx)(`h1`,{className:`text-sm font-medium`,children:`Insights`})]}),(0,v.jsxs)(`nav`,{"aria-label":`Insights views`,className:`ml-auto flex gap-2`,children:[s?(0,v.jsx)(i,{"aria-current":e===`overview`?`page`:void 0,className:r(t({className:`h-11 px-3 lg:h-8 lg:px-2.5`,size:`lg`,variant:e===`overview`?`secondary`:`ghost`})),search:o,to:`/insights`,children:`Overview`}):null,(0,v.jsxs)(i,{"aria-current":e===`events`?`page`:void 0,className:r(t({className:`h-11 px-3 lg:h-8 lg:px-2.5`,size:`lg`,variant:e===`events`?`secondary`:`ghost`})),to:`/installations`,children:[(0,v.jsx)(l,{"aria-hidden":`true`,"data-icon":`inline-start`}),`All events`]})]})]})}export{x as a,y as c,w as i,O as n,T as o,D as r,b as s,k as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,Di as t,Hr as n,Oi as r,Q as i,Ri as a,Si as o,Vi as s,_r as c,di as l,gr as u,wi as d,zr as f}from"./sidebar-UnsNYOry.js";import{t as p}from"./link-D95E0fwF.js";import{t as m}from"./useMutation-BWX97JX2.js";import{i as ee}from"./-native-builds-search-BvCftqF2.js";import{t as te}from"./loader-circle-C26cZDSM.js";import{C as h,T as g,a as _,c as v,d as y,f as b,i as x,l as S,o as C,r as ne,y as re}from"./native-builds-BOSmoLed.js";import{t as ie}from"./refresh-cw-CpCxPYma.js";import{t as ae}from"./smartphone-lSZWrqxx.js";import{a as w,i as T,n as E,o as D}from"./badge-D4Tiwei-.js";import{n as oe}from"./relativeTime-D_aYJRc7.js";import{a as se,n as ce,r as le,t as ue}from"./field-PkdRPD3A.js";import{m as de}from"./api-B1z_XXrQ.js";var O=s(a(),1),k=s(oe(),1),fe=d({method:`GET`}).middleware([f]).handler(r(`3a62744a539db57f5a29f39cec7fb03fd2817703b40d98e6da69e2f5e7ae6f3d`)),pe=d({method:`POST`}).middleware([f]).handler(r(`7138a71df2ede8dd2c3db732d8d0ae10c56b85a8177dcdacf4e747b8087177c6`)),me=d({method:`POST`}).middleware([f]).handler(r(`4b173c2b2f5ea074a1f10862282308f11f5a043c044d64b6f63e6a29d571ec64`)),he=d({method:`POST`}).middleware([f]).handler(r(`7908c24ccc2674ce07a553a645b8f4790889975a80f424a05d71a9fb8ab49787`)),ge=d({method:`POST`}).middleware([f]).handler(r(`4c92dfeae76a6fc898d6f38941eeedaec1f3d118f51a6f31ebf0bb1cea3fcea4`)),_e=d({method:`POST`}).middleware([f]).handler(r(`8e37ec67413ceba554adb2d4b15e53682595a089d4b431ba7965d4347fb500fc`)),ve=d({method:`GET`}).middleware([f]).handler(r(`a11cb4014e6b23528f76382c43684798b0e84a6936aaba02c918e8f4e216e282`)),A={all:[`ios-devices`],list:e=>[`ios-devices`,e??`all`],device:e=>[`ios-devices`,`device`,e],kept:e=>[`ios-devices`,`kept`,e??``],ipa:e=>[`native-build-ipa-devices`,e]},j=600*1e3;function ye(e){return n({queryKey:A.list(e),queryFn:()=>fe({data:e===void 0?{}:{status:e}}),placeholderData:l})}function be(e){return n({queryKey:A.device(e??``),queryFn:()=>pe({data:{udid:e}}),enabled:e!==null})}function M(e,t=!0){return n({queryKey:[`ios-device-profile-link`,e],queryFn:()=>me({data:e}),enabled:t,staleTime:j,refetchInterval:j})}function N(e){return n({queryKey:A.ipa(e),queryFn:()=>ve({data:{id:e}})})}var P=e=>{let t=o();return m({mutationFn:e,onSettled:async()=>{await Promise.all([t.invalidateQueries({queryKey:A.all}),t.invalidateQueries({queryKey:[`native-build-install-eligibility`]})])}})},xe=()=>P(e=>he({data:e})),Se=()=>P(e=>ge({data:e})),Ce=()=>P(e=>_e({data:e})),F=(e,t)=>`${e}/_hot-updater/devices/${t}`,I=async(e,t={})=>{let{json:n,...r}=t,i=await fetch(e,{credentials:`same-origin`,...r,...n===void 0?{}:{headers:{"content-type":`application/json`},body:JSON.stringify(n)}}),a=await i.json().catch(()=>null);if(!i.ok||a===null)throw Error(a?.error??`Request failed (${i.status}).`);return a},L=`hot-updater-ios-device-kept`,R=`hot-updater-ios-device-kept`,z=new Map,B=(e,t)=>{let n=z.get(t);return n===void 0&&(n=I(F(e,`receipt`),{method:`POST`,json:{receipt:t}}).then(e=>{g(t),window.dispatchEvent(new Event(L));try{window.localStorage.setItem(R,String(Date.now()))}catch{}return e},e=>{throw z.delete(t),e}),z.set(t,n)),n};function V(e,t,r){let i=o();return(0,O.useEffect)(()=>{let e=()=>void i.invalidateQueries({queryKey:A.kept(null),exact:!0}),t=t=>{t.key===R&&e()};return window.addEventListener(L,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(L,e),window.removeEventListener(`storage`,t)}},[i]),n({queryKey:A.kept(t),queryFn:async()=>{let n=null;t!==null&&await B(e,t).catch(e=>{n=e});let r=await I(F(e,`receipt`));if(n!==null&&r.udid===null)throw n;return r},enabled:r,retry:!1,staleTime:1/0})}var we=async e=>{await I(F(e,`receipt`),{method:`DELETE`}).catch(()=>void 0)},H=e=>P(t=>I(F(e,`request`),{method:`POST`,json:t.receipt===null?{name:t.name}:{name:t.name,receipt:t.receipt}})),U=(e,t)=>e!=null&&t!==null&&e.toLowerCase()===t.toLowerCase(),W=t(),Te=`With the same bundle ID, this install replaces the App Store's copy of the app on this iPhone.`,G=`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`,K=e=>/iPhone|iPod|iPad/u.test(e.userAgent)||/Macintosh/u.test(e.userAgent)&&e.maxTouchPoints>1,q=()=>{if(typeof window>`u`)return{udid:null,receipt:null,requested:!1};let e=new URLSearchParams(window.location.hash.slice(1)),t=e.get(`udid`),n=t!==null&&x.test(t)?t:null;return{udid:n,receipt:n===null?null:e.get(`r`),requested:n!==null&&e.get(`requested`)===`1`}},Ee=e=>{try{return window.localStorage.getItem(e)}catch{return null}},J=(e,t)=>{try{window.localStorage.setItem(e,t)}catch{}},Y=`hot-updater-ios-device-adopted`,X=(e,t)=>{let n=e?.ios===!0&&e.udid===null&&t!=null&&x.test(t)?t:null;(0,O.useEffect)(()=>{n!==null&&(J(_,n),window.dispatchEvent(new Event(Y)))},[n])},De=()=>{let[e,t]=(0,O.useState)(null),[n]=(0,O.useState)(q);return(0,O.useEffect)(()=>{let e=e=>e!=null&&x.test(e)?e:null,r=n,i=0,a=e=>{let t=e.receipt!==null||e.requested;e.udid!==null&&t&&(i+=1,J(_,e.udid),e.receipt!==null&&(y(e.udid,e.receipt),B(S(window.location),e.receipt).catch(()=>void 0))),e.udid!==null&&window.location.hash!==``&&window.history.replaceState(window.history.state,``,`${window.location.pathname}${window.location.search}`)};a(n);try{window.localStorage.removeItem(ne)}catch{}let o=()=>{let n=e(Ee(`hot-updater-ios-udid`))??r.udid,a=(r.udid===n?r.receipt:null)??h(n),o=r.requested,s=i;t(e=>e!==null&&e.udid===n&&e.receipt===a&&e.requested===o&&e.answers===s?e:{ios:K(navigator),udid:n,receipt:a,requested:o,answers:s})};o();let s=e=>{(e.key===null||e.key===`hot-updater-ios-udid`)&&o()},c=()=>{let e=q();e.udid!==null&&(r=e,a(e)),o()};return window.addEventListener(`storage`,s),window.addEventListener(Y,o),window.addEventListener(`hashchange`,c),window.addEventListener(`pageshow`,c),document.addEventListener(`visibilitychange`,c),()=>{window.removeEventListener(`storage`,s),window.removeEventListener(Y,o),window.removeEventListener(`hashchange`,c),window.removeEventListener(`pageshow`,c),document.removeEventListener(`visibilitychange`,c)}},[n]),e},Oe=300*1e3,Z=(e,t)=>{let[,n]=(0,O.useReducer)(e=>e+1,0),r=e+C-Oe;return(0,O.useEffect)(()=>{if(!t)return;let e=setTimeout(n,Math.max(0,r-Date.now()));return document.addEventListener(`visibilitychange`,n),window.addEventListener(`pageshow`,n),()=>{clearTimeout(e),document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`pageshow`,n)}},[r,t]),t&&Date.now()>=r};function ke({fetching:e,onRenew:t}){return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,W.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`This install link has expired.`,e?` Getting a new one.`:``]}),e?null:(0,W.jsx)(u,{className:G,onClick:t,variant:`outline`,children:`Get a new link`})]})}function Ae({build:e,token:t}){return(0,W.jsx)(`a`,{className:c({className:G}),href:re(window.location,e.id,t),children:`Install`})}function je(){return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`On iOS 16 or later, the app opens only with Developer Mode on: Settings, Privacy & Security, Developer Mode.`}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Te})]})}function Q({build:t,again:n=!1}){let r=M({mode:`identify`,buildId:t.id});return r.data?.status===`no-secret`?(0,W.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`Set `,r.data.secretName,` on the Console to check iPhones from this page.`]}):r.data?.status===`issued`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`a`,{className:c({className:G,variant:n?`secondary`:`default`}),href:b(v(window.location,t.id),r.data.token),children:[(0,W.jsx)(ae,{"data-icon":`inline-start`}),n?`Check this iPhone again`:`Check this iPhone`]}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Allow the download, then install it in Settings, where iOS calls it not signed. Nothing stays installed.`})]}):r.isError?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(E,{variant:`destructive`,children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`The check couldn't start`}),(0,W.jsx)(T,{children:`Check your connection and try again.`})]}),(0,W.jsxs)(u,{className:G,disabled:r.isFetching,onClick:()=>void r.refetch(),variant:`outline`,children:[(0,W.jsx)(ie,{"data-icon":`inline-start`}),`Reload`]})]}):(0,W.jsx)(e,{"aria-label":`Preparing the check`,className:`h-11 w-full`})}var Me=e=>(0,k.default)(e).format(`MMM D`);function $({device:e,canApprove:t,onDevicesPage:n=!1}){return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,W.jsxs)(E,{children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`Apple didn't register this iPhone`}),(0,W.jsx)(T,{children:e.apple_error})]}),t?n?null:(0,W.jsx)(p,{className:c({className:G,variant:`outline`}),to:`/native-builds/devices`,children:`iOS devices`}):(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.status===`approved`?`Ask a maintainer to free a device slot.`:`Ask a maintainer to check it on the iOS devices page.`})]})}function Ne({build:t,device:n,registry:r,newerBuild:a,canApprove:o,registryReadAt:s}){let l=v(window.location,t.id),d=H(l),f=V(l,n.receipt,n.ios&&n.udid!==null&&r===null),m=n.receipt!==null||U(f.data?.udid,n.udid),[h,g]=(0,O.useState)(``),[_,y]=(0,O.useState)(null),b=_!==null&&s<=_.readBefore,x=b?_.device:r,S=(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium`,children:`Not in this build`}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This IPA was signed without this iPhone, and iOS won't install it here.`})]});if(x!==null){let e=b?null:a;return x.apple_error!==null&&e===null?(0,W.jsx)($,{canApprove:o,device:x}):(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[S,(0,W.jsx)(`p`,{className:`text-sm`,role:`status`,children:x.status===`pending`?`${x.name} was requested on ${Me(x.created_at_ms)}. A maintainer approves it next.`:e===null?`${x.name} is ${x.status}. It joins the next ad hoc build.`:`A newer build has ${x.name}.`}),e===null?null:(0,W.jsx)(p,{className:c({className:G}),params:{buildId:e},to:`/native-builds/$buildId`,children:`Open the newer build`})]})}if(!m&&f.isPending&&n.udid!==null)return(0,W.jsx)(e,{"aria-label":`Reading this iPhone`,className:`h-11 w-full`});if(!m)return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[S,(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Check this iPhone once more to request it for the next ad hoc build.`}),(0,W.jsx)(Q,{build:t,again:!0})]});let C=h.trim();return(0,W.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-3`,onSubmit:e=>{if(e.preventDefault(),C===``)return;let t=s;d.mutate({receipt:n.receipt,name:C},{onSuccess:({device:e})=>y({device:e,readBefore:t})})},children:[S,(0,W.jsxs)(ue,{"data-invalid":d.isError||void 0,children:[(0,W.jsx)(se,{htmlFor:`ios-device-name`,children:`This iPhone's name`}),(0,W.jsx)(i,{autoComplete:`off`,className:`h-11 sm:h-8`,id:`ios-device-name`,maxLength:100,onChange:e=>g(e.target.value),placeholder:`Kim's iPhone`,value:h}),(0,W.jsx)(ce,{children:`A maintainer approves it, and it joins the next ad hoc build.`}),(0,W.jsx)(le,{children:d.isError?`The request didn't go through. Check this iPhone again, then try once more.`:null})]}),(0,W.jsxs)(u,{className:G,disabled:C===``||d.isPending,type:`submit`,children:[d.isPending?(0,W.jsx)(te,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):(0,W.jsx)(ee,{"data-icon":`inline-start`}),`Request access`]}),d.isError?(0,W.jsx)(Q,{again:!0,build:t}):null]})}function Pe({build:t,device:n}){X(n,V(v(window.location,t.id),n.receipt,n.ios&&n.udid===null).data?.udid);let{udid:r}=n,i=de(t.id,r),{refetch:a}=i,o=Z(i.dataUpdatedAt,i.data?.status===`installable`&&i.data.device===`included`);if((0,O.useEffect)(()=>{o&&a()},[o,a]),i.isPending)return(0,W.jsx)(e,{"aria-label":`Reading this IPA`,className:`h-11 w-full`});let s=i.data;if(s===void 0||s.status===`unavailable`)return(0,W.jsxs)(E,{children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`Installation details unavailable`}),(0,W.jsx)(T,{children:`The Console couldn't read this IPA from storage in parts, which takes an HTTPS download link that answers Range requests. Other ways to install still work from a computer.`})]});if(s.status===`store`)return(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This IPA is an App Store export, which installs through TestFlight, not from this page.`});if(s.status===`expired`)return(0,W.jsxs)(E,{variant:`destructive`,children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`This build's profile has expired`}),(0,W.jsxs)(T,{children:[`It expired on `,(0,k.default)(s.expiresAt).format(`YYYY-MM-DD`),`. A maintainer rebuilds it to install again.`]})]});let c=s.link.status===`issued`?s.link.token:null;return s.link.status===`no-secret`?(0,W.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`Set `,s.link.secretName,` on the Console to install from this page.`]}):c===null?null:s.device===`included`?(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium`,children:`In this build`}),o?(0,W.jsx)(ke,{fetching:i.isFetching,onRenew:()=>void a()}):(0,W.jsx)(Ae,{build:t,token:c}),(0,W.jsx)(je,{})]}):s.device===`not-included`?(0,W.jsx)(Ne,{build:t,device:n,registry:s.registry,newerBuild:s.newerBuild,canApprove:s.canApprove,registryReadAt:i.dataUpdatedAt}):(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium`,children:`Check this iPhone first`}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`iOS installs this IPA only on the devices it lists. A profile reads this iPhone's ID, then Safari comes back here.`})]}),(0,W.jsx)(Q,{build:t})]})}export{H as _,De as a,U as c,be as d,ye as f,Se as g,Ce as h,X as i,xe as l,N as m,Pe as n,we as o,V as p,K as r,A as s,$ as t,M as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Di as e,vr as t}from"./sidebar-UnsNYOry.js";import{t as n}from"./link-D95E0fwF.js";import{a as r}from"./tabs-
|
|
1
|
+
import{Di as e,vr as t}from"./sidebar-UnsNYOry.js";import{t as n}from"./link-D95E0fwF.js";import{a as r}from"./tabs-BBfg-c0h.js";var i=e(),a=`relative inline-flex h-full min-h-11 items-center justify-center rounded-md border border-transparent px-3 text-xs font-medium whitespace-nowrap text-foreground/60 transition-colors hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none aria-[current=page]:bg-background aria-[current=page]:text-foreground aria-[current=page]:shadow-sm dark:text-muted-foreground dark:hover:text-foreground dark:aria-[current=page]:border-input dark:aria-[current=page]:bg-input/30 dark:aria-[current=page]:text-foreground`;function o({current:e}){return(0,i.jsxs)(`nav`,{"aria-label":`Native builds views`,className:t(r(),`h-auto min-h-11 sm:h-8 sm:min-h-0 [&>a]:min-h-11 sm:[&>a]:min-h-0`),children:[(0,i.jsx)(n,{activeOptions:{exact:!0,includeSearch:!1},"aria-current":e===`builds`?`page`:void 0,className:a,to:`/native-builds`,children:`Builds`}),(0,i.jsx)(n,{activeOptions:{exact:!0,includeSearch:!1},"aria-current":e===`devices`?`page`:void 0,className:a,to:`/native-builds/devices`,children:`iOS devices`})]})}export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,Di as t,Hr as n,Oi as r,Q as i,Ri as a,Si as o,Vi as s,Vr as c,gr as l,p as u,wi as d,zr as f}from"./sidebar-UnsNYOry.js";import{t as p}from"./useMutation-BWX97JX2.js";import{t as ee}from"./check-Dz_5aNwx.js";import{t as te}from"./clipboard-D8uvj6FN.js";import{t as m}from"./key-round-B-vaAsR7.js";import{t as ne}from"./loader-circle-C26cZDSM.js";import{t as h}from"./plus-Bp6IqwOH.js";import{t as g}from"./refresh-cw-CpCxPYma.js";import{a as re,i as _,n as v,o as y,r as b,t as x}from"./badge-D4Tiwei-.js";import{n as S}from"./dist-BEIz5ojx.js";import{a as ie,n as ae,o as C,t as w}from"./card-BfeRlTvj.js";import{a as T,i as E,n as D,r as O,t as k}from"./field-PkdRPD3A.js";import{a as A,c as j,i as M,l as N,n as P,o as F,r as I,s as L,t as R,u as z}from"./alert-dialog-Dihztkem.js";import{a as B,i as V,n as oe,o as H,r as U,t as W}from"./dialog-e9AF5T6h.js";import{a as G,i as K,n as q,o as J,r as Y,t as se}from"./table-r_sYqKTQ.js";var X=c(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),Z=s(a(),1),ce=d({method:`GET`}).middleware([f]).handler(r(`2c7f3cdb9bd3cab2c026a48abdc84c362db0362924a08679052a325640aec56b`)),le=d({method:`POST`}).middleware([f]).handler(r(`68a2d94ee016be64936401f5eba60ab08a47ff373e1cf9de48e4413336e6034b`)),ue=d({method:`POST`}).middleware([f]).handler(r(`a1cb80b19ca72a64fb631ca28ebb9b6941db245983de082d5dd3203ec2eef795`)),Q={list:[`api-keys`,`list`]},de=()=>n({queryKey:Q.list,queryFn:()=>ce()}),fe=()=>{let e=o();return p({mutationFn:e=>le({data:{name:e}}),onSuccess:async()=>{await e.invalidateQueries({queryKey:Q.list})}})},pe=()=>{let e=o();return p({mutationFn:e=>ue({data:{id:e}}),onSuccess:async()=>{await e.invalidateQueries({queryKey:Q.list})}})},$=t(),me=e=>new Date(e).toISOString().slice(0,10);function he(){let[e,t]=(0,Z.useState)(!1),[n,r]=(0,Z.useState)(``),[a,o]=(0,Z.useState)(null),s=fe(),c=n.trim(),u=c.length>64?`Name must be 64 characters or fewer.`:null,d=()=>{r(``),o(null),s.reset()},f=e=>{t(e),e||d()};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(l,{className:`max-md:h-11`,onClick:()=>t(!0),children:[(0,$.jsx)(h,{"data-icon":`inline-start`}),`Create API key`]}),(0,$.jsx)(W,{open:e,onOpenChange:f,children:(0,$.jsxs)(oe,{showCloseButton:a===null,children:[(0,$.jsxs)(B,{children:[(0,$.jsx)(H,{children:a===null?`Create API key`:`Save your API key`}),(0,$.jsx)(U,{children:a===null?`Name the app or environment that will use this key.`:`This key is shown once. Store it securely before closing.`})]}),a===null?(0,$.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!(c.length===0||u!==null))try{o((await s.mutateAsync(c)).apiKey),S.success(`API key created`)}catch(e){S.error(e instanceof Error?e.message:`Unable to create API key`)}},children:[(0,$.jsx)(E,{children:(0,$.jsxs)(k,{"data-invalid":u!==null||void 0,children:[(0,$.jsx)(T,{htmlFor:`api-key-name`,children:`Name`}),(0,$.jsx)(i,{id:`api-key-name`,autoComplete:`off`,maxLength:65,onChange:e=>r(e.target.value),placeholder:`Production app`,value:n}),(0,$.jsx)(D,{children:`Use a name you can identify before revoking the key.`}),(0,$.jsx)(O,{children:u})]})}),(0,$.jsx)(V,{className:`mt-4`,children:(0,$.jsxs)(l,{disabled:s.isPending||c.length===0||u!==null,type:`submit`,children:[s.isPending?(0,$.jsx)(ne,{"data-icon":`inline-start`,className:`animate-spin motion-reduce:animate-none`}):(0,$.jsx)(m,{"data-icon":`inline-start`}),`Create API key`]})})]}):(0,$.jsxs)(E,{children:[(0,$.jsxs)(k,{children:[(0,$.jsx)(T,{htmlFor:`created-api-key`,children:`API key`}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(i,{id:`created-api-key`,className:`font-mono`,readOnly:!0,value:a}),(0,$.jsxs)(l,{onClick:async()=>{if(a!==null)try{await navigator.clipboard.writeText(a),S.success(`API key copied`)}catch{S.error(`Unable to copy API key`)}},type:`button`,variant:`outline`,children:[(0,$.jsx)(te,{"data-icon":`inline-start`}),`Copy`]})]})]}),(0,$.jsx)(V,{children:(0,$.jsxs)(l,{onClick:()=>f(!1),children:[(0,$.jsx)(ee,{"data-icon":`inline-start`}),`Done`]})})]})]})})]})}function ge({record:e}){let[t,n]=(0,Z.useState)(!1),r=pe(),i=async t=>{t.preventDefault();try{await r.mutateAsync(e.id),n(!1),S.success(`API key revoked`)}catch(e){S.error(e instanceof Error?e.message:`Unable to revoke API key`)}};return(0,$.jsxs)(R,{open:t,onOpenChange:e=>{r.isPending||n(e)},children:[(0,$.jsxs)(z,{render:(0,$.jsx)(l,{size:`sm`,variant:`ghost`}),children:[(0,$.jsx)(X,{"data-icon":`inline-start`}),`Revoke`]}),(0,$.jsxs)(M,{children:[(0,$.jsxs)(L,{children:[(0,$.jsx)(j,{children:(0,$.jsx)(X,{})}),(0,$.jsxs)(N,{children:[`Revoke `,e.name,`?`]}),(0,$.jsxs)(A,{children:[`Apps using `,e.prefix,`… will immediately lose OTA update and insights access. This action cannot be undone.`]})]}),(0,$.jsxs)(F,{children:[(0,$.jsx)(I,{disabled:r.isPending,children:`Cancel`}),(0,$.jsx)(P,{disabled:r.isPending,onClick:e=>void i(e),variant:`destructive`,children:`Revoke API key`})]})]})]})}function _e(){let t=de();return(0,$.jsxs)(w,{className:`overflow-hidden shadow-sm`,children:[(0,$.jsxs)(ie,{className:`flex-row items-center justify-between space-y-0 border-b px-4 py-3`,children:[(0,$.jsx)(C,{className:`text-sm`,children:(0,$.jsx)(`h2`,{children:`API keys`})}),(0,$.jsx)(he,{})]}),(0,$.jsx)(ae,{className:`p-0`,children:t.isError?(0,$.jsx)(`div`,{className:`p-4`,children:(0,$.jsxs)(v,{variant:`destructive`,children:[(0,$.jsx)(y,{}),(0,$.jsx)(re,{children:`API keys couldn't be loaded`}),(0,$.jsx)(_,{children:`Check your connection and try again.`}),(0,$.jsx)(b,{children:(0,$.jsxs)(l,{onClick:()=>void t.refetch(),size:`xs`,variant:`outline`,children:[(0,$.jsx)(g,{"data-icon":`inline-start`}),`Retry`]})})]})}):(0,$.jsxs)(se,{"aria-label":`API keys`,className:`table-fixed`,children:[(0,$.jsx)(G,{children:(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:`Key`}),(0,$.jsx)(K,{className:`w-32`,children:`Created`}),(0,$.jsx)(K,{className:`w-24 text-right`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(q,{children:t.isLoading?Array.from({length:3},(t,n)=>(0,$.jsxs)(J,{children:[(0,$.jsxs)(Y,{className:`space-y-2 py-3`,children:[n===0?(0,$.jsx)(`span`,{className:`sr-only`,children:`Loading API keys`}):null,(0,$.jsx)(e,{className:`h-3.5 w-32`}),(0,$.jsx)(e,{className:`h-3 w-20`})]}),(0,$.jsx)(Y,{children:(0,$.jsx)(e,{className:`h-3.5 w-20`})}),(0,$.jsx)(Y,{children:(0,$.jsx)(e,{className:`ml-auto h-6 w-16`})})]},n)):t.data?.length===0?(0,$.jsx)(J,{children:(0,$.jsx)(Y,{colSpan:3,className:`h-40 text-center text-muted-foreground`,children:(0,$.jsxs)(`div`,{className:`mx-auto flex max-w-xs flex-col items-center gap-2`,children:[(0,$.jsx)(m,{className:`size-5`}),(0,$.jsx)(`p`,{className:`font-medium text-foreground`,children:`No API keys`}),(0,$.jsx)(`p`,{children:`Create an API key to connect an app.`})]})})}):t.data?.map(e=>(0,$.jsxs)(J,{className:e.revoked_at_ms===null?void 0:`text-muted-foreground`,children:[(0,$.jsx)(Y,{className:`whitespace-normal py-3`,children:(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`p`,{className:`break-words font-medium text-foreground`,children:e.name}),(0,$.jsxs)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:[e.prefix,`…`]})]})}),(0,$.jsx)(Y,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(`time`,{dateTime:new Date(e.created_at_ms).toISOString(),children:me(e.created_at_ms)})}),(0,$.jsx)(Y,{className:`text-right`,children:e.revoked_at_ms===null?(0,$.jsx)(ge,{record:e}):(0,$.jsx)(x,{variant:`outline`,children:`Revoked`})})]},e.id))})]})})]})}function ve(){return(0,$.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,$.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,$.jsx)(u,{className:`-ml-1`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,$.jsx)(`h1`,{className:`text-sm font-medium`,children:`API keys`})]}),(0,$.jsx)(`p`,{className:`basis-full pl-9 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`API keys can download OTA updates and submit insights only.`})]}),(0,$.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,$.jsx)(`div`,{className:`mx-auto w-full max-w-5xl`,children:(0,$.jsx)(_e,{})})})]})}export{ve as component};
|
|
1
|
+
import{$ as e,Di as t,Hr as n,Oi as r,Q as i,Ri as a,Si as o,Vi as s,Vr as c,gr as l,p as u,wi as d,zr as f}from"./sidebar-UnsNYOry.js";import{t as p}from"./useMutation-BWX97JX2.js";import{t as ee}from"./check-Dz_5aNwx.js";import{t as te}from"./clipboard-D8uvj6FN.js";import{t as m}from"./key-round-B-vaAsR7.js";import{t as ne}from"./loader-circle-C26cZDSM.js";import{t as h}from"./plus-Bp6IqwOH.js";import{t as g}from"./refresh-cw-CpCxPYma.js";import{a as re,i as _,n as v,o as y,r as b,t as x}from"./badge-D4Tiwei-.js";import{n as S}from"./dist-BEIz5ojx.js";import{a as ie,n as ae,o as C,t as w}from"./card-BfeRlTvj.js";import{a as T,i as E,n as D,r as O,t as k}from"./field-PkdRPD3A.js";import{a as A,c as j,i as M,l as N,n as P,o as F,r as I,s as L,t as R,u as z}from"./alert-dialog-Dihztkem.js";import{a as B,i as V,n as oe,o as H,r as U,t as W}from"./dialog-e9AF5T6h.js";import{a as G,i as K,n as q,o as J,r as Y,t as se}from"./table-r_sYqKTQ.js";var X=c(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),Z=s(a(),1),ce=d({method:`GET`}).middleware([f]).handler(r(`2c7f3cdb9bd3cab2c026a48abdc84c362db0362924a08679052a325640aec56b`)),le=d({method:`POST`}).middleware([f]).handler(r(`68a2d94ee016be64936401f5eba60ab08a47ff373e1cf9de48e4413336e6034b`)),ue=d({method:`POST`}).middleware([f]).handler(r(`a1cb80b19ca72a64fb631ca28ebb9b6941db245983de082d5dd3203ec2eef795`)),Q={list:[`api-keys`,`list`]},de=()=>n({queryKey:Q.list,queryFn:()=>ce()}),fe=()=>{let e=o();return p({mutationFn:e=>le({data:{name:e}}),onSuccess:async()=>{await e.invalidateQueries({queryKey:Q.list})}})},pe=()=>{let e=o();return p({mutationFn:e=>ue({data:{id:e}}),onSuccess:async()=>{await e.invalidateQueries({queryKey:Q.list})}})},$=t(),me=e=>new Date(e).toISOString().slice(0,10);function he(){let[e,t]=(0,Z.useState)(!1),[n,r]=(0,Z.useState)(``),[a,o]=(0,Z.useState)(null),s=fe(),c=n.trim(),u=c.length>64?`Name must be 64 characters or fewer.`:null,d=()=>{r(``),o(null),s.reset()},f=e=>{t(e),e||d()};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(l,{className:`max-md:h-11`,onClick:()=>t(!0),children:[(0,$.jsx)(h,{"data-icon":`inline-start`}),`Create API key`]}),(0,$.jsx)(W,{open:e,onOpenChange:f,children:(0,$.jsxs)(oe,{showCloseButton:a===null,children:[(0,$.jsxs)(B,{children:[(0,$.jsx)(H,{children:a===null?`Create API key`:`Save your API key`}),(0,$.jsx)(U,{children:a===null?`Name the app or environment that will use this key.`:`This key is shown once. Store it securely before closing.`})]}),a===null?(0,$.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!(c.length===0||u!==null))try{o((await s.mutateAsync(c)).apiKey),S.success(`API key created`)}catch(e){S.error(e instanceof Error?e.message:`Unable to create API key`)}},children:[(0,$.jsx)(E,{children:(0,$.jsxs)(k,{"data-invalid":u!==null||void 0,children:[(0,$.jsx)(T,{htmlFor:`api-key-name`,children:`Name`}),(0,$.jsx)(i,{id:`api-key-name`,autoComplete:`off`,maxLength:65,onChange:e=>r(e.target.value),placeholder:`Production app`,value:n}),(0,$.jsx)(D,{children:`Use a name you can identify before revoking the key.`}),(0,$.jsx)(O,{children:u})]})}),(0,$.jsx)(V,{className:`mt-4`,children:(0,$.jsxs)(l,{disabled:s.isPending||c.length===0||u!==null,type:`submit`,children:[s.isPending?(0,$.jsx)(ne,{"data-icon":`inline-start`,className:`animate-spin motion-reduce:animate-none`}):(0,$.jsx)(m,{"data-icon":`inline-start`}),`Create API key`]})})]}):(0,$.jsxs)(E,{children:[(0,$.jsxs)(k,{children:[(0,$.jsx)(T,{htmlFor:`created-api-key`,children:`API key`}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(i,{id:`created-api-key`,className:`font-mono`,readOnly:!0,value:a}),(0,$.jsxs)(l,{onClick:async()=>{if(a!==null)try{await navigator.clipboard.writeText(a),S.success(`API key copied`)}catch{S.error(`Unable to copy API key`)}},type:`button`,variant:`outline`,children:[(0,$.jsx)(te,{"data-icon":`inline-start`}),`Copy`]})]})]}),(0,$.jsx)(V,{children:(0,$.jsxs)(l,{onClick:()=>f(!1),children:[(0,$.jsx)(ee,{"data-icon":`inline-start`}),`Done`]})})]})]})})]})}function ge({record:e}){let[t,n]=(0,Z.useState)(!1),r=pe(),i=async t=>{t.preventDefault();try{await r.mutateAsync(e.id),n(!1),S.success(`API key revoked`)}catch(e){S.error(e instanceof Error?e.message:`Unable to revoke API key`)}};return(0,$.jsxs)(R,{open:t,onOpenChange:e=>{r.isPending||n(e)},children:[(0,$.jsxs)(z,{render:(0,$.jsx)(l,{className:`max-md:h-11`,size:`sm`,variant:`ghost`}),children:[(0,$.jsx)(X,{"data-icon":`inline-start`}),`Revoke`]}),(0,$.jsxs)(M,{children:[(0,$.jsxs)(L,{children:[(0,$.jsx)(j,{children:(0,$.jsx)(X,{})}),(0,$.jsxs)(N,{children:[`Revoke `,e.name,`?`]}),(0,$.jsxs)(A,{children:[`Apps using `,e.prefix,`… will immediately lose OTA update and insights access. This action cannot be undone.`]})]}),(0,$.jsxs)(F,{children:[(0,$.jsx)(I,{disabled:r.isPending,children:`Cancel`}),(0,$.jsx)(P,{disabled:r.isPending,onClick:e=>void i(e),variant:`destructive`,children:`Revoke API key`})]})]})]})}function _e(){let t=de();return(0,$.jsxs)(w,{className:`overflow-hidden shadow-sm`,children:[(0,$.jsxs)(ie,{className:`flex-row items-center justify-between space-y-0 border-b px-4 py-3`,children:[(0,$.jsx)(C,{className:`text-sm`,children:(0,$.jsx)(`h2`,{children:`API keys`})}),(0,$.jsx)(he,{})]}),(0,$.jsx)(ae,{className:`p-0`,children:t.isError?(0,$.jsx)(`div`,{className:`p-4`,children:(0,$.jsxs)(v,{variant:`destructive`,children:[(0,$.jsx)(y,{}),(0,$.jsx)(re,{children:`API keys couldn't be loaded`}),(0,$.jsx)(_,{children:`Check your connection and try again.`}),(0,$.jsx)(b,{children:(0,$.jsxs)(l,{onClick:()=>void t.refetch(),size:`xs`,variant:`outline`,children:[(0,$.jsx)(g,{"data-icon":`inline-start`}),`Retry`]})})]})}):(0,$.jsxs)(se,{"aria-label":`API keys`,className:`table-fixed`,children:[(0,$.jsx)(G,{children:(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:`Key`}),(0,$.jsx)(K,{className:`w-32`,children:`Created`}),(0,$.jsx)(K,{className:`w-24 text-right`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(q,{children:t.isLoading?Array.from({length:3},(t,n)=>(0,$.jsxs)(J,{children:[(0,$.jsxs)(Y,{className:`space-y-2 py-3`,children:[n===0?(0,$.jsx)(`span`,{className:`sr-only`,children:`Loading API keys`}):null,(0,$.jsx)(e,{className:`h-3.5 w-32`}),(0,$.jsx)(e,{className:`h-3 w-20`})]}),(0,$.jsx)(Y,{children:(0,$.jsx)(e,{className:`h-3.5 w-20`})}),(0,$.jsx)(Y,{children:(0,$.jsx)(e,{className:`ml-auto h-6 w-16`})})]},n)):t.data?.length===0?(0,$.jsx)(J,{children:(0,$.jsx)(Y,{colSpan:3,className:`h-40 text-center text-muted-foreground`,children:(0,$.jsxs)(`div`,{className:`mx-auto flex max-w-xs flex-col items-center gap-2`,children:[(0,$.jsx)(m,{className:`size-5`}),(0,$.jsx)(`p`,{className:`font-medium text-foreground`,children:`No API keys`}),(0,$.jsx)(`p`,{children:`Create an API key to connect an app.`})]})})}):t.data?.map(e=>(0,$.jsxs)(J,{className:e.revoked_at_ms===null?void 0:`text-muted-foreground`,children:[(0,$.jsx)(Y,{className:`whitespace-normal py-3`,children:(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`p`,{className:`break-words font-medium text-foreground`,children:e.name}),(0,$.jsxs)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:[e.prefix,`…`]})]})}),(0,$.jsx)(Y,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(`time`,{dateTime:new Date(e.created_at_ms).toISOString(),children:me(e.created_at_ms)})}),(0,$.jsx)(Y,{className:`text-right`,children:e.revoked_at_ms===null?(0,$.jsx)(ge,{record:e}):(0,$.jsx)(x,{variant:`outline`,children:`Revoked`})})]},e.id))})]})})]})}function ve(){return(0,$.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,$.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,$.jsx)(u,{className:`-ml-1`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,$.jsx)(`h1`,{className:`text-sm font-medium`,children:`API keys`})]}),(0,$.jsx)(`p`,{className:`basis-full pl-9 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`API keys can download OTA updates and submit insights only.`})]}),(0,$.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,$.jsx)(`div`,{className:`mx-auto w-full max-w-5xl`,children:(0,$.jsx)(_e,{})})})]})}export{ve as component};
|