Liking cljdoc? Tell your friends :D

dev.arkaitz.web-base.assets

Fingerprinted assets (since 0.30.0). A build writes each asset a second time under a name that carries its bytes' fingerprint — kit.css as kit.<16 hex>.css — and a manifest from the path the host knows to the path that is served: {"/ui/kit.css" "/ui/kit.3f9a….css"}. The host reads that manifest and hands it to wb/handler as :asset-manifest; the base never looks for a file. A fingerprinted path names its bytes, so it is served immutable and the shell links it in place of the logical one.

Fingerprinted assets (since 0.30.0). A build writes each asset a second time under a name
that carries its bytes' fingerprint — `kit.css` as `kit.<16 hex>.css` — and a manifest
from the path the host knows to the path that is served: `{"/ui/kit.css"
"/ui/kit.3f9a….css"}`. The host reads that manifest and hands it to `wb/handler` as
`:asset-manifest`; the base never looks for a file. A fingerprinted path names its bytes,
so it is served `immutable` and the shell links it in place of the logical one.
raw docstring

base-rootclj

Where the base serves its own files from: /wb/, out of its jar.

Where the base serves its own files from: `/wb/`, out of its jar.
sourceraw docstring

check-manifest!clj

(check-manifest! manifest resource-of)

Refuses manifest unless every entry is a path the base serves, mapped to that path with the fingerprint of the bytes served there, and the .gz beside it, when there is one, decodes to those very bytes — so a manifest from another build cannot be served as immutable. resource-of answers a path with the classpath resource the base would serve there, or nil. A .br the JDK cannot decode: the build that writes it proves its round trip.

Refuses `manifest` unless every entry is a path the base serves, mapped to that path
with the fingerprint of the bytes served there, and the `.gz` beside it, when there is
one, decodes to those very bytes — so a manifest from another build cannot be served as
`immutable`. `resource-of` answers a path with the classpath resource the base would
serve there, or nil. A `.br` the JDK cannot decode: the build that writes it proves its
round trip.
sourceraw docstring

fingerprintclj

(fingerprint bytes)

The fingerprint of bytes: the first fingerprint-length lowercase hex digits of their SHA-256.

The fingerprint of `bytes`: the first `fingerprint-length` lowercase hex digits of their
SHA-256.
sourceraw docstring

fingerprint-lengthclj

Hex digits of SHA-256 a fingerprint keeps: 64 bits, so two versions of one file never share a name by chance.

Hex digits of SHA-256 a fingerprint keeps: 64 bits, so two versions of one file never
share a name by chance.
sourceraw docstring

fingerprinted-pathclj

(fingerprinted-path path fp)

path with fingerprint fp before its last extension — /ui/kit.css → /ui/kit.<fp>.css — the inverse of logical-path; nil for a last segment with no extension, which has nowhere to carry one.

`path` with fingerprint `fp` before its last extension — `/ui/kit.css` →
`/ui/kit.<fp>.css` — the inverse of `logical-path`; nil for a last segment with no
extension, which has nowhere to carry one.
sourceraw docstring

logical-pathclj

(logical-path path)

path without its fingerprint — /ui/kit.3f9a….css → /ui/kit.css — or nil when its last segment carries none.

`path` without its fingerprint — `/ui/kit.3f9a….css` → `/ui/kit.css` — or nil when its
last segment carries none.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close