-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: generate client with openapi-typescript #274
Conversation
Vercel deployment URL: https://token-metadata-cyhoaearf-hirosystems.vercel.app 🚀 |
"scripts": { | ||
"prepublishOnly": "npm run build", | ||
"build": "rimraf ./lib && npm run build:client --prefix .. && npm run build:node && npm run build:browser", | ||
"build:node": "tsc && cp -R src/generated lib/generated", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zone117x I noticed you didn't copy the generated types to the lib
dir in the Stacks API client. Not sure why that never worked for me in my tests so I had to do this instead. I also tried including the src
directory in the "files"
entry in this file but it made no difference because the included path was still incorrect.
Let me know if you have other ideas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually had to do the same thing here: hirosystems/stacks-blockchain-api#2110
I think you can also have the generator output a .ts
file rather than a .d.ts
file and then typescript will include a final .d.ts
in the output dir.
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
🎉 This PR is included in version 1.1.6 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This PR refactors the TS client to be generated with
openapi-typescript
instead ofswagger-codegen
. This allows us to ship it for recentnode
andtypescript
versions.Fixes #268
Fixes #193