full site update
This commit is contained in:
25
node_modules/astro/dist/core/render-context.d.ts
generated
vendored
25
node_modules/astro/dist/core/render-context.d.ts
generated
vendored
@@ -1,7 +1,12 @@
|
||||
import type { APIContext, AstroGlobal, AstroGlobalPartial, ComponentInstance, MiddlewareHandler, Props, RouteData, SSRResult } from '../@types/astro.js';
|
||||
import type { ActionAPIContext } from '../actions/runtime/utils.js';
|
||||
import type { ComponentInstance } from '../types/astro.js';
|
||||
import type { MiddlewareHandler, Props } from '../types/public/common.js';
|
||||
import type { APIContext, AstroGlobal, AstroGlobalPartial } from '../types/public/context.js';
|
||||
import type { RouteData, SSRResult } from '../types/public/internal.js';
|
||||
import type { SSRActions } from './app/types.js';
|
||||
import { AstroCookies } from './cookies/index.js';
|
||||
import { type Pipeline } from './render/index.js';
|
||||
import { AstroSession } from './session.js';
|
||||
export declare const apiContextRoutesSymbol: unique symbol;
|
||||
/**
|
||||
* Each request is rendered using a `RenderContext`.
|
||||
@@ -12,15 +17,18 @@ export declare class RenderContext {
|
||||
readonly pipeline: Pipeline;
|
||||
locals: App.Locals;
|
||||
readonly middleware: MiddlewareHandler;
|
||||
readonly actions: SSRActions;
|
||||
pathname: string;
|
||||
request: Request;
|
||||
routeData: RouteData;
|
||||
status: number;
|
||||
clientAddress: string | undefined;
|
||||
protected cookies: AstroCookies;
|
||||
params: import("../@types/astro.js").Params;
|
||||
params: import("../types/public/common.js").Params;
|
||||
protected url: URL;
|
||||
props: Props;
|
||||
partial: undefined | boolean;
|
||||
session: AstroSession | undefined;
|
||||
private constructor();
|
||||
/**
|
||||
* A flag that tells the render content if the rewriting was triggered
|
||||
@@ -30,7 +38,8 @@ export declare class RenderContext {
|
||||
* A safety net in case of loops
|
||||
*/
|
||||
counter: number;
|
||||
static create({ locals, middleware, pathname, pipeline, request, routeData, status, props, partial, }: Pick<RenderContext, 'pathname' | 'pipeline' | 'request' | 'routeData'> & Partial<Pick<RenderContext, 'locals' | 'middleware' | 'status' | 'props' | 'partial'>>): Promise<RenderContext>;
|
||||
result: SSRResult | undefined;
|
||||
static create({ locals, middleware, pathname, pipeline, request, routeData, clientAddress, status, props, partial, actions, }: Pick<RenderContext, 'pathname' | 'pipeline' | 'request' | 'routeData' | 'clientAddress'> & Partial<Pick<RenderContext, 'locals' | 'middleware' | 'status' | 'props' | 'partial' | 'actions'>>): Promise<RenderContext>;
|
||||
/**
|
||||
* The main function of the RenderContext.
|
||||
*
|
||||
@@ -43,9 +52,9 @@ export declare class RenderContext {
|
||||
* - fallback
|
||||
*/
|
||||
render(componentInstance: ComponentInstance | undefined, slots?: Record<string, any>): Promise<Response>;
|
||||
createAPIContext(props: APIContext['props'], isPrerendered: boolean): APIContext;
|
||||
createAPIContext(props: APIContext['props'], context: ActionAPIContext): APIContext;
|
||||
createActionAPIContext(): ActionAPIContext;
|
||||
createResult(mod: ComponentInstance): Promise<SSRResult>;
|
||||
createResult(mod: ComponentInstance, ctx: ActionAPIContext): Promise<SSRResult>;
|
||||
/**
|
||||
* The Astro global is sourced in 3 different phases:
|
||||
* - **Static**: `.generator` and `.glob` is printed by the compiler, instantiated once per process per astro file
|
||||
@@ -54,9 +63,9 @@ export declare class RenderContext {
|
||||
*
|
||||
* The page level partial is used as the prototype of the user-visible `Astro` global object, which is instantiated once per use of a component.
|
||||
*/
|
||||
createAstro(result: SSRResult, astroStaticPartial: AstroGlobalPartial, props: Record<string, any>, slotValues: Record<string, any> | null): AstroGlobal;
|
||||
createAstroPagePartial(result: SSRResult, astroStaticPartial: AstroGlobalPartial): Omit<AstroGlobal, 'props' | 'self' | 'slots'>;
|
||||
clientAddress(): string;
|
||||
createAstro(result: SSRResult, astroStaticPartial: AstroGlobalPartial, props: Record<string, any>, slotValues: Record<string, any> | null, apiContext: ActionAPIContext): AstroGlobal;
|
||||
createAstroPagePartial(result: SSRResult, astroStaticPartial: AstroGlobalPartial, apiContext: ActionAPIContext): Omit<AstroGlobal, 'props' | 'self' | 'slots'>;
|
||||
getClientAddress(): string;
|
||||
computeCurrentLocale(): string | undefined;
|
||||
computePreferredLocale(): string | undefined;
|
||||
computePreferredLocaleList(): string[] | undefined;
|
||||
|
Reference in New Issue
Block a user