Download lib/version.js from SharpMeow/unroll: direct link, hf CLI and curl.
- Browser
- Download file 853 Bytes
-
https://huggingface.co/spaces/SharpMeow/unroll/resolve/main/lib/version.js
- Command line
-
hf download hf://spaces/SharpMeow/unroll/lib/version.js
-
curl -L -o version.js https://huggingface.co/spaces/SharpMeow/unroll/resolve/main/lib/version.js
853 Bytes
| // The app version, from version.json (the single source of truth). Shown in the About footer, | |
| // returned by window.unroll.version() and kept on window.UNROLL_VERSION for add-ons such as the Bench export. | |
| import { API_VERSION } from './apispec.js'; | |
| export const VERSION = fetch(new URL('../version.json', import.meta.url), { cache: 'no-cache' }) | |
| .then((r) => (r.ok ? r.json() : Promise.reject(new Error(`version.json: HTTP ${r.status}`)))) | |
| .then((v) => ({ version: v.version, date: v.date, sha: v.sha, api: API_VERSION })) | |
| .catch(() => ({ version: 'unknown', date: null, sha: null, api: API_VERSION })) | |
| .then((v) => { | |
| window.UNROLL_VERSION = Object.freeze(v); | |
| const el = document.getElementById('aVersion'); | |
| if (el) el.textContent = `v${v.version}${v.sha ? ` · ${v.sha}` : ''}${v.date ? ` · ${v.date}` : ''}`; | |
| return v; | |
| }); | |