🚀 Enhancements
fix(commands): rename semantic_type to provides for custom command args/flags @osterman (#2964)
## what- Add a
provides:field to custom-commandarguments:andflags:, replacing the two inconsistent spellings of the same "this value provides the component/stack name" concept:type: component/type: stackon arguments, andsemantic_type: component/semantic_type: stackon flags. - Deprecate
Type(onCommandArgument) andSemanticType(onCommandFlag) via the existingjsonschema_extrasdeprecation pattern (schema marks themdeprecatedwithx-atmos-replacement: provides), with a newEffectiveProvides()helper so existing configs using the old fields keep working unchanged. - Regenerate the committed JSON Schema and update docs (
arguments.mdx,flags.mdx,component.mdx,custom.mdx), theexamples/custom-components/fixture, and theatmos-modernizationskill's legacy-pattern checklist.
why
semantic_typeexisted only onCommandFlagbecauseFlag.Typewas already used for the flag's data type (string/bool);CommandArgument.Typecarried the identical role under a different name purely because arguments don't have a competing data-type field. Same concept, two field names, driven by an implementation detail rather than a naming decision.provides:uses one consistent field name on both arguments and flags, and matches the wording the docs already used to describe the behavior in prose ("this flag provides the stack name").- This field shipped in a prior release (custom component types, #1904), so the rename is backward-compatible: old configs keep working, marked deprecated, rather than breaking on upgrade.
references
N/A
Summary by CodeRabbit
-
New Features
- Added
providesconfiguration for identifying component and stack values in command arguments and flags. - Updated completion and value resolution to use the new metadata.
- Added
-
Bug Fixes
- Preserved compatibility with existing
typeandsemantic_typeconfigurations, with the newprovidesvalue taking precedence.
- Preserved compatibility with existing
-
Documentation
- Updated command configuration guides and examples to use
provides. - Marked legacy configuration fields as deprecated while documenting continued support.
- Updated command configuration guides and examples to use