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

Code before:
					for: `${config.base}${config.base.endsWith('/') ? '' : '/'}${config.build.assets}/*`,
					values: {
						'Cache-Control': 'public, max-age=31536000, immutable',
					},
				},
			];

	// See https://docs.netlify.com/image-cdn/create-integration/
	const deployConfigDir = new URL('.netlify/v1/', config.root);
	await mkdir(deployConfigDir, { recursive: true });
	await writeFile(
		new URL('./config.json', deployConfigDir),
		JSON.stringify({
			images: { remote_images: remoteImages },
			headers,
		}),
	);
}

export interface NetlifyIntegrationConfig {
	/**
	 * Force files to be bundled with your SSR function.
	 * This is useful for including any type of file that is not directly detected by the bundler,
	 * like configuration files or assets that are dynamically imported at runtime.
	 *
	 * Note: File paths are resolved relative to your project's rootDir. Absolute paths may not work as expected.
	 *
	 * @example
	 * ```js
	 * includeFiles: ['./src/data/*.json', './src/locales/*.yml', './src/config/*.yaml']
	 * ```
	 */
	includeFiles?: string[];

	/**
	 * Exclude files from the bundling process.
	 * This is useful for excluding any type of file that is not intended to be bundled with your SSR function,
	 * such as large assets, temporary files, or sensitive local configuration files.
	 *
	 * @example
	 * ```js
	 * excludeFiles: ['./src/secret/*.json', './src/temp/*.txt']
	 * ```
	 */
	excludeFiles?: string[];

	/**
	 * If enabled, On-Demand-Rendered pages are cached for up to a year.
	 * This is useful for pages that are not updated often, like a blog post,
	 * but that you have too many of to pre-render at build time.
	 *

Review comment (suggestion):
```suggestion
	 * Note: File paths are resolved relative to your project's `root`. Absolute paths may not work as expected.
```

Code after:
					for: `${config.base}${config.base.endsWith('/') ? '' : '/'}${config.build.assets}/*`,
					values: {
						'Cache-Control': 'public, max-age=31536000, immutable',
					},
				},
			];

	// See https://docs.netlify.com/image-cdn/create-integration/
	const deployConfigDir = new URL('.netlify/v1/', config.root);
	await mkdir(deployConfigDir, { recursive: true });
	await writeFile(
		new URL('./config.json', deployConfigDir),
		JSON.stringify({
			images: { remote_images: remoteImages },
			headers,
		}),
	);
}

export interface NetlifyIntegrationConfig {
	/**
	 * Force files to be bundled with your SSR function.
	 * This is useful for including any type of file that is not directly detected by the bundler,
	 * like configuration files or assets that are dynamically imported at runtime.
	 *
	 * Note: File paths are resolved relative to your project's `root`. Absolute paths may not work as expected.
	 *
	 * @example
	 * ```js
	 * includeFiles: ['./src/data/*.json', './src/locales/*.yml', './src/config/*.yaml']
	 * ```
	 */
	includeFiles?: string[];

	/**
	 * Exclude files from the bundling process.
	 * This is useful for excluding any type of file that is not intended to be bundled with your SSR function,
	 * such as large assets, temporary files, or sensitive local configuration files.
	 *
	 * @example
	 * ```js
	 * excludeFiles: ['./src/secret/*.json', './src/temp/*.txt']
	 * ```
	 */
	excludeFiles?: string[];

	/**
	 * If enabled, On-Demand-Rendered pages are cached for up to a year.
	 * This is useful for pages that are not updated often, like a blog post,
	 * but that you have too many of to pre-render at build time.
	 *