Skip to content

feat(tx3c): add json helper to the codegen renderer#325

Merged
scarmuega merged 1 commit into
mainfrom
feat/codegen-json-helper
May 20, 2026
Merged

feat(tx3c): add json helper to the codegen renderer#325
scarmuega merged 1 commit into
mainfrom
feat/codegen-json-helper

Conversation

@scarmuega
Copy link
Copy Markdown
Contributor

Summary

  • Adds a json Handlebars helper to tx3c codegen that serializes any TII node to a compact JSON string.
  • handlebars-rust renders JSON objects as the literal [object]; without this helper, codegen plugins cannot faithfully embed tii.profiles / tii.environment into generated bindings.

Why

First PR in a fleet-wide codegen-plugin update. The four SDK .trix/client-lib/ plugins are being ported/completed to embed profile + environment data; their render-fixture tests depend on a tx3c release built from this PR.

Test plan

  • cargo build -p tx3c
  • Render a template using {{{json tii.profiles}}} and confirm the output is valid JSON

🤖 Generated with Claude Code

The Handlebars renderer rendered JSON objects as the literal string
`[object]`, so templates could not embed structured TII data such as
`tii.profiles` and `tii.environment` into generated bindings. The new
`json` helper serializes any TII node to a compact JSON string.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant