Commit c7fa8cb
committed
Migrate ts-rs to but-ts (schemars) for SDK type generation
Replace ts-rs (export-ts) with schemars-based but-ts for all SDK types,
and introduce where missing, removing hand-written TypeScript duplicates
and wiring everything through @gitbutler/but-sdk.
Types migrated to export-schema / register_sdk_type!:
- gitbutler-branch-actions: BranchListingFilter, BranchListing, Author,
StackReference, BranchListingDetails, StackOrder, SeriesOrder, and all
upstream integration types (NameAndStatus, StackStatus, Resolution,
etc.)
- gitbutler-edit-mode: ConflictEntryPresence (new export-schema feature)
- but-api/legacy/modes: HeadAndMode, HeadSha
- but-workspace: StackDetails (added missing register_sdk_type! call)
Infrastructure:
- Add export-schema feature to gitbutler-branch-actions and
gitbutler-edit-mode with conditional schemars guards
- Propagate gitbutler-branch/export-schema through but-api export-schema
- Add --source-crates filter to but-ts to avoid false name-collision
errors
- Fix but-ts to emit T | null (not T | null | undefined) for nullable
fields, since no SDK types use skip_serializing_if
- Remove duplicate author.rs from gitbutler-branch-actions
- Fix broken TypeScript imports across ~40 desktop app files to import
directly from declaration sites (no re-exports)1 parent c9f76e7 commit c7fa8cb
226 files changed
Lines changed: 1772 additions & 3008 deletions
File tree
- .github/workflows
- apps/desktop
- src
- components
- branchesPage
- branch
- codegen
- commit
- diff
- files
- forge
- irc
- projectSettings
- settings
- stack
- upstream
- views
- workspace
- lib
- actions
- ai
- analytics
- baseBranch
- bootstrap
- branches
- codegen
- commits
- config
- dependencies
- dragging
- files
- forge
- github
- gitlab
- interface
- git
- history
- hunks
- irc
- mode
- project
- rules
- selection
- settings
- stacks
- state
- support
- testing
- upstream
- worktree
- routes/[projectId]/edit
- crates
- but-action
- src
- but-api
- src/legacy
- but-core
- src
- but-forge
- src
- but-github
- src
- but-gitlab
- src
- but-hunk-assignment
- src
- but-settings
- src
- but-ts/src
- but-workspace
- src
- legacy
- ui
- but/src/command/legacy
- pull
- status
- gitbutler-branch-actions
- src
- tests/branch-actions/virtual_branches
- gitbutler-edit-mode
- src
- gitbutler-operating-modes/src
- packages
- but-sdk
- src/generated
- core
- src/generated
- action
- core
- refMetadata
- forge
- github
- gitlab
- hunkAssignment
- settings
- workspace
- legacy
- refInfo
- ui/src/lib
- components
- file
- select
- focus
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | 94 | | |
116 | 95 | | |
117 | 96 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 5 | + | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
| |||
26 | 20 | | |
27 | 21 | | |
28 | 22 | | |
| 23 | + | |
29 | 24 | | |
30 | 25 | | |
31 | 26 | | |
| |||
0 commit comments