@wvb/deno
Installation and API reference for @wvb/deno.
Use @wvb/deno in your project and browse its exported API.
Installation
Add the JSR package to your project:
deno add jsr:@wvb/denoDownload the native library for the platform you run on:
deno run --allow-net --allow-read --allow-write @wvb/deno/installThe library is saved under .wvb/lib. For runtime permissions and packaging, see the Deno Desktop guide.
Classes
Bundle
A .wvb bundle loaded into memory: its header, index and every entry's (compressed) data.
BundleBuilder
Builds a Bundle from a set of entries.
BundleDescriptor
A bundle's metadata (header + index) without its data, backed by a .wvb file on disk.
BundleProtocol
Serves files from a Source as HTTP responses — GET/HEAD, content-type, HTTP Range (206), and index.html directory-index fallback.
Cancellation
A token handed to a download to stop it.
Integrity
A digest over some bytes, serialized as <algorithm>:<base64> (e.g.
LoadedDescriptor
A cached descriptor from Source.load, pinned to a specific bundle file and its read options.
ProxyProtocol
Proxies requests for custom hosts to other servers (for dev servers with hot reload).
Remote
HTTP client for the update server: fetches the update document and downloads bundle files.
Source
The local bundle store: read-only builtin bundles shipped with the app, plus a writable directory of downloaded remote ones.
Updater
Drives the update cycle over a Source and a Remote: ask what is available, download it, then install (or roll back) what was downloaded.
WebviewBundleError
Functions
computeIntegrity
Computes the integrity of data with algorithm.
contentTypeForPath
Guess a content type from a path's extension, defaulting to application/octet-stream.
isWebviewBundleError
libFileName
Platform cdylib filename - macOS : libwvb_deno.dylib - Linux :libwvb_deno.so (Linux) - Windows : wvb_deno.dll (Windows)
loadFromGitHub
Download the platform cdylib from a release from github release.
loadLib
Load the native library from an explicit path.
parseIntegrity
Parses a serialized integrity string (e.g.
readBundle
Reads a bundle from a .wvb file into memory.
readBundleFromBytes
Parses a bundle from its bytes (e.g.
writeBundle
Writes a bundle to a .wvb file, returning the number of bytes written.
writeBundleToBytes
Serializes a bundle to .wvb bytes.
Interfaces
BundleProtocolOptions
How a BundleProtocol resolves the request uri.
HttpResponse
LoadLibViaPlugOptions
ManifestBundleSet
Every version of one bundle a manifest records, plus which of them are in play.
ManifestData
A manifest.json as it is stored on disk.
RemoteGetUpdateOptions
SignatureKey
SignatureKeyData
The public key itself, in one of the formats the algorithm accepts.
SignatureVerifyKey
A verifying key paired with the id it is published under, so an update naming a keyId can be matched to the key that verifies it.
UpdaterDownloadResult
UpdaterInstallResult
UpdaterOptions
UpdaterRollbackResult
UpdaterSignatureOptions
The keys an update response may be signed with, each published under its own id.
Type Aliases
BundleBuilderOptions
Options for BundleBuilder.build.
BundleHeader
A bundle's header: format metadata read from the first bytes of a .wvb file.
BundleIndex
A bundle index: file path → its IndexEntry metadata.
BundleSourceVersion
Bundle version with the source (builtin/remote) that provides it.
BundleUpdate
One bundle advertised by an update document.
ChecksumReadOptions
How a bundle section's xxHash checksum is verified when that section is read.
ChecksumWriteOptions
The seed an xxHash checksum is written with.
DataReadOptions
How each entry's data is read out of a bundle's data section.
ErrorCode
The stable code every WebviewBundleError carries.
HeaderReadOptions
How a bundle's header is read.
HeaderWriterOptions
How a bundle's header section is written.
HostnameSegment
Which hostname segment names the bundle.
HttpMethod
HTTP method accepted by a protocol handler (case-insensitive on the wire).
HttpOptions
HTTP client options for a remote.
IndexEntry
Metadata for a single file in a bundle's index.
IndexReadOptions
How a bundle's index is read.
IndexWriterOptions
How a bundle's index section is written.
IntegrityAlgorithm
IntegrityPolicy
How a bundle's integrity metadata is treated when the integrity check runs.
ManifestBundleItem
ManifestBundleItemStatus
Where a version stands in its bundle's lifecycle.
ManifestPruneResult
ManifestRemoveData
ManifestRemoveResult
ManifestRemoveResultKind
ManifestSetCurrentVersionResult
ManifestSetCurrentVersionResultKind
ManifestStageData
ManifestStageResult
ManifestStageResultKind
ManifestVersion
The format version of a manifest.json.
ManifestVersionData
What the manifest records for one version of a bundle.
RemoteConfig
@wvb/node's RemoteConfig minus onDownload: Deno FFI cannot call back into JS from the worker thread a nonblocking symbol runs on, so download progress is not…
RemoteUpdateResponse
A successful update response returned by the remote service.
SignatureAlgorithm
Digital signature algorithm for bundle verification.
SignatureKeyFormat
Format of the public key used for signature verification.
SourceConfig
SourceIntegrityCheckMode
Which bundles are checked against the integrity recorded for them in the manifest when they are loaded from disk.
SourceIntegrityOptions
SourceKind
The type of bundle source: builtin or remote.
SourceListItem
SourceOptions
Update
An atomically published set of bundle updates.
UpdaterDownloadOptions
UpdaterDownloadResultKind
The outcome of downloading one bundle.
UpdaterGetUpdateOptions
UpdaterInstallResultKind
The outcome of installing one staged bundle.
UpdaterInstallTarget
UpdaterIntegrityOptions
UpdaterRollbackResultKind
The outcome of rolling one bundle back to its previous version.
UpdaterRollbackTarget
UpdateSignature
Signature metadata returned with an update document.
UriBundleResolver
How the bundle name is resolved from the request uri.
UriPathResolver
How the file path in the bundle is resolved from the request uri.
Version
The .wvb bundle format version.