Repository: withastro/astro
File: packages/integrations/vercel/src/index.ts (TypeScript)

Code before:
		name: PACKAGE_NAME,
		serverEntrypoint: `${PACKAGE_NAME}/entrypoint`,
		exports: ['default'],
		args: {
			middlewareSecret,
			skewProtection,
		},
		adapterFeatures: {
			edgeMiddleware,
			buildOutput,
			experimentalStaticHeaders,
		},
		supportedAstroFeatures: {
			hybridOutput: 'stable',
			staticOutput: 'stable',
			serverOutput: 'stable',
			sharpImageService: 'stable',
			i18nDomains: 'experimental',
			envGetSecret: 'stable',
		},
		client: {
			internalFetchHeaders: skewProtection
				? (): Record<string, string> => {
						const deploymentId = process.env.VERCEL_DEPLOYMENT_ID;
						if (deploymentId) {
							return { 'x-vercel-deployment-id': deploymentId };
						}
						return {};
					}
				: undefined,
			assetQueryParams: skewProtection && process.env.VERCEL_DEPLOYMENT_ID
				? new URLSearchParams({ dpl: process.env.VERCEL_DEPLOYMENT_ID })
				: undefined,
		},
	};
}

export interface VercelServerlessConfig {
	/** Configuration for [Vercel Web Analytics](https://vercel.com/docs/concepts/analytics). */
	webAnalytics?: VercelWebAnalyticsConfig;

	/** Force files to be bundled with your function. This is helpful when you notice missing files. */
	includeFiles?: string[];

	/** Exclude any files from the bundling process that would otherwise be included. */
	excludeFiles?: string[];

	/** When enabled, an Image Service powered by the Vercel Image Optimization API will be automatically configured and used in production. In development, the image service specified by devImageService will be used instead. */
	imageService?: boolean;

	/** Configuration options for [Vercel’s Image Optimization API](https://vercel.com/docs/concepts/image-optimization). See [Vercel’s image configuration documentation](https://vercel.com/docs/build-output-api/v3/configuration#images) for a complete list of supported parameters. */

Review comment (suggestion):
```suggestion
							return { 'x-deployment-id': deploymentId };
```

See the docs here https://vercel.com/docs/skew-protection

Code after:
		name: PACKAGE_NAME,
		serverEntrypoint: `${PACKAGE_NAME}/entrypoint`,
		exports: ['default'],
		args: {
			middlewareSecret,
			skewProtection,
		},
		adapterFeatures: {
			edgeMiddleware,
			buildOutput,
			experimentalStaticHeaders,
		},
		supportedAstroFeatures: {
			hybridOutput: 'stable',
			staticOutput: 'stable',
			serverOutput: 'stable',
			sharpImageService: 'stable',
			i18nDomains: 'experimental',
			envGetSecret: 'stable',
		},
		client: {
			internalFetchHeaders: skewProtection
				? (): Record<string, string> => {
						const deploymentId = process.env.VERCEL_DEPLOYMENT_ID;
						if (deploymentId) {
							return { 'x-deployment-id': deploymentId };
						}
						return {};
					}
				: undefined,
			assetQueryParams: skewProtection && process.env.VERCEL_DEPLOYMENT_ID
				? new URLSearchParams({ dpl: process.env.VERCEL_DEPLOYMENT_ID })
				: undefined,
		},
	};
}

export interface VercelServerlessConfig {
	/** Configuration for [Vercel Web Analytics](https://vercel.com/docs/concepts/analytics). */
	webAnalytics?: VercelWebAnalyticsConfig;

	/** Force files to be bundled with your function. This is helpful when you notice missing files. */
	includeFiles?: string[];

	/** Exclude any files from the bundling process that would otherwise be included. */
	excludeFiles?: string[];

	/** When enabled, an Image Service powered by the Vercel Image Optimization API will be automatically configured and used in production. In development, the image service specified by devImageService will be used instead. */
	imageService?: boolean;

	/** Configuration options for [Vercel’s Image Optimization API](https://vercel.com/docs/concepts/image-optimization). See [Vercel’s image configuration documentation](https://vercel.com/docs/build-output-api/v3/configuration#images) for a complete list of supported parameters. */