Options Type — astro Architecture
Architecture documentation for the Options type/interface in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD f096fd69_e05c_0d3e_47a8_c19cddeee0ba["Options"] 13f9df63_e787_0221_d262_fe287a4b7ce1["index.ts"] f096fd69_e05c_0d3e_47a8_c19cddeee0ba -->|defined in| 13f9df63_e787_0221_d262_fe287a4b7ce1 style f096fd69_e05c_0d3e_47a8_c19cddeee0ba fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/cloudflare/src/index.ts lines 28–78
export type Options = {
/** Options for handling images. */
imageService?: ImageService;
/** Configuration for `_routes.json` generation. A _routes.json file controls when your Function is invoked. This file will include three different properties:
*
* - version: Defines the version of the schema. Currently there is only one version of the schema (version 1), however, we may add more in the future and aim to be backwards compatible.
* - include: Defines routes that will be invoked by Functions. Accepts wildcard behavior.
* - exclude: Defines routes that will not be invoked by Functions. Accepts wildcard behavior. `exclude` always take priority over `include`.
*
* Wildcards match any number of path segments (slashes). For example, `/users/*` will match everything after the `/users/` path.
*
*/
routes?: {
/** Extend `_routes.json` */
extend: {
/** Paths which should be routed to the SSR function */
include?: {
/** Generally this is in pathname format, but does support wildcards, e.g. `/users`, `/products/*` */
pattern: string;
}[];
/** Paths which should be routed as static assets */
exclude?: {
/** Generally this is in pathname format, but does support wildcards, e.g. `/static`, `/assets/*`, `/images/avatar.jpg` */
pattern: string;
}[];
};
};
/**
* By default, Astro will be configured to use Cloudflare KV to store session data. The KV namespace
* will be automatically provisioned when you deploy.
*
* By default, the binding is named `SESSION`, but you can override this by providing a different name here.
* If you define the binding manually in your wrangler config, Astro will use your configuration instead.
*
* See https://developers.cloudflare.com/workers/wrangler/configuration/#automatic-provisioning for more details.
*/
sessionKVBindingName?: string;
/**
* When `imageService` is set to `cloudflare-binding`, the Cloudflare Images binding will be used
* to transform images. The binding will be automatically configured for you.
*
* By default, the binding is named `IMAGES`, but you can override this by providing a different name here.
* If you define the binding manually in your wrangler config, Astro will use your configuration instead.
*
* See https://developers.cloudflare.com/images/transform-images/bindings/ for more details.
*/
imagesBindingName?: string;
};
Source
Frequently Asked Questions
What is the Options type?
Options is a type/interface in the astro codebase, defined in packages/integrations/cloudflare/src/index.ts.
Where is Options defined?
Options is defined in packages/integrations/cloudflare/src/index.ts at line 28.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free