Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
31
node_modules/next/dist/esm/server/request/utils.js
generated
vendored
Normal file
31
node_modules/next/dist/esm/server/request/utils.js
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { StaticGenBailoutError } from '../../client/components/static-generation-bailout';
|
||||
import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external';
|
||||
export function throwWithStaticGenerationBailoutError(route, expression) {
|
||||
throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", {
|
||||
value: "E576",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
export function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) {
|
||||
throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", {
|
||||
value: "E543",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
export function throwForSearchParamsAccessInUseCache(workStore) {
|
||||
const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "searchParams" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", {
|
||||
value: "E634",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
workStore.invalidUsageError ??= error;
|
||||
throw error;
|
||||
}
|
||||
export function isRequestAPICallableInsideAfter() {
|
||||
const afterTaskStore = afterTaskAsyncStorage.getStore();
|
||||
return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action';
|
||||
}
|
||||
|
||||
//# sourceMappingURL=utils.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue