Closed matthewvolk closed 7 months ago
Latest commit: 8dc6640fecdbcc45517bf6a0f8ac0cca57353c6f
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Also needs a changeset
Summary
Resolves #134
Abstract core logic for
generate-schema
andgenerate-output
CLI commands into importable Node.js APIs.Set of changes
The diff is large, but the code is largely the same, mostly just moved around:
generateSchema
is unchanged, with the exception of header parsing being pulled out of the function and now headers are passed in as aRecord<string,string>
. Additionally,cwd
is now an optional parameter (helpful when this methods are called from a directory outside of the directory containing your project'stsconfig.json
file, e.g.,npm create some-project
).generateTadaTypes
is almost entirely unchanged,cwd
is now an optional parameter.