Home / Type/ BaseIntegrationHooks Type — astro Architecture

BaseIntegrationHooks Type — astro Architecture

Architecture documentation for the BaseIntegrationHooks type/interface in integrations.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  9e1633c5_8d92_3fa4_5e65_da7b1bf4d8f9["BaseIntegrationHooks"]
  5a61a076_c3db_01bc_0201_03ec73ca05bb["integrations.ts"]
  9e1633c5_8d92_3fa4_5e65_da7b1bf4d8f9 -->|defined in| 5a61a076_c3db_01bc_0201_03ec73ca05bb
  style 9e1633c5_8d92_3fa4_5e65_da7b1bf4d8f9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/types/public/integrations.ts lines 254–328

export interface BaseIntegrationHooks {
	'astro:config:setup': (options: {
		config: AstroConfig;
		command: 'dev' | 'build' | 'preview' | 'sync';
		isRestart: boolean;
		updateConfig: (newConfig: DeepPartial<AstroConfig>) => AstroConfig;
		addRenderer: (renderer: AstroRenderer) => void;
		addWatchFile: (path: URL | string) => void;
		injectScript: (stage: InjectedScriptStage, content: string) => void;
		injectRoute: (injectRoute: InjectedRoute) => void;
		addClientDirective: (directive: ClientDirectiveConfig) => void;
		addDevToolbarApp: (entrypoint: DevToolbarAppEntry) => void;
		addMiddleware: (mid: AstroIntegrationMiddleware) => void;
		createCodegenDir: () => URL;
		logger: AstroIntegrationLogger;
	}) => void | Promise<void>;
	'astro:config:done': (options: {
		config: AstroConfig;
		setAdapter: (adapter: AstroAdapter) => void;
		injectTypes: (injectedType: InjectedType) => URL;
		logger: AstroIntegrationLogger;
		buildOutput: 'static' | 'server';
	}) => void | Promise<void>;
	'astro:server:setup': (options: {
		server: ViteDevServer;
		logger: AstroIntegrationLogger;
		toolbar: ReturnType<typeof getToolbarServerCommunicationHelpers>;
		refreshContent?: (options: RefreshContentOptions) => Promise<void>;
	}) => void | Promise<void>;
	'astro:server:start': (options: {
		address: AddressInfo;
		logger: AstroIntegrationLogger;
	}) => void | Promise<void>;
	'astro:server:done': (options: { logger: AstroIntegrationLogger }) => void | Promise<void>;
	'astro:build:ssr': (options: {
		manifest: SerializedSSRManifest;
		/**
		 * File path of the emitted middleware
		 */
		middlewareEntryPoint: URL | undefined;
		logger: AstroIntegrationLogger;
	}) => void | Promise<void>;
	'astro:build:start': (options: {
		logger: AstroIntegrationLogger;
		setPrerenderer: (
			prerenderer: AstroPrerenderer | ((defaultPrerenderer: AstroPrerenderer) => AstroPrerenderer),
		) => void;
	}) => void | Promise<void>;
	'astro:build:setup': (options: {
		vite: ViteInlineConfig;
		pages: Map<string, PageBuildData>;
		target: 'client' | 'server';
		updateConfig: (newConfig: ViteInlineConfig) => void;
		logger: AstroIntegrationLogger;
	}) => void | Promise<void>;
	'astro:build:generated': (options: {
		dir: URL;
		logger: AstroIntegrationLogger;
		routeToHeaders: RouteToHeaders;
	}) => void | Promise<void>;
	'astro:build:done': (options: {
		pages: { pathname: string }[];
		dir: URL;
		assets: Map<string, URL[]>;
		logger: AstroIntegrationLogger;
	}) => void | Promise<void>;
	'astro:route:setup': (options: {
		route: RouteOptions;
		logger: AstroIntegrationLogger;
	}) => void | Promise<void>;
	'astro:routes:resolved': (options: {
		routes: IntegrationResolvedRoute[];
		logger: AstroIntegrationLogger;
	}) => void | Promise<void>;
}

Frequently Asked Questions

What is the BaseIntegrationHooks type?
BaseIntegrationHooks is a type/interface in the astro codebase, defined in packages/astro/src/types/public/integrations.ts.
Where is BaseIntegrationHooks defined?
BaseIntegrationHooks is defined in packages/astro/src/types/public/integrations.ts at line 254.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free