Skip to content

chore: auto generate apiClient #64

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

Merged
merged 7 commits into from
Apr 11, 2025
Merged

Conversation

fmenezes
Copy link
Collaborator

No description provided.

@fmenezes fmenezes marked this pull request as ready for review April 11, 2025 14:33
Comment on lines 10 to 11
static async fromResponse(response: Response, message?: string): Promise<ApiClientError> {
message ||= `error calling Atlas API`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
static async fromResponse(response: Response, message?: string): Promise<ApiClientError> {
message ||= `error calling Atlas API`;
static async fromResponse(response: Response, message: string = 'error calling Atlas API'): Promise<ApiClientError> {

scripts/apply.ts Outdated
@@ -0,0 +1,96 @@
import fs from "fs";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
import fs from "fs";
import fs from "fs/promises";

try this to avoid promisify 🙂

src/logger.ts Outdated
});
});
}
const mkdirAsync = promisify(fs.mkdir);
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here with fs/promises

@fmenezes fmenezes requested a review from gagik April 11, 2025 14:50
Copy link
Collaborator

@gagik gagik left a comment

Choose a reason for hiding this comment

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

Nice 🚀 A bit scary to mix auto-generated and and regular code in one place but it does give a nice DevEx so seems worth it

@fmenezes
Copy link
Collaborator Author

Nice 🚀 A bit scary to mix auto-generated and and regular code in one place but it does give a nice DevEx so seems worth it

I started with a template, but unfortunately the devex was much worse

@fmenezes fmenezes merged commit 9286078 into main Apr 11, 2025
4 checks passed
@fmenezes fmenezes deleted the fmenezes/autoGenerateApiClient branch April 11, 2025 14:57
nirinchev added a commit that referenced this pull request Apr 11, 2025
* main:
  chore: auto generate apiClient (#64)
  refactor: rename state to session, combine tool registration, and clearer dependencies (#55)
  chore: add type-powered eslint rules (#62)
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.

2 participants