Edit gitignore file

This commit is contained in:
ParkSuMin
2025-02-24 20:17:54 +03:00
parent 9b16274400
commit d7869378b8
349 changed files with 686 additions and 25860 deletions

View File

@@ -1,7 +1,7 @@
/// <reference types="node" />
import type { IncomingMessage } from 'http';
import type { BaseNextRequest } from 'next/dist/server/base-http';
import type { NextApiResponse } from 'next/dist/shared/lib/utils';
import type { BaseNextRequest } from '../base-http';
import type { NextApiResponse } from '../../shared/lib/utils';
export type NextApiRequestCookies = Partial<{
[key: string]: string;
}>;

View File

@@ -1,15 +1,15 @@
/// <reference types="node" />
import type { IncomingMessage, ServerResponse } from 'http';
import type { ActionResult, DynamicParamTypesShort, FlightRouterState, FlightSegmentPath, RenderOpts, Segment } from 'next/dist/server/app-render/types';
import type { StaticGenerationStore } from 'next/dist/client/components/static-generation-async-storage.external';
import type { RequestStore } from 'next/dist/client/components/request-async-storage.external';
import type { NextParsedUrlQuery } from 'next/dist/server/request-meta';
import type { AppPageModule } from 'next/dist/server/future/route-modules/app-page/module';
import type { ClientReferenceManifest } from 'next/dist/build/webpack/plugins/flight-manifest-plugin';
import type { Revalidate } from 'next/dist/server/lib/revalidate';
import RenderResult, { type AppPageRenderResultMetadata } from 'next/dist/server/render-result';
import { type ErrorHandler } from 'next/dist/server/app-render/create-error-handler';
import type { DeepReadonly } from 'next/dist/shared/lib/deep-readonly';
import type { ActionResult, DynamicParamTypesShort, FlightRouterState, FlightSegmentPath, RenderOpts, Segment } from './types';
import type { StaticGenerationStore } from '../../client/components/static-generation-async-storage.external';
import type { RequestStore } from '../../client/components/request-async-storage.external';
import type { NextParsedUrlQuery } from '../request-meta';
import type { AppPageModule } from '../future/route-modules/app-page/module';
import type { ClientReferenceManifest } from '../../build/webpack/plugins/flight-manifest-plugin';
import type { Revalidate } from '../lib/revalidate';
import RenderResult, { type AppPageRenderResultMetadata } from '../render-result';
import { type ErrorHandler } from './create-error-handler';
import type { DeepReadonly } from '../../shared/lib/deep-readonly';
export type GetDynamicParamFromSegment = (segment: string) => {
param: string;
value: string | string[] | null;

View File

@@ -19,7 +19,7 @@
* unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should
* read that data outside the cache and pass it in as an argument to the cached function.
*/
import type { StaticGenerationStore } from 'next/dist/client/components/static-generation-async-storage.external';
import type { StaticGenerationStore } from '../../client/components/static-generation-async-storage.external';
type DynamicAccess = {
/**
* If debugging, this will contain the stack trace of where the dynamic access

View File

@@ -1,17 +1,17 @@
export { renderToReadableStream, decodeReply, decodeAction, decodeFormState, } from 'react-server-dom-webpack/server.edge';
import AppRouter from 'next/dist/client/components/app-router';
import LayoutRouter from 'next/dist/client/components/layout-router';
import RenderFromTemplateContext from 'next/dist/client/components/render-from-template-context';
import { staticGenerationAsyncStorage } from 'next/dist/client/components/static-generation-async-storage.external';
import { requestAsyncStorage } from 'next/dist/client/components/request-async-storage.external';
import { actionAsyncStorage } from 'next/dist/client/components/action-async-storage.external';
import { ClientPageRoot } from 'next/dist/client/components/client-page';
import { createUntrackedSearchParams, createDynamicallyTrackedSearchParams } from 'next/dist/client/components/search-params';
import * as serverHooks from 'next/dist/client/components/hooks-server-context';
import { NotFoundBoundary } from 'next/dist/client/components/not-found-boundary';
import 'next/dist/client/components/error-boundary';
import { preloadStyle, preloadFont, preconnect } from 'next/dist/server/app-render/rsc/preloads';
import { Postpone } from 'next/dist/server/app-render/rsc/postpone';
import { taintObjectReference } from 'next/dist/server/app-render/rsc/taint';
import AppRouter from '../../client/components/app-router';
import LayoutRouter from '../../client/components/layout-router';
import RenderFromTemplateContext from '../../client/components/render-from-template-context';
import { staticGenerationAsyncStorage } from '../../client/components/static-generation-async-storage.external';
import { requestAsyncStorage } from '../../client/components/request-async-storage.external';
import { actionAsyncStorage } from '../../client/components/action-async-storage.external';
import { ClientPageRoot } from '../../client/components/client-page';
import { createUntrackedSearchParams, createDynamicallyTrackedSearchParams } from '../../client/components/search-params';
import * as serverHooks from '../../client/components/hooks-server-context';
import { NotFoundBoundary } from '../../client/components/not-found-boundary';
import '../../client/components/error-boundary';
import { preloadStyle, preloadFont, preconnect } from '../../server/app-render/rsc/preloads';
import { Postpone } from '../../server/app-render/rsc/postpone';
import { taintObjectReference } from '../../server/app-render/rsc/taint';
declare function patchFetch(): void;
export { AppRouter, LayoutRouter, RenderFromTemplateContext, staticGenerationAsyncStorage, requestAsyncStorage, actionAsyncStorage, createUntrackedSearchParams, createDynamicallyTrackedSearchParams, serverHooks, preloadStyle, preloadFont, preconnect, Postpone, taintObjectReference, ClientPageRoot, NotFoundBoundary, patchFetch, };

View File

@@ -1 +1 @@
export { Postpone } from 'next/dist/server/app-render/dynamic-rendering';
export { Postpone } from '../dynamic-rendering';

View File

@@ -1,15 +1,15 @@
/// <reference types="react" />
/// <reference types="node" />
import type { LoadComponentsReturnType } from 'next/dist/server/load-components';
import type { ServerRuntime, SizeLimit } from 'next/types';
import type { NextConfigComplete } from 'next/dist/server/config-shared';
import type { ClientReferenceManifest } from 'next/dist/build/webpack/plugins/flight-manifest-plugin';
import type { NextFontManifest } from 'next/dist/build/webpack/plugins/next-font-manifest-plugin';
import type { LoadComponentsReturnType } from '../load-components';
import type { ServerRuntime, SizeLimit } from '../../../types';
import type { NextConfigComplete } from '../../server/config-shared';
import type { ClientReferenceManifest } from '../../build/webpack/plugins/flight-manifest-plugin';
import type { NextFontManifest } from '../../build/webpack/plugins/next-font-manifest-plugin';
import type { ParsedUrlQuery } from 'querystring';
import type { AppPageModule } from 'next/dist/server/future/route-modules/app-page/module';
import type { SwrDelta } from 'next/dist/server/lib/revalidate';
import type { LoadingModuleData } from 'next/dist/shared/lib/app-router-context.shared-runtime';
import type { DeepReadonly } from 'next/dist/shared/lib/deep-readonly';
import type { AppPageModule } from '../future/route-modules/app-page/module';
import type { SwrDelta } from '../lib/revalidate';
import type { LoadingModuleData } from '../../shared/lib/app-router-context.shared-runtime';
import type { DeepReadonly } from '../../shared/lib/deep-readonly';
import s from 'next/dist/compiled/superstruct';
export type DynamicParamTypes = 'catchall' | 'catchall-intercepted' | 'optional-catchall' | 'dynamic' | 'dynamic-intercepted';
declare const dynamicParamTypesSchema: s.Struct<"d" | "c" | "ci" | "oc" | "di", {
@@ -91,7 +91,7 @@ export interface RenderOptsPartial {
crossOrigin?: '' | 'anonymous' | 'use-credentials' | undefined;
nextFontManifest?: DeepReadonly<NextFontManifest>;
isBot?: boolean;
incrementalCache?: import('next/dist/server/lib/incremental-cache').IncrementalCache;
incrementalCache?: import('../lib/incremental-cache').IncrementalCache;
isRevalidate?: boolean;
nextExport?: boolean;
nextConfigOutput?: 'standalone' | 'export';

View File

@@ -1,10 +1,10 @@
/// <reference types="node" />
import type { IncomingMessage } from 'http';
import type { ReadonlyRequestCookies } from 'next/dist/server/web/spec-extension/adapters/request-cookies';
import type { ResponseCookies } from 'next/dist/server/web/spec-extension/cookies';
import type { BaseNextRequest } from 'next/dist/server/base-http';
import type { NextRequest } from 'next/dist/server/web/spec-extension/request';
import type { __ApiPreviewProps } from 'next/dist/server/api-utils';
import type { ReadonlyRequestCookies } from '../web/spec-extension/adapters/request-cookies';
import type { ResponseCookies } from '../web/spec-extension/cookies';
import type { BaseNextRequest } from '../base-http';
import type { NextRequest } from '../web/spec-extension/request';
import type { __ApiPreviewProps } from '../api-utils';
export declare class DraftModeProvider {
readonly isEnabled: boolean;
constructor(previewProps: __ApiPreviewProps | undefined, req: IncomingMessage | BaseNextRequest<unknown> | NextRequest, cookies: ReadonlyRequestCookies, mutableCookies: ResponseCookies);

View File

@@ -1,7 +1,7 @@
/// <reference types="node" />
import type { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http';
import type { I18NConfig } from 'next/dist/server/config-shared';
import type { NextApiRequestCookies } from 'next/dist/server/api-utils';
import type { I18NConfig } from '../config-shared';
import type { NextApiRequestCookies } from '../api-utils';
export interface BaseNextRequestConfig {
basePath: string | undefined;
i18n?: I18NConfig;

View File

@@ -2,11 +2,11 @@
/// <reference types="node" />
import type { ServerResponse, IncomingMessage } from 'http';
import type { Writable, Readable } from 'stream';
import { SYMBOL_CLEARED_COOKIES } from 'next/dist/server/api-utils';
import type { NextApiRequestCookies } from 'next/dist/server/api-utils';
import { NEXT_REQUEST_META } from 'next/dist/server/request-meta';
import type { RequestMeta } from 'next/dist/server/request-meta';
import { BaseNextRequest, BaseNextResponse, type FetchMetric } from 'next/dist/server/base-http';
import { SYMBOL_CLEARED_COOKIES } from '../api-utils';
import type { NextApiRequestCookies } from '../api-utils';
import { NEXT_REQUEST_META } from '../request-meta';
import type { RequestMeta } from '../request-meta';
import { BaseNextRequest, BaseNextResponse, type FetchMetric } from './index';
import type { OutgoingHttpHeaders } from 'node:http';
type Req = IncomingMessage & {
[NEXT_REQUEST_META]?: RequestMeta;

View File

@@ -1,37 +1,37 @@
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import type { __ApiPreviewProps } from 'next/dist/server/api-utils';
import type { FontManifest } from 'next/dist/server/font-utils';
import type { LoadComponentsReturnType } from 'next/dist/server/load-components';
import type { MiddlewareRouteMatch } from 'next/dist/shared/lib/router/utils/middleware-route-matcher';
import type { Params } from 'next/dist/shared/lib/router/utils/route-matcher';
import type { NextConfig, NextConfigComplete } from 'next/dist/server/config-shared';
import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from 'next/dist/server/request-meta';
import type { __ApiPreviewProps } from './api-utils';
import type { FontManifest } from './font-utils';
import type { LoadComponentsReturnType } from './load-components';
import type { MiddlewareRouteMatch } from '../shared/lib/router/utils/middleware-route-matcher';
import type { Params } from '../shared/lib/router/utils/route-matcher';
import type { NextConfig, NextConfigComplete } from './config-shared';
import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from './request-meta';
import type { ParsedUrlQuery } from 'querystring';
import type { RenderOptsPartial as PagesRenderOptsPartial } from 'next/dist/server/render';
import type { RenderOptsPartial as AppRenderOptsPartial } from 'next/dist/server/app-render/types';
import type { ResponseCacheBase } from 'next/dist/server/response-cache';
import type { RenderOptsPartial as PagesRenderOptsPartial } from './render';
import type { RenderOptsPartial as AppRenderOptsPartial } from './app-render/types';
import type { ResponseCacheBase } from './response-cache';
import type { UrlWithParsedQuery } from 'url';
import type { PagesManifest } from 'next/dist/build/webpack/plugins/pages-manifest-plugin';
import type { BaseNextRequest, BaseNextResponse } from 'next/dist/server/base-http';
import type { ManifestRewriteRoute, ManifestRoute, PrerenderManifest } from 'next/dist/build';
import type { ClientReferenceManifest } from 'next/dist/build/webpack/plugins/flight-manifest-plugin';
import type { NextFontManifest } from 'next/dist/build/webpack/plugins/next-font-manifest-plugin';
import type { PagesAPIRouteMatch } from 'next/dist/server/future/route-matches/pages-api-route-match';
import type { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin';
import type { BaseNextRequest, BaseNextResponse } from './base-http';
import type { ManifestRewriteRoute, ManifestRoute, PrerenderManifest } from '../build';
import type { ClientReferenceManifest } from '../build/webpack/plugins/flight-manifest-plugin';
import type { NextFontManifest } from '../build/webpack/plugins/next-font-manifest-plugin';
import type { PagesAPIRouteMatch } from './future/route-matches/pages-api-route-match';
import type { Server as HTTPServer, IncomingMessage } from 'http';
import type { MiddlewareMatcher } from 'next/dist/build/analysis/get-page-static-info';
import { type Revalidate, type SwrDelta } from 'next/dist/server/lib/revalidate';
import RenderResult from 'next/dist/server/render-result';
import type { RouteMatcherManager } from 'next/dist/server/future/route-matcher-managers/route-matcher-manager';
import { LocaleRouteNormalizer } from 'next/dist/server/future/normalizers/locale-route-normalizer';
import { I18NProvider } from 'next/dist/server/future/helpers/i18n-provider';
import { RSCPathnameNormalizer } from 'next/dist/server/future/normalizers/request/rsc';
import { PostponedPathnameNormalizer } from 'next/dist/server/future/normalizers/request/postponed';
import { ActionPathnameNormalizer } from 'next/dist/server/future/normalizers/request/action';
import { PrefetchRSCPathnameNormalizer } from 'next/dist/server/future/normalizers/request/prefetch-rsc';
import { NextDataPathnameNormalizer } from 'next/dist/server/future/normalizers/request/next-data';
import type { DeepReadonly } from 'next/dist/shared/lib/deep-readonly';
import type { MiddlewareMatcher } from '../build/analysis/get-page-static-info';
import { type Revalidate, type SwrDelta } from './lib/revalidate';
import RenderResult from './render-result';
import type { RouteMatcherManager } from './future/route-matcher-managers/route-matcher-manager';
import { LocaleRouteNormalizer } from './future/normalizers/locale-route-normalizer';
import { I18NProvider } from './future/helpers/i18n-provider';
import { RSCPathnameNormalizer } from './future/normalizers/request/rsc';
import { PostponedPathnameNormalizer } from './future/normalizers/request/postponed';
import { ActionPathnameNormalizer } from './future/normalizers/request/action';
import { PrefetchRSCPathnameNormalizer } from './future/normalizers/request/prefetch-rsc';
import { NextDataPathnameNormalizer } from './future/normalizers/request/next-data';
import type { DeepReadonly } from '../shared/lib/deep-readonly';
export type FindComponentsResult = {
components: LoadComponentsReturnType;
query: NextParsedUrlQuery;
@@ -194,7 +194,7 @@ export default abstract class Server<ServerOptions extends Options = Options> {
protected abstract getIncrementalCache(options: {
requestHeaders: Record<string, undefined | string | string[]>;
requestProtocol: 'http' | 'https';
}): Promise<import('next/dist/server/lib/incremental-cache').IncrementalCache>;
}): Promise<import('./lib/incremental-cache').IncrementalCache>;
protected abstract getResponseCache(options: {
dev: boolean;
}): ResponseCacheBase;
@@ -254,7 +254,7 @@ export default abstract class Server<ServerOptions extends Options = Options> {
private renderImpl;
protected getStaticPaths({ pathname, }: {
pathname: string;
requestHeaders: import('next/dist/server/lib/incremental-cache').IncrementalCache['requestHeaders'];
requestHeaders: import('./lib/incremental-cache').IncrementalCache['requestHeaders'];
page: string;
isAppPath: boolean;
}): Promise<{

View File

@@ -1,11 +1,11 @@
import type { webpack } from 'next/dist/compiled/webpack/webpack';
import type { Header, Redirect, Rewrite } from 'next/dist/lib/load-custom-routes';
import type { ImageConfig, ImageConfigComplete } from 'next/dist/shared/lib/image-config';
import type { SubresourceIntegrityAlgorithm } from 'next/dist/build/webpack/plugins/subresource-integrity-plugin';
import type { WEB_VITALS } from 'next/dist/shared/lib/utils';
import type { NextParsedUrlQuery } from 'next/dist/server/request-meta';
import type { SizeLimit } from 'next/types';
import type { SwrDelta } from 'next/dist/server/lib/revalidate';
import type { Header, Redirect, Rewrite } from '../lib/load-custom-routes';
import type { ImageConfig, ImageConfigComplete } from '../shared/lib/image-config';
import type { SubresourceIntegrityAlgorithm } from '../build/webpack/plugins/subresource-integrity-plugin';
import type { WEB_VITALS } from '../shared/lib/utils';
import type { NextParsedUrlQuery } from './request-meta';
import type { SizeLimit } from '../../types';
import type { SwrDelta } from './lib/revalidate';
export type NextConfigComplete = Required<NextConfig> & {
images: Required<ImageConfigComplete>;
typescript: Required<TypeScriptConfig>;

View File

@@ -1,6 +1,6 @@
import type { ExperimentalConfig, NextConfigComplete, NextConfig } from 'next/dist/server/config-shared';
export { normalizeConfig } from 'next/dist/server/config-shared';
export type { DomainLocale, NextConfig } from 'next/dist/server/config-shared';
import type { ExperimentalConfig, NextConfigComplete, NextConfig } from './config-shared';
export { normalizeConfig } from './config-shared';
export type { DomainLocale, NextConfig } from './config-shared';
export declare function warnOptionHasBeenDeprecated(config: NextConfig, nestedPropertyKey: string, reason: string, silent: boolean): void;
export declare function warnOptionHasBeenMovedOutOfExperimental(config: NextConfig, oldKey: string, newKey: string, configFileName: string, silent: boolean): NextConfig;
export default function loadConfig(phase: string, dir: string, { customConfig, rawConfig, silent, onLoadUserConfig, }?: {

View File

@@ -6,10 +6,10 @@ import type { IncomingMessage, ServerResponse } from 'http';
import type { UrlObject } from 'url';
import type { Duplex } from 'stream';
import type { webpack } from 'next/dist/compiled/webpack/webpack';
import type getBaseWebpackConfig from 'next/dist/build/webpack-config';
import type { RouteDefinition } from 'next/dist/server/future/route-definitions/route-definition';
import type { Project, Update as TurbopackUpdate } from 'next/dist/build/swc';
import type { VersionInfo } from 'next/dist/server/dev/parse-version-info';
import type getBaseWebpackConfig from '../../build/webpack-config';
import type { RouteDefinition } from '../future/route-definitions/route-definition';
import type { Project, Update as TurbopackUpdate } from '../../build/swc';
import type { VersionInfo } from './parse-version-info';
export declare const enum HMR_ACTIONS_SENT_TO_BROWSER {
ADDED_PAGE = "addedPage",
REMOVED_PAGE = "removedPage",

View File

@@ -1,23 +1,23 @@
/// <reference types="node" />
/// <reference types="node" />
import type { FindComponentsResult } from 'next/dist/server/next-server';
import type { LoadComponentsReturnType } from 'next/dist/server/load-components';
import type { Options as ServerOptions } from 'next/dist/server/next-server';
import type { Params } from 'next/dist/shared/lib/router/utils/route-matcher';
import type { ParsedUrl } from 'next/dist/shared/lib/router/utils/parse-url';
import type { FindComponentsResult } from '../next-server';
import type { LoadComponentsReturnType } from '../load-components';
import type { Options as ServerOptions } from '../next-server';
import type { Params } from '../../shared/lib/router/utils/route-matcher';
import type { ParsedUrl } from '../../shared/lib/router/utils/parse-url';
import type { ParsedUrlQuery } from 'querystring';
import type { UrlWithParsedQuery } from 'url';
import type { BaseNextRequest, BaseNextResponse } from 'next/dist/server/base-http';
import type { MiddlewareRoutingItem } from 'next/dist/server/base-server';
import type { RouteDefinition } from 'next/dist/server/future/route-definitions/route-definition';
import type { RouteMatcherManager } from 'next/dist/server/future/route-matcher-managers/route-matcher-manager';
import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from 'next/dist/server/request-meta';
import type { DevBundlerService } from 'next/dist/server/lib/dev-bundler-service';
import type { IncrementalCache } from 'next/dist/server/lib/incremental-cache';
import type { NodeNextResponse, NodeNextRequest } from 'next/dist/server/base-http/node';
import type { PagesManifest } from 'next/dist/build/webpack/plugins/pages-manifest-plugin';
import Server from 'next/dist/server/next-server';
import { type Span } from 'next/dist/trace';
import type { BaseNextRequest, BaseNextResponse } from '../base-http';
import type { MiddlewareRoutingItem } from '../base-server';
import type { RouteDefinition } from '../future/route-definitions/route-definition';
import type { RouteMatcherManager } from '../future/route-matcher-managers/route-matcher-manager';
import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from '../request-meta';
import type { DevBundlerService } from '../lib/dev-bundler-service';
import type { IncrementalCache } from '../lib/incremental-cache';
import type { NodeNextResponse, NodeNextRequest } from '../base-http/node';
import type { PagesManifest } from '../../build/webpack/plugins/pages-manifest-plugin';
import Server from '../next-server';
import { type Span } from '../../trace';
export interface Options extends ServerOptions {
/**
* Tells of Next.js is running from the `next dev` command
@@ -51,7 +51,7 @@ export default class DevServer extends Server {
protected staticPathsWorker?: {
[key: string]: any;
} & {
loadStaticPaths: typeof import('next/dist/server/dev/static-paths-worker').loadStaticPaths;
loadStaticPaths: typeof import('./static-paths-worker').loadStaticPaths;
};
private getStaticPathsWorker;
constructor(options: Options);
@@ -66,7 +66,7 @@ export default class DevServer extends Server {
parsedUrl: ParsedUrl;
parsed: UrlWithParsedQuery;
middlewareList: MiddlewareRoutingItem[];
}): Promise<import("next/dist/server/web/types").FetchEventResult | {
}): Promise<import("../web/types").FetchEventResult | {
finished: boolean;
}>;
runEdgeFunction(params: {
@@ -77,7 +77,7 @@ export default class DevServer extends Server {
page: string;
appPaths: string[] | null;
isAppPath: boolean;
}): Promise<import("next/dist/server/web/types").FetchEventResult | null>;
}): Promise<import("../web/types").FetchEventResult | null>;
handleRequest(req: BaseNextRequest, res: BaseNextResponse, parsedUrl?: NextUrlWithParsedQuery): Promise<void>;
run(req: NodeNextRequest, res: NodeNextResponse, parsedUrl: UrlWithParsedQuery): Promise<void>;
protected logErrorWithOriginalStack(err?: unknown, type?: 'unhandledRejection' | 'uncaughtException' | 'warning' | 'app-dir'): Promise<void>;

View File

@@ -1,7 +1,7 @@
import type { NextConfigComplete } from 'next/dist/server/config-shared';
import 'next/dist/server/require-hook';
import 'next/dist/server/node-environment';
import type { IncrementalCache } from 'next/dist/server/lib/incremental-cache';
import type { NextConfigComplete } from '../config-shared';
import '../require-hook';
import '../node-environment';
import type { IncrementalCache } from '../lib/incremental-cache';
type RuntimeConfig = {
configFileName: string;
publicRuntimeConfig: {

View File

@@ -1,5 +1,5 @@
import type { DomainLocale, I18NConfig } from 'next/dist/server/config-shared';
import type { NextParsedUrlQuery } from 'next/dist/server/request-meta';
import type { DomainLocale, I18NConfig } from '../../config-shared';
import type { NextParsedUrlQuery } from '../../request-meta';
/**
* The result of matching a locale aware route.
*/

View File

@@ -1,5 +1,5 @@
import type { I18NProvider } from 'next/dist/server/future/helpers/i18n-provider';
import type { Normalizer } from 'next/dist/server/future/normalizers/normalizer';
import type { I18NProvider } from '../helpers/i18n-provider';
import type { Normalizer } from './normalizer';
/**
* Normalizes the pathname by removing the locale prefix if any.
*/

View File

@@ -1,5 +1,5 @@
import type { PathnameNormalizer } from 'next/dist/server/future/normalizers/request/pathname-normalizer';
import { SuffixPathnameNormalizer } from 'next/dist/server/future/normalizers/request/suffix';
import type { PathnameNormalizer } from './pathname-normalizer';
import { SuffixPathnameNormalizer } from './suffix';
export declare class ActionPathnameNormalizer extends SuffixPathnameNormalizer implements PathnameNormalizer {
constructor();
}

View File

@@ -1,4 +1,4 @@
import type { PathnameNormalizer } from 'next/dist/server/future/normalizers/request/pathname-normalizer';
import type { PathnameNormalizer } from './pathname-normalizer';
export declare class NextDataPathnameNormalizer implements PathnameNormalizer {
private readonly prefix;
private readonly suffix;

View File

@@ -1,4 +1,4 @@
import type { Normalizer } from 'next/dist/server/future/normalizers/normalizer';
import type { Normalizer } from '../normalizer';
export interface PathnameNormalizer extends Normalizer {
match(pathname: string): boolean;
normalize(pathname: string, matched?: boolean): string;

View File

@@ -1,5 +1,5 @@
import type { PathnameNormalizer } from 'next/dist/server/future/normalizers/request/pathname-normalizer';
import { PrefixPathnameNormalizer } from 'next/dist/server/future/normalizers/request/prefix';
import type { PathnameNormalizer } from './pathname-normalizer';
import { PrefixPathnameNormalizer } from './prefix';
export declare class PostponedPathnameNormalizer extends PrefixPathnameNormalizer implements PathnameNormalizer {
constructor();
normalize(pathname: string, matched?: boolean): string;

View File

@@ -1,5 +1,5 @@
import type { PathnameNormalizer } from 'next/dist/server/future/normalizers/request/pathname-normalizer';
import { SuffixPathnameNormalizer } from 'next/dist/server/future/normalizers/request/suffix';
import type { PathnameNormalizer } from './pathname-normalizer';
import { SuffixPathnameNormalizer } from './suffix';
export declare class PrefetchRSCPathnameNormalizer extends SuffixPathnameNormalizer implements PathnameNormalizer {
constructor();
}

View File

@@ -1,4 +1,4 @@
import type { Normalizer } from 'next/dist/server/future/normalizers/normalizer';
import type { Normalizer } from '../normalizer';
export declare class PrefixPathnameNormalizer implements Normalizer {
private readonly prefix;
constructor(prefix: string);

View File

@@ -1,5 +1,5 @@
import type { PathnameNormalizer } from 'next/dist/server/future/normalizers/request/pathname-normalizer';
import { SuffixPathnameNormalizer } from 'next/dist/server/future/normalizers/request/suffix';
import type { PathnameNormalizer } from './pathname-normalizer';
import { SuffixPathnameNormalizer } from './suffix';
export declare class RSCPathnameNormalizer extends SuffixPathnameNormalizer implements PathnameNormalizer {
constructor();
}

View File

@@ -1,4 +1,4 @@
import type { Normalizer } from 'next/dist/server/future/normalizers/normalizer';
import type { Normalizer } from '../normalizer';
export declare class SuffixPathnameNormalizer implements Normalizer {
private readonly suffix;
constructor(suffix: string);

View File

@@ -1,5 +1,5 @@
import type { RouteDefinition } from 'next/dist/server/future/route-definitions/route-definition';
import { RouteKind } from 'next/dist/server/future/route-kind';
import type { RouteDefinition } from './route-definition';
import { RouteKind } from '../route-kind';
export interface AppPageRouteDefinition extends RouteDefinition<RouteKind.APP_PAGE> {
readonly appPaths: ReadonlyArray<string>;
}

View File

@@ -1,5 +1,5 @@
import type { RouteDefinition } from 'next/dist/server/future/route-definitions/route-definition';
import type { RouteKind } from 'next/dist/server/future/route-kind';
import type { RouteDefinition } from './route-definition';
import type { RouteKind } from '../route-kind';
export interface LocaleRouteDefinition<K extends RouteKind = RouteKind> extends RouteDefinition<K> {
/**
* When defined it means that this route is locale aware. When undefined,

View File

@@ -1,4 +1,4 @@
import type { RouteKind } from 'next/dist/server/future/route-kind';
import type { LocaleRouteDefinition } from 'next/dist/server/future/route-definitions/locale-route-definition';
import type { RouteKind } from '../route-kind';
import type { LocaleRouteDefinition } from './locale-route-definition';
export interface PagesAPIRouteDefinition extends LocaleRouteDefinition<RouteKind.PAGES_API> {
}

View File

@@ -1,4 +1,4 @@
import type { LocaleRouteDefinition } from 'next/dist/server/future/route-definitions/locale-route-definition';
import type { RouteKind } from 'next/dist/server/future/route-kind';
import type { LocaleRouteDefinition } from './locale-route-definition';
import type { RouteKind } from '../route-kind';
export interface PagesRouteDefinition extends LocaleRouteDefinition<RouteKind.PAGES> {
}

View File

@@ -1,4 +1,4 @@
import type { RouteKind } from 'next/dist/server/future/route-kind';
import type { RouteKind } from '../route-kind';
export interface RouteDefinition<K extends RouteKind = RouteKind> {
readonly kind: K;
readonly bundlePath: string;

View File

@@ -1,6 +1,6 @@
import type { RouteMatch } from 'next/dist/server/future/route-matches/route-match';
import type { RouteMatcherProvider } from 'next/dist/server/future/route-matcher-providers/route-matcher-provider';
import type { LocaleAnalysisResult } from 'next/dist/server/future/helpers/i18n-provider';
import type { RouteMatch } from '../route-matches/route-match';
import type { RouteMatcherProvider } from '../route-matcher-providers/route-matcher-provider';
import type { LocaleAnalysisResult } from '../helpers/i18n-provider';
export type MatchOptions = {
skipDynamic?: boolean;
/**

View File

@@ -1,4 +1,4 @@
import type { RouteMatcher } from 'next/dist/server/future/route-matchers/route-matcher';
import type { RouteMatcher } from '../route-matchers/route-matcher';
export interface RouteMatcherProvider<M extends RouteMatcher = RouteMatcher> {
matchers(): Promise<ReadonlyArray<M>>;
}

View File

@@ -1,5 +1,5 @@
import type { RouteMatch } from 'next/dist/server/future/route-matches/route-match';
import type { RouteDefinition } from 'next/dist/server/future/route-definitions/route-definition';
import type { RouteMatch } from '../route-matches/route-match';
import type { RouteDefinition } from '../route-definitions/route-definition';
type RouteMatchResult = {
params?: Record<string, string | string[]>;
};

View File

@@ -1,5 +1,5 @@
import type { RouteMatch } from 'next/dist/server/future/route-matches/route-match';
import type { PagesAPIRouteDefinition } from 'next/dist/server/future/route-definitions/pages-api-route-definition';
import type { RouteMatch } from './route-match';
import type { PagesAPIRouteDefinition } from '../route-definitions/pages-api-route-definition';
export interface PagesAPIRouteMatch extends RouteMatch<PagesAPIRouteDefinition> {
}
/**

View File

@@ -1,4 +1,4 @@
import type { RouteDefinition } from 'next/dist/server/future/route-definitions/route-definition';
import type { RouteDefinition } from '../route-definitions/route-definition';
/**
* RouteMatch is the resolved match for a given request. This will contain all
* the dynamic parameters used for this route.

View File

@@ -1 +1 @@
export * from 'next/dist/server/future/route-modules/app-page/module'
export * from './module'

View File

@@ -1,18 +1,18 @@
/// <reference types="node" />
import type { IncomingMessage, ServerResponse } from 'http';
import type { AppPageRouteDefinition } from 'next/dist/server/future/route-definitions/app-page-route-definition';
import type RenderResult from 'next/dist/server/render-result';
import type { RenderOpts } from 'next/dist/server/app-render/types';
import type { NextParsedUrlQuery } from 'next/dist/server/request-meta';
import type { LoaderTree } from 'next/dist/server/lib/app-dir-module';
import { renderToHTMLOrFlight } from 'next/dist/server/app-render/app-render';
import { RouteModule, type RouteModuleOptions, type RouteModuleHandleContext } from 'next/dist/server/future/route-modules/route-module';
import * as vendoredContexts from 'next/dist/server/future/route-modules/app-page/vendored/contexts/entrypoints';
import type { AppPageRouteDefinition } from '../../route-definitions/app-page-route-definition';
import type RenderResult from '../../../render-result';
import type { RenderOpts } from '../../../app-render/types';
import type { NextParsedUrlQuery } from '../../../request-meta';
import type { LoaderTree } from '../../../lib/app-dir-module';
import { renderToHTMLOrFlight } from '../../../app-render/app-render';
import { RouteModule, type RouteModuleOptions, type RouteModuleHandleContext } from '../route-module';
import * as vendoredContexts from './vendored/contexts/entrypoints';
/**
* The AppPageModule is the type of the module exported by the bundled app page
* module.
*/
export type AppPageModule = typeof import('next/dist/build/templates/app-page');
export type AppPageModule = typeof import('../../../../build/templates/app-page');
type AppPageUserlandModule = {
/**
* The tree created in next-app-loader that holds component segments and modules

View File

@@ -1,10 +1,10 @@
export * as HeadManagerContext from 'next/dist/shared/lib/head-manager-context.shared-runtime';
export * as ServerInsertedHtml from 'next/dist/shared/lib/server-inserted-html.shared-runtime';
export * as AppRouterContext from 'next/dist/shared/lib/app-router-context.shared-runtime';
export * as HooksClientContext from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
export * as RouterContext from 'next/dist/shared/lib/router-context.shared-runtime';
export * as HtmlContext from 'next/dist/shared/lib/html-context.shared-runtime';
export * as AmpContext from 'next/dist/shared/lib/amp-context.shared-runtime';
export * as LoadableContext from 'next/dist/shared/lib/loadable-context.shared-runtime';
export * as ImageConfigContext from 'next/dist/shared/lib/image-config-context.shared-runtime';
export * as Loadable from 'next/dist/shared/lib/loadable.shared-runtime';
export * as HeadManagerContext from '../../../../../../shared/lib/head-manager-context.shared-runtime';
export * as ServerInsertedHtml from '../../../../../../shared/lib/server-inserted-html.shared-runtime';
export * as AppRouterContext from '../../../../../../shared/lib/app-router-context.shared-runtime';
export * as HooksClientContext from '../../../../../../shared/lib/hooks-client-context.shared-runtime';
export * as RouterContext from '../../../../../../shared/lib/router-context.shared-runtime';
export * as HtmlContext from '../../../../../../shared/lib/html-context.shared-runtime';
export * as AmpContext from '../../../../../../shared/lib/amp-context.shared-runtime';
export * as LoadableContext from '../../../../../../shared/lib/loadable-context.shared-runtime';
export * as ImageConfigContext from '../../../../../../shared/lib/image-config-context.shared-runtime';
export * as Loadable from '../../../../../../shared/lib/loadable.shared-runtime';

View File

@@ -1 +1 @@
export * from 'next/dist/server/future/route-modules/pages/module'
export * from './module'

View File

@@ -1,19 +1,19 @@
/// <reference types="node" />
import type { IncomingMessage, ServerResponse } from 'http';
import type { GetServerSideProps, GetStaticPaths, GetStaticProps, NextComponentType, PageConfig } from 'next/types';
import type { PagesRouteDefinition } from 'next/dist/server/future/route-definitions/pages-route-definition';
import type { NextParsedUrlQuery } from 'next/dist/server/request-meta';
import type { RenderOpts } from 'next/dist/server/render';
import type RenderResult from 'next/dist/server/render-result';
import type { AppType, DocumentType } from 'next/dist/shared/lib/utils';
import { RouteModule, type RouteModuleHandleContext, type RouteModuleOptions } from 'next/dist/server/future/route-modules/route-module';
import { renderToHTML } from 'next/dist/server/render';
import * as vendoredContexts from 'next/dist/server/future/route-modules/pages/vendored/contexts/entrypoints';
import type { GetServerSideProps, GetStaticPaths, GetStaticProps, NextComponentType, PageConfig } from '../../../../../types';
import type { PagesRouteDefinition } from '../../route-definitions/pages-route-definition';
import type { NextParsedUrlQuery } from '../../../request-meta';
import type { RenderOpts } from '../../../render';
import type RenderResult from '../../../render-result';
import type { AppType, DocumentType } from '../../../../shared/lib/utils';
import { RouteModule, type RouteModuleHandleContext, type RouteModuleOptions } from '../route-module';
import { renderToHTML } from '../../../render';
import * as vendoredContexts from './vendored/contexts/entrypoints';
/**
* The PagesModule is the type of the module exported by the bundled pages
* module.
*/
export type PagesModule = typeof import('next/dist/build/templates/pages');
export type PagesModule = typeof import('../../../../build/templates/pages');
/**
* The userland module for a page. This is the module that is exported from the
* page file that contains the page component, page config, and any page data

View File

@@ -1,10 +1,10 @@
export * as RouterContext from 'next/dist/shared/lib/router-context.shared-runtime';
export * as LoadableContext from 'next/dist/shared/lib/loadable-context.shared-runtime';
export * as Loadable from 'next/dist/shared/lib/loadable.shared-runtime';
export * as ImageConfigContext from 'next/dist/shared/lib/image-config-context.shared-runtime';
export * as HtmlContext from 'next/dist/shared/lib/html-context.shared-runtime';
export * as HooksClientContext from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
export * as HeadManagerContext from 'next/dist/shared/lib/head-manager-context.shared-runtime';
export * as AppRouterContext from 'next/dist/shared/lib/app-router-context.shared-runtime';
export * as AmpContext from 'next/dist/shared/lib/amp-context.shared-runtime';
export * as ServerInsertedHtml from 'next/dist/shared/lib/server-inserted-html.shared-runtime';
export * as RouterContext from '../../../../../../shared/lib/router-context.shared-runtime';
export * as LoadableContext from '../../../../../../shared/lib/loadable-context.shared-runtime';
export * as Loadable from '../../../../../../shared/lib/loadable.shared-runtime';
export * as ImageConfigContext from '../../../../../../shared/lib/image-config-context.shared-runtime';
export * as HtmlContext from '../../../../../../shared/lib/html-context.shared-runtime';
export * as HooksClientContext from '../../../../../../shared/lib/hooks-client-context.shared-runtime';
export * as HeadManagerContext from '../../../../../../shared/lib/head-manager-context.shared-runtime';
export * as AppRouterContext from '../../../../../../shared/lib/app-router-context.shared-runtime';
export * as AmpContext from '../../../../../../shared/lib/amp-context.shared-runtime';
export * as ServerInsertedHtml from '../../../../../../shared/lib/server-inserted-html.shared-runtime';

View File

@@ -1,4 +1,4 @@
import type { RouteDefinition } from 'next/dist/server/future/route-definitions/route-definition';
import type { RouteDefinition } from '../route-definitions/route-definition';
/**
* RouteModuleOptions is the options that are passed to the route module, other
* route modules should extend this class to add specific options for their

View File

@@ -3,10 +3,10 @@
/// <reference types="node" />
import type { IncomingMessage, ServerResponse } from 'http';
import { type UrlWithParsedQuery } from 'url';
import type { ImageConfigComplete } from 'next/dist/shared/lib/image-config';
import type { NextConfigComplete } from 'next/dist/server/config-shared';
import type { NextUrlWithParsedQuery } from 'next/dist/server/request-meta';
import type { IncrementalCacheEntry, IncrementalCacheValue } from 'next/dist/server/response-cache';
import type { ImageConfigComplete } from '../shared/lib/image-config';
import type { NextConfigComplete } from './config-shared';
import type { NextUrlWithParsedQuery } from './request-meta';
import type { IncrementalCacheEntry, IncrementalCacheValue } from './response-cache';
type XCacheHeader = 'MISS' | 'HIT' | 'STALE';
export interface ImageParamsResult {
href: string;

View File

@@ -1,4 +1,4 @@
import type { ComponentsType } from 'next/dist/build/webpack/loaders/next-app-loader';
import type { ComponentsType } from '../../build/webpack/loaders/next-app-loader';
/**
* LoaderTree is generated in next-app-loader.
*/

View File

@@ -1,7 +1,7 @@
/// <reference types="node" />
import type { IncomingMessage } from 'http';
import type { DevBundler } from 'next/dist/server/lib/router-utils/setup-dev-bundler';
import type { WorkerRequestHandler } from 'next/dist/server/lib/types';
import type { DevBundler } from './router-utils/setup-dev-bundler';
import type { WorkerRequestHandler } from './types';
/**
* The DevBundlerService provides an interface to perform tasks with the
* bundler while in development.

View File

@@ -1,7 +1,7 @@
import type { CacheFs } from 'next/dist/shared/lib/utils';
import type { PrerenderManifest } from 'next/dist/build';
import type { IncrementalCacheValue, IncrementalCacheEntry, IncrementalCache as IncrementalCacheType, IncrementalCacheKindHint } from 'next/dist/server/response-cache';
import type { DeepReadonly } from 'next/dist/shared/lib/deep-readonly';
import type { CacheFs } from '../../../shared/lib/utils';
import type { PrerenderManifest } from '../../../build';
import type { IncrementalCacheValue, IncrementalCacheEntry, IncrementalCache as IncrementalCacheType, IncrementalCacheKindHint } from '../../response-cache';
import type { DeepReadonly } from '../../../shared/lib/deep-readonly';
export interface CacheHandlerContext {
fs?: CacheFs;
dev?: boolean;

View File

@@ -1,7 +1,7 @@
import type { NextServer, RequestHandler } from 'next/dist/server/next';
import type { DevBundlerService } from 'next/dist/server/lib/dev-bundler-service';
import type { PropagateToWorkersField } from 'next/dist/server/lib/router-utils/types';
import type { Span } from 'next/dist/trace';
import type { NextServer, RequestHandler } from '../next';
import type { DevBundlerService } from './dev-bundler-service';
import type { PropagateToWorkersField } from './router-utils/types';
import type { Span } from '../../trace';
export declare function clearAllModuleContexts(): Promise<void> | undefined;
export declare function clearModuleContext(target: string): Promise<void> | undefined;
export declare function deleteAppClientCache(): void | undefined;

View File

@@ -1,9 +1,9 @@
import type { WorkerRequestHandler, WorkerUpgradeHandler } from 'next/dist/server/lib/types';
import type { NextServer } from 'next/dist/server/next';
import 'next/dist/server/node-environment';
import 'next/dist/server/require-hook';
import { type Span } from 'next/dist/trace';
export type RenderServer = Pick<typeof import('next/dist/server/lib/render-server'), 'initialize' | 'deleteCache' | 'clearModuleContext' | 'deleteAppClientCache' | 'propagateServerField'>;
import type { WorkerRequestHandler, WorkerUpgradeHandler } from './types';
import type { NextServer } from '../next';
import '../node-environment';
import '../require-hook';
import { type Span } from '../../trace';
export type RenderServer = Pick<typeof import('./render-server'), 'initialize' | 'deleteCache' | 'clearModuleContext' | 'deleteAppClientCache' | 'propagateServerField'>;
export interface LazyRenderServerInstance {
instance?: RenderServer;
}

View File

@@ -1,8 +1,8 @@
import type { ManifestRoute, PrerenderManifest } from 'next/dist/build';
import type { NextConfigComplete } from 'next/dist/server/config-shared';
import type { PatchMatcher } from 'next/dist/shared/lib/router/utils/path-match';
import type { MiddlewareRouteMatch } from 'next/dist/shared/lib/router/utils/middleware-route-matcher';
import { type Rewrite } from 'next/dist/lib/load-custom-routes';
import type { ManifestRoute, PrerenderManifest } from '../../../build';
import type { NextConfigComplete } from '../../config-shared';
import type { PatchMatcher } from '../../../shared/lib/router/utils/path-match';
import type { MiddlewareRouteMatch } from '../../../shared/lib/router/utils/middleware-route-matcher';
import { type Rewrite } from '../../../lib/load-custom-routes';
export type FsOutput = {
type: 'appFile' | 'pageFile' | 'nextImage' | 'publicFolder' | 'nextStaticFolder' | 'legacyStaticFolder' | 'devVirtualFsItem';
itemPath: string;
@@ -31,7 +31,7 @@ export declare function setupFsCheck(opts: {
timestamp: number;
}>) => void) => void;
}): Promise<{
headers: (import("next/dist/lib/load-custom-routes").Header & {
headers: (import("../../../lib/load-custom-routes").Header & {
match: PatchMatcher;
check?: boolean | undefined;
})[];
@@ -49,7 +49,7 @@ export declare function setupFsCheck(opts: {
check?: boolean | undefined;
})[];
};
redirects: (import("next/dist/lib/load-custom-routes").Redirect & {
redirects: (import("../../../lib/load-custom-routes").Redirect & {
match: PatchMatcher;
check?: boolean | undefined;
})[];

View File

@@ -1,13 +1,13 @@
/// <reference types="node" />
import type { NextConfigComplete } from 'next/dist/server/config-shared';
import type { UnwrapPromise } from 'next/dist/lib/coalesced-function';
import type { MiddlewareMatcher } from 'next/dist/build/analysis/get-page-static-info';
import type { MiddlewareRouteMatch } from 'next/dist/shared/lib/router/utils/middleware-route-matcher';
import type { PropagateToWorkersField } from 'next/dist/server/lib/router-utils/types';
import type { NextJsHotReloaderInterface } from 'next/dist/server/dev/hot-reloader-types';
import type { Telemetry } from 'next/dist/telemetry/storage';
import type { NextConfigComplete } from '../../config-shared';
import type { UnwrapPromise } from '../../../lib/coalesced-function';
import type { MiddlewareMatcher } from '../../../build/analysis/get-page-static-info';
import type { MiddlewareRouteMatch } from '../../../shared/lib/router/utils/middleware-route-matcher';
import type { PropagateToWorkersField } from './types';
import type { NextJsHotReloaderInterface } from '../../dev/hot-reloader-types';
import type { Telemetry } from '../../../telemetry/storage';
import type { IncomingMessage, ServerResponse } from 'http';
import type { LazyRenderServerInstance } from 'next/dist/server/lib/router-server';
import type { LazyRenderServerInstance } from '../router-server';
export type SetupOpts = {
renderServer: LazyRenderServerInstance;
dir: string;
@@ -16,7 +16,7 @@ export type SetupOpts = {
pagesDir?: string;
telemetry: Telemetry;
isCustomServer?: boolean;
fsChecker: UnwrapPromise<ReturnType<typeof import('next/dist/server/lib/router-utils/filesystem').setupFsCheck>>;
fsChecker: UnwrapPromise<ReturnType<typeof import('./filesystem').setupFsCheck>>;
nextConfig: NextConfigComplete;
port: number;
};
@@ -30,7 +30,7 @@ export type ServerFields = {
matchers?: MiddlewareMatcher[];
} | undefined;
hasAppNotFound?: boolean;
interceptionRoutes?: ReturnType<typeof import('next/dist/server/lib/router-utils/filesystem').buildCustomRoute>[];
interceptionRoutes?: ReturnType<typeof import('./filesystem').buildCustomRoute>[];
};
export declare function propagateServerField(opts: SetupOpts, field: PropagateToWorkersField, args: any): Promise<void>;
export declare function setupDevBundler(opts: SetupOpts): Promise<{

View File

@@ -1,9 +1,9 @@
import type { AppType, DocumentType, NextComponentType } from 'next/dist/shared/lib/utils';
import type { ClientReferenceManifest } from 'next/dist/build/webpack/plugins/flight-manifest-plugin';
import type { AppType, DocumentType, NextComponentType } from '../shared/lib/utils';
import type { ClientReferenceManifest } from '../build/webpack/plugins/flight-manifest-plugin';
import type { PageConfig, GetStaticPaths, GetServerSideProps, GetStaticProps } from 'next/types';
import type { RouteModule } from 'next/dist/server/future/route-modules/route-module';
import type { BuildManifest } from 'next/dist/server/get-page-files';
import type { DeepReadonly } from 'next/dist/shared/lib/deep-readonly';
import type { RouteModule } from './future/route-modules/route-module';
import type { BuildManifest } from './get-page-files';
import type { DeepReadonly } from '../shared/lib/deep-readonly';
export type ManifestItem = {
id: number | string;
files: string[];

View File

@@ -2,34 +2,34 @@
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import 'next/dist/server/node-environment';
import 'next/dist/server/require-hook';
import 'next/dist/server/node-polyfill-crypto';
import type { CacheFs } from 'next/dist/shared/lib/utils';
import type { MiddlewareManifest } from 'next/dist/build/webpack/plugins/middleware-plugin';
import type RenderResult from 'next/dist/server/render-result';
import type { FetchEventResult } from 'next/dist/server/web/types';
import type { PrerenderManifest } from 'next/dist/build';
import type { BaseNextRequest, BaseNextResponse } from 'next/dist/server/base-http';
import type { PagesManifest } from 'next/dist/build/webpack/plugins/pages-manifest-plugin';
import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from 'next/dist/server/request-meta';
import type { Params } from 'next/dist/shared/lib/router/utils/route-matcher';
import type { RouteMatch } from 'next/dist/server/future/route-matches/route-match';
import './node-environment';
import './require-hook';
import './node-polyfill-crypto';
import type { CacheFs } from '../shared/lib/utils';
import type { MiddlewareManifest } from '../build/webpack/plugins/middleware-plugin';
import type RenderResult from './render-result';
import type { FetchEventResult } from './web/types';
import type { PrerenderManifest } from '../build';
import type { BaseNextRequest, BaseNextResponse } from './base-http';
import type { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin';
import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from './request-meta';
import type { Params } from '../shared/lib/router/utils/route-matcher';
import type { RouteMatch } from './future/route-matches/route-match';
import type { IncomingMessage, ServerResponse } from 'http';
import type { UrlWithParsedQuery } from 'url';
import type { ParsedUrlQuery } from 'querystring';
import type { ParsedUrl } from 'next/dist/shared/lib/router/utils/parse-url';
import type { Revalidate, SwrDelta } from 'next/dist/server/lib/revalidate';
import { NodeNextRequest, NodeNextResponse } from 'next/dist/server/base-http/node';
import type { Options, FindComponentsResult, MiddlewareRoutingItem, RequestContext, NormalizedRouteManifest, LoadedRenderOpts, RouteHandler, NextEnabledDirectories } from 'next/dist/server/base-server';
import BaseServer from 'next/dist/server/base-server';
import type { LoadComponentsReturnType } from 'next/dist/server/load-components';
import type { FontManifest } from 'next/dist/server/font-utils';
import ResponseCache from 'next/dist/server/response-cache';
import { IncrementalCache } from 'next/dist/server/lib/incremental-cache';
import type { PagesAPIRouteMatch } from 'next/dist/server/future/route-matches/pages-api-route-match';
import type { NextFontManifest } from 'next/dist/build/webpack/plugins/next-font-manifest-plugin';
export * from 'next/dist/server/base-server';
import type { ParsedUrl } from '../shared/lib/router/utils/parse-url';
import type { Revalidate, SwrDelta } from './lib/revalidate';
import { NodeNextRequest, NodeNextResponse } from './base-http/node';
import type { Options, FindComponentsResult, MiddlewareRoutingItem, RequestContext, NormalizedRouteManifest, LoadedRenderOpts, RouteHandler, NextEnabledDirectories } from './base-server';
import BaseServer from './base-server';
import type { LoadComponentsReturnType } from './load-components';
import type { FontManifest } from './font-utils';
import ResponseCache from './response-cache';
import { IncrementalCache } from './lib/incremental-cache';
import type { PagesAPIRouteMatch } from './future/route-matches/pages-api-route-match';
import type { NextFontManifest } from '../build/webpack/plugins/next-font-manifest-plugin';
export * from './base-server';
export interface NodeRequestHandler {
(req: IncomingMessage | BaseNextRequest, res: ServerResponse | BaseNextResponse, parsedUrl?: NextUrlWithParsedQuery | undefined): Promise<void> | void;
}
@@ -39,7 +39,7 @@ export default class NextNodeServer extends BaseServer {
private imageResponseCache?;
protected renderWorkersPromises?: Promise<void>;
protected dynamicRoutes?: {
match: import('next/dist/shared/lib/router/utils/route-matcher').RouteMatchFn;
match: import('../shared/lib/router/utils/route-matcher').RouteMatchFn;
page: string;
re: RegExp;
}[];
@@ -77,7 +77,7 @@ export default class NextNodeServer extends BaseServer {
protected runApi(req: BaseNextRequest | NodeNextRequest, res: BaseNextResponse | NodeNextResponse, query: ParsedUrlQuery, match: PagesAPIRouteMatch): Promise<boolean>;
protected renderHTML(req: NodeNextRequest, res: NodeNextResponse, pathname: string, query: NextParsedUrlQuery, renderOpts: LoadedRenderOpts): Promise<RenderResult>;
private renderHTMLImpl;
protected imageOptimizer(req: NodeNextRequest, res: NodeNextResponse, paramsResult: import('next/dist/server/image-optimizer').ImageParamsResult): Promise<{
protected imageOptimizer(req: NodeNextRequest, res: NodeNextResponse, paramsResult: import('./image-optimizer').ImageParamsResult): Promise<{
buffer: Buffer;
contentType: string;
maxAge: number;
@@ -85,7 +85,7 @@ export default class NextNodeServer extends BaseServer {
protected getPagePath(pathname: string, locales?: string[]): string;
protected renderPageComponent(ctx: RequestContext, bubbleNoFallback: boolean): Promise<false | {
type: "html" | "json" | "rsc";
body: RenderResult<import("next/dist/server/render-result").RenderResultMetadata>;
body: RenderResult<import("./render-result").RenderResultMetadata>;
revalidate?: Revalidate | undefined;
} | null>;
protected findPageComponents({ page, query, params, isAppPath, url, }: {
@@ -138,7 +138,7 @@ export default class NextNodeServer extends BaseServer {
renderToHTML(req: BaseNextRequest | IncomingMessage, res: BaseNextResponse | ServerResponse, pathname: string, query?: ParsedUrlQuery): Promise<string | null>;
protected renderErrorToResponseImpl(ctx: RequestContext, err: Error | null): Promise<{
type: "html" | "json" | "rsc";
body: RenderResult<import("next/dist/server/render-result").RenderResultMetadata>;
body: RenderResult<import("./render-result").RenderResultMetadata>;
revalidate?: Revalidate | undefined;
} | null>;
renderError(err: Error | null, req: BaseNextRequest | IncomingMessage, res: BaseNextResponse | ServerResponse, pathname: string, query?: NextParsedUrlQuery, setHeaders?: boolean): Promise<void>;

View File

@@ -1,12 +1,12 @@
/// <reference types="node" />
import type { Options as DevServerOptions } from 'next/dist/server/dev/next-dev-server';
import type { Options as ServerOptions } from 'next/dist/server/next-server';
import type { NextConfigComplete } from 'next/dist/server/config-shared';
import type { Options as DevServerOptions } from './dev/next-dev-server';
import type { Options as ServerOptions } from './next-server';
import type { NextConfigComplete } from './config-shared';
import type { IncomingMessage, ServerResponse } from 'http';
import type { NextUrlWithParsedQuery } from 'next/dist/server/request-meta';
import 'next/dist/server/require-hook';
import 'next/dist/server/node-polyfill-crypto';
import type { default as Server } from 'next/dist/server/next-server';
import type { NextUrlWithParsedQuery } from './request-meta';
import './require-hook';
import './node-polyfill-crypto';
import type { default as Server } from './next-server';
export type NextServerOptions = Omit<ServerOptions | DevServerOptions, 'conf'> & Partial<Pick<ServerOptions | DevServerOptions, 'conf'>> & {
preloadedConfig?: NextConfigComplete;
internal_setStandaloneConfig?: boolean;

View File

@@ -1,7 +1,7 @@
/// <reference types="node" />
import type { OutgoingHttpHeaders, ServerResponse } from 'http';
import type { Revalidate } from 'next/dist/server/lib/revalidate';
import type { FetchMetrics } from 'next/dist/server/base-http';
import type { Revalidate } from './lib/revalidate';
import type { FetchMetrics } from './base-http';
type ContentTypeOption = string | undefined;
export type AppPageRenderResultMetadata = {
flightData?: string;

View File

@@ -2,21 +2,21 @@
/// <reference types="node" />
import type { IncomingMessage, ServerResponse } from 'http';
import type { ParsedUrlQuery } from 'querystring';
import type { DomainLocale } from 'next/dist/server/config';
import type { AppType, DocumentType } from 'next/dist/shared/lib/utils';
import type { ImageConfigComplete } from 'next/dist/shared/lib/image-config';
import { type __ApiPreviewProps } from 'next/dist/server/api-utils';
import type { FontManifest, FontConfig } from 'next/dist/server/font-utils';
import type { LoadComponentsReturnType } from 'next/dist/server/load-components';
import type { DomainLocale } from './config';
import type { AppType, DocumentType } from '../shared/lib/utils';
import type { ImageConfigComplete } from '../shared/lib/image-config';
import { type __ApiPreviewProps } from './api-utils';
import type { FontManifest, FontConfig } from './font-utils';
import type { LoadComponentsReturnType } from './load-components';
import type { ServerRuntime, SizeLimit } from 'next/types';
import type { ClientReferenceManifest } from 'next/dist/build/webpack/plugins/flight-manifest-plugin';
import type { NextFontManifest } from 'next/dist/build/webpack/plugins/next-font-manifest-plugin';
import type { PagesModule } from 'next/dist/server/future/route-modules/pages/module';
import type { NextParsedUrlQuery } from 'next/dist/server/request-meta';
import type { SwrDelta } from 'next/dist/server/lib/revalidate';
import type { ClientReferenceManifest } from '../build/webpack/plugins/flight-manifest-plugin';
import type { NextFontManifest } from '../build/webpack/plugins/next-font-manifest-plugin';
import type { PagesModule } from './future/route-modules/pages/module';
import type { NextParsedUrlQuery } from './request-meta';
import type { SwrDelta } from './lib/revalidate';
import React from 'react';
import RenderResult from 'next/dist/server/render-result';
import type { DeepReadonly } from 'next/dist/shared/lib/deep-readonly';
import RenderResult from './render-result';
import type { DeepReadonly } from '../shared/lib/deep-readonly';
export type RenderOptsPartial = {
buildId: string;
canonicalBase: string;

View File

@@ -4,10 +4,10 @@
import type { IncomingMessage } from 'http';
import type { ParsedUrlQuery } from 'querystring';
import type { UrlWithParsedQuery } from 'url';
import type { BaseNextRequest } from 'next/dist/server/base-http';
import type { CloneableBody } from 'next/dist/server/body-streams';
import type { RouteMatch } from 'next/dist/server/future/route-matches/route-match';
import type { NEXT_RSC_UNION_QUERY } from 'next/dist/client/components/app-router-headers';
import type { BaseNextRequest } from './base-http';
import type { CloneableBody } from './body-streams';
import type { RouteMatch } from './future/route-matches/route-match';
import type { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers';
export declare const NEXT_REQUEST_META: unique symbol;
export type NextIncomingMessage = (BaseNextRequest | IncomingMessage) & {
[NEXT_REQUEST_META]?: RequestMeta;

View File

@@ -1,6 +1,6 @@
import type { IncrementalCache, ResponseCacheEntry, ResponseGenerator, ResponseCacheBase } from 'next/dist/server/response-cache/types';
import { RouteKind } from 'next/dist/server/future/route-kind';
export * from 'next/dist/server/response-cache/types';
import type { IncrementalCache, ResponseCacheEntry, ResponseGenerator, ResponseCacheBase } from './types';
import { RouteKind } from '../future/route-kind';
export * from './types';
export default class ResponseCache implements ResponseCacheBase {
private readonly batcher;
private previousCacheItem?;

View File

@@ -1,9 +1,9 @@
/// <reference types="node" />
/// <reference types="node" />
import type { OutgoingHttpHeaders } from 'http';
import type RenderResult from 'next/dist/server/render-result';
import type { Revalidate } from 'next/dist/server/lib/revalidate';
import type { RouteKind } from 'next/dist/server/future/route-kind';
import type RenderResult from '../render-result';
import type { Revalidate } from '../lib/revalidate';
import type { RouteKind } from '../../server/future/route-kind';
export interface ResponseCacheBase {
get(key: string | null, responseGenerator: ResponseGenerator, context: {
isOnDemandRevalidate?: boolean;

View File

@@ -1,7 +1,7 @@
/// <reference types="node" />
import type { OutgoingHttpHeaders } from 'http';
import type { DomainLocale, I18NConfig } from 'next/dist/server/config-shared';
import type { I18NProvider } from 'next/dist/server/future/helpers/i18n-provider';
import type { DomainLocale, I18NConfig } from '../config-shared';
import type { I18NProvider } from '../future/helpers/i18n-provider';
interface Options {
base?: string | URL;
headers?: OutgoingHttpHeaders;

View File

@@ -1,5 +1,5 @@
import type { RequestCookies } from 'next/dist/server/web/spec-extension/cookies';
import { ResponseCookies } from 'next/dist/server/web/spec-extension/cookies';
import type { RequestCookies } from '../cookies';
import { ResponseCookies } from '../cookies';
export type ReadonlyRequestCookies = Omit<RequestCookies, 'set' | 'clear' | 'delete'> & Pick<ResponseCookies, 'set' | 'delete'>;
export declare class RequestCookiesAdapter {
static seal(cookies: RequestCookies): ReadonlyRequestCookies;

View File

@@ -1,4 +1,4 @@
import type { NextRequest } from 'next/dist/server/web/spec-extension/request';
import type { NextRequest } from './request';
declare const responseSymbol: unique symbol;
declare const passThroughSymbol: unique symbol;
export declare const waitUntilSymbol: unique symbol;

View File

@@ -1,7 +1,7 @@
import type { I18NConfig } from 'next/dist/server/config-shared';
import type { RequestData } from 'next/dist/server/web/types';
import { NextURL } from 'next/dist/server/web/next-url';
import { RequestCookies } from 'next/dist/server/web/spec-extension/cookies';
import type { I18NConfig } from '../../config-shared';
import type { RequestData } from '../types';
import { NextURL } from '../next-url';
import { RequestCookies } from './cookies';
export declare const INTERNALS: unique symbol;
/**
* This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods.

View File

@@ -1,6 +1,6 @@
import type { I18NConfig } from 'next/dist/server/config-shared';
import { NextURL } from 'next/dist/server/web/next-url';
import { ResponseCookies } from 'next/dist/server/web/spec-extension/cookies';
import type { I18NConfig } from '../../config-shared';
import { NextURL } from '../next-url';
import { ResponseCookies } from './cookies';
declare const INTERNALS: unique symbol;
/**
* This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods.

View File

@@ -1,12 +1,12 @@
/// <reference types="node" />
import type { I18NConfig } from 'next/dist/server/config-shared';
import type { NextRequest } from 'next/dist/server/web/spec-extension/request';
import type { NextFetchEvent } from 'next/dist/server/web/spec-extension/fetch-event';
import type { NextResponse } from 'next/dist/server/web/spec-extension/response';
import type { CloneableBody } from 'next/dist/server/body-streams';
import type { I18NConfig } from '../config-shared';
import type { NextRequest } from './spec-extension/request';
import type { NextFetchEvent } from './spec-extension/fetch-event';
import type { NextResponse } from './spec-extension/response';
import type { CloneableBody } from '../body-streams';
import type { OutgoingHttpHeaders } from 'http';
import type { FetchMetrics } from 'next/dist/server/base-http';
export type { MiddlewareConfig } from 'next/dist/build/analysis/get-page-static-info';
import type { FetchMetrics } from '../base-http';
export type { MiddlewareConfig } from '../../build/analysis/get-page-static-info';
export interface RequestData {
geo?: {
city?: string;