Docs
From a built directory to a cached, integrity-checked URL. Everything below is the whole workflow.
Install the CLI
The
berthcommand is a single static binary.npm install --global @marina/berth berth login --token $MARINA_TOKEN
Publish a release
Point it at a built directory and give it a version. Re-publishing an existing version is rejected.
berth push ./dist --pkg chartline --version 4.2.1 chartline.min.js sha384-Hd3mRb…u0LwA 18.2 KB (br 6.1 KB) chartline.min.css sha384-Kp7vT2…Zx9Qe 3.4 KB (br 1.0 KB) live at https://cdnmarina.com/v/chartline/4.2.1/
Link it with integrity
Paste the printed digest into the tag. Browsers refuse the file if a single byte differs.
<script src="https://cdnmarina.com/v/chartline/4.2.1/chartline.min.js" integrity="sha384-Hd3mRb…u0LwA" crossorigin="anonymous"></script>
https://cdnmarina.com /v/chartline /4.2.1 /chartline.min.js
/v/ marks an immutable path, followed by the package name, an exact semver and the file path inside the release.
Pre-release tags such as 5.0.0-rc.2 are valid versions.
| Path shape | Cache-Control | Edge TTL | Notes |
|---|---|---|---|
/v/<pkg>/<semver>/… | public, max-age=31536000, immutable | until evicted | Never revalidated. A change means a new version. |
/a/<pkg>/<channel> | public, max-age=60 | 60 s | 302 to the current immutable path. |
/m/<pkg>.json | public, max-age=300 | 300 s | Version list and digests as JSON. |
| unknown path | no-store | none | 404 with a small HTML body. |
Every file is served with Access-Control-Allow-Origin: * and Timing-Allow-Origin: *, so SRI works with crossorigin="anonymous" and resource timing is visible to your RUM.
Digests are computed over the uncompressed bytes at publish time. Compression is transparent: SRI is verified after decoding.
https://cdnmarina.com/m/chartline.json.| Max file size | 25 MB |
| Files per release | 2,000 |
| Release size | 150 MB |
| Publish rate | 60 / hour / token |
| Allowed types | js, css, wasm, fonts, images, json, map |
| Status | Meaning |
|---|---|
200 | Asset served from the edge or shield. |
206 | Range request served, used for large WASM and font files. |
304 | Conditional request matched the ETag. |
404 | No such package, version or file. Check the path, immutable URLs never move. |
410 | Version retired by its owner for a security or legal reason. |