fix(bun): support extra generated model fields #5
Merged
warkanum
merged 2 commits from 2026-07-09 04:53:34 +00:00
fix/bun-extra-fields-issue-4 into master
Labels
Clear labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Low
4
The priority is low
Priority
Medium
3
The priority is medium
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
No labels
Milestone
No items
No Milestone
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wdevs/relspecgo#5
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.