| Server IP : 159.203.156.69 / Your IP : 216.73.216.28 Web Server : nginx/1.24.0 System : Linux main-ubuntu 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/tanviranik.com/node_modules/vinext/dist/server/ |
Upload File : |
{"version":3,"file":"prerender-work-unit-setup.js","names":[],"sources":["../../src/server/prerender-work-unit-setup.ts"],"sourcesContent":["/**\n * Sets up the work unit async storage for prerendering.\n *\n * When VINEXT_PRERENDER=1, wraps execution in a workUnitAsyncStorage.run()\n * with a PrerenderStore so that dynamic APIs (e.g., io()) can\n * detect the prerender context and return hanging promises.\n *\n * Used by: app-rsc-entry.ts handler template.\n *\n * TODO: If future dynamic APIs need request-scoped stores for normal (non-prerender)\n * requests, add a `{ type: \"request\" }` store during normal request handling.\n */\nimport { workUnitAsyncStorage } from \"vinext/shims/internal/work-unit-async-storage\";\n\nexport function runWithPrerenderWorkUnit<T>(\n fn: () => Promise<T>,\n options?: { route?: string | (() => string) },\n): Promise<T> {\n if (process.env.VINEXT_PRERENDER === \"1\") {\n const controller = new AbortController();\n const route = typeof options?.route === \"function\" ? options.route() : options?.route;\n return workUnitAsyncStorage\n .run(\n {\n type: \"prerender\",\n renderSignal: controller.signal,\n route,\n },\n fn,\n )\n .finally(() => controller.abort());\n }\n return fn();\n}\n"],"mappings":";;;;;;;;;;;;;;AAcA,SAAgB,yBACd,IACA,SACY;CACZ,IAAI,QAAQ,IAAI,qBAAqB,KAAK;EACxC,MAAM,aAAa,IAAI,iBAAiB;EACxC,MAAM,QAAQ,OAAO,SAAS,UAAU,aAAa,QAAQ,OAAO,GAAG,SAAS;EAChF,OAAO,qBACJ,IACC;GACE,MAAM;GACN,cAAc,WAAW;GACzB;GACD,EACD,GACD,CACA,cAAc,WAAW,OAAO,CAAC;;CAEtC,OAAO,IAAI"}