@velajs/client
v1.25.0
Published
Framework-neutral client for Vela live queries: live subscriptions over WebSocket, keyed deltas, cursor-gated optimistic updates, reconnect with resume
Maintainers
Readme
@velajs/client
Framework-neutral HTTP and live-query client for Vela applications.
npm install @velajs/clientUse @velajs/client/http for the upstream Hono HTTP client and shared endpoint
contracts. The main entrypoint provides live subscriptions, reconnects and
optimistic updates; optional subpaths expose presence and offline support.
For generated form contracts, pass
fetch: withFormEncoding(formEncodings, suppliedFetch) to hc. This opt-in
adapter preserves multipart boundaries and serializes URL-encoded routes as
declared, including repeated fields. It accepts browser/native fetch transports
without platform dependencies; wrap per-call fetch overrides too.
For binary and streaming HTTP contracts, readHttpResponse(call, 'response')
keeps native status and headers, 'blob' uses native buffered blob consumption,
and 'stream' returns the unread byte stream. Native JSON results stay unknown;
validate them before assigning domain types. Cancellation and producer errors
remain native stream behavior.
See the client guide, HTTP guide, and complete Workers starter.
