Skip to main content

Module wrangler_keys

Module wrangler_keys 

Source
Expand description

The keys of a generated wrangler.toml, and what a named environment does with each (back-half paydown 1C.2, Decisions B and D of #4039).

Every top-level table the emitter writes is a WranglerKey, and WranglerKey::environment_rule is one exhaustive match: a table the emitter writes cannot be left out of [env.<name>] by omission, which is the #3577 and #3586 bug class (ai and ai_search were written at the top level and never restated for a named environment). The emitter’s TomlBlock headers take a key, the patchers and readers spell the keys through WranglerKey::top_key, and xtask’s wrangler_key_literals probe fails a key spelled as a string literal anywhere else.

The one-per-Worker tables of bynk.cloudflare (version_metadata, ai, images and analytics) are named by bynk-std’s registry, which is language surface, so they are a WranglerKey::Singleton holding the registry’s own spelling. This crate sits below the registry and cannot enumerate them.

Enums§

EnvironmentRule
What a named environment’s [env.<name>] block does with a key, from the generated file’s top level.
Qualify
How a name is qualified for an environment.
WranglerKey
A key of a generated wrangler.toml: a root entry, or a table or array of tables.