Skip to content

feat: custom base url support#109

Merged
Thor963 merged 3 commits into
alphafrom
feat/custom-base-url
Jun 6, 2026
Merged

feat: custom base url support#109
Thor963 merged 3 commits into
alphafrom
feat/custom-base-url

Conversation

@Thor963

@Thor963 Thor963 commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request introduces support for a custom base URL across Android, iOS, and JavaScript components. The implementation is thorough, covering configuration storage, API constant updates, and integration into the API client. The use of a shared StallionApiBaseUrl utility on native platforms and getApiBaseUrl on JS ensures consistency and centralizes logic. Caching for the base URL in JS is a good performance optimization.

Overall, the feature is well-implemented and follows good practices for cross-platform development. The deprecation strategy for old constants is also well-handled.


Generated by StallionDevX

@stalliondevx stalliondevx Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 StallionDevX AI Review

Quality Score: █████████░ 90/100

Verdict: comment

Summary

This pull request introduces support for a custom base URL across Android, iOS, and JavaScript components. The implementation is thorough, covering configuration storage, API constant updates, and integration into the API client. The use of a shared StallionApiBaseUrl utility on native platforms and getApiBaseUrl on JS ensures consistency and centralizes logic. Caching for the base URL in JS is a good performance optimization.

Overall, the feature is well-implemented and follows good practices for cross-platform development. The deprecation strategy for old constants is also well-handled.

🔵 Info (3)

  • Broad Exception Catch and Silent Failure (maintainability) — android/src/main/java/com/stallion/StallionModule.java:69
    Catching a generic Exception and only calling e.printStackTrace() can hide specific issues and make debugging harder. For a library, it's often better to log the error more explicitly or throw a more specific exception if the error is unrecoverable.
  • Broad Exception Catch and Silent Failure in Setter (maintainability) — android/src/main/java/com/stallion/utils/StallionApiBaseUrl.java:37
    Similar to StallionModule.java, catching a generic Exception and silently failing in the set method can obscure problems. While silent failure might be intended, it's good practice to at least log the error for debugging purposes.
  • Unintended Build Configuration Change in Example Project (style) — example/ios/StallionExample.xcodeproj/xcshareddata/xcschemes/StallionExample.xcscheme:41
    The build configuration for the LaunchAction in the example project's scheme was changed from Release to Debug. While this is in an example project, it might be an unintentional change for a feature PR.

Comment thread android/src/main/java/com/stallion/StallionModule.java Outdated
Comment thread android/src/main/java/com/stallion/utils/StallionApiBaseUrl.java
@Thor963 Thor963 merged commit 5dc99ec into alpha Jun 6, 2026
1 check passed
@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.0-alpha.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.5.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants