pulse-dashboard
Version:
A Next.js Dashboard application for real-time monitoring and historical analysis of Playwright test executions. This component provides the UI for visualizing Playwright test results and can be run as a standalone CLI tool.
1 lines • 3.01 kB
JavaScript
(()=>{var e={};e.id=841,e.ids=[841],e.modules={3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:e=>{"use strict";e.exports=require("path")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},75206:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>f,routeModule:()=>m,serverHooks:()=>E,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>x});var s={};t.r(s),t.d(s,{GET:()=>l});var o=t(96559),n=t(48088),a=t(37719),u=t(32190),i=t(79748),p=t.n(i),c=t(33873),d=t.n(c);async function l(){let e;console.log("[API /api/current-run] Raw process.env.PULSE_USER_CWD:",process.env.PULSE_USER_CWD),console.log("[API /api/current-run] Current process.cwd() for Next.js server:",process.cwd());let r=process.env.PULSE_USER_CWD,t=process.cwd(),s=r&&""!==r.trim()?r.trim():t;console.log("[API /api/current-run] Effective baseDir determined:",s);let o=d().join(s,"pulse-report","playwright-pulse-report.json");console.log("[API /api/current-run] Attempting to read current run report from:",o);try{e=await p().readFile(o,"utf-8")}catch(r){console.error(`[API /api/current-run] ENTERED CATCH for fs.readFile. Path: ${o}. Error: ${r.message}. Code: ${r.code}. Stack: ${r.stack}`);let e=`Report file not found or unreadable at '${o}'. Base directory used: '${s}'. Error: ${r.message||"Unknown file read error."}${r.code?` (Code: ${r.code})`:""}`;return u.NextResponse.json({message:e,pathAttempted:o,baseDirUsed:s,errorCode:r.code||"N/A"},{status:"ENOENT"===r.code?404:500})}try{let r=JSON.parse(e);return r.metadata?r.metadata.userProjectDir=s:r.metadata={generatedAt:new Date().toISOString(),userProjectDir:s},u.NextResponse.json(r)}catch(r){console.error(`[API /api/current-run] ENTERED CATCH for JSON.parse. Path: ${o}. Error: ${r.message}. Stack: ${r.stack}`);let e=`Invalid JSON format in report file '${o}'. Error: ${r.message||"Unknown parsing error."}`;return u.NextResponse.json({message:e,pathAttempted:o},{status:400})}}let m=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/current-run/route",pathname:"/api/current-run",filename:"route",bundlePath:"app/api/current-run/route"},resolvedPagePath:"/Users/administrator/pulse-dashboard/src/app/api/current-run/route.ts",nextConfigOutput:"standalone",userland:s}),{workAsyncStorage:g,workUnitAsyncStorage:x,serverHooks:E}=m;function f(){return(0,a.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:x})}},78335:()=>{},79748:e=>{"use strict";e.exports=require("fs/promises")},96487:()=>{}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[447,580],()=>t(75206));module.exports=s})();