Expand description
faucet migrate — upgrade a config written against an older faucet
grammar to the current shape (#388).
Each migration is a pure serde_json::Value → serde_json::Value
transform with a before/after unit test. The command reads a config, applies
every rule, and (unless --check) rewrites it in place, printing which rules
fired. Migrations are idempotent: running migrate on an already-current
config changes nothing and exits 0.
Two rules ship today:
- Top-level
source:/sink:→pipeline.source/pipeline.sink(the pre-#54 shape). If the document has top-levelsource/sinkkeys and nopipeline, they move under a newpipeline:map. - Legacy auth → adjacently-tagged
{ type, config }(the pre-#113 shape). Anyauth:/credentials:object carrying atypestring plus sibling fields but noconfighas those siblings folded intoconfig.
Comments are not preserved (the config is parsed and re-serialized) — the
same limitation faucet fmt documents.
Functions§
- run
- Execute the
migratesubcommand.