PageSourceSearch

https://repsshield.com/assets/debug-deployment-D819FpVu.js

js repsshield.com collected 2026-09-24 14:18:28 UTC 6,873 bytes, 1 lines download raw bytes

1import{j as e,C as l,b as c,c as d,B as m,aF as f,d as x,e as o,V as w,h as v}from"./index-Byg2HWAE.js";import{r as p}from"./vendor-Qgthw7N1.js";import{C as y}from"./circle-x-C3yul9_R.js";function D(){const[n,g]=p.useState({}),[h,j]=p.useState("loading");p.useEffect(()=>{var t,r;document.title="Deployment Debug - REPSShield";const s={timestamp:new Date().toISOString(),url:window.location.href,domain:window.location.hostname,protocol:window.location.protocol,port:window.location.port,pathname:window.location.pathname,search:window.location.search,userAgent:navigator.userAgent,language:navigator.language,cookieEnabled:navigator.cookieEnabled,onLine:navigator.onLine,platform:navigator.platform,mode:"production",dev:!1,prod:!0,hasReact:typeof window.React<"u",hasRoot:!!document.getElementById("root"),rootContent:((r=(t=document.getElementById("root"))==null?void 0:t.innerHTML)==null?void 0:r.length)||0,localStorage:(()=>{try{return Object.keys(localStorage).reduce((a,i)=>(a[i]=localStorage.getItem(i),a),{})}catch{return{error:"Cannot access localStorage"}}})(),sessionStorage:(()=>{try{return Object.keys(sessionStorage).reduce((a,i)=>(a[i]=sessionStorage.getItem(i),a),{})}catch{return{error:"Cannot access sessionStorage"}}})(),errors:window.__ERRORS__||[]};g(s),b()},[]);const b=async()=>{try{j("loading");const s=await fetch("/api/auth/user"),t=await s.text();g(r=>({...r,apiTest:{status:s.status,statusText:s.statusText,headers:Object.fromEntries(s.headers.entries()),body:t,success:s.status<500}})),j(s.status<500?"success":"error")}catch(s){g(t=>({...t,apiTest:{error:s instanceof Error?s.message:"Unknown error",success:!1}})),j("error")}},N=()=>{const s=JSON.stringify(n,null,2),t=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(t),a=document.createElement("a");a.href=r,a.download=`debug-report-${new Date().toISOString().slice(0,19)}.json`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)},u=s=>typeof s=="boolean"?s?e.jsxs(o,{className:"bg-green-100 text-green-800",children:[e.jsx(v,{className:"w-3 h-3 mr-1"}),"OK"]}):e.jsxs(o,{className:"bg-red-100 text-red-800",children:[e.jsx(y,{className:"w-3 h-3 mr-1"}),"Error"]}):e.jsx(o,{className:"bg-gray-100 text-gray-800",children:s});return e.jsx("div",{className:"min-h-screen bg-gray-50 p-4",children:e.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Deployment Debug Console"}),e.jsx("p",{className:"text-gray-600",children:"Diagnostic information for troubleshooting deployment issues"})]}),e.jsxs(l,{children:[e.jsx(c,{children:e.jsxs(d,{className:"flex items-center gap-2",children:["API Connectivity Test",e.jsxs(m,{variant:"outline",size:"sm",onClick:b,disabled:h==="loading",children:[h==="loading"?e.jsx(f,{className:"w-4 h-4 animate-spin"}):e.jsx(f,{className:"w-4 h-4"}),"Retest"]})]})}),e.jsx(x,{children:e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"Status:"}),h==="loading"?e.jsx(o,{className:"ml-2 bg-blue-100 text-blue-800",children:"Testing..."}):h==="success"?e.jsx(o,{className:"ml-2 bg-green-100 text-green-800",children:"Connected"}):e.jsx(o,{className:"ml-2 bg-red-100 text-red-800",children:"Failed"})]}),n.apiTest&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"HTTP Status:"}),e.jsx("span",{className:"ml-2",children:n.apiTest.status})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx("span",{className:"font-medium",children:"Response:"}),e.jsx("pre",{className:"mt-2 p-2 bg-gray-100 rounded text-xs overflow-auto max-h-32",children:n.apiTest.body||n.apiTest.error})]})]})]})})]}),e.jsxs(l,{children:[e.jsx(c,{children:e.jsx(d,{children:"Environment Information"})}),e.jsx(x,{children:e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"Mode:"}),u(n.mode)]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"Domain:"}),e.jsx("span",{className:"ml-2 font-mono text-sm",children:n.domain})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"Protocol:"}),e.jsx("span",{className:"ml-2",children:n.protocol})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"React Loaded:"}),u(n.hasReact)]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"Root Element:"}
1),u(n.hasRoot)]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"Content Size:"}),e.jsxs("span",{className:"ml-2",children:[n.rootContent," chars"]})]})]})})]}),e.jsxs(l,{children:[e.jsx(c,{children:e.jsx(d,{children:"Storage Status"})}),e.jsx(x,{children:e.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"LocalStorage Keys:"}),e.jsx("div",{className:"mt-2 p-2 bg-gray-100 rounded text-xs",children:Object.keys(n.localStorage||{}).join(", ")||"None"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"SessionStorage Keys:"}),e.jsx("div",{className:"mt-2 p-2 bg-gray-100 rounded text-xs",children:Object.keys(n.sessionStorage||{}).join(", ")||"None"})]})]})})]}),e.jsxs(l,{children:[e.jsx(c,{children:e.jsx(d,{children:"Debug Actions"})}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(m,{onClick:N,variant:"outline",children:"Download Debug Report"}),e.jsx(m,{onClick:()=>window.location.href="/",variant:"outline",children:"Try Home Page"}),e.jsx(m,{onClick:()=>window.location.href="/login",variant:"outline",children:"Go to Login"}),e.jsx(m,{onClick:()=>window.location.reload(),variant:"outline",children:"Reload Page"})]}),e.jsx("div",{className:"mt-6 p-4 bg-yellow-50 border border-yellow-200 rounded",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(w,{className:"w-5 h-5 text-yellow-600 mt-0.5"}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-yellow-800",children:"Common Issues"}),e.jsxs("ul",{className:"mt-2 text-sm text-yellow-700 space-y-1",children:[e.jsx("li",{children:"• Domain mismatch between environment variables and deployed URL"}),e.jsx("li",{children:"• Missing environment variables in production"}),e.jsx("li",{children:"• Database connection issues"}),e.jsx("li",{children:"• OAuth configuration problems"}),e.jsx("li",{children:"• Static asset loading failures"})]})]})]})})]})]}),e.jsxs(l,{children:[e.jsx(c,{children:e.jsx(d,{children:"Full Debug Information"})}),e.jsx(x,{children:e.jsx("pre",{className:"text-xs bg-gray-100 p-4 rounded overflow-auto max-h-96",children:JSON.stringify(n,null,2)})})]})]})})}export{D as default};

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.