PageSourceSearch

https://yalla-africa.lovable.app/assets/DeploySmoke-C8U6OQPv.js

js yalla-africa.lovable.app collected 2026-10-03 03:48:53 UTC 5,280 bytes, 2 lines download raw bytes

1import{r as l,j as e,ar as w,g as d,a2 as S,a4 as c,a8 as m,ai as g,aj as y,_ as C,e as L,O as R,L as B}from"./index-DcYTpc4o.js";import{P as O}from"./progress-B9pWFGbZ.js";import{a as P}from"./deployHealth-DxYijb_f.js";import{C as D}from"./circle-play-PSl5LFuN.js";import{D as E}from"./download-ItgXvEwv.js";function z(){var f;const[s,x]=l.useState(null),[r,h]=l.useState(!1),[n,u]=l.useState({done:0,total:0}),[j,N]=l.useState(!0),k=l.useCallback(async()=>{h(!0),x(null),u({done:0,total:0});const t=await P((a,o)=>u({done:a,total:o}));x(t),h(!1)},[]),b=()=>{var o;if(!s)return;const t=new Blob([JSON.stringify(s,null,2)],{type:"application/json"}),a=document.createElement("a");a.href=URL.createObjectURL(t),a.download=`deploy-smoke-${((o=s.buildInfo)==null?void 0:o.build_id)??"unknown"}.json`,a.click(),URL.revokeObjectURL(a.href)},i=(s==null?void 0:s.assets.filter(t=>!t.ok))??[],p=s?j?i:s.assets:[],v=n.total?Math.round(n.done/n.total*100):0;return e.jsxs("main",{className:"container mx-auto max-w-4xl px-4 py-12",children:[e.jsxs(w,{children:[e.jsx("title",{children:"Post-Deploy Smoke Test · Yalla Mobility"}),e.jsx("meta",{name:"description",content:"Verify every hashed asset and source map of this Yalla Mobility release resolves correctly from the serving host."}),e.jsx("meta",{name:"robots",content:"noindex"})]}),e.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Post-Deploy Smoke Test"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Fetches every asset in the signed manifest from this host and flags mismatches."})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(d,{onClick:k,disabled:r,"data-analytics":"deploy-smoke-run",children:[r?e.jsx(S,{className:"mr-2 h-4 w-4 animate-spin","aria-hidden":!0}):e.jsx(D,{className:"mr-2 h-4 w-4","aria-hidden":!0}),r?"Running…":"Run smoke test"]}),s&&e.jsxs(d,{variant:"outline",onClick:b,"data-analytics":"deploy-smoke-export",children:[e.jsx(E,{className:"mr-2 h-4 w-4","aria-hidden":!0}),"Export JSON"]})]})]}),r&&e.jsx(c,{className:"mb-6",children:e.jsxs(m,{className:"space-y-2 py-4",children:[e.jsx(O,{value:v}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[n.done," / ",n.total," assets checked"]})]})}),s&&e.jsxs(e.Fragment,{children:[e.jsxs(c,{className:"mb-6",children:[e.jsxs(g,{className:"flex flex-row items-center justify-between",children:[e.jsx(y,{className:"text-base",children:"Result"}),e.jsx(C,{variant:i.length===0?"default":"destructive","data-testid":"smoke-verdict",children:i.length===0?"ALL ASSETS OK":`${i.length} PROBLEM(S)`})]}),e.jsxs(m,{className:"grid gap-2 text-sm sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Host: "}),e.jsx("span",{className:"font-mono text-xs break-all",children:s.origin||"—"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Build: "}),e.jsx("span",{className:"font-mono text-xs",children:((f=s.buildInfo)==null?void 0:f.build_id)??"—"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Assets checked: "}),s.assets.length]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Source maps: "}),s.assets.filter(t=>t.kind==="map").length]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Missing / blocked: "}),s.missing]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Size mismatches: "}),s.mismatched]})]})]}),s.assets.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"No manifest assets found — this host is not serving a packaged release (expected on the dev server)."}),s.assets.length>0&&e.jsxs(c,{children:[e.jsxs(g,{className:"flex flex-row items-center justify-between",children:[e.jsx(y,{className:"text-base",children:"Assets"}),e.jsx(d,{variant:"ghost",size:"sm",onClick:()=>N(t=>!t),"data-analytics":"deploy-smoke-toggle-rows",children:j?"Show all":"Show failures only"})]}),e.jsx(m,{children:p.length===0?e.jsx("p",{className:"py-2 text-sm text-muted-foreground",children:"No failures — every declared asset resolved with the expected size."}):e.jsx("div",{className:"space-y-0",children:p.map(t=>e.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-border/50 py-2 text-sm last:border-0",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-2",children:[t.ok?e.jsx(L,{className:"mt-0.5 h-4 w-4 shrink-0 text-primary","aria-hidden":!0}):e.jsx(R,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive","aria-hidden":!0}),e.jsx("span",{className:"truncate font-mono text-xs",children:t.path})]}),e.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:t.ok?`${t.actualBytes} B`:t.reason??"failed"})]},t.path))})})]})]}),e.jsxs("p",{className:"mt-6 text-sm text-muted-foreground",children:["Shell-level checks live on the"," ",e.jsx(B,{to:"/health",className:"text-primary underline","data-analytics":"smoke-to-health",children:"deployment health page"}),"."]})]})}export{z as default};
2//# sourceMappingURL=DeploySmoke-C8U6OQPv.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.