/home/techb158/balavpn.abdallabala.com/.next/cache/webpack/edge-server-production
Edit: /home/techb158/balavpn.abdallabala.com/.next/cache/webpack/edge-server-production/2.pack (7652776B)
wpc t webpack/lib/cache/PackFileCacheStrategyPackContentItemsk ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/empty|client-only$=|next/dist/compiled/client-only/error|next/dist/compiled/server-only$=|next/dist/compiled/server-only/empty|next/dist/compiled/client-only$=|next/dist/compiled/client-only/error|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\head.js=|next/dist/client/components/noop-head|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\image.js=|next/dist/api/image|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\constants.js=|next/dist/api/constants|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\router.js=|next/dist/api/router|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dynamic.js=|next/dist/api/app-dynamic|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\script.js=|next/dist/api/script|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\link.js=|next/dist/client/app-dir/link|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\form.js=|next/dist/client/app-dir/form|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\navigation.js=|next/dist/api/navigation.react-server|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\headers.js=|next/dist/api/headers|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\og.js=|next/dist/api/og|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\server.js=|next/dist/api/server|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\document.js=|next/dist/api/document|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\app.js=|next/dist/api/app|next=|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next|]|fallback=[|process=|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\polyfills\process.js|]|dependencyType=|esm|path=|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app|request=|private-next-root-dir/src/middleware.js Compilation/modules|javascript/auto|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\src\middleware.js|middleware FlagDependencyExportsPlugin|javascript/auto|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\src\middleware.js|middleware Compilation/codeGeneration|javascript/auto|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware|5fc5bfa4b584fa97|edge-runtime-webpackCompilation/assets|chunk550MinifierWebpackPlugin|src/middleware.jsSourceMapDevToolPlugin|src/middleware.jswebpack/lib/cache/ResolverCachePlugin`_ResolverCachePluginCacheMisscontextpathrequestqueryfragmentmoduledirectoryfileinternalfullySpecifieddescriptionFilePathdescriptionFileDatadescriptionFileRootrelativePath__innerRequest_request__innerRequest_relativePath__innerRequestissuerissuerLayercompilermiddlewareedge-server C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\src\middleware.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\package.jsonnameversionprivatedescriptionscriptsdependenciesdevDependenciesenginescosmic-ai-risk-saas0.1.0 Commercial SaaS rebuild of the COSMIC AI-Risk Dashboard with multi-tenant workspaces, PostgreSQL, Prisma, invite-only auth, billing entitlements, and enterprise-ready boundaries.`devbuildstartlinttestprisma:generatedb:migratedb:pushdb:seedcheck:configtest:locallocal:fallbackmock-oidcdev:ssosso:setupnext dev -p 8091next buildnext start -p 8091next lint node tests/saas-domain.test.js && node tests/tenant-security.test.js && node tests/idempotency.test.js && node tests/metrics.test.js && node tests/oidc.test.js && node tests/rate-limit.test.js && node tests/integration-service.test.jsprisma generateprisma migrate deployprisma db pushnode prisma/seed.jsnode scripts/check-config.jsnode tests/local-server.test.jsnode local-server.jsnode mock-oidc-provider.jsnode mock-oidc-provider.js & npm run dev@prisma/clientbcryptjsioredisnextreactreact-domstripezod^5.22.0^2.4.3^5.11.1^15.0.3^19.0.0^17.3.1^3.23.8eslinteslint-config-nextprisma^9.14.0node>=20.11.0 C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app./src/middleware.jswebpack/lib/FileSystemInfoSnapshot@ v)yB` C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\srcC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk DashboardC:\Users\abd_b\OneDriveC:\Users\abd_b\OneDrive\DesktopC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission FreezeC:\Users\abd_bC:\ C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\applicationC:\UserssafeTimetimestamphash! "yB "yBcfd89ca25aa7c463! yB yB13b98c72f42c0046 C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\src\package.json
webpack/lib/NormalModulewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource import { NextResponse } from "next/server";
const WINDOW_MS = 60000;
const MAX_PER_WINDOW = 100;
const hits = new Map();
function getClientIp(request) {
return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1";
}
function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {
const now = Date.now();
if (!hits.has(key)) hits.set(key, []);
const timestamps = hits.get(key).filter((t)=>now - t < windowMs);
timestamps.push(now);
hits.set(key, timestamps);
return {
allowed: timestamps.length <= max,
remaining: Math.max(0, max - timestamps.length),
reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)
};
}
export function middleware(request) {
const { pathname } = request.nextUrl;
if (!pathname.startsWith("/api/")) return NextResponse.next();
const ip = getClientIp(request);
const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';
if (!useRedis) {
const result = checkRateLimitLocal(`rl:${ip}`);
if (!result.allowed) {
return new NextResponse(JSON.stringify({
error: "Too many requests. Try again shortly."
}), {
status: 429,
headers: {
"Content-Type": "application/json",
"X-RateLimit-Limit": String(MAX_PER_WINDOW),
"X-RateLimit-Remaining": "0",
"X-RateLimit-Reset": String(result.reset),
"Cache-Control": "no-store"
}
});
}
const response = NextResponse.next();
response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW));
response.headers.set("X-RateLimit-Remaining", String(result.remaining));
response.headers.set("X-RateLimit-Reset", String(result.reset));
return response;
}
return NextResponse.next();
}
export const config = {
matcher: "/api/:path*"
};
6 webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./src/middleware.js|middleware {"version":3,"sources":["webpack://./src/middleware.js"],"sourcesContent":["import { NextResponse } from \"next/server\";\n\nconst WINDOW_MS = 60_000;\nconst MAX_PER_WINDOW = 100;\n\nconst hits = new Map();\n\nfunction getClientIp(request) {\n return request.headers.get(\"x-forwarded-for\")?.split(\",\")[0]?.trim()\n || request.headers.get(\"x-real-ip\")\n || \"127.0.0.1\";\n}\n\nfunction checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {\n const now = Date.now();\n if (!hits.has(key)) hits.set(key, []);\n const timestamps = hits.get(key).filter(t => now - t < windowMs);\n timestamps.push(now);\n hits.set(key, timestamps);\n return {\n allowed: timestamps.length <= max,\n remaining: Math.max(0, max - timestamps.length),\n reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)\n };\n}\n\nexport function middleware(request) {\n const { pathname } = request.nextUrl;\n if (!pathname.startsWith(\"/api/\")) return NextResponse.next();\n\n const ip = getClientIp(request);\n const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';\n\n if (!useRedis) {\n const result = checkRateLimitLocal(`rl:${ip}`);\n if (!result.allowed) {\n return new NextResponse(JSON.stringify({ error: \"Too many requests. Try again shortly.\" }), {\n status: 429,\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-RateLimit-Limit\": String(MAX_PER_WINDOW),\n \"X-RateLimit-Remaining\": \"0\",\n \"X-RateLimit-Reset\": String(result.reset),\n \"Cache-Control\": \"no-store\"\n }\n });\n }\n const response = NextResponse.next();\n response.headers.set(\"X-RateLimit-Limit\", String(MAX_PER_WINDOW));\n response.headers.set(\"X-RateLimit-Remaining\", String(result.remaining));\n response.headers.set(\"X-RateLimit-Reset\", String(result.reset));\n return response;\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: \"/api/:path*\"\n};\n"],"names":["NextResponse","WINDOW_MS","MAX_PER_WINDOW","hits","Map","getClientIp","request","headers","get","split","trim","checkRateLimitLocal","key","max","windowMs","now","Date","has","set","timestamps","filter","t","push","allowed","length","remaining","Math","reset","ceil","middleware","pathname","nextUrl","startsWith","next","ip","useRedis","process","env","REDIS_URL","COSMIC_REDIS_ENABLED","result","JSON","stringify","error","status","String","response","config","matcher"],"mappings":"AAAA,SAASA,YAAY,QAAQ,cAAc;AAE3C,MAAMC,YAAY;AAClB,MAAMC,iBAAiB;AAEvB,MAAMC,OAAO,IAAIC;AAEjB,SAASC,YAAYC,OAAO;IAC1B,OAAOA,QAAQC,OAAO,CAACC,GAAG,CAAC,oBAAoBC,MAAM,IAAI,CAAC,EAAE,EAAEC,UACzDJ,QAAQC,OAAO,CAACC,GAAG,CAAC,gBACpB;AACP;AAEA,SAASG,oBAAoBC,GAAG,EAAEC,MAAMX,cAAc,EAAEY,WAAWb,SAAS;IAC1E,MAAMc,MAAMC,KAAKD,GAAG;IACpB,IAAI,CAACZ,KAAKc,GAAG,CAACL,MAAMT,KAAKe,GAAG,CAACN,KAAK,EAAE;IACpC,MAAMO,aAAahB,KAAKK,GAAG,CAACI,KAAKQ,MAAM,CAACC,CAAAA,IAAKN,MAAMM,IAAIP;IACvDK,WAAWG,IAAI,CAACP;IAChBZ,KAAKe,GAAG,CAACN,KAAKO;IACd,OAAO;QACLI,SAASJ,WAAWK,MAAM,IAAIX;QAC9BY,WAAWC,KAAKb,GAAG,CAAC,GAAGA,MAAMM,WAAWK,MAAM;QAC9CG,OAAOD,KAAKE,IAAI,CAACb,MAAM,QAAQW,KAAKE,IAAI,CAACd,WAAW;IACtD;AACF;AAEA,OAAO,SAASe,WAAWvB,OAAO;IAChC,MAAM,EAAEwB,QAAQ,EAAE,GAAGxB,QAAQyB,OAAO;IACpC,IAAI,CAACD,SAASE,UAAU,CAAC,UAAU,OAAOhC,aAAaiC,IAAI;IAE3D,MAAMC,KAAK7B,YAAYC;IACvB,MAAM6B,WAAWC,QAAQC,GAAG,CAACC,SAAS,IAAIF,QAAQC,GAAG,CAACE,oBAAoB,KAAK;IAE/E,IAAI,CAACJ,UAAU;QACb,MAAMK,SAAS7B,oBAAoB,CAAC,GAAG,EAAEuB,IAAI;QAC7C,IAAI,CAACM,OAAOjB,OAAO,EAAE;YACnB,OAAO,IAAIvB,aAAayC,KAAKC,SAAS,CAAC;gBAAEC,OAAO;YAAwC,IAAI;gBAC1FC,QAAQ;gBACRrC,SAAS;oBACP,gBAAgB;oBAChB,qBAAqBsC,OAAO3C;oBAC5B,yBAAyB;oBACzB,qBAAqB2C,OAAOL,OAAOb,KAAK;oBACxC,iBAAiB;gBACnB;YACF;QACF;QACA,MAAMmB,WAAW9C,aAAaiC,IAAI;QAClCa,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAO3C;QACjD4C,SAASvC,OAAO,CAACW,GAAG,CAAC,yBAAyB2B,OAAOL,OAAOf,SAAS;QACrEqB,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAOL,OAAOb,KAAK;QAC7D,OAAOmB;IACT;IAEA,OAAO9C,aAAaiC,IAAI;AAC1B;AAEA,OAAO,MAAMc,SAAS;IACpBC,SAAS;AACX,EAAE","file":"x"}exportsTypenamespace
javascript/autoaliasmainFieldsconditionNamesxfallback`)server-only$client-only$next/dist/compiled/server-only$next/dist/compiled/client-only$ C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\head.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\image.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\constants.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\router.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dynamic.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\script.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\link.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\form.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\navigation.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\headers.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\og.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\server.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\document.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\app.jsreact$react/compiler-runtime$react/jsx-dev-runtime$react/jsx-runtime$react-dom$react-dom/client$react-dom/server$react-dom/server.browser$react-dom/server.edge$react-dom/static$react-dom/static.browser$react-dom/static.edge$react-server-dom-webpack/client$react-server-dom-webpack/server$react-server-dom-webpack/server.node$react-server-dom-webpack/static$next/dist/compiled/react$next/dist/compiled/react/compiler-runtime$next/dist/compiled/react/jsx-dev-runtime$next/dist/compiled/react/jsx-runtime$next/dist/compiled/react-dom$@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.tsnext/dist/compiled/server-only/emptynext/dist/compiled/client-only/errornext/dist/client/components/noop-headnext/dist/api/imagenext/dist/api/constantsnext/dist/api/routernext/dist/api/app-dynamicnext/dist/api/scriptnext/dist/client/app-dir/linknext/dist/client/app-dir/formnext/dist/api/navigation.react-servernext/dist/api/headersnext/dist/api/ognext/dist/api/servernext/dist/api/documentnext/dist/api/appnext/dist/compiled/react/react.react-servernext/dist/compiled/react/compiler-runtimenext/dist/compiled/react/jsx-dev-runtime.react-servernext/dist/compiled/react/jsx-runtime.react-servernext/dist/compiled/react-dom/react-dom.react-servernext/dist/compiled/react-dom/clientnext/dist/build/webpack/alias/react-dom-server.jsnext/dist/compiled/react-dom/server.browsernext/dist/compiled/react-dom/static.edgenext/dist/compiled/react-dom/static.browsernext/dist/compiled/react-server-dom-webpack/client.edgenext/dist/compiled/react-server-dom-webpack/server.edgenext/dist/compiled/react-server-dom-webpack/server.nodenext/dist/compiled/react-server-dom-webpack/static.edgenext/dist/client/dev/noop-turbopack-hmr C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\nextedge-light...
react-server
process C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\polyfills\process.js `cacheableparsedfileDependenciescontextDependenciesmissingDependenciesbuildDependenciesvalueDependenciesassetsassetsInforscstrictexportsArgumentimportLocByPathtopLevelDeclarationssnapshotwebpack/lib/util/LazySet C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-swc-loader.jswebpack/DefinePlugin_hashdc59a62a422c92f97496f35atypeactionIdsclientRefsclientEntryTypeisClientRefserver
__webpack_exports__next/serversourcePositionsourceContentlinecolumnsource l javascript/auto|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\src\middleware.js|middleware import { NextResponse } from "next/server";
const WINDOW_MS = 60000;
const MAX_PER_WINDOW = 100;
const hits = new Map();
function getClientIp(request) {
return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1";
}
function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {
const now = Date.now();
if (!hits.has(key)) hits.set(key, []);
const timestamps = hits.get(key).filter((t)=>now - t < windowMs);
timestamps.push(now);
hits.set(key, timestamps);
return {
allowed: timestamps.length <= max,
remaining: Math.max(0, max - timestamps.length),
reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)
};
}
export function middleware(request) {
const { pathname } = request.nextUrl;
if (!pathname.startsWith("/api/")) return NextResponse.next();
const ip = getClientIp(request);
const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';
if (!useRedis) {
const result = checkRateLimitLocal(`rl:${ip}`);
if (!result.allowed) {
return new NextResponse(JSON.stringify({
error: "Too many requests. Try again shortly."
}), {
status: 429,
headers: {
"Content-Type": "application/json",
"X-RateLimit-Limit": String(MAX_PER_WINDOW),
"X-RateLimit-Remaining": "0",
"X-RateLimit-Reset": String(result.reset),
"Cache-Control": "no-store"
}
});
}
const response = NextResponse.next();
response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW));
response.headers.set("X-RateLimit-Remaining", String(result.remaining));
response.headers.set("X-RateLimit-Reset", String(result.reset));
return response;
}
return NextResponse.next();
}
export const config = {
matcher: "/api/:path*"
};
getClientIpcheckRateLimitLocalWINDOW_MSMAX_PER_WINDOWhitsconfig l)yB Wwebpack/lib/dependencies/HarmonyCompatibilityDependency
d webpack/lib/dependencies/ConstDependency `+
`+webpack/lib/dependencies/HarmonyExportHeaderDependency A A
c 0 A A
c1 3 webpack/lib/dependencies/HarmonyImportSideEffectDependency
`+webpack/lib/dependencies/HarmonyExportSpecifierDependency@
c 0webpack/lib/dependencies/HarmonyImportSpecifierDependencyaNextResponseAh y Ah t
c.?A 4
c#A A
c))*A A
c//
c1 3 webpack/lib/ModuleGraphRestoreProvidedData
providedcanMangleProvideterminalBindingexportsInfo
sourcesdataruntimeRequirementsjavascriptwebpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSource@ webpack/lib/util/registerExternalSerializerwebpack-sources/RawSource // ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": () => (/* binding */ nHandler)
});
// NAMESPACE OBJECT: ./src/middleware.js
var middleware_namespaceObject = {};
__webpack_require__.r(middleware_namespaceObject);
__webpack_require__.d(middleware_namespaceObject, {
config: () => (config),
middleware: () => (middleware)
});
;// ./node_modules/next/dist/esm/server/web/globals.js
webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource export async function getEdgeInstrumentationModule() {
const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation;
return instrumentation;
}
let instrumentationModulePromise = null;
async function registerInstrumentation() {
// Ensure registerInstrumentation is not called in production build
if (process.env.NEXT_PHASE === 'phase-production-build') return;
if (!instrumentationModulePromise) {
instrumentationModulePromise = getEdgeInstrumentationModule();
}
const instrumentation = await instrumentationModulePromise;
if (instrumentation == null ? void 0 : instrumentation.register) {
try {
await instrumentation.register();
} catch (err) {
err.message = `An error occurred while loading instrumentation hook: ${err.message}`;
throw err;
}
}
}
export async function edgeInstrumentationOnRequestError(...args) {
const instrumentation = await getEdgeInstrumentationModule();
try {
var _instrumentation_onRequestError;
await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args));
} catch (err) {
// Log the soft error and continue, since the original error has already been thrown
console.error('Error in instrumentation.onRequestError:', err);
}
}
let registerInstrumentationPromise = null;
export function ensureInstrumentationRegistered() {
if (!registerInstrumentationPromise) {
registerInstrumentationPromise = registerInstrumentation();
}
return registerInstrumentationPromise;
}
function getUnsupportedModuleErrorMessage(module) {
// warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found
return `The edge runtime does not support Node.js '${module}' module.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
}
function __import_unsupported(moduleName) {
const proxy = new Proxy(function() {}, {
get (_obj, prop) {
if (prop === 'then') {
return {};
}
throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
},
construct () {
throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
},
apply (_target, _this, args) {
if (typeof args[0] === 'function') {
return args[0](proxy);
}
throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
}
});
return new Proxy({}, {
get: ()=>proxy
});
}
function enhanceGlobals() {
if (process.env.NEXT_RUNTIME !== 'edge') {
return;
}
// The condition is true when the "process" module is provided
if (process !== global.process) {
// prefer local process but global.process has correct "env"
process.env = global.process.env;
global.process = process;
}
// to allow building code that import but does not use node.js modules,
// webpack will expect this function to exist in global scope
try {
Object.defineProperty(globalThis, '__import_unsupported', {
value: __import_unsupported,
enumerable: false,
configurable: false
});
} catch {}
// Eagerly fire instrumentation hook to make the startup faster.
void ensureInstrumentationRegistered();
}
enhanceGlobals();
//# sourceMappingURL=globals.js.mapU webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middleware M
j
o
false{}__webpack_require__.gbuffersourcesizemapshash async function getEdgeInstrumentationModule() {
const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation;
return instrumentation;
}
let instrumentationModulePromise = null;
async function registerInstrumentation() {
// Ensure registerInstrumentation is not called in production build
if (process.env.NEXT_PHASE === 'phase-production-build') return;
if (!instrumentationModulePromise) {
instrumentationModulePromise = getEdgeInstrumentationModule();
}
const instrumentation = await instrumentationModulePromise;
if (instrumentation == null ? void 0 : instrumentation.register) {
try {
await instrumentation.register();
} catch (err) {
err.message = `An error occurred while loading instrumentation hook: ${err.message}`;
throw err;
}
}
}
async function edgeInstrumentationOnRequestError(...args) {
const instrumentation = await getEdgeInstrumentationModule();
try {
var _instrumentation_onRequestError;
await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args));
} catch (err) {
// Log the soft error and continue, since the original error has already been thrown
console.error('Error in instrumentation.onRequestError:', err);
}
}
let registerInstrumentationPromise = null;
function ensureInstrumentationRegistered() {
if (!registerInstrumentationPromise) {
registerInstrumentationPromise = registerInstrumentation();
}
return registerInstrumentationPromise;
}
function getUnsupportedModuleErrorMessage(module) {
// warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found
return `The edge runtime does not support Node.js '${module}' module.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
}
function __import_unsupported(moduleName) {
const proxy = new Proxy(function() {}, {
get (_obj, prop) {
if (prop === 'then') {
return {};
}
throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
},
construct () {
throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
},
apply (_target, _this, args) {
if (typeof args[0] === 'function') {
return args[0](proxy);
}
throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
}
});
return new Proxy({}, {
get: ()=>proxy
});
}
function enhanceGlobals() {
if (false) {}
// The condition is true when the "process" module is provided
if (process !== __webpack_require__.g.process) {
// prefer local process but global.process has correct "env"
process.env = __webpack_require__.g.process.env;
__webpack_require__.g.process = process;
}
// to allow building code that import but does not use node.js modules,
// webpack will expect this function to exist in global scope
try {
Object.defineProperty(globalThis, '__import_unsupported', {
value: __import_unsupported,
enumerable: false,
configurable: false
});
} catch {}
// Eagerly fire instrumentation hook to make the startup faster.
void ensureInstrumentationRegistered();
}
enhanceGlobals();
//# sourceMappingURL=globals.js.map{"finalSource":false}mapbufferedMapversionfilemappingssourcessourcesContentnamesx AAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,mFAAmF,YAAY;AAC/F;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,uBAAuB;AACvB;AACA,KAAK;AACL;AACA;AACA,QAAQ,KAAmC,EAAE,EAExC;AACL;AACA,oBAAoB,qBAAM;AAC1B;AACA,sBAAsB,qBAAM;AAC5B,QAAQ,qBAAM;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,MAAM;AACN;AACA;AACA;AACA;;AAEAU webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middleware export async function getEdgeInstrumentationModule() {
const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation;
return instrumentation;
}
let instrumentationModulePromise = null;
async function registerInstrumentation() {
// Ensure registerInstrumentation is not called in production build
if (process.env.NEXT_PHASE === 'phase-production-build') return;
if (!instrumentationModulePromise) {
instrumentationModulePromise = getEdgeInstrumentationModule();
}
const instrumentation = await instrumentationModulePromise;
if (instrumentation == null ? void 0 : instrumentation.register) {
try {
await instrumentation.register();
} catch (err) {
err.message = `An error occurred while loading instrumentation hook: ${err.message}`;
throw err;
}
}
}
export async function edgeInstrumentationOnRequestError(...args) {
const instrumentation = await getEdgeInstrumentationModule();
try {
var _instrumentation_onRequestError;
await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args));
} catch (err) {
// Log the soft error and continue, since the original error has already been thrown
console.error('Error in instrumentation.onRequestError:', err);
}
}
let registerInstrumentationPromise = null;
export function ensureInstrumentationRegistered() {
if (!registerInstrumentationPromise) {
registerInstrumentationPromise = registerInstrumentation();
}
return registerInstrumentationPromise;
}
function getUnsupportedModuleErrorMessage(module) {
// warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found
return `The edge runtime does not support Node.js '${module}' module.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
}
function __import_unsupported(moduleName) {
const proxy = new Proxy(function() {}, {
get (_obj, prop) {
if (prop === 'then') {
return {};
}
throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
},
construct () {
throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
},
apply (_target, _this, args) {
if (typeof args[0] === 'function') {
return args[0](proxy);
}
throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
}
});
return new Proxy({}, {
get: ()=>proxy
});
}
function enhanceGlobals() {
if (process.env.NEXT_RUNTIME !== 'edge') {
return;
}
// The condition is true when the "process" module is provided
if (process !== global.process) {
// prefer local process but global.process has correct "env"
process.env = global.process.env;
global.process = process;
}
// to allow building code that import but does not use node.js modules,
// webpack will expect this function to exist in global scope
try {
Object.defineProperty(globalThis, '__import_unsupported', {
value: __import_unsupported,
enumerable: false,
configurable: false
});
} catch {}
// Eagerly fire instrumentation hook to make the startup faster.
void ensureInstrumentationRegistered();
}
enhanceGlobals();
//# sourceMappingURL=globals.js.map ReplaceSourceOriginalSource webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middleware06undefined924930undefined15491555undefined32863320falseundefined33233345{}undefined34343439__webpack_require__.gundefined35433548__webpack_require__.gundefined35713576__webpack_require__.gundefined 6
;// ./node_modules/next/dist/esm/server/web/error.js
e webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceS export class PageSignatureError extends Error {
constructor({ page }){
super(`The middleware "${page}" accepts an async API directly with the form:
export function middleware(request, event) {
return NextResponse.redirect('/new-location')
}
Read more: https://nextjs.org/docs/messages/middleware-new-signature
`);
}
}
export class RemovedPageError extends Error {
constructor(){
super(`The request.page has been deprecated in favour of \`URLPattern\`.
Read more: https://nextjs.org/docs/messages/middleware-request-page
`);
}
}
export class RemovedUAError extends Error {
constructor(){
super(`The request.ua has been removed in favour of \`userAgent\` function.
Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
`);
}
}
//# sourceMappingURL=error.js.mapS webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middleware C` f F L > class PageSignatureError extends Error {
constructor({ page }){
super(`The middleware "${page}" accepts an async API directly with the form:
export function middleware(request, event) {
return NextResponse.redirect('/new-location')
}
Read more: https://nextjs.org/docs/messages/middleware-new-signature
`);
}
}
class RemovedPageError extends Error {
constructor(){
super(`The request.page has been deprecated in favour of \`URLPattern\`.
Read more: https://nextjs.org/docs/messages/middleware-request-page
`);
}
}
class RemovedUAError extends Error {
constructor(){
super(`The request.ua has been removed in favour of \`userAgent\` function.
Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
`);
}
}
//# sourceMappingURL=error.js.mapx AAAO;AACP,kBAAkB,MAAM;AACxB,iCAAiC,KAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEAS webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middlewareS export class PageSignatureError extends Error {
constructor({ page }){
super(`The middleware "${page}" accepts an async API directly with the form:
export function middleware(request, event) {
return NextResponse.redirect('/new-location')
}
Read more: https://nextjs.org/docs/messages/middleware-new-signature
`);
}
}
export class RemovedPageError extends Error {
constructor(){
super(`The request.page has been deprecated in favour of \`URLPattern\`.
Read more: https://nextjs.org/docs/messages/middleware-request-page
`);
}
}
export class RemovedUAError extends Error {
constructor(){
super(`The request.ua has been removed in favour of \`userAgent\` function.
Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
`);
}
}
//# sourceMappingURL=error.js.map | webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middleware06undefined352358undefined582588undefined 3
;// ./node_modules/next/dist/esm/lib/constants.js
1&