feat: Smart registry URL fallback for immediate production readiness
- Implements intelligent fallback between api.soulcraft.com and direct service URL - Ensures CLI works immediately while DNS certificate provisions - Auto-switches to proper domain when ready without manual intervention - Production-ready for tonight's release with zero downtime
This commit is contained in:
parent
5b6b325e9a
commit
dff0d1575b
1 changed files with 21 additions and 4 deletions
|
|
@ -999,11 +999,28 @@ program
|
|||
const actions = {
|
||||
list: async () => {
|
||||
try {
|
||||
// Use unified professional catalog (fallback to local if not deployed)
|
||||
const REGISTRY_URL = 'https://brain-cloud-api-476163328636.us-central1.run.app/api/registry/augmentations'
|
||||
const response = await fetch(REGISTRY_URL)
|
||||
// Use unified professional catalog with smart fallback
|
||||
const REGISTRY_URLS = [
|
||||
'https://api.soulcraft.com/api/registry/augmentations',
|
||||
'https://brain-cloud-api-476163328636.us-central1.run.app/api/registry/augmentations'
|
||||
]
|
||||
|
||||
if (response.ok) {
|
||||
let response = null
|
||||
let workingUrl = null
|
||||
|
||||
for (const url of REGISTRY_URLS) {
|
||||
try {
|
||||
response = await fetch(url, { timeout: 5000 })
|
||||
if (response.ok) {
|
||||
workingUrl = url
|
||||
break
|
||||
}
|
||||
} catch (e) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
if (response && response.ok) {
|
||||
console.log(colors.brain('🏢 SOULCRAFT PROFESSIONAL SUITE\n'))
|
||||
|
||||
const data = await response.json()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue