Skip to content
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

feat: Codegen clients #38

Merged
merged 5 commits into from
Mar 11, 2024
Merged

feat: Codegen clients #38

merged 5 commits into from
Mar 11, 2024

Conversation

godu
Copy link
Contributor

@godu godu commented Mar 8, 2024

close #36

Let's introduce a cli to generate the binding for AWS clients.

How to do it

  1. Define a new package in .projenrc.ts (the package must have the same name as the AWS client) and run pnpm run synth-workspace.
  2. Run pnpm run codegen-client, select the package to generate
  3. Run pnpm run eslint --fix
  4. Commit the changes and enjoy

FYI

  • I tried to use plopjs, but it doesn't support async everywhere and it was going to be painful... I prefered use only enquirer.
  • I considerer the @effect-aws packages to have the same name as @aws-sdk. However it's not the case for @effect-aws/client-api-gateway-management-api, we may need to rename it.
  • In the tests, I don't use a real fixture as CommandInput. It could be improved later it we need.
const args = {} as unknown as XXXXXXXCommandInput;

@floydspace
Copy link
Owner

Amazing @godu, I can't wait to check how you implemented it. I will come back ASAP

@godu godu force-pushed the codegen-schema branch from 14068eb to fbbd446 Compare March 8, 2024 14:06
@godu godu mentioned this pull request Mar 8, 2024
@godu godu force-pushed the codegen-schema branch from fbbd446 to ce1356f Compare March 8, 2024 14:35
floydspace
floydspace previously approved these changes Mar 11, 2024
Copy link
Owner

@floydspace floydspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work @godu ,
indeed no plopjs or other generators needed so far.
I added one commit making additional choice of what command must be tested to simplify even more.
So I'm merging it

@floydspace floydspace merged commit 758d441 into floydspace:main Mar 11, 2024
3 checks passed
@godu godu deleted the codegen-schema branch March 12, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement effectful aws api codegen
2 participants