-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add script to check endpoints before build
- Loading branch information
1 parent
5d81f19
commit 0c1cdb9
Showing
9 changed files
with
46 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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 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 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,28 @@ | ||
import { API_BASE as API_BASE_AUTH } from 'shared/src/utils/auth' | ||
import { API_BASE as API_BASE_WEB3_POSTING } from 'shared/src/utils/requests/web3-posting' | ||
import { API_BASE as API_BASE_THREADS } from 'shared/src/utils/requests/threads' | ||
import { API_BASE as API_BASE_TEAM } from 'shared/src/utils/requests/team' | ||
import { API_BASE as API_BASE_FARCASTER } from 'shared/src/utils/requests/farcaster' | ||
import { API_BASE as API_BASE_ACCOUNTS } from 'shared/src/utils/requests/accounts' | ||
|
||
|
||
const ENDPOINTS = [ | ||
API_BASE_AUTH, | ||
API_BASE_WEB3_POSTING, | ||
API_BASE_THREADS, | ||
API_BASE_TEAM, | ||
API_BASE_FARCASTER, | ||
API_BASE_ACCOUNTS, | ||
] | ||
|
||
const checkEndpointsForProd = () => { | ||
for (const endpoint of ENDPOINTS) { | ||
if (endpoint.includes('dev.') || endpoint.includes('fstun.')) { | ||
console.error('Endpoint should not contain dev. or fstun. in production:', endpoint) | ||
process.exit(1) | ||
} | ||
} | ||
console.log('All endpoints are correct for production') | ||
} | ||
|
||
checkEndpointsForProd() |
This file contains 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 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 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 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 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 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