terradart_codegen 0.3.0-dev
terradart_codegen: ^0.3.0-dev copied to clipboard
terradart Stage 1 codegen — parses Terraform provider schema JSON and Magic Modules YAML and emits annotated abstract Dart classes. Ships the terradart CLI.
Changelog #
0.3.0-dev - 2026-05-16 #
No user-facing CLI changes. WrapperOverride YAML registry expands from 30 to 49 resources (Wave 4 additions: see terradart_google 0.3.0-dev for the resource list). Plan 5.A's 5 universal QA gates continue to hold over the expanded registry. Workspace consistency bump alongside terradart_google 0.3.0-dev.
0.2.1-dev - 2026-05-16 #
No API change since 0.2.0-dev. Re-published after the 0.2.0-dev tag's publish run failed at the parallel matrix validation step — terradart_codegen was uploaded before pub.dev's index had terradart_core 0.2.0-dev, causing the ^0.2.0-dev constraint to fail version solving. 0.2.1-dev ships through a re-ordered publish pipeline (publish-codegen now waits for publish-no-deps to complete + pub.dev index propagation before uploading).
0.2.0-dev - 2026-05-16 #
Added #
extraSensitiveFields:yaml override axis — curators can declare per-resource sensitive paths beyond what the Terraform schema flags. Each entry is a dotted path (e.g.metadata_startup_script); the resulting<Resource>Sensitiveconst ships the union of schema-declared and curator-declared paths.terradart wrap --only=<resource>— regenerates a single wrapper file even when sibling yaml overrides have validation errors. Designed for the case where unrelated breakage in another resource blocks the whole-packagewrapcycle.wrap-promotenow extracts enum candidates from prose descriptions matchingPossible values: A, B, Cin addition to schemaenum_valuesblocks. Falls back to the prose set when the schema declares no enum, with MM yaml taking priority when both are present.- 5 universal QA gates (CI-only invariants over
terradart_google/lib/src/**):paramOrdercovers every required schema attribute, emitted enumterraformValuematches schemaenum_values, noUnimplementedError('TODO(wrap-promote)')ships in the curated source, every emitted enum member is lowerCamelCase, and sensitive path masking round-trips to"".
0.1.0-dev - 2026-05-14 #
Added #
- New
terradart wrap-promotesubcommand. Scans a curated override yaml against the parsed provider schema and appends a# === wrap-promote additions ===marker block proposingenum_valuesblocks anddartTypeOverridesentries for fields whose schema declares a fixed value set. Authors review, integrate into the mainprelude:/dartTypeOverrides:blocks, then strip the marker. Naming choices stay with the human. dartTypeOverridesnow correctly handles ALL_CAPS leaf field names (ADD_COST_TO_MED→addCostToMed), Dart reserved words via aCasesuffix (default→defaultCase), and aggregates all generated enums into a singleprelude: |block per resource.- Schema descriptions containing literal
$(e.g. BigQuery'ssample_table$20190123partition-decorator example) and over-escaped apostrophes (e.g.compute_instance.advanced_machine_features.visible_core_count'sinstance\'s nominal CPU) are now sanitized at the parser layer ($→$,\'→') so the generated.schema.g.dartremains parseable Dart. ProviderRulesabstraction lets non-hashicorp/googleproviders ship their own resource allow/deny lists, output-dir aliases, and slot-resolution rules.GoogleProviderRulesis the built-in implementation for the google provider; existing behaviour is unchanged.- WrapperOverride YAML registry expanded from 13 to 27 resources + 1 data source.
0.0.4-dev - 2026-05-11 #
- feat: new
terradart wrapsubcommand regenerates the curated factory wrapper files from the package's production YAML overrides. Flags:--provider,--source,--output,--check(CI-gate mode, exit 65 on divergence),--force(overwrite non-generated files). - feat:
DataSourceWrapperEmitterproduces data source Layer 2 factories (final class X extends Data<$X>).DataSourceClassEmitterproduces Layer 1 schema carriers (data_<resource>.schema.dart). - feat: WrapperOverride YAML schema extended from 11 to 15 axes (
kind,outputDir,schemaStubBodyMode,fileLeadingComment); kind dispatches resource vs data source overrides. - feat:
LoaderErrorReportaggregates YAML override validation failures into a single report with stable error codes (E101unknownKind, E102outputDirRequired, E103outputDirInvalid, E104outputDirMismatchForDataSource, E201axisNotAllowedForDataSource, E301checkMismatch, E401refuseOverwriteNonGenerated). - feat:
generatedFileHeaderconstant prepended to all wrap-emitted files (3 lines: GENERATED FILE marker + regen hint +ignore_for_file: prefer_relative_imports). - chore: production YAML registry covers 12 resources + 1 data source (google_project).
0.0.3-dev - 2026-05-09 #
- Fix: rename terradart_core main library file to match package name.
0.0.2-dev - 2026-05-09 #
- CI automated publishing via OIDC trusted publisher.
- Fix: prepare_publish.sh now syncs version from tag name.
0.0.1-dev - 2026-05-09 #
Added #
- Initial pre-alpha release of
terradart_codegen. terradart codegenCLI — consumesterraform providers schema -jsonoutput (+ optional Magic Modules YAML overlay) and emits annotated abstract Dart classes forschemantic.- Pipelines together with
terradart_annotationsto feedpackage:schemantic/build_runnercodegen.
Notes #
- Pre-alpha — emitted symbol names and CLI flags may change between 0.0.x releases.