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>
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
import type { I18NProvider } from '../../../../server/lib/i18n-provider';
|
|
export interface NextPathnameInfo {
|
|
/**
|
|
* The base path in case the pathname included it.
|
|
*/
|
|
basePath?: string;
|
|
/**
|
|
* The buildId for when the parsed URL is a data URL. Parsing it can be
|
|
* disabled with the `parseData` option.
|
|
*/
|
|
buildId?: string;
|
|
/**
|
|
* If there was a locale in the pathname, this will hold its value.
|
|
*/
|
|
locale?: string;
|
|
/**
|
|
* The processed pathname without a base path, locale, or data URL elements
|
|
* when parsing it is enabled.
|
|
*/
|
|
pathname: string;
|
|
/**
|
|
* A boolean telling if the pathname had a trailingSlash. This can be only
|
|
* true if trailingSlash is enabled.
|
|
*/
|
|
trailingSlash?: boolean;
|
|
}
|
|
interface Options {
|
|
/**
|
|
* When passed to true, this function will also parse Nextjs data URLs.
|
|
*/
|
|
parseData?: boolean;
|
|
/**
|
|
* A partial of the Next.js configuration to parse the URL.
|
|
*/
|
|
nextConfig?: {
|
|
basePath?: string;
|
|
i18n?: {
|
|
locales?: readonly string[];
|
|
} | null;
|
|
trailingSlash?: boolean;
|
|
};
|
|
/**
|
|
* If provided, this normalizer will be used to detect the locale instead of
|
|
* the default locale detection.
|
|
*/
|
|
i18nProvider?: I18NProvider;
|
|
}
|
|
export declare function getNextPathnameInfo(pathname: string, options: Options): NextPathnameInfo;
|
|
export {};
|