-
Notifications
You must be signed in to change notification settings - Fork 349
feat: base api-client impl #4694
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
Conversation
|
We will figure out publishing at a later date. |
Prospector
left a comment
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.
overall, quite cool but quite concerned that the tauri implementation is not doing what we want
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.
Pull Request Overview
This PR implements a new @modrinth/api-client package to provide a flexible, type-safe API client for Modrinth's APIs (Labrinth, Kyros, and Archon). The implementation supports multiple platforms (Node.js, browsers, Nuxt, Tauri) with a composable feature system for authentication, retries, circuit breaking, and logging.
Key changes:
- New modular API client package with platform-specific implementations
- Feature system for composable request/response processing (auth, retry, circuit breaker, verbose logging)
- Migration of projects v2/v3 functionality from utils package to new client modules
- Frontend app updated to use new DI-based client singleton
Reviewed Changes
Copilot reviewed 41 out of 45 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/api-client/* | New package with core client, features, modules, and platform implementations |
| packages/utils/api/* | Removed old API implementation now replaced by api-client package |
| packages/ui/src/providers/api.ts | Removed old API provider in favor of new client |
| apps/frontend/src/providers/api-client.ts | New DI provider for Nuxt client singleton |
| apps/frontend/src/app.vue | Updated to use new client provider |
| apps/frontend/src/error.vue | Updated to provide client in error page |
| apps/frontend/src/pages/[type]/[id]/settings/*.vue | Updated to use new client API |
| pnpm-lock.yaml | Added api-client dependencies |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Calum H. <hendersoncal117@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Calum H. <hendersoncal117@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Calum H. <hendersoncal117@gmail.com>
Prospector
left a comment
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.
approved, but only use for archon and kyros for now. Labrinth stuff needs more cooking/maybe a different solution
Uh oh!
There was an error while loading. Please reload this page.