#!/bin/sh # script/fetch-assets: download the third-party browser assets the web UI # ships and install them under static/. Minified bundles are not committed # (REPO_POLICIES.md: no build artifacts in version control), so the build # fetches them here. Every download is verified against a hardcoded sha256 # before it is installed, and any mismatch aborts. Idempotent: an asset # already present with its pinned hash is left alone. set -eu ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" # The sha256 of each installed asset lives in static/vendor.sha256, in # sha256sum(1) format, with paths relative to static/. That file is the # single source of truth: this script verifies against it, and # static/vendor_test.go asserts the bytes embedded into the binary match # it, so the hash cannot rot into a value nothing checks. MANIFEST="static/vendor.sha256" # Alpine.js 3.14.9, 2026-08-17. Fetched from registry.npmjs.org, the # publisher of record; the jsDelivr and unpkg copies are mirrors of this # same tarball. dist/cdn.min.js is the browser build Alpine publishes for # a