Cloudflare Workers
@zhann/cloudflare-workersv2026.11.18.1
01README
Adds deploy_assets and ensure_routing to @swamp/cloudflare/workers/workers: upload a directory as a Worker's live version, and keep the Worker reachable only at its hostname.
02Extends
@swamp/cloudflare/workers/workerscloudflare_workers.ts
fn deploy_assets(directory: string, tag?: string)
Upload a directory as it is and make it the Worker's live version
| Argument | Type | Description |
|---|---|---|
| directory | string | Directory to upload as it is, relative to the repo |
| tag? | string | Becomes the version's workers/tag annotation, so Cloudflare's version list shows it. Cloudflare allows 100 bytes. |
fn ensure_routing(hostname: string, servesPath?: string)
Make the Worker reachable only at its hostname: attach the custom domain, detach any other, and turn off workers.dev and Preview URLs once the hostname serves
| Argument | Type | Description |
|---|---|---|
| hostname | string | The only hostname the Worker should be reachable at |
| servesPath? | string | A path the deployed site answers 200 for. workers.dev and Preview URLs go off only once https://<hostname><servesPath> does |
Resources
assets(infinite)— What the last deploy_assets uploaded
routing(infinite)— The hostname ensure_routing enforces, the workers.dev URL it turned off, and what it changed
03Stats
B
81 / 100
Downloads
28
Archive size
28.1 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented0/1missing
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Docs keep secrets in a vault1/1earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository0/2missing
04Platforms
05Labels