The builder and publisher have different jobs

The blog build command writes the whole site into a directory. The Pages deployment project accepts that completed directory and does not rebuild articles, inspect moderation data, or decide which files belong in the publication. This keeps the publishing API useful to other callers and makes the site boundary easy to inspect before a deployment.

The Windows 7 host is the publishing machine. The entry point is a command script that calls the configured token shim, then starts the LiveScript publisher under Windows Script Host. The shim reads the token from its protected tools directory into the process environment. The token is not a project setting, command-line argument, page value, or log message.

publisher = required (try-create-publisher settings.account, settings.project),
  'Unable to create Pages publisher'

deployment = required (publisher.try-deploy-site site-folderpath,
  "Static blog publication #{job-id}"),
  'Unable to publish static blog site'

required (try-write-stdout-line (try-stringify deployment)),
  'Unable to write deployment receipt'

The caller reads the account and project from configuration, gets the token through the framework environment API, and delegates deployment to cloudflare.pages.Publisher. The command writes phase messages to stderr and one JSON deployment receipt to stdout. Its caller can distinguish progress from the final confirmed URL without scraping human-oriented console output.

Reusable clients stop at their own boundaries

The framework provides generic HTTP request and JSON response handling, URL construction, bearer authorization, filesystem paths, MIME type lookup, binary-to-base64 conversion, and the BLAKE3 tool wrapper. The reusable wsh-cloudflare-pages-ls project owns Cloudflare Pages API calls such as checking missing assets, uploading a batch, registering hashes, creating a deployment, and reading its status. The blog deployment project owns the Pages-specific asset manifest and the ordered process that turns a folder into a confirmed deployment.

Completed site folder
    → recursively enumerate files
    → hash content and extension in bounded batches
    → ask Cloudflare which hashes are missing
    → upload missing asset batches
    → register hashes and submit the slash-prefixed manifest
    → poll deployment state until success or a terminal failure

Pages stores uploaded assets by content hash. The key used here is the first 32 lowercase hexadecimal characters of BLAKE3 over the file's base64 representation followed by its extension without a dot. The publisher asks Cloudflare which hashes are absent and uploads only those bytes, but the manifest still lists every path in the site. Asset transfer is incremental; the deployed site's path map is complete.

Asset hashing and network calls are grouped rather than starting one process or request per file. The publisher attaches MIME metadata, enforces the API file limit, avoids following directory junctions, and rejects identical bytes that would have conflicting content types. Manifest keys begin with a slash. These details matter: a deployment can be accepted and still return 404 if the hash algorithm or path mapping is wrong.

Success means the public site was checked

The publisher waits for the deployment API to report a successful final stage before writing its JSON receipt. The striped-trousers scenarios exercise the API sequence, token headers, multipart deployment request, missing-asset batches, manifest paths, and failure propagation with controlled services. They protect the protocol behavior without consuming a real Pages deployment.

The live deployment was then checked separately over HTTP at both its deployment URL and the canonical project URL, including the root page. That last check caught a real mismatch that a green API status had not caught. The successful publisher receipt and a browser-visible 200 response answer different questions, so both belong in the release check.