Some checks failed
CI / go (push) Waiting to run
CI / docker (push) Waiting to run
CI / lint-go (push) Waiting to run
CI / lint-docs (push) Waiting to run
CI / check-paperclip (push) Waiting to run
Deploy static site / Deploy to GitHub Pages (push) Has been cancelled
Deploy static site / Deploy via Docker to hatch.surf (push) Has been cancelled
Resolved conflicts by taking GitHub versions for: - .dockerignore, .gitignore, Dockerfile, README.md, docker-compose.yml Kept deploy.sh updated to: - Pull from GitHub (primary source) - Push to Gitea (push-mirror) - Build from site/ directory (GitHub structure) Co-Authored-By: Paperclip <noreply@paperclip.ing>
84 lines
2.4 KiB
TypeScript
84 lines
2.4 KiB
TypeScript
import type { webpack } from 'next/dist/compiled/webpack/webpack';
|
|
import type { ProxyConfig } from '../../../analysis/get-page-static-info';
|
|
import { RouteKind } from '../../../../server/route-kind';
|
|
import type { MappedPages } from '../../../build-context';
|
|
type RouteLoaderOptionsPagesAPIInput = {
|
|
kind: RouteKind.PAGES_API;
|
|
page: string;
|
|
preferredRegion: string | string[] | undefined;
|
|
absolutePagePath: string;
|
|
middlewareConfig: ProxyConfig;
|
|
};
|
|
type RouteLoaderOptionsPagesInput = {
|
|
kind: RouteKind.PAGES;
|
|
page: string;
|
|
pages: MappedPages;
|
|
preferredRegion: string | string[] | undefined;
|
|
absolutePagePath: string;
|
|
middlewareConfig: ProxyConfig;
|
|
};
|
|
type RouteLoaderOptionsInput = RouteLoaderOptionsPagesInput | RouteLoaderOptionsPagesAPIInput;
|
|
type RouteLoaderPagesAPIOptions = {
|
|
kind: RouteKind.PAGES_API;
|
|
/**
|
|
* The page name for this particular route.
|
|
*/
|
|
page: string;
|
|
/**
|
|
* The preferred region for this route.
|
|
*/
|
|
preferredRegion: string | string[] | undefined;
|
|
/**
|
|
* The absolute path to the userland page file.
|
|
*/
|
|
absolutePagePath: string;
|
|
/**
|
|
* The middleware config for this route.
|
|
*/
|
|
middlewareConfigBase64: string;
|
|
};
|
|
type RouteLoaderPagesOptions = {
|
|
kind: RouteKind.PAGES;
|
|
/**
|
|
* The page name for this particular route.
|
|
*/
|
|
page: string;
|
|
/**
|
|
* The preferred region for this route.
|
|
*/
|
|
preferredRegion: string | string[] | undefined;
|
|
/**
|
|
* The absolute path to the userland page file.
|
|
*/
|
|
absolutePagePath: string;
|
|
/**
|
|
* The absolute paths to the app path file.
|
|
*/
|
|
absoluteAppPath: string;
|
|
/**
|
|
* The absolute paths to the document path file.
|
|
*/
|
|
absoluteDocumentPath: string;
|
|
/**
|
|
* The middleware config for this route.
|
|
*/
|
|
middlewareConfigBase64: string;
|
|
};
|
|
/**
|
|
* The options for the route loader.
|
|
*/
|
|
type RouteLoaderOptions = RouteLoaderPagesOptions | RouteLoaderPagesAPIOptions;
|
|
/**
|
|
* Returns the loader entry for a given page.
|
|
*
|
|
* @param options the options to create the loader entry
|
|
* @returns the encoded loader entry
|
|
*/
|
|
export declare function getRouteLoaderEntry(options: RouteLoaderOptionsInput): string;
|
|
/**
|
|
* Handles the `next-route-loader` options.
|
|
* @returns the loader definition function
|
|
*/
|
|
declare const loader: webpack.LoaderDefinitionFunction<RouteLoaderOptions>;
|
|
export default loader;
|