Skip to main content

bynk_project/
manifest_schema.rs

1//! #2096: the JSON Schema types for the `bynk.toml` tables this crate checks.
2//!
3//! `[project]`, `[paths]`, `[workers]`, `[unstable]` and the packaging tables
4//! are read by hand, from a `toml::Table`, against
5//! [`MANIFEST_TABLES`](crate::MANIFEST_TABLES) and
6//! [`MANIFEST_MAP_TABLES`](crate::MANIFEST_MAP_TABLES), so there is no serde
7//! struct to derive a schema from. These types describe them for an
8//! editor instead: each field's doc comment is the description a TOML extension
9//! shows on hover. `[lsp]` is here too, because its reader lives in `bynk-lsp`,
10//! which nothing that assembles the schema can depend on; `bynk-lsp`'s own test
11//! holds its `LspSection` to this one. `[fmt]` is not here: `bynk-fmt` derives it
12//! from the struct that reads it (`bynk_fmt::fmt_table_schema`).
13//!
14//! `cargo xtask manifest-schema` assembles the whole schema, and its test fails
15//! when a table or key here disagrees with
16//! [`MANIFEST_TABLES`](crate::MANIFEST_TABLES) or the committed
17//! schema is stale. Only built with the `schema` feature.
18
19use schemars::{JsonSchema, Schema, SchemaGenerator};
20
21/// A list of paths, or one path on its own (`include = "src"`).
22#[derive(JsonSchema)]
23#[serde(untagged)]
24#[allow(dead_code)]
25enum PathList {
26    One(String),
27    Many(Vec<String>),
28}
29
30/// Project metadata. Neither key affects compilation: both are for display
31/// only, and have no default.
32#[derive(JsonSchema)]
33#[serde(deny_unknown_fields)]
34#[allow(dead_code)]
35struct ProjectTable {
36    /// Display name for the project.
37    name: Option<String>,
38    /// Version string for the project.
39    version: Option<String>,
40}
41
42/// The project's source trees. Each path is relative to the directory holding
43/// `bynk.toml`. A conventional `src/` (and `tests/`) project, or a flat one with
44/// its `.bynk` files at the root, needs no `[paths]` table.
45#[derive(JsonSchema)]
46#[serde(deny_unknown_fields)]
47#[allow(dead_code)]
48struct PathsTable {
49    /// Trees to compile. Default: the conventional roots that exist (`src`, and
50    /// `tests` when present), or the project root itself when neither does.
51    include: Option<PathList>,
52    /// Subtrees to skip during discovery (monorepo, vendored or generated
53    /// `.bynk`). The tool's own `out` and `node_modules` caches and
54    /// dot-directories are always skipped. Default: `[]`.
55    #[schemars(extend("default" = []))]
56    exclude: Option<PathList>,
57}
58
59/// Language-server settings, read by `bynk-lsp`.
60#[derive(JsonSchema)]
61#[serde(deny_unknown_fields)]
62#[allow(dead_code)]
63struct LspTable {
64    /// When diagnostics are computed: `"live"` (as you type) or `"on_save"`.
65    /// Default: `"live"`.
66    #[schemars(extend("enum" = ["live", "on_save"], "default" = "live"))]
67    diagnostics_mode: Option<String>,
68    /// Debounce interval, in milliseconds, for live diagnostics. Default: `300`.
69    #[schemars(extend("default" = 300))]
70    diagnostics_debounce_ms: Option<u64>,
71}
72
73/// Settings for the Cloudflare Workers a Workers build emits (`bynk compile
74/// --target workers`, `bynk dev`, `bynk deploy`).
75#[derive(JsonSchema)]
76#[serde(deny_unknown_fields)]
77#[allow(dead_code)]
78struct WorkersTable {
79    /// Extra Cloudflare compatibility flags for every Worker's `wrangler.toml`,
80    /// after the default set (`global_fetch_strictly_public`). Names aren't
81    /// checked; a flag listed twice, or one already on by default, is dropped
82    /// with a warning. Default: `[]`.
83    #[schemars(extend("default" = []))]
84    compatibility_flags: Option<Vec<String>>,
85    /// Whether every Worker is served on its `*.workers.dev` URL: written as
86    /// `workers_dev` in each `wrangler.toml`. Set `false` to take the Workers
87    /// off `workers.dev`. Unset leaves the key out, so Cloudflare's default
88    /// (on) applies.
89    workers_dev: Option<bool>,
90}
91
92/// Where `bynk deploy` gets each `Postgres` capability's Hyperdrive config.
93/// No table holds a connection string: it is a secret, and `bynk.toml` is
94/// committed.
95#[derive(JsonSchema)]
96#[serde(deny_unknown_fields)]
97#[allow(dead_code)]
98struct DeployTable {
99    /// Hyperdrive settings, keyed by the `Postgres` capability's name
100    /// (`capability Main = Postgres` is `Main`).
101    hyperdrive: Option<std::collections::BTreeMap<String, DeployHyperdriveEntry>>,
102    /// Vectorize settings, keyed by the `Vectorize` capability's name
103    /// (`capability Docs = Vectorize …` is `Docs`).
104    vectorize: Option<std::collections::BTreeMap<String, DeployVectorizeEntry>>,
105    /// Container settings, keyed by the `Container` capability's name
106    /// (`capability Renderer = Container …` is `Renderer`).
107    containers: Option<std::collections::BTreeMap<String, DeployContainerEntry>>,
108    /// Worker groups, keyed by the group's identity: which contexts share one
109    /// Worker. A context in no group stays its own Worker, named by its
110    /// dashed name.
111    workers: Option<std::collections::BTreeMap<String, DeployWorkerEntry>>,
112}
113
114/// One group: the contexts that are deployed as one Worker.
115#[derive(JsonSchema)]
116#[serde(deny_unknown_fields)]
117#[allow(dead_code)]
118struct DeployWorkerEntry {
119    /// The members, as qualified context names (`shop.orders`). Each context
120    /// is in one group only; there are no globs, so adding a context to a
121    /// group is a visible change here.
122    contexts: Vec<String>,
123    /// The Worker's script name on Cloudflare: 1 to 63 lowercase letters,
124    /// digits or `-`. Default: the group's key. The key stays the group's
125    /// identity (its ledger entry, `--worker` selector and `workers/<key>/`
126    /// directory); changing the key or the name makes a different Worker.
127    name: Option<String>,
128    /// Route patterns the Worker is attached to, like `pay.example.com/*`.
129    routes: Option<Vec<String>>,
130    /// Custom domains the Worker is attached to, like `pay.example.com`.
131    custom_domains: Option<Vec<String>>,
132}
133
134/// One `Container` capability's image at deploy.
135#[derive(JsonSchema)]
136#[serde(deny_unknown_fields)]
137#[allow(dead_code)]
138struct DeployContainerEntry {
139    /// Prebuilt images by deployment environment (`default`, or an `--env`
140    /// name), each `registry.cloudflare.com/<ACCOUNT_ID>/<REPOSITORY>@sha256:<DIGEST>`:
141    /// in Cloudflare's own registry and named by digest. An environment listed
142    /// here runs that image and is never built, so the deploy needs no Docker;
143    /// without an entry the image is built from `@build`'s Dockerfile.
144    image: std::collections::BTreeMap<String, String>,
145}
146
147/// One `Vectorize` capability's index at deploy.
148#[derive(JsonSchema)]
149#[serde(deny_unknown_fields)]
150#[allow(dead_code)]
151struct DeployVectorizeEntry {
152    /// Names of Vectorize indexes that already exist, by deployment
153    /// environment (`default`, or an `--env` name). An environment listed here
154    /// is adopted: `bynk deploy` checks its dimensions and metric against the
155    /// declaration and never creates, changes or deletes it. Without an entry
156    /// the deploy creates the index.
157    index: std::collections::BTreeMap<String, String>,
158}
159
160/// One `Postgres` capability's Hyperdrive config at deploy.
161#[derive(JsonSchema)]
162#[serde(deny_unknown_fields)]
163#[allow(dead_code)]
164struct DeployHyperdriveEntry {
165    /// The name of the environment variable `bynk deploy` reads the
166    /// connection string from (`postgres://user:password@host:5432/db`). The
167    /// deploy creates the Hyperdrive config from it, or updates the config
168    /// when the string changes. The string is never written to the ledger,
169    /// the plan or a generated file. A missing variable fails the deploy.
170    connection_env: Option<String>,
171    /// Hyperdrive config ids that already exist, by deployment environment
172    /// (`default`, or an `--env` name). An environment listed here is adopted
173    /// as it is and needs no connection string.
174    config_id: Option<std::collections::BTreeMap<String, String>>,
175}
176
177/// Settings `bynk dev` reads.
178#[derive(JsonSchema)]
179#[serde(deny_unknown_fields)]
180#[allow(dead_code)]
181struct DevTable {
182    /// Local Hyperdrive connection strings, keyed by the `Postgres`
183    /// capability's name.
184    hyperdrive: Option<std::collections::BTreeMap<String, DevHyperdriveEntry>>,
185    /// Acknowledges that Workers AI has no local simulation: under `bynk dev`
186    /// a call runs on your Cloudflare account and may incur charges. `bynk dev`
187    /// warns once, on the first call, unless this is `"allow"`. See Cloudflare's
188    /// Workers AI pricing page.
189    ai: Option<DevAck>,
190    /// Acknowledges that Vectorize has no local simulation: under `bynk dev` a
191    /// call runs against your own index on your Cloudflare account and may
192    /// incur charges. `bynk dev` warns once, on the first call, unless this is
193    /// `"allow"`. See Cloudflare's Vectorize pricing page.
194    vectorize: Option<DevAck>,
195    /// The Vectorize index of your own that `bynk dev` binds, keyed by the
196    /// `Vectorize` capability's name (`Docs = "docs-dev"`). It must already
197    /// exist with the declaration's dimensions and metric: `bynk dev` never
198    /// creates one, and never uses the deploy's derived name. A capability
199    /// with no entry is unbound under `bynk dev`.
200    #[serde(rename = "vectorize-index")]
201    vectorize_index: Option<std::collections::BTreeMap<String, String>>,
202    /// Acknowledges that AI Search has no local simulation: under `bynk dev`
203    /// a call goes to your deployed instance on your Cloudflare account and may
204    /// incur charges. `bynk dev` warns once, on the first call, unless this is
205    /// `"allow"`. See Cloudflare's AI Search pricing page.
206    #[serde(rename = "ai-search")]
207    ai_search: Option<DevAck>,
208    /// Acknowledges that an mTLS certificate binding has no local simulation: under `bynk dev` a
209    /// call runs on Cloudflare, presenting your account's certificate to the origin the URL
210    /// names, so it needs a certificate `bynk deploy` has linked. `bynk dev` warns once, on the
211    /// first call, unless this is `"allow"`. See Cloudflare's mTLS bindings page.
212    mtls: Option<DevAck>,
213    /// Acknowledges that Analytics SQL has no local implementation: under `bynk dev` a query
214    /// runs on your Cloudflare account and reads your deployed datasets. `bynk dev` warns once,
215    /// on the first query, unless this is `"allow"`. See Cloudflare's Analytics Engine SQL API
216    /// page.
217    #[serde(rename = "analytics-sql")]
218    analytics_sql: Option<DevAck>,
219}
220
221/// The one value a `[dev]` acknowledgement takes.
222#[derive(JsonSchema)]
223#[allow(dead_code)]
224enum DevAck {
225    /// Silence the warning.
226    #[serde(rename = "allow")]
227    Allow,
228}
229
230/// One `Postgres` capability's connection string under `bynk dev`.
231#[derive(JsonSchema)]
232#[serde(deny_unknown_fields)]
233#[allow(dead_code)]
234struct DevHyperdriveEntry {
235    /// The name of the environment variable `bynk dev` reads the local
236    /// connection string from, and hands to `wrangler dev` as
237    /// `CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_<BINDING>`.
238    connection_env: String,
239}
240
241/// Defaults for `bynk build`, which takes no flags. A flag overrides its key.
242/// `bynk compile` and `bynk dev`/`deploy`/`test` do not read this table.
243#[derive(JsonSchema)]
244#[serde(deny_unknown_fields)]
245#[allow(dead_code)]
246struct BuildTable {
247    /// The output directory, relative to the project root. Must stay inside
248    /// the project. Default: `"out"`.
249    #[schemars(extend("default" = "out"))]
250    out: Option<String>,
251    /// The build topology: `"bundle"` is one deployment unit, `"workers"` one
252    /// Cloudflare Worker per context. Default: `"bundle"`.
253    #[schemars(extend("enum" = ["bundle", "workers"], "default" = "bundle"))]
254    target: Option<String>,
255    /// The surface binding: `"cloudflare"`, `"node"` or `"browser"` (`bundle`
256    /// only). Default: `"cloudflare"`.
257    #[schemars(extend("enum" = ["cloudflare", "node", "browser"], "default" = "cloudflare"))]
258    platform: Option<String>,
259    /// The artefact language: `"ts"` (typed TypeScript) or `"js"` (types
260    /// stripped). Default: `"ts"`.
261    #[schemars(extend("enum" = ["ts", "js"], "default" = "ts"))]
262    emit: Option<String>,
263    /// The package manager that installs the npm packages of the build
264    /// directory `bynk test`, `bynk dev` and `bynk deploy` generate:
265    /// `"npm"`, `"pnpm"`, `"bun"` or `"yarn"` (Yarn classic). Unset, bynk
266    /// detects the one you use, from the `packageManager` field of the project
267    /// root's `package.json`, then a lockfile there, then how bynk was
268    /// started, then the first of npm, pnpm and bun on PATH. The environment
269    /// variable `BYNK_PACKAGE_MANAGER` overrides this.
270    #[schemars(extend("enum" = ["npm", "pnpm", "bun", "yarn"]))]
271    package_manager: Option<String>,
272    /// Where `bynk build` writes the typed TypeScript client for the project's
273    /// `from http` services (#3508). Absent, `bynk build` writes none.
274    client: Option<ClientTable>,
275}
276
277/// `[build.client]`: the typed TypeScript client `bynk build` writes beside its
278/// other outputs. `bynk client` reads it for the flags it is not given.
279#[derive(JsonSchema)]
280#[serde(deny_unknown_fields)]
281#[allow(dead_code)]
282struct ClientTable {
283    /// Where to write the client, relative to the project root: a `.ts` file with
284    /// `layout = "file"`, a directory with `layout = "dir"`. It may leave the
285    /// project, since a front end often lives beside the Bynk project.
286    out: String,
287    /// `"file"` writes one module; `"dir"` writes `index.ts`, `types.ts`,
288    /// `codecs.ts` and `runtime.ts`. Default: `"file"`.
289    #[schemars(extend("enum" = ["file", "dir"], "default" = "file"))]
290    layout: Option<String>,
291    /// The `from http` services to include, as `Name` or `unit.Name`. Default:
292    /// every one.
293    service: Option<Vec<String>>,
294}
295
296/// Switches for checks that read more than the source.
297#[derive(JsonSchema)]
298#[serde(deny_unknown_fields)]
299#[allow(dead_code)]
300struct CheckTable {
301    /// Whether each literal `D1` statement is prepared against the schema the
302    /// binding's migrations build, so a syntax error, an unknown table or
303    /// column, or a wrong parameter count is reported by `bynk check`. Turn it
304    /// off for a project whose SQL depends on tables created some other way,
305    /// such as DDL run at request time. Default: `true`.
306    #[schemars(extend("default" = true))]
307    d1_sql: Option<bool>,
308}
309
310/// Named build profiles, read by `bynk build --profile <name>` (default
311/// `release`). Only `dev` and `release` exist. A value here overrides the
312/// profile's built-in default, and a command-line flag overrides both.
313/// `bynk test`, `dev`, `deploy` and `compile` do not read this table.
314#[derive(JsonSchema)]
315#[serde(deny_unknown_fields)]
316#[allow(dead_code)]
317struct ProfileTable {
318    /// The `dev` profile.
319    dev: Option<ProfileSettings>,
320    /// The `release` profile.
321    release: Option<ProfileSettings>,
322}
323
324/// One profile's settings.
325#[derive(JsonSchema)]
326#[serde(deny_unknown_fields)]
327#[allow(dead_code)]
328struct ProfileSettings {
329    /// Whether the build carries the function-contract call-site guard.
330    /// Default: `true` in `dev`, `false` in `release`.
331    contracts: Option<bool>,
332}
333
334/// Opts in to experimental standard-library items, which carry no
335/// compatibility promise and can't be used until they are listed here.
336#[derive(JsonSchema)]
337#[serde(deny_unknown_fields)]
338#[allow(dead_code)]
339struct UnstableTable {
340    /// Item paths to allow: a unit (`bynk.cloudflare`), an item it exports
341    /// (`bynk.cloudflare.Kv`), or a capability operation
342    /// (`bynk.cloudflare.Kv.list`). An entry covers its path and everything
343    /// under it. Default: `[]`.
344    #[schemars(extend("default" = []))]
345    allow: Option<Vec<String>>,
346}
347
348/// The deployments `bynk test --against <name>` may run the `system` suites
349/// against (end-to-end testing). A bare URL is never accepted on the command
350/// line: a target has to be named here.
351#[derive(JsonSchema)]
352#[serde(deny_unknown_fields)]
353#[allow(dead_code)]
354struct TestTable {
355    /// Named targets, as `[test.targets.<name>]`. `dev` is reserved for the
356    /// local `bynk dev` the runner starts itself.
357    targets: Option<std::collections::BTreeMap<String, TestTargetTable>>,
358    /// What `bynk test --mutate` leaves unmutated.
359    mutate: Option<TestMutateTable>,
360    /// What a test's `Postgres` instance is: `"stub"` (a test never reaches a
361    /// database; each operation faults until it is stubbed) or `"pglite"`
362    /// (PGlite, Postgres compiled to WASM, runs the statements on a fresh
363    /// in-memory database per case, with `schema.sql` applied). Default:
364    /// `"stub"`.
365    #[schemars(extend("default" = "stub"))]
366    postgres: Option<TestPostgresKind>,
367}
368
369/// The values of `[test] postgres`.
370#[derive(JsonSchema)]
371#[serde(rename_all = "lowercase")]
372#[allow(dead_code)]
373enum TestPostgresKind {
374    Stub,
375    Pglite,
376}
377
378/// `bynk test --mutate`'s configuration.
379#[derive(JsonSchema)]
380#[serde(deny_unknown_fields)]
381#[allow(dead_code)]
382struct TestMutateTable {
383    /// Path globs (`src/generated/**`) and `unit.decl` names
384    /// (`orders.legacy_refund`) whose operators are never mutated. Default: `[]`.
385    #[schemars(extend("default" = []))]
386    exclude: Option<Vec<String>>,
387}
388
389/// One deployment `bynk test --against <name>` runs against.
390#[derive(JsonSchema)]
391#[serde(deny_unknown_fields)]
392#[allow(dead_code)]
393struct TestTargetTable {
394    /// Each Worker's base URL, keyed by its worker-directory name
395    /// (`url.shop-orders = "https://shop-orders-preview.example.workers.dev"`).
396    url: std::collections::BTreeMap<String, String>,
397    /// The names of the secrets the deployed Workers verify with. Their values
398    /// are read from the environment when the suites run, never from this
399    /// file. Default: `[]`.
400    #[schemars(extend("default" = []))]
401    secrets: Option<Vec<String>>,
402    /// The non-secret values the target was deployed with. A case runs
403    /// against the target only if its `env` agrees with them. Default: `{}`.
404    vars: Option<std::collections::BTreeMap<String, String>>,
405    /// Marks a production deployment, which `--against` refuses. Default:
406    /// `false`.
407    #[schemars(extend("default" = false))]
408    production: Option<bool>,
409}
410
411/// A shareable project's identity. A project has `[package]` or `[project]`,
412/// never both.
413#[derive(JsonSchema)]
414#[serde(deny_unknown_fields)]
415#[allow(dead_code)]
416struct PackageTable {
417    /// The package's name, `organisation/package` (`acme/money`). The
418    /// organisation matches `[a-z][a-z0-9-]*`; the package matches
419    /// `[a-z][a-z0-9_]*` and isn't a Bynk keyword, since a dependency's
420    /// alias defaults to it. The organisation `bynk` is reserved.
421    #[schemars(extend("pattern" = "^[a-z][a-z0-9-]*/[a-z][a-z0-9_]*$"))]
422    name: String,
423    /// The package's version, in strict semver (`1.4.0`). Publishing will
424    /// require it.
425    version: Option<String>,
426    /// A one-line description of the package.
427    description: Option<String>,
428    /// The package's licence, as an SPDX expression (`MIT`).
429    license: Option<String>,
430    /// The URL of the package's source repository.
431    repository: Option<String>,
432    /// The units the package shares: commons and adapters it declares, never
433    /// a context. Default: every commons and adapter.
434    exports: Option<Vec<String>>,
435}
436
437/// One dependency: `package`, and exactly one of `version`, `git` (with
438/// `rev`) or `path`. `path` and `git` dependencies resolve (`git` through
439/// `bynk.lock`); `version` is refused until packaging slice 4.
440#[derive(JsonSchema)]
441#[serde(deny_unknown_fields)]
442#[allow(dead_code)]
443struct DependencyEntry {
444    /// The package, as `organisation/package`.
445    package: String,
446    /// A pinned version range from the registry (`^1.4`). Refused until
447    /// packaging slice 4.
448    version: Option<String>,
449    /// A git repository URL (`https://`, `ssh://` or `user@host:path`). Needs
450    /// `rev`; locked to a commit in `bynk.lock`.
451    git: Option<String>,
452    /// The tag, branch or commit of `git` to use.
453    rev: Option<String>,
454    /// A directory holding the package's `bynk.toml`, relative to this
455    /// project.
456    path: Option<String>,
457}
458
459/// The packages this project depends on, keyed by alias: the name source
460/// reaches each one's units by (`<alias>.<unit>`). An alias matches
461/// `[a-z][a-z0-9_]*`, isn't a Bynk keyword, and isn't `bynk`. Only a
462/// dependency's exported commons and adapters are reachable.
463#[derive(JsonSchema)]
464#[schemars(extend("propertyNames" = { "pattern": "^[a-z][a-z0-9_]*$" }))]
465#[allow(dead_code)]
466struct DependenciesTable(std::collections::BTreeMap<String, DependencyEntry>);
467
468/// The packages only this project's tests depend on, keyed by alias, as in
469/// `[dependencies]`. Only a suite may reach them, and a deployable build
470/// never includes them.
471#[derive(JsonSchema)]
472#[schemars(extend("propertyNames" = { "pattern": "^[a-z][a-z0-9_]*$" }))]
473#[allow(dead_code)]
474struct DevDependenciesTable(std::collections::BTreeMap<String, DependencyEntry>);
475
476/// One package registry. Credentials never go here: a token is read from
477/// `BYNK_REGISTRY_<NAME>_TOKEN` or the user credentials file.
478#[derive(JsonSchema)]
479#[serde(deny_unknown_fields)]
480#[allow(dead_code)]
481struct RegistryEntry {
482    /// The registry's index URL: `https://`, or `http://` to `localhost` only.
483    index: String,
484    /// The organisations whose packages resolve on this registry. An
485    /// organisation is listed under one registry at most, and never `bynk`.
486    organisations: Option<Vec<String>>,
487    /// The registry this one mirrors: `bynk` (the first-party registry) or
488    /// another registry here that isn't itself a mirror. Not with
489    /// `organisations`.
490    #[serde(rename = "mirror-of")]
491    mirror_of: Option<String>,
492    /// The registry's pinned signing key, `ed25519:<base64>`.
493    key: Option<String>,
494}
495
496/// Package registries, keyed by name (`[a-z][a-z0-9-]*`, not `bynk`). Checked
497/// now, used once packages are fetched. In a workspace, only the root declares
498/// them.
499#[derive(JsonSchema)]
500#[schemars(extend("propertyNames" = { "pattern": "^[a-z][a-z0-9-]*$" }))]
501#[allow(dead_code)]
502struct RegistriesTable(std::collections::BTreeMap<String, RegistryEntry>);
503
504/// Makes this directory a workspace root: a group of projects that `bynk
505/// check`, `fmt` and `test` run across. A workspace root isn't a project:
506/// its `bynk.toml` holds only `[workspace]` and `[registries]`.
507#[derive(JsonSchema)]
508#[serde(deny_unknown_fields)]
509#[allow(dead_code)]
510struct WorkspaceTable {
511    /// The member directories, relative to the root. A component may use `*`
512    /// and `?`, each `*` within one directory level (`packages/*`). Each
513    /// member holds its own `bynk.toml`.
514    members: Vec<String>,
515    /// Directories `members` matches that aren't members, as patterns.
516    /// Default: `[]`.
517    #[schemars(extend("default" = []))]
518    exclude: Option<Vec<String>>,
519}
520
521/// The schema of the `bynk.toml` table `name`, or `None` for a table this
522/// crate doesn't describe (`fmt`, which is `bynk-fmt`'s, or an unknown name).
523pub fn table_schema(name: &str, generator: &mut SchemaGenerator) -> Option<Schema> {
524    Some(match name {
525        "project" => generator.subschema_for::<ProjectTable>(),
526        "paths" => generator.subschema_for::<PathsTable>(),
527        "lsp" => generator.subschema_for::<LspTable>(),
528        "workers" => generator.subschema_for::<WorkersTable>(),
529        "deploy" => generator.subschema_for::<DeployTable>(),
530        "dev" => generator.subschema_for::<DevTable>(),
531        "build" => generator.subschema_for::<BuildTable>(),
532        "check" => generator.subschema_for::<CheckTable>(),
533        "profile" => generator.subschema_for::<ProfileTable>(),
534        "unstable" => generator.subschema_for::<UnstableTable>(),
535        "test" => generator.subschema_for::<TestTable>(),
536        "package" => generator.subschema_for::<PackageTable>(),
537        "workspace" => generator.subschema_for::<WorkspaceTable>(),
538        "dependencies" => generator.subschema_for::<DependenciesTable>(),
539        "dev-dependencies" => generator.subschema_for::<DevDependenciesTable>(),
540        "registries" => generator.subschema_for::<RegistriesTable>(),
541        _ => return None,
542    })
543}