@aziontech/opennextjs-azion
Version:
Azion builder for Next.js apps
44 lines (43 loc) • 1.54 kB
TypeScript
/**
* This code was originally copied and modified from the @opennextjs/cloudflare repository.
* Significant changes have been made to adapt it for use with Azion.
*/
import { BaseOverride, LazyLoadedOverride, OpenNextConfig, type RoutePreloadingBehavior } from "@opennextjs/aws/types/open-next";
import type { IncrementalCache, Queue, TagCache, Wrapper } from "@opennextjs/aws/types/overrides";
export type Override<T extends BaseOverride> = "dummy" | T | LazyLoadedOverride<T>;
/**
* Azion specific overrides.
*
* See the [Caching documentation](https://opennext.js.org/azion/caching))
*/
export type AzionOverrides = {
/**
* Sets the incremental cache implementation.
*/
incrementalCache?: Override<IncrementalCache>;
/**
* Sets the tag cache implementation.
*/
tagCache?: Override<TagCache>;
/**
* Sets the revalidation queue implementation
*/
queue?: "direct" | Override<Queue>;
/**
* Sets the wrapper implementation.
*/
wrapper?: Override<Wrapper>;
/**
* Route preloading behavior.
* Using a value other than "none" can result in higher CPU usage on cold starts.
* @default "none"
*/
routePreloadingBehavior?: RoutePreloadingBehavior;
};
/**
* Defines the OpenNext configuration that targets the Azion adapter
*
* @param config options that enabled you to configure the application's behavior
* @returns the OpenNext configuration object
*/
export declare function defineAzionConfig(config?: AzionOverrides): OpenNextConfig;