diff options
author | 2025-06-04 11:01:03 +0100 | |
---|---|---|
committer | 2025-06-04 11:01:03 +0100 | |
commit | 62f0668aa1e066c1c07ee0e774192def4cac43c4 (patch) | |
tree | 0f775b1607476b4e3c49cb16a7008dad567d809d /packages/integrations/cloudflare/src/utils/image-config.ts | |
parent | 1d628d59f6024c43ccf3fee45652ccd3d9df78e0 (diff) | |
download | astro-62f0668aa1e066c1c07ee0e774192def4cac43c4.tar.gz astro-62f0668aa1e066c1c07ee0e774192def4cac43c4.tar.zst astro-62f0668aa1e066c1c07ee0e774192def4cac43c4.zip |
Suppress supported features log option (#13887)
* Clarify and reduce Cloudflare integration logs
* Simplify log
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
* Move enabling sessions log to only show in build
* Use double quotes instead
* Add option to suppress adapter feature support log
* Add fixture to test option
* Add changeset
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Matt Kane <m@mk.gg>
---------
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Diffstat (limited to 'packages/integrations/cloudflare/src/utils/image-config.ts')
-rw-r--r-- | packages/integrations/cloudflare/src/utils/image-config.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/integrations/cloudflare/src/utils/image-config.ts b/packages/integrations/cloudflare/src/utils/image-config.ts index f9ed1a709..967b1b014 100644 --- a/packages/integrations/cloudflare/src/utils/image-config.ts +++ b/packages/integrations/cloudflare/src/utils/image-config.ts @@ -1,8 +1,10 @@ import type { AstroConfig, AstroIntegrationLogger, HookParameters } from 'astro'; import { passthroughImageService, sharpImageService } from 'astro/config'; +export type ImageService = 'passthrough' | 'cloudflare' | 'compile' | 'custom'; + export function setImageConfig( - service: string, + service: ImageService, config: AstroConfig['image'], command: HookParameters<'astro:config:setup'>['command'], logger: AstroIntegrationLogger, @@ -35,7 +37,7 @@ export function setImageConfig( default: if (config.service.entrypoint === 'astro/assets/services/sharp') { logger.warn( - `The current configuration does not support image optimization. To allow your project to build with the original, unoptimized images, the image service has been automatically switched to the 'noop' option. See https://docs.astro.build/en/reference/configuration-reference/#imageservice`, + `The current configuration does not support image optimization. To allow your project to build with the original, unoptimized images, the image service has been automatically switched to the 'passthrough' option. See https://docs.astro.build/en/reference/configuration-reference/#imageservice`, ); return { ...config, service: passthroughImageService() }; } |