production-open-tools / scripts /verify-runtime.mjs
SHARProduction's picture
Publish SHAR Production Open Tools mirror v1.30.1 (part 3)
bdaa473 verified
Raw History Blame Contribute Delete
638 Bytes
const base='https://sharproduction-production-open-tools.static.hf.space';
for(const locale of ['en','ru']){
const url=`${base}/${locale}/index.html`,response=await fetch(url),body=await response.text();
const canonical=body.match(/rel="canonical" href="([^"]+)/)?.[1],assets=(body.match(/<article class="card"/g)||[]).length;
console.log(JSON.stringify({url,status:response.status,canonical,brand:body.includes('SHAR Production'),index:body.includes('index,follow'),assets}));
if(response.status!==200||canonical!==url||!body.includes('SHAR Production')||!body.includes('index,follow')||assets!==152)process.exitCode=1;
}