astro-ghostcms/.pnpm-store/v3/files/6a/e90ad5e50b9d500a438f3f1d4bd...

35 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
import type { RuntimeMode, SSRLoadedRenderer } from '../../@types/astro.js';
import type { Logger } from '../logger/core.js';
import type { RouteCache } from './route-cache.js';
/**
* An environment represents the static parts of rendering that do not change
* between requests. These are mostly known when the server first starts up and do not change.
* Thus, they can be created once and passed through to renderPage on each request.
*/
export interface Environment {
/**
* Used to provide better error messages for `Astro.clientAddress`
*/
adapterName?: string;
/** logging options */
logger: Logger;
/** "development" or "production" */
mode: RuntimeMode;
compressHTML: boolean;
renderers: SSRLoadedRenderer[];
clientDirectives: Map<string, string>;
resolve: (s: string) => Promise<string>;
routeCache: RouteCache;
/**
* Used for `Astro.site`
*/
site?: string;
/**
* Value of Astro config's `output` option, true if "server" or "hybrid"
*/
ssr: boolean;
streaming: boolean;
}
export type CreateEnvironmentArgs = Environment;
export declare function createEnvironment(options: CreateEnvironmentArgs): Environment;