UNPKG

sanity

Version:

Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches

23 lines (19 loc) 524 B
export async function checkStudioManifestExists(studioHostUrl: string): Promise<boolean> { const url = `${studioHostUrl}/static/create-manifest.json` try { const response = await fetch(url, { method: 'HEAD', }) if (response.status == 404) { return false } if (response.status > 299) { console.error(`Failed to get manifest from ${url}`, response) return false } return true } catch (e) { console.error(`Failed to fetch from ${url}`, e) return false } }