new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Cloudflare Workers · Wrangler · all subjects

configuration: wrangler.toml

10 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

WranglerConfig component input and output formats

The <WranglerConfig> component accepts either TOML or JSON as input; the other format is automatically generated and displayed.

WranglerConfig removeSchema prop

The removeSchema prop on the <WranglerConfig> component omits the $schema line from JSON output, which is useful for configuration snippets.

WranglerConfig component example usage

Example of using the <WranglerConfig> component: ``` import { WranglerConfig } from "~/components"; <WranglerConfig> ```toml name = "my-worker" main = "src/index.ts" compatibility_date = "$today" ``` </WranglerConfig> ```

WranglerConfig component for documentation

Use the <WranglerConfig> component instead of bare code fences when displaying Wrangler configuration fields like name =, compatibility_date =, [vars], [[kv_namespaces]], and similar wrangler.toml or wrangler.json configuration.

WranglerConfig component with $today for compatibility_date

When using the <WranglerConfig> component, use $today as the compatibility_date value instead of hardcoding a date string. The $today placeholder is automatically replaced with the current date at build time during documentation generation.

Entrypoint requirement for executable examples

The main field is required for executable examples in wrangler configuration. Missing the entrypoint will cause errors.

Wrangler config file formats

Wrangler supports three configuration file formats: JSONC (wrangler.jsonc) which is preferred for new projects and supports comments, JSON (wrangler.json) which is valid but does not support comments, and TOML (wrangler.toml) which is a legacy format that is acceptable in existing content but should only be flagged when used in new content.

Required fields in wrangler config for executable examples

For executable examples, the configuration must include the fields: name, compatibility_date, and main. The schema should be checked for current required fields as these may change over time.

Schema field reference in config

Wrangler configuration files should reference the wrangler schema via the $schema field. This is one of the common validation checks that should be performed when reviewing configuration.

Authoritative wrangler schema location

The authoritative schema for wrangler configuration is bundled with the wrangler npm package as config-schema.json in the root of node_modules/wrangler. It is a JSON Schema (draft-07) document defining the full RawConfig type. Do not run npm pack or install packages when consulting the schema — use whatever version is in the repo's node_modules.

Give your agent this brain