UNPKG

wrangler

Version:

Command-line interface for all things Cloudflare Workers

814 lines • 312 kB
{ "$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/RawConfig", "definitions": { "RawConfig": { "type": "object", "additionalProperties": false, "properties": { "$schema": { "type": "string" }, "env": { "type": "object", "additionalProperties": { "$ref": "#/definitions/RawEnvironment" }, "description": "The `env` section defines overrides for the configuration for different environments.\n\nAll environment fields can be specified at the top level of the config indicating the default environment settings.\n\n- Some fields are inherited and overridable in each environment.\n- But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.\n\nFor more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments", "markdownDescription": "The `env` section defines overrides for the configuration for different environments.\n\nAll environment fields can be specified at the top level of the config indicating the default environment settings.\n\n- Some fields are inherited and overridable in each environment.\n- But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.\n\nFor more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments", "default": {} }, "name": { "type": "string", "description": "The name of your Worker. Alphanumeric + dashes only.", "markdownDescription": "The name of your Worker. Alphanumeric + dashes only." }, "account_id": { "type": "string", "description": "This is the ID of the account associated with your zone. You might have more than one account, so make sure to use the ID of the account associated with the zone/route you provide, if you provide one. It can also be specified through the CLOUDFLARE_ACCOUNT_ID environment variable.", "markdownDescription": "This is the ID of the account associated with your zone.\nYou might have more than one account, so make sure to use\nthe ID of the account associated with the zone/route you\nprovide, if you provide one. It can also be specified through\nthe CLOUDFLARE_ACCOUNT_ID environment variable." }, "compatibility_date": { "type": "string", "description": "A date in the form yyyy-mm-dd, which will be used to determine which version of the Workers runtime is used.\n\nMore details at https://developers.cloudflare.com/workers/configuration/compatibility-dates", "markdownDescription": "A date in the form yyyy-mm-dd, which will be used to determine\nwhich version of the Workers runtime is used.\n\nMore details at https://developers.cloudflare.com/workers/configuration/compatibility-dates" }, "compatibility_flags": { "type": "array", "items": { "type": "string" }, "description": "A list of flags that enable features from upcoming features of the Workers runtime, usually used together with compatibility_date.\n\nMore details at https://developers.cloudflare.com/workers/configuration/compatibility-flags/", "markdownDescription": "A list of flags that enable features from upcoming features of\nthe Workers runtime, usually used together with compatibility_date.\n\nMore details at https://developers.cloudflare.com/workers/configuration/compatibility-flags/", "default": [] }, "main": { "type": "string", "description": "The entrypoint/path to the JavaScript file that will be executed.", "markdownDescription": "The entrypoint/path to the JavaScript file that will be executed." }, "find_additional_modules": { "type": "boolean", "description": "If true then Wrangler will traverse the file tree below `base_dir`; Any files that match `rules` will be included in the deployed Worker. Defaults to true if `no_bundle` is true, otherwise false.", "markdownDescription": "If true then Wrangler will traverse the file tree below `base_dir`;\nAny files that match `rules` will be included in the deployed Worker.\nDefaults to true if `no_bundle` is true, otherwise false." }, "preserve_file_names": { "type": "boolean", "description": "Determines whether Wrangler will preserve bundled file names. Defaults to false. If left unset, files will be named using the pattern ${fileHash}-${basename}, for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.", "markdownDescription": "Determines whether Wrangler will preserve bundled file names.\nDefaults to false.\nIf left unset, files will be named using the pattern ${fileHash}-${basename},\nfor example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`." }, "base_dir": { "type": "string", "description": "The directory in which module rules should be evaluated when including additional files into a Worker deployment. This defaults to the directory containing the `main` entry point of the Worker if not specified.", "markdownDescription": "The directory in which module rules should be evaluated when including additional files into a Worker deployment.\nThis defaults to the directory containing the `main` entry point of the Worker if not specified." }, "workers_dev": { "type": "boolean", "description": "Whether we use <name>.<subdomain>.workers.dev to test and deploy your Worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev", "markdownDescription": "Whether we use <name>.<subdomain>.workers.dev to\ntest and deploy your Worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev", "default": true }, "preview_urls": { "type": "boolean", "description": "Whether we use <version>-<name>.<subdomain>.workers.dev to serve Preview URLs for your Worker.", "markdownDescription": "Whether we use <version>-<name>.<subdomain>.workers.dev to\nserve Preview URLs for your Worker.", "default": false }, "routes": { "type": "array", "items": { "$ref": "#/definitions/Route" }, "description": "A list of routes that your Worker should be published to. Only one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker (see `triggers`)\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes", "markdownDescription": "A list of routes that your Worker should be published to.\nOnly one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker (see `triggers`)\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes" }, "route": { "$ref": "#/definitions/Route", "description": "A route that your Worker should be published to. Literally the same as routes, but only one. Only one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker", "markdownDescription": "A route that your Worker should be published to. Literally\nthe same as routes, but only one.\nOnly one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker" }, "tsconfig": { "type": "string", "description": "Path to a custom tsconfig", "markdownDescription": "Path to a custom tsconfig" }, "jsx_factory": { "type": "string", "description": "The function to use to replace jsx syntax.", "markdownDescription": "The function to use to replace jsx syntax.", "default": "React.createElement" }, "jsx_fragment": { "type": "string", "description": "The function to use to replace jsx fragment syntax.", "markdownDescription": "The function to use to replace jsx fragment syntax.", "default": "React.Fragment" }, "migrations": { "type": "array", "items": { "$ref": "#/definitions/DurableObjectMigration" }, "description": "A list of migrations that should be uploaded with your Worker.\n\nThese define changes in your Durable Object declarations.\n\nMore details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations", "markdownDescription": "A list of migrations that should be uploaded with your Worker.\n\nThese define changes in your Durable Object declarations.\n\nMore details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations", "default": [] }, "triggers": { "type": "object", "properties": { "crons": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false, "description": "\"Cron\" definitions to trigger a Worker's \"scheduled\" function.\n\nLets you call Workers periodically, much like a cron job.\n\nMore details here https://developers.cloudflare.com/workers/platform/cron-triggers\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers", "markdownDescription": "\"Cron\" definitions to trigger a Worker's \"scheduled\" function.\n\nLets you call Workers periodically, much like a cron job.\n\nMore details here https://developers.cloudflare.com/workers/platform/cron-triggers\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers", "default": { "crons": [] } }, "limits": { "$ref": "#/definitions/UserLimits", "description": "Specify limits for runtime behavior. Only supported for the \"standard\" Usage Model\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#limits", "markdownDescription": "Specify limits for runtime behavior.\nOnly supported for the \"standard\" Usage Model\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#limits" }, "rules": { "type": "array", "items": { "$ref": "#/definitions/Rule" }, "description": "An ordered list of rules that define which modules to import, and what type to import them as. You will need to specify rules to use Text, Data, and CompiledWasm modules, or when you wish to have a .js file be treated as an ESModule instead of CommonJS.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#bundling", "markdownDescription": "An ordered list of rules that define which modules to import,\nand what type to import them as. You will need to specify rules\nto use Text, Data, and CompiledWasm modules, or when you wish to\nhave a .js file be treated as an ESModule instead of CommonJS.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#bundling" }, "build": { "type": "object", "properties": { "command": { "type": "string", "description": "The command used to build your Worker. On Linux and macOS, the command is executed in the `sh` shell and the `cmd` shell for Windows. The `&&` and `||` shell operators may be used.", "markdownDescription": "The command used to build your Worker. On Linux and macOS, the command is executed in the `sh` shell and the `cmd` shell for Windows. The `&&` and `||` shell operators may be used." }, "cwd": { "type": "string", "description": "The directory in which the command is executed.", "markdownDescription": "The directory in which the command is executed." }, "watch_dir": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ], "description": "The directory to watch for changes while using wrangler dev, defaults to the current working directory", "markdownDescription": "The directory to watch for changes while using wrangler dev, defaults to the current working directory" } }, "additionalProperties": false, "description": "Configures a custom build step to be run by Wrangler when building your Worker.\n\nRefer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build) for more details.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds", "markdownDescription": "Configures a custom build step to be run by Wrangler when building your Worker.\n\nRefer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build)\nfor more details.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds", "default": { "watch_dir": "./src" } }, "no_bundle": { "type": "boolean", "description": "Skip internal build steps and directly deploy script", "markdownDescription": "Skip internal build steps and directly deploy script" }, "minify": { "type": "boolean", "description": "Minify the script before uploading.", "markdownDescription": "Minify the script before uploading." }, "keep_names": { "type": "boolean", "description": "Set the `name` property to the original name for functions and classes renamed during minification.\n\nSee https://esbuild.github.io/api/#keep-names", "markdownDescription": "Set the `name` property to the original name for functions and classes renamed during minification.\n\nSee https://esbuild.github.io/api/#keep-names", "default": true }, "first_party_worker": { "type": "boolean", "description": "Designates this Worker as an internal-only \"first-party\" Worker.", "markdownDescription": "Designates this Worker as an internal-only \"first-party\" Worker." }, "logfwdr": { "type": "object", "properties": { "bindings": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The binding name used to refer to logfwdr", "markdownDescription": "The binding name used to refer to logfwdr" }, "destination": { "type": "string", "description": "The destination for this logged message", "markdownDescription": "The destination for this logged message" } }, "required": [ "name", "destination" ], "additionalProperties": false } } }, "required": [ "bindings" ], "additionalProperties": false, "description": "List of bindings that you will send to logfwdr", "markdownDescription": "List of bindings that you will send to logfwdr", "default": { "bindings": [] } }, "logpush": { "type": "boolean", "description": "Send Trace Events from this Worker to Workers Logpush.\n\nThis will not configure a corresponding Logpush job automatically.\n\nFor more information about Workers Logpush, see: https://blog.cloudflare.com/logpush-for-workers/", "markdownDescription": "Send Trace Events from this Worker to Workers Logpush.\n\nThis will not configure a corresponding Logpush job automatically.\n\nFor more information about Workers Logpush, see:\nhttps://blog.cloudflare.com/logpush-for-workers/" }, "upload_source_maps": { "type": "boolean", "description": "Include source maps when uploading this worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#source-maps", "markdownDescription": "Include source maps when uploading this worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#source-maps" }, "placement": { "anyOf": [ { "type": "object", "properties": { "mode": { "type": "string", "enum": [ "off", "smart" ] }, "hint": { "type": "string" } }, "required": [ "mode" ], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "type": "string", "const": "targeted" }, "region": { "type": "string" } }, "required": [ "region" ], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "type": "string", "const": "targeted" }, "host": { "type": "string" } }, "required": [ "host" ], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "type": "string", "const": "targeted" }, "hostname": { "type": "string" } }, "required": [ "hostname" ], "additionalProperties": false } ], "description": "Specify how the Worker should be located to minimize round-trip time.\n\nMore details: https://developers.cloudflare.com/workers/platform/smart-placement/", "markdownDescription": "Specify how the Worker should be located to minimize round-trip time.\n\nMore details: https://developers.cloudflare.com/workers/platform/smart-placement/" }, "assets": { "$ref": "#/definitions/Assets", "description": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets", "markdownDescription": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets" }, "observability": { "$ref": "#/definitions/Observability", "description": "Specify the observability behavior of the Worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability", "markdownDescription": "Specify the observability behavior of the Worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability" }, "cache": { "$ref": "#/definitions/CacheOptions", "description": "Specify the cache behavior of the Worker.", "markdownDescription": "Specify the cache behavior of the Worker." }, "compliance_region": { "type": "string", "enum": [ "public", "fedramp_high" ], "description": "Specify the compliance region mode of the Worker.\n\nAlthough if the user does not specify a compliance region, the default is `public`, it can be set to `undefined` in configuration to delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable.", "markdownDescription": "Specify the compliance region mode of the Worker.\n\nAlthough if the user does not specify a compliance region, the default is `public`,\nit can be set to `undefined` in configuration to delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable." }, "python_modules": { "type": "object", "properties": { "exclude": { "type": "array", "items": { "type": "string" }, "description": "A list of glob patterns to exclude files from the python_modules directory when bundling.\n\nPatterns are relative to the python_modules directory and use glob syntax.", "markdownDescription": "A list of glob patterns to exclude files from the python_modules directory when bundling.\n\nPatterns are relative to the python_modules directory and use glob syntax.", "default": [ "***.pyc" ] } }, "required": [ "exclude" ], "additionalProperties": false, "description": "Configuration for Python modules.", "markdownDescription": "Configuration for Python modules." }, "previews": { "$ref": "#/definitions/PreviewsConfig", "description": "Configuration for Worker Previews.\n\nPreviews are branches of your Worker's main instance used to test features in development outside of production. This block defines the settings used when creating Preview deployments via `wrangler preview`.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#previews", "markdownDescription": "Configuration for Worker Previews.\n\nPreviews are branches of your Worker's main instance used to test features\nin development outside of production. This block defines the settings\nused when creating Preview deployments via `wrangler preview`.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#previews" }, "define": { "type": "object", "additionalProperties": { "type": "string" }, "description": "A map of values to substitute when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.", "markdownDescription": "A map of values to substitute when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.", "default": {} }, "vars": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "$ref": "#/definitions/Json" } ] }, "description": "A map of environment variables to set when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables", "markdownDescription": "A map of environment variables to set when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables", "default": {} }, "secrets": { "type": "object", "properties": { "required": { "type": "array", "items": { "type": "string" }, "description": "List of secret names that are required by your Worker. When defined, this property:\n- Replaces .dev.vars/.env/process.env inference for type generation\n- Enables local dev validation with warnings for missing secrets", "markdownDescription": "List of secret names that are required by your Worker.\nWhen defined, this property:\n- Replaces .dev.vars/.env/process.env inference for type generation\n- Enables local dev validation with warnings for missing secrets" } }, "additionalProperties": false, "description": "Secrets configuration.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#secrets-configuration-property", "markdownDescription": "Secrets configuration.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#secrets-configuration-property" }, "durable_objects": { "type": "object", "properties": { "bindings": { "$ref": "#/definitions/DurableObjectBindings" } }, "required": [ "bindings" ], "additionalProperties": false, "description": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at https://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects", "markdownDescription": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at\nhttps://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects", "default": { "bindings": [] } }, "workflows": { "type": "array", "items": { "$ref": "#/definitions/WorkflowBinding" }, "description": "A list of workflows that your Worker should be bound to.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.", "markdownDescription": "A list of workflows that your Worker should be bound to.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.", "default": [] }, "cloudchamber": { "$ref": "#/definitions/CloudchamberConfig", "description": "Cloudchamber configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.", "markdownDescription": "Cloudchamber configuration\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.", "default": {} }, "containers": { "type": "array", "items": { "$ref": "#/definitions/ContainerApp" }, "description": "Container related configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.", "markdownDescription": "Container related configuration\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.", "default": [] }, "kv_namespaces": { "type": "array", "items": { "type": "object", "properties": { "binding": { "type": "string", "description": "The binding name used to refer to the KV Namespace", "markdownDescription": "The binding name used to refer to the KV Namespace" }, "id": { "type": "string", "description": "The ID of the KV namespace", "markdownDescription": "The ID of the KV namespace" }, "preview_id": { "type": "string", "description": "The ID of the KV namespace used during `wrangler dev`", "markdownDescription": "The ID of the KV namespace used during `wrangler dev`" }, "remote": { "type": "boolean", "description": "Whether the KV namespace should be remote or not in local development", "markdownDescription": "Whether the KV namespace should be remote or not in local development" } }, "required": [ "binding" ], "additionalProperties": false }, "description": "These specify any Workers KV Namespaces you want to access from inside your Worker.\n\nTo learn more about KV Namespaces, see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces", "markdownDescription": "These specify any Workers KV Namespaces you want to\naccess from inside your Worker.\n\nTo learn more about KV Namespaces,\nsee the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces", "default": [] }, "send_email": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The binding name used to refer to the this binding", "markdownDescription": "The binding name used to refer to the this binding" }, "destination_address": { "type": "string", "description": "If this binding should be restricted to a specific verified address", "markdownDescription": "If this binding should be restricted to a specific verified address" }, "allowed_destination_addresses": { "type": "array", "items": { "type": "string" }, "description": "If this binding should be restricted to a set of verified addresses", "markdownDescription": "If this binding should be restricted to a set of verified addresses" }, "allowed_sender_addresses": { "type": "array", "items": { "type": "string" }, "description": "If this binding should be restricted to a set of sender addresses", "markdownDescription": "If this binding should be restricted to a set of sender addresses" }, "remote": { "type": "boolean", "description": "Whether the binding should be remote or not in local development", "markdownDescription": "Whether the binding should be remote or not in local development" } }, "required": [ "name" ], "additionalProperties": false }, "description": "These specify bindings to send email from inside your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings", "markdownDescription": "These specify bindings to send email from inside your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings", "default": [] }, "queues": { "type": "object", "properties": { "producers": { "type": "array", "items": { "type": "object", "properties": { "binding": { "type": "string", "description": "The binding name used to refer to the Queue in the Worker.", "markdownDescription": "The binding name used to refer to the Queue in the Worker." }, "queue": { "type": "string", "description": "The name of this Queue.", "markdownDescription": "The name of this Queue." }, "delivery_delay": { "type": "number", "description": "The number of seconds to wait before delivering a message", "markdownDescription": "The number of seconds to wait before delivering a message" }, "remote": { "type": "boolean", "description": "Whether the Queue producer should be remote or not in local development", "markdownDescription": "Whether the Queue producer should be remote or not in local development" } }, "required": [ "binding", "queue" ], "additionalProperties": false }, "description": "Producer bindings", "markdownDescription": "Producer bindings" }, "consumers": { "type": "array", "items": { "type": "object", "properties": { "queue": { "type": "string", "description": "The name of the queue from which this consumer should consume.", "markdownDescription": "The name of the queue from which this consumer should consume." }, "type": { "type": "string", "const": "worker", "description": "The consumer type. Only \"worker\" is supported in wrangler config. Default is \"worker\".", "markdownDescription": "The consumer type. Only \"worker\" is supported in wrangler config. Default is \"worker\"." }, "max_batch_size": { "type": "number", "description": "The maximum number of messages per batch", "markdownDescription": "The maximum number of messages per batch" }, "max_batch_timeout": { "type": "number", "description": "The maximum number of seconds to wait to fill a batch with messages.", "markdownDescription": "The maximum number of seconds to wait to fill a batch with messages." }, "max_retries": { "type": "number", "description": "The maximum number of retries for each message.", "markdownDescription": "The maximum number of retries for each message." }, "dead_letter_queue": { "type": "string", "description": "The queue to send messages that failed to be consumed.", "markdownDescription": "The queue to send messages that failed to be consumed." }, "max_concurrency": { "type": [ "number", "null" ], "description": "The maximum number of concurrent consumer Worker invocations. Leaving this unset will allow your consumer to scale to the maximum concurrency needed to keep up with the message backlog.", "markdownDescription": "The maximum number of concurrent consumer Worker invocations. Leaving this unset will allow your consumer to scale to the maximum concurrency needed to keep up with the message backlog." }, "visibility_timeout_ms": { "type": "number", "description": "The number of milliseconds to wait for pulled messages to become visible again", "markdownDescription": "The number of milliseconds to wait for pulled messages to become visible again" }, "retry_delay": { "type": "number", "description": "The number of seconds to wait before retrying a message", "markdownDescription": "The number of seconds to wait before retrying a message" } }, "required": [ "queue" ], "additionalProperties": false }, "description": "Consumer configuration", "markdownDescription": "Consumer configuration" } }, "additionalProperties": false, "description": "Specifies Queues that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues", "markdownDescription": "Specifies Queues that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues", "default": { "consumers": [], "producers": [] } }, "r2_buckets": { "type": "array", "items": { "type": "object", "properties": { "binding": { "type": "string", "description": "The binding name used to refer to the R2 bucket in the Worker.", "markdownDescription": "The binding name used to refer to the R2 bucket in the Worker." }, "bucket_name": { "type": "string", "description": "The name of this R2 bucket at the edge.", "markdownDescription": "The name of this R2 bucket at the edge." }, "preview_bucket_name": { "type": "string", "description": "The preview name of this R2 bucket at the edge.", "markdownDescription": "The preview name of this R2 bucket at the edge." }, "jurisdiction": { "type": "string", "description": "The jurisdiction that the bucket exists in. Default if not present.", "markdownDescription": "The jurisdiction that the bucket exists in. Default if not present." }, "remote": { "type": "boolean", "description": "Whether the R2 bucket should be remote or not in local development", "markdownDescription": "Whether the R2 bucket should be remote or not in local development" } }, "required": [ "binding" ], "additionalProperties": false }, "description": "Specifies R2 buckets that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets", "markdownDescription": "Specifies R2 buckets that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets", "default": [] }, "d1_databases": { "type": "array", "items": { "type": "object", "properties": { "binding": { "type": "string", "description": "The binding name used to refer to the D1 database in the Worker.", "markdownDescription": "The binding name used to refer to the D1 database in the Worker." }, "database_name": { "type": "string", "description": "The name of this D1 database.", "markdownDescription": "The name of this D1 database." }, "database_id": { "type": "string", "description": "The UUID of this D1 database (not required).", "markdownDescription": "The UUID of this D1 database (not required)." }, "preview_database_id": { "type": "string", "description": "The UUID of this D1 database for Wrangler Dev (if specified).", "markdownDescription": "The UUID of this D1 database for Wrangler Dev (if specified)." }, "migrations_table": { "type": "string", "description": "The name of the migrations table for this D1 database (defaults to 'd1_migrations').", "markdownDescription": "The name of the migrations table for this D1 database (defaults to 'd1_migrations')." }, "migrations_dir": { "type": "string", "description": "The path to the directory of migrations for this D1 database (defaults to './migrations').", "markdownDescription": "The path to the directory of migrations for this D1 database (defaults to './migrations')." }, "database_internal_env": { "type": "string", "description": "Internal use only.", "markdownDescription": "Internal use only." }, "remote": { "type": "boolean", "description": "Whether the D1 database should be remote or not in local development", "markdownDescription": "Whether the D1 database should be remote or not in local development" } }, "required": [ "binding" ], "additionalProperties": false }, "description": "Specifies D1 databases that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases", "markdownDescription": "Specifies D1 databases that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases", "default": [] }, "vectorize": { "type": "array", "items": { "type": "object", "properties": { "binding": { "type": "string", "description": "The binding name used to refer to the Vectorize index in the Worker.", "markdownDescription": "The binding name used to refer to the Vectorize index in the Worker." }, "index_name": { "type": "string", "description": "The name of the index.", "markdownDescription": "The name of the index." }, "remote": { "type": "boolean", "description": "Whether the Vectorize index should be remote or not in local development", "markdownDescription": "Whether the Vectorize index should be remote or not in local development" } }, "required": [ "binding", "index_name" ], "additionalProperties": false }, "description": "Specifies Vectorize indexes that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes", "markdownDescription": "Specifies Vectorize indexes that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes", "default": [] }, "ai_search_namespaces": { "type": "array", "items": { "type": "object", "properties": { "binding": { "type": "string", "description": "The binding name used to refer to the AI Search namespace in the Worker.", "markdownDescription": "The binding name used to refer to the AI Search namespace in the Worker." }, "namespace": { "type": "string", "description": "The user-chosen namespace name. Must exist in Cloudflare at deploy time.", "markdownDescription": "The user-chosen namespace name. Must exist in Cloudflare at deploy time." }, "remote": { "type": "boolean", "description": "Whether the AI Search namespace binding should be remote in local development", "markdownDescription": "Whether the AI Search namespace binding should be remote in local development" } }, "required": [ "binding", "namespace" ], "additionalProperties": false }, "description": "Specifies AI Search namespace bindings that are bound to this Worker environment. Each binding is scoped to a namespace and allows dynamic instance CRUD within it.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.", "markdownDescription": "Specifies AI Search namespace bindings that are bound to this Worker environment.\nEach binding is scoped to a namespace and allows dynamic instance CRUD within it.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.", "default": [] }, "ai_search": { "type": "array", "items": { "type": "object", "properties": { "binding": { "type": "string", "description": "The binding name used to refer to the AI Search instance in the Worker.", "markdownDescription": "The binding name used to refer to the AI Search instance in the Worker." }, "instance_nam