It would be nice to have the steps broken out and configurable.
Pull all relevant data from Salesforce.
Probably with filters applied so we don't over-fetch data.
Tweak & add data needed for types.
a. Exclude fields
b. Convert API names to clean property names
c. Renaming duplicate fields
c. Anything else. The more logic we can move to this step the simpler the type generation will be.
Based on output from above step generate types
The smaller we can get the functions the more customizable it will be.