Repository: withastro/astro
File: packages/astro/src/types/public/integrations.ts (TypeScript)

Code before:
	 */
	staticHeaders?: boolean;
}

/**
 * @internal
 * Configuration for Astro's client-side code from adapters.
 * This is used internally to inject adapter-specific behavior into client code.
 */
export interface AstroAdapterClientConfig {
	/**
	 * Headers to inject into Astro's internal fetch calls (Actions, View Transitions, Server Islands, Prefetch).
	 * Can be an object of headers or a function that returns headers.
	 */
	internalFetchHeaders?: Record<string, string> | (() => Record<string, string>);
	/**
	 * Query parameters to append to all asset URLs (images, stylesheets, scripts, etc.).
	 * Useful for adapters that need to track deployment versions or other metadata.
	 */
	assetQueryParams?: URLSearchParams;
}

interface AdapterLegacyDynamicProperties {
	/**
	 * Determines how the adapter's entrypoint is handled during the build.
	 * - `'self'`: The adapter defines its own entrypoint and provides either serverEntrypoint or rollupOptions.input
	 * - `'explicit'`: Uses the virtual module entrypoint with dynamic exports
	 * @default 'explicit'
	 * @deprecated This will be removed in Astro 7 and `'auto'` will become the default
	 */
	entrypointResolution?: 'explicit';
	serverEntrypoint?: string | URL;
	exports?: string[];
	args?: any;
}

interface AdapterSelfProperties {
	/**
	 * Determines how the adapter's entrypoint is handled during the build.
	 * - `'self'`: The adapter defines its own entrypoint and provides either serverEntrypoint or rollupOptions.input
	 * - `'explicit'`: Uses the virtual module entrypoint with dynamic exports
	 * @default 'explicit'
	 */
	entrypointResolution: 'auto';
}

export type AstroAdapter = {
	name: string;
	previewEntrypoint?: string | URL;
	adapterFeatures?: AstroAdapterFeatures;
	/**

Review comment (suggestion):
```suggestion
	 * - `'auto'`: The adapter defines its own entrypoint and provides either serverEntrypoint or rollupOptions.input
```

Code after:
	 */
	staticHeaders?: boolean;
}

/**
 * @internal
 * Configuration for Astro's client-side code from adapters.
 * This is used internally to inject adapter-specific behavior into client code.
 */
export interface AstroAdapterClientConfig {
	/**
	 * Headers to inject into Astro's internal fetch calls (Actions, View Transitions, Server Islands, Prefetch).
	 * Can be an object of headers or a function that returns headers.
	 */
	internalFetchHeaders?: Record<string, string> | (() => Record<string, string>);
	/**
	 * Query parameters to append to all asset URLs (images, stylesheets, scripts, etc.).
	 * Useful for adapters that need to track deployment versions or other metadata.
	 */
	assetQueryParams?: URLSearchParams;
}

interface AdapterExplicitProperties {
	/**
	 * Determines how the adapter's entrypoint is handled during the build.
	 * - `'auto'`: The adapter defines its own entrypoint and provides either serverEntrypoint or rollupOptions.input
	 * - `'explicit'`: Uses the virtual module entrypoint with dynamic exports
	 * @default 'explicit'
	 * @deprecated This will be removed in a future major version and `'auto'` will become the default
	 */
	entrypointResolution?: 'explicit';
	serverEntrypoint?: string | URL;
	/** @deprecated This will be removed in a future major version, alongside `entrypointResolution: 'explicit'` */
	exports?: string[];
	/** @deprecated This will be removed in a future major version, alongside `entrypointResolution: 'explicit'` */
	args?: any;
}

interface AdapterAutoProperties {
	/**
	 * Determines how the adapter's entrypoint is handled during the build.
	 * - `'auto'`: The adapter defines its own entrypoint and provides either serverEntrypoint or rollupOptions.input
	 * - `'explicit'`: Uses the virtual module entrypoint with dynamic exports
	 * @default 'explicit'
	 */
	entrypointResolution: 'auto';
	serverEntrypoint?: string | URL;
}

export type AstroAdapter = {
	name: string;