-
Notifications
You must be signed in to change notification settings - Fork 2
Multi region auto switching support #43
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
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
fe70e52
chore: alpha pre-release setup
9fd89fd
CLI Refactor + Bundle Signing Support (#21)
sherlock-stallion 9c8eb55
Updated actions (#26)
sherlock-stallion f3ffcbd
feat: refactor CLI and added support for bundle signing (#27)
sherlock-stallion 82a7bad
chore(release): 2.1.0-alpha.1
65f9760
feat: windows RN executable Fix (#28)
sherlock-stallion d3c5627
chore(release): 2.1.0-alpha.2
58dd8f8
Merge branch 'main' of github.com:stallion-tech/stallion-cli into alpha
namanicebed 607a785
Merge branch 'main' of github.com:stallion-tech/stallion-cli into alpha
namanicebed 633636b
chore: Merge branch 'main' of github.com:stallion-tech/stallion-cli i…
namanicebed 2dcc12f
chore(release): 2.4.0-alpha.1
07ed7b6
chore: back merged main
22bc951
fix: multi region support (#41)
general-maximus-decimus a6e849b
chore(release): 2.5.0-alpha.1
9ea6cbc
chore: package version update
Thor963 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,141 +1,137 @@ | ||
| ## [2.4.3](https://github.com/stallion-tech/stallion-cli/compare/v2.4.2...v2.4.3) (2026-02-13) | ||
| # [2.5.0-alpha.1](https://github.com/stallion-tech/stallion-cli/compare/v2.4.3...v2.5.0-alpha.1) (2026-06-06) | ||
|
|
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * added Custom Bundle Path Option ([#40](https://github.com/stallion-tech/stallion-cli/issues/40)) ([d0ece26](https://github.com/stallion-tech/stallion-cli/commit/d0ece2668284eb011379244382aa5159ec6f2e82)) | ||
| * multi region support ([#41](https://github.com/stallion-tech/stallion-cli/issues/41)) ([22bc951](https://github.com/stallion-tech/stallion-cli/commit/22bc951527c60451e8056431f0f80e0054b035b8)) | ||
|
|
||
| ## [2.4.2](https://github.com/stallion-tech/stallion-cli/compare/v2.4.1...v2.4.2) (2026-01-19) | ||
|
|
||
| ### Features | ||
|
|
||
| * refactor CLI and added support for bundle signing ([#27](https://github.com/stallion-tech/stallion-cli/issues/27)) ([f3ffcbd](https://github.com/stallion-tech/stallion-cli/commit/f3ffcbdb3800a9043250f625662c757667f4a8ea)) | ||
| * windows RN executable Fix ([#28](https://github.com/stallion-tech/stallion-cli/issues/28)) ([65f9760](https://github.com/stallion-tech/stallion-cli/commit/65f9760cebbf0c84fcbfeafac02997bbd671fee3)) | ||
|
|
||
| ## [2.4.3](https://github.com/stallion-tech/stallion-cli/compare/v2.4.2...v2.4.3) (2026-02-13) | ||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * download progress ([f5c7802](https://github.com/stallion-tech/stallion-cli/commit/f5c78024f442ae34a67a1c258b5aa30f0f928b48)) | ||
| - added Custom Bundle Path Option ([#40](https://github.com/stallion-tech/stallion-cli/issues/40)) ([d0ece26](https://github.com/stallion-tech/stallion-cli/commit/d0ece2668284eb011379244382aa5159ec6f2e82)) | ||
|
|
||
| ## [2.4.1](https://github.com/stallion-tech/stallion-cli/compare/v2.4.0...v2.4.1) (2026-01-13) | ||
| ## [2.4.2](https://github.com/stallion-tech/stallion-cli/compare/v2.4.1...v2.4.2) (2026-01-19) | ||
|
|
||
| ### Bug Fixes | ||
|
|
||
| - download progress ([f5c7802](https://github.com/stallion-tech/stallion-cli/commit/f5c78024f442ae34a67a1c258b5aa30f0f928b48)) | ||
|
|
||
| ## [2.4.1](https://github.com/stallion-tech/stallion-cli/compare/v2.4.0...v2.4.1) (2026-01-13) | ||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * fixed Assets Issue ([#38](https://github.com/stallion-tech/stallion-cli/issues/38)) ([ce564a5](https://github.com/stallion-tech/stallion-cli/commit/ce564a5d00cdb151e8a577e012c685649f50ea3b)) | ||
| - fixed Assets Issue ([#38](https://github.com/stallion-tech/stallion-cli/issues/38)) ([ce564a5](https://github.com/stallion-tech/stallion-cli/commit/ce564a5d00cdb151e8a577e012c685649f50ea3b)) | ||
|
|
||
| # [2.4.0](https://github.com/stallion-tech/stallion-cli/compare/v2.3.1...v2.4.0) (2026-01-09) | ||
|
|
||
|
|
||
| ### Features | ||
|
|
||
| * sourcemaps export, hermes path fix ([b563b44](https://github.com/stallion-tech/stallion-cli/commit/b563b445e01cd6ff91ed02113e9c41028322112b)) | ||
| - refactor CLI and added support for bundle signing ([#27](https://github.com/stallion-tech/stallion-cli/issues/27)) ([f3ffcbd](https://github.com/stallion-tech/stallion-cli/commit/f3ffcbdb3800a9043250f625662c757667f4a8ea)) | ||
| - windows RN executable Fix ([#28](https://github.com/stallion-tech/stallion-cli/issues/28)) ([65f9760](https://github.com/stallion-tech/stallion-cli/commit/65f9760cebbf0c84fcbfeafac02997bbd671fee3)) | ||
| - sourcemaps export, hermes path fix ([b563b44](https://github.com/stallion-tech/stallion-cli/commit/b563b445e01cd6ff91ed02113e9c41028322112b)) | ||
|
|
||
| ## [2.3.1](https://github.com/stallion-tech/stallion-cli/compare/v2.3.0...v2.3.1) (2025-06-27) | ||
| # [2.4.0-alpha.1](https://github.com/stallion-tech/stallion-cli/compare/v2.3.0...v2.4.0-alpha.1) (2025-06-26) | ||
|
|
||
| ## [2.3.1](https://github.com/stallion-tech/stallion-cli/compare/v2.3.0...v2.3.1) (2025-06-27) | ||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * skip user validation when CI token is provided ([#33](https://github.com/stallion-tech/stallion-cli/issues/33)) ([901eab9](https://github.com/stallion-tech/stallion-cli/commit/901eab97c08629d4c7aac8ec3e9f7ebba952ff4b)) | ||
| - skip user validation when CI token is provided ([#33](https://github.com/stallion-tech/stallion-cli/issues/33)) ([901eab9](https://github.com/stallion-tech/stallion-cli/commit/901eab97c08629d4c7aac8ec3e9f7ebba952ff4b)) | ||
|
|
||
| # [2.3.0](https://github.com/stallion-tech/stallion-cli/compare/v2.2.0...v2.3.0) (2025-06-22) | ||
|
|
||
|
|
||
| ### Features | ||
|
|
||
| * Stallion CI Support ([#30](https://github.com/stallion-tech/stallion-cli/issues/30)) ([f9a0523](https://github.com/stallion-tech/stallion-cli/commit/f9a0523c8082a82e662fe71c46c9c7bc75963cae)) | ||
| - Stallion CI Support ([#30](https://github.com/stallion-tech/stallion-cli/issues/30)) ([f9a0523](https://github.com/stallion-tech/stallion-cli/commit/f9a0523c8082a82e662fe71c46c9c7bc75963cae)) | ||
|
|
||
| # [2.2.0](https://github.com/stallion-tech/stallion-cli/compare/v2.1.0...v2.2.0) (2025-06-19) | ||
|
|
||
|
|
||
| ### Features | ||
|
|
||
| * Alpha Release with windows bundle command fix ([1880d0e](https://github.com/stallion-tech/stallion-cli/commit/1880d0ef8c039a3a0b8710540a80b89667b2292a)), closes [#21](https://github.com/stallion-tech/stallion-cli/issues/21) [#26](https://github.com/stallion-tech/stallion-cli/issues/26) [#27](https://github.com/stallion-tech/stallion-cli/issues/27) [#28](https://github.com/stallion-tech/stallion-cli/issues/28) | ||
| - Alpha Release with windows bundle command fix ([1880d0e](https://github.com/stallion-tech/stallion-cli/commit/1880d0ef8c039a3a0b8710540a80b89667b2292a)), closes [#21](https://github.com/stallion-tech/stallion-cli/issues/21) [#26](https://github.com/stallion-tech/stallion-cli/issues/26) [#27](https://github.com/stallion-tech/stallion-cli/issues/27) [#28](https://github.com/stallion-tech/stallion-cli/issues/28) | ||
|
|
||
| # [2.1.0-alpha.2](https://github.com/stallion-tech/stallion-cli/compare/v2.1.0-alpha.1...v2.1.0-alpha.2) (2025-06-11) | ||
|
|
||
|
|
||
| ### Features | ||
|
|
||
| * windows RN executable Fix ([#28](https://github.com/stallion-tech/stallion-cli/issues/28)) ([65f9760](https://github.com/stallion-tech/stallion-cli/commit/65f9760cebbf0c84fcbfeafac02997bbd671fee3)) | ||
| - windows RN executable Fix ([#28](https://github.com/stallion-tech/stallion-cli/issues/28)) ([65f9760](https://github.com/stallion-tech/stallion-cli/commit/65f9760cebbf0c84fcbfeafac02997bbd671fee3)) | ||
|
|
||
| # [2.1.0-alpha.1](https://github.com/stallion-tech/stallion-cli/compare/v2.0.2...v2.1.0-alpha.1) (2025-05-23) | ||
|
|
||
|
|
||
| ### Features | ||
|
|
||
| * refactor CLI and added support for bundle signing ([#27](https://github.com/stallion-tech/stallion-cli/issues/27)) ([f3ffcbd](https://github.com/stallion-tech/stallion-cli/commit/f3ffcbdb3800a9043250f625662c757667f4a8ea)) | ||
| - refactor CLI and added support for bundle signing ([#27](https://github.com/stallion-tech/stallion-cli/issues/27)) ([f3ffcbd](https://github.com/stallion-tech/stallion-cli/commit/f3ffcbdb3800a9043250f625662c757667f4a8ea)) | ||
|
|
||
| ## [2.0.2](https://github.com/stallion-tech/stallion-cli/compare/v2.0.1...v2.0.2) (2025-02-11) | ||
|
|
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * improved hermes logging ([4094aa6](https://github.com/stallion-tech/stallion-cli/commit/4094aa6bbf927f1f87b2f51f57b17db0f3e5f7df)) | ||
| - improved hermes logging ([4094aa6](https://github.com/stallion-tech/stallion-cli/commit/4094aa6bbf927f1f87b2f51f57b17db0f3e5f7df)) | ||
|
|
||
| ## [2.0.1](https://github.com/stallion-tech/stallion-cli/compare/v2.0.0...v2.0.1) (2025-02-01) | ||
|
|
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * hermes enabled by default ([6770a74](https://github.com/stallion-tech/stallion-cli/commit/6770a746a190ca1778c9f59957a1c38ccdda0c44)) | ||
| - hermes enabled by default ([6770a74](https://github.com/stallion-tech/stallion-cli/commit/6770a746a190ca1778c9f59957a1c38ccdda0c44)) | ||
|
|
||
| # [2.0.0](https://github.com/stallion-tech/stallion-cli/compare/v1.1.4...v2.0.0) (2024-11-04) | ||
|
|
||
|
|
||
| ### Features | ||
|
|
||
| * added Stallion 2.0 changes ([#17](https://github.com/stallion-tech/stallion-cli/issues/17)) ([6bfe630](https://github.com/stallion-tech/stallion-cli/commit/6bfe630483dd15073ae02c111748c4e8f85e6a38)) | ||
|
|
||
| - added Stallion 2.0 changes ([#17](https://github.com/stallion-tech/stallion-cli/issues/17)) ([6bfe630](https://github.com/stallion-tech/stallion-cli/commit/6bfe630483dd15073ae02c111748c4e8f85e6a38)) | ||
|
|
||
| ### BREAKING CHANGES | ||
|
|
||
| * Stallion 2.0 update | ||
| - Stallion 2.0 update | ||
|
|
||
| ## [1.1.4](https://github.com/stallion-tech/stallion-cli/compare/v1.1.3...v1.1.4) (2024-11-04) | ||
|
|
||
|
|
||
| ### Reverts | ||
|
|
||
| * Revert "feat!: stallion 2.0 cli update (#15)" (#16) ([c685692](https://github.com/stallion-tech/stallion-cli/commit/c6856929ebd20da9af198b7cb819e11d60a212ff)), closes [#15](https://github.com/stallion-tech/stallion-cli/issues/15) [#16](https://github.com/stallion-tech/stallion-cli/issues/16) | ||
| - Revert "feat!: stallion 2.0 cli update (#15)" (#16) ([c685692](https://github.com/stallion-tech/stallion-cli/commit/c6856929ebd20da9af198b7cb819e11d60a212ff)), closes [#15](https://github.com/stallion-tech/stallion-cli/issues/15) [#16](https://github.com/stallion-tech/stallion-cli/issues/16) | ||
|
|
||
| ## [1.1.3](https://github.com/stallion-tech/stallion-cli/compare/v1.1.2...v1.1.3) (2024-04-11) | ||
|
|
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * removed check for stallion.config.js ([#14](https://github.com/stallion-tech/stallion-cli/issues/14)) ([08fa8bf](https://github.com/stallion-tech/stallion-cli/commit/08fa8bf480d098970ae3a388decc8ad38d19fa9c)) | ||
| - removed check for stallion.config.js ([#14](https://github.com/stallion-tech/stallion-cli/issues/14)) ([08fa8bf](https://github.com/stallion-tech/stallion-cli/commit/08fa8bf480d098970ae3a388decc8ad38d19fa9c)) | ||
|
|
||
| ## [1.1.2](https://github.com/stallion-tech/stallion-cli/compare/v1.1.1...v1.1.2) (2024-01-15) | ||
|
|
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * optimized upload and added ci token support ([caf665d](https://github.com/stallion-tech/stallion-cli/commit/caf665d1a5161e0474603ef80e208cfb2eb63b05)) | ||
| - optimized upload and added ci token support ([caf665d](https://github.com/stallion-tech/stallion-cli/commit/caf665d1a5161e0474603ef80e208cfb2eb63b05)) | ||
|
|
||
| ## [1.1.1](https://github.com/stallion-tech/stallion-cli/compare/v1.1.0...v1.1.1) (2023-09-13) | ||
|
|
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * updated domain redirect and errors ([#12](https://github.com/stallion-tech/stallion-cli/issues/12)) ([aa5c648](https://github.com/stallion-tech/stallion-cli/commit/aa5c648fefe105754ee1e3518a06cc2282301495)) | ||
| - updated domain redirect and errors ([#12](https://github.com/stallion-tech/stallion-cli/issues/12)) ([aa5c648](https://github.com/stallion-tech/stallion-cli/commit/aa5c648fefe105754ee1e3518a06cc2282301495)) | ||
|
|
||
| # [1.1.0](https://github.com/redhorse-tech/stallion-cli/compare/v1.0.0...v1.1.0) (2023-09-08) | ||
|
|
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * updated node version to 14 ([cf9cef8](https://github.com/redhorse-tech/stallion-cli/commit/cf9cef8ff3e885b4e413f25f9a9853f189125f89)) | ||
|
|
||
| - updated node version to 14 ([cf9cef8](https://github.com/redhorse-tech/stallion-cli/commit/cf9cef8ff3e885b4e413f25f9a9853f189125f89)) | ||
|
|
||
| ### Features | ||
|
|
||
| * updated min node version to 10 ([90718b9](https://github.com/redhorse-tech/stallion-cli/commit/90718b95bbbee084d94af7a931984fe97a424972)) | ||
| - updated min node version to 10 ([90718b9](https://github.com/redhorse-tech/stallion-cli/commit/90718b95bbbee084d94af7a931984fe97a424972)) | ||
|
|
||
| # 1.0.0 (2023-09-08) | ||
|
|
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * exec and util function ([5da81dc](https://github.com/redhorse-tech/stallion-cli/commit/5da81dcacd724cd2052f5f1bea5b42a5b10f7734)) | ||
| * wrong base url ([408680f](https://github.com/redhorse-tech/stallion-cli/commit/408680f1a190d0ddc66e68644d4dc1ded2cf6b0f)) | ||
|
|
||
| - exec and util function ([5da81dc](https://github.com/redhorse-tech/stallion-cli/commit/5da81dcacd724cd2052f5f1bea5b42a5b10f7734)) | ||
| - wrong base url ([408680f](https://github.com/redhorse-tech/stallion-cli/commit/408680f1a190d0ddc66e68644d4dc1ded2cf6b0f)) | ||
|
|
||
| ### Features | ||
|
|
||
| * added semantic release ([#7](https://github.com/redhorse-tech/stallion-cli/issues/7)) ([0b89da4](https://github.com/redhorse-tech/stallion-cli/commit/0b89da433060316502a033d604381957f65be201)) | ||
| - added semantic release ([#7](https://github.com/redhorse-tech/stallion-cli/issues/7)) ([0b89da4](https://github.com/redhorse-tech/stallion-cli/commit/0b89da433060316502a033d604381957f65be201)) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { CONFIG } from "@/api/config"; | ||
|
|
||
| export function getApiBaseUrl(region: string): string { | ||
| if (!region) { | ||
| return CONFIG.API.BASE_URL; | ||
| } | ||
|
|
||
| return `https://api-${region}.stalliontech.io/api/v1`; | ||
|
sherlock-stallion marked this conversation as resolved.
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import { ApiClient } from "@/api/api-client"; | ||
| import { CONFIG } from "@/api/config"; | ||
| import { ENDPOINTS } from "@/api/endpoints"; | ||
|
sherlock-stallion marked this conversation as resolved.
|
||
|
|
||
| const REGIONS = ["ap", "us"] as const; | ||
|
|
||
| export function parseTokenRegion(token: string): string | null { | ||
| if (!token) return null; | ||
|
sherlock-stallion marked this conversation as resolved.
|
||
| if (token.startsWith("stl_") && token.length === 43 && token[6] === "_") { | ||
| const code = token.substring(4, 6); | ||
| return (REGIONS as readonly string[]).includes(code) ? code : null; | ||
| } | ||
| return null; | ||
| } | ||
|
|
||
| export async function resolveRegion(opts: { | ||
| uploadPath: string; | ||
| ciToken?: string; | ||
| accessToken?: string; | ||
|
sherlock-stallion marked this conversation as resolved.
|
||
| }): Promise<string> { | ||
| try { | ||
| if (opts.ciToken) { | ||
| return parseTokenRegion(opts.ciToken) ?? "ap"; | ||
| } | ||
|
|
||
| const client = new ApiClient(CONFIG.API.BASE_URL); | ||
| if (opts.accessToken) { | ||
| client.setToken(opts.accessToken); | ||
| } | ||
|
sherlock-stallion marked this conversation as resolved.
|
||
|
|
||
| const { data } = await client.post<{ data: { region: string } }>( | ||
| ENDPOINTS.ORG.GET_ORG_REGION, | ||
| { uploadPath: opts.uploadPath } | ||
| ); | ||
| return data?.region ?? "ap"; | ||
| } catch (error) { | ||
| throw new Error("Something went wrong"); | ||
| } | ||
|
sherlock-stallion marked this conversation as resolved.
|
||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.