mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
* refactor(version): own the release checksum helpers The UI asset download already verifies its tarball against the release checksums file, but the fetch, parse, and hashing helpers were private to `internal/uidist`, so a second caller had nothing to reuse: `internal/version` builds the checksums URL and `internal/utils` already hashes files. Move the parser and the fetcher next to the URL they consume, keep the same messages, and drop uidist's private SHA-256 duplicate in favour of `utils.FileHash`. No behavior change. * fix(upgrade): verify the release archive before replacing the binary `skillshare upgrade --cli` streamed the release archive straight into the extractor and renamed the result over the live executable, so an archive that did not match the release was installed anyway. The UI asset download in the same product has always refused on a mismatch, and the release workflow checks every asset against checksums.txt before publishing, so the published hashes were the one integrity signal this path did not consult. Stage the archive to a temp file, compare its SHA-256 with the entry for the downloaded asset name, and extract only when they agree. A mismatch, an entry for a different file, or an unreachable checksums.txt stops the upgrade and leaves the running binary untouched. This guards against damaged or mismatched downloads rather than a release whose assets and checksums were replaced together. Tests use a local server and build the archive each platform extracts, so all four outcomes are covered without network access. The sudo child re-enters this same function, so elevated upgrades are covered too. --------- Co-authored-by: Willie <egg358358@gmail.com>
Website
Documentation site for skillshare, built with Docusaurus.
Install
npm install
Local Development
npm start
Quality Checks
npm run typecheck
npm run clear
Build and Preview
npm run build
npm run serve
Deployment
npm run deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.