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: Moved axios instance into Configuration and using it as single source of truth #23

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

AlexDochioiu
Copy link
Contributor

Summary

Feature: User can now give its own axios instance to be used. If none is given, global one is used. This allows additional configurations such as using axios interceptors, etc.

Chore: This also consolidates Configuration as the single source of truth for the axios instance.

Type of Change

Please mark the relevant option(s) for your pull request:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code refactoring (improving code quality without changing its behavior)
  • Documentation update (adding or updating documentation related to the project)

Checklist

Please ensure that your pull request meets the following criteria:

  • I have read the Contributing Guide
  • My code follows the project's coding style and best practices
  • My code is appropriately commented and includes relevant documentation
  • I have added tests to cover my changes
  • All new and existing tests pass
  • I have updated the documentation, if necessary

@AlexDochioiu AlexDochioiu requested a review from a team as a code owner November 1, 2023 12:38
baseOptions?: any;
readonly apiKey: string;
readonly network: MaestroSupportedNetworks;
readonly baseOptions?: AxiosRequestConfig;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the appropriate type here. But this should probably be removed altogether if we allow user to pass the axios instance.
P.s. I didn't do it in this PR because 1) it's a breaking change and 2) it would have made it harder to review.

@sourabhxyz
Copy link
Contributor

Thanks for your contribution @AlexDochioiu! @Vardominator Could you handle the versioning aspect of this PR (changeset)?

@Vardominator Vardominator merged commit cbb1924 into maestro-org:main Nov 2, 2023
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.

3 participants