fix(bun): support extra generated model fields #5
Reference in New Issue
Block a user
Delete Branch "fix/bun-extra-fields-issue-4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Test Plan
Closes #4
The extra fields flag must not be a string. Its hard to pass. It must be a path to a file and we need to read that file for the flags
Addressed review feedback:
--extra-fieldsnow expects a path to a JSON file instead of inline JSON. The CLI reads and validates the file, then passes the JSON content into the Bun writer metadata. Updated README examples/docs accordingly.\n\nVerification:\n-go test ./...passes\n-git diff --checkpasses\n- Built CLI and smoke-tested DBML -> Bun with--extra-fields /tmp/relspec-extra-fields.json, confirming the generated model contains the computedThoughtCountscan-only field.Addressed review feedback:
--extra-fieldsnow expects a path to a JSON file instead of inline JSON.Details:
--extra-fields <path>extra_fields--extra-fields extra-fields.jsonVerification:
go test ./...passesgit diff --checkpasses--extra-fields /tmp/relspec-extra-fields.jsonThoughtCountscan-only fieldOk. Looks good now.