Download scripts/verify-runtime.mjs from SHARProduction/production-open-tools: direct link, hf CLI and curl.
- Browser
- Download file 638 Bytes
-
https://huggingface.co/spaces/SHARProduction/production-open-tools/resolve/main/scripts/verify-runtime.mjs
- Command line
-
hf download hf://spaces/SHARProduction/production-open-tools/scripts/verify-runtime.mjs
-
curl -L -o verify-runtime.mjs https://huggingface.co/spaces/SHARProduction/production-open-tools/resolve/main/scripts/verify-runtime.mjs
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; | |
| } | |