/home/techb158/balavpn.abdallabala.com/node_modules/next/dist/server/request
NameSizeModeActions
connection.d.ts2540666editdlrm
connection.js71300666editdlrm
connection.js.map84140666editdlrm
cookies.d.ts17770666editdlrm
cookies.js206190666editdlrm
cookies.js.map314000666editdlrm
draft-mode.d.ts19250666editdlrm
draft-mode.js138650666editdlrm
draft-mode.js.map209660666editdlrm
fallback-params.d.ts1790666editdlrm
fallback-params.js13400666editdlrm
fallback-params.js.map21290666editdlrm
headers.d.ts23470666editdlrm
headers.js177520666editdlrm
headers.js.map267750666editdlrm
params.d.ts23130666editdlrm
params.js272210666editdlrm
params.js.map393300666editdlrm
pathname.d.ts2000666editdlrm
pathname.js43830666editdlrm
pathname.js.map61790666editdlrm
root-params.d.ts1880666editdlrm
root-params.js143720666editdlrm
root-params.js.map184820666editdlrm
search-params.d.ts24740666editdlrm
search-params.js330320666editdlrm
search-params.js.map474590666editdlrm
utils.d.ts4870666editdlrm
utils.js31660666editdlrm
utils.js.map31690666editdlrm
Edit: /home/techb158/balavpn.abdallabala.com/node_modules/next/dist/server/request/connection.js (7130B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "connection", { enumerable: true, get: function() { return connection; } }); const _workasyncstorageexternal = require("../app-render/work-async-storage.external"); const _workunitasyncstorageexternal = require("../app-render/work-unit-async-storage.external"); const _dynamicrendering = require("../app-render/dynamic-rendering"); const _staticgenerationbailout = require("../../client/components/static-generation-bailout"); const _dynamicrenderingutils = require("../dynamic-rendering-utils"); const _utils = require("./utils"); function connection() { const callingExpression = 'connection'; const workStore = _workasyncstorageexternal.workAsyncStorage.getStore(); const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !(0, _utils.isRequestAPICallableInsideAfter)()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new _staticgenerationbailout.StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return (0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return (0, _dynamicrendering.postponeWithTracking)(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return (0, _dynamicrendering.throwToInterruptStaticGeneration)('connection', workStore, workUnitStore); case 'request': (0, _dynamicrendering.trackDynamicDataInDynamicRender)(workUnitStore); if (process.env.NODE_ENV === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return (0, _dynamicrenderingutils.makeDevtoolsIOAwarePromise)(undefined); } else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. (0, _workunitasyncstorageexternal.throwForMissingRequestStore)(callingExpression); } //# sourceMappingURL=connection.js.map